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