10c6340caSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
20c6340caSmrg#
30c6340caSmrg#   Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software
40c6340caSmrg#   Foundation, Inc.
50c6340caSmrg#   Written by Gordon Matzigkeit, 1996
60c6340caSmrg#
70c6340caSmrg# This file is free software; the Free Software Foundation gives
80c6340caSmrg# unlimited permission to copy and/or distribute it, with or without
90c6340caSmrg# modifications, as long as this notice is preserved.
100c6340caSmrg
110c6340caSmrgm4_define([_LT_COPYING], [dnl
120c6340caSmrg# Copyright (C) 2014 Free Software Foundation, Inc.
130c6340caSmrg# This is free software; see the source for copying conditions.  There is NO
140c6340caSmrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
150c6340caSmrg
160c6340caSmrg# GNU Libtool is free software; you can redistribute it and/or modify
170c6340caSmrg# it under the terms of the GNU General Public License as published by
180c6340caSmrg# the Free Software Foundation; either version 2 of of the License, or
190c6340caSmrg# (at your option) any later version.
200c6340caSmrg#
210c6340caSmrg# As a special exception to the GNU General Public License, if you
220c6340caSmrg# distribute this file as part of a program or library that is built
230c6340caSmrg# using GNU Libtool, you may include this file under the  same
240c6340caSmrg# distribution terms that you use for the rest of that program.
250c6340caSmrg#
260c6340caSmrg# GNU Libtool is distributed in the hope that it will be useful, but
270c6340caSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
280c6340caSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
290c6340caSmrg# GNU General Public License for more details.
300c6340caSmrg#
310c6340caSmrg# You should have received a copy of the GNU General Public License
320c6340caSmrg# along with this program.  If not, see <http://www.gnu.org/licenses/>.
330c6340caSmrg])
340c6340caSmrg
350c6340caSmrg# serial 59 LT_INIT
360c6340caSmrg
370c6340caSmrg
380c6340caSmrg# LT_PREREQ(VERSION)
390c6340caSmrg# ------------------
400c6340caSmrg# Complain and exit if this libtool version is less that VERSION.
410c6340caSmrgm4_defun([LT_PREREQ],
420c6340caSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
430c6340caSmrg       [m4_default([$3],
440c6340caSmrg		   [m4_fatal([Libtool version $1 or higher is required],
450c6340caSmrg		             63)])],
460c6340caSmrg       [$2])])
470c6340caSmrg
480c6340caSmrg
490c6340caSmrg# _LT_CHECK_BUILDDIR
500c6340caSmrg# ------------------
510c6340caSmrg# Complain if the absolute build directory name contains unusual characters
520c6340caSmrgm4_defun([_LT_CHECK_BUILDDIR],
530c6340caSmrg[case `pwd` in
540c6340caSmrg  *\ * | *\	*)
550c6340caSmrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
560c6340caSmrgesac
570c6340caSmrg])
580c6340caSmrg
590c6340caSmrg
600c6340caSmrg# LT_INIT([OPTIONS])
610c6340caSmrg# ------------------
620c6340caSmrgAC_DEFUN([LT_INIT],
630c6340caSmrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
640c6340caSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
650c6340caSmrgAC_BEFORE([$0], [LT_LANG])dnl
660c6340caSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
670c6340caSmrgAC_BEFORE([$0], [LTDL_INIT])dnl
680c6340caSmrgm4_require([_LT_CHECK_BUILDDIR])dnl
690c6340caSmrg
700c6340caSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
710c6340caSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
720c6340caSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
730c6340caSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
740c6340caSmrgdnl unless we require an AC_DEFUNed macro:
750c6340caSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
760c6340caSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
770c6340caSmrgAC_REQUIRE([LTVERSION_VERSION])dnl
780c6340caSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
790c6340caSmrgm4_require([_LT_PROG_LTMAIN])dnl
800c6340caSmrg
810c6340caSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
820c6340caSmrg
830c6340caSmrgdnl Parse OPTIONS
840c6340caSmrg_LT_SET_OPTIONS([$0], [$1])
850c6340caSmrg
860c6340caSmrg# This can be used to rebuild libtool when needed
870c6340caSmrgLIBTOOL_DEPS=$ltmain
880c6340caSmrg
890c6340caSmrg# Always use our own libtool.
900c6340caSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
910c6340caSmrgAC_SUBST(LIBTOOL)dnl
920c6340caSmrg
930c6340caSmrg_LT_SETUP
940c6340caSmrg
950c6340caSmrg# Only expand once:
960c6340caSmrgm4_define([LT_INIT])
970c6340caSmrg])# LT_INIT
980c6340caSmrg
990c6340caSmrg# Old names:
1000c6340caSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1010c6340caSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1020c6340caSmrgdnl aclocal-1.4 backwards compatibility:
1030c6340caSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1040c6340caSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1050c6340caSmrg
1060c6340caSmrg
1070c6340caSmrg# _LT_PREPARE_CC_BASENAME
1080c6340caSmrg# -----------------------
1090c6340caSmrgm4_defun([_LT_PREPARE_CC_BASENAME], [
1100c6340caSmrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1110c6340caSmrgfunc_cc_basename ()
1120c6340caSmrg{
1130c6340caSmrg    for cc_temp in @S|@*""; do
1140c6340caSmrg      case $cc_temp in
1150c6340caSmrg        compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1160c6340caSmrg        distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1170c6340caSmrg        \-*) ;;
1180c6340caSmrg        *) break;;
1190c6340caSmrg      esac
1200c6340caSmrg    done
1210c6340caSmrg    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
1220c6340caSmrg}
1230c6340caSmrg])# _LT_PREPARE_CC_BASENAME
1240c6340caSmrg
1250c6340caSmrg
1260c6340caSmrg# _LT_CC_BASENAME(CC)
1270c6340caSmrg# -------------------
1280c6340caSmrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
1290c6340caSmrg# but that macro is also expanded into generated libtool script, which
1300c6340caSmrg# arranges for $SED and $ECHO to be set by different means.
1310c6340caSmrgm4_defun([_LT_CC_BASENAME],
1320c6340caSmrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl
1330c6340caSmrgAC_REQUIRE([_LT_DECL_SED])dnl
1340c6340caSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1350c6340caSmrgfunc_cc_basename $1
1360c6340caSmrgcc_basename=$func_cc_basename_result
1370c6340caSmrg])
1380c6340caSmrg
1390c6340caSmrg
1400c6340caSmrg# _LT_FILEUTILS_DEFAULTS
1410c6340caSmrg# ----------------------
1420c6340caSmrg# It is okay to use these file commands and assume they have been set
1430c6340caSmrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
1440c6340caSmrgm4_defun([_LT_FILEUTILS_DEFAULTS],
1450c6340caSmrg[: ${CP="cp -f"}
1460c6340caSmrg: ${MV="mv -f"}
1470c6340caSmrg: ${RM="rm -f"}
1480c6340caSmrg])# _LT_FILEUTILS_DEFAULTS
1490c6340caSmrg
1500c6340caSmrg
1510c6340caSmrg# _LT_SETUP
1520c6340caSmrg# ---------
1530c6340caSmrgm4_defun([_LT_SETUP],
1540c6340caSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1550c6340caSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
1560c6340caSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
1570c6340caSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1580c6340caSmrg
1590c6340caSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
1600c6340caSmrgdnl
1610c6340caSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl
1620c6340caSmrg_LT_DECL([], [host], [0])dnl
1630c6340caSmrg_LT_DECL([], [host_os], [0])dnl
1640c6340caSmrgdnl
1650c6340caSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl
1660c6340caSmrg_LT_DECL([], [build], [0])dnl
1670c6340caSmrg_LT_DECL([], [build_os], [0])dnl
1680c6340caSmrgdnl
1690c6340caSmrgAC_REQUIRE([AC_PROG_CC])dnl
1700c6340caSmrgAC_REQUIRE([LT_PATH_LD])dnl
1710c6340caSmrgAC_REQUIRE([LT_PATH_NM])dnl
1720c6340caSmrgdnl
1730c6340caSmrgAC_REQUIRE([AC_PROG_LN_S])dnl
1740c6340caSmrgtest -z "$LN_S" && LN_S="ln -s"
1750c6340caSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1760c6340caSmrgdnl
1770c6340caSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
1780c6340caSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1790c6340caSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1800c6340caSmrgdnl
1810c6340caSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
1820c6340caSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
1830c6340caSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
1840c6340caSmrgm4_require([_LT_CMD_RELOAD])dnl
1850c6340caSmrgm4_require([_LT_DECL_FILECMD])dnl
1860c6340caSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
1870c6340caSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
1880c6340caSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
1890c6340caSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1900c6340caSmrgm4_require([_LT_WITH_SYSROOT])dnl
1910c6340caSmrgm4_require([_LT_CMD_TRUNCATE])dnl
1920c6340caSmrg
1930c6340caSmrg_LT_CONFIG_LIBTOOL_INIT([
1940c6340caSmrg# See if we are running on zsh, and set the options that allow our
1950c6340caSmrg# commands through without removal of \ escapes INIT.
1960c6340caSmrgif test -n "\${ZSH_VERSION+set}"; then
1970c6340caSmrg   setopt NO_GLOB_SUBST
1980c6340caSmrgfi
1990c6340caSmrg])
2000c6340caSmrgif test -n "${ZSH_VERSION+set}"; then
2010c6340caSmrg   setopt NO_GLOB_SUBST
2020c6340caSmrgfi
2030c6340caSmrg
2040c6340caSmrg_LT_CHECK_OBJDIR
2050c6340caSmrg
2060c6340caSmrgm4_require([_LT_TAG_COMPILER])dnl
2070c6340caSmrg
2080c6340caSmrgcase $host_os in
2090c6340caSmrgaix3*)
2100c6340caSmrg  # AIX sometimes has problems with the GCC collect2 program.  For some
2110c6340caSmrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
2120c6340caSmrg  # vanish in a puff of smoke.
2130c6340caSmrg  if test set != "${COLLECT_NAMES+set}"; then
2140c6340caSmrg    COLLECT_NAMES=
2150c6340caSmrg    export COLLECT_NAMES
2160c6340caSmrg  fi
2170c6340caSmrg  ;;
2180c6340caSmrgesac
2190c6340caSmrg
2200c6340caSmrg# Global variables:
2210c6340caSmrgofile=libtool
2220c6340caSmrgcan_build_shared=yes
2230c6340caSmrg
2240c6340caSmrg# All known linkers require a '.a' archive for static linking (except MSVC and
2250c6340caSmrg# ICC, which need '.lib').
2260c6340caSmrglibext=a
2270c6340caSmrg
2280c6340caSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
2290c6340caSmrg
2300c6340caSmrgold_CC=$CC
2310c6340caSmrgold_CFLAGS=$CFLAGS
2320c6340caSmrg
2330c6340caSmrg# Set sane defaults for various variables
2340c6340caSmrgtest -z "$CC" && CC=cc
2350c6340caSmrgtest -z "$LTCC" && LTCC=$CC
2360c6340caSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
2370c6340caSmrgtest -z "$LD" && LD=ld
2380c6340caSmrgtest -z "$ac_objext" && ac_objext=o
2390c6340caSmrg
2400c6340caSmrg_LT_CC_BASENAME([$compiler])
2410c6340caSmrg
2420c6340caSmrg# Only perform the check for file, if the check method requires it
2430c6340caSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
2440c6340caSmrgcase $deplibs_check_method in
2450c6340caSmrgfile_magic*)
2460c6340caSmrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2470c6340caSmrg    _LT_PATH_MAGIC
2480c6340caSmrg  fi
2490c6340caSmrg  ;;
2500c6340caSmrgesac
2510c6340caSmrg
2520c6340caSmrg# Use C for the default configuration in the libtool script
2530c6340caSmrgLT_SUPPORTED_TAG([CC])
2540c6340caSmrg_LT_LANG_C_CONFIG
2550c6340caSmrg_LT_LANG_DEFAULT_CONFIG
2560c6340caSmrg_LT_CONFIG_COMMANDS
2570c6340caSmrg])# _LT_SETUP
2580c6340caSmrg
2590c6340caSmrg
2600c6340caSmrg# _LT_PREPARE_SED_QUOTE_VARS
2610c6340caSmrg# --------------------------
2620c6340caSmrg# Define a few sed substitution that help us do robust quoting.
2630c6340caSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS],
2640c6340caSmrg[# Backslashify metacharacters that are still active within
2650c6340caSmrg# double-quoted strings.
2660c6340caSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
2670c6340caSmrg
2680c6340caSmrg# Same as above, but do not quote variable references.
2690c6340caSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
2700c6340caSmrg
2710c6340caSmrg# Sed substitution to delay expansion of an escaped shell variable in a
2720c6340caSmrg# double_quote_subst'ed string.
2730c6340caSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
2740c6340caSmrg
2750c6340caSmrg# Sed substitution to delay expansion of an escaped single quote.
2760c6340caSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
2770c6340caSmrg
2780c6340caSmrg# Sed substitution to avoid accidental globbing in evaled expressions
2790c6340caSmrgno_glob_subst='s/\*/\\\*/g'
2800c6340caSmrg])
2810c6340caSmrg
2820c6340caSmrg# _LT_PROG_LTMAIN
2830c6340caSmrg# ---------------
2840c6340caSmrg# Note that this code is called both from 'configure', and 'config.status'
2850c6340caSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
2860c6340caSmrg# 'config.status' has no value for ac_aux_dir unless we are using Automake,
2870c6340caSmrg# so we pass a copy along to make sure it has a sensible value anyway.
2880c6340caSmrgm4_defun([_LT_PROG_LTMAIN],
2890c6340caSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
2900c6340caSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
2910c6340caSmrgltmain=$ac_aux_dir/ltmain.sh
2920c6340caSmrg])# _LT_PROG_LTMAIN
2930c6340caSmrg
2940c6340caSmrg
2950c6340caSmrg## ------------------------------------- ##
2960c6340caSmrg## Accumulate code for creating libtool. ##
2970c6340caSmrg## ------------------------------------- ##
2980c6340caSmrg
2990c6340caSmrg# So that we can recreate a full libtool script including additional
3000c6340caSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
3010c6340caSmrg# in macros and then make a single call at the end using the 'libtool'
3020c6340caSmrg# label.
3030c6340caSmrg
3040c6340caSmrg
3050c6340caSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
3060c6340caSmrg# ----------------------------------------
3070c6340caSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
3080c6340caSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
3090c6340caSmrg[m4_ifval([$1],
3100c6340caSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
3110c6340caSmrg                     [$1
3120c6340caSmrg])])])
3130c6340caSmrg
3140c6340caSmrg# Initialize.
3150c6340caSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
3160c6340caSmrg
3170c6340caSmrg
3180c6340caSmrg# _LT_CONFIG_LIBTOOL([COMMANDS])
3190c6340caSmrg# ------------------------------
3200c6340caSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
3210c6340caSmrgm4_define([_LT_CONFIG_LIBTOOL],
3220c6340caSmrg[m4_ifval([$1],
3230c6340caSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
3240c6340caSmrg                     [$1
3250c6340caSmrg])])])
3260c6340caSmrg
3270c6340caSmrg# Initialize.
3280c6340caSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
3290c6340caSmrg
3300c6340caSmrg
3310c6340caSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
3320c6340caSmrg# -----------------------------------------------------
3330c6340caSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
3340c6340caSmrg[_LT_CONFIG_LIBTOOL([$1])
3350c6340caSmrg_LT_CONFIG_LIBTOOL_INIT([$2])
3360c6340caSmrg])
3370c6340caSmrg
3380c6340caSmrg
3390c6340caSmrg# _LT_FORMAT_COMMENT([COMMENT])
3400c6340caSmrg# -----------------------------
3410c6340caSmrg# Add leading comment marks to the start of each line, and a trailing
3420c6340caSmrg# full-stop to the whole comment if one is not present already.
3430c6340caSmrgm4_define([_LT_FORMAT_COMMENT],
3440c6340caSmrg[m4_ifval([$1], [
3450c6340caSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
3460c6340caSmrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
3470c6340caSmrg)])
3480c6340caSmrg
3490c6340caSmrg
3500c6340caSmrg
3510c6340caSmrg## ------------------------ ##
3520c6340caSmrg## FIXME: Eliminate VARNAME ##
3530c6340caSmrg## ------------------------ ##
3540c6340caSmrg
3550c6340caSmrg
3560c6340caSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
3570c6340caSmrg# -------------------------------------------------------------------
3580c6340caSmrg# CONFIGNAME is the name given to the value in the libtool script.
3590c6340caSmrg# VARNAME is the (base) name used in the configure script.
3600c6340caSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
3610c6340caSmrg# VARNAME.  Any other value will be used directly.
3620c6340caSmrgm4_define([_LT_DECL],
3630c6340caSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
3640c6340caSmrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
3650c6340caSmrg	[m4_ifval([$1], [$1], [$2])])
3660c6340caSmrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
3670c6340caSmrg    m4_ifval([$4],
3680c6340caSmrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
3690c6340caSmrg    lt_dict_add_subkey([lt_decl_dict], [$2],
3700c6340caSmrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
3710c6340caSmrg])
3720c6340caSmrg
3730c6340caSmrg
3740c6340caSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
3750c6340caSmrg# --------------------------------------------------------
3760c6340caSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
3770c6340caSmrg
3780c6340caSmrg
3790c6340caSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
3800c6340caSmrg# ------------------------------------------------
3810c6340caSmrgm4_define([lt_decl_tag_varnames],
3820c6340caSmrg[_lt_decl_filter([tagged?], [yes], $@)])
3830c6340caSmrg
3840c6340caSmrg
3850c6340caSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
3860c6340caSmrg# ---------------------------------------------------------
3870c6340caSmrgm4_define([_lt_decl_filter],
3880c6340caSmrg[m4_case([$#],
3890c6340caSmrg  [0], [m4_fatal([$0: too few arguments: $#])],
3900c6340caSmrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
3910c6340caSmrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
3920c6340caSmrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
3930c6340caSmrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
3940c6340caSmrg])
3950c6340caSmrg
3960c6340caSmrg
3970c6340caSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
3980c6340caSmrg# --------------------------------------------------
3990c6340caSmrgm4_define([lt_decl_quote_varnames],
4000c6340caSmrg[_lt_decl_filter([value], [1], $@)])
4010c6340caSmrg
4020c6340caSmrg
4030c6340caSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
4040c6340caSmrg# ---------------------------------------------------
4050c6340caSmrgm4_define([lt_decl_dquote_varnames],
4060c6340caSmrg[_lt_decl_filter([value], [2], $@)])
4070c6340caSmrg
4080c6340caSmrg
4090c6340caSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
4100c6340caSmrg# ---------------------------------------------------
4110c6340caSmrgm4_define([lt_decl_varnames_tagged],
4120c6340caSmrg[m4_assert([$# <= 2])dnl
4130c6340caSmrg_$0(m4_quote(m4_default([$1], [[, ]])),
4140c6340caSmrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
4150c6340caSmrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
4160c6340caSmrgm4_define([_lt_decl_varnames_tagged],
4170c6340caSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
4180c6340caSmrg
4190c6340caSmrg
4200c6340caSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
4210c6340caSmrg# ------------------------------------------------
4220c6340caSmrgm4_define([lt_decl_all_varnames],
4230c6340caSmrg[_$0(m4_quote(m4_default([$1], [[, ]])),
4240c6340caSmrg     m4_if([$2], [],
4250c6340caSmrg	   m4_quote(lt_decl_varnames),
4260c6340caSmrg	m4_quote(m4_shift($@))))[]dnl
4270c6340caSmrg])
4280c6340caSmrgm4_define([_lt_decl_all_varnames],
4290c6340caSmrg[lt_join($@, lt_decl_varnames_tagged([$1],
4300c6340caSmrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
4310c6340caSmrg])
4320c6340caSmrg
4330c6340caSmrg
4340c6340caSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
4350c6340caSmrg# ------------------------------------
4360c6340caSmrg# Quote a variable value, and forward it to 'config.status' so that its
4370c6340caSmrg# declaration there will have the same value as in 'configure'.  VARNAME
4380c6340caSmrg# must have a single quote delimited value for this to work.
4390c6340caSmrgm4_define([_LT_CONFIG_STATUS_DECLARE],
4400c6340caSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
4410c6340caSmrg
4420c6340caSmrg
4430c6340caSmrg# _LT_CONFIG_STATUS_DECLARATIONS
4440c6340caSmrg# ------------------------------
4450c6340caSmrg# We delimit libtool config variables with single quotes, so when
4460c6340caSmrg# we write them to config.status, we have to be sure to quote all
4470c6340caSmrg# embedded single quotes properly.  In configure, this macro expands
4480c6340caSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
4490c6340caSmrg#
4500c6340caSmrg#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
4510c6340caSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
4520c6340caSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
4530c6340caSmrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
4540c6340caSmrg
4550c6340caSmrg
4560c6340caSmrg# _LT_LIBTOOL_TAGS
4570c6340caSmrg# ----------------
4580c6340caSmrg# Output comment and list of tags supported by the script
4590c6340caSmrgm4_defun([_LT_LIBTOOL_TAGS],
4600c6340caSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
4610c6340caSmrgavailable_tags='_LT_TAGS'dnl
4620c6340caSmrg])
4630c6340caSmrg
4640c6340caSmrg
4650c6340caSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
4660c6340caSmrg# -----------------------------------
4670c6340caSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and
4680c6340caSmrg# expand to a commented shell variable setting:
4690c6340caSmrg#
4700c6340caSmrg#    # Some comment about what VAR is for.
4710c6340caSmrg#    visible_name=$lt_internal_name
4720c6340caSmrgm4_define([_LT_LIBTOOL_DECLARE],
4730c6340caSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
4740c6340caSmrg					   [description])))[]dnl
4750c6340caSmrgm4_pushdef([_libtool_name],
4760c6340caSmrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
4770c6340caSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
4780c6340caSmrg    [0], [_libtool_name=[$]$1],
4790c6340caSmrg    [1], [_libtool_name=$lt_[]$1],
4800c6340caSmrg    [2], [_libtool_name=$lt_[]$1],
4810c6340caSmrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
4820c6340caSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
4830c6340caSmrg])
4840c6340caSmrg
4850c6340caSmrg
4860c6340caSmrg# _LT_LIBTOOL_CONFIG_VARS
4870c6340caSmrg# -----------------------
4880c6340caSmrg# Produce commented declarations of non-tagged libtool config variables
4890c6340caSmrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
4900c6340caSmrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
4910c6340caSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
4920c6340caSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
4930c6340caSmrg[m4_foreach([_lt_var],
4940c6340caSmrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
4950c6340caSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
4960c6340caSmrg
4970c6340caSmrg
4980c6340caSmrg# _LT_LIBTOOL_TAG_VARS(TAG)
4990c6340caSmrg# -------------------------
5000c6340caSmrgm4_define([_LT_LIBTOOL_TAG_VARS],
5010c6340caSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
5020c6340caSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
5030c6340caSmrg
5040c6340caSmrg
5050c6340caSmrg# _LT_TAGVAR(VARNAME, [TAGNAME])
5060c6340caSmrg# ------------------------------
5070c6340caSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
5080c6340caSmrg
5090c6340caSmrg
5100c6340caSmrg# _LT_CONFIG_COMMANDS
5110c6340caSmrg# -------------------
5120c6340caSmrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
5130c6340caSmrg# variables for single and double quote escaping we saved from calls
5140c6340caSmrg# to _LT_DECL, we can put quote escaped variables declarations
5150c6340caSmrg# into 'config.status', and then the shell code to quote escape them in
5160c6340caSmrg# for loops in 'config.status'.  Finally, any additional code accumulated
5170c6340caSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
5180c6340caSmrgm4_defun([_LT_CONFIG_COMMANDS],
5190c6340caSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
5200c6340caSmrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
5210c6340caSmrg	dnl instead of duplicating it all over again into config.status,
5220c6340caSmrg	dnl then we will have config.status run $CONFIG_LT later, so it
5230c6340caSmrg	dnl needs to know what name is stored there:
5240c6340caSmrg        [AC_CONFIG_COMMANDS([libtool],
5250c6340caSmrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
5260c6340caSmrg    dnl If the libtool generation code is destined for config.status,
5270c6340caSmrg    dnl expand the accumulated commands and init code now:
5280c6340caSmrg    [AC_CONFIG_COMMANDS([libtool],
5290c6340caSmrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
5300c6340caSmrg])#_LT_CONFIG_COMMANDS
5310c6340caSmrg
5320c6340caSmrg
5330c6340caSmrg# Initialize.
5340c6340caSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
5350c6340caSmrg[
5360c6340caSmrg
5370c6340caSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
5380c6340caSmrg# if CDPATH is set.
5390c6340caSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5400c6340caSmrg
5410c6340caSmrgsed_quote_subst='$sed_quote_subst'
5420c6340caSmrgdouble_quote_subst='$double_quote_subst'
5430c6340caSmrgdelay_variable_subst='$delay_variable_subst'
5440c6340caSmrg_LT_CONFIG_STATUS_DECLARATIONS
5450c6340caSmrgLTCC='$LTCC'
5460c6340caSmrgLTCFLAGS='$LTCFLAGS'
5470c6340caSmrgcompiler='$compiler_DEFAULT'
5480c6340caSmrg
5490c6340caSmrg# A function that is used when there is no print builtin or printf.
5500c6340caSmrgfunc_fallback_echo ()
5510c6340caSmrg{
5520c6340caSmrg  eval 'cat <<_LTECHO_EOF
5530c6340caSmrg\$[]1
5540c6340caSmrg_LTECHO_EOF'
5550c6340caSmrg}
5560c6340caSmrg
5570c6340caSmrg# Quote evaled strings.
5580c6340caSmrgfor var in lt_decl_all_varnames([[ \
5590c6340caSmrg]], lt_decl_quote_varnames); do
5600c6340caSmrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
5610c6340caSmrg    *[[\\\\\\\`\\"\\\$]]*)
5620c6340caSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
5630c6340caSmrg      ;;
5640c6340caSmrg    *)
5650c6340caSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
5660c6340caSmrg      ;;
5670c6340caSmrg    esac
5680c6340caSmrgdone
5690c6340caSmrg
5700c6340caSmrg# Double-quote double-evaled strings.
5710c6340caSmrgfor var in lt_decl_all_varnames([[ \
5720c6340caSmrg]], lt_decl_dquote_varnames); do
5730c6340caSmrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
5740c6340caSmrg    *[[\\\\\\\`\\"\\\$]]*)
5750c6340caSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
5760c6340caSmrg      ;;
5770c6340caSmrg    *)
5780c6340caSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
5790c6340caSmrg      ;;
5800c6340caSmrg    esac
5810c6340caSmrgdone
5820c6340caSmrg
5830c6340caSmrg_LT_OUTPUT_LIBTOOL_INIT
5840c6340caSmrg])
5850c6340caSmrg
5860c6340caSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
5870c6340caSmrg# ------------------------------------
5880c6340caSmrg# Generate a child script FILE with all initialization necessary to
5890c6340caSmrg# reuse the environment learned by the parent script, and make the
5900c6340caSmrg# file executable.  If COMMENT is supplied, it is inserted after the
5910c6340caSmrg# '#!' sequence but before initialization text begins.  After this
5920c6340caSmrg# macro, additional text can be appended to FILE to form the body of
5930c6340caSmrg# the child script.  The macro ends with non-zero status if the
5940c6340caSmrg# file could not be fully written (such as if the disk is full).
5950c6340caSmrgm4_ifdef([AS_INIT_GENERATED],
5960c6340caSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
5970c6340caSmrg[m4_defun([_LT_GENERATED_FILE_INIT],
5980c6340caSmrg[m4_require([AS_PREPARE])]dnl
5990c6340caSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
6000c6340caSmrg[lt_write_fail=0
6010c6340caSmrgcat >$1 <<_ASEOF || lt_write_fail=1
6020c6340caSmrg#! $SHELL
6030c6340caSmrg# Generated by $as_me.
6040c6340caSmrg$2
6050c6340caSmrgSHELL=\${CONFIG_SHELL-$SHELL}
6060c6340caSmrgexport SHELL
6070c6340caSmrg_ASEOF
6080c6340caSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1
6090c6340caSmrgAS_SHELL_SANITIZE
6100c6340caSmrg_AS_PREPARE
6110c6340caSmrgexec AS_MESSAGE_FD>&1
6120c6340caSmrg_ASEOF
6130c6340caSmrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl
6140c6340caSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
6150c6340caSmrg
6160c6340caSmrg# LT_OUTPUT
6170c6340caSmrg# ---------
6180c6340caSmrg# This macro allows early generation of the libtool script (before
6190c6340caSmrg# AC_OUTPUT is called), incase it is used in configure for compilation
6200c6340caSmrg# tests.
6210c6340caSmrgAC_DEFUN([LT_OUTPUT],
6220c6340caSmrg[: ${CONFIG_LT=./config.lt}
6230c6340caSmrgAC_MSG_NOTICE([creating $CONFIG_LT])
6240c6340caSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
6250c6340caSmrg[# Run this file to recreate a libtool stub with the current configuration.])
6260c6340caSmrg
6270c6340caSmrgcat >>"$CONFIG_LT" <<\_LTEOF
6280c6340caSmrglt_cl_silent=false
6290c6340caSmrgexec AS_MESSAGE_LOG_FD>>config.log
6300c6340caSmrg{
6310c6340caSmrg  echo
6320c6340caSmrg  AS_BOX([Running $as_me.])
6330c6340caSmrg} >&AS_MESSAGE_LOG_FD
6340c6340caSmrg
6350c6340caSmrglt_cl_help="\
6360c6340caSmrg'$as_me' creates a local libtool stub from the current configuration,
6370c6340caSmrgfor use in further configure time tests before the real libtool is
6380c6340caSmrggenerated.
6390c6340caSmrg
6400c6340caSmrgUsage: $[0] [[OPTIONS]]
6410c6340caSmrg
6420c6340caSmrg  -h, --help      print this help, then exit
6430c6340caSmrg  -V, --version   print version number, then exit
6440c6340caSmrg  -q, --quiet     do not print progress messages
6450c6340caSmrg  -d, --debug     don't remove temporary files
6460c6340caSmrg
6470c6340caSmrgReport bugs to <bug-libtool@gnu.org>."
6480c6340caSmrg
6490c6340caSmrglt_cl_version="\
6500c6340caSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
6510c6340caSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
6520c6340caSmrgconfigured by $[0], generated by m4_PACKAGE_STRING.
6530c6340caSmrg
6540c6340caSmrgCopyright (C) 2011 Free Software Foundation, Inc.
6550c6340caSmrgThis config.lt script is free software; the Free Software Foundation
6560c6340caSmrggives unlimited permision to copy, distribute and modify it."
6570c6340caSmrg
6580c6340caSmrgwhile test 0 != $[#]
6590c6340caSmrgdo
6600c6340caSmrg  case $[1] in
6610c6340caSmrg    --version | --v* | -V )
6620c6340caSmrg      echo "$lt_cl_version"; exit 0 ;;
6630c6340caSmrg    --help | --h* | -h )
6640c6340caSmrg      echo "$lt_cl_help"; exit 0 ;;
6650c6340caSmrg    --debug | --d* | -d )
6660c6340caSmrg      debug=: ;;
6670c6340caSmrg    --quiet | --q* | --silent | --s* | -q )
6680c6340caSmrg      lt_cl_silent=: ;;
6690c6340caSmrg
6700c6340caSmrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
6710c6340caSmrgTry '$[0] --help' for more information.]) ;;
6720c6340caSmrg
6730c6340caSmrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
6740c6340caSmrgTry '$[0] --help' for more information.]) ;;
6750c6340caSmrg  esac
6760c6340caSmrg  shift
6770c6340caSmrgdone
6780c6340caSmrg
6790c6340caSmrgif $lt_cl_silent; then
6800c6340caSmrg  exec AS_MESSAGE_FD>/dev/null
6810c6340caSmrgfi
6820c6340caSmrg_LTEOF
6830c6340caSmrg
6840c6340caSmrgcat >>"$CONFIG_LT" <<_LTEOF
6850c6340caSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
6860c6340caSmrg_LTEOF
6870c6340caSmrg
6880c6340caSmrgcat >>"$CONFIG_LT" <<\_LTEOF
6890c6340caSmrgAC_MSG_NOTICE([creating $ofile])
6900c6340caSmrg_LT_OUTPUT_LIBTOOL_COMMANDS
6910c6340caSmrgAS_EXIT(0)
6920c6340caSmrg_LTEOF
6930c6340caSmrgchmod +x "$CONFIG_LT"
6940c6340caSmrg
6950c6340caSmrg# configure is writing to config.log, but config.lt does its own redirection,
6960c6340caSmrg# appending to config.log, which fails on DOS, as config.log is still kept
6970c6340caSmrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
6980c6340caSmrg# config.log, so it can be properly (re)opened and appended to by config.lt.
6990c6340caSmrglt_cl_success=:
7000c6340caSmrgtest yes = "$silent" &&
7010c6340caSmrg  lt_config_lt_args="$lt_config_lt_args --quiet"
7020c6340caSmrgexec AS_MESSAGE_LOG_FD>/dev/null
7030c6340caSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
7040c6340caSmrgexec AS_MESSAGE_LOG_FD>>config.log
7050c6340caSmrg$lt_cl_success || AS_EXIT(1)
7060c6340caSmrg])# LT_OUTPUT
7070c6340caSmrg
7080c6340caSmrg
7090c6340caSmrg# _LT_CONFIG(TAG)
7100c6340caSmrg# ---------------
7110c6340caSmrg# If TAG is the built-in tag, create an initial libtool script with a
7120c6340caSmrg# default configuration from the untagged config vars.  Otherwise add code
7130c6340caSmrg# to config.status for appending the configuration named by TAG from the
7140c6340caSmrg# matching tagged config vars.
7150c6340caSmrgm4_defun([_LT_CONFIG],
7160c6340caSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7170c6340caSmrg_LT_CONFIG_SAVE_COMMANDS([
7180c6340caSmrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
7190c6340caSmrg  m4_if(_LT_TAG, [C], [
7200c6340caSmrg    # See if we are running on zsh, and set the options that allow our
7210c6340caSmrg    # commands through without removal of \ escapes.
7220c6340caSmrg    if test -n "${ZSH_VERSION+set}"; then
7230c6340caSmrg      setopt NO_GLOB_SUBST
7240c6340caSmrg    fi
7250c6340caSmrg
7260c6340caSmrg    cfgfile=${ofile}T
7270c6340caSmrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
7280c6340caSmrg    $RM "$cfgfile"
7290c6340caSmrg
7300c6340caSmrg    cat <<_LT_EOF >> "$cfgfile"
7310c6340caSmrg#! $SHELL
7320c6340caSmrg# Generated automatically by $as_me ($PACKAGE) $VERSION
7330c6340caSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
7340c6340caSmrg
7350c6340caSmrg# Provide generalized library-building support services.
7360c6340caSmrg# Written by Gordon Matzigkeit, 1996
7370c6340caSmrg
7380c6340caSmrg_LT_COPYING
7390c6340caSmrg_LT_LIBTOOL_TAGS
7400c6340caSmrg
7410c6340caSmrg# Configured defaults for sys_lib_dlsearch_path munging.
7420c6340caSmrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
7430c6340caSmrg
7440c6340caSmrg# ### BEGIN LIBTOOL CONFIG
7450c6340caSmrg_LT_LIBTOOL_CONFIG_VARS
7460c6340caSmrg_LT_LIBTOOL_TAG_VARS
7470c6340caSmrg# ### END LIBTOOL CONFIG
7480c6340caSmrg
7490c6340caSmrg_LT_EOF
7500c6340caSmrg
7510c6340caSmrg    cat <<'_LT_EOF' >> "$cfgfile"
7520c6340caSmrg
7530c6340caSmrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
7540c6340caSmrg
7550c6340caSmrg_LT_PREPARE_MUNGE_PATH_LIST
7560c6340caSmrg_LT_PREPARE_CC_BASENAME
7570c6340caSmrg
7580c6340caSmrg# ### END FUNCTIONS SHARED WITH CONFIGURE
7590c6340caSmrg
7600c6340caSmrg_LT_EOF
7610c6340caSmrg
7620c6340caSmrg  case $host_os in
7630c6340caSmrg  aix3*)
7640c6340caSmrg    cat <<\_LT_EOF >> "$cfgfile"
7650c6340caSmrg# AIX sometimes has problems with the GCC collect2 program.  For some
7660c6340caSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems
7670c6340caSmrg# vanish in a puff of smoke.
7680c6340caSmrgif test set != "${COLLECT_NAMES+set}"; then
7690c6340caSmrg  COLLECT_NAMES=
7700c6340caSmrg  export COLLECT_NAMES
7710c6340caSmrgfi
7720c6340caSmrg_LT_EOF
7730c6340caSmrg    ;;
7740c6340caSmrg  esac
7750c6340caSmrg
7760c6340caSmrg  _LT_PROG_LTMAIN
7770c6340caSmrg
7780c6340caSmrg  # We use sed instead of cat because bash on DJGPP gets confused if
7790c6340caSmrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7800c6340caSmrg  # text mode, it properly converts lines to CR/LF.  This bash problem
7810c6340caSmrg  # is reportedly fixed, but why not run on old versions too?
7820c6340caSmrg  $SED '$q' "$ltmain" >> "$cfgfile" \
7830c6340caSmrg     || (rm -f "$cfgfile"; exit 1)
7840c6340caSmrg
7850c6340caSmrg   mv -f "$cfgfile" "$ofile" ||
7860c6340caSmrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
7870c6340caSmrg  chmod +x "$ofile"
7880c6340caSmrg],
7890c6340caSmrg[cat <<_LT_EOF >> "$ofile"
7900c6340caSmrg
7910c6340caSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
7920c6340caSmrgdnl in a comment (ie after a #).
7930c6340caSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1
7940c6340caSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
7950c6340caSmrg# ### END LIBTOOL TAG CONFIG: $1
7960c6340caSmrg_LT_EOF
7970c6340caSmrg])dnl /m4_if
7980c6340caSmrg],
7990c6340caSmrg[m4_if([$1], [], [
8000c6340caSmrg    PACKAGE='$PACKAGE'
8010c6340caSmrg    VERSION='$VERSION'
8020c6340caSmrg    RM='$RM'
8030c6340caSmrg    ofile='$ofile'], [])
8040c6340caSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS
8050c6340caSmrg])# _LT_CONFIG
8060c6340caSmrg
8070c6340caSmrg
8080c6340caSmrg# LT_SUPPORTED_TAG(TAG)
8090c6340caSmrg# ---------------------
8100c6340caSmrg# Trace this macro to discover what tags are supported by the libtool
8110c6340caSmrg# --tag option, using:
8120c6340caSmrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
8130c6340caSmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
8140c6340caSmrg
8150c6340caSmrg
8160c6340caSmrg# C support is built-in for now
8170c6340caSmrgm4_define([_LT_LANG_C_enabled], [])
8180c6340caSmrgm4_define([_LT_TAGS], [])
8190c6340caSmrg
8200c6340caSmrg
8210c6340caSmrg# LT_LANG(LANG)
8220c6340caSmrg# -------------
8230c6340caSmrg# Enable libtool support for the given language if not already enabled.
8240c6340caSmrgAC_DEFUN([LT_LANG],
8250c6340caSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
8260c6340caSmrgm4_case([$1],
8270c6340caSmrg  [C],			[_LT_LANG(C)],
8280c6340caSmrg  [C++],		[_LT_LANG(CXX)],
8290c6340caSmrg  [Go],			[_LT_LANG(GO)],
8300c6340caSmrg  [Java],		[_LT_LANG(GCJ)],
8310c6340caSmrg  [Fortran 77],		[_LT_LANG(F77)],
8320c6340caSmrg  [Fortran],		[_LT_LANG(FC)],
8330c6340caSmrg  [Windows Resource],	[_LT_LANG(RC)],
8340c6340caSmrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
8350c6340caSmrg    [_LT_LANG($1)],
8360c6340caSmrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
8370c6340caSmrg])# LT_LANG
8380c6340caSmrg
8390c6340caSmrg
8400c6340caSmrg# _LT_LANG(LANGNAME)
8410c6340caSmrg# ------------------
8420c6340caSmrgm4_defun([_LT_LANG],
8430c6340caSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
8440c6340caSmrg  [LT_SUPPORTED_TAG([$1])dnl
8450c6340caSmrg  m4_append([_LT_TAGS], [$1 ])dnl
8460c6340caSmrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
8470c6340caSmrg  _LT_LANG_$1_CONFIG($1)])dnl
8480c6340caSmrg])# _LT_LANG
8490c6340caSmrg
8500c6340caSmrg
8510c6340caSmrgm4_ifndef([AC_PROG_GO], [
8520c6340caSmrg############################################################
8530c6340caSmrg# NOTE: This macro has been submitted for inclusion into   #
8540c6340caSmrg#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
8550c6340caSmrg#  a released version of Autoconf we should remove this    #
8560c6340caSmrg#  macro and use it instead.                               #
8570c6340caSmrg############################################################
8580c6340caSmrgm4_defun([AC_PROG_GO],
8590c6340caSmrg[AC_LANG_PUSH(Go)dnl
8600c6340caSmrgAC_ARG_VAR([GOC],     [Go compiler command])dnl
8610c6340caSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
8620c6340caSmrg_AC_ARG_VAR_LDFLAGS()dnl
8630c6340caSmrgAC_CHECK_TOOL(GOC, gccgo)
8640c6340caSmrgif test -z "$GOC"; then
8650c6340caSmrg  if test -n "$ac_tool_prefix"; then
8660c6340caSmrg    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
8670c6340caSmrg  fi
8680c6340caSmrgfi
8690c6340caSmrgif test -z "$GOC"; then
8700c6340caSmrg  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
8710c6340caSmrgfi
8720c6340caSmrg])#m4_defun
8730c6340caSmrg])#m4_ifndef
8740c6340caSmrg
8750c6340caSmrg
8760c6340caSmrg# _LT_LANG_DEFAULT_CONFIG
8770c6340caSmrg# -----------------------
8780c6340caSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
8790c6340caSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
8800c6340caSmrg  [LT_LANG(CXX)],
8810c6340caSmrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
8820c6340caSmrg
8830c6340caSmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
8840c6340caSmrg  [LT_LANG(F77)],
8850c6340caSmrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
8860c6340caSmrg
8870c6340caSmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
8880c6340caSmrg  [LT_LANG(FC)],
8890c6340caSmrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
8900c6340caSmrg
8910c6340caSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
8920c6340caSmrgdnl pulling things in needlessly.
8930c6340caSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
8940c6340caSmrg  [LT_LANG(GCJ)],
8950c6340caSmrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
8960c6340caSmrg    [LT_LANG(GCJ)],
8970c6340caSmrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
8980c6340caSmrg      [LT_LANG(GCJ)],
8990c6340caSmrg      [m4_ifdef([AC_PROG_GCJ],
9000c6340caSmrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
9010c6340caSmrg       m4_ifdef([A][M_PROG_GCJ],
9020c6340caSmrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
9030c6340caSmrg       m4_ifdef([LT_PROG_GCJ],
9040c6340caSmrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
9050c6340caSmrg
9060c6340caSmrgAC_PROVIDE_IFELSE([AC_PROG_GO],
9070c6340caSmrg  [LT_LANG(GO)],
9080c6340caSmrg  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
9090c6340caSmrg
9100c6340caSmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
9110c6340caSmrg  [LT_LANG(RC)],
9120c6340caSmrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
9130c6340caSmrg])# _LT_LANG_DEFAULT_CONFIG
9140c6340caSmrg
9150c6340caSmrg# Obsolete macros:
9160c6340caSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
9170c6340caSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
9180c6340caSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
9190c6340caSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
9200c6340caSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
9210c6340caSmrgdnl aclocal-1.4 backwards compatibility:
9220c6340caSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
9230c6340caSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
9240c6340caSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
9250c6340caSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
9260c6340caSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], [])
9270c6340caSmrg
9280c6340caSmrg
9290c6340caSmrg# _LT_TAG_COMPILER
9300c6340caSmrg# ----------------
9310c6340caSmrgm4_defun([_LT_TAG_COMPILER],
9320c6340caSmrg[AC_REQUIRE([AC_PROG_CC])dnl
9330c6340caSmrg
9340c6340caSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
9350c6340caSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
9360c6340caSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
9370c6340caSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
9380c6340caSmrg
9390c6340caSmrg# If no C compiler was specified, use CC.
9400c6340caSmrgLTCC=${LTCC-"$CC"}
9410c6340caSmrg
9420c6340caSmrg# If no C compiler flags were specified, use CFLAGS.
9430c6340caSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
9440c6340caSmrg
9450c6340caSmrg# Allow CC to be a program name with arguments.
9460c6340caSmrgcompiler=$CC
9470c6340caSmrg])# _LT_TAG_COMPILER
9480c6340caSmrg
9490c6340caSmrg
9500c6340caSmrg# _LT_COMPILER_BOILERPLATE
9510c6340caSmrg# ------------------------
9520c6340caSmrg# Check for compiler boilerplate output or warnings with
9530c6340caSmrg# the simple compiler test code.
9540c6340caSmrgm4_defun([_LT_COMPILER_BOILERPLATE],
9550c6340caSmrg[m4_require([_LT_DECL_SED])dnl
9560c6340caSmrgac_outfile=conftest.$ac_objext
9570c6340caSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
9580c6340caSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
9590c6340caSmrg_lt_compiler_boilerplate=`cat conftest.err`
9600c6340caSmrg$RM conftest*
9610c6340caSmrg])# _LT_COMPILER_BOILERPLATE
9620c6340caSmrg
9630c6340caSmrg
9640c6340caSmrg# _LT_LINKER_BOILERPLATE
9650c6340caSmrg# ----------------------
9660c6340caSmrg# Check for linker boilerplate output or warnings with
9670c6340caSmrg# the simple link test code.
9680c6340caSmrgm4_defun([_LT_LINKER_BOILERPLATE],
9690c6340caSmrg[m4_require([_LT_DECL_SED])dnl
9700c6340caSmrgac_outfile=conftest.$ac_objext
9710c6340caSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
9720c6340caSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
9730c6340caSmrg_lt_linker_boilerplate=`cat conftest.err`
9740c6340caSmrg$RM -r conftest*
9750c6340caSmrg])# _LT_LINKER_BOILERPLATE
9760c6340caSmrg
9770c6340caSmrg# _LT_REQUIRED_DARWIN_CHECKS
9780c6340caSmrg# -------------------------
9790c6340caSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
9800c6340caSmrg  case $host_os in
9810c6340caSmrg    rhapsody* | darwin*)
9820c6340caSmrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
9830c6340caSmrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
9840c6340caSmrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
9850c6340caSmrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
9860c6340caSmrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
9870c6340caSmrg    _LT_DECL([], [DSYMUTIL], [1],
9880c6340caSmrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
9890c6340caSmrg    _LT_DECL([], [NMEDIT], [1],
9900c6340caSmrg      [Tool to change global to local symbols on Mac OS X])
9910c6340caSmrg    _LT_DECL([], [LIPO], [1],
9920c6340caSmrg      [Tool to manipulate fat objects and archives on Mac OS X])
9930c6340caSmrg    _LT_DECL([], [OTOOL], [1],
9940c6340caSmrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
9950c6340caSmrg    _LT_DECL([], [OTOOL64], [1],
9960c6340caSmrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
9970c6340caSmrg
9980c6340caSmrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
9990c6340caSmrg      [lt_cv_apple_cc_single_mod=no
10000c6340caSmrg      if test -z "$LT_MULTI_MODULE"; then
10010c6340caSmrg	# By default we will add the -single_module flag. You can override
10020c6340caSmrg	# by either setting the environment variable LT_MULTI_MODULE
10030c6340caSmrg	# non-empty at configure time, or by adding -multi_module to the
10040c6340caSmrg	# link flags.
10050c6340caSmrg	rm -rf libconftest.dylib*
10060c6340caSmrg	echo "int foo(void){return 1;}" > conftest.c
10070c6340caSmrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10080c6340caSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
10090c6340caSmrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10100c6340caSmrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
10110c6340caSmrg        _lt_result=$?
10120c6340caSmrg	# If there is a non-empty error log, and "single_module"
10130c6340caSmrg	# appears in it, assume the flag caused a linker warning
10140c6340caSmrg        if test -s conftest.err && $GREP single_module conftest.err; then
10150c6340caSmrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
10160c6340caSmrg	# Otherwise, if the output was created with a 0 exit code from
10170c6340caSmrg	# the compiler, it worked.
10180c6340caSmrg	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
10190c6340caSmrg	  lt_cv_apple_cc_single_mod=yes
10200c6340caSmrg	else
10210c6340caSmrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
10220c6340caSmrg	fi
10230c6340caSmrg	rm -rf libconftest.dylib*
10240c6340caSmrg	rm -f conftest.*
10250c6340caSmrg      fi])
10260c6340caSmrg
10270c6340caSmrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
10280c6340caSmrg      [lt_cv_ld_exported_symbols_list],
10290c6340caSmrg      [lt_cv_ld_exported_symbols_list=no
10300c6340caSmrg      save_LDFLAGS=$LDFLAGS
10310c6340caSmrg      echo "_main" > conftest.sym
10320c6340caSmrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
10330c6340caSmrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
10340c6340caSmrg	[lt_cv_ld_exported_symbols_list=yes],
10350c6340caSmrg	[lt_cv_ld_exported_symbols_list=no])
10360c6340caSmrg	LDFLAGS=$save_LDFLAGS
10370c6340caSmrg    ])
10380c6340caSmrg
10390c6340caSmrg    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
10400c6340caSmrg      [lt_cv_ld_force_load=no
10410c6340caSmrg      cat > conftest.c << _LT_EOF
10420c6340caSmrgint forced_loaded() { return 2;}
10430c6340caSmrg_LT_EOF
10440c6340caSmrg      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
10450c6340caSmrg      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
10460c6340caSmrg      echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
10470c6340caSmrg      $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
10480c6340caSmrg      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
10490c6340caSmrg      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
10500c6340caSmrg      cat > conftest.c << _LT_EOF
10510c6340caSmrgint main() { return 0;}
10520c6340caSmrg_LT_EOF
10530c6340caSmrg      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
10540c6340caSmrg      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
10550c6340caSmrg      _lt_result=$?
10560c6340caSmrg      if test -s conftest.err && $GREP force_load conftest.err; then
10570c6340caSmrg	cat conftest.err >&AS_MESSAGE_LOG_FD
10580c6340caSmrg      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
10590c6340caSmrg	lt_cv_ld_force_load=yes
10600c6340caSmrg      else
10610c6340caSmrg	cat conftest.err >&AS_MESSAGE_LOG_FD
10620c6340caSmrg      fi
10630c6340caSmrg        rm -f conftest.err libconftest.a conftest conftest.c
10640c6340caSmrg        rm -rf conftest.dSYM
10650c6340caSmrg    ])
10660c6340caSmrg    case $host_os in
10670c6340caSmrg    rhapsody* | darwin1.[[012]])
10680c6340caSmrg      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
10690c6340caSmrg    darwin1.*)
10700c6340caSmrg      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10710c6340caSmrg    darwin*)
10720c6340caSmrg      case $MACOSX_DEPLOYMENT_TARGET,$host in
10730c6340caSmrg        10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
10740c6340caSmrg          _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10750c6340caSmrg        *)
10760c6340caSmrg          _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10770c6340caSmrg      esac
10780c6340caSmrg    ;;
10790c6340caSmrg  esac
10800c6340caSmrg    if test yes = "$lt_cv_apple_cc_single_mod"; then
10810c6340caSmrg      _lt_dar_single_mod='$single_module'
10820c6340caSmrg    fi
10830c6340caSmrg    if test yes = "$lt_cv_ld_exported_symbols_list"; then
10840c6340caSmrg      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
10850c6340caSmrg    else
10860c6340caSmrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
10870c6340caSmrg    fi
10880c6340caSmrg    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
10890c6340caSmrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
10900c6340caSmrg    else
10910c6340caSmrg      _lt_dsymutil=
10920c6340caSmrg    fi
10930c6340caSmrg    ;;
10940c6340caSmrg  esac
10950c6340caSmrg])
10960c6340caSmrg
10970c6340caSmrg
10980c6340caSmrg# _LT_DARWIN_LINKER_FEATURES([TAG])
10990c6340caSmrg# ---------------------------------
11000c6340caSmrg# Checks for linker and compiler features on darwin
11010c6340caSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
11020c6340caSmrg[
11030c6340caSmrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
11040c6340caSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
11050c6340caSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
11060c6340caSmrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
11070c6340caSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
11080c6340caSmrg  if test yes = "$lt_cv_ld_force_load"; then
11090c6340caSmrg    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
11100c6340caSmrg    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
11110c6340caSmrg                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
11120c6340caSmrg  else
11130c6340caSmrg    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
11140c6340caSmrg  fi
11150c6340caSmrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
11160c6340caSmrg  _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
11170c6340caSmrg  case $cc_basename in
11180c6340caSmrg     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
11190c6340caSmrg     *) _lt_dar_can_shared=$GCC ;;
11200c6340caSmrg  esac
11210c6340caSmrg  if test yes = "$_lt_dar_can_shared"; then
11220c6340caSmrg    output_verbose_link_cmd=func_echo_all
11230c6340caSmrg    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
11240c6340caSmrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
11250c6340caSmrg    _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
11260c6340caSmrg    _LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
11270c6340caSmrg    m4_if([$1], [CXX],
11280c6340caSmrg[   if test yes != "$lt_cv_apple_cc_single_mod"; then
11290c6340caSmrg      _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
11300c6340caSmrg      _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
11310c6340caSmrg    fi
11320c6340caSmrg],[])
11330c6340caSmrg  else
11340c6340caSmrg  _LT_TAGVAR(ld_shlibs, $1)=no
11350c6340caSmrg  fi
11360c6340caSmrg])
11370c6340caSmrg
11380c6340caSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
11390c6340caSmrg# ----------------------------------
11400c6340caSmrg# Links a minimal program and checks the executable
11410c6340caSmrg# for the system default hardcoded library path. In most cases,
11420c6340caSmrg# this is /usr/lib:/lib, but when the MPI compilers are used
11430c6340caSmrg# the location of the communication and MPI libs are included too.
11440c6340caSmrg# If we don't find anything, use the default library path according
11450c6340caSmrg# to the aix ld manual.
11460c6340caSmrg# Store the results from the different compilers for each TAGNAME.
11470c6340caSmrg# Allow to override them for all tags through lt_cv_aix_libpath.
11480c6340caSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
11490c6340caSmrg[m4_require([_LT_DECL_SED])dnl
11500c6340caSmrgif test set = "${lt_cv_aix_libpath+set}"; then
11510c6340caSmrg  aix_libpath=$lt_cv_aix_libpath
11520c6340caSmrgelse
11530c6340caSmrg  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
11540c6340caSmrg  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
11550c6340caSmrg  lt_aix_libpath_sed='[
11560c6340caSmrg      /Import File Strings/,/^$/ {
11570c6340caSmrg	  /^0/ {
11580c6340caSmrg	      s/^0  *\([^ ]*\) *$/\1/
11590c6340caSmrg	      p
11600c6340caSmrg	  }
11610c6340caSmrg      }]'
11620c6340caSmrg  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11630c6340caSmrg  # Check for a 64-bit object if we didn't find anything.
11640c6340caSmrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
11650c6340caSmrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11660c6340caSmrg  fi],[])
11670c6340caSmrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
11680c6340caSmrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
11690c6340caSmrg  fi
11700c6340caSmrg  ])
11710c6340caSmrg  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
11720c6340caSmrgfi
11730c6340caSmrg])# _LT_SYS_MODULE_PATH_AIX
11740c6340caSmrg
11750c6340caSmrg
11760c6340caSmrg# _LT_SHELL_INIT(ARG)
11770c6340caSmrg# -------------------
11780c6340caSmrgm4_define([_LT_SHELL_INIT],
11790c6340caSmrg[m4_divert_text([M4SH-INIT], [$1
11800c6340caSmrg])])# _LT_SHELL_INIT
11810c6340caSmrg
11820c6340caSmrg
11830c6340caSmrg
11840c6340caSmrg# _LT_PROG_ECHO_BACKSLASH
11850c6340caSmrg# -----------------------
11860c6340caSmrg# Find how we can fake an echo command that does not interpret backslash.
11870c6340caSmrg# In particular, with Autoconf 2.60 or later we add some code to the start
11880c6340caSmrg# of the generated configure script that will find a shell with a builtin
11890c6340caSmrg# printf (that we can use as an echo command).
11900c6340caSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
11910c6340caSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
11920c6340caSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
11930c6340caSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
11940c6340caSmrg
11950c6340caSmrgAC_MSG_CHECKING([how to print strings])
11960c6340caSmrg# Test print first, because it will be a builtin if present.
11970c6340caSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
11980c6340caSmrg   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
11990c6340caSmrg  ECHO='print -r --'
12000c6340caSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
12010c6340caSmrg  ECHO='printf %s\n'
12020c6340caSmrgelse
12030c6340caSmrg  # Use this function as a fallback that always works.
12040c6340caSmrg  func_fallback_echo ()
12050c6340caSmrg  {
12060c6340caSmrg    eval 'cat <<_LTECHO_EOF
12070c6340caSmrg$[]1
12080c6340caSmrg_LTECHO_EOF'
12090c6340caSmrg  }
12100c6340caSmrg  ECHO='func_fallback_echo'
12110c6340caSmrgfi
12120c6340caSmrg
12130c6340caSmrg# func_echo_all arg...
12140c6340caSmrg# Invoke $ECHO with all args, space-separated.
12150c6340caSmrgfunc_echo_all ()
12160c6340caSmrg{
12170c6340caSmrg    $ECHO "$*"
12180c6340caSmrg}
12190c6340caSmrg
12200c6340caSmrgcase $ECHO in
12210c6340caSmrg  printf*) AC_MSG_RESULT([printf]) ;;
12220c6340caSmrg  print*) AC_MSG_RESULT([print -r]) ;;
12230c6340caSmrg  *) AC_MSG_RESULT([cat]) ;;
12240c6340caSmrgesac
12250c6340caSmrg
12260c6340caSmrgm4_ifdef([_AS_DETECT_SUGGESTED],
12270c6340caSmrg[_AS_DETECT_SUGGESTED([
12280c6340caSmrg  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
12290c6340caSmrg    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
12300c6340caSmrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
12310c6340caSmrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
12320c6340caSmrg    PATH=/empty FPATH=/empty; export PATH FPATH
12330c6340caSmrg    test "X`printf %s $ECHO`" = "X$ECHO" \
12340c6340caSmrg      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
12350c6340caSmrg
12360c6340caSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
12370c6340caSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
12380c6340caSmrg])# _LT_PROG_ECHO_BACKSLASH
12390c6340caSmrg
12400c6340caSmrg
12410c6340caSmrg# _LT_WITH_SYSROOT
12420c6340caSmrg# ----------------
12430c6340caSmrgAC_DEFUN([_LT_WITH_SYSROOT],
12440c6340caSmrg[m4_require([_LT_DECL_SED])dnl
12450c6340caSmrgAC_MSG_CHECKING([for sysroot])
12460c6340caSmrgAC_ARG_WITH([sysroot],
12470c6340caSmrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
12480c6340caSmrg  [Search for dependent libraries within DIR (or the compiler's sysroot
12490c6340caSmrg   if not specified).])],
12500c6340caSmrg[], [with_sysroot=no])
12510c6340caSmrg
12520c6340caSmrgdnl lt_sysroot will always be passed unquoted.  We quote it here
12530c6340caSmrgdnl in case the user passed a directory name.
12540c6340caSmrglt_sysroot=
12550c6340caSmrgcase $with_sysroot in #(
12560c6340caSmrg yes)
12570c6340caSmrg   if test yes = "$GCC"; then
12580c6340caSmrg     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
12590c6340caSmrg   fi
12600c6340caSmrg   ;; #(
12610c6340caSmrg /*)
12620c6340caSmrg   lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
12630c6340caSmrg   ;; #(
12640c6340caSmrg no|'')
12650c6340caSmrg   ;; #(
12660c6340caSmrg *)
12670c6340caSmrg   AC_MSG_RESULT([$with_sysroot])
12680c6340caSmrg   AC_MSG_ERROR([The sysroot must be an absolute path.])
12690c6340caSmrg   ;;
12700c6340caSmrgesac
12710c6340caSmrg
12720c6340caSmrg AC_MSG_RESULT([${lt_sysroot:-no}])
12730c6340caSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
12740c6340caSmrg[dependent libraries, and where our libraries should be installed.])])
12750c6340caSmrg
12760c6340caSmrg# _LT_ENABLE_LOCK
12770c6340caSmrg# ---------------
12780c6340caSmrgm4_defun([_LT_ENABLE_LOCK],
12790c6340caSmrg[AC_ARG_ENABLE([libtool-lock],
12800c6340caSmrg  [AS_HELP_STRING([--disable-libtool-lock],
12810c6340caSmrg    [avoid locking (might break parallel builds)])])
12820c6340caSmrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes
12830c6340caSmrg
12840c6340caSmrg# Some flags need to be propagated to the compiler or linker for good
12850c6340caSmrg# libtool support.
12860c6340caSmrgcase $host in
12870c6340caSmrgia64-*-hpux*)
12880c6340caSmrg  # Find out what ABI is being produced by ac_compile, and set mode
12890c6340caSmrg  # options accordingly.
12900c6340caSmrg  echo 'int i;' > conftest.$ac_ext
12910c6340caSmrg  if AC_TRY_EVAL(ac_compile); then
12920c6340caSmrg    case `$FILECMD conftest.$ac_objext` in
12930c6340caSmrg      *ELF-32*)
12940c6340caSmrg	HPUX_IA64_MODE=32
12950c6340caSmrg	;;
12960c6340caSmrg      *ELF-64*)
12970c6340caSmrg	HPUX_IA64_MODE=64
12980c6340caSmrg	;;
12990c6340caSmrg    esac
13000c6340caSmrg  fi
13010c6340caSmrg  rm -rf conftest*
13020c6340caSmrg  ;;
13030c6340caSmrg*-*-irix6*)
13040c6340caSmrg  # Find out what ABI is being produced by ac_compile, and set linker
13050c6340caSmrg  # options accordingly.
13060c6340caSmrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
13070c6340caSmrg  if AC_TRY_EVAL(ac_compile); then
13080c6340caSmrg    if test yes = "$lt_cv_prog_gnu_ld"; then
13090c6340caSmrg      case `$FILECMD conftest.$ac_objext` in
13100c6340caSmrg	*32-bit*)
13110c6340caSmrg	  LD="${LD-ld} -melf32bsmip"
13120c6340caSmrg	  ;;
13130c6340caSmrg	*N32*)
13140c6340caSmrg	  LD="${LD-ld} -melf32bmipn32"
13150c6340caSmrg	  ;;
13160c6340caSmrg	*64-bit*)
13170c6340caSmrg	  LD="${LD-ld} -melf64bmip"
13180c6340caSmrg	;;
13190c6340caSmrg      esac
13200c6340caSmrg    else
13210c6340caSmrg      case `$FILECMD conftest.$ac_objext` in
13220c6340caSmrg	*32-bit*)
13230c6340caSmrg	  LD="${LD-ld} -32"
13240c6340caSmrg	  ;;
13250c6340caSmrg	*N32*)
13260c6340caSmrg	  LD="${LD-ld} -n32"
13270c6340caSmrg	  ;;
13280c6340caSmrg	*64-bit*)
13290c6340caSmrg	  LD="${LD-ld} -64"
13300c6340caSmrg	  ;;
13310c6340caSmrg      esac
13320c6340caSmrg    fi
13330c6340caSmrg  fi
13340c6340caSmrg  rm -rf conftest*
13350c6340caSmrg  ;;
13360c6340caSmrg
13370c6340caSmrgmips64*-*linux*)
13380c6340caSmrg  # Find out what ABI is being produced by ac_compile, and set linker
13390c6340caSmrg  # options accordingly.
13400c6340caSmrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
13410c6340caSmrg  if AC_TRY_EVAL(ac_compile); then
13420c6340caSmrg    emul=elf
13430c6340caSmrg    case `$FILECMD conftest.$ac_objext` in
13440c6340caSmrg      *32-bit*)
13450c6340caSmrg	emul="${emul}32"
13460c6340caSmrg	;;
13470c6340caSmrg      *64-bit*)
13480c6340caSmrg	emul="${emul}64"
13490c6340caSmrg	;;
13500c6340caSmrg    esac
13510c6340caSmrg    case `$FILECMD conftest.$ac_objext` in
13520c6340caSmrg      *MSB*)
13530c6340caSmrg	emul="${emul}btsmip"
13540c6340caSmrg	;;
13550c6340caSmrg      *LSB*)
13560c6340caSmrg	emul="${emul}ltsmip"
13570c6340caSmrg	;;
13580c6340caSmrg    esac
13590c6340caSmrg    case `$FILECMD conftest.$ac_objext` in
13600c6340caSmrg      *N32*)
13610c6340caSmrg	emul="${emul}n32"
13620c6340caSmrg	;;
13630c6340caSmrg    esac
13640c6340caSmrg    LD="${LD-ld} -m $emul"
13650c6340caSmrg  fi
13660c6340caSmrg  rm -rf conftest*
13670c6340caSmrg  ;;
13680c6340caSmrg
13690c6340caSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
13700c6340caSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
13710c6340caSmrg  # Find out what ABI is being produced by ac_compile, and set linker
13720c6340caSmrg  # options accordingly.  Note that the listed cases only cover the
13730c6340caSmrg  # situations where additional linker options are needed (such as when
13740c6340caSmrg  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
13750c6340caSmrg  # vice versa); the common cases where no linker options are needed do
13760c6340caSmrg  # not appear in the list.
13770c6340caSmrg  echo 'int i;' > conftest.$ac_ext
13780c6340caSmrg  if AC_TRY_EVAL(ac_compile); then
13790c6340caSmrg    case `$FILECMD conftest.o` in
13800c6340caSmrg      *32-bit*)
13810c6340caSmrg	case $host in
13820c6340caSmrg	  x86_64-*kfreebsd*-gnu)
13830c6340caSmrg	    LD="${LD-ld} -m elf_i386_fbsd"
13840c6340caSmrg	    ;;
13850c6340caSmrg	  x86_64-*linux*)
13860c6340caSmrg	    case `$FILECMD conftest.o` in
13870c6340caSmrg	      *x86-64*)
13880c6340caSmrg		LD="${LD-ld} -m elf32_x86_64"
13890c6340caSmrg		;;
13900c6340caSmrg	      *)
13910c6340caSmrg		LD="${LD-ld} -m elf_i386"
13920c6340caSmrg		;;
13930c6340caSmrg	    esac
13940c6340caSmrg	    ;;
13950c6340caSmrg	  powerpc64le-*linux*)
13960c6340caSmrg	    LD="${LD-ld} -m elf32lppclinux"
13970c6340caSmrg	    ;;
13980c6340caSmrg	  powerpc64-*linux*)
13990c6340caSmrg	    LD="${LD-ld} -m elf32ppclinux"
14000c6340caSmrg	    ;;
14010c6340caSmrg	  s390x-*linux*)
14020c6340caSmrg	    LD="${LD-ld} -m elf_s390"
14030c6340caSmrg	    ;;
14040c6340caSmrg	  sparc64-*linux*)
14050c6340caSmrg	    LD="${LD-ld} -m elf32_sparc"
14060c6340caSmrg	    ;;
14070c6340caSmrg	esac
14080c6340caSmrg	;;
14090c6340caSmrg      *64-bit*)
14100c6340caSmrg	case $host in
14110c6340caSmrg	  x86_64-*kfreebsd*-gnu)
14120c6340caSmrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
14130c6340caSmrg	    ;;
14140c6340caSmrg	  x86_64-*linux*)
14150c6340caSmrg	    LD="${LD-ld} -m elf_x86_64"
14160c6340caSmrg	    ;;
1417de301c82Smrg	  powerpcle-*linux*)
14180c6340caSmrg	    LD="${LD-ld} -m elf64lppc"
14190c6340caSmrg	    ;;
1420de301c82Smrg	  powerpc-*linux*)
14210c6340caSmrg	    LD="${LD-ld} -m elf64ppc"
14220c6340caSmrg	    ;;
14230c6340caSmrg	  s390*-*linux*|s390*-*tpf*)
14240c6340caSmrg	    LD="${LD-ld} -m elf64_s390"
14250c6340caSmrg	    ;;
14260c6340caSmrg	  sparc*-*linux*)
14270c6340caSmrg	    LD="${LD-ld} -m elf64_sparc"
14280c6340caSmrg	    ;;
14290c6340caSmrg	esac
14300c6340caSmrg	;;
14310c6340caSmrg    esac
14320c6340caSmrg  fi
14330c6340caSmrg  rm -rf conftest*
14340c6340caSmrg  ;;
14350c6340caSmrg
14360c6340caSmrg*-*-sco3.2v5*)
14370c6340caSmrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
14380c6340caSmrg  SAVE_CFLAGS=$CFLAGS
14390c6340caSmrg  CFLAGS="$CFLAGS -belf"
14400c6340caSmrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
14410c6340caSmrg    [AC_LANG_PUSH(C)
14420c6340caSmrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
14430c6340caSmrg     AC_LANG_POP])
14440c6340caSmrg  if test yes != "$lt_cv_cc_needs_belf"; then
14450c6340caSmrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
14460c6340caSmrg    CFLAGS=$SAVE_CFLAGS
14470c6340caSmrg  fi
14480c6340caSmrg  ;;
14490c6340caSmrg*-*solaris*)
14500c6340caSmrg  # Find out what ABI is being produced by ac_compile, and set linker
14510c6340caSmrg  # options accordingly.
14520c6340caSmrg  echo 'int i;' > conftest.$ac_ext
14530c6340caSmrg  if AC_TRY_EVAL(ac_compile); then
14540c6340caSmrg    case `$FILECMD conftest.o` in
14550c6340caSmrg    *64-bit*)
14560c6340caSmrg      case $lt_cv_prog_gnu_ld in
14570c6340caSmrg      yes*)
14580c6340caSmrg        case $host in
14590c6340caSmrg        i?86-*-solaris*|x86_64-*-solaris*)
14600c6340caSmrg          LD="${LD-ld} -m elf_x86_64"
14610c6340caSmrg          ;;
14620c6340caSmrg        sparc*-*-solaris*)
14630c6340caSmrg          LD="${LD-ld} -m elf64_sparc"
14640c6340caSmrg          ;;
14650c6340caSmrg        esac
14660c6340caSmrg        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
14670c6340caSmrg        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
14680c6340caSmrg          LD=${LD-ld}_sol2
14690c6340caSmrg        fi
14700c6340caSmrg        ;;
14710c6340caSmrg      *)
14720c6340caSmrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
14730c6340caSmrg	  LD="${LD-ld} -64"
14740c6340caSmrg	fi
14750c6340caSmrg	;;
14760c6340caSmrg      esac
14770c6340caSmrg      ;;
14780c6340caSmrg    esac
14790c6340caSmrg  fi
14800c6340caSmrg  rm -rf conftest*
14810c6340caSmrg  ;;
14820c6340caSmrgesac
14830c6340caSmrg
14840c6340caSmrgneed_locks=$enable_libtool_lock
14850c6340caSmrg])# _LT_ENABLE_LOCK
14860c6340caSmrg
14870c6340caSmrg
14880c6340caSmrg# _LT_PROG_AR
14890c6340caSmrg# -----------
14900c6340caSmrgm4_defun([_LT_PROG_AR],
14910c6340caSmrg[AC_CHECK_TOOLS(AR, [ar], false)
14920c6340caSmrg: ${AR=ar}
14930c6340caSmrg_LT_DECL([], [AR], [1], [The archiver])
14940c6340caSmrg
14950c6340caSmrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with
14960c6340caSmrg# Automake.  If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
14970c6340caSmrg# higher priority because thats what people were doing historically (setting
14980c6340caSmrg# ARFLAGS for automake and AR_FLAGS for libtool).  FIXME: Make the AR_FLAGS
14990c6340caSmrg# variable obsoleted/removed.
15000c6340caSmrg
15010c6340caSmrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
15020c6340caSmrglt_ar_flags=$AR_FLAGS
15030c6340caSmrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])
15040c6340caSmrg
15050c6340caSmrg# Make AR_FLAGS overridable by 'make ARFLAGS='.  Don't try to run-time override
15060c6340caSmrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
15070c6340caSmrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}],
15080c6340caSmrg         [Flags to create an archive])
15090c6340caSmrg
15100c6340caSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
15110c6340caSmrg  [lt_cv_ar_at_file=no
15120c6340caSmrg   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
15130c6340caSmrg     [echo conftest.$ac_objext > conftest.lst
15140c6340caSmrg      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
15150c6340caSmrg      AC_TRY_EVAL([lt_ar_try])
15160c6340caSmrg      if test 0 -eq "$ac_status"; then
15170c6340caSmrg	# Ensure the archiver fails upon bogus file names.
15180c6340caSmrg	rm -f conftest.$ac_objext libconftest.a
15190c6340caSmrg	AC_TRY_EVAL([lt_ar_try])
15200c6340caSmrg	if test 0 -ne "$ac_status"; then
15210c6340caSmrg          lt_cv_ar_at_file=@
15220c6340caSmrg        fi
15230c6340caSmrg      fi
15240c6340caSmrg      rm -f conftest.* libconftest.a
15250c6340caSmrg     ])
15260c6340caSmrg  ])
15270c6340caSmrg
15280c6340caSmrgif test no = "$lt_cv_ar_at_file"; then
15290c6340caSmrg  archiver_list_spec=
15300c6340caSmrgelse
15310c6340caSmrg  archiver_list_spec=$lt_cv_ar_at_file
15320c6340caSmrgfi
15330c6340caSmrg_LT_DECL([], [archiver_list_spec], [1],
15340c6340caSmrg  [How to feed a file listing to the archiver])
15350c6340caSmrg])# _LT_PROG_AR
15360c6340caSmrg
15370c6340caSmrg
15380c6340caSmrg# _LT_CMD_OLD_ARCHIVE
15390c6340caSmrg# -------------------
15400c6340caSmrgm4_defun([_LT_CMD_OLD_ARCHIVE],
15410c6340caSmrg[_LT_PROG_AR
15420c6340caSmrg
15430c6340caSmrgAC_CHECK_TOOL(STRIP, strip, :)
15440c6340caSmrgtest -z "$STRIP" && STRIP=:
15450c6340caSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
15460c6340caSmrg
15470c6340caSmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
15480c6340caSmrgtest -z "$RANLIB" && RANLIB=:
15490c6340caSmrg_LT_DECL([], [RANLIB], [1],
15500c6340caSmrg    [Commands used to install an old-style archive])
15510c6340caSmrg
15520c6340caSmrg# Determine commands to create old-style static archives.
15530c6340caSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
15540c6340caSmrgold_postinstall_cmds='chmod 644 $oldlib'
15550c6340caSmrgold_postuninstall_cmds=
15560c6340caSmrg
15570c6340caSmrgif test -n "$RANLIB"; then
15580c6340caSmrg  case $host_os in
15590c6340caSmrg  bitrig* | openbsd*)
15600c6340caSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
15610c6340caSmrg    ;;
15620c6340caSmrg  *)
15630c6340caSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
15640c6340caSmrg    ;;
15650c6340caSmrg  esac
15660c6340caSmrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
15670c6340caSmrgfi
15680c6340caSmrg
15690c6340caSmrgcase $host_os in
15700c6340caSmrg  darwin*)
15710c6340caSmrg    lock_old_archive_extraction=yes ;;
15720c6340caSmrg  *)
15730c6340caSmrg    lock_old_archive_extraction=no ;;
15740c6340caSmrgesac
15750c6340caSmrg_LT_DECL([], [old_postinstall_cmds], [2])
15760c6340caSmrg_LT_DECL([], [old_postuninstall_cmds], [2])
15770c6340caSmrg_LT_TAGDECL([], [old_archive_cmds], [2],
15780c6340caSmrg    [Commands used to build an old-style archive])
15790c6340caSmrg_LT_DECL([], [lock_old_archive_extraction], [0],
15800c6340caSmrg    [Whether to use a lock for old archive extraction])
15810c6340caSmrg])# _LT_CMD_OLD_ARCHIVE
15820c6340caSmrg
15830c6340caSmrg
15840c6340caSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
15850c6340caSmrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
15860c6340caSmrg# ----------------------------------------------------------------
15870c6340caSmrg# Check whether the given compiler option works
15880c6340caSmrgAC_DEFUN([_LT_COMPILER_OPTION],
15890c6340caSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
15900c6340caSmrgm4_require([_LT_DECL_SED])dnl
15910c6340caSmrgAC_CACHE_CHECK([$1], [$2],
15920c6340caSmrg  [$2=no
15930c6340caSmrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
15940c6340caSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
15950c6340caSmrg   lt_compiler_flag="$3"  ## exclude from sc_useless_quotes_in_assignment
15960c6340caSmrg   # Insert the option either (1) after the last *FLAGS variable, or
15970c6340caSmrg   # (2) before a word containing "conftest.", or (3) at the end.
15980c6340caSmrg   # Note that $ac_compile itself does not contain backslashes and begins
15990c6340caSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
16000c6340caSmrg   # The option is referenced via a variable to avoid confusing sed.
16010c6340caSmrg   lt_compile=`echo "$ac_compile" | $SED \
16020c6340caSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
16030c6340caSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
16040c6340caSmrg   -e 's:$: $lt_compiler_flag:'`
16050c6340caSmrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
16060c6340caSmrg   (eval "$lt_compile" 2>conftest.err)
16070c6340caSmrg   ac_status=$?
16080c6340caSmrg   cat conftest.err >&AS_MESSAGE_LOG_FD
16090c6340caSmrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
16100c6340caSmrg   if (exit $ac_status) && test -s "$ac_outfile"; then
16110c6340caSmrg     # The compiler can only warn and ignore the option if not recognized
16120c6340caSmrg     # So say no if there are warnings other than the usual output.
16130c6340caSmrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
16140c6340caSmrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
16150c6340caSmrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
16160c6340caSmrg       $2=yes
16170c6340caSmrg     fi
16180c6340caSmrg   fi
16190c6340caSmrg   $RM conftest*
16200c6340caSmrg])
16210c6340caSmrg
16220c6340caSmrgif test yes = "[$]$2"; then
16230c6340caSmrg    m4_if([$5], , :, [$5])
16240c6340caSmrgelse
16250c6340caSmrg    m4_if([$6], , :, [$6])
16260c6340caSmrgfi
16270c6340caSmrg])# _LT_COMPILER_OPTION
16280c6340caSmrg
16290c6340caSmrg# Old name:
16300c6340caSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
16310c6340caSmrgdnl aclocal-1.4 backwards compatibility:
16320c6340caSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
16330c6340caSmrg
16340c6340caSmrg
16350c6340caSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
16360c6340caSmrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
16370c6340caSmrg# ----------------------------------------------------
16380c6340caSmrg# Check whether the given linker option works
16390c6340caSmrgAC_DEFUN([_LT_LINKER_OPTION],
16400c6340caSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
16410c6340caSmrgm4_require([_LT_DECL_SED])dnl
16420c6340caSmrgAC_CACHE_CHECK([$1], [$2],
16430c6340caSmrg  [$2=no
16440c6340caSmrg   save_LDFLAGS=$LDFLAGS
16450c6340caSmrg   LDFLAGS="$LDFLAGS $3"
16460c6340caSmrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
16470c6340caSmrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
16480c6340caSmrg     # The linker can only warn and ignore the option if not recognized
16490c6340caSmrg     # So say no if there are warnings
16500c6340caSmrg     if test -s conftest.err; then
16510c6340caSmrg       # Append any errors to the config.log.
16520c6340caSmrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
16530c6340caSmrg       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
16540c6340caSmrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
16550c6340caSmrg       if diff conftest.exp conftest.er2 >/dev/null; then
16560c6340caSmrg         $2=yes
16570c6340caSmrg       fi
16580c6340caSmrg     else
16590c6340caSmrg       $2=yes
16600c6340caSmrg     fi
16610c6340caSmrg   fi
16620c6340caSmrg   $RM -r conftest*
16630c6340caSmrg   LDFLAGS=$save_LDFLAGS
16640c6340caSmrg])
16650c6340caSmrg
16660c6340caSmrgif test yes = "[$]$2"; then
16670c6340caSmrg    m4_if([$4], , :, [$4])
16680c6340caSmrgelse
16690c6340caSmrg    m4_if([$5], , :, [$5])
16700c6340caSmrgfi
16710c6340caSmrg])# _LT_LINKER_OPTION
16720c6340caSmrg
16730c6340caSmrg# Old name:
16740c6340caSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
16750c6340caSmrgdnl aclocal-1.4 backwards compatibility:
16760c6340caSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
16770c6340caSmrg
16780c6340caSmrg
16790c6340caSmrg# LT_CMD_MAX_LEN
16800c6340caSmrg#---------------
16810c6340caSmrgAC_DEFUN([LT_CMD_MAX_LEN],
16820c6340caSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
16830c6340caSmrg# find the maximum length of command line arguments
16840c6340caSmrgAC_MSG_CHECKING([the maximum length of command line arguments])
16850c6340caSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
16860c6340caSmrg  i=0
16870c6340caSmrg  teststring=ABCD
16880c6340caSmrg
16890c6340caSmrg  case $build_os in
16900c6340caSmrg  msdosdjgpp*)
16910c6340caSmrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
16920c6340caSmrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
16930c6340caSmrg    # during glob expansion).  Even if it were fixed, the result of this
16940c6340caSmrg    # check would be larger than it should be.
16950c6340caSmrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
16960c6340caSmrg    ;;
16970c6340caSmrg
16980c6340caSmrg  gnu*)
16990c6340caSmrg    # Under GNU Hurd, this test is not required because there is
17000c6340caSmrg    # no limit to the length of command line arguments.
17010c6340caSmrg    # Libtool will interpret -1 as no limit whatsoever
17020c6340caSmrg    lt_cv_sys_max_cmd_len=-1;
17030c6340caSmrg    ;;
17040c6340caSmrg
17050c6340caSmrg  cygwin* | mingw* | cegcc*)
17060c6340caSmrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
17070c6340caSmrg    # about 5 minutes as the teststring grows exponentially.
17080c6340caSmrg    # Worse, since 9x/ME are not pre-emptively multitasking,
17090c6340caSmrg    # you end up with a "frozen" computer, even though with patience
17100c6340caSmrg    # the test eventually succeeds (with a max line length of 256k).
17110c6340caSmrg    # Instead, let's just punt: use the minimum linelength reported by
17120c6340caSmrg    # all of the supported platforms: 8192 (on NT/2K/XP).
17130c6340caSmrg    lt_cv_sys_max_cmd_len=8192;
17140c6340caSmrg    ;;
17150c6340caSmrg
17160c6340caSmrg  mint*)
17170c6340caSmrg    # On MiNT this can take a long time and run out of memory.
17180c6340caSmrg    lt_cv_sys_max_cmd_len=8192;
17190c6340caSmrg    ;;
17200c6340caSmrg
17210c6340caSmrg  amigaos*)
17220c6340caSmrg    # On AmigaOS with pdksh, this test takes hours, literally.
17230c6340caSmrg    # So we just punt and use a minimum line length of 8192.
17240c6340caSmrg    lt_cv_sys_max_cmd_len=8192;
17250c6340caSmrg    ;;
17260c6340caSmrg
17270c6340caSmrg  bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
17280c6340caSmrg    # This has been around since 386BSD, at least.  Likely further.
17290c6340caSmrg    if test -x /sbin/sysctl; then
17300c6340caSmrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
17310c6340caSmrg    elif test -x /usr/sbin/sysctl; then
17320c6340caSmrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
17330c6340caSmrg    else
17340c6340caSmrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
17350c6340caSmrg    fi
17360c6340caSmrg    # And add a safety zone
17370c6340caSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
17380c6340caSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
17390c6340caSmrg    ;;
17400c6340caSmrg
17410c6340caSmrg  interix*)
17420c6340caSmrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
17430c6340caSmrg    lt_cv_sys_max_cmd_len=196608
17440c6340caSmrg    ;;
17450c6340caSmrg
17460c6340caSmrg  os2*)
17470c6340caSmrg    # The test takes a long time on OS/2.
17480c6340caSmrg    lt_cv_sys_max_cmd_len=8192
17490c6340caSmrg    ;;
17500c6340caSmrg
17510c6340caSmrg  osf*)
17520c6340caSmrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
17530c6340caSmrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
17540c6340caSmrg    # nice to cause kernel panics so lets avoid the loop below.
17550c6340caSmrg    # First set a reasonable default.
17560c6340caSmrg    lt_cv_sys_max_cmd_len=16384
17570c6340caSmrg    #
17580c6340caSmrg    if test -x /sbin/sysconfig; then
17590c6340caSmrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
17600c6340caSmrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
17610c6340caSmrg      esac
17620c6340caSmrg    fi
17630c6340caSmrg    ;;
17640c6340caSmrg  sco3.2v5*)
17650c6340caSmrg    lt_cv_sys_max_cmd_len=102400
17660c6340caSmrg    ;;
17670c6340caSmrg  sysv5* | sco5v6* | sysv4.2uw2*)
17680c6340caSmrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
17690c6340caSmrg    if test -n "$kargmax"; then
17700c6340caSmrg      lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[	 ]]//'`
17710c6340caSmrg    else
17720c6340caSmrg      lt_cv_sys_max_cmd_len=32768
17730c6340caSmrg    fi
17740c6340caSmrg    ;;
17750c6340caSmrg  *)
17760c6340caSmrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
17770c6340caSmrg    if test -n "$lt_cv_sys_max_cmd_len" && \
17780c6340caSmrg       test undefined != "$lt_cv_sys_max_cmd_len"; then
17790c6340caSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
17800c6340caSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
17810c6340caSmrg    else
17820c6340caSmrg      # Make teststring a little bigger before we do anything with it.
17830c6340caSmrg      # a 1K string should be a reasonable start.
17840c6340caSmrg      for i in 1 2 3 4 5 6 7 8; do
17850c6340caSmrg        teststring=$teststring$teststring
17860c6340caSmrg      done
17870c6340caSmrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
17880c6340caSmrg      # If test is not a shell built-in, we'll probably end up computing a
17890c6340caSmrg      # maximum length that is only half of the actual maximum length, but
17900c6340caSmrg      # we can't tell.
17910c6340caSmrg      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
17920c6340caSmrg	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
17930c6340caSmrg	      test 17 != "$i" # 1/2 MB should be enough
17940c6340caSmrg      do
17950c6340caSmrg        i=`expr $i + 1`
17960c6340caSmrg        teststring=$teststring$teststring
17970c6340caSmrg      done
17980c6340caSmrg      # Only check the string length outside the loop.
17990c6340caSmrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
18000c6340caSmrg      teststring=
18010c6340caSmrg      # Add a significant safety factor because C++ compilers can tack on
18020c6340caSmrg      # massive amounts of additional arguments before passing them to the
18030c6340caSmrg      # linker.  It appears as though 1/2 is a usable value.
18040c6340caSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
18050c6340caSmrg    fi
18060c6340caSmrg    ;;
18070c6340caSmrg  esac
18080c6340caSmrg])
18090c6340caSmrgif test -n "$lt_cv_sys_max_cmd_len"; then
18100c6340caSmrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
18110c6340caSmrgelse
18120c6340caSmrg  AC_MSG_RESULT(none)
18130c6340caSmrgfi
18140c6340caSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len
18150c6340caSmrg_LT_DECL([], [max_cmd_len], [0],
18160c6340caSmrg    [What is the maximum length of a command?])
18170c6340caSmrg])# LT_CMD_MAX_LEN
18180c6340caSmrg
18190c6340caSmrg# Old name:
18200c6340caSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
18210c6340caSmrgdnl aclocal-1.4 backwards compatibility:
18220c6340caSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
18230c6340caSmrg
18240c6340caSmrg
18250c6340caSmrg# _LT_HEADER_DLFCN
18260c6340caSmrg# ----------------
18270c6340caSmrgm4_defun([_LT_HEADER_DLFCN],
18280c6340caSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
18290c6340caSmrg])# _LT_HEADER_DLFCN
18300c6340caSmrg
18310c6340caSmrg
18320c6340caSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
18330c6340caSmrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
18340c6340caSmrg# ----------------------------------------------------------------
18350c6340caSmrgm4_defun([_LT_TRY_DLOPEN_SELF],
18360c6340caSmrg[m4_require([_LT_HEADER_DLFCN])dnl
18370c6340caSmrgif test yes = "$cross_compiling"; then :
18380c6340caSmrg  [$4]
18390c6340caSmrgelse
18400c6340caSmrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
18410c6340caSmrg  lt_status=$lt_dlunknown
18420c6340caSmrg  cat > conftest.$ac_ext <<_LT_EOF
18430c6340caSmrg[#line $LINENO "configure"
18440c6340caSmrg#include "confdefs.h"
18450c6340caSmrg
18460c6340caSmrg#if HAVE_DLFCN_H
18470c6340caSmrg#include <dlfcn.h>
18480c6340caSmrg#endif
18490c6340caSmrg
18500c6340caSmrg#include <stdio.h>
18510c6340caSmrg
18520c6340caSmrg#ifdef RTLD_GLOBAL
18530c6340caSmrg#  define LT_DLGLOBAL		RTLD_GLOBAL
18540c6340caSmrg#else
18550c6340caSmrg#  ifdef DL_GLOBAL
18560c6340caSmrg#    define LT_DLGLOBAL		DL_GLOBAL
18570c6340caSmrg#  else
18580c6340caSmrg#    define LT_DLGLOBAL		0
18590c6340caSmrg#  endif
18600c6340caSmrg#endif
18610c6340caSmrg
18620c6340caSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
18630c6340caSmrg   find out it does not work in some platform. */
18640c6340caSmrg#ifndef LT_DLLAZY_OR_NOW
18650c6340caSmrg#  ifdef RTLD_LAZY
18660c6340caSmrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
18670c6340caSmrg#  else
18680c6340caSmrg#    ifdef DL_LAZY
18690c6340caSmrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
18700c6340caSmrg#    else
18710c6340caSmrg#      ifdef RTLD_NOW
18720c6340caSmrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
18730c6340caSmrg#      else
18740c6340caSmrg#        ifdef DL_NOW
18750c6340caSmrg#          define LT_DLLAZY_OR_NOW	DL_NOW
18760c6340caSmrg#        else
18770c6340caSmrg#          define LT_DLLAZY_OR_NOW	0
18780c6340caSmrg#        endif
18790c6340caSmrg#      endif
18800c6340caSmrg#    endif
18810c6340caSmrg#  endif
18820c6340caSmrg#endif
18830c6340caSmrg
18840c6340caSmrg/* When -fvisibility=hidden is used, assume the code has been annotated
18850c6340caSmrg   correspondingly for the symbols needed.  */
18860c6340caSmrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
18870c6340caSmrgint fnord () __attribute__((visibility("default")));
18880c6340caSmrg#endif
18890c6340caSmrg
18900c6340caSmrgint fnord () { return 42; }
18910c6340caSmrgint main ()
18920c6340caSmrg{
18930c6340caSmrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
18940c6340caSmrg  int status = $lt_dlunknown;
18950c6340caSmrg
18960c6340caSmrg  if (self)
18970c6340caSmrg    {
18980c6340caSmrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
18990c6340caSmrg      else
19000c6340caSmrg        {
19010c6340caSmrg	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
19020c6340caSmrg          else puts (dlerror ());
19030c6340caSmrg	}
19040c6340caSmrg      /* dlclose (self); */
19050c6340caSmrg    }
19060c6340caSmrg  else
19070c6340caSmrg    puts (dlerror ());
19080c6340caSmrg
19090c6340caSmrg  return status;
19100c6340caSmrg}]
19110c6340caSmrg_LT_EOF
19120c6340caSmrg  if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
19130c6340caSmrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
19140c6340caSmrg    lt_status=$?
19150c6340caSmrg    case x$lt_status in
19160c6340caSmrg      x$lt_dlno_uscore) $1 ;;
19170c6340caSmrg      x$lt_dlneed_uscore) $2 ;;
19180c6340caSmrg      x$lt_dlunknown|x*) $3 ;;
19190c6340caSmrg    esac
19200c6340caSmrg  else :
19210c6340caSmrg    # compilation failed
19220c6340caSmrg    $3
19230c6340caSmrg  fi
19240c6340caSmrgfi
19250c6340caSmrgrm -fr conftest*
19260c6340caSmrg])# _LT_TRY_DLOPEN_SELF
19270c6340caSmrg
19280c6340caSmrg
19290c6340caSmrg# LT_SYS_DLOPEN_SELF
19300c6340caSmrg# ------------------
19310c6340caSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
19320c6340caSmrg[m4_require([_LT_HEADER_DLFCN])dnl
19330c6340caSmrgif test yes != "$enable_dlopen"; then
19340c6340caSmrg  enable_dlopen=unknown
19350c6340caSmrg  enable_dlopen_self=unknown
19360c6340caSmrg  enable_dlopen_self_static=unknown
19370c6340caSmrgelse
19380c6340caSmrg  lt_cv_dlopen=no
19390c6340caSmrg  lt_cv_dlopen_libs=
19400c6340caSmrg
19410c6340caSmrg  case $host_os in
19420c6340caSmrg  beos*)
19430c6340caSmrg    lt_cv_dlopen=load_add_on
19440c6340caSmrg    lt_cv_dlopen_libs=
19450c6340caSmrg    lt_cv_dlopen_self=yes
19460c6340caSmrg    ;;
19470c6340caSmrg
19480c6340caSmrg  mingw* | pw32* | cegcc*)
19490c6340caSmrg    lt_cv_dlopen=LoadLibrary
19500c6340caSmrg    lt_cv_dlopen_libs=
19510c6340caSmrg    ;;
19520c6340caSmrg
19530c6340caSmrg  cygwin*)
19540c6340caSmrg    lt_cv_dlopen=dlopen
19550c6340caSmrg    lt_cv_dlopen_libs=
19560c6340caSmrg    ;;
19570c6340caSmrg
19580c6340caSmrg  darwin*)
19590c6340caSmrg    # if libdl is installed we need to link against it
19600c6340caSmrg    AC_CHECK_LIB([dl], [dlopen],
19610c6340caSmrg		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
19620c6340caSmrg    lt_cv_dlopen=dyld
19630c6340caSmrg    lt_cv_dlopen_libs=
19640c6340caSmrg    lt_cv_dlopen_self=yes
19650c6340caSmrg    ])
19660c6340caSmrg    ;;
19670c6340caSmrg
19680c6340caSmrg  tpf*)
19690c6340caSmrg    # Don't try to run any link tests for TPF.  We know it's impossible
19700c6340caSmrg    # because TPF is a cross-compiler, and we know how we open DSOs.
19710c6340caSmrg    lt_cv_dlopen=dlopen
19720c6340caSmrg    lt_cv_dlopen_libs=
19730c6340caSmrg    lt_cv_dlopen_self=no
19740c6340caSmrg    ;;
19750c6340caSmrg
19760c6340caSmrg  *)
19770c6340caSmrg    AC_CHECK_FUNC([shl_load],
19780c6340caSmrg	  [lt_cv_dlopen=shl_load],
19790c6340caSmrg      [AC_CHECK_LIB([dld], [shl_load],
19800c6340caSmrg	    [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
19810c6340caSmrg	[AC_CHECK_FUNC([dlopen],
19820c6340caSmrg	      [lt_cv_dlopen=dlopen],
19830c6340caSmrg	  [AC_CHECK_LIB([dl], [dlopen],
19840c6340caSmrg		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
19850c6340caSmrg	    [AC_CHECK_LIB([svld], [dlopen],
19860c6340caSmrg		  [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
19870c6340caSmrg	      [AC_CHECK_LIB([dld], [dld_link],
19880c6340caSmrg		    [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
19890c6340caSmrg	      ])
19900c6340caSmrg	    ])
19910c6340caSmrg	  ])
19920c6340caSmrg	])
19930c6340caSmrg      ])
19940c6340caSmrg    ;;
19950c6340caSmrg  esac
19960c6340caSmrg
19970c6340caSmrg  if test no = "$lt_cv_dlopen"; then
19980c6340caSmrg    enable_dlopen=no
19990c6340caSmrg  else
20000c6340caSmrg    enable_dlopen=yes
20010c6340caSmrg  fi
20020c6340caSmrg
20030c6340caSmrg  case $lt_cv_dlopen in
20040c6340caSmrg  dlopen)
20050c6340caSmrg    save_CPPFLAGS=$CPPFLAGS
20060c6340caSmrg    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
20070c6340caSmrg
20080c6340caSmrg    save_LDFLAGS=$LDFLAGS
20090c6340caSmrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
20100c6340caSmrg
20110c6340caSmrg    save_LIBS=$LIBS
20120c6340caSmrg    LIBS="$lt_cv_dlopen_libs $LIBS"
20130c6340caSmrg
20140c6340caSmrg    AC_CACHE_CHECK([whether a program can dlopen itself],
20150c6340caSmrg	  lt_cv_dlopen_self, [dnl
20160c6340caSmrg	  _LT_TRY_DLOPEN_SELF(
20170c6340caSmrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
20180c6340caSmrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
20190c6340caSmrg    ])
20200c6340caSmrg
20210c6340caSmrg    if test yes = "$lt_cv_dlopen_self"; then
20220c6340caSmrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
20230c6340caSmrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
20240c6340caSmrg	  lt_cv_dlopen_self_static, [dnl
20250c6340caSmrg	  _LT_TRY_DLOPEN_SELF(
20260c6340caSmrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
20270c6340caSmrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
20280c6340caSmrg      ])
20290c6340caSmrg    fi
20300c6340caSmrg
20310c6340caSmrg    CPPFLAGS=$save_CPPFLAGS
20320c6340caSmrg    LDFLAGS=$save_LDFLAGS
20330c6340caSmrg    LIBS=$save_LIBS
20340c6340caSmrg    ;;
20350c6340caSmrg  esac
20360c6340caSmrg
20370c6340caSmrg  case $lt_cv_dlopen_self in
20380c6340caSmrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
20390c6340caSmrg  *) enable_dlopen_self=unknown ;;
20400c6340caSmrg  esac
20410c6340caSmrg
20420c6340caSmrg  case $lt_cv_dlopen_self_static in
20430c6340caSmrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
20440c6340caSmrg  *) enable_dlopen_self_static=unknown ;;
20450c6340caSmrg  esac
20460c6340caSmrgfi
20470c6340caSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
20480c6340caSmrg	 [Whether dlopen is supported])
20490c6340caSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
20500c6340caSmrg	 [Whether dlopen of programs is supported])
20510c6340caSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
20520c6340caSmrg	 [Whether dlopen of statically linked programs is supported])
20530c6340caSmrg])# LT_SYS_DLOPEN_SELF
20540c6340caSmrg
20550c6340caSmrg# Old name:
20560c6340caSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
20570c6340caSmrgdnl aclocal-1.4 backwards compatibility:
20580c6340caSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
20590c6340caSmrg
20600c6340caSmrg
20610c6340caSmrg# _LT_COMPILER_C_O([TAGNAME])
20620c6340caSmrg# ---------------------------
20630c6340caSmrg# Check to see if options -c and -o are simultaneously supported by compiler.
20640c6340caSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
20650c6340caSmrgm4_defun([_LT_COMPILER_C_O],
20660c6340caSmrg[m4_require([_LT_DECL_SED])dnl
20670c6340caSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
20680c6340caSmrgm4_require([_LT_TAG_COMPILER])dnl
20690c6340caSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
20700c6340caSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
20710c6340caSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
20720c6340caSmrg   $RM -r conftest 2>/dev/null
20730c6340caSmrg   mkdir conftest
20740c6340caSmrg   cd conftest
20750c6340caSmrg   mkdir out
20760c6340caSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
20770c6340caSmrg
20780c6340caSmrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
20790c6340caSmrg   # Insert the option either (1) after the last *FLAGS variable, or
20800c6340caSmrg   # (2) before a word containing "conftest.", or (3) at the end.
20810c6340caSmrg   # Note that $ac_compile itself does not contain backslashes and begins
20820c6340caSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
20830c6340caSmrg   lt_compile=`echo "$ac_compile" | $SED \
20840c6340caSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
20850c6340caSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
20860c6340caSmrg   -e 's:$: $lt_compiler_flag:'`
20870c6340caSmrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
20880c6340caSmrg   (eval "$lt_compile" 2>out/conftest.err)
20890c6340caSmrg   ac_status=$?
20900c6340caSmrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
20910c6340caSmrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
20920c6340caSmrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
20930c6340caSmrg   then
20940c6340caSmrg     # The compiler can only warn and ignore the option if not recognized
20950c6340caSmrg     # So say no if there are warnings
20960c6340caSmrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
20970c6340caSmrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
20980c6340caSmrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
20990c6340caSmrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
21000c6340caSmrg     fi
21010c6340caSmrg   fi
21020c6340caSmrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
21030c6340caSmrg   $RM conftest*
21040c6340caSmrg   # SGI C++ compiler will create directory out/ii_files/ for
21050c6340caSmrg   # template instantiation
21060c6340caSmrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
21070c6340caSmrg   $RM out/* && rmdir out
21080c6340caSmrg   cd ..
21090c6340caSmrg   $RM -r conftest
21100c6340caSmrg   $RM conftest*
21110c6340caSmrg])
21120c6340caSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
21130c6340caSmrg	[Does compiler simultaneously support -c and -o options?])
21140c6340caSmrg])# _LT_COMPILER_C_O
21150c6340caSmrg
21160c6340caSmrg
21170c6340caSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
21180c6340caSmrg# ----------------------------------
21190c6340caSmrg# Check to see if we can do hard links to lock some files if needed
21200c6340caSmrgm4_defun([_LT_COMPILER_FILE_LOCKS],
21210c6340caSmrg[m4_require([_LT_ENABLE_LOCK])dnl
21220c6340caSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
21230c6340caSmrg_LT_COMPILER_C_O([$1])
21240c6340caSmrg
21250c6340caSmrghard_links=nottested
21260c6340caSmrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
21270c6340caSmrg  # do not overwrite the value of need_locks provided by the user
21280c6340caSmrg  AC_MSG_CHECKING([if we can lock with hard links])
21290c6340caSmrg  hard_links=yes
21300c6340caSmrg  $RM conftest*
21310c6340caSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
21320c6340caSmrg  touch conftest.a
21330c6340caSmrg  ln conftest.a conftest.b 2>&5 || hard_links=no
21340c6340caSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
21350c6340caSmrg  AC_MSG_RESULT([$hard_links])
21360c6340caSmrg  if test no = "$hard_links"; then
21370c6340caSmrg    AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
21380c6340caSmrg    need_locks=warn
21390c6340caSmrg  fi
21400c6340caSmrgelse
21410c6340caSmrg  need_locks=no
21420c6340caSmrgfi
21430c6340caSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
21440c6340caSmrg])# _LT_COMPILER_FILE_LOCKS
21450c6340caSmrg
21460c6340caSmrg
21470c6340caSmrg# _LT_CHECK_OBJDIR
21480c6340caSmrg# ----------------
21490c6340caSmrgm4_defun([_LT_CHECK_OBJDIR],
21500c6340caSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
21510c6340caSmrg[rm -f .libs 2>/dev/null
21520c6340caSmrgmkdir .libs 2>/dev/null
21530c6340caSmrgif test -d .libs; then
21540c6340caSmrg  lt_cv_objdir=.libs
21550c6340caSmrgelse
21560c6340caSmrg  # MS-DOS does not allow filenames that begin with a dot.
21570c6340caSmrg  lt_cv_objdir=_libs
21580c6340caSmrgfi
21590c6340caSmrgrmdir .libs 2>/dev/null])
21600c6340caSmrgobjdir=$lt_cv_objdir
21610c6340caSmrg_LT_DECL([], [objdir], [0],
21620c6340caSmrg         [The name of the directory that contains temporary libtool files])dnl
21630c6340caSmrgm4_pattern_allow([LT_OBJDIR])dnl
21640c6340caSmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
21650c6340caSmrg  [Define to the sub-directory where libtool stores uninstalled libraries.])
21660c6340caSmrg])# _LT_CHECK_OBJDIR
21670c6340caSmrg
21680c6340caSmrg
21690c6340caSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
21700c6340caSmrg# --------------------------------------
21710c6340caSmrg# Check hardcoding attributes.
21720c6340caSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
21730c6340caSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
21740c6340caSmrg_LT_TAGVAR(hardcode_action, $1)=
21750c6340caSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
21760c6340caSmrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
21770c6340caSmrg   test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
21780c6340caSmrg
21790c6340caSmrg  # We can hardcode non-existent directories.
21800c6340caSmrg  if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
21810c6340caSmrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
21820c6340caSmrg     # have to relink, otherwise we might link with an installed library
21830c6340caSmrg     # when we should be linking with a yet-to-be-installed one
21840c6340caSmrg     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
21850c6340caSmrg     test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
21860c6340caSmrg    # Linking always hardcodes the temporary library directory.
21870c6340caSmrg    _LT_TAGVAR(hardcode_action, $1)=relink
21880c6340caSmrg  else
21890c6340caSmrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
21900c6340caSmrg    _LT_TAGVAR(hardcode_action, $1)=immediate
21910c6340caSmrg  fi
21920c6340caSmrgelse
21930c6340caSmrg  # We cannot hardcode anything, or else we can only hardcode existing
21940c6340caSmrg  # directories.
21950c6340caSmrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
21960c6340caSmrgfi
21970c6340caSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
21980c6340caSmrg
21990c6340caSmrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
22000c6340caSmrg   test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
22010c6340caSmrg  # Fast installation is not supported
22020c6340caSmrg  enable_fast_install=no
22030c6340caSmrgelif test yes = "$shlibpath_overrides_runpath" ||
22040c6340caSmrg     test no = "$enable_shared"; then
22050c6340caSmrg  # Fast installation is not necessary
22060c6340caSmrg  enable_fast_install=needless
22070c6340caSmrgfi
22080c6340caSmrg_LT_TAGDECL([], [hardcode_action], [0],
22090c6340caSmrg    [How to hardcode a shared library path into an executable])
22100c6340caSmrg])# _LT_LINKER_HARDCODE_LIBPATH
22110c6340caSmrg
22120c6340caSmrg
22130c6340caSmrg# _LT_CMD_STRIPLIB
22140c6340caSmrg# ----------------
22150c6340caSmrgm4_defun([_LT_CMD_STRIPLIB],
22160c6340caSmrg[m4_require([_LT_DECL_EGREP])
22170c6340caSmrgstriplib=
22180c6340caSmrgold_striplib=
22190c6340caSmrgAC_MSG_CHECKING([whether stripping libraries is possible])
22200c6340caSmrgif test -z "$STRIP"; then
22210c6340caSmrg  AC_MSG_RESULT([no])
22220c6340caSmrgelse
22230c6340caSmrg  if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
22240c6340caSmrg    old_striplib="$STRIP --strip-debug"
22250c6340caSmrg    striplib="$STRIP --strip-unneeded"
22260c6340caSmrg    AC_MSG_RESULT([yes])
22270c6340caSmrg  else
22280c6340caSmrg    case $host_os in
22290c6340caSmrg    darwin*)
22300c6340caSmrg      # FIXME - insert some real tests, host_os isn't really good enough
22310c6340caSmrg      striplib="$STRIP -x"
22320c6340caSmrg      old_striplib="$STRIP -S"
22330c6340caSmrg      AC_MSG_RESULT([yes])
22340c6340caSmrg      ;;
22350c6340caSmrg    freebsd*)
22360c6340caSmrg      if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
22370c6340caSmrg        old_striplib="$STRIP --strip-debug"
22380c6340caSmrg        striplib="$STRIP --strip-unneeded"
22390c6340caSmrg        AC_MSG_RESULT([yes])
22400c6340caSmrg      else
22410c6340caSmrg        AC_MSG_RESULT([no])
22420c6340caSmrg      fi
22430c6340caSmrg      ;;
22440c6340caSmrg    *)
22450c6340caSmrg      AC_MSG_RESULT([no])
22460c6340caSmrg      ;;
22470c6340caSmrg    esac
22480c6340caSmrg  fi
22490c6340caSmrgfi
22500c6340caSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
22510c6340caSmrg_LT_DECL([], [striplib], [1])
22520c6340caSmrg])# _LT_CMD_STRIPLIB
22530c6340caSmrg
22540c6340caSmrg
22550c6340caSmrg# _LT_PREPARE_MUNGE_PATH_LIST
22560c6340caSmrg# ---------------------------
22570c6340caSmrg# Make sure func_munge_path_list() is defined correctly.
22580c6340caSmrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
22590c6340caSmrg[[# func_munge_path_list VARIABLE PATH
22600c6340caSmrg# -----------------------------------
22610c6340caSmrg# VARIABLE is name of variable containing _space_ separated list of
22620c6340caSmrg# directories to be munged by the contents of PATH, which is string
22630c6340caSmrg# having a format:
22640c6340caSmrg# "DIR[:DIR]:"
22650c6340caSmrg#       string "DIR[ DIR]" will be prepended to VARIABLE
22660c6340caSmrg# ":DIR[:DIR]"
22670c6340caSmrg#       string "DIR[ DIR]" will be appended to VARIABLE
22680c6340caSmrg# "DIRP[:DIRP]::[DIRA:]DIRA"
22690c6340caSmrg#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
22700c6340caSmrg#       "DIRA[ DIRA]" will be appended to VARIABLE
22710c6340caSmrg# "DIR[:DIR]"
22720c6340caSmrg#       VARIABLE will be replaced by "DIR[ DIR]"
22730c6340caSmrgfunc_munge_path_list ()
22740c6340caSmrg{
22750c6340caSmrg    case x@S|@2 in
22760c6340caSmrg    x)
22770c6340caSmrg        ;;
22780c6340caSmrg    *:)
22790c6340caSmrg        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
22800c6340caSmrg        ;;
22810c6340caSmrg    x:*)
22820c6340caSmrg        eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
22830c6340caSmrg        ;;
22840c6340caSmrg    *::*)
22850c6340caSmrg        eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
22860c6340caSmrg        eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
22870c6340caSmrg        ;;
22880c6340caSmrg    *)
22890c6340caSmrg        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
22900c6340caSmrg        ;;
22910c6340caSmrg    esac
22920c6340caSmrg}
22930c6340caSmrg]])# _LT_PREPARE_PATH_LIST
22940c6340caSmrg
22950c6340caSmrg
22960c6340caSmrg# _LT_SYS_DYNAMIC_LINKER([TAG])
22970c6340caSmrg# -----------------------------
22980c6340caSmrg# PORTME Fill in your ld.so characteristics
22990c6340caSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
23000c6340caSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
23010c6340caSmrgm4_require([_LT_DECL_EGREP])dnl
23020c6340caSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
23030c6340caSmrgm4_require([_LT_DECL_OBJDUMP])dnl
23040c6340caSmrgm4_require([_LT_DECL_SED])dnl
23050c6340caSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
23060c6340caSmrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
23070c6340caSmrgAC_MSG_CHECKING([dynamic linker characteristics])
23080c6340caSmrgm4_if([$1],
23090c6340caSmrg	[], [
23100c6340caSmrgif test yes = "$GCC"; then
23110c6340caSmrg  case $host_os in
23120c6340caSmrg    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
23130c6340caSmrg    *) lt_awk_arg='/^libraries:/' ;;
23140c6340caSmrg  esac
23150c6340caSmrg  case $host_os in
23160c6340caSmrg    mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
23170c6340caSmrg    *) lt_sed_strip_eq='s|=/|/|g' ;;
23180c6340caSmrg  esac
23190c6340caSmrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
23200c6340caSmrg  case $lt_search_path_spec in
23210c6340caSmrg  *\;*)
23220c6340caSmrg    # if the path contains ";" then we assume it to be the separator
23230c6340caSmrg    # otherwise default to the standard path separator (i.e. ":") - it is
23240c6340caSmrg    # assumed that no part of a normal pathname contains ";" but that should
23250c6340caSmrg    # okay in the real world where ";" in dirpaths is itself problematic.
23260c6340caSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
23270c6340caSmrg    ;;
23280c6340caSmrg  *)
23290c6340caSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
23300c6340caSmrg    ;;
23310c6340caSmrg  esac
23320c6340caSmrg  # Ok, now we have the path, separated by spaces, we can step through it
23330c6340caSmrg  # and add multilib dir if necessary...
23340c6340caSmrg  lt_tmp_lt_search_path_spec=
23350c6340caSmrg  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
23360c6340caSmrg  # ...but if some path component already ends with the multilib dir we assume
23370c6340caSmrg  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
23380c6340caSmrg  case "$lt_multi_os_dir; $lt_search_path_spec " in
23390c6340caSmrg  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
23400c6340caSmrg    lt_multi_os_dir=
23410c6340caSmrg    ;;
23420c6340caSmrg  esac
23430c6340caSmrg  for lt_sys_path in $lt_search_path_spec; do
23440c6340caSmrg    if test -d "$lt_sys_path$lt_multi_os_dir"; then
23450c6340caSmrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
23460c6340caSmrg    elif test -n "$lt_multi_os_dir"; then
23470c6340caSmrg      test -d "$lt_sys_path" && \
23480c6340caSmrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
23490c6340caSmrg    fi
23500c6340caSmrg  done
23510c6340caSmrg  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
23520c6340caSmrgBEGIN {RS = " "; FS = "/|\n";} {
23530c6340caSmrg  lt_foo = "";
23540c6340caSmrg  lt_count = 0;
23550c6340caSmrg  for (lt_i = NF; lt_i > 0; lt_i--) {
23560c6340caSmrg    if ($lt_i != "" && $lt_i != ".") {
23570c6340caSmrg      if ($lt_i == "..") {
23580c6340caSmrg        lt_count++;
23590c6340caSmrg      } else {
23600c6340caSmrg        if (lt_count == 0) {
23610c6340caSmrg          lt_foo = "/" $lt_i lt_foo;
23620c6340caSmrg        } else {
23630c6340caSmrg          lt_count--;
23640c6340caSmrg        }
23650c6340caSmrg      }
23660c6340caSmrg    }
23670c6340caSmrg  }
23680c6340caSmrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
23690c6340caSmrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
23700c6340caSmrg}'`
23710c6340caSmrg  # AWK program above erroneously prepends '/' to C:/dos/paths
23720c6340caSmrg  # for these hosts.
23730c6340caSmrg  case $host_os in
23740c6340caSmrg    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
23750c6340caSmrg      $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
23760c6340caSmrg  esac
23770c6340caSmrg  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
23780c6340caSmrgelse
23790c6340caSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
23800c6340caSmrgfi])
23810c6340caSmrglibrary_names_spec=
23820c6340caSmrglibname_spec='lib$name'
23830c6340caSmrgsoname_spec=
23840c6340caSmrgshrext_cmds=.so
23850c6340caSmrgpostinstall_cmds=
23860c6340caSmrgpostuninstall_cmds=
23870c6340caSmrgfinish_cmds=
23880c6340caSmrgfinish_eval=
23890c6340caSmrgshlibpath_var=
23900c6340caSmrgshlibpath_overrides_runpath=unknown
23910c6340caSmrgversion_type=none
23920c6340caSmrgdynamic_linker="$host_os ld.so"
23930c6340caSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
23940c6340caSmrgneed_lib_prefix=unknown
23950c6340caSmrghardcode_into_libs=no
23960c6340caSmrg
23970c6340caSmrg# when you set need_version to no, make sure it does not cause -set_version
23980c6340caSmrg# flags to be left without arguments
23990c6340caSmrgneed_version=unknown
24000c6340caSmrg
24010c6340caSmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH],
24020c6340caSmrg[User-defined run-time library search path.])
24030c6340caSmrg
24040c6340caSmrgcase $host_os in
24050c6340caSmrgaix3*)
24060c6340caSmrg  version_type=linux # correct to gnu/linux during the next big refactor
24070c6340caSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
24080c6340caSmrg  shlibpath_var=LIBPATH
24090c6340caSmrg
24100c6340caSmrg  # AIX 3 has no versioning support, so we append a major version to the name.
24110c6340caSmrg  soname_spec='$libname$release$shared_ext$major'
24120c6340caSmrg  ;;
24130c6340caSmrg
24140c6340caSmrgaix[[4-9]]*)
24150c6340caSmrg  version_type=linux # correct to gnu/linux during the next big refactor
24160c6340caSmrg  need_lib_prefix=no
24170c6340caSmrg  need_version=no
24180c6340caSmrg  hardcode_into_libs=yes
24190c6340caSmrg  if test ia64 = "$host_cpu"; then
24200c6340caSmrg    # AIX 5 supports IA64
24210c6340caSmrg    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
24220c6340caSmrg    shlibpath_var=LD_LIBRARY_PATH
24230c6340caSmrg  else
24240c6340caSmrg    # With GCC up to 2.95.x, collect2 would create an import file
24250c6340caSmrg    # for dependence libraries.  The import file would start with
24260c6340caSmrg    # the line '#! .'.  This would cause the generated library to
24270c6340caSmrg    # depend on '.', always an invalid library.  This was fixed in
24280c6340caSmrg    # development snapshots of GCC prior to 3.0.
24290c6340caSmrg    case $host_os in
24300c6340caSmrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
24310c6340caSmrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
24320c6340caSmrg	   echo ' yes '
24330c6340caSmrg	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
24340c6340caSmrg	:
24350c6340caSmrg      else
24360c6340caSmrg	can_build_shared=no
24370c6340caSmrg      fi
24380c6340caSmrg      ;;
24390c6340caSmrg    esac
24400c6340caSmrg    # Using Import Files as archive members, it is possible to support
24410c6340caSmrg    # filename-based versioning of shared library archives on AIX. While
24420c6340caSmrg    # this would work for both with and without runtime linking, it will
24430c6340caSmrg    # prevent static linking of such archives. So we do filename-based
24440c6340caSmrg    # shared library versioning with .so extension only, which is used
24450c6340caSmrg    # when both runtime linking and shared linking is enabled.
24460c6340caSmrg    # Unfortunately, runtime linking may impact performance, so we do
24470c6340caSmrg    # not want this to be the default eventually. Also, we use the
24480c6340caSmrg    # versioned .so libs for executables only if there is the -brtl
24490c6340caSmrg    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
24500c6340caSmrg    # To allow for filename-based versioning support, we need to create
24510c6340caSmrg    # libNAME.so.V as an archive file, containing:
24520c6340caSmrg    # *) an Import File, referring to the versioned filename of the
24530c6340caSmrg    #    archive as well as the shared archive member, telling the
24540c6340caSmrg    #    bitwidth (32 or 64) of that shared object, and providing the
24550c6340caSmrg    #    list of exported symbols of that shared object, eventually
24560c6340caSmrg    #    decorated with the 'weak' keyword
24570c6340caSmrg    # *) the shared object with the F_LOADONLY flag set, to really avoid
24580c6340caSmrg    #    it being seen by the linker.
24590c6340caSmrg    # At run time we better use the real file rather than another symlink,
24600c6340caSmrg    # but for link time we create the symlink libNAME.so -> libNAME.so.V
24610c6340caSmrg
24620c6340caSmrg    case $with_aix_soname,$aix_use_runtimelinking in
24630c6340caSmrg    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
24640c6340caSmrg    # soname into executable. Probably we can add versioning support to
24650c6340caSmrg    # collect2, so additional links can be useful in future.
24660c6340caSmrg    aix,yes) # traditional libtool
24670c6340caSmrg      dynamic_linker='AIX unversionable lib.so'
24680c6340caSmrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
24690c6340caSmrg      # instead of lib<name>.a to let people know that these are not
24700c6340caSmrg      # typical AIX shared libraries.
24710c6340caSmrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
24720c6340caSmrg      ;;
24730c6340caSmrg    aix,no) # traditional AIX only
24740c6340caSmrg      dynamic_linker='AIX lib.a[(]lib.so.V[)]'
24750c6340caSmrg      # We preserve .a as extension for shared libraries through AIX4.2
24760c6340caSmrg      # and later when we are not doing run time linking.
24770c6340caSmrg      library_names_spec='$libname$release.a $libname.a'
24780c6340caSmrg      soname_spec='$libname$release$shared_ext$major'
24790c6340caSmrg      ;;
24800c6340caSmrg    svr4,*) # full svr4 only
24810c6340caSmrg      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
24820c6340caSmrg      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
24830c6340caSmrg      # We do not specify a path in Import Files, so LIBPATH fires.
24840c6340caSmrg      shlibpath_overrides_runpath=yes
24850c6340caSmrg      ;;
24860c6340caSmrg    *,yes) # both, prefer svr4
24870c6340caSmrg      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
24880c6340caSmrg      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
24890c6340caSmrg      # unpreferred sharedlib libNAME.a needs extra handling
24900c6340caSmrg      postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
24910c6340caSmrg      postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
24920c6340caSmrg      # We do not specify a path in Import Files, so LIBPATH fires.
24930c6340caSmrg      shlibpath_overrides_runpath=yes
24940c6340caSmrg      ;;
24950c6340caSmrg    *,no) # both, prefer aix
24960c6340caSmrg      dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
24970c6340caSmrg      library_names_spec='$libname$release.a $libname.a'
24980c6340caSmrg      soname_spec='$libname$release$shared_ext$major'
24990c6340caSmrg      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
25000c6340caSmrg      postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
25010c6340caSmrg      postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
25020c6340caSmrg      ;;
25030c6340caSmrg    esac
25040c6340caSmrg    shlibpath_var=LIBPATH
25050c6340caSmrg  fi
25060c6340caSmrg  ;;
25070c6340caSmrg
25080c6340caSmrgamigaos*)
25090c6340caSmrg  case $host_cpu in
25100c6340caSmrg  powerpc)
25110c6340caSmrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
25120c6340caSmrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
25130c6340caSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
25140c6340caSmrg    ;;
25150c6340caSmrg  m68k)
25160c6340caSmrg    library_names_spec='$libname.ixlibrary $libname.a'
25170c6340caSmrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
25180c6340caSmrg    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
25190c6340caSmrg    ;;
25200c6340caSmrg  esac
25210c6340caSmrg  ;;
25220c6340caSmrg
25230c6340caSmrgbeos*)
25240c6340caSmrg  library_names_spec='$libname$shared_ext'
25250c6340caSmrg  dynamic_linker="$host_os ld.so"
25260c6340caSmrg  shlibpath_var=LIBRARY_PATH
25270c6340caSmrg  ;;
25280c6340caSmrg
25290c6340caSmrgbsdi[[45]]*)
25300c6340caSmrg  version_type=linux # correct to gnu/linux during the next big refactor
25310c6340caSmrg  need_version=no
25320c6340caSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
25330c6340caSmrg  soname_spec='$libname$release$shared_ext$major'
25340c6340caSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
25350c6340caSmrg  shlibpath_var=LD_LIBRARY_PATH
25360c6340caSmrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
25370c6340caSmrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
25380c6340caSmrg  # the default ld.so.conf also contains /usr/contrib/lib and
25390c6340caSmrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
25400c6340caSmrg  # libtool to hard-code these into programs
25410c6340caSmrg  ;;
25420c6340caSmrg
25430c6340caSmrgcygwin* | mingw* | pw32* | cegcc*)
25440c6340caSmrg  version_type=windows
25450c6340caSmrg  shrext_cmds=.dll
25460c6340caSmrg  need_version=no
25470c6340caSmrg  need_lib_prefix=no
25480c6340caSmrg
25490c6340caSmrg  case $GCC,$cc_basename in
25500c6340caSmrg  yes,*)
25510c6340caSmrg    # gcc
25520c6340caSmrg    library_names_spec='$libname.dll.a'
25530c6340caSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
25540c6340caSmrg    postinstall_cmds='base_file=`basename \$file`~
25550c6340caSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
25560c6340caSmrg      dldir=$destdir/`dirname \$dlpath`~
25570c6340caSmrg      test -d \$dldir || mkdir -p \$dldir~
25580c6340caSmrg      $install_prog $dir/$dlname \$dldir/$dlname~
25590c6340caSmrg      chmod a+x \$dldir/$dlname~
25600c6340caSmrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
25610c6340caSmrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
25620c6340caSmrg      fi'
25630c6340caSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
25640c6340caSmrg      dlpath=$dir/\$dldll~
25650c6340caSmrg       $RM \$dlpath'
25660c6340caSmrg    shlibpath_overrides_runpath=yes
25670c6340caSmrg
25680c6340caSmrg    case $host_os in
25690c6340caSmrg    cygwin*)
25700c6340caSmrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
25710c6340caSmrg      soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
25720c6340caSmrgm4_if([$1], [],[
25730c6340caSmrg      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
25740c6340caSmrg      ;;
25750c6340caSmrg    mingw* | cegcc*)
25760c6340caSmrg      # MinGW DLLs use traditional 'lib' prefix
25770c6340caSmrg      soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
25780c6340caSmrg      ;;
25790c6340caSmrg    pw32*)
25800c6340caSmrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
25810c6340caSmrg      library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
25820c6340caSmrg      ;;
25830c6340caSmrg    esac
25840c6340caSmrg    dynamic_linker='Win32 ld.exe'
25850c6340caSmrg    ;;
25860c6340caSmrg
25870c6340caSmrg  *,cl* | *,icl*)
25880c6340caSmrg    # Native MSVC or ICC
25890c6340caSmrg    libname_spec='$name'
25900c6340caSmrg    soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
25910c6340caSmrg    library_names_spec='$libname.dll.lib'
25920c6340caSmrg
25930c6340caSmrg    case $build_os in
25940c6340caSmrg    mingw*)
25950c6340caSmrg      sys_lib_search_path_spec=
25960c6340caSmrg      lt_save_ifs=$IFS
25970c6340caSmrg      IFS=';'
25980c6340caSmrg      for lt_path in $LIB
25990c6340caSmrg      do
26000c6340caSmrg        IFS=$lt_save_ifs
26010c6340caSmrg        # Let DOS variable expansion print the short 8.3 style file name.
26020c6340caSmrg        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
26030c6340caSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
26040c6340caSmrg      done
26050c6340caSmrg      IFS=$lt_save_ifs
26060c6340caSmrg      # Convert to MSYS style.
26070c6340caSmrg      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
26080c6340caSmrg      ;;
26090c6340caSmrg    cygwin*)
26100c6340caSmrg      # Convert to unix form, then to dos form, then back to unix form
26110c6340caSmrg      # but this time dos style (no spaces!) so that the unix form looks
26120c6340caSmrg      # like /cygdrive/c/PROGRA~1:/cygdr...
26130c6340caSmrg      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
26140c6340caSmrg      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
26150c6340caSmrg      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
26160c6340caSmrg      ;;
26170c6340caSmrg    *)
26180c6340caSmrg      sys_lib_search_path_spec=$LIB
26190c6340caSmrg      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
26200c6340caSmrg        # It is most probably a Windows format PATH.
26210c6340caSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
26220c6340caSmrg      else
26230c6340caSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
26240c6340caSmrg      fi
26250c6340caSmrg      # FIXME: find the short name or the path components, as spaces are
26260c6340caSmrg      # common. (e.g. "Program Files" -> "PROGRA~1")
26270c6340caSmrg      ;;
26280c6340caSmrg    esac
26290c6340caSmrg
26300c6340caSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
26310c6340caSmrg    postinstall_cmds='base_file=`basename \$file`~
26320c6340caSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
26330c6340caSmrg      dldir=$destdir/`dirname \$dlpath`~
26340c6340caSmrg      test -d \$dldir || mkdir -p \$dldir~
26350c6340caSmrg      $install_prog $dir/$dlname \$dldir/$dlname'
26360c6340caSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
26370c6340caSmrg      dlpath=$dir/\$dldll~
26380c6340caSmrg       $RM \$dlpath'
26390c6340caSmrg    shlibpath_overrides_runpath=yes
26400c6340caSmrg    dynamic_linker='Win32 link.exe'
26410c6340caSmrg    ;;
26420c6340caSmrg
26430c6340caSmrg  *)
26440c6340caSmrg    # Assume MSVC and ICC wrapper
26450c6340caSmrg    library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
26460c6340caSmrg    dynamic_linker='Win32 ld.exe'
26470c6340caSmrg    ;;
26480c6340caSmrg  esac
26490c6340caSmrg  # FIXME: first we should search . and the directory the executable is in
26500c6340caSmrg  shlibpath_var=PATH
26510c6340caSmrg  ;;
26520c6340caSmrg
26530c6340caSmrgdarwin* | rhapsody*)
26540c6340caSmrg  dynamic_linker="$host_os dyld"
26550c6340caSmrg  version_type=darwin
26560c6340caSmrg  need_lib_prefix=no
26570c6340caSmrg  need_version=no
2658de301c82Smrg  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
26590c6340caSmrg  soname_spec='$libname$release$major$shared_ext'
26600c6340caSmrg  shlibpath_overrides_runpath=yes
26610c6340caSmrg  shlibpath_var=DYLD_LIBRARY_PATH
2662de301c82Smrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
26630c6340caSmrgm4_if([$1], [],[
26640c6340caSmrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
26650c6340caSmrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
26660c6340caSmrg  ;;
26670c6340caSmrg
26680c6340caSmrgdgux*)
26690c6340caSmrg  version_type=linux # correct to gnu/linux during the next big refactor
26700c6340caSmrg  need_lib_prefix=no
26710c6340caSmrg  need_version=no
26720c6340caSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
26730c6340caSmrg  soname_spec='$libname$release$shared_ext$major'
26740c6340caSmrg  shlibpath_var=LD_LIBRARY_PATH
26750c6340caSmrg  ;;
26760c6340caSmrg
26770c6340caSmrgfreebsd* | dragonfly* | midnightbsd*)
26780c6340caSmrg  # DragonFly does not have aout.  When/if they implement a new
26790c6340caSmrg  # versioning mechanism, adjust this.
26800c6340caSmrg  if test -x /usr/bin/objformat; then
26810c6340caSmrg    objformat=`/usr/bin/objformat`
26820c6340caSmrg  else
26830c6340caSmrg    case $host_os in
26840c6340caSmrg    freebsd[[23]].*) objformat=aout ;;
26850c6340caSmrg    *) objformat=elf ;;
26860c6340caSmrg    esac
26870c6340caSmrg  fi
2688de301c82Smrg  version_type=freebsd-$objformat
26890c6340caSmrg  case $version_type in
26900c6340caSmrg    freebsd-elf*)
26910c6340caSmrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
26920c6340caSmrg      soname_spec='$libname$release$shared_ext$major'
26930c6340caSmrg      need_version=no
26940c6340caSmrg      need_lib_prefix=no
26950c6340caSmrg      ;;
26960c6340caSmrg    freebsd-*)
26970c6340caSmrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
26980c6340caSmrg      need_version=yes
26990c6340caSmrg      ;;
27000c6340caSmrg  esac
27010c6340caSmrg  shlibpath_var=LD_LIBRARY_PATH
27020c6340caSmrg  case $host_os in
27030c6340caSmrg  freebsd2.*)
27040c6340caSmrg    shlibpath_overrides_runpath=yes
27050c6340caSmrg    ;;
27060c6340caSmrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
27070c6340caSmrg    shlibpath_overrides_runpath=yes
27080c6340caSmrg    hardcode_into_libs=yes
27090c6340caSmrg    ;;
27100c6340caSmrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
27110c6340caSmrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
27120c6340caSmrg    shlibpath_overrides_runpath=no
27130c6340caSmrg    hardcode_into_libs=yes
27140c6340caSmrg    ;;
27150c6340caSmrg  *) # from 4.6 on, and DragonFly
27160c6340caSmrg    shlibpath_overrides_runpath=yes
27170c6340caSmrg    hardcode_into_libs=yes
27180c6340caSmrg    ;;
27190c6340caSmrg  esac
27200c6340caSmrg  ;;
27210c6340caSmrg
27220c6340caSmrghaiku*)
27230c6340caSmrg  version_type=linux # correct to gnu/linux during the next big refactor
27240c6340caSmrg  need_lib_prefix=no
27250c6340caSmrg  need_version=no
27260c6340caSmrg  dynamic_linker="$host_os runtime_loader"
27270c6340caSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
27280c6340caSmrg  soname_spec='$libname$release$shared_ext$major'
27290c6340caSmrg  shlibpath_var=LIBRARY_PATH
27300c6340caSmrg  shlibpath_overrides_runpath=no
27310c6340caSmrg  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
27320c6340caSmrg  hardcode_into_libs=yes
27330c6340caSmrg  ;;
27340c6340caSmrg
27350c6340caSmrghpux9* | hpux10* | hpux11*)
27360c6340caSmrg  # Give a soname corresponding to the major version so that dld.sl refuses to
27370c6340caSmrg  # link against other versions.
27380c6340caSmrg  version_type=sunos
27390c6340caSmrg  need_lib_prefix=no
27400c6340caSmrg  need_version=no
27410c6340caSmrg  case $host_cpu in
27420c6340caSmrg  ia64*)
27430c6340caSmrg    shrext_cmds='.so'
27440c6340caSmrg    hardcode_into_libs=yes
27450c6340caSmrg    dynamic_linker="$host_os dld.so"
27460c6340caSmrg    shlibpath_var=LD_LIBRARY_PATH
27470c6340caSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
27480c6340caSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
27490c6340caSmrg    soname_spec='$libname$release$shared_ext$major'
27500c6340caSmrg    if test 32 = "$HPUX_IA64_MODE"; then
27510c6340caSmrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
27520c6340caSmrg      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
27530c6340caSmrg    else
27540c6340caSmrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
27550c6340caSmrg      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
27560c6340caSmrg    fi
27570c6340caSmrg    ;;
27580c6340caSmrg  hppa*64*)
27590c6340caSmrg    shrext_cmds='.sl'
27600c6340caSmrg    hardcode_into_libs=yes
27610c6340caSmrg    dynamic_linker="$host_os dld.sl"
27620c6340caSmrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
27630c6340caSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
27640c6340caSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
27650c6340caSmrg    soname_spec='$libname$release$shared_ext$major'
27660c6340caSmrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
27670c6340caSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
27680c6340caSmrg    ;;
27690c6340caSmrg  *)
27700c6340caSmrg    shrext_cmds='.sl'
27710c6340caSmrg    dynamic_linker="$host_os dld.sl"
27720c6340caSmrg    shlibpath_var=SHLIB_PATH
27730c6340caSmrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
27740c6340caSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
27750c6340caSmrg    soname_spec='$libname$release$shared_ext$major'
27760c6340caSmrg    ;;
27770c6340caSmrg  esac
27780c6340caSmrg  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
27790c6340caSmrg  postinstall_cmds='chmod 555 $lib'
27800c6340caSmrg  # or fails outright, so override atomically:
27810c6340caSmrg  install_override_mode=555
27820c6340caSmrg  ;;
27830c6340caSmrg
27840c6340caSmrginterix[[3-9]]*)
27850c6340caSmrg  version_type=linux # correct to gnu/linux during the next big refactor
27860c6340caSmrg  need_lib_prefix=no
27870c6340caSmrg  need_version=no
27880c6340caSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
27890c6340caSmrg  soname_spec='$libname$release$shared_ext$major'
27900c6340caSmrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
27910c6340caSmrg  shlibpath_var=LD_LIBRARY_PATH
27920c6340caSmrg  shlibpath_overrides_runpath=no
27930c6340caSmrg  hardcode_into_libs=yes
27940c6340caSmrg  ;;
27950c6340caSmrg
27960c6340caSmrgirix5* | irix6* | nonstopux*)
27970c6340caSmrg  case $host_os in
27980c6340caSmrg    nonstopux*) version_type=nonstopux ;;
27990c6340caSmrg    *)
28000c6340caSmrg	if test yes = "$lt_cv_prog_gnu_ld"; then
28010c6340caSmrg		version_type=linux # correct to gnu/linux during the next big refactor
28020c6340caSmrg	else
28030c6340caSmrg		version_type=irix
28040c6340caSmrg	fi ;;
28050c6340caSmrg  esac
28060c6340caSmrg  need_lib_prefix=no
28070c6340caSmrg  need_version=no
28080c6340caSmrg  soname_spec='$libname$release$shared_ext$major'
28090c6340caSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
28100c6340caSmrg  case $host_os in
28110c6340caSmrg  irix5* | nonstopux*)
28120c6340caSmrg    libsuff= shlibsuff=
28130c6340caSmrg    ;;
28140c6340caSmrg  *)
28150c6340caSmrg    case $LD in # libtool.m4 will add one of these switches to LD
28160c6340caSmrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
28170c6340caSmrg      libsuff= shlibsuff= libmagic=32-bit;;
28180c6340caSmrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
28190c6340caSmrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
28200c6340caSmrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
28210c6340caSmrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
28220c6340caSmrg    *) libsuff= shlibsuff= libmagic=never-match;;
28230c6340caSmrg    esac
28240c6340caSmrg    ;;
28250c6340caSmrg  esac
28260c6340caSmrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
28270c6340caSmrg  shlibpath_overrides_runpath=no
28280c6340caSmrg  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
28290c6340caSmrg  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
28300c6340caSmrg  hardcode_into_libs=yes
28310c6340caSmrg  ;;
28320c6340caSmrg
28330c6340caSmrg# No shared lib support for Linux oldld, aout, or coff.
28340c6340caSmrglinux*oldld* | linux*aout* | linux*coff*)
28350c6340caSmrg  dynamic_linker=no
28360c6340caSmrg  ;;
28370c6340caSmrg
28380c6340caSmrglinux*android*)
28390c6340caSmrg  version_type=none # Android doesn't support versioned libraries.
28400c6340caSmrg  need_lib_prefix=no
28410c6340caSmrg  need_version=no
28420c6340caSmrg  library_names_spec='$libname$release$shared_ext'
28430c6340caSmrg  soname_spec='$libname$release$shared_ext'
28440c6340caSmrg  finish_cmds=
28450c6340caSmrg  shlibpath_var=LD_LIBRARY_PATH
28460c6340caSmrg  shlibpath_overrides_runpath=yes
28470c6340caSmrg
28480c6340caSmrg  # This implies no fast_install, which is unacceptable.
28490c6340caSmrg  # Some rework will be needed to allow for fast_install
28500c6340caSmrg  # before this can be enabled.
28510c6340caSmrg  hardcode_into_libs=yes
28520c6340caSmrg
28530c6340caSmrg  dynamic_linker='Android linker'
28540c6340caSmrg  # Don't embed -rpath directories since the linker doesn't support them.
28550c6340caSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
28560c6340caSmrg  ;;
28570c6340caSmrg
28580c6340caSmrg# This must be glibc/ELF.
28590c6340caSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
28600c6340caSmrg  version_type=linux # correct to gnu/linux during the next big refactor
28610c6340caSmrg  need_lib_prefix=no
28620c6340caSmrg  need_version=no
28630c6340caSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
28640c6340caSmrg  soname_spec='$libname$release$shared_ext$major'
28650c6340caSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
28660c6340caSmrg  shlibpath_var=LD_LIBRARY_PATH
28670c6340caSmrg  shlibpath_overrides_runpath=no
28680c6340caSmrg
28690c6340caSmrg  # Some binutils ld are patched to set DT_RUNPATH
28700c6340caSmrg  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
28710c6340caSmrg    [lt_cv_shlibpath_overrides_runpath=no
28720c6340caSmrg    save_LDFLAGS=$LDFLAGS
28730c6340caSmrg    save_libdir=$libdir
28740c6340caSmrg    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
28750c6340caSmrg	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
28760c6340caSmrg    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
28770c6340caSmrg      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
28780c6340caSmrg	 [lt_cv_shlibpath_overrides_runpath=yes])])
28790c6340caSmrg    LDFLAGS=$save_LDFLAGS
28800c6340caSmrg    libdir=$save_libdir
28810c6340caSmrg    ])
28820c6340caSmrg  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
28830c6340caSmrg
28840c6340caSmrg  # This implies no fast_install, which is unacceptable.
28850c6340caSmrg  # Some rework will be needed to allow for fast_install
28860c6340caSmrg  # before this can be enabled.
28870c6340caSmrg  hardcode_into_libs=yes
28880c6340caSmrg
28890c6340caSmrg  # Ideally, we could use ldconfig to report *all* directores which are
28900c6340caSmrg  # searched for libraries, however this is still not possible.  Aside from not
28910c6340caSmrg  # being certain /sbin/ldconfig is available, command
28920c6340caSmrg  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
28930c6340caSmrg  # even though it is searched at run-time.  Try to do the best guess by
28940c6340caSmrg  # appending ld.so.conf contents (and includes) to the search path.
28950c6340caSmrg  if test -f /etc/ld.so.conf; then
28960c6340caSmrg    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
28970c6340caSmrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
28980c6340caSmrg  fi
28990c6340caSmrg
29000c6340caSmrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
29010c6340caSmrg  # powerpc, because MkLinux only supported shared libraries with the
29020c6340caSmrg  # GNU dynamic linker.  Since this was broken with cross compilers,
29030c6340caSmrg  # most powerpc-linux boxes support dynamic linking these days and
29040c6340caSmrg  # people can always --disable-shared, the test was removed, and we
29050c6340caSmrg  # assume the GNU/Linux dynamic linker is in use.
29060c6340caSmrg  dynamic_linker='GNU/Linux ld.so'
29070c6340caSmrg  ;;
29080c6340caSmrg
2909de301c82Smrgnetbsdelf*-gnu)
2910de301c82Smrg  version_type=linux
2911de301c82Smrg  need_lib_prefix=no
2912de301c82Smrg  need_version=no
2913de301c82Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2914de301c82Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2915de301c82Smrg  shlibpath_var=LD_LIBRARY_PATH
2916de301c82Smrg  shlibpath_overrides_runpath=no
2917de301c82Smrg  hardcode_into_libs=yes
2918de301c82Smrg  dynamic_linker='NetBSD ld.elf_so'
2919de301c82Smrg  ;;
2920de301c82Smrg
29210c6340caSmrgnetbsd*)
29220c6340caSmrg  version_type=sunos
29230c6340caSmrg  need_lib_prefix=no
29240c6340caSmrg  need_version=no
29250c6340caSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
29260c6340caSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
29270c6340caSmrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
29280c6340caSmrg    dynamic_linker='NetBSD (a.out) ld.so'
29290c6340caSmrg  else
29300c6340caSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
29310c6340caSmrg    soname_spec='$libname$release$shared_ext$major'
29320c6340caSmrg    dynamic_linker='NetBSD ld.elf_so'
29330c6340caSmrg  fi
29340c6340caSmrg  shlibpath_var=LD_LIBRARY_PATH
29350c6340caSmrg  shlibpath_overrides_runpath=yes
29360c6340caSmrg  hardcode_into_libs=yes
29370c6340caSmrg  ;;
29380c6340caSmrg
29390c6340caSmrgnewsos6)
29400c6340caSmrg  version_type=linux # correct to gnu/linux during the next big refactor
29410c6340caSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
29420c6340caSmrg  shlibpath_var=LD_LIBRARY_PATH
29430c6340caSmrg  shlibpath_overrides_runpath=yes
29440c6340caSmrg  ;;
29450c6340caSmrg
29460c6340caSmrg*nto* | *qnx*)
29470c6340caSmrg  version_type=qnx
29480c6340caSmrg  need_lib_prefix=no
29490c6340caSmrg  need_version=no
29500c6340caSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
29510c6340caSmrg  soname_spec='$libname$release$shared_ext$major'
29520c6340caSmrg  shlibpath_var=LD_LIBRARY_PATH
29530c6340caSmrg  shlibpath_overrides_runpath=no
29540c6340caSmrg  hardcode_into_libs=yes
29550c6340caSmrg  dynamic_linker='ldqnx.so'
29560c6340caSmrg  ;;
29570c6340caSmrg
29580c6340caSmrgopenbsd* | bitrig*)
29590c6340caSmrg  version_type=sunos
29600c6340caSmrg  sys_lib_dlsearch_path_spec=/usr/lib
29610c6340caSmrg  need_lib_prefix=no
29620c6340caSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
29630c6340caSmrg    need_version=no
29640c6340caSmrg  else
29650c6340caSmrg    need_version=yes
29660c6340caSmrg  fi
29670c6340caSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
29680c6340caSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
29690c6340caSmrg  shlibpath_var=LD_LIBRARY_PATH
29700c6340caSmrg  shlibpath_overrides_runpath=yes
29710c6340caSmrg  ;;
29720c6340caSmrg
29730c6340caSmrgos2*)
29740c6340caSmrg  libname_spec='$name'
29750c6340caSmrg  version_type=windows
29760c6340caSmrg  shrext_cmds=.dll
29770c6340caSmrg  need_version=no
29780c6340caSmrg  need_lib_prefix=no
29790c6340caSmrg  # OS/2 can only load a DLL with a base name of 8 characters or less.
29800c6340caSmrg  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
29810c6340caSmrg    v=$($ECHO $release$versuffix | tr -d .-);
29820c6340caSmrg    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
29830c6340caSmrg    $ECHO $n$v`$shared_ext'
29840c6340caSmrg  library_names_spec='${libname}_dll.$libext'
29850c6340caSmrg  dynamic_linker='OS/2 ld.exe'
29860c6340caSmrg  shlibpath_var=BEGINLIBPATH
29870c6340caSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
29880c6340caSmrg  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
29890c6340caSmrg  postinstall_cmds='base_file=`basename \$file`~
29900c6340caSmrg    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
29910c6340caSmrg    dldir=$destdir/`dirname \$dlpath`~
29920c6340caSmrg    test -d \$dldir || mkdir -p \$dldir~
29930c6340caSmrg    $install_prog $dir/$dlname \$dldir/$dlname~
29940c6340caSmrg    chmod a+x \$dldir/$dlname~
29950c6340caSmrg    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
29960c6340caSmrg      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
29970c6340caSmrg    fi'
29980c6340caSmrg  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
29990c6340caSmrg    dlpath=$dir/\$dldll~
30000c6340caSmrg    $RM \$dlpath'
30010c6340caSmrg  ;;
30020c6340caSmrg
30030c6340caSmrgosf3* | osf4* | osf5*)
30040c6340caSmrg  version_type=osf
30050c6340caSmrg  need_lib_prefix=no
30060c6340caSmrg  need_version=no
30070c6340caSmrg  soname_spec='$libname$release$shared_ext$major'
30080c6340caSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
30090c6340caSmrg  shlibpath_var=LD_LIBRARY_PATH
30100c6340caSmrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
30110c6340caSmrg  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
30120c6340caSmrg  ;;
30130c6340caSmrg
30140c6340caSmrgrdos*)
30150c6340caSmrg  dynamic_linker=no
30160c6340caSmrg  ;;
30170c6340caSmrg
30180c6340caSmrgsolaris*)
30190c6340caSmrg  version_type=linux # correct to gnu/linux during the next big refactor
30200c6340caSmrg  need_lib_prefix=no
30210c6340caSmrg  need_version=no
30220c6340caSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
30230c6340caSmrg  soname_spec='$libname$release$shared_ext$major'
30240c6340caSmrg  shlibpath_var=LD_LIBRARY_PATH
30250c6340caSmrg  shlibpath_overrides_runpath=yes
30260c6340caSmrg  hardcode_into_libs=yes
30270c6340caSmrg  # ldd complains unless libraries are executable
30280c6340caSmrg  postinstall_cmds='chmod +x $lib'
30290c6340caSmrg  ;;
30300c6340caSmrg
30310c6340caSmrgsunos4*)
30320c6340caSmrg  version_type=sunos
30330c6340caSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
30340c6340caSmrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
30350c6340caSmrg  shlibpath_var=LD_LIBRARY_PATH
30360c6340caSmrg  shlibpath_overrides_runpath=yes
30370c6340caSmrg  if test yes = "$with_gnu_ld"; then
30380c6340caSmrg    need_lib_prefix=no
30390c6340caSmrg  fi
30400c6340caSmrg  need_version=yes
30410c6340caSmrg  ;;
30420c6340caSmrg
30430c6340caSmrgsysv4 | sysv4.3*)
30440c6340caSmrg  version_type=linux # correct to gnu/linux during the next big refactor
30450c6340caSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
30460c6340caSmrg  soname_spec='$libname$release$shared_ext$major'
30470c6340caSmrg  shlibpath_var=LD_LIBRARY_PATH
30480c6340caSmrg  case $host_vendor in
30490c6340caSmrg    sni)
30500c6340caSmrg      shlibpath_overrides_runpath=no
30510c6340caSmrg      need_lib_prefix=no
30520c6340caSmrg      runpath_var=LD_RUN_PATH
30530c6340caSmrg      ;;
30540c6340caSmrg    siemens)
30550c6340caSmrg      need_lib_prefix=no
30560c6340caSmrg      ;;
30570c6340caSmrg    motorola)
30580c6340caSmrg      need_lib_prefix=no
30590c6340caSmrg      need_version=no
30600c6340caSmrg      shlibpath_overrides_runpath=no
30610c6340caSmrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
30620c6340caSmrg      ;;
30630c6340caSmrg  esac
30640c6340caSmrg  ;;
30650c6340caSmrg
30660c6340caSmrgsysv4*MP*)
30670c6340caSmrg  if test -d /usr/nec; then
30680c6340caSmrg    version_type=linux # correct to gnu/linux during the next big refactor
30690c6340caSmrg    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
30700c6340caSmrg    soname_spec='$libname$shared_ext.$major'
30710c6340caSmrg    shlibpath_var=LD_LIBRARY_PATH
30720c6340caSmrg  fi
30730c6340caSmrg  ;;
30740c6340caSmrg
30750c6340caSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
30760c6340caSmrg  version_type=sco
30770c6340caSmrg  need_lib_prefix=no
30780c6340caSmrg  need_version=no
30790c6340caSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
30800c6340caSmrg  soname_spec='$libname$release$shared_ext$major'
30810c6340caSmrg  shlibpath_var=LD_LIBRARY_PATH
30820c6340caSmrg  shlibpath_overrides_runpath=yes
30830c6340caSmrg  hardcode_into_libs=yes
30840c6340caSmrg  if test yes = "$with_gnu_ld"; then
30850c6340caSmrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
30860c6340caSmrg  else
30870c6340caSmrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
30880c6340caSmrg    case $host_os in
30890c6340caSmrg      sco3.2v5*)
30900c6340caSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
30910c6340caSmrg	;;
30920c6340caSmrg    esac
30930c6340caSmrg  fi
30940c6340caSmrg  sys_lib_dlsearch_path_spec='/usr/lib'
30950c6340caSmrg  ;;
30960c6340caSmrg
30970c6340caSmrgtpf*)
30980c6340caSmrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
30990c6340caSmrg  version_type=linux # correct to gnu/linux during the next big refactor
31000c6340caSmrg  need_lib_prefix=no
31010c6340caSmrg  need_version=no
31020c6340caSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
31030c6340caSmrg  shlibpath_var=LD_LIBRARY_PATH
31040c6340caSmrg  shlibpath_overrides_runpath=no
31050c6340caSmrg  hardcode_into_libs=yes
31060c6340caSmrg  ;;
31070c6340caSmrg
31080c6340caSmrguts4*)
31090c6340caSmrg  version_type=linux # correct to gnu/linux during the next big refactor
31100c6340caSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
31110c6340caSmrg  soname_spec='$libname$release$shared_ext$major'
31120c6340caSmrg  shlibpath_var=LD_LIBRARY_PATH
31130c6340caSmrg  ;;
31140c6340caSmrg
31150c6340caSmrg*)
31160c6340caSmrg  dynamic_linker=no
31170c6340caSmrg  ;;
31180c6340caSmrgesac
31190c6340caSmrgAC_MSG_RESULT([$dynamic_linker])
31200c6340caSmrgtest no = "$dynamic_linker" && can_build_shared=no
31210c6340caSmrg
31220c6340caSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
31230c6340caSmrgif test yes = "$GCC"; then
31240c6340caSmrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
31250c6340caSmrgfi
31260c6340caSmrg
31270c6340caSmrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
31280c6340caSmrg  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
31290c6340caSmrgfi
31300c6340caSmrg
31310c6340caSmrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
31320c6340caSmrg  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
31330c6340caSmrgfi
31340c6340caSmrg
31350c6340caSmrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
31360c6340caSmrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
31370c6340caSmrg
31380c6340caSmrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
31390c6340caSmrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
31400c6340caSmrg
31410c6340caSmrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
31420c6340caSmrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
31430c6340caSmrg
31440c6340caSmrg_LT_DECL([], [variables_saved_for_relink], [1],
31450c6340caSmrg    [Variables whose values should be saved in libtool wrapper scripts and
31460c6340caSmrg    restored at link time])
31470c6340caSmrg_LT_DECL([], [need_lib_prefix], [0],
31480c6340caSmrg    [Do we need the "lib" prefix for modules?])
31490c6340caSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
31500c6340caSmrg_LT_DECL([], [version_type], [0], [Library versioning type])
31510c6340caSmrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
31520c6340caSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
31530c6340caSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
31540c6340caSmrg    [Is shlibpath searched before the hard-coded library search path?])
31550c6340caSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
31560c6340caSmrg_LT_DECL([], [library_names_spec], [1],
31570c6340caSmrg    [[List of archive names.  First name is the real one, the rest are links.
31580c6340caSmrg    The last name is the one that the linker finds with -lNAME]])
31590c6340caSmrg_LT_DECL([], [soname_spec], [1],
31600c6340caSmrg    [[The coded name of the library, if different from the real name]])
31610c6340caSmrg_LT_DECL([], [install_override_mode], [1],
31620c6340caSmrg    [Permission mode override for installation of shared libraries])
31630c6340caSmrg_LT_DECL([], [postinstall_cmds], [2],
31640c6340caSmrg    [Command to use after installation of a shared archive])
31650c6340caSmrg_LT_DECL([], [postuninstall_cmds], [2],
31660c6340caSmrg    [Command to use after uninstallation of a shared archive])
31670c6340caSmrg_LT_DECL([], [finish_cmds], [2],
31680c6340caSmrg    [Commands used to finish a libtool library installation in a directory])
31690c6340caSmrg_LT_DECL([], [finish_eval], [1],
31700c6340caSmrg    [[As "finish_cmds", except a single script fragment to be evaled but
31710c6340caSmrg    not shown]])
31720c6340caSmrg_LT_DECL([], [hardcode_into_libs], [0],
31730c6340caSmrg    [Whether we should hardcode library paths into libraries])
31740c6340caSmrg_LT_DECL([], [sys_lib_search_path_spec], [2],
31750c6340caSmrg    [Compile-time system search path for libraries])
31760c6340caSmrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
31770c6340caSmrg    [Detected run-time system search path for libraries])
31780c6340caSmrg_LT_DECL([], [configure_time_lt_sys_library_path], [2],
31790c6340caSmrg    [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
31800c6340caSmrg])# _LT_SYS_DYNAMIC_LINKER
31810c6340caSmrg
31820c6340caSmrg
31830c6340caSmrg# _LT_PATH_TOOL_PREFIX(TOOL)
31840c6340caSmrg# --------------------------
31850c6340caSmrg# find a file program that can recognize shared library
31860c6340caSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
31870c6340caSmrg[m4_require([_LT_DECL_EGREP])dnl
31880c6340caSmrgAC_MSG_CHECKING([for $1])
31890c6340caSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
31900c6340caSmrg[case $MAGIC_CMD in
31910c6340caSmrg[[\\/*] |  ?:[\\/]*])
31920c6340caSmrg  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
31930c6340caSmrg  ;;
31940c6340caSmrg*)
31950c6340caSmrg  lt_save_MAGIC_CMD=$MAGIC_CMD
31960c6340caSmrg  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
31970c6340caSmrgdnl $ac_dummy forces splitting on constant user-supplied paths.
31980c6340caSmrgdnl POSIX.2 word splitting is done only on the output of word expansions,
31990c6340caSmrgdnl not every word.  This closes a longstanding sh security hole.
32000c6340caSmrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
32010c6340caSmrg  for ac_dir in $ac_dummy; do
32020c6340caSmrg    IFS=$lt_save_ifs
32030c6340caSmrg    test -z "$ac_dir" && ac_dir=.
32040c6340caSmrg    if test -f "$ac_dir/$1"; then
32050c6340caSmrg      lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
32060c6340caSmrg      if test -n "$file_magic_test_file"; then
32070c6340caSmrg	case $deplibs_check_method in
32080c6340caSmrg	"file_magic "*)
32090c6340caSmrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
32100c6340caSmrg	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
32110c6340caSmrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
32120c6340caSmrg	    $EGREP "$file_magic_regex" > /dev/null; then
32130c6340caSmrg	    :
32140c6340caSmrg	  else
32150c6340caSmrg	    cat <<_LT_EOF 1>&2
32160c6340caSmrg
32170c6340caSmrg*** Warning: the command libtool uses to detect shared libraries,
32180c6340caSmrg*** $file_magic_cmd, produces output that libtool cannot recognize.
32190c6340caSmrg*** The result is that libtool may fail to recognize shared libraries
32200c6340caSmrg*** as such.  This will affect the creation of libtool libraries that
32210c6340caSmrg*** depend on shared libraries, but programs linked with such libtool
32220c6340caSmrg*** libraries will work regardless of this problem.  Nevertheless, you
32230c6340caSmrg*** may want to report the problem to your system manager and/or to
32240c6340caSmrg*** bug-libtool@gnu.org
32250c6340caSmrg
32260c6340caSmrg_LT_EOF
32270c6340caSmrg	  fi ;;
32280c6340caSmrg	esac
32290c6340caSmrg      fi
32300c6340caSmrg      break
32310c6340caSmrg    fi
32320c6340caSmrg  done
32330c6340caSmrg  IFS=$lt_save_ifs
32340c6340caSmrg  MAGIC_CMD=$lt_save_MAGIC_CMD
32350c6340caSmrg  ;;
32360c6340caSmrgesac])
32370c6340caSmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD
32380c6340caSmrgif test -n "$MAGIC_CMD"; then
32390c6340caSmrg  AC_MSG_RESULT($MAGIC_CMD)
32400c6340caSmrgelse
32410c6340caSmrg  AC_MSG_RESULT(no)
32420c6340caSmrgfi
32430c6340caSmrg_LT_DECL([], [MAGIC_CMD], [0],
32440c6340caSmrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
32450c6340caSmrg])# _LT_PATH_TOOL_PREFIX
32460c6340caSmrg
32470c6340caSmrg# Old name:
32480c6340caSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
32490c6340caSmrgdnl aclocal-1.4 backwards compatibility:
32500c6340caSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
32510c6340caSmrg
32520c6340caSmrg
32530c6340caSmrg# _LT_PATH_MAGIC
32540c6340caSmrg# --------------
32550c6340caSmrg# find a file program that can recognize a shared library
32560c6340caSmrgm4_defun([_LT_PATH_MAGIC],
32570c6340caSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
32580c6340caSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then
32590c6340caSmrg  if test -n "$ac_tool_prefix"; then
32600c6340caSmrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
32610c6340caSmrg  else
32620c6340caSmrg    MAGIC_CMD=:
32630c6340caSmrg  fi
32640c6340caSmrgfi
32650c6340caSmrg])# _LT_PATH_MAGIC
32660c6340caSmrg
32670c6340caSmrg
32680c6340caSmrg# LT_PATH_LD
32690c6340caSmrg# ----------
32700c6340caSmrg# find the pathname to the GNU or non-GNU linker
32710c6340caSmrgAC_DEFUN([LT_PATH_LD],
32720c6340caSmrg[AC_REQUIRE([AC_PROG_CC])dnl
32730c6340caSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
32740c6340caSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
32750c6340caSmrgm4_require([_LT_DECL_SED])dnl
32760c6340caSmrgm4_require([_LT_DECL_EGREP])dnl
32770c6340caSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl
32780c6340caSmrg
32790c6340caSmrgAC_ARG_WITH([gnu-ld],
32800c6340caSmrg    [AS_HELP_STRING([--with-gnu-ld],
32810c6340caSmrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
32820c6340caSmrg    [test no = "$withval" || with_gnu_ld=yes],
32830c6340caSmrg    [with_gnu_ld=no])dnl
32840c6340caSmrg
32850c6340caSmrgac_prog=ld
32860c6340caSmrgif test yes = "$GCC"; then
32870c6340caSmrg  # Check if gcc -print-prog-name=ld gives a path.
32880c6340caSmrg  AC_MSG_CHECKING([for ld used by $CC])
32890c6340caSmrg  case $host in
32900c6340caSmrg  *-*-mingw*)
32910c6340caSmrg    # gcc leaves a trailing carriage return, which upsets mingw
32920c6340caSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
32930c6340caSmrg  *)
32940c6340caSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
32950c6340caSmrg  esac
32960c6340caSmrg  case $ac_prog in
32970c6340caSmrg    # Accept absolute paths.
32980c6340caSmrg    [[\\/]]* | ?:[[\\/]]*)
32990c6340caSmrg      re_direlt='/[[^/]][[^/]]*/\.\./'
33000c6340caSmrg      # Canonicalize the pathname of ld
33010c6340caSmrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
33020c6340caSmrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
33030c6340caSmrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
33040c6340caSmrg      done
33050c6340caSmrg      test -z "$LD" && LD=$ac_prog
33060c6340caSmrg      ;;
33070c6340caSmrg  "")
33080c6340caSmrg    # If it fails, then pretend we aren't using GCC.
33090c6340caSmrg    ac_prog=ld
33100c6340caSmrg    ;;
33110c6340caSmrg  *)
33120c6340caSmrg    # If it is relative, then search for the first ld in PATH.
33130c6340caSmrg    with_gnu_ld=unknown
33140c6340caSmrg    ;;
33150c6340caSmrg  esac
33160c6340caSmrgelif test yes = "$with_gnu_ld"; then
33170c6340caSmrg  AC_MSG_CHECKING([for GNU ld])
33180c6340caSmrgelse
33190c6340caSmrg  AC_MSG_CHECKING([for non-GNU ld])
33200c6340caSmrgfi
33210c6340caSmrgAC_CACHE_VAL(lt_cv_path_LD,
33220c6340caSmrg[if test -z "$LD"; then
33230c6340caSmrg  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
33240c6340caSmrg  for ac_dir in $PATH; do
33250c6340caSmrg    IFS=$lt_save_ifs
33260c6340caSmrg    test -z "$ac_dir" && ac_dir=.
33270c6340caSmrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
33280c6340caSmrg      lt_cv_path_LD=$ac_dir/$ac_prog
33290c6340caSmrg      # Check to see if the program is GNU ld.  I'd rather use --version,
33300c6340caSmrg      # but apparently some variants of GNU ld only accept -v.
33310c6340caSmrg      # Break only if it was the GNU/non-GNU ld that we prefer.
33320c6340caSmrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
33330c6340caSmrg      *GNU* | *'with BFD'*)
33340c6340caSmrg	test no != "$with_gnu_ld" && break
33350c6340caSmrg	;;
33360c6340caSmrg      *)
33370c6340caSmrg	test yes != "$with_gnu_ld" && break
33380c6340caSmrg	;;
33390c6340caSmrg      esac
33400c6340caSmrg    fi
33410c6340caSmrg  done
33420c6340caSmrg  IFS=$lt_save_ifs
33430c6340caSmrgelse
33440c6340caSmrg  lt_cv_path_LD=$LD # Let the user override the test with a path.
33450c6340caSmrgfi])
33460c6340caSmrgLD=$lt_cv_path_LD
33470c6340caSmrgif test -n "$LD"; then
33480c6340caSmrg  AC_MSG_RESULT($LD)
33490c6340caSmrgelse
33500c6340caSmrg  AC_MSG_RESULT(no)
33510c6340caSmrgfi
33520c6340caSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
33530c6340caSmrg_LT_PATH_LD_GNU
33540c6340caSmrgAC_SUBST([LD])
33550c6340caSmrg
33560c6340caSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
33570c6340caSmrg])# LT_PATH_LD
33580c6340caSmrg
33590c6340caSmrg# Old names:
33600c6340caSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
33610c6340caSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
33620c6340caSmrgdnl aclocal-1.4 backwards compatibility:
33630c6340caSmrgdnl AC_DEFUN([AM_PROG_LD], [])
33640c6340caSmrgdnl AC_DEFUN([AC_PROG_LD], [])
33650c6340caSmrg
33660c6340caSmrg
33670c6340caSmrg# _LT_PATH_LD_GNU
33680c6340caSmrg#- --------------
33690c6340caSmrgm4_defun([_LT_PATH_LD_GNU],
33700c6340caSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
33710c6340caSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
33720c6340caSmrgcase `$LD -v 2>&1 </dev/null` in
33730c6340caSmrg*GNU* | *'with BFD'*)
33740c6340caSmrg  lt_cv_prog_gnu_ld=yes
33750c6340caSmrg  ;;
33760c6340caSmrg*)
33770c6340caSmrg  lt_cv_prog_gnu_ld=no
33780c6340caSmrg  ;;
33790c6340caSmrgesac])
33800c6340caSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
33810c6340caSmrg])# _LT_PATH_LD_GNU
33820c6340caSmrg
33830c6340caSmrg
33840c6340caSmrg# _LT_CMD_RELOAD
33850c6340caSmrg# --------------
33860c6340caSmrg# find reload flag for linker
33870c6340caSmrg#   -- PORTME Some linkers may need a different reload flag.
33880c6340caSmrgm4_defun([_LT_CMD_RELOAD],
33890c6340caSmrg[AC_CACHE_CHECK([for $LD option to reload object files],
33900c6340caSmrg  lt_cv_ld_reload_flag,
33910c6340caSmrg  [lt_cv_ld_reload_flag='-r'])
33920c6340caSmrgreload_flag=$lt_cv_ld_reload_flag
33930c6340caSmrgcase $reload_flag in
33940c6340caSmrg"" | " "*) ;;
33950c6340caSmrg*) reload_flag=" $reload_flag" ;;
33960c6340caSmrgesac
33970c6340caSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
33980c6340caSmrgcase $host_os in
33990c6340caSmrg  cygwin* | mingw* | pw32* | cegcc*)
34000c6340caSmrg    if test yes != "$GCC"; then
34010c6340caSmrg      reload_cmds=false
34020c6340caSmrg    fi
34030c6340caSmrg    ;;
34040c6340caSmrg  darwin*)
34050c6340caSmrg    if test yes = "$GCC"; then
34060c6340caSmrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
34070c6340caSmrg    else
34080c6340caSmrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
34090c6340caSmrg    fi
34100c6340caSmrg    ;;
34110c6340caSmrgesac
34120c6340caSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
34130c6340caSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl
34140c6340caSmrg])# _LT_CMD_RELOAD
34150c6340caSmrg
34160c6340caSmrg
34170c6340caSmrg# _LT_PATH_DD
34180c6340caSmrg# -----------
34190c6340caSmrg# find a working dd
34200c6340caSmrgm4_defun([_LT_PATH_DD],
34210c6340caSmrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
34220c6340caSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i
34230c6340caSmrgcat conftest.i conftest.i >conftest2.i
34240c6340caSmrg: ${lt_DD:=$DD}
34250c6340caSmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
34260c6340caSmrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
34270c6340caSmrg  cmp -s conftest.i conftest.out \
34280c6340caSmrg  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
34290c6340caSmrgfi])
34300c6340caSmrgrm -f conftest.i conftest2.i conftest.out])
34310c6340caSmrg])# _LT_PATH_DD
34320c6340caSmrg
34330c6340caSmrg
34340c6340caSmrg# _LT_CMD_TRUNCATE
34350c6340caSmrg# ----------------
34360c6340caSmrg# find command to truncate a binary pipe
34370c6340caSmrgm4_defun([_LT_CMD_TRUNCATE],
34380c6340caSmrg[m4_require([_LT_PATH_DD])
34390c6340caSmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
34400c6340caSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i
34410c6340caSmrgcat conftest.i conftest.i >conftest2.i
34420c6340caSmrglt_cv_truncate_bin=
34430c6340caSmrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
34440c6340caSmrg  cmp -s conftest.i conftest.out \
34450c6340caSmrg  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
34460c6340caSmrgfi
34470c6340caSmrgrm -f conftest.i conftest2.i conftest.out
34480c6340caSmrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
34490c6340caSmrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
34500c6340caSmrg  [Command to truncate a binary pipe])
34510c6340caSmrg])# _LT_CMD_TRUNCATE
34520c6340caSmrg
34530c6340caSmrg
34540c6340caSmrg# _LT_CHECK_MAGIC_METHOD
34550c6340caSmrg# ----------------------
34560c6340caSmrg# how to check for library dependencies
34570c6340caSmrg#  -- PORTME fill in with the dynamic library characteristics
34580c6340caSmrgm4_defun([_LT_CHECK_MAGIC_METHOD],
34590c6340caSmrg[m4_require([_LT_DECL_EGREP])
34600c6340caSmrgm4_require([_LT_DECL_OBJDUMP])
34610c6340caSmrgAC_CACHE_CHECK([how to recognize dependent libraries],
34620c6340caSmrglt_cv_deplibs_check_method,
34630c6340caSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
34640c6340caSmrglt_cv_file_magic_test_file=
34650c6340caSmrglt_cv_deplibs_check_method='unknown'
34660c6340caSmrg# Need to set the preceding variable on all platforms that support
34670c6340caSmrg# interlibrary dependencies.
34680c6340caSmrg# 'none' -- dependencies not supported.
34690c6340caSmrg# 'unknown' -- same as none, but documents that we really don't know.
34700c6340caSmrg# 'pass_all' -- all dependencies passed with no checks.
34710c6340caSmrg# 'test_compile' -- check by making test program.
34720c6340caSmrg# 'file_magic [[regex]]' -- check by looking for files in library path
34730c6340caSmrg# that responds to the $file_magic_cmd with a given extended regex.
34740c6340caSmrg# If you have 'file' or equivalent on your system and you're not sure
34750c6340caSmrg# whether 'pass_all' will *always* work, you probably want this one.
34760c6340caSmrg
34770c6340caSmrgcase $host_os in
34780c6340caSmrgaix[[4-9]]*)
34790c6340caSmrg  lt_cv_deplibs_check_method=pass_all
34800c6340caSmrg  ;;
34810c6340caSmrg
34820c6340caSmrgbeos*)
34830c6340caSmrg  lt_cv_deplibs_check_method=pass_all
34840c6340caSmrg  ;;
34850c6340caSmrg
34860c6340caSmrgbsdi[[45]]*)
34870c6340caSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
34880c6340caSmrg  lt_cv_file_magic_cmd='$FILECMD -L'
34890c6340caSmrg  lt_cv_file_magic_test_file=/shlib/libc.so
34900c6340caSmrg  ;;
34910c6340caSmrg
34920c6340caSmrgcygwin*)
34930c6340caSmrg  # func_win32_libid is a shell function defined in ltmain.sh
34940c6340caSmrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
34950c6340caSmrg  lt_cv_file_magic_cmd='func_win32_libid'
34960c6340caSmrg  ;;
34970c6340caSmrg
34980c6340caSmrgmingw* | pw32*)
34990c6340caSmrg  # Base MSYS/MinGW do not provide the 'file' command needed by
35000c6340caSmrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
35010c6340caSmrg  # unless we find 'file', for example because we are cross-compiling.
35020c6340caSmrg  if ( file / ) >/dev/null 2>&1; then
35030c6340caSmrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
35040c6340caSmrg    lt_cv_file_magic_cmd='func_win32_libid'
35050c6340caSmrg  else
35060c6340caSmrg    # Keep this pattern in sync with the one in func_win32_libid.
35070c6340caSmrg    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
35080c6340caSmrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
35090c6340caSmrg  fi
35100c6340caSmrg  ;;
35110c6340caSmrg
35120c6340caSmrgcegcc*)
35130c6340caSmrg  # use the weaker test based on 'objdump'. See mingw*.
35140c6340caSmrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
35150c6340caSmrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
35160c6340caSmrg  ;;
35170c6340caSmrg
35180c6340caSmrgdarwin* | rhapsody*)
35190c6340caSmrg  lt_cv_deplibs_check_method=pass_all
35200c6340caSmrg  ;;
35210c6340caSmrg
35220c6340caSmrgfreebsd* | dragonfly* | midnightbsd*)
35230c6340caSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
35240c6340caSmrg    case $host_cpu in
35250c6340caSmrg    i*86 )
35260c6340caSmrg      # Not sure whether the presence of OpenBSD here was a mistake.
35270c6340caSmrg      # Let's accept both of them until this is cleared up.
35280c6340caSmrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
35290c6340caSmrg      lt_cv_file_magic_cmd=$FILECMD
35300c6340caSmrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
35310c6340caSmrg      ;;
35320c6340caSmrg    esac
35330c6340caSmrg  else
35340c6340caSmrg    lt_cv_deplibs_check_method=pass_all
35350c6340caSmrg  fi
35360c6340caSmrg  ;;
35370c6340caSmrg
35380c6340caSmrghaiku*)
35390c6340caSmrg  lt_cv_deplibs_check_method=pass_all
35400c6340caSmrg  ;;
35410c6340caSmrg
35420c6340caSmrghpux10.20* | hpux11*)
35430c6340caSmrg  lt_cv_file_magic_cmd=$FILECMD
35440c6340caSmrg  case $host_cpu in
35450c6340caSmrg  ia64*)
35460c6340caSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
35470c6340caSmrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
35480c6340caSmrg    ;;
35490c6340caSmrg  hppa*64*)
35500c6340caSmrg    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
35510c6340caSmrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
35520c6340caSmrg    ;;
35530c6340caSmrg  *)
35540c6340caSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
35550c6340caSmrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
35560c6340caSmrg    ;;
35570c6340caSmrg  esac
35580c6340caSmrg  ;;
35590c6340caSmrg
35600c6340caSmrginterix[[3-9]]*)
35610c6340caSmrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
35620c6340caSmrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
35630c6340caSmrg  ;;
35640c6340caSmrg
35650c6340caSmrgirix5* | irix6* | nonstopux*)
35660c6340caSmrg  case $LD in
35670c6340caSmrg  *-32|*"-32 ") libmagic=32-bit;;
35680c6340caSmrg  *-n32|*"-n32 ") libmagic=N32;;
35690c6340caSmrg  *-64|*"-64 ") libmagic=64-bit;;
35700c6340caSmrg  *) libmagic=never-match;;
35710c6340caSmrg  esac
35720c6340caSmrg  lt_cv_deplibs_check_method=pass_all
35730c6340caSmrg  ;;
35740c6340caSmrg
35750c6340caSmrg# This must be glibc/ELF.
35760c6340caSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
35770c6340caSmrg  lt_cv_deplibs_check_method=pass_all
35780c6340caSmrg  ;;
35790c6340caSmrg
3580de301c82Smrgnetbsd* | netbsdelf*-gnu)
35810c6340caSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
35820c6340caSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
35830c6340caSmrg  else
35840c6340caSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
35850c6340caSmrg  fi
35860c6340caSmrg  ;;
35870c6340caSmrg
35880c6340caSmrgnewos6*)
35890c6340caSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
35900c6340caSmrg  lt_cv_file_magic_cmd=$FILECMD
35910c6340caSmrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
35920c6340caSmrg  ;;
35930c6340caSmrg
35940c6340caSmrg*nto* | *qnx*)
35950c6340caSmrg  lt_cv_deplibs_check_method=pass_all
35960c6340caSmrg  ;;
35970c6340caSmrg
35980c6340caSmrgopenbsd* | bitrig*)
35990c6340caSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
36000c6340caSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
36010c6340caSmrg  else
36020c6340caSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
36030c6340caSmrg  fi
36040c6340caSmrg  ;;
36050c6340caSmrg
36060c6340caSmrgosf3* | osf4* | osf5*)
36070c6340caSmrg  lt_cv_deplibs_check_method=pass_all
36080c6340caSmrg  ;;
36090c6340caSmrg
36100c6340caSmrgrdos*)
36110c6340caSmrg  lt_cv_deplibs_check_method=pass_all
36120c6340caSmrg  ;;
36130c6340caSmrg
36140c6340caSmrgsolaris*)
36150c6340caSmrg  lt_cv_deplibs_check_method=pass_all
36160c6340caSmrg  ;;
36170c6340caSmrg
36180c6340caSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
36190c6340caSmrg  lt_cv_deplibs_check_method=pass_all
36200c6340caSmrg  ;;
36210c6340caSmrg
36220c6340caSmrgsysv4 | sysv4.3*)
36230c6340caSmrg  case $host_vendor in
36240c6340caSmrg  motorola)
36250c6340caSmrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
36260c6340caSmrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
36270c6340caSmrg    ;;
36280c6340caSmrg  ncr)
36290c6340caSmrg    lt_cv_deplibs_check_method=pass_all
36300c6340caSmrg    ;;
36310c6340caSmrg  sequent)
36320c6340caSmrg    lt_cv_file_magic_cmd='/bin/file'
36330c6340caSmrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
36340c6340caSmrg    ;;
36350c6340caSmrg  sni)
36360c6340caSmrg    lt_cv_file_magic_cmd='/bin/file'
36370c6340caSmrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
36380c6340caSmrg    lt_cv_file_magic_test_file=/lib/libc.so
36390c6340caSmrg    ;;
36400c6340caSmrg  siemens)
36410c6340caSmrg    lt_cv_deplibs_check_method=pass_all
36420c6340caSmrg    ;;
36430c6340caSmrg  pc)
36440c6340caSmrg    lt_cv_deplibs_check_method=pass_all
36450c6340caSmrg    ;;
36460c6340caSmrg  esac
36470c6340caSmrg  ;;
36480c6340caSmrg
36490c6340caSmrgtpf*)
36500c6340caSmrg  lt_cv_deplibs_check_method=pass_all
36510c6340caSmrg  ;;
36520c6340caSmrgos2*)
36530c6340caSmrg  lt_cv_deplibs_check_method=pass_all
36540c6340caSmrg  ;;
36550c6340caSmrgesac
36560c6340caSmrg])
36570c6340caSmrg
36580c6340caSmrgfile_magic_glob=
36590c6340caSmrgwant_nocaseglob=no
36600c6340caSmrgif test "$build" = "$host"; then
36610c6340caSmrg  case $host_os in
36620c6340caSmrg  mingw* | pw32*)
36630c6340caSmrg    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
36640c6340caSmrg      want_nocaseglob=yes
36650c6340caSmrg    else
36660c6340caSmrg      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
36670c6340caSmrg    fi
36680c6340caSmrg    ;;
36690c6340caSmrg  esac
36700c6340caSmrgfi
36710c6340caSmrg
36720c6340caSmrgfile_magic_cmd=$lt_cv_file_magic_cmd
36730c6340caSmrgdeplibs_check_method=$lt_cv_deplibs_check_method
36740c6340caSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
36750c6340caSmrg
36760c6340caSmrg_LT_DECL([], [deplibs_check_method], [1],
36770c6340caSmrg    [Method to check whether dependent libraries are shared objects])
36780c6340caSmrg_LT_DECL([], [file_magic_cmd], [1],
36790c6340caSmrg    [Command to use when deplibs_check_method = "file_magic"])
36800c6340caSmrg_LT_DECL([], [file_magic_glob], [1],
36810c6340caSmrg    [How to find potential files when deplibs_check_method = "file_magic"])
36820c6340caSmrg_LT_DECL([], [want_nocaseglob], [1],
36830c6340caSmrg    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
36840c6340caSmrg])# _LT_CHECK_MAGIC_METHOD
36850c6340caSmrg
36860c6340caSmrg
36870c6340caSmrg# LT_PATH_NM
36880c6340caSmrg# ----------
36890c6340caSmrg# find the pathname to a BSD- or MS-compatible name lister
36900c6340caSmrgAC_DEFUN([LT_PATH_NM],
36910c6340caSmrg[AC_REQUIRE([AC_PROG_CC])dnl
36920c6340caSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
36930c6340caSmrg[if test -n "$NM"; then
36940c6340caSmrg  # Let the user override the test.
36950c6340caSmrg  lt_cv_path_NM=$NM
36960c6340caSmrgelse
36970c6340caSmrg  lt_nm_to_check=${ac_tool_prefix}nm
36980c6340caSmrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
36990c6340caSmrg    lt_nm_to_check="$lt_nm_to_check nm"
37000c6340caSmrg  fi
37010c6340caSmrg  for lt_tmp_nm in $lt_nm_to_check; do
37020c6340caSmrg    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
37030c6340caSmrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
37040c6340caSmrg      IFS=$lt_save_ifs
37050c6340caSmrg      test -z "$ac_dir" && ac_dir=.
37060c6340caSmrg      tmp_nm=$ac_dir/$lt_tmp_nm
37070c6340caSmrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
37080c6340caSmrg	# Check to see if the nm accepts a BSD-compat flag.
37090c6340caSmrg	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
37100c6340caSmrg	#   nm: unknown option "B" ignored
37110c6340caSmrg	# Tru64's nm complains that /dev/null is an invalid object file
37120c6340caSmrg	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
37130c6340caSmrg	case $build_os in
37140c6340caSmrg	mingw*) lt_bad_file=conftest.nm/nofile ;;
37150c6340caSmrg	*) lt_bad_file=/dev/null ;;
37160c6340caSmrg	esac
37170c6340caSmrg	case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
37180c6340caSmrg	*$lt_bad_file* | *'Invalid file or object type'*)
37190c6340caSmrg	  lt_cv_path_NM="$tmp_nm -B"
37200c6340caSmrg	  break 2
37210c6340caSmrg	  ;;
37220c6340caSmrg	*)
37230c6340caSmrg	  case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
37240c6340caSmrg	  */dev/null*)
37250c6340caSmrg	    lt_cv_path_NM="$tmp_nm -p"
37260c6340caSmrg	    break 2
37270c6340caSmrg	    ;;
37280c6340caSmrg	  *)
37290c6340caSmrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
37300c6340caSmrg	    continue # so that we can try to find one that supports BSD flags
37310c6340caSmrg	    ;;
37320c6340caSmrg	  esac
37330c6340caSmrg	  ;;
37340c6340caSmrg	esac
37350c6340caSmrg      fi
37360c6340caSmrg    done
37370c6340caSmrg    IFS=$lt_save_ifs
37380c6340caSmrg  done
37390c6340caSmrg  : ${lt_cv_path_NM=no}
37400c6340caSmrgfi])
37410c6340caSmrgif test no != "$lt_cv_path_NM"; then
37420c6340caSmrg  NM=$lt_cv_path_NM
37430c6340caSmrgelse
37440c6340caSmrg  # Didn't find any BSD compatible name lister, look for dumpbin.
37450c6340caSmrg  if test -n "$DUMPBIN"; then :
37460c6340caSmrg    # Let the user override the test.
37470c6340caSmrg  else
37480c6340caSmrg    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
37490c6340caSmrg    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
37500c6340caSmrg    *COFF*)
37510c6340caSmrg      DUMPBIN="$DUMPBIN -symbols -headers"
37520c6340caSmrg      ;;
37530c6340caSmrg    *)
37540c6340caSmrg      DUMPBIN=:
37550c6340caSmrg      ;;
37560c6340caSmrg    esac
37570c6340caSmrg  fi
37580c6340caSmrg  AC_SUBST([DUMPBIN])
37590c6340caSmrg  if test : != "$DUMPBIN"; then
37600c6340caSmrg    NM=$DUMPBIN
37610c6340caSmrg  fi
37620c6340caSmrgfi
37630c6340caSmrgtest -z "$NM" && NM=nm
37640c6340caSmrgAC_SUBST([NM])
37650c6340caSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
37660c6340caSmrg
37670c6340caSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
37680c6340caSmrg  [lt_cv_nm_interface="BSD nm"
37690c6340caSmrg  echo "int some_variable = 0;" > conftest.$ac_ext
37700c6340caSmrg  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
37710c6340caSmrg  (eval "$ac_compile" 2>conftest.err)
37720c6340caSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
37730c6340caSmrg  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
37740c6340caSmrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
37750c6340caSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
37760c6340caSmrg  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
37770c6340caSmrg  cat conftest.out >&AS_MESSAGE_LOG_FD
37780c6340caSmrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
37790c6340caSmrg    lt_cv_nm_interface="MS dumpbin"
37800c6340caSmrg  fi
37810c6340caSmrg  rm -f conftest*])
37820c6340caSmrg])# LT_PATH_NM
37830c6340caSmrg
37840c6340caSmrg# Old names:
37850c6340caSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
37860c6340caSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
37870c6340caSmrgdnl aclocal-1.4 backwards compatibility:
37880c6340caSmrgdnl AC_DEFUN([AM_PROG_NM], [])
37890c6340caSmrgdnl AC_DEFUN([AC_PROG_NM], [])
37900c6340caSmrg
37910c6340caSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
37920c6340caSmrg# --------------------------------
37930c6340caSmrg# how to determine the name of the shared library
37940c6340caSmrg# associated with a specific link library.
37950c6340caSmrg#  -- PORTME fill in with the dynamic library characteristics
37960c6340caSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
37970c6340caSmrg[m4_require([_LT_DECL_EGREP])
37980c6340caSmrgm4_require([_LT_DECL_OBJDUMP])
37990c6340caSmrgm4_require([_LT_DECL_DLLTOOL])
38000c6340caSmrgAC_CACHE_CHECK([how to associate runtime and link libraries],
38010c6340caSmrglt_cv_sharedlib_from_linklib_cmd,
38020c6340caSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown'
38030c6340caSmrg
38040c6340caSmrgcase $host_os in
38050c6340caSmrgcygwin* | mingw* | pw32* | cegcc*)
38060c6340caSmrg  # two different shell functions defined in ltmain.sh;
38070c6340caSmrg  # decide which one to use based on capabilities of $DLLTOOL
38080c6340caSmrg  case `$DLLTOOL --help 2>&1` in
38090c6340caSmrg  *--identify-strict*)
38100c6340caSmrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
38110c6340caSmrg    ;;
38120c6340caSmrg  *)
38130c6340caSmrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
38140c6340caSmrg    ;;
38150c6340caSmrg  esac
38160c6340caSmrg  ;;
38170c6340caSmrg*)
38180c6340caSmrg  # fallback: assume linklib IS sharedlib
38190c6340caSmrg  lt_cv_sharedlib_from_linklib_cmd=$ECHO
38200c6340caSmrg  ;;
38210c6340caSmrgesac
38220c6340caSmrg])
38230c6340caSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
38240c6340caSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
38250c6340caSmrg
38260c6340caSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
38270c6340caSmrg    [Command to associate shared and link libraries])
38280c6340caSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
38290c6340caSmrg
38300c6340caSmrg
38310c6340caSmrg# _LT_PATH_MANIFEST_TOOL
38320c6340caSmrg# ----------------------
38330c6340caSmrg# locate the manifest tool
38340c6340caSmrgm4_defun([_LT_PATH_MANIFEST_TOOL],
38350c6340caSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
38360c6340caSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
38370c6340caSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
38380c6340caSmrg  [lt_cv_path_mainfest_tool=no
38390c6340caSmrg  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
38400c6340caSmrg  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
38410c6340caSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
38420c6340caSmrg  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
38430c6340caSmrg    lt_cv_path_mainfest_tool=yes
38440c6340caSmrg  fi
38450c6340caSmrg  rm -f conftest*])
38460c6340caSmrgif test yes != "$lt_cv_path_mainfest_tool"; then
38470c6340caSmrg  MANIFEST_TOOL=:
38480c6340caSmrgfi
38490c6340caSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
38500c6340caSmrg])# _LT_PATH_MANIFEST_TOOL
38510c6340caSmrg
38520c6340caSmrg
38530c6340caSmrg# _LT_DLL_DEF_P([FILE])
38540c6340caSmrg# ---------------------
38550c6340caSmrg# True iff FILE is a Windows DLL '.def' file.
38560c6340caSmrg# Keep in sync with func_dll_def_p in the libtool script
38570c6340caSmrgAC_DEFUN([_LT_DLL_DEF_P],
38580c6340caSmrg[dnl
38590c6340caSmrg  test DEF = "`$SED -n dnl
38600c6340caSmrg    -e '\''s/^[[	 ]]*//'\'' dnl Strip leading whitespace
38610c6340caSmrg    -e '\''/^\(;.*\)*$/d'\'' dnl      Delete empty lines and comments
38620c6340caSmrg    -e '\''s/^\(EXPORTS\|LIBRARY\)\([[	 ]].*\)*$/DEF/p'\'' dnl
38630c6340caSmrg    -e q dnl                          Only consider the first "real" line
38640c6340caSmrg    $1`" dnl
38650c6340caSmrg])# _LT_DLL_DEF_P
38660c6340caSmrg
38670c6340caSmrg
38680c6340caSmrg# LT_LIB_M
38690c6340caSmrg# --------
38700c6340caSmrg# check for math library
38710c6340caSmrgAC_DEFUN([LT_LIB_M],
38720c6340caSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
38730c6340caSmrgLIBM=
38740c6340caSmrgcase $host in
38750c6340caSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
38760c6340caSmrg  # These system don't have libm, or don't need it
38770c6340caSmrg  ;;
38780c6340caSmrg*-ncr-sysv4.3*)
38790c6340caSmrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
38800c6340caSmrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
38810c6340caSmrg  ;;
38820c6340caSmrg*)
38830c6340caSmrg  AC_CHECK_LIB(m, cos, LIBM=-lm)
38840c6340caSmrg  ;;
38850c6340caSmrgesac
38860c6340caSmrgAC_SUBST([LIBM])
38870c6340caSmrg])# LT_LIB_M
38880c6340caSmrg
38890c6340caSmrg# Old name:
38900c6340caSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
38910c6340caSmrgdnl aclocal-1.4 backwards compatibility:
38920c6340caSmrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
38930c6340caSmrg
38940c6340caSmrg
38950c6340caSmrg# _LT_COMPILER_NO_RTTI([TAGNAME])
38960c6340caSmrg# -------------------------------
38970c6340caSmrgm4_defun([_LT_COMPILER_NO_RTTI],
38980c6340caSmrg[m4_require([_LT_TAG_COMPILER])dnl
38990c6340caSmrg
39000c6340caSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
39010c6340caSmrg
39020c6340caSmrgif test yes = "$GCC"; then
39030c6340caSmrg  case $cc_basename in
39040c6340caSmrg  nvcc*)
39050c6340caSmrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
39060c6340caSmrg  *)
39070c6340caSmrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
39080c6340caSmrg  esac
39090c6340caSmrg
39100c6340caSmrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
39110c6340caSmrg    lt_cv_prog_compiler_rtti_exceptions,
39120c6340caSmrg    [-fno-rtti -fno-exceptions], [],
39130c6340caSmrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
39140c6340caSmrgfi
39150c6340caSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
39160c6340caSmrg	[Compiler flag to turn off builtin functions])
39170c6340caSmrg])# _LT_COMPILER_NO_RTTI
39180c6340caSmrg
39190c6340caSmrg
39200c6340caSmrg# _LT_CMD_GLOBAL_SYMBOLS
39210c6340caSmrg# ----------------------
39220c6340caSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
39230c6340caSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
39240c6340caSmrgAC_REQUIRE([AC_PROG_CC])dnl
39250c6340caSmrgAC_REQUIRE([AC_PROG_AWK])dnl
39260c6340caSmrgAC_REQUIRE([LT_PATH_NM])dnl
39270c6340caSmrgAC_REQUIRE([LT_PATH_LD])dnl
39280c6340caSmrgm4_require([_LT_DECL_SED])dnl
39290c6340caSmrgm4_require([_LT_DECL_EGREP])dnl
39300c6340caSmrgm4_require([_LT_TAG_COMPILER])dnl
39310c6340caSmrg
39320c6340caSmrg# Check for command to grab the raw symbol name followed by C symbol from nm.
39330c6340caSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
39340c6340caSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
39350c6340caSmrg[
39360c6340caSmrg# These are sane defaults that work on at least a few old systems.
39370c6340caSmrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
39380c6340caSmrg
39390c6340caSmrg# Character class describing NM global symbol codes.
39400c6340caSmrgsymcode='[[BCDEGRST]]'
39410c6340caSmrg
39420c6340caSmrg# Regexp to match symbols that can be accessed directly from C.
39430c6340caSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
39440c6340caSmrg
39450c6340caSmrg# Define system-specific variables.
39460c6340caSmrgcase $host_os in
39470c6340caSmrgaix*)
39480c6340caSmrg  symcode='[[BCDT]]'
39490c6340caSmrg  ;;
39500c6340caSmrgcygwin* | mingw* | pw32* | cegcc*)
39510c6340caSmrg  symcode='[[ABCDGISTW]]'
39520c6340caSmrg  ;;
39530c6340caSmrghpux*)
39540c6340caSmrg  if test ia64 = "$host_cpu"; then
39550c6340caSmrg    symcode='[[ABCDEGRST]]'
39560c6340caSmrg  fi
39570c6340caSmrg  ;;
39580c6340caSmrgirix* | nonstopux*)
39590c6340caSmrg  symcode='[[BCDEGRST]]'
39600c6340caSmrg  ;;
39610c6340caSmrgosf*)
39620c6340caSmrg  symcode='[[BCDEGQRST]]'
39630c6340caSmrg  ;;
39640c6340caSmrgsolaris*)
39650c6340caSmrg  symcode='[[BDRT]]'
39660c6340caSmrg  ;;
39670c6340caSmrgsco3.2v5*)
39680c6340caSmrg  symcode='[[DT]]'
39690c6340caSmrg  ;;
39700c6340caSmrgsysv4.2uw2*)
39710c6340caSmrg  symcode='[[DT]]'
39720c6340caSmrg  ;;
39730c6340caSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
39740c6340caSmrg  symcode='[[ABDT]]'
39750c6340caSmrg  ;;
39760c6340caSmrgsysv4)
39770c6340caSmrg  symcode='[[DFNSTU]]'
39780c6340caSmrg  ;;
39790c6340caSmrgesac
39800c6340caSmrg
39810c6340caSmrg# If we're using GNU nm, then use its standard symbol codes.
39820c6340caSmrgcase `$NM -V 2>&1` in
39830c6340caSmrg*GNU* | *'with BFD'*)
39840c6340caSmrg  symcode='[[ABCDGIRSTW]]' ;;
39850c6340caSmrgesac
39860c6340caSmrg
39870c6340caSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
39880c6340caSmrg  # Gets list of data symbols to import.
39890c6340caSmrg  lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
39900c6340caSmrg  # Adjust the below global symbol transforms to fixup imported variables.
39910c6340caSmrg  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
39920c6340caSmrg  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
39930c6340caSmrg  lt_c_name_lib_hook="\
39940c6340caSmrg  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
39950c6340caSmrg  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
39960c6340caSmrgelse
39970c6340caSmrg  # Disable hooks by default.
39980c6340caSmrg  lt_cv_sys_global_symbol_to_import=
39990c6340caSmrg  lt_cdecl_hook=
40000c6340caSmrg  lt_c_name_hook=
40010c6340caSmrg  lt_c_name_lib_hook=
40020c6340caSmrgfi
40030c6340caSmrg
40040c6340caSmrg# Transform an extracted symbol line into a proper C declaration.
40050c6340caSmrg# Some systems (esp. on ia64) link data and code symbols differently,
40060c6340caSmrg# so use this general approach.
40070c6340caSmrglt_cv_sys_global_symbol_to_cdecl="$SED -n"\
40080c6340caSmrg$lt_cdecl_hook\
40090c6340caSmrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
40100c6340caSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
40110c6340caSmrg
40120c6340caSmrg# Transform an extracted symbol line into symbol name and symbol address
40130c6340caSmrglt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
40140c6340caSmrg$lt_c_name_hook\
40150c6340caSmrg" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
40160c6340caSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
40170c6340caSmrg
40180c6340caSmrg# Transform an extracted symbol line into symbol name with lib prefix and
40190c6340caSmrg# symbol address.
40200c6340caSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
40210c6340caSmrg$lt_c_name_lib_hook\
40220c6340caSmrg" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
40230c6340caSmrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
40240c6340caSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
40250c6340caSmrg
40260c6340caSmrg# Handle CRLF in mingw tool chain
40270c6340caSmrgopt_cr=
40280c6340caSmrgcase $build_os in
40290c6340caSmrgmingw*)
40300c6340caSmrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
40310c6340caSmrg  ;;
40320c6340caSmrgesac
40330c6340caSmrg
40340c6340caSmrg# Try without a prefix underscore, then with it.
40350c6340caSmrgfor ac_symprfx in "" "_"; do
40360c6340caSmrg
40370c6340caSmrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
40380c6340caSmrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
40390c6340caSmrg
40400c6340caSmrg  # Write the raw and C identifiers.
40410c6340caSmrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
40420c6340caSmrg    # Fake it for dumpbin and say T for any non-static function,
40430c6340caSmrg    # D for any global variable and I for any imported variable.
40440c6340caSmrg    # Also find C++ and __fastcall symbols from MSVC++ or ICC,
40450c6340caSmrg    # which start with @ or ?.
40460c6340caSmrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
40470c6340caSmrg"     {last_section=section; section=\$ 3};"\
40480c6340caSmrg"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
40490c6340caSmrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
40500c6340caSmrg"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
40510c6340caSmrg"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
40520c6340caSmrg"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
40530c6340caSmrg"     \$ 0!~/External *\|/{next};"\
40540c6340caSmrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
40550c6340caSmrg"     {if(hide[section]) next};"\
40560c6340caSmrg"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
40570c6340caSmrg"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
40580c6340caSmrg"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
40590c6340caSmrg"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
40600c6340caSmrg"     ' prfx=^$ac_symprfx]"
40610c6340caSmrg  else
40620c6340caSmrg    lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
40630c6340caSmrg  fi
40640c6340caSmrg  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
40650c6340caSmrg
40660c6340caSmrg  # Check to see that the pipe works correctly.
40670c6340caSmrg  pipe_works=no
40680c6340caSmrg
40690c6340caSmrg  rm -f conftest*
40700c6340caSmrg  cat > conftest.$ac_ext <<_LT_EOF
40710c6340caSmrg#ifdef __cplusplus
40720c6340caSmrgextern "C" {
40730c6340caSmrg#endif
40740c6340caSmrgchar nm_test_var;
40750c6340caSmrgvoid nm_test_func(void);
40760c6340caSmrgvoid nm_test_func(void){}
40770c6340caSmrg#ifdef __cplusplus
40780c6340caSmrg}
40790c6340caSmrg#endif
40800c6340caSmrgint main(){nm_test_var='a';nm_test_func();return(0);}
40810c6340caSmrg_LT_EOF
40820c6340caSmrg
40830c6340caSmrg  if AC_TRY_EVAL(ac_compile); then
40840c6340caSmrg    # Now try to grab the symbols.
40850c6340caSmrg    nlist=conftest.nm
4086de301c82Smrg    $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD
4087de301c82Smrg    if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then
40880c6340caSmrg      # Try sorting and uniquifying the output.
40890c6340caSmrg      if sort "$nlist" | uniq > "$nlist"T; then
40900c6340caSmrg	mv -f "$nlist"T "$nlist"
40910c6340caSmrg      else
40920c6340caSmrg	rm -f "$nlist"T
40930c6340caSmrg      fi
40940c6340caSmrg
40950c6340caSmrg      # Make sure that we snagged all the symbols we need.
40960c6340caSmrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
40970c6340caSmrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
40980c6340caSmrg	  cat <<_LT_EOF > conftest.$ac_ext
40990c6340caSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
41000c6340caSmrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
41010c6340caSmrg/* DATA imports from DLLs on WIN32 can't be const, because runtime
41020c6340caSmrg   relocations are performed -- see ld's documentation on pseudo-relocs.  */
41030c6340caSmrg# define LT@&t@_DLSYM_CONST
41040c6340caSmrg#elif defined __osf__
41050c6340caSmrg/* This system does not cope well with relocations in const data.  */
41060c6340caSmrg# define LT@&t@_DLSYM_CONST
41070c6340caSmrg#else
41080c6340caSmrg# define LT@&t@_DLSYM_CONST const
41090c6340caSmrg#endif
41100c6340caSmrg
41110c6340caSmrg#ifdef __cplusplus
41120c6340caSmrgextern "C" {
41130c6340caSmrg#endif
41140c6340caSmrg
41150c6340caSmrg_LT_EOF
41160c6340caSmrg	  # Now generate the symbol file.
41170c6340caSmrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
41180c6340caSmrg
41190c6340caSmrg	  cat <<_LT_EOF >> conftest.$ac_ext
41200c6340caSmrg
41210c6340caSmrg/* The mapping between symbol names and symbols.  */
41220c6340caSmrgLT@&t@_DLSYM_CONST struct {
41230c6340caSmrg  const char *name;
41240c6340caSmrg  void       *address;
41250c6340caSmrg}
41260c6340caSmrglt__PROGRAM__LTX_preloaded_symbols[[]] =
41270c6340caSmrg{
41280c6340caSmrg  { "@PROGRAM@", (void *) 0 },
41290c6340caSmrg_LT_EOF
41300c6340caSmrg	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
41310c6340caSmrg	  cat <<\_LT_EOF >> conftest.$ac_ext
41320c6340caSmrg  {0, (void *) 0}
41330c6340caSmrg};
41340c6340caSmrg
41350c6340caSmrg/* This works around a problem in FreeBSD linker */
41360c6340caSmrg#ifdef FREEBSD_WORKAROUND
41370c6340caSmrgstatic const void *lt_preloaded_setup() {
41380c6340caSmrg  return lt__PROGRAM__LTX_preloaded_symbols;
41390c6340caSmrg}
41400c6340caSmrg#endif
41410c6340caSmrg
41420c6340caSmrg#ifdef __cplusplus
41430c6340caSmrg}
41440c6340caSmrg#endif
41450c6340caSmrg_LT_EOF
41460c6340caSmrg	  # Now try linking the two files.
41470c6340caSmrg	  mv conftest.$ac_objext conftstm.$ac_objext
41480c6340caSmrg	  lt_globsym_save_LIBS=$LIBS
41490c6340caSmrg	  lt_globsym_save_CFLAGS=$CFLAGS
41500c6340caSmrg	  LIBS=conftstm.$ac_objext
41510c6340caSmrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
41520c6340caSmrg	  if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
41530c6340caSmrg	    pipe_works=yes
41540c6340caSmrg	  fi
41550c6340caSmrg	  LIBS=$lt_globsym_save_LIBS
41560c6340caSmrg	  CFLAGS=$lt_globsym_save_CFLAGS
41570c6340caSmrg	else
41580c6340caSmrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
41590c6340caSmrg	fi
41600c6340caSmrg      else
41610c6340caSmrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
41620c6340caSmrg      fi
41630c6340caSmrg    else
41640c6340caSmrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
41650c6340caSmrg    fi
41660c6340caSmrg  else
41670c6340caSmrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
41680c6340caSmrg    cat conftest.$ac_ext >&5
41690c6340caSmrg  fi
41700c6340caSmrg  rm -rf conftest* conftst*
41710c6340caSmrg
41720c6340caSmrg  # Do not use the global_symbol_pipe unless it works.
41730c6340caSmrg  if test yes = "$pipe_works"; then
41740c6340caSmrg    break
41750c6340caSmrg  else
41760c6340caSmrg    lt_cv_sys_global_symbol_pipe=
41770c6340caSmrg  fi
41780c6340caSmrgdone
41790c6340caSmrg])
41800c6340caSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
41810c6340caSmrg  lt_cv_sys_global_symbol_to_cdecl=
41820c6340caSmrgfi
41830c6340caSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
41840c6340caSmrg  AC_MSG_RESULT(failed)
41850c6340caSmrgelse
41860c6340caSmrg  AC_MSG_RESULT(ok)
41870c6340caSmrgfi
41880c6340caSmrg
41890c6340caSmrg# Response file support.
41900c6340caSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
41910c6340caSmrg  nm_file_list_spec='@'
41920c6340caSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
41930c6340caSmrg  nm_file_list_spec='@'
41940c6340caSmrgfi
41950c6340caSmrg
41960c6340caSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
41970c6340caSmrg    [Take the output of nm and produce a listing of raw symbols and C names])
41980c6340caSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
41990c6340caSmrg    [Transform the output of nm in a proper C declaration])
42000c6340caSmrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
42010c6340caSmrg    [Transform the output of nm into a list of symbols to manually relocate])
42020c6340caSmrg_LT_DECL([global_symbol_to_c_name_address],
42030c6340caSmrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
42040c6340caSmrg    [Transform the output of nm in a C name address pair])
42050c6340caSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
42060c6340caSmrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
42070c6340caSmrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
42080c6340caSmrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
42090c6340caSmrg    [The name lister interface])
42100c6340caSmrg_LT_DECL([], [nm_file_list_spec], [1],
42110c6340caSmrg    [Specify filename containing input files for $NM])
42120c6340caSmrg]) # _LT_CMD_GLOBAL_SYMBOLS
42130c6340caSmrg
42140c6340caSmrg
42150c6340caSmrg# _LT_COMPILER_PIC([TAGNAME])
42160c6340caSmrg# ---------------------------
42170c6340caSmrgm4_defun([_LT_COMPILER_PIC],
42180c6340caSmrg[m4_require([_LT_TAG_COMPILER])dnl
42190c6340caSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
42200c6340caSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
42210c6340caSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
42220c6340caSmrg
42230c6340caSmrgm4_if([$1], [CXX], [
42240c6340caSmrg  # C++ specific cases for pic, static, wl, etc.
42250c6340caSmrg  if test yes = "$GXX"; then
42260c6340caSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
42270c6340caSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
42280c6340caSmrg
42290c6340caSmrg    case $host_os in
42300c6340caSmrg    aix*)
42310c6340caSmrg      # All AIX code is PIC.
42320c6340caSmrg      if test ia64 = "$host_cpu"; then
42330c6340caSmrg	# AIX 5 now supports IA64 processor
42340c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
42350c6340caSmrg      fi
42360c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
42370c6340caSmrg      ;;
42380c6340caSmrg
42390c6340caSmrg    amigaos*)
42400c6340caSmrg      case $host_cpu in
42410c6340caSmrg      powerpc)
42420c6340caSmrg            # see comment about AmigaOS4 .so support
42430c6340caSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
42440c6340caSmrg        ;;
42450c6340caSmrg      m68k)
42460c6340caSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
42470c6340caSmrg            # adding the '-m68020' flag to GCC prevents building anything better,
42480c6340caSmrg            # like '-m68040'.
42490c6340caSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
42500c6340caSmrg        ;;
42510c6340caSmrg      esac
42520c6340caSmrg      ;;
42530c6340caSmrg
42540c6340caSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
42550c6340caSmrg      # PIC is the default for these OSes.
42560c6340caSmrg      ;;
42570c6340caSmrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
42580c6340caSmrg      # This hack is so that the source file can tell whether it is being
42590c6340caSmrg      # built for inclusion in a dll (and should export symbols for example).
42600c6340caSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
42610c6340caSmrg      # (--disable-auto-import) libraries
42620c6340caSmrg      m4_if([$1], [GCJ], [],
42630c6340caSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
42640c6340caSmrg      case $host_os in
42650c6340caSmrg      os2*)
42660c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
42670c6340caSmrg	;;
42680c6340caSmrg      esac
42690c6340caSmrg      ;;
42700c6340caSmrg    darwin* | rhapsody*)
42710c6340caSmrg      # PIC is the default on this platform
42720c6340caSmrg      # Common symbols not allowed in MH_DYLIB files
42730c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
42740c6340caSmrg      ;;
42750c6340caSmrg    *djgpp*)
42760c6340caSmrg      # DJGPP does not support shared libraries at all
42770c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
42780c6340caSmrg      ;;
42790c6340caSmrg    haiku*)
42800c6340caSmrg      # PIC is the default for Haiku.
42810c6340caSmrg      # The "-static" flag exists, but is broken.
42820c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
42830c6340caSmrg      ;;
42840c6340caSmrg    interix[[3-9]]*)
42850c6340caSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
42860c6340caSmrg      # Instead, we relocate shared libraries at runtime.
42870c6340caSmrg      ;;
42880c6340caSmrg    sysv4*MP*)
42890c6340caSmrg      if test -d /usr/nec; then
42900c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
42910c6340caSmrg      fi
42920c6340caSmrg      ;;
42930c6340caSmrg    hpux*)
42940c6340caSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
42950c6340caSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
42960c6340caSmrg      # sets the default TLS model and affects inlining.
42970c6340caSmrg      case $host_cpu in
42980c6340caSmrg      hppa*64*)
42990c6340caSmrg	;;
43000c6340caSmrg      *)
43010c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
43020c6340caSmrg	;;
43030c6340caSmrg      esac
43040c6340caSmrg      ;;
43050c6340caSmrg    *qnx* | *nto*)
43060c6340caSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
43070c6340caSmrg      # it will coredump.
43080c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
43090c6340caSmrg      ;;
43100c6340caSmrg    *)
43110c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
43120c6340caSmrg      ;;
43130c6340caSmrg    esac
43140c6340caSmrg  else
43150c6340caSmrg    case $host_os in
43160c6340caSmrg      aix[[4-9]]*)
43170c6340caSmrg	# All AIX code is PIC.
43180c6340caSmrg	if test ia64 = "$host_cpu"; then
43190c6340caSmrg	  # AIX 5 now supports IA64 processor
43200c6340caSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
43210c6340caSmrg	else
43220c6340caSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
43230c6340caSmrg	fi
43240c6340caSmrg	;;
43250c6340caSmrg      chorus*)
43260c6340caSmrg	case $cc_basename in
43270c6340caSmrg	cxch68*)
43280c6340caSmrg	  # Green Hills C++ Compiler
43290c6340caSmrg	  # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
43300c6340caSmrg	  ;;
43310c6340caSmrg	esac
43320c6340caSmrg	;;
43330c6340caSmrg      mingw* | cygwin* | os2* | pw32* | cegcc*)
43340c6340caSmrg	# This hack is so that the source file can tell whether it is being
43350c6340caSmrg	# built for inclusion in a dll (and should export symbols for example).
43360c6340caSmrg	m4_if([$1], [GCJ], [],
43370c6340caSmrg	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
43380c6340caSmrg	;;
43390c6340caSmrg      dgux*)
43400c6340caSmrg	case $cc_basename in
43410c6340caSmrg	  ec++*)
43420c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
43430c6340caSmrg	    ;;
43440c6340caSmrg	  ghcx*)
43450c6340caSmrg	    # Green Hills C++ Compiler
43460c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
43470c6340caSmrg	    ;;
43480c6340caSmrg	  *)
43490c6340caSmrg	    ;;
43500c6340caSmrg	esac
43510c6340caSmrg	;;
43520c6340caSmrg      freebsd* | dragonfly* | midnightbsd*)
43530c6340caSmrg	# FreeBSD uses GNU C++
43540c6340caSmrg	;;
43550c6340caSmrg      hpux9* | hpux10* | hpux11*)
43560c6340caSmrg	case $cc_basename in
43570c6340caSmrg	  CC*)
43580c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43590c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
43600c6340caSmrg	    if test ia64 != "$host_cpu"; then
43610c6340caSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
43620c6340caSmrg	    fi
43630c6340caSmrg	    ;;
43640c6340caSmrg	  aCC*)
43650c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43660c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
43670c6340caSmrg	    case $host_cpu in
43680c6340caSmrg	    hppa*64*|ia64*)
43690c6340caSmrg	      # +Z the default
43700c6340caSmrg	      ;;
43710c6340caSmrg	    *)
43720c6340caSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
43730c6340caSmrg	      ;;
43740c6340caSmrg	    esac
43750c6340caSmrg	    ;;
43760c6340caSmrg	  *)
43770c6340caSmrg	    ;;
43780c6340caSmrg	esac
43790c6340caSmrg	;;
43800c6340caSmrg      interix*)
43810c6340caSmrg	# This is c89, which is MS Visual C++ (no shared libs)
43820c6340caSmrg	# Anyone wants to do a port?
43830c6340caSmrg	;;
43840c6340caSmrg      irix5* | irix6* | nonstopux*)
43850c6340caSmrg	case $cc_basename in
43860c6340caSmrg	  CC*)
43870c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43880c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
43890c6340caSmrg	    # CC pic flag -KPIC is the default.
43900c6340caSmrg	    ;;
43910c6340caSmrg	  *)
43920c6340caSmrg	    ;;
43930c6340caSmrg	esac
43940c6340caSmrg	;;
43950c6340caSmrg      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
43960c6340caSmrg	case $cc_basename in
43970c6340caSmrg	  KCC*)
43980c6340caSmrg	    # KAI C++ Compiler
43990c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
44000c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
44010c6340caSmrg	    ;;
44020c6340caSmrg	  ecpc* )
44030c6340caSmrg	    # old Intel C++ for x86_64, which still supported -KPIC.
44040c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
44050c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
44060c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
44070c6340caSmrg	    ;;
44080c6340caSmrg	  icpc* )
44090c6340caSmrg	    # Intel C++, used to be incompatible with GCC.
44100c6340caSmrg	    # ICC 10 doesn't accept -KPIC any more.
44110c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
44120c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
44130c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
44140c6340caSmrg	    ;;
44150c6340caSmrg	  pgCC* | pgcpp*)
44160c6340caSmrg	    # Portland Group C++ compiler
44170c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
44180c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
44190c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
44200c6340caSmrg	    ;;
44210c6340caSmrg	  cxx*)
44220c6340caSmrg	    # Compaq C++
44230c6340caSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
44240c6340caSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
44250c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
44260c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
44270c6340caSmrg	    ;;
44280c6340caSmrg	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
44290c6340caSmrg	    # IBM XL 8.0, 9.0 on PPC and BlueGene
44300c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
44310c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
44320c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
44330c6340caSmrg	    ;;
44340c6340caSmrg	  *)
44350c6340caSmrg	    case `$CC -V 2>&1 | $SED 5q` in
44360c6340caSmrg	    *Sun\ C*)
44370c6340caSmrg	      # Sun C++ 5.9
44380c6340caSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
44390c6340caSmrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
44400c6340caSmrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
44410c6340caSmrg	      ;;
44420c6340caSmrg	    esac
44430c6340caSmrg	    ;;
44440c6340caSmrg	esac
44450c6340caSmrg	;;
44460c6340caSmrg      lynxos*)
44470c6340caSmrg	;;
44480c6340caSmrg      m88k*)
44490c6340caSmrg	;;
44500c6340caSmrg      mvs*)
44510c6340caSmrg	case $cc_basename in
44520c6340caSmrg	  cxx*)
44530c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
44540c6340caSmrg	    ;;
44550c6340caSmrg	  *)
44560c6340caSmrg	    ;;
44570c6340caSmrg	esac
44580c6340caSmrg	;;
4459de301c82Smrg      netbsd* | netbsdelf*-gnu)
44600c6340caSmrg	;;
44610c6340caSmrg      *qnx* | *nto*)
44620c6340caSmrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
44630c6340caSmrg        # it will coredump.
44640c6340caSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
44650c6340caSmrg        ;;
44660c6340caSmrg      osf3* | osf4* | osf5*)
44670c6340caSmrg	case $cc_basename in
44680c6340caSmrg	  KCC*)
44690c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
44700c6340caSmrg	    ;;
44710c6340caSmrg	  RCC*)
44720c6340caSmrg	    # Rational C++ 2.4.1
44730c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
44740c6340caSmrg	    ;;
44750c6340caSmrg	  cxx*)
44760c6340caSmrg	    # Digital/Compaq C++
44770c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
44780c6340caSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
44790c6340caSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
44800c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
44810c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
44820c6340caSmrg	    ;;
44830c6340caSmrg	  *)
44840c6340caSmrg	    ;;
44850c6340caSmrg	esac
44860c6340caSmrg	;;
44870c6340caSmrg      psos*)
44880c6340caSmrg	;;
44890c6340caSmrg      solaris*)
44900c6340caSmrg	case $cc_basename in
44910c6340caSmrg	  CC* | sunCC*)
44920c6340caSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
44930c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
44940c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
44950c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
44960c6340caSmrg	    ;;
44970c6340caSmrg	  gcx*)
44980c6340caSmrg	    # Green Hills C++ Compiler
44990c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
45000c6340caSmrg	    ;;
45010c6340caSmrg	  *)
45020c6340caSmrg	    ;;
45030c6340caSmrg	esac
45040c6340caSmrg	;;
45050c6340caSmrg      sunos4*)
45060c6340caSmrg	case $cc_basename in
45070c6340caSmrg	  CC*)
45080c6340caSmrg	    # Sun C++ 4.x
45090c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
45100c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
45110c6340caSmrg	    ;;
45120c6340caSmrg	  lcc*)
45130c6340caSmrg	    # Lucid
45140c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
45150c6340caSmrg	    ;;
45160c6340caSmrg	  *)
45170c6340caSmrg	    ;;
45180c6340caSmrg	esac
45190c6340caSmrg	;;
45200c6340caSmrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
45210c6340caSmrg	case $cc_basename in
45220c6340caSmrg	  CC*)
45230c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
45240c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
45250c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
45260c6340caSmrg	    ;;
45270c6340caSmrg	esac
45280c6340caSmrg	;;
45290c6340caSmrg      tandem*)
45300c6340caSmrg	case $cc_basename in
45310c6340caSmrg	  NCC*)
45320c6340caSmrg	    # NonStop-UX NCC 3.20
45330c6340caSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
45340c6340caSmrg	    ;;
45350c6340caSmrg	  *)
45360c6340caSmrg	    ;;
45370c6340caSmrg	esac
45380c6340caSmrg	;;
45390c6340caSmrg      vxworks*)
45400c6340caSmrg	;;
45410c6340caSmrg      *)
45420c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
45430c6340caSmrg	;;
45440c6340caSmrg    esac
45450c6340caSmrg  fi
45460c6340caSmrg],
45470c6340caSmrg[
45480c6340caSmrg  if test yes = "$GCC"; then
45490c6340caSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
45500c6340caSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
45510c6340caSmrg
45520c6340caSmrg    case $host_os in
45530c6340caSmrg      aix*)
45540c6340caSmrg      # All AIX code is PIC.
45550c6340caSmrg      if test ia64 = "$host_cpu"; then
45560c6340caSmrg	# AIX 5 now supports IA64 processor
45570c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
45580c6340caSmrg      fi
45590c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
45600c6340caSmrg      ;;
45610c6340caSmrg
45620c6340caSmrg    amigaos*)
45630c6340caSmrg      case $host_cpu in
45640c6340caSmrg      powerpc)
45650c6340caSmrg            # see comment about AmigaOS4 .so support
45660c6340caSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
45670c6340caSmrg        ;;
45680c6340caSmrg      m68k)
45690c6340caSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
45700c6340caSmrg            # adding the '-m68020' flag to GCC prevents building anything better,
45710c6340caSmrg            # like '-m68040'.
45720c6340caSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
45730c6340caSmrg        ;;
45740c6340caSmrg      esac
45750c6340caSmrg      ;;
45760c6340caSmrg
45770c6340caSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
45780c6340caSmrg      # PIC is the default for these OSes.
45790c6340caSmrg      ;;
45800c6340caSmrg
45810c6340caSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
45820c6340caSmrg      # This hack is so that the source file can tell whether it is being
45830c6340caSmrg      # built for inclusion in a dll (and should export symbols for example).
45840c6340caSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
45850c6340caSmrg      # (--disable-auto-import) libraries
45860c6340caSmrg      m4_if([$1], [GCJ], [],
45870c6340caSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
45880c6340caSmrg      case $host_os in
45890c6340caSmrg      os2*)
45900c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
45910c6340caSmrg	;;
45920c6340caSmrg      esac
45930c6340caSmrg      ;;
45940c6340caSmrg
45950c6340caSmrg    darwin* | rhapsody*)
45960c6340caSmrg      # PIC is the default on this platform
45970c6340caSmrg      # Common symbols not allowed in MH_DYLIB files
45980c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
45990c6340caSmrg      ;;
46000c6340caSmrg
46010c6340caSmrg    haiku*)
46020c6340caSmrg      # PIC is the default for Haiku.
46030c6340caSmrg      # The "-static" flag exists, but is broken.
46040c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
46050c6340caSmrg      ;;
46060c6340caSmrg
46070c6340caSmrg    hpux*)
46080c6340caSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
46090c6340caSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
46100c6340caSmrg      # sets the default TLS model and affects inlining.
46110c6340caSmrg      case $host_cpu in
46120c6340caSmrg      hppa*64*)
46130c6340caSmrg	# +Z the default
46140c6340caSmrg	;;
46150c6340caSmrg      *)
46160c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
46170c6340caSmrg	;;
46180c6340caSmrg      esac
46190c6340caSmrg      ;;
46200c6340caSmrg
46210c6340caSmrg    interix[[3-9]]*)
46220c6340caSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
46230c6340caSmrg      # Instead, we relocate shared libraries at runtime.
46240c6340caSmrg      ;;
46250c6340caSmrg
46260c6340caSmrg    msdosdjgpp*)
46270c6340caSmrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
46280c6340caSmrg      # on systems that don't support them.
46290c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
46300c6340caSmrg      enable_shared=no
46310c6340caSmrg      ;;
46320c6340caSmrg
46330c6340caSmrg    *nto* | *qnx*)
46340c6340caSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
46350c6340caSmrg      # it will coredump.
46360c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
46370c6340caSmrg      ;;
46380c6340caSmrg
46390c6340caSmrg    sysv4*MP*)
46400c6340caSmrg      if test -d /usr/nec; then
46410c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
46420c6340caSmrg      fi
46430c6340caSmrg      ;;
46440c6340caSmrg
46450c6340caSmrg    *)
46460c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
46470c6340caSmrg      ;;
46480c6340caSmrg    esac
46490c6340caSmrg
46500c6340caSmrg    case $cc_basename in
46510c6340caSmrg    nvcc*) # Cuda Compiler Driver 2.2
46520c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
46530c6340caSmrg      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
46540c6340caSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
46550c6340caSmrg      fi
46560c6340caSmrg      ;;
46570c6340caSmrg    esac
46580c6340caSmrg  else
46590c6340caSmrg    # PORTME Check for flag to pass linker flags through the system compiler.
46600c6340caSmrg    case $host_os in
46610c6340caSmrg    aix*)
46620c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
46630c6340caSmrg      if test ia64 = "$host_cpu"; then
46640c6340caSmrg	# AIX 5 now supports IA64 processor
46650c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
46660c6340caSmrg      else
46670c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
46680c6340caSmrg      fi
46690c6340caSmrg      ;;
46700c6340caSmrg
46710c6340caSmrg    darwin* | rhapsody*)
46720c6340caSmrg      # PIC is the default on this platform
46730c6340caSmrg      # Common symbols not allowed in MH_DYLIB files
46740c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
46750c6340caSmrg      case $cc_basename in
46760c6340caSmrg      nagfor*)
46770c6340caSmrg        # NAG Fortran compiler
46780c6340caSmrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
46790c6340caSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
46800c6340caSmrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
46810c6340caSmrg        ;;
46820c6340caSmrg      esac
46830c6340caSmrg      ;;
46840c6340caSmrg
46850c6340caSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
46860c6340caSmrg      # This hack is so that the source file can tell whether it is being
46870c6340caSmrg      # built for inclusion in a dll (and should export symbols for example).
46880c6340caSmrg      m4_if([$1], [GCJ], [],
46890c6340caSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
46900c6340caSmrg      case $host_os in
46910c6340caSmrg      os2*)
46920c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
46930c6340caSmrg	;;
46940c6340caSmrg      esac
46950c6340caSmrg      ;;
46960c6340caSmrg
46970c6340caSmrg    hpux9* | hpux10* | hpux11*)
46980c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
46990c6340caSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
47000c6340caSmrg      # not for PA HP-UX.
47010c6340caSmrg      case $host_cpu in
47020c6340caSmrg      hppa*64*|ia64*)
47030c6340caSmrg	# +Z the default
47040c6340caSmrg	;;
47050c6340caSmrg      *)
47060c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
47070c6340caSmrg	;;
47080c6340caSmrg      esac
47090c6340caSmrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
47100c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
47110c6340caSmrg      ;;
47120c6340caSmrg
47130c6340caSmrg    irix5* | irix6* | nonstopux*)
47140c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47150c6340caSmrg      # PIC (with -KPIC) is the default.
47160c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
47170c6340caSmrg      ;;
47180c6340caSmrg
47190c6340caSmrg    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
47200c6340caSmrg      case $cc_basename in
47210c6340caSmrg      # old Intel for x86_64, which still supported -KPIC.
47220c6340caSmrg      ecc*)
47230c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47240c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
47250c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
47260c6340caSmrg        ;;
4727de301c82Smrg      # flang / f18. f95 an alias for gfortran or flang on Debian
4728de301c82Smrg      flang* | f18* | f95*)
4729de301c82Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4730de301c82Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4731de301c82Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4732de301c82Smrg        ;;
47330c6340caSmrg      # icc used to be incompatible with GCC.
47340c6340caSmrg      # ICC 10 doesn't accept -KPIC any more.
47350c6340caSmrg      icc* | ifort*)
47360c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47370c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
47380c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
47390c6340caSmrg        ;;
47400c6340caSmrg      # Lahey Fortran 8.1.
47410c6340caSmrg      lf95*)
47420c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47430c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
47440c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
47450c6340caSmrg	;;
47460c6340caSmrg      nagfor*)
47470c6340caSmrg	# NAG Fortran compiler
47480c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
47490c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
47500c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47510c6340caSmrg	;;
47520c6340caSmrg      tcc*)
47530c6340caSmrg	# Fabrice Bellard et al's Tiny C Compiler
47540c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47550c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
47560c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
47570c6340caSmrg	;;
47580c6340caSmrg      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
47590c6340caSmrg        # Portland Group compilers (*not* the Pentium gcc compiler,
47600c6340caSmrg	# which looks to be a dead project)
47610c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47620c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
47630c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47640c6340caSmrg        ;;
47650c6340caSmrg      ccc*)
47660c6340caSmrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47670c6340caSmrg        # All Alpha code is PIC.
47680c6340caSmrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
47690c6340caSmrg        ;;
47700c6340caSmrg      xl* | bgxl* | bgf* | mpixl*)
47710c6340caSmrg	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
47720c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47730c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
47740c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
47750c6340caSmrg	;;
47760c6340caSmrg      *)
47770c6340caSmrg	case `$CC -V 2>&1 | $SED 5q` in
47780c6340caSmrg	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
47790c6340caSmrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
47800c6340caSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
47810c6340caSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47820c6340caSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
47830c6340caSmrg	  ;;
47840c6340caSmrg	*Sun\ F* | *Sun*Fortran*)
47850c6340caSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
47860c6340caSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47870c6340caSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
47880c6340caSmrg	  ;;
47890c6340caSmrg	*Sun\ C*)
47900c6340caSmrg	  # Sun C 5.9
47910c6340caSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
47920c6340caSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47930c6340caSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47940c6340caSmrg	  ;;
47950c6340caSmrg        *Intel*\ [[CF]]*Compiler*)
47960c6340caSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47970c6340caSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
47980c6340caSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
47990c6340caSmrg	  ;;
48000c6340caSmrg	*Portland\ Group*)
48010c6340caSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
48020c6340caSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
48030c6340caSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48040c6340caSmrg	  ;;
48050c6340caSmrg	esac
48060c6340caSmrg	;;
48070c6340caSmrg      esac
48080c6340caSmrg      ;;
48090c6340caSmrg
48100c6340caSmrg    newsos6)
48110c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
48120c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48130c6340caSmrg      ;;
48140c6340caSmrg
48150c6340caSmrg    *nto* | *qnx*)
48160c6340caSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
48170c6340caSmrg      # it will coredump.
48180c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
48190c6340caSmrg      ;;
48200c6340caSmrg
48210c6340caSmrg    osf3* | osf4* | osf5*)
48220c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
48230c6340caSmrg      # All OSF/1 code is PIC.
48240c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
48250c6340caSmrg      ;;
48260c6340caSmrg
48270c6340caSmrg    rdos*)
48280c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
48290c6340caSmrg      ;;
48300c6340caSmrg
48310c6340caSmrg    solaris*)
48320c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
48330c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48340c6340caSmrg      case $cc_basename in
48350c6340caSmrg      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
48360c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
48370c6340caSmrg      *)
48380c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
48390c6340caSmrg      esac
48400c6340caSmrg      ;;
48410c6340caSmrg
48420c6340caSmrg    sunos4*)
48430c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
48440c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
48450c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48460c6340caSmrg      ;;
48470c6340caSmrg
48480c6340caSmrg    sysv4 | sysv4.2uw2* | sysv4.3*)
48490c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
48500c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
48510c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48520c6340caSmrg      ;;
48530c6340caSmrg
48540c6340caSmrg    sysv4*MP*)
48550c6340caSmrg      if test -d /usr/nec; then
48560c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
48570c6340caSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48580c6340caSmrg      fi
48590c6340caSmrg      ;;
48600c6340caSmrg
48610c6340caSmrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
48620c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
48630c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
48640c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48650c6340caSmrg      ;;
48660c6340caSmrg
48670c6340caSmrg    unicos*)
48680c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
48690c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
48700c6340caSmrg      ;;
48710c6340caSmrg
48720c6340caSmrg    uts4*)
48730c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
48740c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48750c6340caSmrg      ;;
48760c6340caSmrg
48770c6340caSmrg    *)
48780c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
48790c6340caSmrg      ;;
48800c6340caSmrg    esac
48810c6340caSmrg  fi
48820c6340caSmrg])
48830c6340caSmrgcase $host_os in
48840c6340caSmrg  # For platforms that do not support PIC, -DPIC is meaningless:
48850c6340caSmrg  *djgpp*)
48860c6340caSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
48870c6340caSmrg    ;;
48880c6340caSmrg  *)
48890c6340caSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
48900c6340caSmrg    ;;
48910c6340caSmrgesac
48920c6340caSmrg
48930c6340caSmrgAC_CACHE_CHECK([for $compiler option to produce PIC],
48940c6340caSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
48950c6340caSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
48960c6340caSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
48970c6340caSmrg
48980c6340caSmrg#
48990c6340caSmrg# Check to make sure the PIC flag actually works.
49000c6340caSmrg#
49010c6340caSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
49020c6340caSmrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
49030c6340caSmrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
49040c6340caSmrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
49050c6340caSmrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
49060c6340caSmrg     "" | " "*) ;;
49070c6340caSmrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
49080c6340caSmrg     esac],
49090c6340caSmrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
49100c6340caSmrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
49110c6340caSmrgfi
49120c6340caSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
49130c6340caSmrg	[Additional compiler flags for building library objects])
49140c6340caSmrg
49150c6340caSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
49160c6340caSmrg	[How to pass a linker flag through the compiler])
49170c6340caSmrg#
49180c6340caSmrg# Check to make sure the static flag actually works.
49190c6340caSmrg#
49200c6340caSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
49210c6340caSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
49220c6340caSmrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
49230c6340caSmrg  $lt_tmp_static_flag,
49240c6340caSmrg  [],
49250c6340caSmrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
49260c6340caSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
49270c6340caSmrg	[Compiler flag to prevent dynamic linking])
49280c6340caSmrg])# _LT_COMPILER_PIC
49290c6340caSmrg
49300c6340caSmrg
49310c6340caSmrg# _LT_LINKER_SHLIBS([TAGNAME])
49320c6340caSmrg# ----------------------------
49330c6340caSmrg# See if the linker supports building shared libraries.
49340c6340caSmrgm4_defun([_LT_LINKER_SHLIBS],
49350c6340caSmrg[AC_REQUIRE([LT_PATH_LD])dnl
49360c6340caSmrgAC_REQUIRE([LT_PATH_NM])dnl
49370c6340caSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
49380c6340caSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
49390c6340caSmrgm4_require([_LT_DECL_EGREP])dnl
49400c6340caSmrgm4_require([_LT_DECL_SED])dnl
49410c6340caSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
49420c6340caSmrgm4_require([_LT_TAG_COMPILER])dnl
49430c6340caSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
49440c6340caSmrgm4_if([$1], [CXX], [
49450c6340caSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
49460c6340caSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
49470c6340caSmrg  case $host_os in
49480c6340caSmrg  aix[[4-9]]*)
49490c6340caSmrg    # If we're using GNU nm, then we don't want the "-C" option.
49500c6340caSmrg    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
49510c6340caSmrg    # Without the "-l" option, or with the "-B" option, AIX nm treats
49520c6340caSmrg    # weak defined symbols like other global defined symbols, whereas
49530c6340caSmrg    # GNU nm marks them as "W".
49540c6340caSmrg    # While the 'weak' keyword is ignored in the Export File, we need
49550c6340caSmrg    # it in the Import File for the 'aix-soname' feature, so we have
49560c6340caSmrg    # to replace the "-B" option with "-P" for AIX nm.
49570c6340caSmrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
49580c6340caSmrg      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
49590c6340caSmrg    else
49600c6340caSmrg      _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
49610c6340caSmrg    fi
49620c6340caSmrg    ;;
49630c6340caSmrg  pw32*)
49640c6340caSmrg    _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
49650c6340caSmrg    ;;
49660c6340caSmrg  cygwin* | mingw* | cegcc*)
49670c6340caSmrg    case $cc_basename in
49680c6340caSmrg    cl* | icl*)
49690c6340caSmrg      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
49700c6340caSmrg      ;;
49710c6340caSmrg    *)
49720c6340caSmrg      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
49730c6340caSmrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
49740c6340caSmrg      ;;
49750c6340caSmrg    esac
49760c6340caSmrg    ;;
4977de301c82Smrg  linux* | k*bsd*-gnu | gnu*)
4978de301c82Smrg    _LT_TAGVAR(link_all_deplibs, $1)=no
4979de301c82Smrg    ;;
49800c6340caSmrg  *)
49810c6340caSmrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
49820c6340caSmrg    ;;
49830c6340caSmrg  esac
49840c6340caSmrg], [
49850c6340caSmrg  runpath_var=
49860c6340caSmrg  _LT_TAGVAR(allow_undefined_flag, $1)=
49870c6340caSmrg  _LT_TAGVAR(always_export_symbols, $1)=no
49880c6340caSmrg  _LT_TAGVAR(archive_cmds, $1)=
49890c6340caSmrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
49900c6340caSmrg  _LT_TAGVAR(compiler_needs_object, $1)=no
49910c6340caSmrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
49920c6340caSmrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
49930c6340caSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
49940c6340caSmrg  _LT_TAGVAR(hardcode_automatic, $1)=no
49950c6340caSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
49960c6340caSmrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
49970c6340caSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
49980c6340caSmrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
49990c6340caSmrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
50000c6340caSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
50010c6340caSmrg  _LT_TAGVAR(inherit_rpath, $1)=no
50020c6340caSmrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
50030c6340caSmrg  _LT_TAGVAR(module_cmds, $1)=
50040c6340caSmrg  _LT_TAGVAR(module_expsym_cmds, $1)=
50050c6340caSmrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
50060c6340caSmrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
50070c6340caSmrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
50080c6340caSmrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
50090c6340caSmrg  # include_expsyms should be a list of space-separated symbols to be *always*
50100c6340caSmrg  # included in the symbol list
50110c6340caSmrg  _LT_TAGVAR(include_expsyms, $1)=
50120c6340caSmrg  # exclude_expsyms can be an extended regexp of symbols to exclude
50130c6340caSmrg  # it will be wrapped by ' (' and ')$', so one must not match beginning or
50140c6340caSmrg  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
50150c6340caSmrg  # as well as any symbol that contains 'd'.
50160c6340caSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
50170c6340caSmrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
50180c6340caSmrg  # platforms (ab)use it in PIC code, but their linkers get confused if
50190c6340caSmrg  # the symbol is explicitly referenced.  Since portable code cannot
50200c6340caSmrg  # rely on this symbol name, it's probably fine to never include it in
50210c6340caSmrg  # preloaded symbol tables.
50220c6340caSmrg  # Exclude shared library initialization/finalization symbols.
50230c6340caSmrgdnl Note also adjust exclude_expsyms for C++ above.
50240c6340caSmrg  extract_expsyms_cmds=
50250c6340caSmrg
50260c6340caSmrg  case $host_os in
50270c6340caSmrg  cygwin* | mingw* | pw32* | cegcc*)
50280c6340caSmrg    # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
50290c6340caSmrg    # When not using gcc, we currently assume that we are using
50300c6340caSmrg    # Microsoft Visual C++ or Intel C++ Compiler.
50310c6340caSmrg    if test yes != "$GCC"; then
50320c6340caSmrg      with_gnu_ld=no
50330c6340caSmrg    fi
50340c6340caSmrg    ;;
50350c6340caSmrg  interix*)
50360c6340caSmrg    # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
50370c6340caSmrg    with_gnu_ld=yes
50380c6340caSmrg    ;;
50390c6340caSmrg  openbsd* | bitrig*)
50400c6340caSmrg    with_gnu_ld=no
50410c6340caSmrg    ;;
5042de301c82Smrg  linux* | k*bsd*-gnu | gnu*)
5043de301c82Smrg    _LT_TAGVAR(link_all_deplibs, $1)=no
5044de301c82Smrg    ;;
50450c6340caSmrg  esac
50460c6340caSmrg
50470c6340caSmrg  _LT_TAGVAR(ld_shlibs, $1)=yes
50480c6340caSmrg
50490c6340caSmrg  # On some targets, GNU ld is compatible enough with the native linker
50500c6340caSmrg  # that we're better off using the native interface for both.
50510c6340caSmrg  lt_use_gnu_ld_interface=no
50520c6340caSmrg  if test yes = "$with_gnu_ld"; then
50530c6340caSmrg    case $host_os in
50540c6340caSmrg      aix*)
50550c6340caSmrg	# The AIX port of GNU ld has always aspired to compatibility
50560c6340caSmrg	# with the native linker.  However, as the warning in the GNU ld
50570c6340caSmrg	# block says, versions before 2.19.5* couldn't really create working
50580c6340caSmrg	# shared libraries, regardless of the interface used.
50590c6340caSmrg	case `$LD -v 2>&1` in
50600c6340caSmrg	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
50610c6340caSmrg	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
50620c6340caSmrg	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
50630c6340caSmrg	  *)
50640c6340caSmrg	    lt_use_gnu_ld_interface=yes
50650c6340caSmrg	    ;;
50660c6340caSmrg	esac
50670c6340caSmrg	;;
50680c6340caSmrg      *)
50690c6340caSmrg	lt_use_gnu_ld_interface=yes
50700c6340caSmrg	;;
50710c6340caSmrg    esac
50720c6340caSmrg  fi
50730c6340caSmrg
50740c6340caSmrg  if test yes = "$lt_use_gnu_ld_interface"; then
50750c6340caSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
50760c6340caSmrg    wlarc='$wl'
50770c6340caSmrg
50780c6340caSmrg    # Set some defaults for GNU ld with shared library support. These
50790c6340caSmrg    # are reset later if shared libraries are not supported. Putting them
50800c6340caSmrg    # here allows them to be overridden if necessary.
50810c6340caSmrg    runpath_var=LD_RUN_PATH
50820c6340caSmrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
50830c6340caSmrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
50840c6340caSmrg    # ancient GNU ld didn't support --whole-archive et. al.
50850c6340caSmrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
50860c6340caSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
50870c6340caSmrg    else
50880c6340caSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
50890c6340caSmrg    fi
50900c6340caSmrg    supports_anon_versioning=no
50910c6340caSmrg    case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in
50920c6340caSmrg      *GNU\ gold*) supports_anon_versioning=yes ;;
50930c6340caSmrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
50940c6340caSmrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
50950c6340caSmrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
50960c6340caSmrg      *\ 2.11.*) ;; # other 2.11 versions
50970c6340caSmrg      *) supports_anon_versioning=yes ;;
50980c6340caSmrg    esac
50990c6340caSmrg
51000c6340caSmrg    # See if GNU ld supports shared libraries.
51010c6340caSmrg    case $host_os in
51020c6340caSmrg    aix[[3-9]]*)
51030c6340caSmrg      # On AIX/PPC, the GNU linker is very broken
51040c6340caSmrg      if test ia64 != "$host_cpu"; then
51050c6340caSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
51060c6340caSmrg	cat <<_LT_EOF 1>&2
51070c6340caSmrg
51080c6340caSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported
51090c6340caSmrg*** to be unable to reliably create shared libraries on AIX.
51100c6340caSmrg*** Therefore, libtool is disabling shared libraries support.  If you
51110c6340caSmrg*** really care for shared libraries, you may want to install binutils
51120c6340caSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
51130c6340caSmrg*** You will then need to restart the configuration process.
51140c6340caSmrg
51150c6340caSmrg_LT_EOF
51160c6340caSmrg      fi
51170c6340caSmrg      ;;
51180c6340caSmrg
51190c6340caSmrg    amigaos*)
51200c6340caSmrg      case $host_cpu in
51210c6340caSmrg      powerpc)
51220c6340caSmrg            # see comment about AmigaOS4 .so support
51230c6340caSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
51240c6340caSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
51250c6340caSmrg        ;;
51260c6340caSmrg      m68k)
51270c6340caSmrg            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
51280c6340caSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
51290c6340caSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
51300c6340caSmrg        ;;
51310c6340caSmrg      esac
51320c6340caSmrg      ;;
51330c6340caSmrg
51340c6340caSmrg    beos*)
51350c6340caSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
51360c6340caSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
51370c6340caSmrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
51380c6340caSmrg	# support --undefined.  This deserves some investigation.  FIXME
51390c6340caSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
51400c6340caSmrg      else
51410c6340caSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
51420c6340caSmrg      fi
51430c6340caSmrg      ;;
51440c6340caSmrg
51450c6340caSmrg    cygwin* | mingw* | pw32* | cegcc*)
51460c6340caSmrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
51470c6340caSmrg      # as there is no search path for DLLs.
51480c6340caSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
51490c6340caSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
51500c6340caSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
51510c6340caSmrg      _LT_TAGVAR(always_export_symbols, $1)=no
51520c6340caSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
51530c6340caSmrg      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
51540c6340caSmrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
51550c6340caSmrg
51560c6340caSmrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
51570c6340caSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
51580c6340caSmrg	# If the export-symbols file already is a .def file, use it as
51590c6340caSmrg	# is; otherwise, prepend EXPORTS...
51600c6340caSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
51610c6340caSmrg          cp $export_symbols $output_objdir/$soname.def;
51620c6340caSmrg        else
51630c6340caSmrg          echo EXPORTS > $output_objdir/$soname.def;
51640c6340caSmrg          cat $export_symbols >> $output_objdir/$soname.def;
51650c6340caSmrg        fi~
51660c6340caSmrg        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
51670c6340caSmrg      else
51680c6340caSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
51690c6340caSmrg      fi
51700c6340caSmrg      ;;
51710c6340caSmrg
51720c6340caSmrg    haiku*)
51730c6340caSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
51740c6340caSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
51750c6340caSmrg      ;;
51760c6340caSmrg
51770c6340caSmrg    os2*)
51780c6340caSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
51790c6340caSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
51800c6340caSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
51810c6340caSmrg      shrext_cmds=.dll
51820c6340caSmrg      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
51830c6340caSmrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
51840c6340caSmrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
51850c6340caSmrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
51860c6340caSmrg	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
51870c6340caSmrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
51880c6340caSmrg	emximp -o $lib $output_objdir/$libname.def'
51890c6340caSmrg      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
51900c6340caSmrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
51910c6340caSmrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
51920c6340caSmrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
51930c6340caSmrg	prefix_cmds="$SED"~
51940c6340caSmrg	if test EXPORTS = "`$SED 1q $export_symbols`"; then
51950c6340caSmrg	  prefix_cmds="$prefix_cmds -e 1d";
51960c6340caSmrg	fi~
51970c6340caSmrg	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
51980c6340caSmrg	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
51990c6340caSmrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
52000c6340caSmrg	emximp -o $lib $output_objdir/$libname.def'
52010c6340caSmrg      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
52020c6340caSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
52030c6340caSmrg      _LT_TAGVAR(file_list_spec, $1)='@'
52040c6340caSmrg      ;;
52050c6340caSmrg
52060c6340caSmrg    interix[[3-9]]*)
52070c6340caSmrg      _LT_TAGVAR(hardcode_direct, $1)=no
52080c6340caSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
52090c6340caSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
52100c6340caSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
52110c6340caSmrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
52120c6340caSmrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
52130c6340caSmrg      # default) and relocated if they conflict, which is a slow very memory
52140c6340caSmrg      # consuming and fragmenting process.  To avoid this, we pick a random,
52150c6340caSmrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
52160c6340caSmrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
52170c6340caSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
52180c6340caSmrg      _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
52190c6340caSmrg      ;;
52200c6340caSmrg
52210c6340caSmrg    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
52220c6340caSmrg      tmp_diet=no
52230c6340caSmrg      if test linux-dietlibc = "$host_os"; then
52240c6340caSmrg	case $cc_basename in
52250c6340caSmrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
52260c6340caSmrg	esac
52270c6340caSmrg      fi
52280c6340caSmrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
52290c6340caSmrg	 && test no = "$tmp_diet"
52300c6340caSmrg      then
52310c6340caSmrg	tmp_addflag=' $pic_flag'
52320c6340caSmrg	tmp_sharedflag='-shared'
52330c6340caSmrg	case $cc_basename,$host_cpu in
52340c6340caSmrg        pgcc*)				# Portland Group C compiler
52350c6340caSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
52360c6340caSmrg	  tmp_addflag=' $pic_flag'
52370c6340caSmrg	  ;;
52380c6340caSmrg	pgf77* | pgf90* | pgf95* | pgfortran*)
52390c6340caSmrg					# Portland Group f77 and f90 compilers
52400c6340caSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
52410c6340caSmrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
52420c6340caSmrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
52430c6340caSmrg	  tmp_addflag=' -i_dynamic' ;;
52440c6340caSmrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
52450c6340caSmrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
52460c6340caSmrg	ifc* | ifort*)			# Intel Fortran compiler
52470c6340caSmrg	  tmp_addflag=' -nofor_main' ;;
52480c6340caSmrg	lf95*)				# Lahey Fortran 8.1
52490c6340caSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
52500c6340caSmrg	  tmp_sharedflag='--shared' ;;
52510c6340caSmrg        nagfor*)                        # NAGFOR 5.3
52520c6340caSmrg          tmp_sharedflag='-Wl,-shared' ;;
52530c6340caSmrg	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
52540c6340caSmrg	  tmp_sharedflag='-qmkshrobj'
52550c6340caSmrg	  tmp_addflag= ;;
52560c6340caSmrg	nvcc*)	# Cuda Compiler Driver 2.2
52570c6340caSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
52580c6340caSmrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
52590c6340caSmrg	  ;;
52600c6340caSmrg	esac
52610c6340caSmrg	case `$CC -V 2>&1 | $SED 5q` in
52620c6340caSmrg	*Sun\ C*)			# Sun C 5.9
52630c6340caSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
52640c6340caSmrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
52650c6340caSmrg	  tmp_sharedflag='-G' ;;
52660c6340caSmrg	*Sun\ F*)			# Sun Fortran 8.3
52670c6340caSmrg	  tmp_sharedflag='-G' ;;
52680c6340caSmrg	esac
52690c6340caSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
52700c6340caSmrg
52710c6340caSmrg        if test yes = "$supports_anon_versioning"; then
52720c6340caSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
52730c6340caSmrg            cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
52740c6340caSmrg            echo "local: *; };" >> $output_objdir/$libname.ver~
52750c6340caSmrg            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
52760c6340caSmrg        fi
52770c6340caSmrg
52780c6340caSmrg	case $cc_basename in
52790c6340caSmrg	tcc*)
5280de301c82Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
52810c6340caSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
52820c6340caSmrg	  ;;
52830c6340caSmrg	xlf* | bgf* | bgxlf* | mpixlf*)
52840c6340caSmrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
52850c6340caSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
52860c6340caSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
52870c6340caSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
52880c6340caSmrg	  if test yes = "$supports_anon_versioning"; then
52890c6340caSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
52900c6340caSmrg              cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
52910c6340caSmrg              echo "local: *; };" >> $output_objdir/$libname.ver~
52920c6340caSmrg              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
52930c6340caSmrg	  fi
52940c6340caSmrg	  ;;
52950c6340caSmrg	esac
52960c6340caSmrg      else
52970c6340caSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
52980c6340caSmrg      fi
52990c6340caSmrg      ;;
53000c6340caSmrg
5301de301c82Smrg    netbsd* | netbsdelf*-gnu)
53020c6340caSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
53030c6340caSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
53040c6340caSmrg	wlarc=
53050c6340caSmrg      else
53060c6340caSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
53070c6340caSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
53080c6340caSmrg      fi
53090c6340caSmrg      ;;
53100c6340caSmrg
53110c6340caSmrg    solaris*)
53120c6340caSmrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
53130c6340caSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
53140c6340caSmrg	cat <<_LT_EOF 1>&2
53150c6340caSmrg
53160c6340caSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
53170c6340caSmrg*** create shared libraries on Solaris systems.  Therefore, libtool
53180c6340caSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
53190c6340caSmrg*** binutils to release 2.9.1 or newer.  Another option is to modify
53200c6340caSmrg*** your PATH or compiler configuration so that the native linker is
53210c6340caSmrg*** used, and then restart.
53220c6340caSmrg
53230c6340caSmrg_LT_EOF
53240c6340caSmrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
53250c6340caSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
53260c6340caSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
53270c6340caSmrg      else
53280c6340caSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
53290c6340caSmrg      fi
53300c6340caSmrg      ;;
53310c6340caSmrg
53320c6340caSmrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
53330c6340caSmrg      case `$LD -v 2>&1` in
53340c6340caSmrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
53350c6340caSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
53360c6340caSmrg	cat <<_LT_EOF 1>&2
53370c6340caSmrg
53380c6340caSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
53390c6340caSmrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
53400c6340caSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
53410c6340caSmrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
53420c6340caSmrg*** your PATH or compiler configuration so that the native linker is
53430c6340caSmrg*** used, and then restart.
53440c6340caSmrg
53450c6340caSmrg_LT_EOF
53460c6340caSmrg	;;
53470c6340caSmrg	*)
53480c6340caSmrg	  # For security reasons, it is highly recommended that you always
53490c6340caSmrg	  # use absolute paths for naming shared libraries, and exclude the
53500c6340caSmrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
53510c6340caSmrg	  # requires that you compile everything twice, which is a pain.
53520c6340caSmrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
53530c6340caSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
53540c6340caSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
53550c6340caSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
53560c6340caSmrg	  else
53570c6340caSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
53580c6340caSmrg	  fi
53590c6340caSmrg	;;
53600c6340caSmrg      esac
53610c6340caSmrg      ;;
53620c6340caSmrg
53630c6340caSmrg    sunos4*)
53640c6340caSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
53650c6340caSmrg      wlarc=
53660c6340caSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
53670c6340caSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
53680c6340caSmrg      ;;
53690c6340caSmrg
53700c6340caSmrg    *)
53710c6340caSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
53720c6340caSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
53730c6340caSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
53740c6340caSmrg      else
53750c6340caSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
53760c6340caSmrg      fi
53770c6340caSmrg      ;;
53780c6340caSmrg    esac
53790c6340caSmrg
53800c6340caSmrg    if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
53810c6340caSmrg      runpath_var=
53820c6340caSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
53830c6340caSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
53840c6340caSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
53850c6340caSmrg    fi
53860c6340caSmrg  else
53870c6340caSmrg    # PORTME fill in a description of your system's linker (not GNU ld)
53880c6340caSmrg    case $host_os in
53890c6340caSmrg    aix3*)
53900c6340caSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
53910c6340caSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
53920c6340caSmrg      _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
53930c6340caSmrg      # Note: this linker hardcodes the directories in LIBPATH if there
53940c6340caSmrg      # are no directories specified by -L.
53950c6340caSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
53960c6340caSmrg      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
53970c6340caSmrg	# Neither direct hardcoding nor static linking is supported with a
53980c6340caSmrg	# broken collect2.
53990c6340caSmrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
54000c6340caSmrg      fi
54010c6340caSmrg      ;;
54020c6340caSmrg
54030c6340caSmrg    aix[[4-9]]*)
54040c6340caSmrg      if test ia64 = "$host_cpu"; then
54050c6340caSmrg	# On IA64, the linker does run time linking by default, so we don't
54060c6340caSmrg	# have to do anything special.
54070c6340caSmrg	aix_use_runtimelinking=no
54080c6340caSmrg	exp_sym_flag='-Bexport'
54090c6340caSmrg	no_entry_flag=
54100c6340caSmrg      else
54110c6340caSmrg	# If we're using GNU nm, then we don't want the "-C" option.
54120c6340caSmrg	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
54130c6340caSmrg	# Without the "-l" option, or with the "-B" option, AIX nm treats
54140c6340caSmrg	# weak defined symbols like other global defined symbols, whereas
54150c6340caSmrg	# GNU nm marks them as "W".
54160c6340caSmrg	# While the 'weak' keyword is ignored in the Export File, we need
54170c6340caSmrg	# it in the Import File for the 'aix-soname' feature, so we have
54180c6340caSmrg	# to replace the "-B" option with "-P" for AIX nm.
54190c6340caSmrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
54200c6340caSmrg	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
54210c6340caSmrg	else
54220c6340caSmrg	  _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
54230c6340caSmrg	fi
54240c6340caSmrg	aix_use_runtimelinking=no
54250c6340caSmrg
54260c6340caSmrg	# Test if we are trying to use run time linking or normal
54270c6340caSmrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
54280c6340caSmrg	# have runtime linking enabled, and use it for executables.
54290c6340caSmrg	# For shared libraries, we enable/disable runtime linking
54300c6340caSmrg	# depending on the kind of the shared library created -
54310c6340caSmrg	# when "with_aix_soname,aix_use_runtimelinking" is:
54320c6340caSmrg	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
54330c6340caSmrg	# "aix,yes"  lib.so          shared, rtl:yes, for executables
54340c6340caSmrg	#            lib.a           static archive
54350c6340caSmrg	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
54360c6340caSmrg	#            lib.a(lib.so.V) shared, rtl:no,  for executables
54370c6340caSmrg	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
54380c6340caSmrg	#            lib.a(lib.so.V) shared, rtl:no
54390c6340caSmrg	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
54400c6340caSmrg	#            lib.a           static archive
54410c6340caSmrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
54420c6340caSmrg	  for ld_flag in $LDFLAGS; do
54430c6340caSmrg	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
54440c6340caSmrg	    aix_use_runtimelinking=yes
54450c6340caSmrg	    break
54460c6340caSmrg	  fi
54470c6340caSmrg	  done
54480c6340caSmrg	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
54490c6340caSmrg	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
54500c6340caSmrg	    # so we don't have lib.a shared libs to link our executables.
54510c6340caSmrg	    # We have to force runtime linking in this case.
54520c6340caSmrg	    aix_use_runtimelinking=yes
54530c6340caSmrg	    LDFLAGS="$LDFLAGS -Wl,-brtl"
54540c6340caSmrg	  fi
54550c6340caSmrg	  ;;
54560c6340caSmrg	esac
54570c6340caSmrg
54580c6340caSmrg	exp_sym_flag='-bexport'
54590c6340caSmrg	no_entry_flag='-bnoentry'
54600c6340caSmrg      fi
54610c6340caSmrg
54620c6340caSmrg      # When large executables or shared objects are built, AIX ld can
54630c6340caSmrg      # have problems creating the table of contents.  If linking a library
54640c6340caSmrg      # or program results in "error TOC overflow" add -mminimal-toc to
54650c6340caSmrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
54660c6340caSmrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
54670c6340caSmrg
54680c6340caSmrg      _LT_TAGVAR(archive_cmds, $1)=''
54690c6340caSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
54700c6340caSmrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
54710c6340caSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
54720c6340caSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
54730c6340caSmrg      _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
54740c6340caSmrg      case $with_aix_soname,$aix_use_runtimelinking in
54750c6340caSmrg      aix,*) ;; # traditional, no import file
54760c6340caSmrg      svr4,* | *,yes) # use import file
54770c6340caSmrg	# The Import File defines what to hardcode.
54780c6340caSmrg	_LT_TAGVAR(hardcode_direct, $1)=no
54790c6340caSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=no
54800c6340caSmrg	;;
54810c6340caSmrg      esac
54820c6340caSmrg
54830c6340caSmrg      if test yes = "$GCC"; then
54840c6340caSmrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
54850c6340caSmrg	# We only want to do this on AIX 4.2 and lower, the check
54860c6340caSmrg	# below for broken collect2 doesn't work under 4.3+
54870c6340caSmrg	  collect2name=`$CC -print-prog-name=collect2`
54880c6340caSmrg	  if test -f "$collect2name" &&
54890c6340caSmrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
54900c6340caSmrg	  then
54910c6340caSmrg	  # We have reworked collect2
54920c6340caSmrg	  :
54930c6340caSmrg	  else
54940c6340caSmrg	  # We have old collect2
54950c6340caSmrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
54960c6340caSmrg	  # It fails to find uninstalled libraries when the uninstalled
54970c6340caSmrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
54980c6340caSmrg	  # to unsupported forces relinking
54990c6340caSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
55000c6340caSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
55010c6340caSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
55020c6340caSmrg	  fi
55030c6340caSmrg	  ;;
55040c6340caSmrg	esac
55050c6340caSmrg	shared_flag='-shared'
55060c6340caSmrg	if test yes = "$aix_use_runtimelinking"; then
55070c6340caSmrg	  shared_flag="$shared_flag "'$wl-G'
55080c6340caSmrg	fi
55090c6340caSmrg	# Need to ensure runtime linking is disabled for the traditional
55100c6340caSmrg	# shared library, or the linker may eventually find shared libraries
55110c6340caSmrg	# /with/ Import File - we do not want to mix them.
55120c6340caSmrg	shared_flag_aix='-shared'
55130c6340caSmrg	shared_flag_svr4='-shared $wl-G'
55140c6340caSmrg      else
55150c6340caSmrg	# not using gcc
55160c6340caSmrg	if test ia64 = "$host_cpu"; then
55170c6340caSmrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
55180c6340caSmrg	# chokes on -Wl,-G. The following line is correct:
55190c6340caSmrg	  shared_flag='-G'
55200c6340caSmrg	else
55210c6340caSmrg	  if test yes = "$aix_use_runtimelinking"; then
55220c6340caSmrg	    shared_flag='$wl-G'
55230c6340caSmrg	  else
55240c6340caSmrg	    shared_flag='$wl-bM:SRE'
55250c6340caSmrg	  fi
55260c6340caSmrg	  shared_flag_aix='$wl-bM:SRE'
55270c6340caSmrg	  shared_flag_svr4='$wl-G'
55280c6340caSmrg	fi
55290c6340caSmrg      fi
55300c6340caSmrg
55310c6340caSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
55320c6340caSmrg      # It seems that -bexpall does not export symbols beginning with
55330c6340caSmrg      # underscore (_), so it is better to generate a list of symbols to export.
55340c6340caSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
55350c6340caSmrg      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
55360c6340caSmrg	# Warning - without using the other runtime loading flags (-brtl),
55370c6340caSmrg	# -berok will link without error, but may produce a broken library.
55380c6340caSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
55390c6340caSmrg        # Determine the default libpath from the value encoded in an
55400c6340caSmrg        # empty executable.
55410c6340caSmrg        _LT_SYS_MODULE_PATH_AIX([$1])
55420c6340caSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
55430c6340caSmrg        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
55440c6340caSmrg      else
55450c6340caSmrg	if test ia64 = "$host_cpu"; then
55460c6340caSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
55470c6340caSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
55480c6340caSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
55490c6340caSmrg	else
55500c6340caSmrg	 # Determine the default libpath from the value encoded in an
55510c6340caSmrg	 # empty executable.
55520c6340caSmrg	 _LT_SYS_MODULE_PATH_AIX([$1])
55530c6340caSmrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
55540c6340caSmrg	  # Warning - without using the other run time loading flags,
55550c6340caSmrg	  # -berok will link without error, but may produce a broken library.
55560c6340caSmrg	  _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
55570c6340caSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
55580c6340caSmrg	  if test yes = "$with_gnu_ld"; then
55590c6340caSmrg	    # We only use this code for GNU lds that support --whole-archive.
55600c6340caSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
55610c6340caSmrg	  else
55620c6340caSmrg	    # Exported symbols can be pulled into shared objects from archives
55630c6340caSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
55640c6340caSmrg	  fi
55650c6340caSmrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
55660c6340caSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
55670c6340caSmrg	  # -brtl affects multiple linker settings, -berok does not and is overridden later
55680c6340caSmrg	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
55690c6340caSmrg	  if test svr4 != "$with_aix_soname"; then
55700c6340caSmrg	    # This is similar to how AIX traditionally builds its shared libraries.
55710c6340caSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
55720c6340caSmrg	  fi
55730c6340caSmrg	  if test aix != "$with_aix_soname"; then
55740c6340caSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
55750c6340caSmrg	  else
55760c6340caSmrg	    # used by -dlpreopen to get the symbols
55770c6340caSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
55780c6340caSmrg	  fi
55790c6340caSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
55800c6340caSmrg	fi
55810c6340caSmrg      fi
55820c6340caSmrg      ;;
55830c6340caSmrg
55840c6340caSmrg    amigaos*)
55850c6340caSmrg      case $host_cpu in
55860c6340caSmrg      powerpc)
55870c6340caSmrg            # see comment about AmigaOS4 .so support
55880c6340caSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
55890c6340caSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
55900c6340caSmrg        ;;
55910c6340caSmrg      m68k)
55920c6340caSmrg            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
55930c6340caSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
55940c6340caSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
55950c6340caSmrg        ;;
55960c6340caSmrg      esac
55970c6340caSmrg      ;;
55980c6340caSmrg
55990c6340caSmrg    bsdi[[45]]*)
56000c6340caSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
56010c6340caSmrg      ;;
56020c6340caSmrg
56030c6340caSmrg    cygwin* | mingw* | pw32* | cegcc*)
56040c6340caSmrg      # When not using gcc, we currently assume that we are using
56050c6340caSmrg      # Microsoft Visual C++ or Intel C++ Compiler.
56060c6340caSmrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
56070c6340caSmrg      # no search path for DLLs.
56080c6340caSmrg      case $cc_basename in
56090c6340caSmrg      cl* | icl*)
56100c6340caSmrg	# Native MSVC or ICC
56110c6340caSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
56120c6340caSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
56130c6340caSmrg	_LT_TAGVAR(always_export_symbols, $1)=yes
56140c6340caSmrg	_LT_TAGVAR(file_list_spec, $1)='@'
56150c6340caSmrg	# Tell ltmain to make .lib files, not .a files.
56160c6340caSmrg	libext=lib
56170c6340caSmrg	# Tell ltmain to make .dll files, not .so files.
56180c6340caSmrg	shrext_cmds=.dll
56190c6340caSmrg	# FIXME: Setting linknames here is a bad hack.
56200c6340caSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
56210c6340caSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
56220c6340caSmrg            cp "$export_symbols" "$output_objdir/$soname.def";
56230c6340caSmrg            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
56240c6340caSmrg          else
56250c6340caSmrg            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
56260c6340caSmrg          fi~
56270c6340caSmrg          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
56280c6340caSmrg          linknames='
56290c6340caSmrg	# The linker will not automatically build a static lib if we build a DLL.
56300c6340caSmrg	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
56310c6340caSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
56320c6340caSmrg	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
56330c6340caSmrg	_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
56340c6340caSmrg	# Don't use ranlib
56350c6340caSmrg	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
56360c6340caSmrg	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
56370c6340caSmrg          lt_tool_outputfile="@TOOL_OUTPUT@"~
56380c6340caSmrg          case $lt_outputfile in
56390c6340caSmrg            *.exe|*.EXE) ;;
56400c6340caSmrg            *)
56410c6340caSmrg              lt_outputfile=$lt_outputfile.exe
56420c6340caSmrg              lt_tool_outputfile=$lt_tool_outputfile.exe
56430c6340caSmrg              ;;
56440c6340caSmrg          esac~
56450c6340caSmrg          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
56460c6340caSmrg            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
56470c6340caSmrg            $RM "$lt_outputfile.manifest";
56480c6340caSmrg          fi'
56490c6340caSmrg	;;
56500c6340caSmrg      *)
56510c6340caSmrg	# Assume MSVC and ICC wrapper
56520c6340caSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
56530c6340caSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
56540c6340caSmrg	# Tell ltmain to make .lib files, not .a files.
56550c6340caSmrg	libext=lib
56560c6340caSmrg	# Tell ltmain to make .dll files, not .so files.
56570c6340caSmrg	shrext_cmds=.dll
56580c6340caSmrg	# FIXME: Setting linknames here is a bad hack.
56590c6340caSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
56600c6340caSmrg	# The linker will automatically build a .lib file if we build a DLL.
56610c6340caSmrg	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
56620c6340caSmrg	# FIXME: Should let the user specify the lib program.
56630c6340caSmrg	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
56640c6340caSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
56650c6340caSmrg	;;
56660c6340caSmrg      esac
56670c6340caSmrg      ;;
56680c6340caSmrg
56690c6340caSmrg    darwin* | rhapsody*)
56700c6340caSmrg      _LT_DARWIN_LINKER_FEATURES($1)
56710c6340caSmrg      ;;
56720c6340caSmrg
56730c6340caSmrg    dgux*)
56740c6340caSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
56750c6340caSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
56760c6340caSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
56770c6340caSmrg      ;;
56780c6340caSmrg
56790c6340caSmrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
56800c6340caSmrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
56810c6340caSmrg    # does not break anything, and helps significantly (at the cost of a little
56820c6340caSmrg    # extra space).
56830c6340caSmrg    freebsd2.2*)
56840c6340caSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
56850c6340caSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
56860c6340caSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
56870c6340caSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
56880c6340caSmrg      ;;
56890c6340caSmrg
56900c6340caSmrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
56910c6340caSmrg    freebsd2.*)
56920c6340caSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
56930c6340caSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
56940c6340caSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
56950c6340caSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
56960c6340caSmrg      ;;
56970c6340caSmrg
56980c6340caSmrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
56990c6340caSmrg    freebsd* | dragonfly* | midnightbsd*)
57000c6340caSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
57010c6340caSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
57020c6340caSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
57030c6340caSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
57040c6340caSmrg      ;;
57050c6340caSmrg
57060c6340caSmrg    hpux9*)
57070c6340caSmrg      if test yes = "$GCC"; then
57080c6340caSmrg	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
57090c6340caSmrg      else
57100c6340caSmrg	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
57110c6340caSmrg      fi
57120c6340caSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
57130c6340caSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
57140c6340caSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
57150c6340caSmrg
57160c6340caSmrg      # hardcode_minus_L: Not really in the search PATH,
57170c6340caSmrg      # but as the default location of the library.
57180c6340caSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
57190c6340caSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
57200c6340caSmrg      ;;
57210c6340caSmrg
57220c6340caSmrg    hpux10*)
57230c6340caSmrg      if test yes,no = "$GCC,$with_gnu_ld"; then
57240c6340caSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
57250c6340caSmrg      else
57260c6340caSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
57270c6340caSmrg      fi
57280c6340caSmrg      if test no = "$with_gnu_ld"; then
57290c6340caSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
57300c6340caSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
57310c6340caSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
57320c6340caSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
57330c6340caSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
57340c6340caSmrg	# hardcode_minus_L: Not really in the search PATH,
57350c6340caSmrg	# but as the default location of the library.
57360c6340caSmrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
57370c6340caSmrg      fi
57380c6340caSmrg      ;;
57390c6340caSmrg
57400c6340caSmrg    hpux11*)
57410c6340caSmrg      if test yes,no = "$GCC,$with_gnu_ld"; then
57420c6340caSmrg	case $host_cpu in
57430c6340caSmrg	hppa*64*)
57440c6340caSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
57450c6340caSmrg	  ;;
57460c6340caSmrg	ia64*)
57470c6340caSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
57480c6340caSmrg	  ;;
57490c6340caSmrg	*)
57500c6340caSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
57510c6340caSmrg	  ;;
57520c6340caSmrg	esac
57530c6340caSmrg      else
57540c6340caSmrg	case $host_cpu in
57550c6340caSmrg	hppa*64*)
57560c6340caSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
57570c6340caSmrg	  ;;
57580c6340caSmrg	ia64*)
57590c6340caSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
57600c6340caSmrg	  ;;
57610c6340caSmrg	*)
57620c6340caSmrg	m4_if($1, [], [
57630c6340caSmrg	  # Older versions of the 11.00 compiler do not understand -b yet
57640c6340caSmrg	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
57650c6340caSmrg	  _LT_LINKER_OPTION([if $CC understands -b],
57660c6340caSmrg	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
57670c6340caSmrg	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
57680c6340caSmrg	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
57690c6340caSmrg	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
57700c6340caSmrg	  ;;
57710c6340caSmrg	esac
57720c6340caSmrg      fi
57730c6340caSmrg      if test no = "$with_gnu_ld"; then
57740c6340caSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
57750c6340caSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
57760c6340caSmrg
57770c6340caSmrg	case $host_cpu in
57780c6340caSmrg	hppa*64*|ia64*)
57790c6340caSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
57800c6340caSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
57810c6340caSmrg	  ;;
57820c6340caSmrg	*)
57830c6340caSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
57840c6340caSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
57850c6340caSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
57860c6340caSmrg
57870c6340caSmrg	  # hardcode_minus_L: Not really in the search PATH,
57880c6340caSmrg	  # but as the default location of the library.
57890c6340caSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
57900c6340caSmrg	  ;;
57910c6340caSmrg	esac
57920c6340caSmrg      fi
57930c6340caSmrg      ;;
57940c6340caSmrg
57950c6340caSmrg    irix5* | irix6* | nonstopux*)
57960c6340caSmrg      if test yes = "$GCC"; then
57970c6340caSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
57980c6340caSmrg	# Try to use the -exported_symbol ld option, if it does not
57990c6340caSmrg	# work, assume that -exports_file does not work either and
58000c6340caSmrg	# implicitly export all symbols.
58010c6340caSmrg	# This should be the same for all languages, so no per-tag cache variable.
58020c6340caSmrg	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
58030c6340caSmrg	  [lt_cv_irix_exported_symbol],
58040c6340caSmrg	  [save_LDFLAGS=$LDFLAGS
58050c6340caSmrg	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
58060c6340caSmrg	   AC_LINK_IFELSE(
58070c6340caSmrg	     [AC_LANG_SOURCE(
58080c6340caSmrg	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
58090c6340caSmrg			      [C++], [[int foo (void) { return 0; }]],
58100c6340caSmrg			      [Fortran 77], [[
58110c6340caSmrg      subroutine foo
58120c6340caSmrg      end]],
58130c6340caSmrg			      [Fortran], [[
58140c6340caSmrg      subroutine foo
58150c6340caSmrg      end]])])],
58160c6340caSmrg	      [lt_cv_irix_exported_symbol=yes],
58170c6340caSmrg	      [lt_cv_irix_exported_symbol=no])
58180c6340caSmrg           LDFLAGS=$save_LDFLAGS])
58190c6340caSmrg	if test yes = "$lt_cv_irix_exported_symbol"; then
58200c6340caSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
58210c6340caSmrg	fi
5822de301c82Smrg	_LT_TAGVAR(link_all_deplibs, $1)=no
58230c6340caSmrg      else
58240c6340caSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
58250c6340caSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
58260c6340caSmrg      fi
58270c6340caSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
58280c6340caSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
58290c6340caSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
58300c6340caSmrg      _LT_TAGVAR(inherit_rpath, $1)=yes
58310c6340caSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
58320c6340caSmrg      ;;
58330c6340caSmrg
58340c6340caSmrg    linux*)
58350c6340caSmrg      case $cc_basename in
58360c6340caSmrg      tcc*)
58370c6340caSmrg	# Fabrice Bellard et al's Tiny C Compiler
58380c6340caSmrg	_LT_TAGVAR(ld_shlibs, $1)=yes
58390c6340caSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5840de301c82Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
58410c6340caSmrg	;;
58420c6340caSmrg      esac
58430c6340caSmrg      ;;
58440c6340caSmrg
5845de301c82Smrg    netbsd* | netbsdelf*-gnu)
58460c6340caSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
58470c6340caSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
58480c6340caSmrg      else
58490c6340caSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
58500c6340caSmrg      fi
58510c6340caSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
58520c6340caSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
58530c6340caSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
58540c6340caSmrg      ;;
58550c6340caSmrg
58560c6340caSmrg    newsos6)
58570c6340caSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
58580c6340caSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
58590c6340caSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
58600c6340caSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
58610c6340caSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
58620c6340caSmrg      ;;
58630c6340caSmrg
58640c6340caSmrg    *nto* | *qnx*)
58650c6340caSmrg      ;;
58660c6340caSmrg
58670c6340caSmrg    openbsd* | bitrig*)
58680c6340caSmrg      if test -f /usr/libexec/ld.so; then
58690c6340caSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
58700c6340caSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
58710c6340caSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
58720c6340caSmrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
58730c6340caSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
58740c6340caSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
58750c6340caSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
58760c6340caSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
58770c6340caSmrg	else
58780c6340caSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
58790c6340caSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
58800c6340caSmrg	fi
58810c6340caSmrg      else
58820c6340caSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
58830c6340caSmrg      fi
58840c6340caSmrg      ;;
58850c6340caSmrg
58860c6340caSmrg    os2*)
58870c6340caSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
58880c6340caSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
58890c6340caSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
58900c6340caSmrg      shrext_cmds=.dll
58910c6340caSmrg      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
58920c6340caSmrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
58930c6340caSmrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
58940c6340caSmrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
58950c6340caSmrg	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
58960c6340caSmrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
58970c6340caSmrg	emximp -o $lib $output_objdir/$libname.def'
58980c6340caSmrg      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
58990c6340caSmrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
59000c6340caSmrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
59010c6340caSmrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
59020c6340caSmrg	prefix_cmds="$SED"~
59030c6340caSmrg	if test EXPORTS = "`$SED 1q $export_symbols`"; then
59040c6340caSmrg	  prefix_cmds="$prefix_cmds -e 1d";
59050c6340caSmrg	fi~
59060c6340caSmrg	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
59070c6340caSmrg	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
59080c6340caSmrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
59090c6340caSmrg	emximp -o $lib $output_objdir/$libname.def'
59100c6340caSmrg      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
59110c6340caSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
59120c6340caSmrg      _LT_TAGVAR(file_list_spec, $1)='@'
59130c6340caSmrg      ;;
59140c6340caSmrg
59150c6340caSmrg    osf3*)
59160c6340caSmrg      if test yes = "$GCC"; then
59170c6340caSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
59180c6340caSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
59190c6340caSmrg      else
59200c6340caSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
59210c6340caSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
59220c6340caSmrg      fi
59230c6340caSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
59240c6340caSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
59250c6340caSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
59260c6340caSmrg      ;;
59270c6340caSmrg
59280c6340caSmrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
59290c6340caSmrg      if test yes = "$GCC"; then
59300c6340caSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
59310c6340caSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
59320c6340caSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
59330c6340caSmrg      else
59340c6340caSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
59350c6340caSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
59360c6340caSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
59370c6340caSmrg          $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
59380c6340caSmrg
59390c6340caSmrg	# Both c and cxx compiler support -rpath directly
59400c6340caSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
59410c6340caSmrg      fi
59420c6340caSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
59430c6340caSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
59440c6340caSmrg      ;;
59450c6340caSmrg
59460c6340caSmrg    solaris*)
59470c6340caSmrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
59480c6340caSmrg      if test yes = "$GCC"; then
59490c6340caSmrg	wlarc='$wl'
59500c6340caSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
59510c6340caSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
59520c6340caSmrg          $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
59530c6340caSmrg      else
59540c6340caSmrg	case `$CC -V 2>&1` in
59550c6340caSmrg	*"Compilers 5.0"*)
59560c6340caSmrg	  wlarc=''
59570c6340caSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
59580c6340caSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
59590c6340caSmrg            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
59600c6340caSmrg	  ;;
59610c6340caSmrg	*)
59620c6340caSmrg	  wlarc='$wl'
59630c6340caSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
59640c6340caSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
59650c6340caSmrg            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
59660c6340caSmrg	  ;;
59670c6340caSmrg	esac
59680c6340caSmrg      fi
59690c6340caSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
59700c6340caSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
59710c6340caSmrg      case $host_os in
59720c6340caSmrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
59730c6340caSmrg      *)
59740c6340caSmrg	# The compiler driver will combine and reorder linker options,
59750c6340caSmrg	# but understands '-z linker_flag'.  GCC discards it without '$wl',
59760c6340caSmrg	# but is careful enough not to reorder.
59770c6340caSmrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
59780c6340caSmrg	if test yes = "$GCC"; then
59790c6340caSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
59800c6340caSmrg	else
59810c6340caSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
59820c6340caSmrg	fi
59830c6340caSmrg	;;
59840c6340caSmrg      esac
59850c6340caSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
59860c6340caSmrg      ;;
59870c6340caSmrg
59880c6340caSmrg    sunos4*)
59890c6340caSmrg      if test sequent = "$host_vendor"; then
59900c6340caSmrg	# Use $CC to link under sequent, because it throws in some extra .o
59910c6340caSmrg	# files that make .init and .fini sections work.
59920c6340caSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
59930c6340caSmrg      else
59940c6340caSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
59950c6340caSmrg      fi
59960c6340caSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
59970c6340caSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
59980c6340caSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
59990c6340caSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60000c6340caSmrg      ;;
60010c6340caSmrg
60020c6340caSmrg    sysv4)
60030c6340caSmrg      case $host_vendor in
60040c6340caSmrg	sni)
60050c6340caSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
60060c6340caSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
60070c6340caSmrg	;;
60080c6340caSmrg	siemens)
60090c6340caSmrg	  ## LD is ld it makes a PLAMLIB
60100c6340caSmrg	  ## CC just makes a GrossModule.
60110c6340caSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
60120c6340caSmrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
60130c6340caSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
60140c6340caSmrg        ;;
60150c6340caSmrg	motorola)
60160c6340caSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
60170c6340caSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
60180c6340caSmrg	;;
60190c6340caSmrg      esac
60200c6340caSmrg      runpath_var='LD_RUN_PATH'
60210c6340caSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60220c6340caSmrg      ;;
60230c6340caSmrg
60240c6340caSmrg    sysv4.3*)
60250c6340caSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
60260c6340caSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60270c6340caSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
60280c6340caSmrg      ;;
60290c6340caSmrg
60300c6340caSmrg    sysv4*MP*)
60310c6340caSmrg      if test -d /usr/nec; then
60320c6340caSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
60330c6340caSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60340c6340caSmrg	runpath_var=LD_RUN_PATH
60350c6340caSmrg	hardcode_runpath_var=yes
60360c6340caSmrg	_LT_TAGVAR(ld_shlibs, $1)=yes
60370c6340caSmrg      fi
60380c6340caSmrg      ;;
60390c6340caSmrg
60400c6340caSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
60410c6340caSmrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
60420c6340caSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
60430c6340caSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60440c6340caSmrg      runpath_var='LD_RUN_PATH'
60450c6340caSmrg
60460c6340caSmrg      if test yes = "$GCC"; then
60470c6340caSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60480c6340caSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60490c6340caSmrg      else
60500c6340caSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60510c6340caSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60520c6340caSmrg      fi
60530c6340caSmrg      ;;
60540c6340caSmrg
60550c6340caSmrg    sysv5* | sco3.2v5* | sco5v6*)
60560c6340caSmrg      # Note: We CANNOT use -z defs as we might desire, because we do not
60570c6340caSmrg      # link with -lc, and that would cause any symbols used from libc to
60580c6340caSmrg      # always be unresolved, which means just about no library would
60590c6340caSmrg      # ever link correctly.  If we're not using GNU ld we use -z text
60600c6340caSmrg      # though, which does catch some bad symbols but isn't as heavy-handed
60610c6340caSmrg      # as -z defs.
60620c6340caSmrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
60630c6340caSmrg      _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
60640c6340caSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
60650c6340caSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60660c6340caSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
60670c6340caSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
60680c6340caSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
60690c6340caSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
60700c6340caSmrg      runpath_var='LD_RUN_PATH'
60710c6340caSmrg
60720c6340caSmrg      if test yes = "$GCC"; then
60730c6340caSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60740c6340caSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60750c6340caSmrg      else
60760c6340caSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60770c6340caSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60780c6340caSmrg      fi
60790c6340caSmrg      ;;
60800c6340caSmrg
60810c6340caSmrg    uts4*)
60820c6340caSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
60830c6340caSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
60840c6340caSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60850c6340caSmrg      ;;
60860c6340caSmrg
60870c6340caSmrg    *)
60880c6340caSmrg      _LT_TAGVAR(ld_shlibs, $1)=no
60890c6340caSmrg      ;;
60900c6340caSmrg    esac
60910c6340caSmrg
60920c6340caSmrg    if test sni = "$host_vendor"; then
60930c6340caSmrg      case $host in
60940c6340caSmrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
60950c6340caSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
60960c6340caSmrg	;;
60970c6340caSmrg      esac
60980c6340caSmrg    fi
60990c6340caSmrg  fi
61000c6340caSmrg])
61010c6340caSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
61020c6340caSmrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
61030c6340caSmrg
61040c6340caSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
61050c6340caSmrg
61060c6340caSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
61070c6340caSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
61080c6340caSmrg_LT_DECL([], [extract_expsyms_cmds], [2],
61090c6340caSmrg    [The commands to extract the exported symbol list from a shared archive])
61100c6340caSmrg
61110c6340caSmrg#
61120c6340caSmrg# Do we need to explicitly link libc?
61130c6340caSmrg#
61140c6340caSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
61150c6340caSmrgx|xyes)
61160c6340caSmrg  # Assume -lc should be added
61170c6340caSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
61180c6340caSmrg
61190c6340caSmrg  if test yes,yes = "$GCC,$enable_shared"; then
61200c6340caSmrg    case $_LT_TAGVAR(archive_cmds, $1) in
61210c6340caSmrg    *'~'*)
61220c6340caSmrg      # FIXME: we may have to deal with multi-command sequences.
61230c6340caSmrg      ;;
61240c6340caSmrg    '$CC '*)
61250c6340caSmrg      # Test whether the compiler implicitly links with -lc since on some
61260c6340caSmrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
61270c6340caSmrg      # to ld, don't add -lc before -lgcc.
61280c6340caSmrg      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
61290c6340caSmrg	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
61300c6340caSmrg	[$RM conftest*
61310c6340caSmrg	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
61320c6340caSmrg
61330c6340caSmrg	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
61340c6340caSmrg	  soname=conftest
61350c6340caSmrg	  lib=conftest
61360c6340caSmrg	  libobjs=conftest.$ac_objext
61370c6340caSmrg	  deplibs=
61380c6340caSmrg	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
61390c6340caSmrg	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
61400c6340caSmrg	  compiler_flags=-v
61410c6340caSmrg	  linker_flags=-v
61420c6340caSmrg	  verstring=
61430c6340caSmrg	  output_objdir=.
61440c6340caSmrg	  libname=conftest
61450c6340caSmrg	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
61460c6340caSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=
61470c6340caSmrg	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
61480c6340caSmrg	  then
61490c6340caSmrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
61500c6340caSmrg	  else
61510c6340caSmrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
61520c6340caSmrg	  fi
61530c6340caSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
61540c6340caSmrg	else
61550c6340caSmrg	  cat conftest.err 1>&5
61560c6340caSmrg	fi
61570c6340caSmrg	$RM conftest*
61580c6340caSmrg	])
61590c6340caSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
61600c6340caSmrg      ;;
61610c6340caSmrg    esac
61620c6340caSmrg  fi
61630c6340caSmrg  ;;
61640c6340caSmrgesac
61650c6340caSmrg
61660c6340caSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
61670c6340caSmrg    [Whether or not to add -lc for building shared libraries])
61680c6340caSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
61690c6340caSmrg    [enable_shared_with_static_runtimes], [0],
61700c6340caSmrg    [Whether or not to disallow shared libs when runtime libs are static])
61710c6340caSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
61720c6340caSmrg    [Compiler flag to allow reflexive dlopens])
61730c6340caSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
61740c6340caSmrg    [Compiler flag to generate shared objects directly from archives])
61750c6340caSmrg_LT_TAGDECL([], [compiler_needs_object], [1],
61760c6340caSmrg    [Whether the compiler copes with passing no objects directly])
61770c6340caSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
61780c6340caSmrg    [Create an old-style archive from a shared archive])
61790c6340caSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
61800c6340caSmrg    [Create a temporary old-style archive to link instead of a shared archive])
61810c6340caSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
61820c6340caSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
61830c6340caSmrg_LT_TAGDECL([], [module_cmds], [2],
61840c6340caSmrg    [Commands used to build a loadable module if different from building
61850c6340caSmrg    a shared archive.])
61860c6340caSmrg_LT_TAGDECL([], [module_expsym_cmds], [2])
61870c6340caSmrg_LT_TAGDECL([], [with_gnu_ld], [1],
61880c6340caSmrg    [Whether we are building with GNU ld or not])
61890c6340caSmrg_LT_TAGDECL([], [allow_undefined_flag], [1],
61900c6340caSmrg    [Flag that allows shared libraries with undefined symbols to be built])
61910c6340caSmrg_LT_TAGDECL([], [no_undefined_flag], [1],
61920c6340caSmrg    [Flag that enforces no undefined symbols])
61930c6340caSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
61940c6340caSmrg    [Flag to hardcode $libdir into a binary during linking.
61950c6340caSmrg    This must work even if $libdir does not exist])
61960c6340caSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
61970c6340caSmrg    [Whether we need a single "-rpath" flag with a separated argument])
61980c6340caSmrg_LT_TAGDECL([], [hardcode_direct], [0],
61990c6340caSmrg    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
62000c6340caSmrg    DIR into the resulting binary])
62010c6340caSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
62020c6340caSmrg    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
62030c6340caSmrg    DIR into the resulting binary and the resulting library dependency is
62040c6340caSmrg    "absolute", i.e impossible to change by setting $shlibpath_var if the
62050c6340caSmrg    library is relocated])
62060c6340caSmrg_LT_TAGDECL([], [hardcode_minus_L], [0],
62070c6340caSmrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
62080c6340caSmrg    into the resulting binary])
62090c6340caSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
62100c6340caSmrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
62110c6340caSmrg    into the resulting binary])
62120c6340caSmrg_LT_TAGDECL([], [hardcode_automatic], [0],
62130c6340caSmrg    [Set to "yes" if building a shared library automatically hardcodes DIR
62140c6340caSmrg    into the library and all subsequent libraries and executables linked
62150c6340caSmrg    against it])
62160c6340caSmrg_LT_TAGDECL([], [inherit_rpath], [0],
62170c6340caSmrg    [Set to yes if linker adds runtime paths of dependent libraries
62180c6340caSmrg    to runtime path list])
62190c6340caSmrg_LT_TAGDECL([], [link_all_deplibs], [0],
62200c6340caSmrg    [Whether libtool must link a program against all its dependency libraries])
62210c6340caSmrg_LT_TAGDECL([], [always_export_symbols], [0],
62220c6340caSmrg    [Set to "yes" if exported symbols are required])
62230c6340caSmrg_LT_TAGDECL([], [export_symbols_cmds], [2],
62240c6340caSmrg    [The commands to list exported symbols])
62250c6340caSmrg_LT_TAGDECL([], [exclude_expsyms], [1],
62260c6340caSmrg    [Symbols that should not be listed in the preloaded symbols])
62270c6340caSmrg_LT_TAGDECL([], [include_expsyms], [1],
62280c6340caSmrg    [Symbols that must always be exported])
62290c6340caSmrg_LT_TAGDECL([], [prelink_cmds], [2],
62300c6340caSmrg    [Commands necessary for linking programs (against libraries) with templates])
62310c6340caSmrg_LT_TAGDECL([], [postlink_cmds], [2],
62320c6340caSmrg    [Commands necessary for finishing linking programs])
62330c6340caSmrg_LT_TAGDECL([], [file_list_spec], [1],
62340c6340caSmrg    [Specify filename containing input files])
62350c6340caSmrgdnl FIXME: Not yet implemented
62360c6340caSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
62370c6340caSmrgdnl    [Compiler flag to generate thread safe objects])
62380c6340caSmrg])# _LT_LINKER_SHLIBS
62390c6340caSmrg
62400c6340caSmrg
62410c6340caSmrg# _LT_LANG_C_CONFIG([TAG])
62420c6340caSmrg# ------------------------
62430c6340caSmrg# Ensure that the configuration variables for a C compiler are suitably
62440c6340caSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
62450c6340caSmrg# the compiler configuration to 'libtool'.
62460c6340caSmrgm4_defun([_LT_LANG_C_CONFIG],
62470c6340caSmrg[m4_require([_LT_DECL_EGREP])dnl
62480c6340caSmrglt_save_CC=$CC
62490c6340caSmrgAC_LANG_PUSH(C)
62500c6340caSmrg
62510c6340caSmrg# Source file extension for C test sources.
62520c6340caSmrgac_ext=c
62530c6340caSmrg
62540c6340caSmrg# Object file extension for compiled C test sources.
62550c6340caSmrgobjext=o
62560c6340caSmrg_LT_TAGVAR(objext, $1)=$objext
62570c6340caSmrg
62580c6340caSmrg# Code to be used in simple compile tests
62590c6340caSmrglt_simple_compile_test_code="int some_variable = 0;"
62600c6340caSmrg
62610c6340caSmrg# Code to be used in simple link tests
62620c6340caSmrglt_simple_link_test_code='int main(){return(0);}'
62630c6340caSmrg
62640c6340caSmrg_LT_TAG_COMPILER
62650c6340caSmrg# Save the default compiler, since it gets overwritten when the other
62660c6340caSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
62670c6340caSmrgcompiler_DEFAULT=$CC
62680c6340caSmrg
62690c6340caSmrg# save warnings/boilerplate of simple test code
62700c6340caSmrg_LT_COMPILER_BOILERPLATE
62710c6340caSmrg_LT_LINKER_BOILERPLATE
62720c6340caSmrg
62730c6340caSmrg## CAVEAT EMPTOR:
62740c6340caSmrg## There is no encapsulation within the following macros, do not change
62750c6340caSmrg## the running order or otherwise move them around unless you know exactly
62760c6340caSmrg## what you are doing...
62770c6340caSmrgif test -n "$compiler"; then
62780c6340caSmrg  _LT_COMPILER_NO_RTTI($1)
62790c6340caSmrg  _LT_COMPILER_PIC($1)
62800c6340caSmrg  _LT_COMPILER_C_O($1)
62810c6340caSmrg  _LT_COMPILER_FILE_LOCKS($1)
62820c6340caSmrg  _LT_LINKER_SHLIBS($1)
62830c6340caSmrg  _LT_SYS_DYNAMIC_LINKER($1)
62840c6340caSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
62850c6340caSmrg  LT_SYS_DLOPEN_SELF
62860c6340caSmrg  _LT_CMD_STRIPLIB
62870c6340caSmrg
62880c6340caSmrg  # Report what library types will actually be built
62890c6340caSmrg  AC_MSG_CHECKING([if libtool supports shared libraries])
62900c6340caSmrg  AC_MSG_RESULT([$can_build_shared])
62910c6340caSmrg
62920c6340caSmrg  AC_MSG_CHECKING([whether to build shared libraries])
62930c6340caSmrg  test no = "$can_build_shared" && enable_shared=no
62940c6340caSmrg
62950c6340caSmrg  # On AIX, shared libraries and static libraries use the same namespace, and
62960c6340caSmrg  # are all built from PIC.
62970c6340caSmrg  case $host_os in
62980c6340caSmrg  aix3*)
62990c6340caSmrg    test yes = "$enable_shared" && enable_static=no
63000c6340caSmrg    if test -n "$RANLIB"; then
63010c6340caSmrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
63020c6340caSmrg      postinstall_cmds='$RANLIB $lib'
63030c6340caSmrg    fi
63040c6340caSmrg    ;;
63050c6340caSmrg
63060c6340caSmrg  aix[[4-9]]*)
63070c6340caSmrg    if test ia64 != "$host_cpu"; then
63080c6340caSmrg      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
63090c6340caSmrg      yes,aix,yes) ;;			# shared object as lib.so file only
63100c6340caSmrg      yes,svr4,*) ;;			# shared object as lib.so archive member only
63110c6340caSmrg      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
63120c6340caSmrg      esac
63130c6340caSmrg    fi
63140c6340caSmrg    ;;
63150c6340caSmrg  esac
63160c6340caSmrg  AC_MSG_RESULT([$enable_shared])
63170c6340caSmrg
63180c6340caSmrg  AC_MSG_CHECKING([whether to build static libraries])
63190c6340caSmrg  # Make sure either enable_shared or enable_static is yes.
63200c6340caSmrg  test yes = "$enable_shared" || enable_static=yes
63210c6340caSmrg  AC_MSG_RESULT([$enable_static])
63220c6340caSmrg
63230c6340caSmrg  _LT_CONFIG($1)
63240c6340caSmrgfi
63250c6340caSmrgAC_LANG_POP
63260c6340caSmrgCC=$lt_save_CC
63270c6340caSmrg])# _LT_LANG_C_CONFIG
63280c6340caSmrg
63290c6340caSmrg
63300c6340caSmrg# _LT_LANG_CXX_CONFIG([TAG])
63310c6340caSmrg# --------------------------
63320c6340caSmrg# Ensure that the configuration variables for a C++ compiler are suitably
63330c6340caSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
63340c6340caSmrg# the compiler configuration to 'libtool'.
63350c6340caSmrgm4_defun([_LT_LANG_CXX_CONFIG],
63360c6340caSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
63370c6340caSmrgm4_require([_LT_DECL_EGREP])dnl
63380c6340caSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
63390c6340caSmrgif test -n "$CXX" && ( test no != "$CXX" &&
63400c6340caSmrg    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
63410c6340caSmrg    (test g++ != "$CXX"))); then
63420c6340caSmrg  AC_PROG_CXXCPP
63430c6340caSmrgelse
63440c6340caSmrg  _lt_caught_CXX_error=yes
63450c6340caSmrgfi
63460c6340caSmrg
63470c6340caSmrgAC_LANG_PUSH(C++)
63480c6340caSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
63490c6340caSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
63500c6340caSmrg_LT_TAGVAR(always_export_symbols, $1)=no
63510c6340caSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
63520c6340caSmrg_LT_TAGVAR(compiler_needs_object, $1)=no
63530c6340caSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
63540c6340caSmrg_LT_TAGVAR(hardcode_direct, $1)=no
63550c6340caSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
63560c6340caSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
63570c6340caSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
63580c6340caSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
63590c6340caSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
63600c6340caSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
63610c6340caSmrg_LT_TAGVAR(inherit_rpath, $1)=no
63620c6340caSmrg_LT_TAGVAR(module_cmds, $1)=
63630c6340caSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
63640c6340caSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
63650c6340caSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
63660c6340caSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
63670c6340caSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
63680c6340caSmrg_LT_TAGVAR(no_undefined_flag, $1)=
63690c6340caSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
63700c6340caSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
63710c6340caSmrg
63720c6340caSmrg# Source file extension for C++ test sources.
63730c6340caSmrgac_ext=cpp
63740c6340caSmrg
63750c6340caSmrg# Object file extension for compiled C++ test sources.
63760c6340caSmrgobjext=o
63770c6340caSmrg_LT_TAGVAR(objext, $1)=$objext
63780c6340caSmrg
63790c6340caSmrg# No sense in running all these tests if we already determined that
63800c6340caSmrg# the CXX compiler isn't working.  Some variables (like enable_shared)
63810c6340caSmrg# are currently assumed to apply to all compilers on this platform,
63820c6340caSmrg# and will be corrupted by setting them based on a non-working compiler.
63830c6340caSmrgif test yes != "$_lt_caught_CXX_error"; then
63840c6340caSmrg  # Code to be used in simple compile tests
63850c6340caSmrg  lt_simple_compile_test_code="int some_variable = 0;"
63860c6340caSmrg
63870c6340caSmrg  # Code to be used in simple link tests
63880c6340caSmrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
63890c6340caSmrg
63900c6340caSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
63910c6340caSmrg  _LT_TAG_COMPILER
63920c6340caSmrg
63930c6340caSmrg  # save warnings/boilerplate of simple test code
63940c6340caSmrg  _LT_COMPILER_BOILERPLATE
63950c6340caSmrg  _LT_LINKER_BOILERPLATE
63960c6340caSmrg
63970c6340caSmrg  # Allow CC to be a program name with arguments.
63980c6340caSmrg  lt_save_CC=$CC
63990c6340caSmrg  lt_save_CFLAGS=$CFLAGS
64000c6340caSmrg  lt_save_LD=$LD
64010c6340caSmrg  lt_save_GCC=$GCC
64020c6340caSmrg  GCC=$GXX
64030c6340caSmrg  lt_save_with_gnu_ld=$with_gnu_ld
64040c6340caSmrg  lt_save_path_LD=$lt_cv_path_LD
64050c6340caSmrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
64060c6340caSmrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
64070c6340caSmrg  else
64080c6340caSmrg    $as_unset lt_cv_prog_gnu_ld
64090c6340caSmrg  fi
64100c6340caSmrg  if test -n "${lt_cv_path_LDCXX+set}"; then
64110c6340caSmrg    lt_cv_path_LD=$lt_cv_path_LDCXX
64120c6340caSmrg  else
64130c6340caSmrg    $as_unset lt_cv_path_LD
64140c6340caSmrg  fi
64150c6340caSmrg  test -z "${LDCXX+set}" || LD=$LDCXX
64160c6340caSmrg  CC=${CXX-"c++"}
64170c6340caSmrg  CFLAGS=$CXXFLAGS
64180c6340caSmrg  compiler=$CC
64190c6340caSmrg  _LT_TAGVAR(compiler, $1)=$CC
64200c6340caSmrg  _LT_CC_BASENAME([$compiler])
64210c6340caSmrg
64220c6340caSmrg  if test -n "$compiler"; then
64230c6340caSmrg    # We don't want -fno-exception when compiling C++ code, so set the
64240c6340caSmrg    # no_builtin_flag separately
64250c6340caSmrg    if test yes = "$GXX"; then
64260c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
64270c6340caSmrg    else
64280c6340caSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
64290c6340caSmrg    fi
64300c6340caSmrg
64310c6340caSmrg    if test yes = "$GXX"; then
64320c6340caSmrg      # Set up default GNU C++ configuration
64330c6340caSmrg
64340c6340caSmrg      LT_PATH_LD
64350c6340caSmrg
64360c6340caSmrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
64370c6340caSmrg      # archiving commands below assume that GNU ld is being used.
64380c6340caSmrg      if test yes = "$with_gnu_ld"; then
64390c6340caSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
64400c6340caSmrg        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
64410c6340caSmrg
64420c6340caSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
64430c6340caSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
64440c6340caSmrg
64450c6340caSmrg        # If archive_cmds runs LD, not CC, wlarc should be empty
64460c6340caSmrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
64470c6340caSmrg        #     investigate it a little bit more. (MM)
64480c6340caSmrg        wlarc='$wl'
64490c6340caSmrg
64500c6340caSmrg        # ancient GNU ld didn't support --whole-archive et. al.
64510c6340caSmrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
64520c6340caSmrg	  $GREP 'no-whole-archive' > /dev/null; then
64530c6340caSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
64540c6340caSmrg        else
64550c6340caSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
64560c6340caSmrg        fi
64570c6340caSmrg      else
64580c6340caSmrg        with_gnu_ld=no
64590c6340caSmrg        wlarc=
64600c6340caSmrg
64610c6340caSmrg        # A generic and very simple default shared library creation
64620c6340caSmrg        # command for GNU C++ for the case where it uses the native
64630c6340caSmrg        # linker, instead of GNU ld.  If possible, this setting should
64640c6340caSmrg        # overridden to take advantage of the native linker features on
64650c6340caSmrg        # the platform it is being used on.
64660c6340caSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
64670c6340caSmrg      fi
64680c6340caSmrg
64690c6340caSmrg      # Commands to make compiler produce verbose output that lists
64700c6340caSmrg      # what "hidden" libraries, object files and flags are used when
64710c6340caSmrg      # linking a shared library.
6472de301c82Smrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
64730c6340caSmrg
64740c6340caSmrg    else
64750c6340caSmrg      GXX=no
64760c6340caSmrg      with_gnu_ld=no
64770c6340caSmrg      wlarc=
64780c6340caSmrg    fi
64790c6340caSmrg
64800c6340caSmrg    # PORTME: fill in a description of your system's C++ link characteristics
64810c6340caSmrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
64820c6340caSmrg    _LT_TAGVAR(ld_shlibs, $1)=yes
64830c6340caSmrg    case $host_os in
64840c6340caSmrg      aix3*)
64850c6340caSmrg        # FIXME: insert proper C++ library support
64860c6340caSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
64870c6340caSmrg        ;;
64880c6340caSmrg      aix[[4-9]]*)
64890c6340caSmrg        if test ia64 = "$host_cpu"; then
64900c6340caSmrg          # On IA64, the linker does run time linking by default, so we don't
64910c6340caSmrg          # have to do anything special.
64920c6340caSmrg          aix_use_runtimelinking=no
64930c6340caSmrg          exp_sym_flag='-Bexport'
64940c6340caSmrg          no_entry_flag=
64950c6340caSmrg        else
64960c6340caSmrg          aix_use_runtimelinking=no
64970c6340caSmrg
64980c6340caSmrg          # Test if we are trying to use run time linking or normal
64990c6340caSmrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
65000c6340caSmrg          # have runtime linking enabled, and use it for executables.
65010c6340caSmrg          # For shared libraries, we enable/disable runtime linking
65020c6340caSmrg          # depending on the kind of the shared library created -
65030c6340caSmrg          # when "with_aix_soname,aix_use_runtimelinking" is:
65040c6340caSmrg          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
65050c6340caSmrg          # "aix,yes"  lib.so          shared, rtl:yes, for executables
65060c6340caSmrg          #            lib.a           static archive
65070c6340caSmrg          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
65080c6340caSmrg          #            lib.a(lib.so.V) shared, rtl:no,  for executables
65090c6340caSmrg          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
65100c6340caSmrg          #            lib.a(lib.so.V) shared, rtl:no
65110c6340caSmrg          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
65120c6340caSmrg          #            lib.a           static archive
65130c6340caSmrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
65140c6340caSmrg	    for ld_flag in $LDFLAGS; do
65150c6340caSmrg	      case $ld_flag in
65160c6340caSmrg	      *-brtl*)
65170c6340caSmrg	        aix_use_runtimelinking=yes
65180c6340caSmrg	        break
65190c6340caSmrg	        ;;
65200c6340caSmrg	      esac
65210c6340caSmrg	    done
65220c6340caSmrg	    if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
65230c6340caSmrg	      # With aix-soname=svr4, we create the lib.so.V shared archives only,
65240c6340caSmrg	      # so we don't have lib.a shared libs to link our executables.
65250c6340caSmrg	      # We have to force runtime linking in this case.
65260c6340caSmrg	      aix_use_runtimelinking=yes
65270c6340caSmrg	      LDFLAGS="$LDFLAGS -Wl,-brtl"
65280c6340caSmrg	    fi
65290c6340caSmrg	    ;;
65300c6340caSmrg          esac
65310c6340caSmrg
65320c6340caSmrg          exp_sym_flag='-bexport'
65330c6340caSmrg          no_entry_flag='-bnoentry'
65340c6340caSmrg        fi
65350c6340caSmrg
65360c6340caSmrg        # When large executables or shared objects are built, AIX ld can
65370c6340caSmrg        # have problems creating the table of contents.  If linking a library
65380c6340caSmrg        # or program results in "error TOC overflow" add -mminimal-toc to
65390c6340caSmrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
65400c6340caSmrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
65410c6340caSmrg
65420c6340caSmrg        _LT_TAGVAR(archive_cmds, $1)=''
65430c6340caSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
65440c6340caSmrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
65450c6340caSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
65460c6340caSmrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
65470c6340caSmrg        _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
65480c6340caSmrg        case $with_aix_soname,$aix_use_runtimelinking in
65490c6340caSmrg        aix,*) ;;	# no import file
65500c6340caSmrg        svr4,* | *,yes) # use import file
65510c6340caSmrg          # The Import File defines what to hardcode.
65520c6340caSmrg          _LT_TAGVAR(hardcode_direct, $1)=no
65530c6340caSmrg          _LT_TAGVAR(hardcode_direct_absolute, $1)=no
65540c6340caSmrg          ;;
65550c6340caSmrg        esac
65560c6340caSmrg
65570c6340caSmrg        if test yes = "$GXX"; then
65580c6340caSmrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
65590c6340caSmrg          # We only want to do this on AIX 4.2 and lower, the check
65600c6340caSmrg          # below for broken collect2 doesn't work under 4.3+
65610c6340caSmrg	  collect2name=`$CC -print-prog-name=collect2`
65620c6340caSmrg	  if test -f "$collect2name" &&
65630c6340caSmrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
65640c6340caSmrg	  then
65650c6340caSmrg	    # We have reworked collect2
65660c6340caSmrg	    :
65670c6340caSmrg	  else
65680c6340caSmrg	    # We have old collect2
65690c6340caSmrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
65700c6340caSmrg	    # It fails to find uninstalled libraries when the uninstalled
65710c6340caSmrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
65720c6340caSmrg	    # to unsupported forces relinking
65730c6340caSmrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
65740c6340caSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
65750c6340caSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
65760c6340caSmrg	  fi
65770c6340caSmrg          esac
65780c6340caSmrg          shared_flag='-shared'
65790c6340caSmrg	  if test yes = "$aix_use_runtimelinking"; then
65800c6340caSmrg	    shared_flag=$shared_flag' $wl-G'
65810c6340caSmrg	  fi
65820c6340caSmrg	  # Need to ensure runtime linking is disabled for the traditional
65830c6340caSmrg	  # shared library, or the linker may eventually find shared libraries
65840c6340caSmrg	  # /with/ Import File - we do not want to mix them.
65850c6340caSmrg	  shared_flag_aix='-shared'
65860c6340caSmrg	  shared_flag_svr4='-shared $wl-G'
65870c6340caSmrg        else
65880c6340caSmrg          # not using gcc
65890c6340caSmrg          if test ia64 = "$host_cpu"; then
65900c6340caSmrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
65910c6340caSmrg	  # chokes on -Wl,-G. The following line is correct:
65920c6340caSmrg	  shared_flag='-G'
65930c6340caSmrg          else
65940c6340caSmrg	    if test yes = "$aix_use_runtimelinking"; then
65950c6340caSmrg	      shared_flag='$wl-G'
65960c6340caSmrg	    else
65970c6340caSmrg	      shared_flag='$wl-bM:SRE'
65980c6340caSmrg	    fi
65990c6340caSmrg	    shared_flag_aix='$wl-bM:SRE'
66000c6340caSmrg	    shared_flag_svr4='$wl-G'
66010c6340caSmrg          fi
66020c6340caSmrg        fi
66030c6340caSmrg
66040c6340caSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
66050c6340caSmrg        # It seems that -bexpall does not export symbols beginning with
66060c6340caSmrg        # underscore (_), so it is better to generate a list of symbols to
66070c6340caSmrg	# export.
66080c6340caSmrg        _LT_TAGVAR(always_export_symbols, $1)=yes
66090c6340caSmrg	if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
66100c6340caSmrg          # Warning - without using the other runtime loading flags (-brtl),
66110c6340caSmrg          # -berok will link without error, but may produce a broken library.
66120c6340caSmrg          # The "-G" linker flag allows undefined symbols.
66130c6340caSmrg          _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
66140c6340caSmrg          # Determine the default libpath from the value encoded in an empty
66150c6340caSmrg          # executable.
66160c6340caSmrg          _LT_SYS_MODULE_PATH_AIX([$1])
66170c6340caSmrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
66180c6340caSmrg
66190c6340caSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
66200c6340caSmrg        else
66210c6340caSmrg          if test ia64 = "$host_cpu"; then
66220c6340caSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
66230c6340caSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
66240c6340caSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
66250c6340caSmrg          else
66260c6340caSmrg	    # Determine the default libpath from the value encoded in an
66270c6340caSmrg	    # empty executable.
66280c6340caSmrg	    _LT_SYS_MODULE_PATH_AIX([$1])
66290c6340caSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
66300c6340caSmrg	    # Warning - without using the other run time loading flags,
66310c6340caSmrg	    # -berok will link without error, but may produce a broken library.
66320c6340caSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
66330c6340caSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
66340c6340caSmrg	    if test yes = "$with_gnu_ld"; then
66350c6340caSmrg	      # We only use this code for GNU lds that support --whole-archive.
66360c6340caSmrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
66370c6340caSmrg	    else
66380c6340caSmrg	      # Exported symbols can be pulled into shared objects from archives
66390c6340caSmrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
66400c6340caSmrg	    fi
66410c6340caSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
66420c6340caSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
66430c6340caSmrg	    # -brtl affects multiple linker settings, -berok does not and is overridden later
66440c6340caSmrg	    compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
66450c6340caSmrg	    if test svr4 != "$with_aix_soname"; then
66460c6340caSmrg	      # This is similar to how AIX traditionally builds its shared
66470c6340caSmrg	      # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
66480c6340caSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
66490c6340caSmrg	    fi
66500c6340caSmrg	    if test aix != "$with_aix_soname"; then
66510c6340caSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
66520c6340caSmrg	    else
66530c6340caSmrg	      # used by -dlpreopen to get the symbols
66540c6340caSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
66550c6340caSmrg	    fi
66560c6340caSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
66570c6340caSmrg          fi
66580c6340caSmrg        fi
66590c6340caSmrg        ;;
66600c6340caSmrg
66610c6340caSmrg      beos*)
66620c6340caSmrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
66630c6340caSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
66640c6340caSmrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
66650c6340caSmrg	  # support --undefined.  This deserves some investigation.  FIXME
66660c6340caSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
66670c6340caSmrg	else
66680c6340caSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
66690c6340caSmrg	fi
66700c6340caSmrg	;;
66710c6340caSmrg
66720c6340caSmrg      chorus*)
66730c6340caSmrg        case $cc_basename in
66740c6340caSmrg          *)
66750c6340caSmrg	  # FIXME: insert proper C++ library support
66760c6340caSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
66770c6340caSmrg	  ;;
66780c6340caSmrg        esac
66790c6340caSmrg        ;;
66800c6340caSmrg
66810c6340caSmrg      cygwin* | mingw* | pw32* | cegcc*)
66820c6340caSmrg	case $GXX,$cc_basename in
66830c6340caSmrg	,cl* | no,cl* | ,icl* | no,icl*)
66840c6340caSmrg	  # Native MSVC or ICC
66850c6340caSmrg	  # hardcode_libdir_flag_spec is actually meaningless, as there is
66860c6340caSmrg	  # no search path for DLLs.
66870c6340caSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
66880c6340caSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
66890c6340caSmrg	  _LT_TAGVAR(always_export_symbols, $1)=yes
66900c6340caSmrg	  _LT_TAGVAR(file_list_spec, $1)='@'
66910c6340caSmrg	  # Tell ltmain to make .lib files, not .a files.
66920c6340caSmrg	  libext=lib
66930c6340caSmrg	  # Tell ltmain to make .dll files, not .so files.
66940c6340caSmrg	  shrext_cmds=.dll
66950c6340caSmrg	  # FIXME: Setting linknames here is a bad hack.
66960c6340caSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
66970c6340caSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
66980c6340caSmrg              cp "$export_symbols" "$output_objdir/$soname.def";
66990c6340caSmrg              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
67000c6340caSmrg            else
67010c6340caSmrg              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
67020c6340caSmrg            fi~
67030c6340caSmrg            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
67040c6340caSmrg            linknames='
67050c6340caSmrg	  # The linker will not automatically build a static lib if we build a DLL.
67060c6340caSmrg	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
67070c6340caSmrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
67080c6340caSmrg	  # Don't use ranlib
67090c6340caSmrg	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
67100c6340caSmrg	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
67110c6340caSmrg            lt_tool_outputfile="@TOOL_OUTPUT@"~
67120c6340caSmrg            case $lt_outputfile in
67130c6340caSmrg              *.exe|*.EXE) ;;
67140c6340caSmrg              *)
67150c6340caSmrg                lt_outputfile=$lt_outputfile.exe
67160c6340caSmrg                lt_tool_outputfile=$lt_tool_outputfile.exe
67170c6340caSmrg                ;;
67180c6340caSmrg            esac~
67190c6340caSmrg            func_to_tool_file "$lt_outputfile"~
67200c6340caSmrg            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
67210c6340caSmrg              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
67220c6340caSmrg              $RM "$lt_outputfile.manifest";
67230c6340caSmrg            fi'
67240c6340caSmrg	  ;;
67250c6340caSmrg	*)
67260c6340caSmrg	  # g++
67270c6340caSmrg	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
67280c6340caSmrg	  # as there is no search path for DLLs.
67290c6340caSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
67300c6340caSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
67310c6340caSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
67320c6340caSmrg	  _LT_TAGVAR(always_export_symbols, $1)=no
67330c6340caSmrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
67340c6340caSmrg
67350c6340caSmrg	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
67360c6340caSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
67370c6340caSmrg	    # If the export-symbols file already is a .def file, use it as
67380c6340caSmrg	    # is; otherwise, prepend EXPORTS...
67390c6340caSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
67400c6340caSmrg              cp $export_symbols $output_objdir/$soname.def;
67410c6340caSmrg            else
67420c6340caSmrg              echo EXPORTS > $output_objdir/$soname.def;
67430c6340caSmrg              cat $export_symbols >> $output_objdir/$soname.def;
67440c6340caSmrg            fi~
67450c6340caSmrg            $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
67460c6340caSmrg	  else
67470c6340caSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
67480c6340caSmrg	  fi
67490c6340caSmrg	  ;;
67500c6340caSmrg	esac
67510c6340caSmrg	;;
67520c6340caSmrg      darwin* | rhapsody*)
67530c6340caSmrg        _LT_DARWIN_LINKER_FEATURES($1)
67540c6340caSmrg	;;
67550c6340caSmrg
67560c6340caSmrg      os2*)
67570c6340caSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
67580c6340caSmrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
67590c6340caSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
67600c6340caSmrg	shrext_cmds=.dll
67610c6340caSmrg	_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
67620c6340caSmrg	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
67630c6340caSmrg	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
67640c6340caSmrg	  $ECHO EXPORTS >> $output_objdir/$libname.def~
67650c6340caSmrg	  emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
67660c6340caSmrg	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
67670c6340caSmrg	  emximp -o $lib $output_objdir/$libname.def'
67680c6340caSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
67690c6340caSmrg	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
67700c6340caSmrg	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
67710c6340caSmrg	  $ECHO EXPORTS >> $output_objdir/$libname.def~
67720c6340caSmrg	  prefix_cmds="$SED"~
67730c6340caSmrg	  if test EXPORTS = "`$SED 1q $export_symbols`"; then
67740c6340caSmrg	    prefix_cmds="$prefix_cmds -e 1d";
67750c6340caSmrg	  fi~
67760c6340caSmrg	  prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
67770c6340caSmrg	  cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
67780c6340caSmrg	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
67790c6340caSmrg	  emximp -o $lib $output_objdir/$libname.def'
67800c6340caSmrg	_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
67810c6340caSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
67820c6340caSmrg	_LT_TAGVAR(file_list_spec, $1)='@'
67830c6340caSmrg	;;
67840c6340caSmrg
67850c6340caSmrg      dgux*)
67860c6340caSmrg        case $cc_basename in
67870c6340caSmrg          ec++*)
67880c6340caSmrg	    # FIXME: insert proper C++ library support
67890c6340caSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
67900c6340caSmrg	    ;;
67910c6340caSmrg          ghcx*)
67920c6340caSmrg	    # Green Hills C++ Compiler
67930c6340caSmrg	    # FIXME: insert proper C++ library support
67940c6340caSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
67950c6340caSmrg	    ;;
67960c6340caSmrg          *)
67970c6340caSmrg	    # FIXME: insert proper C++ library support
67980c6340caSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
67990c6340caSmrg	    ;;
68000c6340caSmrg        esac
68010c6340caSmrg        ;;
68020c6340caSmrg
68030c6340caSmrg      freebsd2.*)
68040c6340caSmrg        # C++ shared libraries reported to be fairly broken before
68050c6340caSmrg	# switch to ELF
68060c6340caSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
68070c6340caSmrg        ;;
68080c6340caSmrg
68090c6340caSmrg      freebsd-elf*)
68100c6340caSmrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
68110c6340caSmrg        ;;
68120c6340caSmrg
68130c6340caSmrg      freebsd* | dragonfly* | midnightbsd*)
68140c6340caSmrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
68150c6340caSmrg        # conventions
68160c6340caSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
68170c6340caSmrg        ;;
68180c6340caSmrg
68190c6340caSmrg      haiku*)
68200c6340caSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
68210c6340caSmrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
68220c6340caSmrg        ;;
68230c6340caSmrg
68240c6340caSmrg      hpux9*)
68250c6340caSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
68260c6340caSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
68270c6340caSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
68280c6340caSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
68290c6340caSmrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
68300c6340caSmrg				             # but as the default
68310c6340caSmrg				             # location of the library.
68320c6340caSmrg
68330c6340caSmrg        case $cc_basename in
68340c6340caSmrg          CC*)
68350c6340caSmrg            # FIXME: insert proper C++ library support
68360c6340caSmrg            _LT_TAGVAR(ld_shlibs, $1)=no
68370c6340caSmrg            ;;
68380c6340caSmrg          aCC*)
68390c6340caSmrg            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
68400c6340caSmrg            # Commands to make compiler produce verbose output that lists
68410c6340caSmrg            # what "hidden" libraries, object files and flags are used when
68420c6340caSmrg            # linking a shared library.
68430c6340caSmrg            #
68440c6340caSmrg            # There doesn't appear to be a way to prevent this compiler from
68450c6340caSmrg            # explicitly linking system object files so we need to strip them
68460c6340caSmrg            # from the output so that they don't get included in the library
68470c6340caSmrg            # dependencies.
6848de301c82Smrg            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
68490c6340caSmrg            ;;
68500c6340caSmrg          *)
68510c6340caSmrg            if test yes = "$GXX"; then
68520c6340caSmrg              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
68530c6340caSmrg            else
68540c6340caSmrg              # FIXME: insert proper C++ library support
68550c6340caSmrg              _LT_TAGVAR(ld_shlibs, $1)=no
68560c6340caSmrg            fi
68570c6340caSmrg            ;;
68580c6340caSmrg        esac
68590c6340caSmrg        ;;
68600c6340caSmrg
68610c6340caSmrg      hpux10*|hpux11*)
68620c6340caSmrg        if test no = "$with_gnu_ld"; then
68630c6340caSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
68640c6340caSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
68650c6340caSmrg
68660c6340caSmrg          case $host_cpu in
68670c6340caSmrg            hppa*64*|ia64*)
68680c6340caSmrg              ;;
68690c6340caSmrg            *)
68700c6340caSmrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
68710c6340caSmrg              ;;
68720c6340caSmrg          esac
68730c6340caSmrg        fi
68740c6340caSmrg        case $host_cpu in
68750c6340caSmrg          hppa*64*|ia64*)
68760c6340caSmrg            _LT_TAGVAR(hardcode_direct, $1)=no
68770c6340caSmrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
68780c6340caSmrg            ;;
68790c6340caSmrg          *)
68800c6340caSmrg            _LT_TAGVAR(hardcode_direct, $1)=yes
68810c6340caSmrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
68820c6340caSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
68830c6340caSmrg					         # but as the default
68840c6340caSmrg					         # location of the library.
68850c6340caSmrg            ;;
68860c6340caSmrg        esac
68870c6340caSmrg
68880c6340caSmrg        case $cc_basename in
68890c6340caSmrg          CC*)
68900c6340caSmrg	    # FIXME: insert proper C++ library support
68910c6340caSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
68920c6340caSmrg	    ;;
68930c6340caSmrg          aCC*)
68940c6340caSmrg	    case $host_cpu in
68950c6340caSmrg	      hppa*64*)
68960c6340caSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
68970c6340caSmrg	        ;;
68980c6340caSmrg	      ia64*)
68990c6340caSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
69000c6340caSmrg	        ;;
69010c6340caSmrg	      *)
69020c6340caSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
69030c6340caSmrg	        ;;
69040c6340caSmrg	    esac
69050c6340caSmrg	    # Commands to make compiler produce verbose output that lists
69060c6340caSmrg	    # what "hidden" libraries, object files and flags are used when
69070c6340caSmrg	    # linking a shared library.
69080c6340caSmrg	    #
69090c6340caSmrg	    # There doesn't appear to be a way to prevent this compiler from
69100c6340caSmrg	    # explicitly linking system object files so we need to strip them
69110c6340caSmrg	    # from the output so that they don't get included in the library
69120c6340caSmrg	    # dependencies.
6913de301c82Smrg	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
69140c6340caSmrg	    ;;
69150c6340caSmrg          *)
69160c6340caSmrg	    if test yes = "$GXX"; then
69170c6340caSmrg	      if test no = "$with_gnu_ld"; then
69180c6340caSmrg	        case $host_cpu in
69190c6340caSmrg	          hppa*64*)
69200c6340caSmrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
69210c6340caSmrg	            ;;
69220c6340caSmrg	          ia64*)
69230c6340caSmrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
69240c6340caSmrg	            ;;
69250c6340caSmrg	          *)
69260c6340caSmrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
69270c6340caSmrg	            ;;
69280c6340caSmrg	        esac
69290c6340caSmrg	      fi
69300c6340caSmrg	    else
69310c6340caSmrg	      # FIXME: insert proper C++ library support
69320c6340caSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
69330c6340caSmrg	    fi
69340c6340caSmrg	    ;;
69350c6340caSmrg        esac
69360c6340caSmrg        ;;
69370c6340caSmrg
69380c6340caSmrg      interix[[3-9]]*)
69390c6340caSmrg	_LT_TAGVAR(hardcode_direct, $1)=no
69400c6340caSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
69410c6340caSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
69420c6340caSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
69430c6340caSmrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
69440c6340caSmrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
69450c6340caSmrg	# default) and relocated if they conflict, which is a slow very memory
69460c6340caSmrg	# consuming and fragmenting process.  To avoid this, we pick a random,
69470c6340caSmrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
69480c6340caSmrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
69490c6340caSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
69500c6340caSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
69510c6340caSmrg	;;
69520c6340caSmrg      irix5* | irix6*)
69530c6340caSmrg        case $cc_basename in
69540c6340caSmrg          CC*)
69550c6340caSmrg	    # SGI C++
69560c6340caSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
69570c6340caSmrg
69580c6340caSmrg	    # Archives containing C++ object files must be created using
69590c6340caSmrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
69600c6340caSmrg	    # necessary to make sure instantiated templates are included
69610c6340caSmrg	    # in the archive.
69620c6340caSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
69630c6340caSmrg	    ;;
69640c6340caSmrg          *)
69650c6340caSmrg	    if test yes = "$GXX"; then
69660c6340caSmrg	      if test no = "$with_gnu_ld"; then
69670c6340caSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
69680c6340caSmrg	      else
69690c6340caSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
69700c6340caSmrg	      fi
69710c6340caSmrg	    fi
69720c6340caSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
69730c6340caSmrg	    ;;
69740c6340caSmrg        esac
69750c6340caSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
69760c6340caSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
69770c6340caSmrg        _LT_TAGVAR(inherit_rpath, $1)=yes
69780c6340caSmrg        ;;
69790c6340caSmrg
69800c6340caSmrg      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
69810c6340caSmrg        case $cc_basename in
69820c6340caSmrg          KCC*)
69830c6340caSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
69840c6340caSmrg
69850c6340caSmrg	    # KCC will only create a shared library if the output file
69860c6340caSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
69870c6340caSmrg	    # to its proper name (with version) after linking.
69880c6340caSmrg	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
69890c6340caSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib'
69900c6340caSmrg	    # Commands to make compiler produce verbose output that lists
69910c6340caSmrg	    # what "hidden" libraries, object files and flags are used when
69920c6340caSmrg	    # linking a shared library.
69930c6340caSmrg	    #
69940c6340caSmrg	    # There doesn't appear to be a way to prevent this compiler from
69950c6340caSmrg	    # explicitly linking system object files so we need to strip them
69960c6340caSmrg	    # from the output so that they don't get included in the library
69970c6340caSmrg	    # dependencies.
69980c6340caSmrg	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
69990c6340caSmrg
70000c6340caSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
70010c6340caSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
70020c6340caSmrg
70030c6340caSmrg	    # Archives containing C++ object files must be created using
70040c6340caSmrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
70050c6340caSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
70060c6340caSmrg	    ;;
70070c6340caSmrg	  icpc* | ecpc* )
70080c6340caSmrg	    # Intel C++
70090c6340caSmrg	    with_gnu_ld=yes
70100c6340caSmrg	    # version 8.0 and above of icpc choke on multiply defined symbols
70110c6340caSmrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
70120c6340caSmrg	    # earlier do not add the objects themselves.
70130c6340caSmrg	    case `$CC -V 2>&1` in
70140c6340caSmrg	      *"Version 7."*)
70150c6340caSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
70160c6340caSmrg		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
70170c6340caSmrg		;;
70180c6340caSmrg	      *)  # Version 8.0 or newer
70190c6340caSmrg	        tmp_idyn=
70200c6340caSmrg	        case $host_cpu in
70210c6340caSmrg		  ia64*) tmp_idyn=' -i_dynamic';;
70220c6340caSmrg		esac
70230c6340caSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
70240c6340caSmrg		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
70250c6340caSmrg		;;
70260c6340caSmrg	    esac
70270c6340caSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
70280c6340caSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
70290c6340caSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
70300c6340caSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
70310c6340caSmrg	    ;;
70320c6340caSmrg          pgCC* | pgcpp*)
70330c6340caSmrg            # Portland Group C++ compiler
70340c6340caSmrg	    case `$CC -V` in
70350c6340caSmrg	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
70360c6340caSmrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
70370c6340caSmrg               rm -rf $tpldir~
70380c6340caSmrg               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
70390c6340caSmrg               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
70400c6340caSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
70410c6340caSmrg                rm -rf $tpldir~
70420c6340caSmrg                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
70430c6340caSmrg                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
70440c6340caSmrg                $RANLIB $oldlib'
70450c6340caSmrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
70460c6340caSmrg                rm -rf $tpldir~
70470c6340caSmrg                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
70480c6340caSmrg                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
70490c6340caSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
70500c6340caSmrg                rm -rf $tpldir~
70510c6340caSmrg                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
70520c6340caSmrg                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
70530c6340caSmrg	      ;;
70540c6340caSmrg	    *) # Version 6 and above use weak symbols
70550c6340caSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
70560c6340caSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
70570c6340caSmrg	      ;;
70580c6340caSmrg	    esac
70590c6340caSmrg
70600c6340caSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
70610c6340caSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
70620c6340caSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
70630c6340caSmrg            ;;
70640c6340caSmrg	  cxx*)
70650c6340caSmrg	    # Compaq C++
70660c6340caSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
70670c6340caSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname  -o $lib $wl-retain-symbols-file $wl$export_symbols'
70680c6340caSmrg
70690c6340caSmrg	    runpath_var=LD_RUN_PATH
70700c6340caSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
70710c6340caSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
70720c6340caSmrg
70730c6340caSmrg	    # Commands to make compiler produce verbose output that lists
70740c6340caSmrg	    # what "hidden" libraries, object files and flags are used when
70750c6340caSmrg	    # linking a shared library.
70760c6340caSmrg	    #
70770c6340caSmrg	    # There doesn't appear to be a way to prevent this compiler from
70780c6340caSmrg	    # explicitly linking system object files so we need to strip them
70790c6340caSmrg	    # from the output so that they don't get included in the library
70800c6340caSmrg	    # dependencies.
70810c6340caSmrg	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
70820c6340caSmrg	    ;;
70830c6340caSmrg	  xl* | mpixl* | bgxl*)
70840c6340caSmrg	    # IBM XL 8.0 on PPC, with GNU ld
70850c6340caSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
70860c6340caSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
70870c6340caSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
70880c6340caSmrg	    if test yes = "$supports_anon_versioning"; then
70890c6340caSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
70900c6340caSmrg                cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
70910c6340caSmrg                echo "local: *; };" >> $output_objdir/$libname.ver~
70920c6340caSmrg                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
70930c6340caSmrg	    fi
70940c6340caSmrg	    ;;
70950c6340caSmrg	  *)
70960c6340caSmrg	    case `$CC -V 2>&1 | $SED 5q` in
70970c6340caSmrg	    *Sun\ C*)
70980c6340caSmrg	      # Sun C++ 5.9
70990c6340caSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
71000c6340caSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
71010c6340caSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols'
71020c6340caSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
71030c6340caSmrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
71040c6340caSmrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
71050c6340caSmrg
71060c6340caSmrg	      # Not sure whether something based on
71070c6340caSmrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
71080c6340caSmrg	      # would be better.
71090c6340caSmrg	      output_verbose_link_cmd='func_echo_all'
71100c6340caSmrg
71110c6340caSmrg	      # Archives containing C++ object files must be created using
71120c6340caSmrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
71130c6340caSmrg	      # necessary to make sure instantiated templates are included
71140c6340caSmrg	      # in the archive.
71150c6340caSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
71160c6340caSmrg	      ;;
71170c6340caSmrg	    esac
71180c6340caSmrg	    ;;
71190c6340caSmrg	esac
71200c6340caSmrg	;;
71210c6340caSmrg
71220c6340caSmrg      lynxos*)
71230c6340caSmrg        # FIXME: insert proper C++ library support
71240c6340caSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
71250c6340caSmrg	;;
71260c6340caSmrg
71270c6340caSmrg      m88k*)
71280c6340caSmrg        # FIXME: insert proper C++ library support
71290c6340caSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
71300c6340caSmrg	;;
71310c6340caSmrg
71320c6340caSmrg      mvs*)
71330c6340caSmrg        case $cc_basename in
71340c6340caSmrg          cxx*)
71350c6340caSmrg	    # FIXME: insert proper C++ library support
71360c6340caSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
71370c6340caSmrg	    ;;
71380c6340caSmrg	  *)
71390c6340caSmrg	    # FIXME: insert proper C++ library support
71400c6340caSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
71410c6340caSmrg	    ;;
71420c6340caSmrg	esac
71430c6340caSmrg	;;
71440c6340caSmrg
71450c6340caSmrg      netbsd*)
71460c6340caSmrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
71470c6340caSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
71480c6340caSmrg	  wlarc=
71490c6340caSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
71500c6340caSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
71510c6340caSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
71520c6340caSmrg	fi
71530c6340caSmrg	# Workaround some broken pre-1.5 toolchains
71540c6340caSmrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
71550c6340caSmrg	;;
71560c6340caSmrg
71570c6340caSmrg      *nto* | *qnx*)
71580c6340caSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
71590c6340caSmrg	;;
71600c6340caSmrg
71610c6340caSmrg      openbsd* | bitrig*)
71620c6340caSmrg	if test -f /usr/libexec/ld.so; then
71630c6340caSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
71640c6340caSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
71650c6340caSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
71660c6340caSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
71670c6340caSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
71680c6340caSmrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
71690c6340caSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
71700c6340caSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
71710c6340caSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
71720c6340caSmrg	  fi
71730c6340caSmrg	  output_verbose_link_cmd=func_echo_all
71740c6340caSmrg	else
71750c6340caSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
71760c6340caSmrg	fi
71770c6340caSmrg	;;
71780c6340caSmrg
71790c6340caSmrg      osf3* | osf4* | osf5*)
71800c6340caSmrg        case $cc_basename in
71810c6340caSmrg          KCC*)
71820c6340caSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
71830c6340caSmrg
71840c6340caSmrg	    # KCC will only create a shared library if the output file
71850c6340caSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
71860c6340caSmrg	    # to its proper name (with version) after linking.
71870c6340caSmrg	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
71880c6340caSmrg
71890c6340caSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
71900c6340caSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
71910c6340caSmrg
71920c6340caSmrg	    # Archives containing C++ object files must be created using
71930c6340caSmrg	    # the KAI C++ compiler.
71940c6340caSmrg	    case $host in
71950c6340caSmrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
71960c6340caSmrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
71970c6340caSmrg	    esac
71980c6340caSmrg	    ;;
71990c6340caSmrg          RCC*)
72000c6340caSmrg	    # Rational C++ 2.4.1
72010c6340caSmrg	    # FIXME: insert proper C++ library support
72020c6340caSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
72030c6340caSmrg	    ;;
72040c6340caSmrg          cxx*)
72050c6340caSmrg	    case $host in
72060c6340caSmrg	      osf3*)
72070c6340caSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
72080c6340caSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
72090c6340caSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
72100c6340caSmrg		;;
72110c6340caSmrg	      *)
72120c6340caSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
72130c6340caSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
72140c6340caSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
72150c6340caSmrg                  echo "-hidden">> $lib.exp~
72160c6340caSmrg                  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp  `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
72170c6340caSmrg                  $RM $lib.exp'
72180c6340caSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
72190c6340caSmrg		;;
72200c6340caSmrg	    esac
72210c6340caSmrg
72220c6340caSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
72230c6340caSmrg
72240c6340caSmrg	    # Commands to make compiler produce verbose output that lists
72250c6340caSmrg	    # what "hidden" libraries, object files and flags are used when
72260c6340caSmrg	    # linking a shared library.
72270c6340caSmrg	    #
72280c6340caSmrg	    # There doesn't appear to be a way to prevent this compiler from
72290c6340caSmrg	    # explicitly linking system object files so we need to strip them
72300c6340caSmrg	    # from the output so that they don't get included in the library
72310c6340caSmrg	    # dependencies.
72320c6340caSmrg	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
72330c6340caSmrg	    ;;
72340c6340caSmrg	  *)
72350c6340caSmrg	    if test yes,no = "$GXX,$with_gnu_ld"; then
72360c6340caSmrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
72370c6340caSmrg	      case $host in
72380c6340caSmrg	        osf3*)
72390c6340caSmrg	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
72400c6340caSmrg		  ;;
72410c6340caSmrg	        *)
72420c6340caSmrg	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
72430c6340caSmrg		  ;;
72440c6340caSmrg	      esac
72450c6340caSmrg
72460c6340caSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
72470c6340caSmrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
72480c6340caSmrg
72490c6340caSmrg	      # Commands to make compiler produce verbose output that lists
72500c6340caSmrg	      # what "hidden" libraries, object files and flags are used when
72510c6340caSmrg	      # linking a shared library.
7252de301c82Smrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
72530c6340caSmrg
72540c6340caSmrg	    else
72550c6340caSmrg	      # FIXME: insert proper C++ library support
72560c6340caSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
72570c6340caSmrg	    fi
72580c6340caSmrg	    ;;
72590c6340caSmrg        esac
72600c6340caSmrg        ;;
72610c6340caSmrg
72620c6340caSmrg      psos*)
72630c6340caSmrg        # FIXME: insert proper C++ library support
72640c6340caSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
72650c6340caSmrg        ;;
72660c6340caSmrg
72670c6340caSmrg      sunos4*)
72680c6340caSmrg        case $cc_basename in
72690c6340caSmrg          CC*)
72700c6340caSmrg	    # Sun C++ 4.x
72710c6340caSmrg	    # FIXME: insert proper C++ library support
72720c6340caSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
72730c6340caSmrg	    ;;
72740c6340caSmrg          lcc*)
72750c6340caSmrg	    # Lucid
72760c6340caSmrg	    # FIXME: insert proper C++ library support
72770c6340caSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
72780c6340caSmrg	    ;;
72790c6340caSmrg          *)
72800c6340caSmrg	    # FIXME: insert proper C++ library support
72810c6340caSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
72820c6340caSmrg	    ;;
72830c6340caSmrg        esac
72840c6340caSmrg        ;;
72850c6340caSmrg
72860c6340caSmrg      solaris*)
72870c6340caSmrg        case $cc_basename in
72880c6340caSmrg          CC* | sunCC*)
72890c6340caSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
72900c6340caSmrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
72910c6340caSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
72920c6340caSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
72930c6340caSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
72940c6340caSmrg              $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
72950c6340caSmrg
72960c6340caSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
72970c6340caSmrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
72980c6340caSmrg	    case $host_os in
72990c6340caSmrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
73000c6340caSmrg	      *)
73010c6340caSmrg		# The compiler driver will combine and reorder linker options,
73020c6340caSmrg		# but understands '-z linker_flag'.
73030c6340caSmrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
73040c6340caSmrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
73050c6340caSmrg	        ;;
73060c6340caSmrg	    esac
73070c6340caSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
73080c6340caSmrg
73090c6340caSmrg	    output_verbose_link_cmd='func_echo_all'
73100c6340caSmrg
73110c6340caSmrg	    # Archives containing C++ object files must be created using
73120c6340caSmrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
73130c6340caSmrg	    # necessary to make sure instantiated templates are included
73140c6340caSmrg	    # in the archive.
73150c6340caSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
73160c6340caSmrg	    ;;
73170c6340caSmrg          gcx*)
73180c6340caSmrg	    # Green Hills C++ Compiler
73190c6340caSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
73200c6340caSmrg
73210c6340caSmrg	    # The C++ compiler must be used to create the archive.
73220c6340caSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
73230c6340caSmrg	    ;;
73240c6340caSmrg          *)
73250c6340caSmrg	    # GNU C++ compiler with Solaris linker
73260c6340caSmrg	    if test yes,no = "$GXX,$with_gnu_ld"; then
73270c6340caSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
73280c6340caSmrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
73290c6340caSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
73300c6340caSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
73310c6340caSmrg                  $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
73320c6340caSmrg
73330c6340caSmrg	        # Commands to make compiler produce verbose output that lists
73340c6340caSmrg	        # what "hidden" libraries, object files and flags are used when
73350c6340caSmrg	        # linking a shared library.
7336de301c82Smrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
73370c6340caSmrg	      else
73380c6340caSmrg	        # g++ 2.7 appears to require '-G' NOT '-shared' on this
73390c6340caSmrg	        # platform.
73400c6340caSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
73410c6340caSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
73420c6340caSmrg                  $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
73430c6340caSmrg
73440c6340caSmrg	        # Commands to make compiler produce verbose output that lists
73450c6340caSmrg	        # what "hidden" libraries, object files and flags are used when
73460c6340caSmrg	        # linking a shared library.
7347de301c82Smrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
73480c6340caSmrg	      fi
73490c6340caSmrg
73500c6340caSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
73510c6340caSmrg	      case $host_os in
73520c6340caSmrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
73530c6340caSmrg		*)
73540c6340caSmrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
73550c6340caSmrg		  ;;
73560c6340caSmrg	      esac
73570c6340caSmrg	    fi
73580c6340caSmrg	    ;;
73590c6340caSmrg        esac
73600c6340caSmrg        ;;
73610c6340caSmrg
73620c6340caSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
73630c6340caSmrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
73640c6340caSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
73650c6340caSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
73660c6340caSmrg      runpath_var='LD_RUN_PATH'
73670c6340caSmrg
73680c6340caSmrg      case $cc_basename in
73690c6340caSmrg        CC*)
73700c6340caSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73710c6340caSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73720c6340caSmrg	  ;;
73730c6340caSmrg	*)
73740c6340caSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73750c6340caSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73760c6340caSmrg	  ;;
73770c6340caSmrg      esac
73780c6340caSmrg      ;;
73790c6340caSmrg
73800c6340caSmrg      sysv5* | sco3.2v5* | sco5v6*)
73810c6340caSmrg	# Note: We CANNOT use -z defs as we might desire, because we do not
73820c6340caSmrg	# link with -lc, and that would cause any symbols used from libc to
73830c6340caSmrg	# always be unresolved, which means just about no library would
73840c6340caSmrg	# ever link correctly.  If we're not using GNU ld we use -z text
73850c6340caSmrg	# though, which does catch some bad symbols but isn't as heavy-handed
73860c6340caSmrg	# as -z defs.
73870c6340caSmrg	_LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
73880c6340caSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
73890c6340caSmrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
73900c6340caSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
73910c6340caSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
73920c6340caSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
73930c6340caSmrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
73940c6340caSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
73950c6340caSmrg	runpath_var='LD_RUN_PATH'
73960c6340caSmrg
73970c6340caSmrg	case $cc_basename in
73980c6340caSmrg          CC*)
73990c6340caSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
74000c6340caSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
74010c6340caSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
74020c6340caSmrg              '"$_LT_TAGVAR(old_archive_cmds, $1)"
74030c6340caSmrg	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
74040c6340caSmrg              '"$_LT_TAGVAR(reload_cmds, $1)"
74050c6340caSmrg	    ;;
74060c6340caSmrg	  *)
74070c6340caSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
74080c6340caSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
74090c6340caSmrg	    ;;
74100c6340caSmrg	esac
74110c6340caSmrg      ;;
74120c6340caSmrg
74130c6340caSmrg      tandem*)
74140c6340caSmrg        case $cc_basename in
74150c6340caSmrg          NCC*)
74160c6340caSmrg	    # NonStop-UX NCC 3.20
74170c6340caSmrg	    # FIXME: insert proper C++ library support
74180c6340caSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
74190c6340caSmrg	    ;;
74200c6340caSmrg          *)
74210c6340caSmrg	    # FIXME: insert proper C++ library support
74220c6340caSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
74230c6340caSmrg	    ;;
74240c6340caSmrg        esac
74250c6340caSmrg        ;;
74260c6340caSmrg
74270c6340caSmrg      vxworks*)
74280c6340caSmrg        # FIXME: insert proper C++ library support
74290c6340caSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
74300c6340caSmrg        ;;
74310c6340caSmrg
74320c6340caSmrg      *)
74330c6340caSmrg        # FIXME: insert proper C++ library support
74340c6340caSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
74350c6340caSmrg        ;;
74360c6340caSmrg    esac
74370c6340caSmrg
74380c6340caSmrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
74390c6340caSmrg    test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
74400c6340caSmrg
74410c6340caSmrg    _LT_TAGVAR(GCC, $1)=$GXX
74420c6340caSmrg    _LT_TAGVAR(LD, $1)=$LD
74430c6340caSmrg
74440c6340caSmrg    ## CAVEAT EMPTOR:
74450c6340caSmrg    ## There is no encapsulation within the following macros, do not change
74460c6340caSmrg    ## the running order or otherwise move them around unless you know exactly
74470c6340caSmrg    ## what you are doing...
74480c6340caSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
74490c6340caSmrg    _LT_COMPILER_PIC($1)
74500c6340caSmrg    _LT_COMPILER_C_O($1)
74510c6340caSmrg    _LT_COMPILER_FILE_LOCKS($1)
74520c6340caSmrg    _LT_LINKER_SHLIBS($1)
74530c6340caSmrg    _LT_SYS_DYNAMIC_LINKER($1)
74540c6340caSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
74550c6340caSmrg
74560c6340caSmrg    _LT_CONFIG($1)
74570c6340caSmrg  fi # test -n "$compiler"
74580c6340caSmrg
74590c6340caSmrg  CC=$lt_save_CC
74600c6340caSmrg  CFLAGS=$lt_save_CFLAGS
74610c6340caSmrg  LDCXX=$LD
74620c6340caSmrg  LD=$lt_save_LD
74630c6340caSmrg  GCC=$lt_save_GCC
74640c6340caSmrg  with_gnu_ld=$lt_save_with_gnu_ld
74650c6340caSmrg  lt_cv_path_LDCXX=$lt_cv_path_LD
74660c6340caSmrg  lt_cv_path_LD=$lt_save_path_LD
74670c6340caSmrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
74680c6340caSmrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
74690c6340caSmrgfi # test yes != "$_lt_caught_CXX_error"
74700c6340caSmrg
74710c6340caSmrgAC_LANG_POP
74720c6340caSmrg])# _LT_LANG_CXX_CONFIG
74730c6340caSmrg
74740c6340caSmrg
74750c6340caSmrg# _LT_FUNC_STRIPNAME_CNF
74760c6340caSmrg# ----------------------
74770c6340caSmrg# func_stripname_cnf prefix suffix name
74780c6340caSmrg# strip PREFIX and SUFFIX off of NAME.
74790c6340caSmrg# PREFIX and SUFFIX must not contain globbing or regex special
74800c6340caSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading
74810c6340caSmrg# dot (in which case that matches only a dot).
74820c6340caSmrg#
74830c6340caSmrg# This function is identical to the (non-XSI) version of func_stripname,
74840c6340caSmrg# except this one can be used by m4 code that may be executed by configure,
74850c6340caSmrg# rather than the libtool script.
74860c6340caSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
74870c6340caSmrgAC_REQUIRE([_LT_DECL_SED])
74880c6340caSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
74890c6340caSmrgfunc_stripname_cnf ()
74900c6340caSmrg{
74910c6340caSmrg  case @S|@2 in
74920c6340caSmrg  .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
74930c6340caSmrg  *)  func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
74940c6340caSmrg  esac
74950c6340caSmrg} # func_stripname_cnf
74960c6340caSmrg])# _LT_FUNC_STRIPNAME_CNF
74970c6340caSmrg
74980c6340caSmrg
74990c6340caSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
75000c6340caSmrg# ---------------------------------
75010c6340caSmrg# Figure out "hidden" library dependencies from verbose
75020c6340caSmrg# compiler output when linking a shared library.
75030c6340caSmrg# Parse the compiler output and extract the necessary
75040c6340caSmrg# objects, libraries and library flags.
75050c6340caSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
75060c6340caSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
75070c6340caSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
75080c6340caSmrg# Dependencies to place before and after the object being linked:
75090c6340caSmrg_LT_TAGVAR(predep_objects, $1)=
75100c6340caSmrg_LT_TAGVAR(postdep_objects, $1)=
75110c6340caSmrg_LT_TAGVAR(predeps, $1)=
75120c6340caSmrg_LT_TAGVAR(postdeps, $1)=
75130c6340caSmrg_LT_TAGVAR(compiler_lib_search_path, $1)=
75140c6340caSmrg
75150c6340caSmrgdnl we can't use the lt_simple_compile_test_code here,
75160c6340caSmrgdnl because it contains code intended for an executable,
75170c6340caSmrgdnl not a library.  It's possible we should let each
75180c6340caSmrgdnl tag define a new lt_????_link_test_code variable,
75190c6340caSmrgdnl but it's only used here...
75200c6340caSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
75210c6340caSmrgint a;
75220c6340caSmrgvoid foo (void) { a = 0; }
75230c6340caSmrg_LT_EOF
75240c6340caSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
75250c6340caSmrgclass Foo
75260c6340caSmrg{
75270c6340caSmrgpublic:
75280c6340caSmrg  Foo (void) { a = 0; }
75290c6340caSmrgprivate:
75300c6340caSmrg  int a;
75310c6340caSmrg};
75320c6340caSmrg_LT_EOF
75330c6340caSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
75340c6340caSmrg      subroutine foo
75350c6340caSmrg      implicit none
75360c6340caSmrg      integer*4 a
75370c6340caSmrg      a=0
75380c6340caSmrg      return
75390c6340caSmrg      end
75400c6340caSmrg_LT_EOF
75410c6340caSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
75420c6340caSmrg      subroutine foo
75430c6340caSmrg      implicit none
75440c6340caSmrg      integer a
75450c6340caSmrg      a=0
75460c6340caSmrg      return
75470c6340caSmrg      end
75480c6340caSmrg_LT_EOF
75490c6340caSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
75500c6340caSmrgpublic class foo {
75510c6340caSmrg  private int a;
75520c6340caSmrg  public void bar (void) {
75530c6340caSmrg    a = 0;
75540c6340caSmrg  }
75550c6340caSmrg};
75560c6340caSmrg_LT_EOF
75570c6340caSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
75580c6340caSmrgpackage foo
75590c6340caSmrgfunc foo() {
75600c6340caSmrg}
75610c6340caSmrg_LT_EOF
75620c6340caSmrg])
75630c6340caSmrg
75640c6340caSmrg_lt_libdeps_save_CFLAGS=$CFLAGS
75650c6340caSmrgcase "$CC $CFLAGS " in #(
75660c6340caSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
75670c6340caSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
75680c6340caSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
75690c6340caSmrgesac
75700c6340caSmrg
75710c6340caSmrgdnl Parse the compiler output and extract the necessary
75720c6340caSmrgdnl objects, libraries and library flags.
75730c6340caSmrgif AC_TRY_EVAL(ac_compile); then
75740c6340caSmrg  # Parse the compiler output and extract the necessary
75750c6340caSmrg  # objects, libraries and library flags.
75760c6340caSmrg
75770c6340caSmrg  # Sentinel used to keep track of whether or not we are before
75780c6340caSmrg  # the conftest object file.
75790c6340caSmrg  pre_test_object_deps_done=no
75800c6340caSmrg
75810c6340caSmrg  for p in `eval "$output_verbose_link_cmd"`; do
75820c6340caSmrg    case $prev$p in
75830c6340caSmrg
75840c6340caSmrg    -L* | -R* | -l*)
75850c6340caSmrg       # Some compilers place space between "-{L,R}" and the path.
75860c6340caSmrg       # Remove the space.
75870c6340caSmrg       if test x-L = "$p" ||
75880c6340caSmrg          test x-R = "$p"; then
75890c6340caSmrg	 prev=$p
75900c6340caSmrg	 continue
75910c6340caSmrg       fi
75920c6340caSmrg
75930c6340caSmrg       # Expand the sysroot to ease extracting the directories later.
75940c6340caSmrg       if test -z "$prev"; then
75950c6340caSmrg         case $p in
75960c6340caSmrg         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
75970c6340caSmrg         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
75980c6340caSmrg         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
75990c6340caSmrg         esac
76000c6340caSmrg       fi
76010c6340caSmrg       case $p in
76020c6340caSmrg       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
76030c6340caSmrg       esac
76040c6340caSmrg       if test no = "$pre_test_object_deps_done"; then
76050c6340caSmrg	 case $prev in
76060c6340caSmrg	 -L | -R)
76070c6340caSmrg	   # Internal compiler library paths should come after those
76080c6340caSmrg	   # provided the user.  The postdeps already come after the
76090c6340caSmrg	   # user supplied libs so there is no need to process them.
76100c6340caSmrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
76110c6340caSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
76120c6340caSmrg	   else
76130c6340caSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
76140c6340caSmrg	   fi
76150c6340caSmrg	   ;;
76160c6340caSmrg	 # The "-l" case would never come before the object being
76170c6340caSmrg	 # linked, so don't bother handling this case.
76180c6340caSmrg	 esac
76190c6340caSmrg       else
76200c6340caSmrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
76210c6340caSmrg	   _LT_TAGVAR(postdeps, $1)=$prev$p
76220c6340caSmrg	 else
76230c6340caSmrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
76240c6340caSmrg	 fi
76250c6340caSmrg       fi
76260c6340caSmrg       prev=
76270c6340caSmrg       ;;
76280c6340caSmrg
76290c6340caSmrg    *.lto.$objext) ;; # Ignore GCC LTO objects
76300c6340caSmrg    *.$objext)
76310c6340caSmrg       # This assumes that the test object file only shows up
76320c6340caSmrg       # once in the compiler output.
76330c6340caSmrg       if test "$p" = "conftest.$objext"; then
76340c6340caSmrg	 pre_test_object_deps_done=yes
76350c6340caSmrg	 continue
76360c6340caSmrg       fi
76370c6340caSmrg
76380c6340caSmrg       if test no = "$pre_test_object_deps_done"; then
76390c6340caSmrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
76400c6340caSmrg	   _LT_TAGVAR(predep_objects, $1)=$p
76410c6340caSmrg	 else
76420c6340caSmrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
76430c6340caSmrg	 fi
76440c6340caSmrg       else
76450c6340caSmrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
76460c6340caSmrg	   _LT_TAGVAR(postdep_objects, $1)=$p
76470c6340caSmrg	 else
76480c6340caSmrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
76490c6340caSmrg	 fi
76500c6340caSmrg       fi
76510c6340caSmrg       ;;
76520c6340caSmrg
76530c6340caSmrg    *) ;; # Ignore the rest.
76540c6340caSmrg
76550c6340caSmrg    esac
76560c6340caSmrg  done
76570c6340caSmrg
76580c6340caSmrg  # Clean up.
76590c6340caSmrg  rm -f a.out a.exe
76600c6340caSmrgelse
76610c6340caSmrg  echo "libtool.m4: error: problem compiling $1 test program"
76620c6340caSmrgfi
76630c6340caSmrg
76640c6340caSmrg$RM -f confest.$objext
76650c6340caSmrgCFLAGS=$_lt_libdeps_save_CFLAGS
76660c6340caSmrg
76670c6340caSmrg# PORTME: override above test on systems where it is broken
76680c6340caSmrgm4_if([$1], [CXX],
76690c6340caSmrg[case $host_os in
76700c6340caSmrginterix[[3-9]]*)
76710c6340caSmrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
76720c6340caSmrg  # hack all around it, let's just trust "g++" to DTRT.
76730c6340caSmrg  _LT_TAGVAR(predep_objects,$1)=
76740c6340caSmrg  _LT_TAGVAR(postdep_objects,$1)=
76750c6340caSmrg  _LT_TAGVAR(postdeps,$1)=
76760c6340caSmrg  ;;
76770c6340caSmrgesac
76780c6340caSmrg])
76790c6340caSmrg
76800c6340caSmrgcase " $_LT_TAGVAR(postdeps, $1) " in
76810c6340caSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
76820c6340caSmrgesac
76830c6340caSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
76840c6340caSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
76850c6340caSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
76860c6340caSmrgfi
76870c6340caSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
76880c6340caSmrg    [The directories searched by this compiler when creating a shared library])
76890c6340caSmrg_LT_TAGDECL([], [predep_objects], [1],
76900c6340caSmrg    [Dependencies to place before and after the objects being linked to
76910c6340caSmrg    create a shared library])
76920c6340caSmrg_LT_TAGDECL([], [postdep_objects], [1])
76930c6340caSmrg_LT_TAGDECL([], [predeps], [1])
76940c6340caSmrg_LT_TAGDECL([], [postdeps], [1])
76950c6340caSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
76960c6340caSmrg    [The library search path used internally by the compiler when linking
76970c6340caSmrg    a shared library])
76980c6340caSmrg])# _LT_SYS_HIDDEN_LIBDEPS
76990c6340caSmrg
77000c6340caSmrg
77010c6340caSmrg# _LT_LANG_F77_CONFIG([TAG])
77020c6340caSmrg# --------------------------
77030c6340caSmrg# Ensure that the configuration variables for a Fortran 77 compiler are
77040c6340caSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
77050c6340caSmrg# to write the compiler configuration to 'libtool'.
77060c6340caSmrgm4_defun([_LT_LANG_F77_CONFIG],
77070c6340caSmrg[AC_LANG_PUSH(Fortran 77)
77080c6340caSmrgif test -z "$F77" || test no = "$F77"; then
77090c6340caSmrg  _lt_disable_F77=yes
77100c6340caSmrgfi
77110c6340caSmrg
77120c6340caSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
77130c6340caSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
77140c6340caSmrg_LT_TAGVAR(always_export_symbols, $1)=no
77150c6340caSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
77160c6340caSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
77170c6340caSmrg_LT_TAGVAR(hardcode_direct, $1)=no
77180c6340caSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
77190c6340caSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
77200c6340caSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
77210c6340caSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
77220c6340caSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
77230c6340caSmrg_LT_TAGVAR(inherit_rpath, $1)=no
77240c6340caSmrg_LT_TAGVAR(module_cmds, $1)=
77250c6340caSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
77260c6340caSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
77270c6340caSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
77280c6340caSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
77290c6340caSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
77300c6340caSmrg_LT_TAGVAR(no_undefined_flag, $1)=
77310c6340caSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
77320c6340caSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
77330c6340caSmrg
77340c6340caSmrg# Source file extension for f77 test sources.
77350c6340caSmrgac_ext=f
77360c6340caSmrg
77370c6340caSmrg# Object file extension for compiled f77 test sources.
77380c6340caSmrgobjext=o
77390c6340caSmrg_LT_TAGVAR(objext, $1)=$objext
77400c6340caSmrg
77410c6340caSmrg# No sense in running all these tests if we already determined that
77420c6340caSmrg# the F77 compiler isn't working.  Some variables (like enable_shared)
77430c6340caSmrg# are currently assumed to apply to all compilers on this platform,
77440c6340caSmrg# and will be corrupted by setting them based on a non-working compiler.
77450c6340caSmrgif test yes != "$_lt_disable_F77"; then
77460c6340caSmrg  # Code to be used in simple compile tests
77470c6340caSmrg  lt_simple_compile_test_code="\
77480c6340caSmrg      subroutine t
77490c6340caSmrg      return
77500c6340caSmrg      end
77510c6340caSmrg"
77520c6340caSmrg
77530c6340caSmrg  # Code to be used in simple link tests
77540c6340caSmrg  lt_simple_link_test_code="\
77550c6340caSmrg      program t
77560c6340caSmrg      end
77570c6340caSmrg"
77580c6340caSmrg
77590c6340caSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
77600c6340caSmrg  _LT_TAG_COMPILER
77610c6340caSmrg
77620c6340caSmrg  # save warnings/boilerplate of simple test code
77630c6340caSmrg  _LT_COMPILER_BOILERPLATE
77640c6340caSmrg  _LT_LINKER_BOILERPLATE
77650c6340caSmrg
77660c6340caSmrg  # Allow CC to be a program name with arguments.
77670c6340caSmrg  lt_save_CC=$CC
77680c6340caSmrg  lt_save_GCC=$GCC
77690c6340caSmrg  lt_save_CFLAGS=$CFLAGS
77700c6340caSmrg  CC=${F77-"f77"}
77710c6340caSmrg  CFLAGS=$FFLAGS
77720c6340caSmrg  compiler=$CC
77730c6340caSmrg  _LT_TAGVAR(compiler, $1)=$CC
77740c6340caSmrg  _LT_CC_BASENAME([$compiler])
77750c6340caSmrg  GCC=$G77
77760c6340caSmrg  if test -n "$compiler"; then
77770c6340caSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
77780c6340caSmrg    AC_MSG_RESULT([$can_build_shared])
77790c6340caSmrg
77800c6340caSmrg    AC_MSG_CHECKING([whether to build shared libraries])
77810c6340caSmrg    test no = "$can_build_shared" && enable_shared=no
77820c6340caSmrg
77830c6340caSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
77840c6340caSmrg    # are all built from PIC.
77850c6340caSmrg    case $host_os in
77860c6340caSmrg      aix3*)
77870c6340caSmrg        test yes = "$enable_shared" && enable_static=no
77880c6340caSmrg        if test -n "$RANLIB"; then
77890c6340caSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
77900c6340caSmrg          postinstall_cmds='$RANLIB $lib'
77910c6340caSmrg        fi
77920c6340caSmrg        ;;
77930c6340caSmrg      aix[[4-9]]*)
77940c6340caSmrg	if test ia64 != "$host_cpu"; then
77950c6340caSmrg	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
77960c6340caSmrg	  yes,aix,yes) ;;		# shared object as lib.so file only
77970c6340caSmrg	  yes,svr4,*) ;;		# shared object as lib.so archive member only
77980c6340caSmrg	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
77990c6340caSmrg	  esac
78000c6340caSmrg	fi
78010c6340caSmrg        ;;
78020c6340caSmrg    esac
78030c6340caSmrg    AC_MSG_RESULT([$enable_shared])
78040c6340caSmrg
78050c6340caSmrg    AC_MSG_CHECKING([whether to build static libraries])
78060c6340caSmrg    # Make sure either enable_shared or enable_static is yes.
78070c6340caSmrg    test yes = "$enable_shared" || enable_static=yes
78080c6340caSmrg    AC_MSG_RESULT([$enable_static])
78090c6340caSmrg
78100c6340caSmrg    _LT_TAGVAR(GCC, $1)=$G77
78110c6340caSmrg    _LT_TAGVAR(LD, $1)=$LD
78120c6340caSmrg
78130c6340caSmrg    ## CAVEAT EMPTOR:
78140c6340caSmrg    ## There is no encapsulation within the following macros, do not change
78150c6340caSmrg    ## the running order or otherwise move them around unless you know exactly
78160c6340caSmrg    ## what you are doing...
78170c6340caSmrg    _LT_COMPILER_PIC($1)
78180c6340caSmrg    _LT_COMPILER_C_O($1)
78190c6340caSmrg    _LT_COMPILER_FILE_LOCKS($1)
78200c6340caSmrg    _LT_LINKER_SHLIBS($1)
78210c6340caSmrg    _LT_SYS_DYNAMIC_LINKER($1)
78220c6340caSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
78230c6340caSmrg
78240c6340caSmrg    _LT_CONFIG($1)
78250c6340caSmrg  fi # test -n "$compiler"
78260c6340caSmrg
78270c6340caSmrg  GCC=$lt_save_GCC
78280c6340caSmrg  CC=$lt_save_CC
78290c6340caSmrg  CFLAGS=$lt_save_CFLAGS
78300c6340caSmrgfi # test yes != "$_lt_disable_F77"
78310c6340caSmrg
78320c6340caSmrgAC_LANG_POP
78330c6340caSmrg])# _LT_LANG_F77_CONFIG
78340c6340caSmrg
78350c6340caSmrg
78360c6340caSmrg# _LT_LANG_FC_CONFIG([TAG])
78370c6340caSmrg# -------------------------
78380c6340caSmrg# Ensure that the configuration variables for a Fortran compiler are
78390c6340caSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
78400c6340caSmrg# to write the compiler configuration to 'libtool'.
78410c6340caSmrgm4_defun([_LT_LANG_FC_CONFIG],
78420c6340caSmrg[AC_LANG_PUSH(Fortran)
78430c6340caSmrg
78440c6340caSmrgif test -z "$FC" || test no = "$FC"; then
78450c6340caSmrg  _lt_disable_FC=yes
78460c6340caSmrgfi
78470c6340caSmrg
78480c6340caSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
78490c6340caSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
78500c6340caSmrg_LT_TAGVAR(always_export_symbols, $1)=no
78510c6340caSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
78520c6340caSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
78530c6340caSmrg_LT_TAGVAR(hardcode_direct, $1)=no
78540c6340caSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
78550c6340caSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
78560c6340caSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
78570c6340caSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
78580c6340caSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
78590c6340caSmrg_LT_TAGVAR(inherit_rpath, $1)=no
78600c6340caSmrg_LT_TAGVAR(module_cmds, $1)=
78610c6340caSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
78620c6340caSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
78630c6340caSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
78640c6340caSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
78650c6340caSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
78660c6340caSmrg_LT_TAGVAR(no_undefined_flag, $1)=
78670c6340caSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
78680c6340caSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
78690c6340caSmrg
78700c6340caSmrg# Source file extension for fc test sources.
78710c6340caSmrgac_ext=${ac_fc_srcext-f}
78720c6340caSmrg
78730c6340caSmrg# Object file extension for compiled fc test sources.
78740c6340caSmrgobjext=o
78750c6340caSmrg_LT_TAGVAR(objext, $1)=$objext
78760c6340caSmrg
78770c6340caSmrg# No sense in running all these tests if we already determined that
78780c6340caSmrg# the FC compiler isn't working.  Some variables (like enable_shared)
78790c6340caSmrg# are currently assumed to apply to all compilers on this platform,
78800c6340caSmrg# and will be corrupted by setting them based on a non-working compiler.
78810c6340caSmrgif test yes != "$_lt_disable_FC"; then
78820c6340caSmrg  # Code to be used in simple compile tests
78830c6340caSmrg  lt_simple_compile_test_code="\
78840c6340caSmrg      subroutine t
78850c6340caSmrg      return
78860c6340caSmrg      end
78870c6340caSmrg"
78880c6340caSmrg
78890c6340caSmrg  # Code to be used in simple link tests
78900c6340caSmrg  lt_simple_link_test_code="\
78910c6340caSmrg      program t
78920c6340caSmrg      end
78930c6340caSmrg"
78940c6340caSmrg
78950c6340caSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
78960c6340caSmrg  _LT_TAG_COMPILER
78970c6340caSmrg
78980c6340caSmrg  # save warnings/boilerplate of simple test code
78990c6340caSmrg  _LT_COMPILER_BOILERPLATE
79000c6340caSmrg  _LT_LINKER_BOILERPLATE
79010c6340caSmrg
79020c6340caSmrg  # Allow CC to be a program name with arguments.
79030c6340caSmrg  lt_save_CC=$CC
79040c6340caSmrg  lt_save_GCC=$GCC
79050c6340caSmrg  lt_save_CFLAGS=$CFLAGS
79060c6340caSmrg  CC=${FC-"f95"}
79070c6340caSmrg  CFLAGS=$FCFLAGS
79080c6340caSmrg  compiler=$CC
79090c6340caSmrg  GCC=$ac_cv_fc_compiler_gnu
79100c6340caSmrg
79110c6340caSmrg  _LT_TAGVAR(compiler, $1)=$CC
79120c6340caSmrg  _LT_CC_BASENAME([$compiler])
79130c6340caSmrg
79140c6340caSmrg  if test -n "$compiler"; then
79150c6340caSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
79160c6340caSmrg    AC_MSG_RESULT([$can_build_shared])
79170c6340caSmrg
79180c6340caSmrg    AC_MSG_CHECKING([whether to build shared libraries])
79190c6340caSmrg    test no = "$can_build_shared" && enable_shared=no
79200c6340caSmrg
79210c6340caSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
79220c6340caSmrg    # are all built from PIC.
79230c6340caSmrg    case $host_os in
79240c6340caSmrg      aix3*)
79250c6340caSmrg        test yes = "$enable_shared" && enable_static=no
79260c6340caSmrg        if test -n "$RANLIB"; then
79270c6340caSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
79280c6340caSmrg          postinstall_cmds='$RANLIB $lib'
79290c6340caSmrg        fi
79300c6340caSmrg        ;;
79310c6340caSmrg      aix[[4-9]]*)
79320c6340caSmrg	if test ia64 != "$host_cpu"; then
79330c6340caSmrg	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
79340c6340caSmrg	  yes,aix,yes) ;;		# shared object as lib.so file only
79350c6340caSmrg	  yes,svr4,*) ;;		# shared object as lib.so archive member only
79360c6340caSmrg	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
79370c6340caSmrg	  esac
79380c6340caSmrg	fi
79390c6340caSmrg        ;;
79400c6340caSmrg    esac
79410c6340caSmrg    AC_MSG_RESULT([$enable_shared])
79420c6340caSmrg
79430c6340caSmrg    AC_MSG_CHECKING([whether to build static libraries])
79440c6340caSmrg    # Make sure either enable_shared or enable_static is yes.
79450c6340caSmrg    test yes = "$enable_shared" || enable_static=yes
79460c6340caSmrg    AC_MSG_RESULT([$enable_static])
79470c6340caSmrg
79480c6340caSmrg    _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
79490c6340caSmrg    _LT_TAGVAR(LD, $1)=$LD
79500c6340caSmrg
79510c6340caSmrg    ## CAVEAT EMPTOR:
79520c6340caSmrg    ## There is no encapsulation within the following macros, do not change
79530c6340caSmrg    ## the running order or otherwise move them around unless you know exactly
79540c6340caSmrg    ## what you are doing...
79550c6340caSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
79560c6340caSmrg    _LT_COMPILER_PIC($1)
79570c6340caSmrg    _LT_COMPILER_C_O($1)
79580c6340caSmrg    _LT_COMPILER_FILE_LOCKS($1)
79590c6340caSmrg    _LT_LINKER_SHLIBS($1)
79600c6340caSmrg    _LT_SYS_DYNAMIC_LINKER($1)
79610c6340caSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
79620c6340caSmrg
79630c6340caSmrg    _LT_CONFIG($1)
79640c6340caSmrg  fi # test -n "$compiler"
79650c6340caSmrg
79660c6340caSmrg  GCC=$lt_save_GCC
79670c6340caSmrg  CC=$lt_save_CC
79680c6340caSmrg  CFLAGS=$lt_save_CFLAGS
79690c6340caSmrgfi # test yes != "$_lt_disable_FC"
79700c6340caSmrg
79710c6340caSmrgAC_LANG_POP
79720c6340caSmrg])# _LT_LANG_FC_CONFIG
79730c6340caSmrg
79740c6340caSmrg
79750c6340caSmrg# _LT_LANG_GCJ_CONFIG([TAG])
79760c6340caSmrg# --------------------------
79770c6340caSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler
79780c6340caSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
79790c6340caSmrg# to write the compiler configuration to 'libtool'.
79800c6340caSmrgm4_defun([_LT_LANG_GCJ_CONFIG],
79810c6340caSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl
79820c6340caSmrgAC_LANG_SAVE
79830c6340caSmrg
79840c6340caSmrg# Source file extension for Java test sources.
79850c6340caSmrgac_ext=java
79860c6340caSmrg
79870c6340caSmrg# Object file extension for compiled Java test sources.
79880c6340caSmrgobjext=o
79890c6340caSmrg_LT_TAGVAR(objext, $1)=$objext
79900c6340caSmrg
79910c6340caSmrg# Code to be used in simple compile tests
79920c6340caSmrglt_simple_compile_test_code="class foo {}"
79930c6340caSmrg
79940c6340caSmrg# Code to be used in simple link tests
79950c6340caSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
79960c6340caSmrg
79970c6340caSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
79980c6340caSmrg_LT_TAG_COMPILER
79990c6340caSmrg
80000c6340caSmrg# save warnings/boilerplate of simple test code
80010c6340caSmrg_LT_COMPILER_BOILERPLATE
80020c6340caSmrg_LT_LINKER_BOILERPLATE
80030c6340caSmrg
80040c6340caSmrg# Allow CC to be a program name with arguments.
80050c6340caSmrglt_save_CC=$CC
80060c6340caSmrglt_save_CFLAGS=$CFLAGS
80070c6340caSmrglt_save_GCC=$GCC
80080c6340caSmrgGCC=yes
80090c6340caSmrgCC=${GCJ-"gcj"}
80100c6340caSmrgCFLAGS=$GCJFLAGS
80110c6340caSmrgcompiler=$CC
80120c6340caSmrg_LT_TAGVAR(compiler, $1)=$CC
80130c6340caSmrg_LT_TAGVAR(LD, $1)=$LD
80140c6340caSmrg_LT_CC_BASENAME([$compiler])
80150c6340caSmrg
80160c6340caSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
80170c6340caSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
80180c6340caSmrg
80190c6340caSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
80200c6340caSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
80210c6340caSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
80220c6340caSmrg
80230c6340caSmrg## CAVEAT EMPTOR:
80240c6340caSmrg## There is no encapsulation within the following macros, do not change
80250c6340caSmrg## the running order or otherwise move them around unless you know exactly
80260c6340caSmrg## what you are doing...
80270c6340caSmrgif test -n "$compiler"; then
80280c6340caSmrg  _LT_COMPILER_NO_RTTI($1)
80290c6340caSmrg  _LT_COMPILER_PIC($1)
80300c6340caSmrg  _LT_COMPILER_C_O($1)
80310c6340caSmrg  _LT_COMPILER_FILE_LOCKS($1)
80320c6340caSmrg  _LT_LINKER_SHLIBS($1)
80330c6340caSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
80340c6340caSmrg
80350c6340caSmrg  _LT_CONFIG($1)
80360c6340caSmrgfi
80370c6340caSmrg
80380c6340caSmrgAC_LANG_RESTORE
80390c6340caSmrg
80400c6340caSmrgGCC=$lt_save_GCC
80410c6340caSmrgCC=$lt_save_CC
80420c6340caSmrgCFLAGS=$lt_save_CFLAGS
80430c6340caSmrg])# _LT_LANG_GCJ_CONFIG
80440c6340caSmrg
80450c6340caSmrg
80460c6340caSmrg# _LT_LANG_GO_CONFIG([TAG])
80470c6340caSmrg# --------------------------
80480c6340caSmrg# Ensure that the configuration variables for the GNU Go compiler
80490c6340caSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
80500c6340caSmrg# to write the compiler configuration to 'libtool'.
80510c6340caSmrgm4_defun([_LT_LANG_GO_CONFIG],
80520c6340caSmrg[AC_REQUIRE([LT_PROG_GO])dnl
80530c6340caSmrgAC_LANG_SAVE
80540c6340caSmrg
80550c6340caSmrg# Source file extension for Go test sources.
80560c6340caSmrgac_ext=go
80570c6340caSmrg
80580c6340caSmrg# Object file extension for compiled Go test sources.
80590c6340caSmrgobjext=o
80600c6340caSmrg_LT_TAGVAR(objext, $1)=$objext
80610c6340caSmrg
80620c6340caSmrg# Code to be used in simple compile tests
80630c6340caSmrglt_simple_compile_test_code="package main; func main() { }"
80640c6340caSmrg
80650c6340caSmrg# Code to be used in simple link tests
80660c6340caSmrglt_simple_link_test_code='package main; func main() { }'
80670c6340caSmrg
80680c6340caSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
80690c6340caSmrg_LT_TAG_COMPILER
80700c6340caSmrg
80710c6340caSmrg# save warnings/boilerplate of simple test code
80720c6340caSmrg_LT_COMPILER_BOILERPLATE
80730c6340caSmrg_LT_LINKER_BOILERPLATE
80740c6340caSmrg
80750c6340caSmrg# Allow CC to be a program name with arguments.
80760c6340caSmrglt_save_CC=$CC
80770c6340caSmrglt_save_CFLAGS=$CFLAGS
80780c6340caSmrglt_save_GCC=$GCC
80790c6340caSmrgGCC=yes
80800c6340caSmrgCC=${GOC-"gccgo"}
80810c6340caSmrgCFLAGS=$GOFLAGS
80820c6340caSmrgcompiler=$CC
80830c6340caSmrg_LT_TAGVAR(compiler, $1)=$CC
80840c6340caSmrg_LT_TAGVAR(LD, $1)=$LD
80850c6340caSmrg_LT_CC_BASENAME([$compiler])
80860c6340caSmrg
80870c6340caSmrg# Go did not exist at the time GCC didn't implicitly link libc in.
80880c6340caSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
80890c6340caSmrg
80900c6340caSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
80910c6340caSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
80920c6340caSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
80930c6340caSmrg
80940c6340caSmrg## CAVEAT EMPTOR:
80950c6340caSmrg## There is no encapsulation within the following macros, do not change
80960c6340caSmrg## the running order or otherwise move them around unless you know exactly
80970c6340caSmrg## what you are doing...
80980c6340caSmrgif test -n "$compiler"; then
80990c6340caSmrg  _LT_COMPILER_NO_RTTI($1)
81000c6340caSmrg  _LT_COMPILER_PIC($1)
81010c6340caSmrg  _LT_COMPILER_C_O($1)
81020c6340caSmrg  _LT_COMPILER_FILE_LOCKS($1)
81030c6340caSmrg  _LT_LINKER_SHLIBS($1)
81040c6340caSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
81050c6340caSmrg
81060c6340caSmrg  _LT_CONFIG($1)
81070c6340caSmrgfi
81080c6340caSmrg
81090c6340caSmrgAC_LANG_RESTORE
81100c6340caSmrg
81110c6340caSmrgGCC=$lt_save_GCC
81120c6340caSmrgCC=$lt_save_CC
81130c6340caSmrgCFLAGS=$lt_save_CFLAGS
81140c6340caSmrg])# _LT_LANG_GO_CONFIG
81150c6340caSmrg
81160c6340caSmrg
81170c6340caSmrg# _LT_LANG_RC_CONFIG([TAG])
81180c6340caSmrg# -------------------------
81190c6340caSmrg# Ensure that the configuration variables for the Windows resource compiler
81200c6340caSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
81210c6340caSmrg# to write the compiler configuration to 'libtool'.
81220c6340caSmrgm4_defun([_LT_LANG_RC_CONFIG],
81230c6340caSmrg[AC_REQUIRE([LT_PROG_RC])dnl
81240c6340caSmrgAC_LANG_SAVE
81250c6340caSmrg
81260c6340caSmrg# Source file extension for RC test sources.
81270c6340caSmrgac_ext=rc
81280c6340caSmrg
81290c6340caSmrg# Object file extension for compiled RC test sources.
81300c6340caSmrgobjext=o
81310c6340caSmrg_LT_TAGVAR(objext, $1)=$objext
81320c6340caSmrg
81330c6340caSmrg# Code to be used in simple compile tests
81340c6340caSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
81350c6340caSmrg
81360c6340caSmrg# Code to be used in simple link tests
81370c6340caSmrglt_simple_link_test_code=$lt_simple_compile_test_code
81380c6340caSmrg
81390c6340caSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
81400c6340caSmrg_LT_TAG_COMPILER
81410c6340caSmrg
81420c6340caSmrg# save warnings/boilerplate of simple test code
81430c6340caSmrg_LT_COMPILER_BOILERPLATE
81440c6340caSmrg_LT_LINKER_BOILERPLATE
81450c6340caSmrg
81460c6340caSmrg# Allow CC to be a program name with arguments.
81470c6340caSmrglt_save_CC=$CC
81480c6340caSmrglt_save_CFLAGS=$CFLAGS
81490c6340caSmrglt_save_GCC=$GCC
81500c6340caSmrgGCC=
81510c6340caSmrgCC=${RC-"windres"}
81520c6340caSmrgCFLAGS=
81530c6340caSmrgcompiler=$CC
81540c6340caSmrg_LT_TAGVAR(compiler, $1)=$CC
81550c6340caSmrg_LT_CC_BASENAME([$compiler])
81560c6340caSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
81570c6340caSmrg
81580c6340caSmrgif test -n "$compiler"; then
81590c6340caSmrg  :
81600c6340caSmrg  _LT_CONFIG($1)
81610c6340caSmrgfi
81620c6340caSmrg
81630c6340caSmrgGCC=$lt_save_GCC
81640c6340caSmrgAC_LANG_RESTORE
81650c6340caSmrgCC=$lt_save_CC
81660c6340caSmrgCFLAGS=$lt_save_CFLAGS
81670c6340caSmrg])# _LT_LANG_RC_CONFIG
81680c6340caSmrg
81690c6340caSmrg
81700c6340caSmrg# LT_PROG_GCJ
81710c6340caSmrg# -----------
81720c6340caSmrgAC_DEFUN([LT_PROG_GCJ],
81730c6340caSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
81740c6340caSmrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
81750c6340caSmrg    [AC_CHECK_TOOL(GCJ, gcj,)
81760c6340caSmrg      test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
81770c6340caSmrg      AC_SUBST(GCJFLAGS)])])[]dnl
81780c6340caSmrg])
81790c6340caSmrg
81800c6340caSmrg# Old name:
81810c6340caSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
81820c6340caSmrgdnl aclocal-1.4 backwards compatibility:
81830c6340caSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
81840c6340caSmrg
81850c6340caSmrg
81860c6340caSmrg# LT_PROG_GO
81870c6340caSmrg# ----------
81880c6340caSmrgAC_DEFUN([LT_PROG_GO],
81890c6340caSmrg[AC_CHECK_TOOL(GOC, gccgo,)
81900c6340caSmrg])
81910c6340caSmrg
81920c6340caSmrg
81930c6340caSmrg# LT_PROG_RC
81940c6340caSmrg# ----------
81950c6340caSmrgAC_DEFUN([LT_PROG_RC],
81960c6340caSmrg[AC_CHECK_TOOL(RC, windres,)
81970c6340caSmrg])
81980c6340caSmrg
81990c6340caSmrg# Old name:
82000c6340caSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
82010c6340caSmrgdnl aclocal-1.4 backwards compatibility:
82020c6340caSmrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
82030c6340caSmrg
82040c6340caSmrg
82050c6340caSmrg# _LT_DECL_EGREP
82060c6340caSmrg# --------------
82070c6340caSmrg# If we don't have a new enough Autoconf to choose the best grep
82080c6340caSmrg# available, choose the one first in the user's PATH.
82090c6340caSmrgm4_defun([_LT_DECL_EGREP],
82100c6340caSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
82110c6340caSmrgAC_REQUIRE([AC_PROG_FGREP])dnl
82120c6340caSmrgtest -z "$GREP" && GREP=grep
82130c6340caSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
82140c6340caSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
82150c6340caSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
82160c6340caSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
82170c6340caSmrgAC_SUBST([GREP])
82180c6340caSmrg])
82190c6340caSmrg
82200c6340caSmrg
82210c6340caSmrg# _LT_DECL_OBJDUMP
82220c6340caSmrg# --------------
82230c6340caSmrg# If we don't have a new enough Autoconf to choose the best objdump
82240c6340caSmrg# available, choose the one first in the user's PATH.
82250c6340caSmrgm4_defun([_LT_DECL_OBJDUMP],
82260c6340caSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
82270c6340caSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
82280c6340caSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
82290c6340caSmrgAC_SUBST([OBJDUMP])
82300c6340caSmrg])
82310c6340caSmrg
82320c6340caSmrg# _LT_DECL_DLLTOOL
82330c6340caSmrg# ----------------
82340c6340caSmrg# Ensure DLLTOOL variable is set.
82350c6340caSmrgm4_defun([_LT_DECL_DLLTOOL],
82360c6340caSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
82370c6340caSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
82380c6340caSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
82390c6340caSmrgAC_SUBST([DLLTOOL])
82400c6340caSmrg])
82410c6340caSmrg
82420c6340caSmrg# _LT_DECL_FILECMD
82430c6340caSmrg# ----------------
82440c6340caSmrg# Check for a file(cmd) program that can be used to detect file type and magic
82450c6340caSmrgm4_defun([_LT_DECL_FILECMD],
82460c6340caSmrg[AC_CHECK_TOOL([FILECMD], [file], [:])
82470c6340caSmrg_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types])
82480c6340caSmrg])# _LD_DECL_FILECMD
82490c6340caSmrg
82500c6340caSmrg# _LT_DECL_SED
82510c6340caSmrg# ------------
82520c6340caSmrg# Check for a fully-functional sed program, that truncates
82530c6340caSmrg# as few characters as possible.  Prefer GNU sed if found.
82540c6340caSmrgm4_defun([_LT_DECL_SED],
82550c6340caSmrg[AC_PROG_SED
82560c6340caSmrgtest -z "$SED" && SED=sed
82570c6340caSmrgXsed="$SED -e 1s/^X//"
82580c6340caSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
82590c6340caSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
82600c6340caSmrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
82610c6340caSmrg])# _LT_DECL_SED
82620c6340caSmrg
82630c6340caSmrgm4_ifndef([AC_PROG_SED], [
82640c6340caSmrg############################################################
82650c6340caSmrg# NOTE: This macro has been submitted for inclusion into   #
82660c6340caSmrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
82670c6340caSmrg#  a released version of Autoconf we should remove this    #
82680c6340caSmrg#  macro and use it instead.                               #
82690c6340caSmrg############################################################
82700c6340caSmrg
82710c6340caSmrgm4_defun([AC_PROG_SED],
82720c6340caSmrg[AC_MSG_CHECKING([for a sed that does not truncate output])
82730c6340caSmrgAC_CACHE_VAL(lt_cv_path_SED,
82740c6340caSmrg[# Loop through the user's path and test for sed and gsed.
82750c6340caSmrg# Then use that list of sed's as ones to test for truncation.
82760c6340caSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
82770c6340caSmrgfor as_dir in $PATH
82780c6340caSmrgdo
82790c6340caSmrg  IFS=$as_save_IFS
82800c6340caSmrg  test -z "$as_dir" && as_dir=.
82810c6340caSmrg  for lt_ac_prog in sed gsed; do
82820c6340caSmrg    for ac_exec_ext in '' $ac_executable_extensions; do
82830c6340caSmrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
82840c6340caSmrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
82850c6340caSmrg      fi
82860c6340caSmrg    done
82870c6340caSmrg  done
82880c6340caSmrgdone
82890c6340caSmrgIFS=$as_save_IFS
82900c6340caSmrglt_ac_max=0
82910c6340caSmrglt_ac_count=0
82920c6340caSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
82930c6340caSmrg# along with /bin/sed that truncates output.
82940c6340caSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
82950c6340caSmrg  test ! -f "$lt_ac_sed" && continue
82960c6340caSmrg  cat /dev/null > conftest.in
82970c6340caSmrg  lt_ac_count=0
82980c6340caSmrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
82990c6340caSmrg  # Check for GNU sed and select it if it is found.
83000c6340caSmrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
83010c6340caSmrg    lt_cv_path_SED=$lt_ac_sed
83020c6340caSmrg    break
83030c6340caSmrg  fi
83040c6340caSmrg  while true; do
83050c6340caSmrg    cat conftest.in conftest.in >conftest.tmp
83060c6340caSmrg    mv conftest.tmp conftest.in
83070c6340caSmrg    cp conftest.in conftest.nl
83080c6340caSmrg    echo >>conftest.nl
83090c6340caSmrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
83100c6340caSmrg    cmp -s conftest.out conftest.nl || break
83110c6340caSmrg    # 10000 chars as input seems more than enough
83120c6340caSmrg    test 10 -lt "$lt_ac_count" && break
83130c6340caSmrg    lt_ac_count=`expr $lt_ac_count + 1`
83140c6340caSmrg    if test "$lt_ac_count" -gt "$lt_ac_max"; then
83150c6340caSmrg      lt_ac_max=$lt_ac_count
83160c6340caSmrg      lt_cv_path_SED=$lt_ac_sed
83170c6340caSmrg    fi
83180c6340caSmrg  done
83190c6340caSmrgdone
83200c6340caSmrg])
83210c6340caSmrgSED=$lt_cv_path_SED
83220c6340caSmrgAC_SUBST([SED])
83230c6340caSmrgAC_MSG_RESULT([$SED])
83240c6340caSmrg])#AC_PROG_SED
83250c6340caSmrg])#m4_ifndef
83260c6340caSmrg
83270c6340caSmrg# Old name:
83280c6340caSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
83290c6340caSmrgdnl aclocal-1.4 backwards compatibility:
83300c6340caSmrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
83310c6340caSmrg
83320c6340caSmrg
83330c6340caSmrg# _LT_CHECK_SHELL_FEATURES
83340c6340caSmrg# ------------------------
83350c6340caSmrg# Find out whether the shell is Bourne or XSI compatible,
83360c6340caSmrg# or has some other useful features.
83370c6340caSmrgm4_defun([_LT_CHECK_SHELL_FEATURES],
83380c6340caSmrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
83390c6340caSmrg  lt_unset=unset
83400c6340caSmrgelse
83410c6340caSmrg  lt_unset=false
83420c6340caSmrgfi
83430c6340caSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
83440c6340caSmrg
83450c6340caSmrg# test EBCDIC or ASCII
83460c6340caSmrgcase `echo X|tr X '\101'` in
83470c6340caSmrg A) # ASCII based system
83480c6340caSmrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
83490c6340caSmrg  lt_SP2NL='tr \040 \012'
83500c6340caSmrg  lt_NL2SP='tr \015\012 \040\040'
83510c6340caSmrg  ;;
83520c6340caSmrg *) # EBCDIC based system
83530c6340caSmrg  lt_SP2NL='tr \100 \n'
83540c6340caSmrg  lt_NL2SP='tr \r\n \100\100'
83550c6340caSmrg  ;;
83560c6340caSmrgesac
83570c6340caSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
83580c6340caSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
83590c6340caSmrg])# _LT_CHECK_SHELL_FEATURES
83600c6340caSmrg
83610c6340caSmrg
83620c6340caSmrg# _LT_PATH_CONVERSION_FUNCTIONS
83630c6340caSmrg# -----------------------------
83640c6340caSmrg# Determine what file name conversion functions should be used by
83650c6340caSmrg# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
83660c6340caSmrg# for certain cross-compile configurations and native mingw.
83670c6340caSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
83680c6340caSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
83690c6340caSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
83700c6340caSmrgAC_MSG_CHECKING([how to convert $build file names to $host format])
83710c6340caSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd,
83720c6340caSmrg[case $host in
83730c6340caSmrg  *-*-mingw* )
83740c6340caSmrg    case $build in
83750c6340caSmrg      *-*-mingw* ) # actually msys
83760c6340caSmrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
83770c6340caSmrg        ;;
83780c6340caSmrg      *-*-cygwin* )
83790c6340caSmrg        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
83800c6340caSmrg        ;;
83810c6340caSmrg      * ) # otherwise, assume *nix
83820c6340caSmrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
83830c6340caSmrg        ;;
83840c6340caSmrg    esac
83850c6340caSmrg    ;;
83860c6340caSmrg  *-*-cygwin* )
83870c6340caSmrg    case $build in
83880c6340caSmrg      *-*-mingw* ) # actually msys
83890c6340caSmrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
83900c6340caSmrg        ;;
83910c6340caSmrg      *-*-cygwin* )
83920c6340caSmrg        lt_cv_to_host_file_cmd=func_convert_file_noop
83930c6340caSmrg        ;;
83940c6340caSmrg      * ) # otherwise, assume *nix
83950c6340caSmrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
83960c6340caSmrg        ;;
83970c6340caSmrg    esac
83980c6340caSmrg    ;;
83990c6340caSmrg  * ) # unhandled hosts (and "normal" native builds)
84000c6340caSmrg    lt_cv_to_host_file_cmd=func_convert_file_noop
84010c6340caSmrg    ;;
84020c6340caSmrgesac
84030c6340caSmrg])
84040c6340caSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd
84050c6340caSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd])
84060c6340caSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
84070c6340caSmrg         [0], [convert $build file names to $host format])dnl
84080c6340caSmrg
84090c6340caSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format])
84100c6340caSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd,
84110c6340caSmrg[#assume ordinary cross tools, or native build.
84120c6340caSmrglt_cv_to_tool_file_cmd=func_convert_file_noop
84130c6340caSmrgcase $host in
84140c6340caSmrg  *-*-mingw* )
84150c6340caSmrg    case $build in
84160c6340caSmrg      *-*-mingw* ) # actually msys
84170c6340caSmrg        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
84180c6340caSmrg        ;;
84190c6340caSmrg    esac
84200c6340caSmrg    ;;
84210c6340caSmrgesac
84220c6340caSmrg])
84230c6340caSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd
84240c6340caSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
84250c6340caSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
84260c6340caSmrg         [0], [convert $build files to toolchain format])dnl
84270c6340caSmrg])# _LT_PATH_CONVERSION_FUNCTIONS
8428