libtool.m4 revision 7204935c
11016ad83Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
21016ad83Smrg#
37204935cSmrg#   Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
41016ad83Smrg#   Written by Gordon Matzigkeit, 1996
51016ad83Smrg#
61016ad83Smrg# This file is free software; the Free Software Foundation gives
71016ad83Smrg# unlimited permission to copy and/or distribute it, with or without
81016ad83Smrg# modifications, as long as this notice is preserved.
91016ad83Smrg
101016ad83Smrgm4_define([_LT_COPYING], [dnl
117204935cSmrg# Copyright (C) 2014 Free Software Foundation, Inc.
127204935cSmrg# This is free software; see the source for copying conditions.  There is NO
137204935cSmrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
147204935cSmrg
157204935cSmrg# GNU Libtool is free software; you can redistribute it and/or modify
167204935cSmrg# it under the terms of the GNU General Public License as published by
177204935cSmrg# the Free Software Foundation; either version 2 of of the License, or
187204935cSmrg# (at your option) any later version.
191016ad83Smrg#
207204935cSmrg# As a special exception to the GNU General Public License, if you
217204935cSmrg# distribute this file as part of a program or library that is built
227204935cSmrg# using GNU Libtool, you may include this file under the  same
237204935cSmrg# distribution terms that you use for the rest of that program.
241016ad83Smrg#
257204935cSmrg# GNU Libtool is distributed in the hope that it will be useful, but
267204935cSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
271016ad83Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
281016ad83Smrg# GNU General Public License for more details.
291016ad83Smrg#
301016ad83Smrg# You should have received a copy of the GNU General Public License
317204935cSmrg# along with this program.  If not, see <http://www.gnu.org/licenses/>.
321016ad83Smrg])
331016ad83Smrg
347204935cSmrg# serial 58 LT_INIT
351016ad83Smrg
361016ad83Smrg
371016ad83Smrg# LT_PREREQ(VERSION)
381016ad83Smrg# ------------------
391016ad83Smrg# Complain and exit if this libtool version is less that VERSION.
401016ad83Smrgm4_defun([LT_PREREQ],
411016ad83Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
421016ad83Smrg       [m4_default([$3],
431016ad83Smrg		   [m4_fatal([Libtool version $1 or higher is required],
441016ad83Smrg		             63)])],
451016ad83Smrg       [$2])])
461016ad83Smrg
471016ad83Smrg
481016ad83Smrg# _LT_CHECK_BUILDDIR
491016ad83Smrg# ------------------
501016ad83Smrg# Complain if the absolute build directory name contains unusual characters
511016ad83Smrgm4_defun([_LT_CHECK_BUILDDIR],
521016ad83Smrg[case `pwd` in
531016ad83Smrg  *\ * | *\	*)
541016ad83Smrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
551016ad83Smrgesac
561016ad83Smrg])
571016ad83Smrg
581016ad83Smrg
591016ad83Smrg# LT_INIT([OPTIONS])
601016ad83Smrg# ------------------
611016ad83SmrgAC_DEFUN([LT_INIT],
627204935cSmrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
631016ad83SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
641016ad83SmrgAC_BEFORE([$0], [LT_LANG])dnl
651016ad83SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
661016ad83SmrgAC_BEFORE([$0], [LTDL_INIT])dnl
671016ad83Smrgm4_require([_LT_CHECK_BUILDDIR])dnl
681016ad83Smrg
691016ad83Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
701016ad83Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
711016ad83Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
721016ad83Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
731016ad83Smrgdnl unless we require an AC_DEFUNed macro:
741016ad83SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
751016ad83SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
761016ad83SmrgAC_REQUIRE([LTVERSION_VERSION])dnl
771016ad83SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
781016ad83Smrgm4_require([_LT_PROG_LTMAIN])dnl
791016ad83Smrg
801016ad83Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
811016ad83Smrg
821016ad83Smrgdnl Parse OPTIONS
831016ad83Smrg_LT_SET_OPTIONS([$0], [$1])
841016ad83Smrg
851016ad83Smrg# This can be used to rebuild libtool when needed
867204935cSmrgLIBTOOL_DEPS=$ltmain
871016ad83Smrg
881016ad83Smrg# Always use our own libtool.
891016ad83SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
901016ad83SmrgAC_SUBST(LIBTOOL)dnl
911016ad83Smrg
921016ad83Smrg_LT_SETUP
931016ad83Smrg
941016ad83Smrg# Only expand once:
951016ad83Smrgm4_define([LT_INIT])
961016ad83Smrg])# LT_INIT
971016ad83Smrg
981016ad83Smrg# Old names:
991016ad83SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1001016ad83SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1011016ad83Smrgdnl aclocal-1.4 backwards compatibility:
1021016ad83Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1031016ad83Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1041016ad83Smrg
1051016ad83Smrg
1067204935cSmrg# _LT_PREPARE_CC_BASENAME
1077204935cSmrg# -----------------------
1087204935cSmrgm4_defun([_LT_PREPARE_CC_BASENAME], [
1097204935cSmrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1107204935cSmrgfunc_cc_basename ()
1117204935cSmrg{
1127204935cSmrg    for cc_temp in @S|@*""; do
1137204935cSmrg      case $cc_temp in
1147204935cSmrg        compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1157204935cSmrg        distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1167204935cSmrg        \-*) ;;
1177204935cSmrg        *) break;;
1187204935cSmrg      esac
1197204935cSmrg    done
1207204935cSmrg    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
1217204935cSmrg}
1227204935cSmrg])# _LT_PREPARE_CC_BASENAME
1237204935cSmrg
1247204935cSmrg
1251016ad83Smrg# _LT_CC_BASENAME(CC)
1261016ad83Smrg# -------------------
1277204935cSmrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
1287204935cSmrg# but that macro is also expanded into generated libtool script, which
1297204935cSmrg# arranges for $SED and $ECHO to be set by different means.
1301016ad83Smrgm4_defun([_LT_CC_BASENAME],
1317204935cSmrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl
1327204935cSmrgAC_REQUIRE([_LT_DECL_SED])dnl
1337204935cSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1347204935cSmrgfunc_cc_basename $1
1357204935cSmrgcc_basename=$func_cc_basename_result
1361016ad83Smrg])
1371016ad83Smrg
1381016ad83Smrg
1391016ad83Smrg# _LT_FILEUTILS_DEFAULTS
1401016ad83Smrg# ----------------------
1411016ad83Smrg# It is okay to use these file commands and assume they have been set
1427204935cSmrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
1431016ad83Smrgm4_defun([_LT_FILEUTILS_DEFAULTS],
1441016ad83Smrg[: ${CP="cp -f"}
1451016ad83Smrg: ${MV="mv -f"}
1461016ad83Smrg: ${RM="rm -f"}
1471016ad83Smrg])# _LT_FILEUTILS_DEFAULTS
1481016ad83Smrg
1491016ad83Smrg
1501016ad83Smrg# _LT_SETUP
1511016ad83Smrg# ---------
1521016ad83Smrgm4_defun([_LT_SETUP],
1531016ad83Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1541016ad83SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
1551016ad83SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
1561016ad83SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1571016ad83Smrg
1581016ad83Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
1591016ad83Smrgdnl
1601016ad83Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl
1611016ad83Smrg_LT_DECL([], [host], [0])dnl
1621016ad83Smrg_LT_DECL([], [host_os], [0])dnl
1631016ad83Smrgdnl
1641016ad83Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl
1651016ad83Smrg_LT_DECL([], [build], [0])dnl
1661016ad83Smrg_LT_DECL([], [build_os], [0])dnl
1671016ad83Smrgdnl
1681016ad83SmrgAC_REQUIRE([AC_PROG_CC])dnl
1691016ad83SmrgAC_REQUIRE([LT_PATH_LD])dnl
1701016ad83SmrgAC_REQUIRE([LT_PATH_NM])dnl
1711016ad83Smrgdnl
1721016ad83SmrgAC_REQUIRE([AC_PROG_LN_S])dnl
1731016ad83Smrgtest -z "$LN_S" && LN_S="ln -s"
1741016ad83Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1751016ad83Smrgdnl
1761016ad83SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
1771016ad83Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1781016ad83Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1791016ad83Smrgdnl
1801016ad83Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
1811016ad83Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
1821016ad83Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
1831016ad83Smrgm4_require([_LT_CMD_RELOAD])dnl
1841016ad83Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
1851016ad83Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
1861016ad83Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
1871016ad83Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1881016ad83Smrgm4_require([_LT_WITH_SYSROOT])dnl
1897204935cSmrgm4_require([_LT_CMD_TRUNCATE])dnl
1901016ad83Smrg
1911016ad83Smrg_LT_CONFIG_LIBTOOL_INIT([
1927204935cSmrg# See if we are running on zsh, and set the options that allow our
1931016ad83Smrg# commands through without removal of \ escapes INIT.
1947204935cSmrgif test -n "\${ZSH_VERSION+set}"; then
1951016ad83Smrg   setopt NO_GLOB_SUBST
1961016ad83Smrgfi
1971016ad83Smrg])
1987204935cSmrgif test -n "${ZSH_VERSION+set}"; then
1991016ad83Smrg   setopt NO_GLOB_SUBST
2001016ad83Smrgfi
2011016ad83Smrg
2021016ad83Smrg_LT_CHECK_OBJDIR
2031016ad83Smrg
2041016ad83Smrgm4_require([_LT_TAG_COMPILER])dnl
2051016ad83Smrg
2061016ad83Smrgcase $host_os in
2071016ad83Smrgaix3*)
2081016ad83Smrg  # AIX sometimes has problems with the GCC collect2 program.  For some
2091016ad83Smrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
2101016ad83Smrg  # vanish in a puff of smoke.
2117204935cSmrg  if test set != "${COLLECT_NAMES+set}"; then
2121016ad83Smrg    COLLECT_NAMES=
2131016ad83Smrg    export COLLECT_NAMES
2141016ad83Smrg  fi
2151016ad83Smrg  ;;
2161016ad83Smrgesac
2171016ad83Smrg
2181016ad83Smrg# Global variables:
2191016ad83Smrgofile=libtool
2201016ad83Smrgcan_build_shared=yes
2211016ad83Smrg
2227204935cSmrg# All known linkers require a '.a' archive for static linking (except MSVC,
2231016ad83Smrg# which needs '.lib').
2241016ad83Smrglibext=a
2251016ad83Smrg
2267204935cSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
2271016ad83Smrg
2287204935cSmrgold_CC=$CC
2297204935cSmrgold_CFLAGS=$CFLAGS
2301016ad83Smrg
2311016ad83Smrg# Set sane defaults for various variables
2321016ad83Smrgtest -z "$CC" && CC=cc
2331016ad83Smrgtest -z "$LTCC" && LTCC=$CC
2341016ad83Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
2351016ad83Smrgtest -z "$LD" && LD=ld
2361016ad83Smrgtest -z "$ac_objext" && ac_objext=o
2371016ad83Smrg
2381016ad83Smrg_LT_CC_BASENAME([$compiler])
2391016ad83Smrg
2401016ad83Smrg# Only perform the check for file, if the check method requires it
2411016ad83Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
2421016ad83Smrgcase $deplibs_check_method in
2431016ad83Smrgfile_magic*)
2441016ad83Smrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2451016ad83Smrg    _LT_PATH_MAGIC
2461016ad83Smrg  fi
2471016ad83Smrg  ;;
2481016ad83Smrgesac
2491016ad83Smrg
2501016ad83Smrg# Use C for the default configuration in the libtool script
2511016ad83SmrgLT_SUPPORTED_TAG([CC])
2521016ad83Smrg_LT_LANG_C_CONFIG
2531016ad83Smrg_LT_LANG_DEFAULT_CONFIG
2541016ad83Smrg_LT_CONFIG_COMMANDS
2551016ad83Smrg])# _LT_SETUP
2561016ad83Smrg
2571016ad83Smrg
2581016ad83Smrg# _LT_PREPARE_SED_QUOTE_VARS
2591016ad83Smrg# --------------------------
2601016ad83Smrg# Define a few sed substitution that help us do robust quoting.
2611016ad83Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS],
2621016ad83Smrg[# Backslashify metacharacters that are still active within
2631016ad83Smrg# double-quoted strings.
2641016ad83Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
2651016ad83Smrg
2661016ad83Smrg# Same as above, but do not quote variable references.
2671016ad83Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
2681016ad83Smrg
2691016ad83Smrg# Sed substitution to delay expansion of an escaped shell variable in a
2701016ad83Smrg# double_quote_subst'ed string.
2711016ad83Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
2721016ad83Smrg
2731016ad83Smrg# Sed substitution to delay expansion of an escaped single quote.
2741016ad83Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
2751016ad83Smrg
2761016ad83Smrg# Sed substitution to avoid accidental globbing in evaled expressions
2771016ad83Smrgno_glob_subst='s/\*/\\\*/g'
2781016ad83Smrg])
2791016ad83Smrg
2801016ad83Smrg# _LT_PROG_LTMAIN
2811016ad83Smrg# ---------------
2827204935cSmrg# Note that this code is called both from 'configure', and 'config.status'
2831016ad83Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
2847204935cSmrg# 'config.status' has no value for ac_aux_dir unless we are using Automake,
2851016ad83Smrg# so we pass a copy along to make sure it has a sensible value anyway.
2861016ad83Smrgm4_defun([_LT_PROG_LTMAIN],
2871016ad83Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
2881016ad83Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
2897204935cSmrgltmain=$ac_aux_dir/ltmain.sh
2901016ad83Smrg])# _LT_PROG_LTMAIN
2911016ad83Smrg
2921016ad83Smrg
2931016ad83Smrg## ------------------------------------- ##
2941016ad83Smrg## Accumulate code for creating libtool. ##
2951016ad83Smrg## ------------------------------------- ##
2961016ad83Smrg
2971016ad83Smrg# So that we can recreate a full libtool script including additional
2981016ad83Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
2997204935cSmrg# in macros and then make a single call at the end using the 'libtool'
3001016ad83Smrg# label.
3011016ad83Smrg
3021016ad83Smrg
3031016ad83Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
3041016ad83Smrg# ----------------------------------------
3051016ad83Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
3061016ad83Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
3071016ad83Smrg[m4_ifval([$1],
3081016ad83Smrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
3091016ad83Smrg                     [$1
3101016ad83Smrg])])])
3111016ad83Smrg
3121016ad83Smrg# Initialize.
3131016ad83Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
3141016ad83Smrg
3151016ad83Smrg
3161016ad83Smrg# _LT_CONFIG_LIBTOOL([COMMANDS])
3171016ad83Smrg# ------------------------------
3181016ad83Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
3191016ad83Smrgm4_define([_LT_CONFIG_LIBTOOL],
3201016ad83Smrg[m4_ifval([$1],
3211016ad83Smrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
3221016ad83Smrg                     [$1
3231016ad83Smrg])])])
3241016ad83Smrg
3251016ad83Smrg# Initialize.
3261016ad83Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
3271016ad83Smrg
3281016ad83Smrg
3291016ad83Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
3301016ad83Smrg# -----------------------------------------------------
3311016ad83Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
3321016ad83Smrg[_LT_CONFIG_LIBTOOL([$1])
3331016ad83Smrg_LT_CONFIG_LIBTOOL_INIT([$2])
3341016ad83Smrg])
3351016ad83Smrg
3361016ad83Smrg
3371016ad83Smrg# _LT_FORMAT_COMMENT([COMMENT])
3381016ad83Smrg# -----------------------------
3391016ad83Smrg# Add leading comment marks to the start of each line, and a trailing
3401016ad83Smrg# full-stop to the whole comment if one is not present already.
3411016ad83Smrgm4_define([_LT_FORMAT_COMMENT],
3421016ad83Smrg[m4_ifval([$1], [
3431016ad83Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
3441016ad83Smrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
3451016ad83Smrg)])
3461016ad83Smrg
3471016ad83Smrg
3481016ad83Smrg
3491016ad83Smrg## ------------------------ ##
3501016ad83Smrg## FIXME: Eliminate VARNAME ##
3511016ad83Smrg## ------------------------ ##
3521016ad83Smrg
3531016ad83Smrg
3541016ad83Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
3551016ad83Smrg# -------------------------------------------------------------------
3561016ad83Smrg# CONFIGNAME is the name given to the value in the libtool script.
3571016ad83Smrg# VARNAME is the (base) name used in the configure script.
3581016ad83Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
3591016ad83Smrg# VARNAME.  Any other value will be used directly.
3601016ad83Smrgm4_define([_LT_DECL],
3611016ad83Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
3621016ad83Smrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
3631016ad83Smrg	[m4_ifval([$1], [$1], [$2])])
3641016ad83Smrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
3651016ad83Smrg    m4_ifval([$4],
3661016ad83Smrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
3671016ad83Smrg    lt_dict_add_subkey([lt_decl_dict], [$2],
3681016ad83Smrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
3691016ad83Smrg])
3701016ad83Smrg
3711016ad83Smrg
3721016ad83Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
3731016ad83Smrg# --------------------------------------------------------
3741016ad83Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
3751016ad83Smrg
3761016ad83Smrg
3771016ad83Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
3781016ad83Smrg# ------------------------------------------------
3791016ad83Smrgm4_define([lt_decl_tag_varnames],
3801016ad83Smrg[_lt_decl_filter([tagged?], [yes], $@)])
3811016ad83Smrg
3821016ad83Smrg
3831016ad83Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
3841016ad83Smrg# ---------------------------------------------------------
3851016ad83Smrgm4_define([_lt_decl_filter],
3861016ad83Smrg[m4_case([$#],
3871016ad83Smrg  [0], [m4_fatal([$0: too few arguments: $#])],
3881016ad83Smrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
3891016ad83Smrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
3901016ad83Smrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
3911016ad83Smrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
3921016ad83Smrg])
3931016ad83Smrg
3941016ad83Smrg
3951016ad83Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
3961016ad83Smrg# --------------------------------------------------
3971016ad83Smrgm4_define([lt_decl_quote_varnames],
3981016ad83Smrg[_lt_decl_filter([value], [1], $@)])
3991016ad83Smrg
4001016ad83Smrg
4011016ad83Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
4021016ad83Smrg# ---------------------------------------------------
4031016ad83Smrgm4_define([lt_decl_dquote_varnames],
4041016ad83Smrg[_lt_decl_filter([value], [2], $@)])
4051016ad83Smrg
4061016ad83Smrg
4071016ad83Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
4081016ad83Smrg# ---------------------------------------------------
4091016ad83Smrgm4_define([lt_decl_varnames_tagged],
4101016ad83Smrg[m4_assert([$# <= 2])dnl
4111016ad83Smrg_$0(m4_quote(m4_default([$1], [[, ]])),
4121016ad83Smrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
4131016ad83Smrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
4141016ad83Smrgm4_define([_lt_decl_varnames_tagged],
4151016ad83Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
4161016ad83Smrg
4171016ad83Smrg
4181016ad83Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
4191016ad83Smrg# ------------------------------------------------
4201016ad83Smrgm4_define([lt_decl_all_varnames],
4211016ad83Smrg[_$0(m4_quote(m4_default([$1], [[, ]])),
4221016ad83Smrg     m4_if([$2], [],
4231016ad83Smrg	   m4_quote(lt_decl_varnames),
4241016ad83Smrg	m4_quote(m4_shift($@))))[]dnl
4251016ad83Smrg])
4261016ad83Smrgm4_define([_lt_decl_all_varnames],
4271016ad83Smrg[lt_join($@, lt_decl_varnames_tagged([$1],
4281016ad83Smrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
4291016ad83Smrg])
4301016ad83Smrg
4311016ad83Smrg
4321016ad83Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
4331016ad83Smrg# ------------------------------------
4347204935cSmrg# Quote a variable value, and forward it to 'config.status' so that its
4357204935cSmrg# declaration there will have the same value as in 'configure'.  VARNAME
4361016ad83Smrg# must have a single quote delimited value for this to work.
4371016ad83Smrgm4_define([_LT_CONFIG_STATUS_DECLARE],
4381016ad83Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
4391016ad83Smrg
4401016ad83Smrg
4411016ad83Smrg# _LT_CONFIG_STATUS_DECLARATIONS
4421016ad83Smrg# ------------------------------
4431016ad83Smrg# We delimit libtool config variables with single quotes, so when
4441016ad83Smrg# we write them to config.status, we have to be sure to quote all
4451016ad83Smrg# embedded single quotes properly.  In configure, this macro expands
4461016ad83Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
4471016ad83Smrg#
4481016ad83Smrg#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
4491016ad83Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
4501016ad83Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
4511016ad83Smrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
4521016ad83Smrg
4531016ad83Smrg
4541016ad83Smrg# _LT_LIBTOOL_TAGS
4551016ad83Smrg# ----------------
4561016ad83Smrg# Output comment and list of tags supported by the script
4571016ad83Smrgm4_defun([_LT_LIBTOOL_TAGS],
4581016ad83Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
4597204935cSmrgavailable_tags='_LT_TAGS'dnl
4601016ad83Smrg])
4611016ad83Smrg
4621016ad83Smrg
4631016ad83Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
4641016ad83Smrg# -----------------------------------
4651016ad83Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and
4661016ad83Smrg# expand to a commented shell variable setting:
4671016ad83Smrg#
4681016ad83Smrg#    # Some comment about what VAR is for.
4691016ad83Smrg#    visible_name=$lt_internal_name
4701016ad83Smrgm4_define([_LT_LIBTOOL_DECLARE],
4711016ad83Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
4721016ad83Smrg					   [description])))[]dnl
4731016ad83Smrgm4_pushdef([_libtool_name],
4741016ad83Smrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
4751016ad83Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
4761016ad83Smrg    [0], [_libtool_name=[$]$1],
4771016ad83Smrg    [1], [_libtool_name=$lt_[]$1],
4781016ad83Smrg    [2], [_libtool_name=$lt_[]$1],
4791016ad83Smrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
4801016ad83Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
4811016ad83Smrg])
4821016ad83Smrg
4831016ad83Smrg
4841016ad83Smrg# _LT_LIBTOOL_CONFIG_VARS
4851016ad83Smrg# -----------------------
4861016ad83Smrg# Produce commented declarations of non-tagged libtool config variables
4877204935cSmrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
4881016ad83Smrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
4891016ad83Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
4901016ad83Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
4911016ad83Smrg[m4_foreach([_lt_var],
4921016ad83Smrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
4931016ad83Smrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
4941016ad83Smrg
4951016ad83Smrg
4961016ad83Smrg# _LT_LIBTOOL_TAG_VARS(TAG)
4971016ad83Smrg# -------------------------
4981016ad83Smrgm4_define([_LT_LIBTOOL_TAG_VARS],
4991016ad83Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
5001016ad83Smrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
5011016ad83Smrg
5021016ad83Smrg
5031016ad83Smrg# _LT_TAGVAR(VARNAME, [TAGNAME])
5041016ad83Smrg# ------------------------------
5051016ad83Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
5061016ad83Smrg
5071016ad83Smrg
5081016ad83Smrg# _LT_CONFIG_COMMANDS
5091016ad83Smrg# -------------------
5101016ad83Smrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
5111016ad83Smrg# variables for single and double quote escaping we saved from calls
5121016ad83Smrg# to _LT_DECL, we can put quote escaped variables declarations
5137204935cSmrg# into 'config.status', and then the shell code to quote escape them in
5147204935cSmrg# for loops in 'config.status'.  Finally, any additional code accumulated
5151016ad83Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
5161016ad83Smrgm4_defun([_LT_CONFIG_COMMANDS],
5171016ad83Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
5181016ad83Smrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
5191016ad83Smrg	dnl instead of duplicating it all over again into config.status,
5201016ad83Smrg	dnl then we will have config.status run $CONFIG_LT later, so it
5211016ad83Smrg	dnl needs to know what name is stored there:
5221016ad83Smrg        [AC_CONFIG_COMMANDS([libtool],
5231016ad83Smrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
5241016ad83Smrg    dnl If the libtool generation code is destined for config.status,
5251016ad83Smrg    dnl expand the accumulated commands and init code now:
5261016ad83Smrg    [AC_CONFIG_COMMANDS([libtool],
5271016ad83Smrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
5281016ad83Smrg])#_LT_CONFIG_COMMANDS
5291016ad83Smrg
5301016ad83Smrg
5311016ad83Smrg# Initialize.
5321016ad83Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
5331016ad83Smrg[
5341016ad83Smrg
5351016ad83Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
5361016ad83Smrg# if CDPATH is set.
5371016ad83Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5381016ad83Smrg
5391016ad83Smrgsed_quote_subst='$sed_quote_subst'
5401016ad83Smrgdouble_quote_subst='$double_quote_subst'
5411016ad83Smrgdelay_variable_subst='$delay_variable_subst'
5421016ad83Smrg_LT_CONFIG_STATUS_DECLARATIONS
5431016ad83SmrgLTCC='$LTCC'
5441016ad83SmrgLTCFLAGS='$LTCFLAGS'
5451016ad83Smrgcompiler='$compiler_DEFAULT'
5461016ad83Smrg
5471016ad83Smrg# A function that is used when there is no print builtin or printf.
5481016ad83Smrgfunc_fallback_echo ()
5491016ad83Smrg{
5501016ad83Smrg  eval 'cat <<_LTECHO_EOF
5511016ad83Smrg\$[]1
5521016ad83Smrg_LTECHO_EOF'
5531016ad83Smrg}
5541016ad83Smrg
5551016ad83Smrg# Quote evaled strings.
5561016ad83Smrgfor var in lt_decl_all_varnames([[ \
5571016ad83Smrg]], lt_decl_quote_varnames); do
5581016ad83Smrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
5591016ad83Smrg    *[[\\\\\\\`\\"\\\$]]*)
5607204935cSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
5611016ad83Smrg      ;;
5621016ad83Smrg    *)
5631016ad83Smrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
5641016ad83Smrg      ;;
5651016ad83Smrg    esac
5661016ad83Smrgdone
5671016ad83Smrg
5681016ad83Smrg# Double-quote double-evaled strings.
5691016ad83Smrgfor var in lt_decl_all_varnames([[ \
5701016ad83Smrg]], lt_decl_dquote_varnames); do
5711016ad83Smrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
5721016ad83Smrg    *[[\\\\\\\`\\"\\\$]]*)
5737204935cSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
5741016ad83Smrg      ;;
5751016ad83Smrg    *)
5761016ad83Smrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
5771016ad83Smrg      ;;
5781016ad83Smrg    esac
5791016ad83Smrgdone
5801016ad83Smrg
5811016ad83Smrg_LT_OUTPUT_LIBTOOL_INIT
5821016ad83Smrg])
5831016ad83Smrg
5841016ad83Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
5851016ad83Smrg# ------------------------------------
5861016ad83Smrg# Generate a child script FILE with all initialization necessary to
5871016ad83Smrg# reuse the environment learned by the parent script, and make the
5881016ad83Smrg# file executable.  If COMMENT is supplied, it is inserted after the
5897204935cSmrg# '#!' sequence but before initialization text begins.  After this
5901016ad83Smrg# macro, additional text can be appended to FILE to form the body of
5911016ad83Smrg# the child script.  The macro ends with non-zero status if the
5921016ad83Smrg# file could not be fully written (such as if the disk is full).
5931016ad83Smrgm4_ifdef([AS_INIT_GENERATED],
5941016ad83Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
5951016ad83Smrg[m4_defun([_LT_GENERATED_FILE_INIT],
5961016ad83Smrg[m4_require([AS_PREPARE])]dnl
5971016ad83Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
5981016ad83Smrg[lt_write_fail=0
5991016ad83Smrgcat >$1 <<_ASEOF || lt_write_fail=1
6001016ad83Smrg#! $SHELL
6011016ad83Smrg# Generated by $as_me.
6021016ad83Smrg$2
6031016ad83SmrgSHELL=\${CONFIG_SHELL-$SHELL}
6041016ad83Smrgexport SHELL
6051016ad83Smrg_ASEOF
6061016ad83Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1
6071016ad83SmrgAS_SHELL_SANITIZE
6081016ad83Smrg_AS_PREPARE
6091016ad83Smrgexec AS_MESSAGE_FD>&1
6101016ad83Smrg_ASEOF
6117204935cSmrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl
6121016ad83Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
6131016ad83Smrg
6141016ad83Smrg# LT_OUTPUT
6151016ad83Smrg# ---------
6161016ad83Smrg# This macro allows early generation of the libtool script (before
6171016ad83Smrg# AC_OUTPUT is called), incase it is used in configure for compilation
6181016ad83Smrg# tests.
6191016ad83SmrgAC_DEFUN([LT_OUTPUT],
6201016ad83Smrg[: ${CONFIG_LT=./config.lt}
6211016ad83SmrgAC_MSG_NOTICE([creating $CONFIG_LT])
6221016ad83Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
6231016ad83Smrg[# Run this file to recreate a libtool stub with the current configuration.])
6241016ad83Smrg
6251016ad83Smrgcat >>"$CONFIG_LT" <<\_LTEOF
6261016ad83Smrglt_cl_silent=false
6271016ad83Smrgexec AS_MESSAGE_LOG_FD>>config.log
6281016ad83Smrg{
6291016ad83Smrg  echo
6301016ad83Smrg  AS_BOX([Running $as_me.])
6311016ad83Smrg} >&AS_MESSAGE_LOG_FD
6321016ad83Smrg
6331016ad83Smrglt_cl_help="\
6347204935cSmrg'$as_me' creates a local libtool stub from the current configuration,
6351016ad83Smrgfor use in further configure time tests before the real libtool is
6361016ad83Smrggenerated.
6371016ad83Smrg
6381016ad83SmrgUsage: $[0] [[OPTIONS]]
6391016ad83Smrg
6401016ad83Smrg  -h, --help      print this help, then exit
6411016ad83Smrg  -V, --version   print version number, then exit
6421016ad83Smrg  -q, --quiet     do not print progress messages
6431016ad83Smrg  -d, --debug     don't remove temporary files
6441016ad83Smrg
6451016ad83SmrgReport bugs to <bug-libtool@gnu.org>."
6461016ad83Smrg
6471016ad83Smrglt_cl_version="\
6481016ad83Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
6491016ad83Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
6501016ad83Smrgconfigured by $[0], generated by m4_PACKAGE_STRING.
6511016ad83Smrg
6521016ad83SmrgCopyright (C) 2011 Free Software Foundation, Inc.
6531016ad83SmrgThis config.lt script is free software; the Free Software Foundation
6541016ad83Smrggives unlimited permision to copy, distribute and modify it."
6551016ad83Smrg
6567204935cSmrgwhile test 0 != $[#]
6571016ad83Smrgdo
6581016ad83Smrg  case $[1] in
6591016ad83Smrg    --version | --v* | -V )
6601016ad83Smrg      echo "$lt_cl_version"; exit 0 ;;
6611016ad83Smrg    --help | --h* | -h )
6621016ad83Smrg      echo "$lt_cl_help"; exit 0 ;;
6631016ad83Smrg    --debug | --d* | -d )
6641016ad83Smrg      debug=: ;;
6651016ad83Smrg    --quiet | --q* | --silent | --s* | -q )
6661016ad83Smrg      lt_cl_silent=: ;;
6671016ad83Smrg
6681016ad83Smrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
6697204935cSmrgTry '$[0] --help' for more information.]) ;;
6701016ad83Smrg
6711016ad83Smrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
6727204935cSmrgTry '$[0] --help' for more information.]) ;;
6731016ad83Smrg  esac
6741016ad83Smrg  shift
6751016ad83Smrgdone
6761016ad83Smrg
6771016ad83Smrgif $lt_cl_silent; then
6781016ad83Smrg  exec AS_MESSAGE_FD>/dev/null
6791016ad83Smrgfi
6801016ad83Smrg_LTEOF
6811016ad83Smrg
6821016ad83Smrgcat >>"$CONFIG_LT" <<_LTEOF
6831016ad83Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
6841016ad83Smrg_LTEOF
6851016ad83Smrg
6861016ad83Smrgcat >>"$CONFIG_LT" <<\_LTEOF
6871016ad83SmrgAC_MSG_NOTICE([creating $ofile])
6881016ad83Smrg_LT_OUTPUT_LIBTOOL_COMMANDS
6891016ad83SmrgAS_EXIT(0)
6901016ad83Smrg_LTEOF
6911016ad83Smrgchmod +x "$CONFIG_LT"
6921016ad83Smrg
6931016ad83Smrg# configure is writing to config.log, but config.lt does its own redirection,
6941016ad83Smrg# appending to config.log, which fails on DOS, as config.log is still kept
6951016ad83Smrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
6961016ad83Smrg# config.log, so it can be properly (re)opened and appended to by config.lt.
6971016ad83Smrglt_cl_success=:
6987204935cSmrgtest yes = "$silent" &&
6991016ad83Smrg  lt_config_lt_args="$lt_config_lt_args --quiet"
7001016ad83Smrgexec AS_MESSAGE_LOG_FD>/dev/null
7011016ad83Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
7021016ad83Smrgexec AS_MESSAGE_LOG_FD>>config.log
7031016ad83Smrg$lt_cl_success || AS_EXIT(1)
7041016ad83Smrg])# LT_OUTPUT
7051016ad83Smrg
7061016ad83Smrg
7071016ad83Smrg# _LT_CONFIG(TAG)
7081016ad83Smrg# ---------------
7091016ad83Smrg# If TAG is the built-in tag, create an initial libtool script with a
7101016ad83Smrg# default configuration from the untagged config vars.  Otherwise add code
7111016ad83Smrg# to config.status for appending the configuration named by TAG from the
7121016ad83Smrg# matching tagged config vars.
7131016ad83Smrgm4_defun([_LT_CONFIG],
7141016ad83Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7151016ad83Smrg_LT_CONFIG_SAVE_COMMANDS([
7161016ad83Smrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
7171016ad83Smrg  m4_if(_LT_TAG, [C], [
7187204935cSmrg    # See if we are running on zsh, and set the options that allow our
7191016ad83Smrg    # commands through without removal of \ escapes.
7207204935cSmrg    if test -n "${ZSH_VERSION+set}"; then
7211016ad83Smrg      setopt NO_GLOB_SUBST
7221016ad83Smrg    fi
7231016ad83Smrg
7247204935cSmrg    cfgfile=${ofile}T
7251016ad83Smrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
7261016ad83Smrg    $RM "$cfgfile"
7271016ad83Smrg
7281016ad83Smrg    cat <<_LT_EOF >> "$cfgfile"
7291016ad83Smrg#! $SHELL
7307204935cSmrg# Generated automatically by $as_me ($PACKAGE) $VERSION
7311016ad83Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7321016ad83Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
7337204935cSmrg
7347204935cSmrg# Provide generalized library-building support services.
7357204935cSmrg# Written by Gordon Matzigkeit, 1996
7367204935cSmrg
7371016ad83Smrg_LT_COPYING
7381016ad83Smrg_LT_LIBTOOL_TAGS
7391016ad83Smrg
7407204935cSmrg# Configured defaults for sys_lib_dlsearch_path munging.
7417204935cSmrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
7427204935cSmrg
7431016ad83Smrg# ### BEGIN LIBTOOL CONFIG
7441016ad83Smrg_LT_LIBTOOL_CONFIG_VARS
7451016ad83Smrg_LT_LIBTOOL_TAG_VARS
7461016ad83Smrg# ### END LIBTOOL CONFIG
7471016ad83Smrg
7487204935cSmrg_LT_EOF
7497204935cSmrg
7507204935cSmrg    cat <<'_LT_EOF' >> "$cfgfile"
7517204935cSmrg
7527204935cSmrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
7537204935cSmrg
7547204935cSmrg_LT_PREPARE_MUNGE_PATH_LIST
7557204935cSmrg_LT_PREPARE_CC_BASENAME
7567204935cSmrg
7577204935cSmrg# ### END FUNCTIONS SHARED WITH CONFIGURE
7587204935cSmrg
7591016ad83Smrg_LT_EOF
7601016ad83Smrg
7611016ad83Smrg  case $host_os in
7621016ad83Smrg  aix3*)
7631016ad83Smrg    cat <<\_LT_EOF >> "$cfgfile"
7641016ad83Smrg# AIX sometimes has problems with the GCC collect2 program.  For some
7651016ad83Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems
7661016ad83Smrg# vanish in a puff of smoke.
7677204935cSmrgif test set != "${COLLECT_NAMES+set}"; then
7681016ad83Smrg  COLLECT_NAMES=
7691016ad83Smrg  export COLLECT_NAMES
7701016ad83Smrgfi
7711016ad83Smrg_LT_EOF
7721016ad83Smrg    ;;
7731016ad83Smrg  esac
7741016ad83Smrg
7751016ad83Smrg  _LT_PROG_LTMAIN
7761016ad83Smrg
7771016ad83Smrg  # We use sed instead of cat because bash on DJGPP gets confused if
7781016ad83Smrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7791016ad83Smrg  # text mode, it properly converts lines to CR/LF.  This bash problem
7801016ad83Smrg  # is reportedly fixed, but why not run on old versions too?
7811016ad83Smrg  sed '$q' "$ltmain" >> "$cfgfile" \
7821016ad83Smrg     || (rm -f "$cfgfile"; exit 1)
7831016ad83Smrg
7841016ad83Smrg   mv -f "$cfgfile" "$ofile" ||
7851016ad83Smrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
7861016ad83Smrg  chmod +x "$ofile"
7871016ad83Smrg],
7881016ad83Smrg[cat <<_LT_EOF >> "$ofile"
7891016ad83Smrg
7901016ad83Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
7911016ad83Smrgdnl in a comment (ie after a #).
7921016ad83Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1
7931016ad83Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
7941016ad83Smrg# ### END LIBTOOL TAG CONFIG: $1
7951016ad83Smrg_LT_EOF
7961016ad83Smrg])dnl /m4_if
7971016ad83Smrg],
7981016ad83Smrg[m4_if([$1], [], [
7991016ad83Smrg    PACKAGE='$PACKAGE'
8001016ad83Smrg    VERSION='$VERSION'
8011016ad83Smrg    RM='$RM'
8021016ad83Smrg    ofile='$ofile'], [])
8031016ad83Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS
8041016ad83Smrg])# _LT_CONFIG
8051016ad83Smrg
8061016ad83Smrg
8071016ad83Smrg# LT_SUPPORTED_TAG(TAG)
8081016ad83Smrg# ---------------------
8091016ad83Smrg# Trace this macro to discover what tags are supported by the libtool
8101016ad83Smrg# --tag option, using:
8111016ad83Smrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
8121016ad83SmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
8131016ad83Smrg
8141016ad83Smrg
8151016ad83Smrg# C support is built-in for now
8161016ad83Smrgm4_define([_LT_LANG_C_enabled], [])
8171016ad83Smrgm4_define([_LT_TAGS], [])
8181016ad83Smrg
8191016ad83Smrg
8201016ad83Smrg# LT_LANG(LANG)
8211016ad83Smrg# -------------
8221016ad83Smrg# Enable libtool support for the given language if not already enabled.
8231016ad83SmrgAC_DEFUN([LT_LANG],
8241016ad83Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
8251016ad83Smrgm4_case([$1],
8261016ad83Smrg  [C],			[_LT_LANG(C)],
8271016ad83Smrg  [C++],		[_LT_LANG(CXX)],
8281016ad83Smrg  [Go],			[_LT_LANG(GO)],
8291016ad83Smrg  [Java],		[_LT_LANG(GCJ)],
8301016ad83Smrg  [Fortran 77],		[_LT_LANG(F77)],
8311016ad83Smrg  [Fortran],		[_LT_LANG(FC)],
8321016ad83Smrg  [Windows Resource],	[_LT_LANG(RC)],
8331016ad83Smrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
8341016ad83Smrg    [_LT_LANG($1)],
8351016ad83Smrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
8361016ad83Smrg])# LT_LANG
8371016ad83Smrg
8381016ad83Smrg
8391016ad83Smrg# _LT_LANG(LANGNAME)
8401016ad83Smrg# ------------------
8411016ad83Smrgm4_defun([_LT_LANG],
8421016ad83Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
8431016ad83Smrg  [LT_SUPPORTED_TAG([$1])dnl
8441016ad83Smrg  m4_append([_LT_TAGS], [$1 ])dnl
8451016ad83Smrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
8461016ad83Smrg  _LT_LANG_$1_CONFIG($1)])dnl
8471016ad83Smrg])# _LT_LANG
8481016ad83Smrg
8491016ad83Smrg
8501016ad83Smrgm4_ifndef([AC_PROG_GO], [
8511016ad83Smrg############################################################
8521016ad83Smrg# NOTE: This macro has been submitted for inclusion into   #
8531016ad83Smrg#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
8541016ad83Smrg#  a released version of Autoconf we should remove this    #
8551016ad83Smrg#  macro and use it instead.                               #
8561016ad83Smrg############################################################
8571016ad83Smrgm4_defun([AC_PROG_GO],
8581016ad83Smrg[AC_LANG_PUSH(Go)dnl
8591016ad83SmrgAC_ARG_VAR([GOC],     [Go compiler command])dnl
8601016ad83SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
8611016ad83Smrg_AC_ARG_VAR_LDFLAGS()dnl
8621016ad83SmrgAC_CHECK_TOOL(GOC, gccgo)
8631016ad83Smrgif test -z "$GOC"; then
8641016ad83Smrg  if test -n "$ac_tool_prefix"; then
8651016ad83Smrg    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
8661016ad83Smrg  fi
8671016ad83Smrgfi
8681016ad83Smrgif test -z "$GOC"; then
8691016ad83Smrg  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
8701016ad83Smrgfi
8711016ad83Smrg])#m4_defun
8721016ad83Smrg])#m4_ifndef
8731016ad83Smrg
8741016ad83Smrg
8751016ad83Smrg# _LT_LANG_DEFAULT_CONFIG
8761016ad83Smrg# -----------------------
8771016ad83Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
8781016ad83Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
8791016ad83Smrg  [LT_LANG(CXX)],
8801016ad83Smrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
8811016ad83Smrg
8821016ad83SmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
8831016ad83Smrg  [LT_LANG(F77)],
8841016ad83Smrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
8851016ad83Smrg
8861016ad83SmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
8871016ad83Smrg  [LT_LANG(FC)],
8881016ad83Smrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
8891016ad83Smrg
8901016ad83Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
8911016ad83Smrgdnl pulling things in needlessly.
8921016ad83SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
8931016ad83Smrg  [LT_LANG(GCJ)],
8941016ad83Smrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
8951016ad83Smrg    [LT_LANG(GCJ)],
8961016ad83Smrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
8971016ad83Smrg      [LT_LANG(GCJ)],
8981016ad83Smrg      [m4_ifdef([AC_PROG_GCJ],
8991016ad83Smrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
9001016ad83Smrg       m4_ifdef([A][M_PROG_GCJ],
9011016ad83Smrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
9021016ad83Smrg       m4_ifdef([LT_PROG_GCJ],
9031016ad83Smrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
9041016ad83Smrg
9051016ad83SmrgAC_PROVIDE_IFELSE([AC_PROG_GO],
9061016ad83Smrg  [LT_LANG(GO)],
9071016ad83Smrg  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
9081016ad83Smrg
9091016ad83SmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
9101016ad83Smrg  [LT_LANG(RC)],
9111016ad83Smrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
9121016ad83Smrg])# _LT_LANG_DEFAULT_CONFIG
9131016ad83Smrg
9141016ad83Smrg# Obsolete macros:
9151016ad83SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
9161016ad83SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
9171016ad83SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
9181016ad83SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
9191016ad83SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
9201016ad83Smrgdnl aclocal-1.4 backwards compatibility:
9211016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
9221016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
9231016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
9241016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
9251016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], [])
9261016ad83Smrg
9271016ad83Smrg
9281016ad83Smrg# _LT_TAG_COMPILER
9291016ad83Smrg# ----------------
9301016ad83Smrgm4_defun([_LT_TAG_COMPILER],
9311016ad83Smrg[AC_REQUIRE([AC_PROG_CC])dnl
9321016ad83Smrg
9331016ad83Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
9341016ad83Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
9351016ad83Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
9361016ad83Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
9371016ad83Smrg
9381016ad83Smrg# If no C compiler was specified, use CC.
9391016ad83SmrgLTCC=${LTCC-"$CC"}
9401016ad83Smrg
9411016ad83Smrg# If no C compiler flags were specified, use CFLAGS.
9421016ad83SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
9431016ad83Smrg
9441016ad83Smrg# Allow CC to be a program name with arguments.
9451016ad83Smrgcompiler=$CC
9461016ad83Smrg])# _LT_TAG_COMPILER
9471016ad83Smrg
9481016ad83Smrg
9491016ad83Smrg# _LT_COMPILER_BOILERPLATE
9501016ad83Smrg# ------------------------
9511016ad83Smrg# Check for compiler boilerplate output or warnings with
9521016ad83Smrg# the simple compiler test code.
9531016ad83Smrgm4_defun([_LT_COMPILER_BOILERPLATE],
9541016ad83Smrg[m4_require([_LT_DECL_SED])dnl
9551016ad83Smrgac_outfile=conftest.$ac_objext
9561016ad83Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
9571016ad83Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
9581016ad83Smrg_lt_compiler_boilerplate=`cat conftest.err`
9591016ad83Smrg$RM conftest*
9601016ad83Smrg])# _LT_COMPILER_BOILERPLATE
9611016ad83Smrg
9621016ad83Smrg
9631016ad83Smrg# _LT_LINKER_BOILERPLATE
9641016ad83Smrg# ----------------------
9651016ad83Smrg# Check for linker boilerplate output or warnings with
9661016ad83Smrg# the simple link test code.
9671016ad83Smrgm4_defun([_LT_LINKER_BOILERPLATE],
9681016ad83Smrg[m4_require([_LT_DECL_SED])dnl
9691016ad83Smrgac_outfile=conftest.$ac_objext
9701016ad83Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
9711016ad83Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
9721016ad83Smrg_lt_linker_boilerplate=`cat conftest.err`
9731016ad83Smrg$RM -r conftest*
9741016ad83Smrg])# _LT_LINKER_BOILERPLATE
9751016ad83Smrg
9761016ad83Smrg# _LT_REQUIRED_DARWIN_CHECKS
9771016ad83Smrg# -------------------------
9781016ad83Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
9791016ad83Smrg  case $host_os in
9801016ad83Smrg    rhapsody* | darwin*)
9811016ad83Smrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
9821016ad83Smrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
9831016ad83Smrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
9841016ad83Smrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
9851016ad83Smrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
9861016ad83Smrg    _LT_DECL([], [DSYMUTIL], [1],
9871016ad83Smrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
9881016ad83Smrg    _LT_DECL([], [NMEDIT], [1],
9891016ad83Smrg      [Tool to change global to local symbols on Mac OS X])
9901016ad83Smrg    _LT_DECL([], [LIPO], [1],
9911016ad83Smrg      [Tool to manipulate fat objects and archives on Mac OS X])
9921016ad83Smrg    _LT_DECL([], [OTOOL], [1],
9931016ad83Smrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
9941016ad83Smrg    _LT_DECL([], [OTOOL64], [1],
9951016ad83Smrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
9961016ad83Smrg
9971016ad83Smrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
9981016ad83Smrg      [lt_cv_apple_cc_single_mod=no
9997204935cSmrg      if test -z "$LT_MULTI_MODULE"; then
10001016ad83Smrg	# By default we will add the -single_module flag. You can override
10011016ad83Smrg	# by either setting the environment variable LT_MULTI_MODULE
10021016ad83Smrg	# non-empty at configure time, or by adding -multi_module to the
10031016ad83Smrg	# link flags.
10041016ad83Smrg	rm -rf libconftest.dylib*
10051016ad83Smrg	echo "int foo(void){return 1;}" > conftest.c
10061016ad83Smrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10071016ad83Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
10081016ad83Smrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10091016ad83Smrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
10101016ad83Smrg        _lt_result=$?
10111016ad83Smrg	# If there is a non-empty error log, and "single_module"
10121016ad83Smrg	# appears in it, assume the flag caused a linker warning
10131016ad83Smrg        if test -s conftest.err && $GREP single_module conftest.err; then
10141016ad83Smrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
10151016ad83Smrg	# Otherwise, if the output was created with a 0 exit code from
10161016ad83Smrg	# the compiler, it worked.
10177204935cSmrg	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
10181016ad83Smrg	  lt_cv_apple_cc_single_mod=yes
10191016ad83Smrg	else
10201016ad83Smrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
10211016ad83Smrg	fi
10221016ad83Smrg	rm -rf libconftest.dylib*
10231016ad83Smrg	rm -f conftest.*
10241016ad83Smrg      fi])
10251016ad83Smrg
10261016ad83Smrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
10271016ad83Smrg      [lt_cv_ld_exported_symbols_list],
10281016ad83Smrg      [lt_cv_ld_exported_symbols_list=no
10291016ad83Smrg      save_LDFLAGS=$LDFLAGS
10301016ad83Smrg      echo "_main" > conftest.sym
10311016ad83Smrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
10321016ad83Smrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
10331016ad83Smrg	[lt_cv_ld_exported_symbols_list=yes],
10341016ad83Smrg	[lt_cv_ld_exported_symbols_list=no])
10357204935cSmrg	LDFLAGS=$save_LDFLAGS
10361016ad83Smrg    ])
10371016ad83Smrg
10381016ad83Smrg    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
10391016ad83Smrg      [lt_cv_ld_force_load=no
10401016ad83Smrg      cat > conftest.c << _LT_EOF
10411016ad83Smrgint forced_loaded() { return 2;}
10421016ad83Smrg_LT_EOF
10431016ad83Smrg      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
10441016ad83Smrg      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
10451016ad83Smrg      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
10461016ad83Smrg      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
10471016ad83Smrg      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
10481016ad83Smrg      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
10491016ad83Smrg      cat > conftest.c << _LT_EOF
10501016ad83Smrgint main() { return 0;}
10511016ad83Smrg_LT_EOF
10521016ad83Smrg      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
10531016ad83Smrg      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
10541016ad83Smrg      _lt_result=$?
10551016ad83Smrg      if test -s conftest.err && $GREP force_load conftest.err; then
10561016ad83Smrg	cat conftest.err >&AS_MESSAGE_LOG_FD
10577204935cSmrg      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
10581016ad83Smrg	lt_cv_ld_force_load=yes
10591016ad83Smrg      else
10601016ad83Smrg	cat conftest.err >&AS_MESSAGE_LOG_FD
10611016ad83Smrg      fi
10621016ad83Smrg        rm -f conftest.err libconftest.a conftest conftest.c
10631016ad83Smrg        rm -rf conftest.dSYM
10641016ad83Smrg    ])
10651016ad83Smrg    case $host_os in
10661016ad83Smrg    rhapsody* | darwin1.[[012]])
10677204935cSmrg      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
10681016ad83Smrg    darwin1.*)
10697204935cSmrg      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10701016ad83Smrg    darwin*) # darwin 5.x on
10711016ad83Smrg      # if running on 10.5 or later, the deployment target defaults
10721016ad83Smrg      # to the OS version, if on x86, and 10.4, the deployment
10731016ad83Smrg      # target defaults to 10.4. Don't you love it?
10741016ad83Smrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10751016ad83Smrg	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
10767204935cSmrg	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10777204935cSmrg	10.[[012]][[,.]]*)
10787204935cSmrg	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10791016ad83Smrg	10.*)
10807204935cSmrg	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10811016ad83Smrg      esac
10821016ad83Smrg    ;;
10831016ad83Smrg  esac
10847204935cSmrg    if test yes = "$lt_cv_apple_cc_single_mod"; then
10851016ad83Smrg      _lt_dar_single_mod='$single_module'
10861016ad83Smrg    fi
10877204935cSmrg    if test yes = "$lt_cv_ld_exported_symbols_list"; then
10887204935cSmrg      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
10891016ad83Smrg    else
10907204935cSmrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
10911016ad83Smrg    fi
10927204935cSmrg    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
10931016ad83Smrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
10941016ad83Smrg    else
10951016ad83Smrg      _lt_dsymutil=
10961016ad83Smrg    fi
10971016ad83Smrg    ;;
10981016ad83Smrg  esac
10991016ad83Smrg])
11001016ad83Smrg
11011016ad83Smrg
11021016ad83Smrg# _LT_DARWIN_LINKER_FEATURES([TAG])
11031016ad83Smrg# ---------------------------------
11041016ad83Smrg# Checks for linker and compiler features on darwin
11051016ad83Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
11061016ad83Smrg[
11071016ad83Smrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
11081016ad83Smrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
11091016ad83Smrg  _LT_TAGVAR(hardcode_direct, $1)=no
11101016ad83Smrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
11111016ad83Smrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
11127204935cSmrg  if test yes = "$lt_cv_ld_force_load"; then
11137204935cSmrg    _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\"`'
11141016ad83Smrg    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
11151016ad83Smrg                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
11161016ad83Smrg  else
11171016ad83Smrg    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
11181016ad83Smrg  fi
11191016ad83Smrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
11207204935cSmrg  _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
11211016ad83Smrg  case $cc_basename in
11227204935cSmrg     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
11231016ad83Smrg     *) _lt_dar_can_shared=$GCC ;;
11241016ad83Smrg  esac
11257204935cSmrg  if test yes = "$_lt_dar_can_shared"; then
11261016ad83Smrg    output_verbose_link_cmd=func_echo_all
11277204935cSmrg    _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"
11287204935cSmrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
11297204935cSmrg    _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"
11307204935cSmrg    _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"
11311016ad83Smrg    m4_if([$1], [CXX],
11327204935cSmrg[   if test yes != "$lt_cv_apple_cc_single_mod"; then
11337204935cSmrg      _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"
11347204935cSmrg      _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"
11351016ad83Smrg    fi
11361016ad83Smrg],[])
11371016ad83Smrg  else
11381016ad83Smrg  _LT_TAGVAR(ld_shlibs, $1)=no
11391016ad83Smrg  fi
11401016ad83Smrg])
11411016ad83Smrg
11421016ad83Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
11431016ad83Smrg# ----------------------------------
11441016ad83Smrg# Links a minimal program and checks the executable
11451016ad83Smrg# for the system default hardcoded library path. In most cases,
11461016ad83Smrg# this is /usr/lib:/lib, but when the MPI compilers are used
11471016ad83Smrg# the location of the communication and MPI libs are included too.
11481016ad83Smrg# If we don't find anything, use the default library path according
11491016ad83Smrg# to the aix ld manual.
11501016ad83Smrg# Store the results from the different compilers for each TAGNAME.
11511016ad83Smrg# Allow to override them for all tags through lt_cv_aix_libpath.
11521016ad83Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
11531016ad83Smrg[m4_require([_LT_DECL_SED])dnl
11547204935cSmrgif test set = "${lt_cv_aix_libpath+set}"; then
11551016ad83Smrg  aix_libpath=$lt_cv_aix_libpath
11561016ad83Smrgelse
11571016ad83Smrg  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
11581016ad83Smrg  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
11591016ad83Smrg  lt_aix_libpath_sed='[
11601016ad83Smrg      /Import File Strings/,/^$/ {
11611016ad83Smrg	  /^0/ {
11621016ad83Smrg	      s/^0  *\([^ ]*\) *$/\1/
11631016ad83Smrg	      p
11641016ad83Smrg	  }
11651016ad83Smrg      }]'
11661016ad83Smrg  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11671016ad83Smrg  # Check for a 64-bit object if we didn't find anything.
11681016ad83Smrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
11691016ad83Smrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11701016ad83Smrg  fi],[])
11711016ad83Smrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
11727204935cSmrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
11731016ad83Smrg  fi
11741016ad83Smrg  ])
11751016ad83Smrg  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
11761016ad83Smrgfi
11771016ad83Smrg])# _LT_SYS_MODULE_PATH_AIX
11781016ad83Smrg
11791016ad83Smrg
11801016ad83Smrg# _LT_SHELL_INIT(ARG)
11811016ad83Smrg# -------------------
11821016ad83Smrgm4_define([_LT_SHELL_INIT],
11831016ad83Smrg[m4_divert_text([M4SH-INIT], [$1
11841016ad83Smrg])])# _LT_SHELL_INIT
11851016ad83Smrg
11861016ad83Smrg
11871016ad83Smrg
11881016ad83Smrg# _LT_PROG_ECHO_BACKSLASH
11891016ad83Smrg# -----------------------
11901016ad83Smrg# Find how we can fake an echo command that does not interpret backslash.
11911016ad83Smrg# In particular, with Autoconf 2.60 or later we add some code to the start
11927204935cSmrg# of the generated configure script that will find a shell with a builtin
11937204935cSmrg# printf (that we can use as an echo command).
11941016ad83Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
11951016ad83Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
11961016ad83SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
11971016ad83SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
11981016ad83Smrg
11991016ad83SmrgAC_MSG_CHECKING([how to print strings])
12001016ad83Smrg# Test print first, because it will be a builtin if present.
12011016ad83Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
12021016ad83Smrg   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
12031016ad83Smrg  ECHO='print -r --'
12041016ad83Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
12051016ad83Smrg  ECHO='printf %s\n'
12061016ad83Smrgelse
12071016ad83Smrg  # Use this function as a fallback that always works.
12081016ad83Smrg  func_fallback_echo ()
12091016ad83Smrg  {
12101016ad83Smrg    eval 'cat <<_LTECHO_EOF
12111016ad83Smrg$[]1
12121016ad83Smrg_LTECHO_EOF'
12131016ad83Smrg  }
12141016ad83Smrg  ECHO='func_fallback_echo'
12151016ad83Smrgfi
12161016ad83Smrg
12171016ad83Smrg# func_echo_all arg...
12181016ad83Smrg# Invoke $ECHO with all args, space-separated.
12191016ad83Smrgfunc_echo_all ()
12201016ad83Smrg{
12217204935cSmrg    $ECHO "$*"
12221016ad83Smrg}
12231016ad83Smrg
12247204935cSmrgcase $ECHO in
12251016ad83Smrg  printf*) AC_MSG_RESULT([printf]) ;;
12261016ad83Smrg  print*) AC_MSG_RESULT([print -r]) ;;
12271016ad83Smrg  *) AC_MSG_RESULT([cat]) ;;
12281016ad83Smrgesac
12291016ad83Smrg
12301016ad83Smrgm4_ifdef([_AS_DETECT_SUGGESTED],
12311016ad83Smrg[_AS_DETECT_SUGGESTED([
12321016ad83Smrg  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
12331016ad83Smrg    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
12341016ad83Smrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
12351016ad83Smrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
12361016ad83Smrg    PATH=/empty FPATH=/empty; export PATH FPATH
12371016ad83Smrg    test "X`printf %s $ECHO`" = "X$ECHO" \
12381016ad83Smrg      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
12391016ad83Smrg
12401016ad83Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
12411016ad83Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
12421016ad83Smrg])# _LT_PROG_ECHO_BACKSLASH
12431016ad83Smrg
12441016ad83Smrg
12451016ad83Smrg# _LT_WITH_SYSROOT
12461016ad83Smrg# ----------------
12471016ad83SmrgAC_DEFUN([_LT_WITH_SYSROOT],
12481016ad83Smrg[AC_MSG_CHECKING([for sysroot])
12491016ad83SmrgAC_ARG_WITH([sysroot],
12507204935cSmrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
12517204935cSmrg  [Search for dependent libraries within DIR (or the compiler's sysroot
12527204935cSmrg   if not specified).])],
12531016ad83Smrg[], [with_sysroot=no])
12541016ad83Smrg
12551016ad83Smrgdnl lt_sysroot will always be passed unquoted.  We quote it here
12561016ad83Smrgdnl in case the user passed a directory name.
12571016ad83Smrglt_sysroot=
12587204935cSmrgcase $with_sysroot in #(
12591016ad83Smrg yes)
12607204935cSmrg   if test yes = "$GCC"; then
12611016ad83Smrg     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
12621016ad83Smrg   fi
12631016ad83Smrg   ;; #(
12641016ad83Smrg /*)
12651016ad83Smrg   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
12661016ad83Smrg   ;; #(
12671016ad83Smrg no|'')
12681016ad83Smrg   ;; #(
12691016ad83Smrg *)
12707204935cSmrg   AC_MSG_RESULT([$with_sysroot])
12711016ad83Smrg   AC_MSG_ERROR([The sysroot must be an absolute path.])
12721016ad83Smrg   ;;
12731016ad83Smrgesac
12741016ad83Smrg
12751016ad83Smrg AC_MSG_RESULT([${lt_sysroot:-no}])
12761016ad83Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
12777204935cSmrg[dependent libraries, and where our libraries should be installed.])])
12781016ad83Smrg
12791016ad83Smrg# _LT_ENABLE_LOCK
12801016ad83Smrg# ---------------
12811016ad83Smrgm4_defun([_LT_ENABLE_LOCK],
12821016ad83Smrg[AC_ARG_ENABLE([libtool-lock],
12831016ad83Smrg  [AS_HELP_STRING([--disable-libtool-lock],
12841016ad83Smrg    [avoid locking (might break parallel builds)])])
12857204935cSmrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes
12861016ad83Smrg
12871016ad83Smrg# Some flags need to be propagated to the compiler or linker for good
12881016ad83Smrg# libtool support.
12891016ad83Smrgcase $host in
12901016ad83Smrgia64-*-hpux*)
12917204935cSmrg  # Find out what ABI is being produced by ac_compile, and set mode
12927204935cSmrg  # options accordingly.
12931016ad83Smrg  echo 'int i;' > conftest.$ac_ext
12941016ad83Smrg  if AC_TRY_EVAL(ac_compile); then
12951016ad83Smrg    case `/usr/bin/file conftest.$ac_objext` in
12961016ad83Smrg      *ELF-32*)
12977204935cSmrg	HPUX_IA64_MODE=32
12981016ad83Smrg	;;
12991016ad83Smrg      *ELF-64*)
13007204935cSmrg	HPUX_IA64_MODE=64
13011016ad83Smrg	;;
13021016ad83Smrg    esac
13031016ad83Smrg  fi
13041016ad83Smrg  rm -rf conftest*
13051016ad83Smrg  ;;
13061016ad83Smrg*-*-irix6*)
13077204935cSmrg  # Find out what ABI is being produced by ac_compile, and set linker
13087204935cSmrg  # options accordingly.
13091016ad83Smrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
13101016ad83Smrg  if AC_TRY_EVAL(ac_compile); then
13117204935cSmrg    if test yes = "$lt_cv_prog_gnu_ld"; then
13121016ad83Smrg      case `/usr/bin/file conftest.$ac_objext` in
13131016ad83Smrg	*32-bit*)
13141016ad83Smrg	  LD="${LD-ld} -melf32bsmip"
13151016ad83Smrg	  ;;
13161016ad83Smrg	*N32*)
13171016ad83Smrg	  LD="${LD-ld} -melf32bmipn32"
13181016ad83Smrg	  ;;
13191016ad83Smrg	*64-bit*)
13201016ad83Smrg	  LD="${LD-ld} -melf64bmip"
13211016ad83Smrg	;;
13221016ad83Smrg      esac
13231016ad83Smrg    else
13241016ad83Smrg      case `/usr/bin/file conftest.$ac_objext` in
13251016ad83Smrg	*32-bit*)
13261016ad83Smrg	  LD="${LD-ld} -32"
13271016ad83Smrg	  ;;
13281016ad83Smrg	*N32*)
13291016ad83Smrg	  LD="${LD-ld} -n32"
13301016ad83Smrg	  ;;
13311016ad83Smrg	*64-bit*)
13321016ad83Smrg	  LD="${LD-ld} -64"
13331016ad83Smrg	  ;;
13341016ad83Smrg      esac
13351016ad83Smrg    fi
13361016ad83Smrg  fi
13371016ad83Smrg  rm -rf conftest*
13381016ad83Smrg  ;;
13391016ad83Smrg
13407204935cSmrgmips64*-*linux*)
13417204935cSmrg  # Find out what ABI is being produced by ac_compile, and set linker
13427204935cSmrg  # options accordingly.
13437204935cSmrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
13447204935cSmrg  if AC_TRY_EVAL(ac_compile); then
13457204935cSmrg    emul=elf
13467204935cSmrg    case `/usr/bin/file conftest.$ac_objext` in
13477204935cSmrg      *32-bit*)
13487204935cSmrg	emul="${emul}32"
13497204935cSmrg	;;
13507204935cSmrg      *64-bit*)
13517204935cSmrg	emul="${emul}64"
13527204935cSmrg	;;
13537204935cSmrg    esac
13547204935cSmrg    case `/usr/bin/file conftest.$ac_objext` in
13557204935cSmrg      *MSB*)
13567204935cSmrg	emul="${emul}btsmip"
13577204935cSmrg	;;
13587204935cSmrg      *LSB*)
13597204935cSmrg	emul="${emul}ltsmip"
13607204935cSmrg	;;
13617204935cSmrg    esac
13627204935cSmrg    case `/usr/bin/file conftest.$ac_objext` in
13637204935cSmrg      *N32*)
13647204935cSmrg	emul="${emul}n32"
13657204935cSmrg	;;
13667204935cSmrg    esac
13677204935cSmrg    LD="${LD-ld} -m $emul"
13687204935cSmrg  fi
13697204935cSmrg  rm -rf conftest*
13707204935cSmrg  ;;
13717204935cSmrg
13721c7386f4Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
13731016ad83Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
13747204935cSmrg  # Find out what ABI is being produced by ac_compile, and set linker
13757204935cSmrg  # options accordingly.  Note that the listed cases only cover the
13767204935cSmrg  # situations where additional linker options are needed (such as when
13777204935cSmrg  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
13787204935cSmrg  # vice versa); the common cases where no linker options are needed do
13797204935cSmrg  # not appear in the list.
13801016ad83Smrg  echo 'int i;' > conftest.$ac_ext
13811016ad83Smrg  if AC_TRY_EVAL(ac_compile); then
13821016ad83Smrg    case `/usr/bin/file conftest.o` in
13831016ad83Smrg      *32-bit*)
13841016ad83Smrg	case $host in
13851016ad83Smrg	  x86_64-*kfreebsd*-gnu)
13861016ad83Smrg	    LD="${LD-ld} -m elf_i386_fbsd"
13871016ad83Smrg	    ;;
13881016ad83Smrg	  x86_64-*linux*)
13891016ad83Smrg	    case `/usr/bin/file conftest.o` in
13901016ad83Smrg	      *x86-64*)
13911016ad83Smrg		LD="${LD-ld} -m elf32_x86_64"
13921016ad83Smrg		;;
13931016ad83Smrg	      *)
13941016ad83Smrg		LD="${LD-ld} -m elf_i386"
13951016ad83Smrg		;;
13961016ad83Smrg	    esac
13971016ad83Smrg	    ;;
13987204935cSmrg	  powerpc64le-*linux*)
13991c7386f4Smrg	    LD="${LD-ld} -m elf32lppclinux"
14001c7386f4Smrg	    ;;
14017204935cSmrg	  powerpc64-*linux*)
14021016ad83Smrg	    LD="${LD-ld} -m elf32ppclinux"
14031016ad83Smrg	    ;;
14041016ad83Smrg	  s390x-*linux*)
14051016ad83Smrg	    LD="${LD-ld} -m elf_s390"
14061016ad83Smrg	    ;;
14071016ad83Smrg	  sparc64-*linux*)
14081016ad83Smrg	    LD="${LD-ld} -m elf32_sparc"
14091016ad83Smrg	    ;;
14101016ad83Smrg	esac
14111016ad83Smrg	;;
14121016ad83Smrg      *64-bit*)
14131016ad83Smrg	case $host in
14141016ad83Smrg	  x86_64-*kfreebsd*-gnu)
14151016ad83Smrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
14161016ad83Smrg	    ;;
14171016ad83Smrg	  x86_64-*linux*)
14181016ad83Smrg	    LD="${LD-ld} -m elf_x86_64"
14191016ad83Smrg	    ;;
14207204935cSmrg	  powerpcle-*linux*)
14211c7386f4Smrg	    LD="${LD-ld} -m elf64lppc"
14221c7386f4Smrg	    ;;
14237204935cSmrg	  powerpc-*linux*)
14241016ad83Smrg	    LD="${LD-ld} -m elf64ppc"
14251016ad83Smrg	    ;;
14261016ad83Smrg	  s390*-*linux*|s390*-*tpf*)
14271016ad83Smrg	    LD="${LD-ld} -m elf64_s390"
14281016ad83Smrg	    ;;
14291016ad83Smrg	  sparc*-*linux*)
14301016ad83Smrg	    LD="${LD-ld} -m elf64_sparc"
14311016ad83Smrg	    ;;
14321016ad83Smrg	esac
14331016ad83Smrg	;;
14341016ad83Smrg    esac
14351016ad83Smrg  fi
14361016ad83Smrg  rm -rf conftest*
14371016ad83Smrg  ;;
14381016ad83Smrg
14391016ad83Smrg*-*-sco3.2v5*)
14401016ad83Smrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
14417204935cSmrg  SAVE_CFLAGS=$CFLAGS
14421016ad83Smrg  CFLAGS="$CFLAGS -belf"
14431016ad83Smrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
14441016ad83Smrg    [AC_LANG_PUSH(C)
14451016ad83Smrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
14461016ad83Smrg     AC_LANG_POP])
14477204935cSmrg  if test yes != "$lt_cv_cc_needs_belf"; then
14481016ad83Smrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
14497204935cSmrg    CFLAGS=$SAVE_CFLAGS
14501016ad83Smrg  fi
14511016ad83Smrg  ;;
14521016ad83Smrg*-*solaris*)
14537204935cSmrg  # Find out what ABI is being produced by ac_compile, and set linker
14547204935cSmrg  # options accordingly.
14551016ad83Smrg  echo 'int i;' > conftest.$ac_ext
14561016ad83Smrg  if AC_TRY_EVAL(ac_compile); then
14571016ad83Smrg    case `/usr/bin/file conftest.o` in
14581016ad83Smrg    *64-bit*)
14591016ad83Smrg      case $lt_cv_prog_gnu_ld in
14601016ad83Smrg      yes*)
14611016ad83Smrg        case $host in
14627204935cSmrg        i?86-*-solaris*|x86_64-*-solaris*)
14631016ad83Smrg          LD="${LD-ld} -m elf_x86_64"
14641016ad83Smrg          ;;
14651016ad83Smrg        sparc*-*-solaris*)
14661016ad83Smrg          LD="${LD-ld} -m elf64_sparc"
14671016ad83Smrg          ;;
14681016ad83Smrg        esac
14691016ad83Smrg        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
14701016ad83Smrg        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
14717204935cSmrg          LD=${LD-ld}_sol2
14721016ad83Smrg        fi
14731016ad83Smrg        ;;
14741016ad83Smrg      *)
14751016ad83Smrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
14761016ad83Smrg	  LD="${LD-ld} -64"
14771016ad83Smrg	fi
14781016ad83Smrg	;;
14791016ad83Smrg      esac
14801016ad83Smrg      ;;
14811016ad83Smrg    esac
14821016ad83Smrg  fi
14831016ad83Smrg  rm -rf conftest*
14841016ad83Smrg  ;;
14851016ad83Smrgesac
14861016ad83Smrg
14877204935cSmrgneed_locks=$enable_libtool_lock
14881016ad83Smrg])# _LT_ENABLE_LOCK
14891016ad83Smrg
14901016ad83Smrg
14911016ad83Smrg# _LT_PROG_AR
14921016ad83Smrg# -----------
14931016ad83Smrgm4_defun([_LT_PROG_AR],
14941016ad83Smrg[AC_CHECK_TOOLS(AR, [ar], false)
14951016ad83Smrg: ${AR=ar}
14961016ad83Smrg: ${AR_FLAGS=cru}
14971016ad83Smrg_LT_DECL([], [AR], [1], [The archiver])
14981016ad83Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
14991016ad83Smrg
15001016ad83SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
15011016ad83Smrg  [lt_cv_ar_at_file=no
15021016ad83Smrg   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
15031016ad83Smrg     [echo conftest.$ac_objext > conftest.lst
15041016ad83Smrg      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
15051016ad83Smrg      AC_TRY_EVAL([lt_ar_try])
15067204935cSmrg      if test 0 -eq "$ac_status"; then
15071016ad83Smrg	# Ensure the archiver fails upon bogus file names.
15081016ad83Smrg	rm -f conftest.$ac_objext libconftest.a
15091016ad83Smrg	AC_TRY_EVAL([lt_ar_try])
15107204935cSmrg	if test 0 -ne "$ac_status"; then
15111016ad83Smrg          lt_cv_ar_at_file=@
15121016ad83Smrg        fi
15131016ad83Smrg      fi
15141016ad83Smrg      rm -f conftest.* libconftest.a
15151016ad83Smrg     ])
15161016ad83Smrg  ])
15171016ad83Smrg
15187204935cSmrgif test no = "$lt_cv_ar_at_file"; then
15191016ad83Smrg  archiver_list_spec=
15201016ad83Smrgelse
15211016ad83Smrg  archiver_list_spec=$lt_cv_ar_at_file
15221016ad83Smrgfi
15231016ad83Smrg_LT_DECL([], [archiver_list_spec], [1],
15241016ad83Smrg  [How to feed a file listing to the archiver])
15251016ad83Smrg])# _LT_PROG_AR
15261016ad83Smrg
15271016ad83Smrg
15281016ad83Smrg# _LT_CMD_OLD_ARCHIVE
15291016ad83Smrg# -------------------
15301016ad83Smrgm4_defun([_LT_CMD_OLD_ARCHIVE],
15311016ad83Smrg[_LT_PROG_AR
15321016ad83Smrg
15331016ad83SmrgAC_CHECK_TOOL(STRIP, strip, :)
15341016ad83Smrgtest -z "$STRIP" && STRIP=:
15351016ad83Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
15361016ad83Smrg
15371016ad83SmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
15381016ad83Smrgtest -z "$RANLIB" && RANLIB=:
15391016ad83Smrg_LT_DECL([], [RANLIB], [1],
15401016ad83Smrg    [Commands used to install an old-style archive])
15411016ad83Smrg
15421016ad83Smrg# Determine commands to create old-style static archives.
15431016ad83Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
15441016ad83Smrgold_postinstall_cmds='chmod 644 $oldlib'
15451016ad83Smrgold_postuninstall_cmds=
15461016ad83Smrg
15471016ad83Smrgif test -n "$RANLIB"; then
15481016ad83Smrg  case $host_os in
15497204935cSmrg  bitrig* | openbsd*)
15501016ad83Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
15511016ad83Smrg    ;;
15521016ad83Smrg  *)
15531016ad83Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
15541016ad83Smrg    ;;
15551016ad83Smrg  esac
15561016ad83Smrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
15571016ad83Smrgfi
15581016ad83Smrg
15591016ad83Smrgcase $host_os in
15601016ad83Smrg  darwin*)
15611016ad83Smrg    lock_old_archive_extraction=yes ;;
15621016ad83Smrg  *)
15631016ad83Smrg    lock_old_archive_extraction=no ;;
15641016ad83Smrgesac
15651016ad83Smrg_LT_DECL([], [old_postinstall_cmds], [2])
15661016ad83Smrg_LT_DECL([], [old_postuninstall_cmds], [2])
15671016ad83Smrg_LT_TAGDECL([], [old_archive_cmds], [2],
15681016ad83Smrg    [Commands used to build an old-style archive])
15691016ad83Smrg_LT_DECL([], [lock_old_archive_extraction], [0],
15701016ad83Smrg    [Whether to use a lock for old archive extraction])
15711016ad83Smrg])# _LT_CMD_OLD_ARCHIVE
15721016ad83Smrg
15731016ad83Smrg
15741016ad83Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
15751016ad83Smrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
15761016ad83Smrg# ----------------------------------------------------------------
15771016ad83Smrg# Check whether the given compiler option works
15781016ad83SmrgAC_DEFUN([_LT_COMPILER_OPTION],
15791016ad83Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
15801016ad83Smrgm4_require([_LT_DECL_SED])dnl
15811016ad83SmrgAC_CACHE_CHECK([$1], [$2],
15821016ad83Smrg  [$2=no
15831016ad83Smrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
15841016ad83Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
15857204935cSmrg   lt_compiler_flag="$3"  ## exclude from sc_useless_quotes_in_assignment
15861016ad83Smrg   # Insert the option either (1) after the last *FLAGS variable, or
15871016ad83Smrg   # (2) before a word containing "conftest.", or (3) at the end.
15881016ad83Smrg   # Note that $ac_compile itself does not contain backslashes and begins
15891016ad83Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
15901016ad83Smrg   # The option is referenced via a variable to avoid confusing sed.
15911016ad83Smrg   lt_compile=`echo "$ac_compile" | $SED \
15921016ad83Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
15931016ad83Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
15941016ad83Smrg   -e 's:$: $lt_compiler_flag:'`
15951016ad83Smrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
15961016ad83Smrg   (eval "$lt_compile" 2>conftest.err)
15971016ad83Smrg   ac_status=$?
15981016ad83Smrg   cat conftest.err >&AS_MESSAGE_LOG_FD
15991016ad83Smrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
16001016ad83Smrg   if (exit $ac_status) && test -s "$ac_outfile"; then
16011016ad83Smrg     # The compiler can only warn and ignore the option if not recognized
16021016ad83Smrg     # So say no if there are warnings other than the usual output.
16031016ad83Smrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
16041016ad83Smrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
16051016ad83Smrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
16061016ad83Smrg       $2=yes
16071016ad83Smrg     fi
16081016ad83Smrg   fi
16091016ad83Smrg   $RM conftest*
16101016ad83Smrg])
16111016ad83Smrg
16127204935cSmrgif test yes = "[$]$2"; then
16131016ad83Smrg    m4_if([$5], , :, [$5])
16141016ad83Smrgelse
16151016ad83Smrg    m4_if([$6], , :, [$6])
16161016ad83Smrgfi
16171016ad83Smrg])# _LT_COMPILER_OPTION
16181016ad83Smrg
16191016ad83Smrg# Old name:
16201016ad83SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
16211016ad83Smrgdnl aclocal-1.4 backwards compatibility:
16221016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
16231016ad83Smrg
16241016ad83Smrg
16251016ad83Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
16261016ad83Smrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
16271016ad83Smrg# ----------------------------------------------------
16281016ad83Smrg# Check whether the given linker option works
16291016ad83SmrgAC_DEFUN([_LT_LINKER_OPTION],
16301016ad83Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
16311016ad83Smrgm4_require([_LT_DECL_SED])dnl
16321016ad83SmrgAC_CACHE_CHECK([$1], [$2],
16331016ad83Smrg  [$2=no
16347204935cSmrg   save_LDFLAGS=$LDFLAGS
16351016ad83Smrg   LDFLAGS="$LDFLAGS $3"
16361016ad83Smrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
16371016ad83Smrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
16381016ad83Smrg     # The linker can only warn and ignore the option if not recognized
16391016ad83Smrg     # So say no if there are warnings
16401016ad83Smrg     if test -s conftest.err; then
16411016ad83Smrg       # Append any errors to the config.log.
16421016ad83Smrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
16431016ad83Smrg       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
16441016ad83Smrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
16451016ad83Smrg       if diff conftest.exp conftest.er2 >/dev/null; then
16461016ad83Smrg         $2=yes
16471016ad83Smrg       fi
16481016ad83Smrg     else
16491016ad83Smrg       $2=yes
16501016ad83Smrg     fi
16511016ad83Smrg   fi
16521016ad83Smrg   $RM -r conftest*
16537204935cSmrg   LDFLAGS=$save_LDFLAGS
16541016ad83Smrg])
16551016ad83Smrg
16567204935cSmrgif test yes = "[$]$2"; then
16571016ad83Smrg    m4_if([$4], , :, [$4])
16581016ad83Smrgelse
16591016ad83Smrg    m4_if([$5], , :, [$5])
16601016ad83Smrgfi
16611016ad83Smrg])# _LT_LINKER_OPTION
16621016ad83Smrg
16631016ad83Smrg# Old name:
16641016ad83SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
16651016ad83Smrgdnl aclocal-1.4 backwards compatibility:
16661016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
16671016ad83Smrg
16681016ad83Smrg
16691016ad83Smrg# LT_CMD_MAX_LEN
16701016ad83Smrg#---------------
16711016ad83SmrgAC_DEFUN([LT_CMD_MAX_LEN],
16721016ad83Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
16731016ad83Smrg# find the maximum length of command line arguments
16741016ad83SmrgAC_MSG_CHECKING([the maximum length of command line arguments])
16751016ad83SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
16761016ad83Smrg  i=0
16777204935cSmrg  teststring=ABCD
16781016ad83Smrg
16791016ad83Smrg  case $build_os in
16801016ad83Smrg  msdosdjgpp*)
16811016ad83Smrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
16821016ad83Smrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
16831016ad83Smrg    # during glob expansion).  Even if it were fixed, the result of this
16841016ad83Smrg    # check would be larger than it should be.
16851016ad83Smrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
16861016ad83Smrg    ;;
16871016ad83Smrg
16881016ad83Smrg  gnu*)
16891016ad83Smrg    # Under GNU Hurd, this test is not required because there is
16901016ad83Smrg    # no limit to the length of command line arguments.
16911016ad83Smrg    # Libtool will interpret -1 as no limit whatsoever
16921016ad83Smrg    lt_cv_sys_max_cmd_len=-1;
16931016ad83Smrg    ;;
16941016ad83Smrg
16951016ad83Smrg  cygwin* | mingw* | cegcc*)
16961016ad83Smrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
16971016ad83Smrg    # about 5 minutes as the teststring grows exponentially.
16981016ad83Smrg    # Worse, since 9x/ME are not pre-emptively multitasking,
16991016ad83Smrg    # you end up with a "frozen" computer, even though with patience
17001016ad83Smrg    # the test eventually succeeds (with a max line length of 256k).
17011016ad83Smrg    # Instead, let's just punt: use the minimum linelength reported by
17021016ad83Smrg    # all of the supported platforms: 8192 (on NT/2K/XP).
17031016ad83Smrg    lt_cv_sys_max_cmd_len=8192;
17041016ad83Smrg    ;;
17051016ad83Smrg
17061016ad83Smrg  mint*)
17071016ad83Smrg    # On MiNT this can take a long time and run out of memory.
17081016ad83Smrg    lt_cv_sys_max_cmd_len=8192;
17091016ad83Smrg    ;;
17101016ad83Smrg
17111016ad83Smrg  amigaos*)
17121016ad83Smrg    # On AmigaOS with pdksh, this test takes hours, literally.
17131016ad83Smrg    # So we just punt and use a minimum line length of 8192.
17141016ad83Smrg    lt_cv_sys_max_cmd_len=8192;
17151016ad83Smrg    ;;
17161016ad83Smrg
17177204935cSmrg  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
17181016ad83Smrg    # This has been around since 386BSD, at least.  Likely further.
17191016ad83Smrg    if test -x /sbin/sysctl; then
17201016ad83Smrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
17211016ad83Smrg    elif test -x /usr/sbin/sysctl; then
17221016ad83Smrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
17231016ad83Smrg    else
17241016ad83Smrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
17251016ad83Smrg    fi
17261016ad83Smrg    # And add a safety zone
17271016ad83Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
17281016ad83Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
17291016ad83Smrg    ;;
17301016ad83Smrg
17311016ad83Smrg  interix*)
17321016ad83Smrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
17331016ad83Smrg    lt_cv_sys_max_cmd_len=196608
17341016ad83Smrg    ;;
17351016ad83Smrg
17361016ad83Smrg  os2*)
17371016ad83Smrg    # The test takes a long time on OS/2.
17381016ad83Smrg    lt_cv_sys_max_cmd_len=8192
17391016ad83Smrg    ;;
17401016ad83Smrg
17411016ad83Smrg  osf*)
17421016ad83Smrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
17431016ad83Smrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
17441016ad83Smrg    # nice to cause kernel panics so lets avoid the loop below.
17451016ad83Smrg    # First set a reasonable default.
17461016ad83Smrg    lt_cv_sys_max_cmd_len=16384
17471016ad83Smrg    #
17481016ad83Smrg    if test -x /sbin/sysconfig; then
17491016ad83Smrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
17501016ad83Smrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
17511016ad83Smrg      esac
17521016ad83Smrg    fi
17531016ad83Smrg    ;;
17541016ad83Smrg  sco3.2v5*)
17551016ad83Smrg    lt_cv_sys_max_cmd_len=102400
17561016ad83Smrg    ;;
17571016ad83Smrg  sysv5* | sco5v6* | sysv4.2uw2*)
17581016ad83Smrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
17591016ad83Smrg    if test -n "$kargmax"; then
17601016ad83Smrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
17611016ad83Smrg    else
17621016ad83Smrg      lt_cv_sys_max_cmd_len=32768
17631016ad83Smrg    fi
17641016ad83Smrg    ;;
17651016ad83Smrg  *)
17661016ad83Smrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
17671016ad83Smrg    if test -n "$lt_cv_sys_max_cmd_len" && \
17687204935cSmrg       test undefined != "$lt_cv_sys_max_cmd_len"; then
17691016ad83Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
17701016ad83Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
17711016ad83Smrg    else
17721016ad83Smrg      # Make teststring a little bigger before we do anything with it.
17731016ad83Smrg      # a 1K string should be a reasonable start.
17747204935cSmrg      for i in 1 2 3 4 5 6 7 8; do
17751016ad83Smrg        teststring=$teststring$teststring
17761016ad83Smrg      done
17771016ad83Smrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
17781016ad83Smrg      # If test is not a shell built-in, we'll probably end up computing a
17791016ad83Smrg      # maximum length that is only half of the actual maximum length, but
17801016ad83Smrg      # we can't tell.
17817204935cSmrg      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
17821016ad83Smrg	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
17837204935cSmrg	      test 17 != "$i" # 1/2 MB should be enough
17841016ad83Smrg      do
17851016ad83Smrg        i=`expr $i + 1`
17861016ad83Smrg        teststring=$teststring$teststring
17871016ad83Smrg      done
17881016ad83Smrg      # Only check the string length outside the loop.
17891016ad83Smrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
17901016ad83Smrg      teststring=
17911016ad83Smrg      # Add a significant safety factor because C++ compilers can tack on
17921016ad83Smrg      # massive amounts of additional arguments before passing them to the
17931016ad83Smrg      # linker.  It appears as though 1/2 is a usable value.
17941016ad83Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
17951016ad83Smrg    fi
17961016ad83Smrg    ;;
17971016ad83Smrg  esac
17981016ad83Smrg])
17997204935cSmrgif test -n "$lt_cv_sys_max_cmd_len"; then
18001016ad83Smrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
18011016ad83Smrgelse
18021016ad83Smrg  AC_MSG_RESULT(none)
18031016ad83Smrgfi
18041016ad83Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len
18051016ad83Smrg_LT_DECL([], [max_cmd_len], [0],
18061016ad83Smrg    [What is the maximum length of a command?])
18071016ad83Smrg])# LT_CMD_MAX_LEN
18081016ad83Smrg
18091016ad83Smrg# Old name:
18101016ad83SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
18111016ad83Smrgdnl aclocal-1.4 backwards compatibility:
18121016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
18131016ad83Smrg
18141016ad83Smrg
18151016ad83Smrg# _LT_HEADER_DLFCN
18161016ad83Smrg# ----------------
18171016ad83Smrgm4_defun([_LT_HEADER_DLFCN],
18181016ad83Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
18191016ad83Smrg])# _LT_HEADER_DLFCN
18201016ad83Smrg
18211016ad83Smrg
18221016ad83Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
18231016ad83Smrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
18241016ad83Smrg# ----------------------------------------------------------------
18251016ad83Smrgm4_defun([_LT_TRY_DLOPEN_SELF],
18261016ad83Smrg[m4_require([_LT_HEADER_DLFCN])dnl
18277204935cSmrgif test yes = "$cross_compiling"; then :
18281016ad83Smrg  [$4]
18291016ad83Smrgelse
18301016ad83Smrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
18311016ad83Smrg  lt_status=$lt_dlunknown
18321016ad83Smrg  cat > conftest.$ac_ext <<_LT_EOF
18331016ad83Smrg[#line $LINENO "configure"
18341016ad83Smrg#include "confdefs.h"
18351016ad83Smrg
18361016ad83Smrg#if HAVE_DLFCN_H
18371016ad83Smrg#include <dlfcn.h>
18381016ad83Smrg#endif
18391016ad83Smrg
18401016ad83Smrg#include <stdio.h>
18411016ad83Smrg
18421016ad83Smrg#ifdef RTLD_GLOBAL
18431016ad83Smrg#  define LT_DLGLOBAL		RTLD_GLOBAL
18441016ad83Smrg#else
18451016ad83Smrg#  ifdef DL_GLOBAL
18461016ad83Smrg#    define LT_DLGLOBAL		DL_GLOBAL
18471016ad83Smrg#  else
18481016ad83Smrg#    define LT_DLGLOBAL		0
18491016ad83Smrg#  endif
18501016ad83Smrg#endif
18511016ad83Smrg
18521016ad83Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
18531016ad83Smrg   find out it does not work in some platform. */
18541016ad83Smrg#ifndef LT_DLLAZY_OR_NOW
18551016ad83Smrg#  ifdef RTLD_LAZY
18561016ad83Smrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
18571016ad83Smrg#  else
18581016ad83Smrg#    ifdef DL_LAZY
18591016ad83Smrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
18601016ad83Smrg#    else
18611016ad83Smrg#      ifdef RTLD_NOW
18621016ad83Smrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
18631016ad83Smrg#      else
18641016ad83Smrg#        ifdef DL_NOW
18651016ad83Smrg#          define LT_DLLAZY_OR_NOW	DL_NOW
18661016ad83Smrg#        else
18671016ad83Smrg#          define LT_DLLAZY_OR_NOW	0
18681016ad83Smrg#        endif
18691016ad83Smrg#      endif
18701016ad83Smrg#    endif
18711016ad83Smrg#  endif
18721016ad83Smrg#endif
18731016ad83Smrg
18747204935cSmrg/* When -fvisibility=hidden is used, assume the code has been annotated
18751016ad83Smrg   correspondingly for the symbols needed.  */
18767204935cSmrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
18771016ad83Smrgint fnord () __attribute__((visibility("default")));
18781016ad83Smrg#endif
18791016ad83Smrg
18801016ad83Smrgint fnord () { return 42; }
18811016ad83Smrgint main ()
18821016ad83Smrg{
18831016ad83Smrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
18841016ad83Smrg  int status = $lt_dlunknown;
18851016ad83Smrg
18861016ad83Smrg  if (self)
18871016ad83Smrg    {
18881016ad83Smrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
18891016ad83Smrg      else
18901016ad83Smrg        {
18911016ad83Smrg	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
18921016ad83Smrg          else puts (dlerror ());
18931016ad83Smrg	}
18941016ad83Smrg      /* dlclose (self); */
18951016ad83Smrg    }
18961016ad83Smrg  else
18971016ad83Smrg    puts (dlerror ());
18981016ad83Smrg
18991016ad83Smrg  return status;
19001016ad83Smrg}]
19011016ad83Smrg_LT_EOF
19027204935cSmrg  if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
19031016ad83Smrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
19041016ad83Smrg    lt_status=$?
19051016ad83Smrg    case x$lt_status in
19061016ad83Smrg      x$lt_dlno_uscore) $1 ;;
19071016ad83Smrg      x$lt_dlneed_uscore) $2 ;;
19081016ad83Smrg      x$lt_dlunknown|x*) $3 ;;
19091016ad83Smrg    esac
19101016ad83Smrg  else :
19111016ad83Smrg    # compilation failed
19121016ad83Smrg    $3
19131016ad83Smrg  fi
19141016ad83Smrgfi
19151016ad83Smrgrm -fr conftest*
19161016ad83Smrg])# _LT_TRY_DLOPEN_SELF
19171016ad83Smrg
19181016ad83Smrg
19191016ad83Smrg# LT_SYS_DLOPEN_SELF
19201016ad83Smrg# ------------------
19211016ad83SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
19221016ad83Smrg[m4_require([_LT_HEADER_DLFCN])dnl
19237204935cSmrgif test yes != "$enable_dlopen"; then
19241016ad83Smrg  enable_dlopen=unknown
19251016ad83Smrg  enable_dlopen_self=unknown
19261016ad83Smrg  enable_dlopen_self_static=unknown
19271016ad83Smrgelse
19281016ad83Smrg  lt_cv_dlopen=no
19291016ad83Smrg  lt_cv_dlopen_libs=
19301016ad83Smrg
19311016ad83Smrg  case $host_os in
19321016ad83Smrg  beos*)
19337204935cSmrg    lt_cv_dlopen=load_add_on
19341016ad83Smrg    lt_cv_dlopen_libs=
19351016ad83Smrg    lt_cv_dlopen_self=yes
19361016ad83Smrg    ;;
19371016ad83Smrg
19381016ad83Smrg  mingw* | pw32* | cegcc*)
19397204935cSmrg    lt_cv_dlopen=LoadLibrary
19401016ad83Smrg    lt_cv_dlopen_libs=
19411016ad83Smrg    ;;
19421016ad83Smrg
19431016ad83Smrg  cygwin*)
19447204935cSmrg    lt_cv_dlopen=dlopen
19451016ad83Smrg    lt_cv_dlopen_libs=
19461016ad83Smrg    ;;
19471016ad83Smrg
19481016ad83Smrg  darwin*)
19497204935cSmrg    # if libdl is installed we need to link against it
19501016ad83Smrg    AC_CHECK_LIB([dl], [dlopen],
19517204935cSmrg		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
19527204935cSmrg    lt_cv_dlopen=dyld
19531016ad83Smrg    lt_cv_dlopen_libs=
19541016ad83Smrg    lt_cv_dlopen_self=yes
19551016ad83Smrg    ])
19561016ad83Smrg    ;;
19571016ad83Smrg
19587204935cSmrg  tpf*)
19597204935cSmrg    # Don't try to run any link tests for TPF.  We know it's impossible
19607204935cSmrg    # because TPF is a cross-compiler, and we know how we open DSOs.
19617204935cSmrg    lt_cv_dlopen=dlopen
19627204935cSmrg    lt_cv_dlopen_libs=
19637204935cSmrg    lt_cv_dlopen_self=no
19647204935cSmrg    ;;
19657204935cSmrg
19661016ad83Smrg  *)
19671016ad83Smrg    AC_CHECK_FUNC([shl_load],
19687204935cSmrg	  [lt_cv_dlopen=shl_load],
19691016ad83Smrg      [AC_CHECK_LIB([dld], [shl_load],
19707204935cSmrg	    [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
19711016ad83Smrg	[AC_CHECK_FUNC([dlopen],
19727204935cSmrg	      [lt_cv_dlopen=dlopen],
19731016ad83Smrg	  [AC_CHECK_LIB([dl], [dlopen],
19747204935cSmrg		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
19751016ad83Smrg	    [AC_CHECK_LIB([svld], [dlopen],
19767204935cSmrg		  [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
19771016ad83Smrg	      [AC_CHECK_LIB([dld], [dld_link],
19787204935cSmrg		    [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
19791016ad83Smrg	      ])
19801016ad83Smrg	    ])
19811016ad83Smrg	  ])
19821016ad83Smrg	])
19831016ad83Smrg      ])
19841016ad83Smrg    ;;
19851016ad83Smrg  esac
19861016ad83Smrg
19877204935cSmrg  if test no = "$lt_cv_dlopen"; then
19881016ad83Smrg    enable_dlopen=no
19897204935cSmrg  else
19907204935cSmrg    enable_dlopen=yes
19911016ad83Smrg  fi
19921016ad83Smrg
19931016ad83Smrg  case $lt_cv_dlopen in
19941016ad83Smrg  dlopen)
19957204935cSmrg    save_CPPFLAGS=$CPPFLAGS
19967204935cSmrg    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
19971016ad83Smrg
19987204935cSmrg    save_LDFLAGS=$LDFLAGS
19991016ad83Smrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
20001016ad83Smrg
20017204935cSmrg    save_LIBS=$LIBS
20021016ad83Smrg    LIBS="$lt_cv_dlopen_libs $LIBS"
20031016ad83Smrg
20041016ad83Smrg    AC_CACHE_CHECK([whether a program can dlopen itself],
20051016ad83Smrg	  lt_cv_dlopen_self, [dnl
20061016ad83Smrg	  _LT_TRY_DLOPEN_SELF(
20071016ad83Smrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
20081016ad83Smrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
20091016ad83Smrg    ])
20101016ad83Smrg
20117204935cSmrg    if test yes = "$lt_cv_dlopen_self"; then
20121016ad83Smrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
20131016ad83Smrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
20141016ad83Smrg	  lt_cv_dlopen_self_static, [dnl
20151016ad83Smrg	  _LT_TRY_DLOPEN_SELF(
20161016ad83Smrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
20171016ad83Smrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
20181016ad83Smrg      ])
20191016ad83Smrg    fi
20201016ad83Smrg
20217204935cSmrg    CPPFLAGS=$save_CPPFLAGS
20227204935cSmrg    LDFLAGS=$save_LDFLAGS
20237204935cSmrg    LIBS=$save_LIBS
20241016ad83Smrg    ;;
20251016ad83Smrg  esac
20261016ad83Smrg
20271016ad83Smrg  case $lt_cv_dlopen_self in
20281016ad83Smrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
20291016ad83Smrg  *) enable_dlopen_self=unknown ;;
20301016ad83Smrg  esac
20311016ad83Smrg
20321016ad83Smrg  case $lt_cv_dlopen_self_static in
20331016ad83Smrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
20341016ad83Smrg  *) enable_dlopen_self_static=unknown ;;
20351016ad83Smrg  esac
20361016ad83Smrgfi
20371016ad83Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
20381016ad83Smrg	 [Whether dlopen is supported])
20391016ad83Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
20401016ad83Smrg	 [Whether dlopen of programs is supported])
20411016ad83Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
20421016ad83Smrg	 [Whether dlopen of statically linked programs is supported])
20431016ad83Smrg])# LT_SYS_DLOPEN_SELF
20441016ad83Smrg
20451016ad83Smrg# Old name:
20461016ad83SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
20471016ad83Smrgdnl aclocal-1.4 backwards compatibility:
20481016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
20491016ad83Smrg
20501016ad83Smrg
20511016ad83Smrg# _LT_COMPILER_C_O([TAGNAME])
20521016ad83Smrg# ---------------------------
20531016ad83Smrg# Check to see if options -c and -o are simultaneously supported by compiler.
20541016ad83Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
20551016ad83Smrgm4_defun([_LT_COMPILER_C_O],
20561016ad83Smrg[m4_require([_LT_DECL_SED])dnl
20571016ad83Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
20581016ad83Smrgm4_require([_LT_TAG_COMPILER])dnl
20591016ad83SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
20601016ad83Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
20611016ad83Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
20621016ad83Smrg   $RM -r conftest 2>/dev/null
20631016ad83Smrg   mkdir conftest
20641016ad83Smrg   cd conftest
20651016ad83Smrg   mkdir out
20661016ad83Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
20671016ad83Smrg
20681016ad83Smrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
20691016ad83Smrg   # Insert the option either (1) after the last *FLAGS variable, or
20701016ad83Smrg   # (2) before a word containing "conftest.", or (3) at the end.
20711016ad83Smrg   # Note that $ac_compile itself does not contain backslashes and begins
20721016ad83Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
20731016ad83Smrg   lt_compile=`echo "$ac_compile" | $SED \
20741016ad83Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
20751016ad83Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
20761016ad83Smrg   -e 's:$: $lt_compiler_flag:'`
20771016ad83Smrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
20781016ad83Smrg   (eval "$lt_compile" 2>out/conftest.err)
20791016ad83Smrg   ac_status=$?
20801016ad83Smrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
20811016ad83Smrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
20821016ad83Smrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
20831016ad83Smrg   then
20841016ad83Smrg     # The compiler can only warn and ignore the option if not recognized
20851016ad83Smrg     # So say no if there are warnings
20861016ad83Smrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
20871016ad83Smrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
20881016ad83Smrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
20891016ad83Smrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
20901016ad83Smrg     fi
20911016ad83Smrg   fi
20921016ad83Smrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
20931016ad83Smrg   $RM conftest*
20941016ad83Smrg   # SGI C++ compiler will create directory out/ii_files/ for
20951016ad83Smrg   # template instantiation
20961016ad83Smrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
20971016ad83Smrg   $RM out/* && rmdir out
20981016ad83Smrg   cd ..
20991016ad83Smrg   $RM -r conftest
21001016ad83Smrg   $RM conftest*
21011016ad83Smrg])
21021016ad83Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
21031016ad83Smrg	[Does compiler simultaneously support -c and -o options?])
21041016ad83Smrg])# _LT_COMPILER_C_O
21051016ad83Smrg
21061016ad83Smrg
21071016ad83Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
21081016ad83Smrg# ----------------------------------
21091016ad83Smrg# Check to see if we can do hard links to lock some files if needed
21101016ad83Smrgm4_defun([_LT_COMPILER_FILE_LOCKS],
21111016ad83Smrg[m4_require([_LT_ENABLE_LOCK])dnl
21121016ad83Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
21131016ad83Smrg_LT_COMPILER_C_O([$1])
21141016ad83Smrg
21157204935cSmrghard_links=nottested
21167204935cSmrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
21171016ad83Smrg  # do not overwrite the value of need_locks provided by the user
21181016ad83Smrg  AC_MSG_CHECKING([if we can lock with hard links])
21191016ad83Smrg  hard_links=yes
21201016ad83Smrg  $RM conftest*
21211016ad83Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
21221016ad83Smrg  touch conftest.a
21231016ad83Smrg  ln conftest.a conftest.b 2>&5 || hard_links=no
21241016ad83Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
21251016ad83Smrg  AC_MSG_RESULT([$hard_links])
21267204935cSmrg  if test no = "$hard_links"; then
21277204935cSmrg    AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
21281016ad83Smrg    need_locks=warn
21291016ad83Smrg  fi
21301016ad83Smrgelse
21311016ad83Smrg  need_locks=no
21321016ad83Smrgfi
21331016ad83Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
21341016ad83Smrg])# _LT_COMPILER_FILE_LOCKS
21351016ad83Smrg
21361016ad83Smrg
21371016ad83Smrg# _LT_CHECK_OBJDIR
21381016ad83Smrg# ----------------
21391016ad83Smrgm4_defun([_LT_CHECK_OBJDIR],
21401016ad83Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
21411016ad83Smrg[rm -f .libs 2>/dev/null
21421016ad83Smrgmkdir .libs 2>/dev/null
21431016ad83Smrgif test -d .libs; then
21441016ad83Smrg  lt_cv_objdir=.libs
21451016ad83Smrgelse
21461016ad83Smrg  # MS-DOS does not allow filenames that begin with a dot.
21471016ad83Smrg  lt_cv_objdir=_libs
21481016ad83Smrgfi
21491016ad83Smrgrmdir .libs 2>/dev/null])
21501016ad83Smrgobjdir=$lt_cv_objdir
21511016ad83Smrg_LT_DECL([], [objdir], [0],
21521016ad83Smrg         [The name of the directory that contains temporary libtool files])dnl
21531016ad83Smrgm4_pattern_allow([LT_OBJDIR])dnl
21547204935cSmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
21557204935cSmrg  [Define to the sub-directory where libtool stores uninstalled libraries.])
21561016ad83Smrg])# _LT_CHECK_OBJDIR
21571016ad83Smrg
21581016ad83Smrg
21591016ad83Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
21601016ad83Smrg# --------------------------------------
21611016ad83Smrg# Check hardcoding attributes.
21621016ad83Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
21631016ad83Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
21641016ad83Smrg_LT_TAGVAR(hardcode_action, $1)=
21651016ad83Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
21661016ad83Smrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
21677204935cSmrg   test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
21681016ad83Smrg
21691016ad83Smrg  # We can hardcode non-existent directories.
21707204935cSmrg  if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
21711016ad83Smrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
21721016ad83Smrg     # have to relink, otherwise we might link with an installed library
21731016ad83Smrg     # when we should be linking with a yet-to-be-installed one
21747204935cSmrg     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
21757204935cSmrg     test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
21761016ad83Smrg    # Linking always hardcodes the temporary library directory.
21771016ad83Smrg    _LT_TAGVAR(hardcode_action, $1)=relink
21781016ad83Smrg  else
21791016ad83Smrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
21801016ad83Smrg    _LT_TAGVAR(hardcode_action, $1)=immediate
21811016ad83Smrg  fi
21821016ad83Smrgelse
21831016ad83Smrg  # We cannot hardcode anything, or else we can only hardcode existing
21841016ad83Smrg  # directories.
21851016ad83Smrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
21861016ad83Smrgfi
21871016ad83SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
21881016ad83Smrg
21897204935cSmrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
21907204935cSmrg   test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
21911016ad83Smrg  # Fast installation is not supported
21921016ad83Smrg  enable_fast_install=no
21937204935cSmrgelif test yes = "$shlibpath_overrides_runpath" ||
21947204935cSmrg     test no = "$enable_shared"; then
21951016ad83Smrg  # Fast installation is not necessary
21961016ad83Smrg  enable_fast_install=needless
21971016ad83Smrgfi
21981016ad83Smrg_LT_TAGDECL([], [hardcode_action], [0],
21991016ad83Smrg    [How to hardcode a shared library path into an executable])
22001016ad83Smrg])# _LT_LINKER_HARDCODE_LIBPATH
22011016ad83Smrg
22021016ad83Smrg
22031016ad83Smrg# _LT_CMD_STRIPLIB
22041016ad83Smrg# ----------------
22051016ad83Smrgm4_defun([_LT_CMD_STRIPLIB],
22061016ad83Smrg[m4_require([_LT_DECL_EGREP])
22071016ad83Smrgstriplib=
22081016ad83Smrgold_striplib=
22091016ad83SmrgAC_MSG_CHECKING([whether stripping libraries is possible])
22101016ad83Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
22111016ad83Smrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
22121016ad83Smrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
22131016ad83Smrg  AC_MSG_RESULT([yes])
22141016ad83Smrgelse
22151016ad83Smrg# FIXME - insert some real tests, host_os isn't really good enough
22161016ad83Smrg  case $host_os in
22171016ad83Smrg  darwin*)
22187204935cSmrg    if test -n "$STRIP"; then
22191016ad83Smrg      striplib="$STRIP -x"
22201016ad83Smrg      old_striplib="$STRIP -S"
22211016ad83Smrg      AC_MSG_RESULT([yes])
22221016ad83Smrg    else
22231016ad83Smrg      AC_MSG_RESULT([no])
22241016ad83Smrg    fi
22251016ad83Smrg    ;;
22261016ad83Smrg  *)
22271016ad83Smrg    AC_MSG_RESULT([no])
22281016ad83Smrg    ;;
22291016ad83Smrg  esac
22301016ad83Smrgfi
22311016ad83Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
22321016ad83Smrg_LT_DECL([], [striplib], [1])
22331016ad83Smrg])# _LT_CMD_STRIPLIB
22341016ad83Smrg
22351016ad83Smrg
22367204935cSmrg# _LT_PREPARE_MUNGE_PATH_LIST
22377204935cSmrg# ---------------------------
22387204935cSmrg# Make sure func_munge_path_list() is defined correctly.
22397204935cSmrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
22407204935cSmrg[[# func_munge_path_list VARIABLE PATH
22417204935cSmrg# -----------------------------------
22427204935cSmrg# VARIABLE is name of variable containing _space_ separated list of
22437204935cSmrg# directories to be munged by the contents of PATH, which is string
22447204935cSmrg# having a format:
22457204935cSmrg# "DIR[:DIR]:"
22467204935cSmrg#       string "DIR[ DIR]" will be prepended to VARIABLE
22477204935cSmrg# ":DIR[:DIR]"
22487204935cSmrg#       string "DIR[ DIR]" will be appended to VARIABLE
22497204935cSmrg# "DIRP[:DIRP]::[DIRA:]DIRA"
22507204935cSmrg#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
22517204935cSmrg#       "DIRA[ DIRA]" will be appended to VARIABLE
22527204935cSmrg# "DIR[:DIR]"
22537204935cSmrg#       VARIABLE will be replaced by "DIR[ DIR]"
22547204935cSmrgfunc_munge_path_list ()
22557204935cSmrg{
22567204935cSmrg    case x@S|@2 in
22577204935cSmrg    x)
22587204935cSmrg        ;;
22597204935cSmrg    *:)
22607204935cSmrg        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
22617204935cSmrg        ;;
22627204935cSmrg    x:*)
22637204935cSmrg        eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
22647204935cSmrg        ;;
22657204935cSmrg    *::*)
22667204935cSmrg        eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
22677204935cSmrg        eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
22687204935cSmrg        ;;
22697204935cSmrg    *)
22707204935cSmrg        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
22717204935cSmrg        ;;
22727204935cSmrg    esac
22737204935cSmrg}
22747204935cSmrg]])# _LT_PREPARE_PATH_LIST
22757204935cSmrg
22767204935cSmrg
22771016ad83Smrg# _LT_SYS_DYNAMIC_LINKER([TAG])
22781016ad83Smrg# -----------------------------
22791016ad83Smrg# PORTME Fill in your ld.so characteristics
22801016ad83Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
22811016ad83Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
22821016ad83Smrgm4_require([_LT_DECL_EGREP])dnl
22831016ad83Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
22841016ad83Smrgm4_require([_LT_DECL_OBJDUMP])dnl
22851016ad83Smrgm4_require([_LT_DECL_SED])dnl
22861016ad83Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
22877204935cSmrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
22881016ad83SmrgAC_MSG_CHECKING([dynamic linker characteristics])
22891016ad83Smrgm4_if([$1],
22901016ad83Smrg	[], [
22917204935cSmrgif test yes = "$GCC"; then
22921016ad83Smrg  case $host_os in
22937204935cSmrg    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
22947204935cSmrg    *) lt_awk_arg='/^libraries:/' ;;
22951016ad83Smrg  esac
22961016ad83Smrg  case $host_os in
22977204935cSmrg    mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
22987204935cSmrg    *) lt_sed_strip_eq='s|=/|/|g' ;;
22991016ad83Smrg  esac
23001016ad83Smrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
23011016ad83Smrg  case $lt_search_path_spec in
23021016ad83Smrg  *\;*)
23031016ad83Smrg    # if the path contains ";" then we assume it to be the separator
23041016ad83Smrg    # otherwise default to the standard path separator (i.e. ":") - it is
23051016ad83Smrg    # assumed that no part of a normal pathname contains ";" but that should
23061016ad83Smrg    # okay in the real world where ";" in dirpaths is itself problematic.
23071016ad83Smrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
23081016ad83Smrg    ;;
23091016ad83Smrg  *)
23101016ad83Smrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
23111016ad83Smrg    ;;
23121016ad83Smrg  esac
23131016ad83Smrg  # Ok, now we have the path, separated by spaces, we can step through it
23147204935cSmrg  # and add multilib dir if necessary...
23151016ad83Smrg  lt_tmp_lt_search_path_spec=
23167204935cSmrg  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
23177204935cSmrg  # ...but if some path component already ends with the multilib dir we assume
23187204935cSmrg  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
23197204935cSmrg  case "$lt_multi_os_dir; $lt_search_path_spec " in
23207204935cSmrg  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
23217204935cSmrg    lt_multi_os_dir=
23227204935cSmrg    ;;
23237204935cSmrg  esac
23241016ad83Smrg  for lt_sys_path in $lt_search_path_spec; do
23257204935cSmrg    if test -d "$lt_sys_path$lt_multi_os_dir"; then
23267204935cSmrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
23277204935cSmrg    elif test -n "$lt_multi_os_dir"; then
23281016ad83Smrg      test -d "$lt_sys_path" && \
23291016ad83Smrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
23301016ad83Smrg    fi
23311016ad83Smrg  done
23321016ad83Smrg  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
23337204935cSmrgBEGIN {RS = " "; FS = "/|\n";} {
23347204935cSmrg  lt_foo = "";
23357204935cSmrg  lt_count = 0;
23361016ad83Smrg  for (lt_i = NF; lt_i > 0; lt_i--) {
23371016ad83Smrg    if ($lt_i != "" && $lt_i != ".") {
23381016ad83Smrg      if ($lt_i == "..") {
23391016ad83Smrg        lt_count++;
23401016ad83Smrg      } else {
23411016ad83Smrg        if (lt_count == 0) {
23427204935cSmrg          lt_foo = "/" $lt_i lt_foo;
23431016ad83Smrg        } else {
23441016ad83Smrg          lt_count--;
23451016ad83Smrg        }
23461016ad83Smrg      }
23471016ad83Smrg    }
23481016ad83Smrg  }
23491016ad83Smrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
23501016ad83Smrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
23511016ad83Smrg}'`
23521016ad83Smrg  # AWK program above erroneously prepends '/' to C:/dos/paths
23531016ad83Smrg  # for these hosts.
23541016ad83Smrg  case $host_os in
23551016ad83Smrg    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
23567204935cSmrg      $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
23571016ad83Smrg  esac
23581016ad83Smrg  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
23591016ad83Smrgelse
23601016ad83Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
23611016ad83Smrgfi])
23621016ad83Smrglibrary_names_spec=
23631016ad83Smrglibname_spec='lib$name'
23641016ad83Smrgsoname_spec=
23657204935cSmrgshrext_cmds=.so
23661016ad83Smrgpostinstall_cmds=
23671016ad83Smrgpostuninstall_cmds=
23681016ad83Smrgfinish_cmds=
23691016ad83Smrgfinish_eval=
23701016ad83Smrgshlibpath_var=
23711016ad83Smrgshlibpath_overrides_runpath=unknown
23721016ad83Smrgversion_type=none
23731016ad83Smrgdynamic_linker="$host_os ld.so"
23741016ad83Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
23751016ad83Smrgneed_lib_prefix=unknown
23761016ad83Smrghardcode_into_libs=no
23771016ad83Smrg
23781016ad83Smrg# when you set need_version to no, make sure it does not cause -set_version
23791016ad83Smrg# flags to be left without arguments
23801016ad83Smrgneed_version=unknown
23811016ad83Smrg
23827204935cSmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH],
23837204935cSmrg[User-defined run-time library search path.])
23847204935cSmrg
23851016ad83Smrgcase $host_os in
23861016ad83Smrgaix3*)
23871016ad83Smrg  version_type=linux # correct to gnu/linux during the next big refactor
23887204935cSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
23891016ad83Smrg  shlibpath_var=LIBPATH
23901016ad83Smrg
23911016ad83Smrg  # AIX 3 has no versioning support, so we append a major version to the name.
23927204935cSmrg  soname_spec='$libname$release$shared_ext$major'
23931016ad83Smrg  ;;
23941016ad83Smrg
23951016ad83Smrgaix[[4-9]]*)
23961016ad83Smrg  version_type=linux # correct to gnu/linux during the next big refactor
23971016ad83Smrg  need_lib_prefix=no
23981016ad83Smrg  need_version=no
23991016ad83Smrg  hardcode_into_libs=yes
24007204935cSmrg  if test ia64 = "$host_cpu"; then
24011016ad83Smrg    # AIX 5 supports IA64
24027204935cSmrg    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
24031016ad83Smrg    shlibpath_var=LD_LIBRARY_PATH
24041016ad83Smrg  else
24051016ad83Smrg    # With GCC up to 2.95.x, collect2 would create an import file
24061016ad83Smrg    # for dependence libraries.  The import file would start with
24077204935cSmrg    # the line '#! .'.  This would cause the generated library to
24087204935cSmrg    # depend on '.', always an invalid library.  This was fixed in
24091016ad83Smrg    # development snapshots of GCC prior to 3.0.
24101016ad83Smrg    case $host_os in
24111016ad83Smrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
24121016ad83Smrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
24131016ad83Smrg	   echo ' yes '
24147204935cSmrg	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
24151016ad83Smrg	:
24161016ad83Smrg      else
24171016ad83Smrg	can_build_shared=no
24181016ad83Smrg      fi
24191016ad83Smrg      ;;
24201016ad83Smrg    esac
24217204935cSmrg    # Using Import Files as archive members, it is possible to support
24227204935cSmrg    # filename-based versioning of shared library archives on AIX. While
24237204935cSmrg    # this would work for both with and without runtime linking, it will
24247204935cSmrg    # prevent static linking of such archives. So we do filename-based
24257204935cSmrg    # shared library versioning with .so extension only, which is used
24267204935cSmrg    # when both runtime linking and shared linking is enabled.
24277204935cSmrg    # Unfortunately, runtime linking may impact performance, so we do
24287204935cSmrg    # not want this to be the default eventually. Also, we use the
24297204935cSmrg    # versioned .so libs for executables only if there is the -brtl
24307204935cSmrg    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
24317204935cSmrg    # To allow for filename-based versioning support, we need to create
24327204935cSmrg    # libNAME.so.V as an archive file, containing:
24337204935cSmrg    # *) an Import File, referring to the versioned filename of the
24347204935cSmrg    #    archive as well as the shared archive member, telling the
24357204935cSmrg    #    bitwidth (32 or 64) of that shared object, and providing the
24367204935cSmrg    #    list of exported symbols of that shared object, eventually
24377204935cSmrg    #    decorated with the 'weak' keyword
24387204935cSmrg    # *) the shared object with the F_LOADONLY flag set, to really avoid
24397204935cSmrg    #    it being seen by the linker.
24407204935cSmrg    # At run time we better use the real file rather than another symlink,
24417204935cSmrg    # but for link time we create the symlink libNAME.so -> libNAME.so.V
24427204935cSmrg
24437204935cSmrg    case $with_aix_soname,$aix_use_runtimelinking in
24447204935cSmrg    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
24451016ad83Smrg    # soname into executable. Probably we can add versioning support to
24461016ad83Smrg    # collect2, so additional links can be useful in future.
24477204935cSmrg    aix,yes) # traditional libtool
24487204935cSmrg      dynamic_linker='AIX unversionable lib.so'
24491016ad83Smrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
24501016ad83Smrg      # instead of lib<name>.a to let people know that these are not
24511016ad83Smrg      # typical AIX shared libraries.
24527204935cSmrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
24537204935cSmrg      ;;
24547204935cSmrg    aix,no) # traditional AIX only
24557204935cSmrg      dynamic_linker='AIX lib.a[(]lib.so.V[)]'
24561016ad83Smrg      # We preserve .a as extension for shared libraries through AIX4.2
24571016ad83Smrg      # and later when we are not doing run time linking.
24587204935cSmrg      library_names_spec='$libname$release.a $libname.a'
24597204935cSmrg      soname_spec='$libname$release$shared_ext$major'
24607204935cSmrg      ;;
24617204935cSmrg    svr4,*) # full svr4 only
24627204935cSmrg      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
24637204935cSmrg      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
24647204935cSmrg      # We do not specify a path in Import Files, so LIBPATH fires.
24657204935cSmrg      shlibpath_overrides_runpath=yes
24667204935cSmrg      ;;
24677204935cSmrg    *,yes) # both, prefer svr4
24687204935cSmrg      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
24697204935cSmrg      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
24707204935cSmrg      # unpreferred sharedlib libNAME.a needs extra handling
24717204935cSmrg      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"'
24727204935cSmrg      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"'
24737204935cSmrg      # We do not specify a path in Import Files, so LIBPATH fires.
24747204935cSmrg      shlibpath_overrides_runpath=yes
24757204935cSmrg      ;;
24767204935cSmrg    *,no) # both, prefer aix
24777204935cSmrg      dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
24787204935cSmrg      library_names_spec='$libname$release.a $libname.a'
24797204935cSmrg      soname_spec='$libname$release$shared_ext$major'
24807204935cSmrg      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
24817204935cSmrg      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)'
24827204935cSmrg      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"'
24837204935cSmrg      ;;
24847204935cSmrg    esac
24851016ad83Smrg    shlibpath_var=LIBPATH
24861016ad83Smrg  fi
24871016ad83Smrg  ;;
24881016ad83Smrg
24891016ad83Smrgamigaos*)
24901016ad83Smrg  case $host_cpu in
24911016ad83Smrg  powerpc)
24921016ad83Smrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
24931016ad83Smrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
24947204935cSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
24951016ad83Smrg    ;;
24961016ad83Smrg  m68k)
24971016ad83Smrg    library_names_spec='$libname.ixlibrary $libname.a'
24981016ad83Smrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
24997204935cSmrg    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'
25001016ad83Smrg    ;;
25011016ad83Smrg  esac
25021016ad83Smrg  ;;
25031016ad83Smrg
25041016ad83Smrgbeos*)
25057204935cSmrg  library_names_spec='$libname$shared_ext'
25061016ad83Smrg  dynamic_linker="$host_os ld.so"
25071016ad83Smrg  shlibpath_var=LIBRARY_PATH
25081016ad83Smrg  ;;
25091016ad83Smrg
25101016ad83Smrgbsdi[[45]]*)
25111016ad83Smrg  version_type=linux # correct to gnu/linux during the next big refactor
25121016ad83Smrg  need_version=no
25137204935cSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
25147204935cSmrg  soname_spec='$libname$release$shared_ext$major'
25151016ad83Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
25161016ad83Smrg  shlibpath_var=LD_LIBRARY_PATH
25171016ad83Smrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
25181016ad83Smrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
25191016ad83Smrg  # the default ld.so.conf also contains /usr/contrib/lib and
25201016ad83Smrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
25211016ad83Smrg  # libtool to hard-code these into programs
25221016ad83Smrg  ;;
25231016ad83Smrg
25241016ad83Smrgcygwin* | mingw* | pw32* | cegcc*)
25251016ad83Smrg  version_type=windows
25267204935cSmrg  shrext_cmds=.dll
25271016ad83Smrg  need_version=no
25281016ad83Smrg  need_lib_prefix=no
25291016ad83Smrg
25301016ad83Smrg  case $GCC,$cc_basename in
25311016ad83Smrg  yes,*)
25321016ad83Smrg    # gcc
25331016ad83Smrg    library_names_spec='$libname.dll.a'
25341016ad83Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
25357204935cSmrg    postinstall_cmds='base_file=`basename \$file`~
25367204935cSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
25371016ad83Smrg      dldir=$destdir/`dirname \$dlpath`~
25381016ad83Smrg      test -d \$dldir || mkdir -p \$dldir~
25391016ad83Smrg      $install_prog $dir/$dlname \$dldir/$dlname~
25401016ad83Smrg      chmod a+x \$dldir/$dlname~
25411016ad83Smrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
25421016ad83Smrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
25431016ad83Smrg      fi'
25441016ad83Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
25451016ad83Smrg      dlpath=$dir/\$dldll~
25461016ad83Smrg       $RM \$dlpath'
25471016ad83Smrg    shlibpath_overrides_runpath=yes
25481016ad83Smrg
25491016ad83Smrg    case $host_os in
25501016ad83Smrg    cygwin*)
25511016ad83Smrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
25527204935cSmrg      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
25531016ad83Smrgm4_if([$1], [],[
25541016ad83Smrg      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
25551016ad83Smrg      ;;
25561016ad83Smrg    mingw* | cegcc*)
25571016ad83Smrg      # MinGW DLLs use traditional 'lib' prefix
25587204935cSmrg      soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
25591016ad83Smrg      ;;
25601016ad83Smrg    pw32*)
25611016ad83Smrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
25627204935cSmrg      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
25631016ad83Smrg      ;;
25641016ad83Smrg    esac
25651016ad83Smrg    dynamic_linker='Win32 ld.exe'
25661016ad83Smrg    ;;
25671016ad83Smrg
25681016ad83Smrg  *,cl*)
25691016ad83Smrg    # Native MSVC
25701016ad83Smrg    libname_spec='$name'
25717204935cSmrg    soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
25727204935cSmrg    library_names_spec='$libname.dll.lib'
25731016ad83Smrg
25741016ad83Smrg    case $build_os in
25751016ad83Smrg    mingw*)
25761016ad83Smrg      sys_lib_search_path_spec=
25771016ad83Smrg      lt_save_ifs=$IFS
25781016ad83Smrg      IFS=';'
25791016ad83Smrg      for lt_path in $LIB
25801016ad83Smrg      do
25811016ad83Smrg        IFS=$lt_save_ifs
25821016ad83Smrg        # Let DOS variable expansion print the short 8.3 style file name.
25831016ad83Smrg        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
25841016ad83Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
25851016ad83Smrg      done
25861016ad83Smrg      IFS=$lt_save_ifs
25871016ad83Smrg      # Convert to MSYS style.
25881016ad83Smrg      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
25891016ad83Smrg      ;;
25901016ad83Smrg    cygwin*)
25911016ad83Smrg      # Convert to unix form, then to dos form, then back to unix form
25921016ad83Smrg      # but this time dos style (no spaces!) so that the unix form looks
25931016ad83Smrg      # like /cygdrive/c/PROGRA~1:/cygdr...
25941016ad83Smrg      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
25951016ad83Smrg      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
25961016ad83Smrg      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
25971016ad83Smrg      ;;
25981016ad83Smrg    *)
25997204935cSmrg      sys_lib_search_path_spec=$LIB
26001016ad83Smrg      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
26011016ad83Smrg        # It is most probably a Windows format PATH.
26021016ad83Smrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
26031016ad83Smrg      else
26041016ad83Smrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
26051016ad83Smrg      fi
26061016ad83Smrg      # FIXME: find the short name or the path components, as spaces are
26071016ad83Smrg      # common. (e.g. "Program Files" -> "PROGRA~1")
26081016ad83Smrg      ;;
26091016ad83Smrg    esac
26101016ad83Smrg
26111016ad83Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
26127204935cSmrg    postinstall_cmds='base_file=`basename \$file`~
26137204935cSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
26141016ad83Smrg      dldir=$destdir/`dirname \$dlpath`~
26151016ad83Smrg      test -d \$dldir || mkdir -p \$dldir~
26161016ad83Smrg      $install_prog $dir/$dlname \$dldir/$dlname'
26171016ad83Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
26181016ad83Smrg      dlpath=$dir/\$dldll~
26191016ad83Smrg       $RM \$dlpath'
26201016ad83Smrg    shlibpath_overrides_runpath=yes
26211016ad83Smrg    dynamic_linker='Win32 link.exe'
26221016ad83Smrg    ;;
26231016ad83Smrg
26241016ad83Smrg  *)
26251016ad83Smrg    # Assume MSVC wrapper
26267204935cSmrg    library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
26271016ad83Smrg    dynamic_linker='Win32 ld.exe'
26281016ad83Smrg    ;;
26291016ad83Smrg  esac
26301016ad83Smrg  # FIXME: first we should search . and the directory the executable is in
26311016ad83Smrg  shlibpath_var=PATH
26321016ad83Smrg  ;;
26331016ad83Smrg
26341016ad83Smrgdarwin* | rhapsody*)
26351016ad83Smrg  dynamic_linker="$host_os dyld"
26361016ad83Smrg  version_type=darwin
26371016ad83Smrg  need_lib_prefix=no
26381016ad83Smrg  need_version=no
26397204935cSmrg  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
26407204935cSmrg  soname_spec='$libname$release$major$shared_ext'
26411016ad83Smrg  shlibpath_overrides_runpath=yes
26421016ad83Smrg  shlibpath_var=DYLD_LIBRARY_PATH
26431016ad83Smrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
26441016ad83Smrgm4_if([$1], [],[
26451016ad83Smrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
26461016ad83Smrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
26471016ad83Smrg  ;;
26481016ad83Smrg
26491016ad83Smrgdgux*)
26501016ad83Smrg  version_type=linux # correct to gnu/linux during the next big refactor
26511016ad83Smrg  need_lib_prefix=no
26521016ad83Smrg  need_version=no
26537204935cSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
26547204935cSmrg  soname_spec='$libname$release$shared_ext$major'
26551016ad83Smrg  shlibpath_var=LD_LIBRARY_PATH
26561016ad83Smrg  ;;
26571016ad83Smrg
26581016ad83Smrgfreebsd* | dragonfly*)
26591016ad83Smrg  # DragonFly does not have aout.  When/if they implement a new
26601016ad83Smrg  # versioning mechanism, adjust this.
26611016ad83Smrg  if test -x /usr/bin/objformat; then
26621016ad83Smrg    objformat=`/usr/bin/objformat`
26631016ad83Smrg  else
26641016ad83Smrg    case $host_os in
26651016ad83Smrg    freebsd[[23]].*) objformat=aout ;;
26661016ad83Smrg    *) objformat=elf ;;
26671016ad83Smrg    esac
26681016ad83Smrg  fi
26691016ad83Smrg  version_type=freebsd-$objformat
26701016ad83Smrg  case $version_type in
26711016ad83Smrg    freebsd-elf*)
26727204935cSmrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
26737204935cSmrg      soname_spec='$libname$release$shared_ext$major'
26741016ad83Smrg      need_version=no
26751016ad83Smrg      need_lib_prefix=no
26761016ad83Smrg      ;;
26771016ad83Smrg    freebsd-*)
26787204935cSmrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
26791016ad83Smrg      need_version=yes
26801016ad83Smrg      ;;
26811016ad83Smrg  esac
26821016ad83Smrg  shlibpath_var=LD_LIBRARY_PATH
26831016ad83Smrg  case $host_os in
26841016ad83Smrg  freebsd2.*)
26851016ad83Smrg    shlibpath_overrides_runpath=yes
26861016ad83Smrg    ;;
26871016ad83Smrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
26881016ad83Smrg    shlibpath_overrides_runpath=yes
26891016ad83Smrg    hardcode_into_libs=yes
26901016ad83Smrg    ;;
26911016ad83Smrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
26921016ad83Smrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
26931016ad83Smrg    shlibpath_overrides_runpath=no
26941016ad83Smrg    hardcode_into_libs=yes
26951016ad83Smrg    ;;
26961016ad83Smrg  *) # from 4.6 on, and DragonFly
26971016ad83Smrg    shlibpath_overrides_runpath=yes
26981016ad83Smrg    hardcode_into_libs=yes
26991016ad83Smrg    ;;
27001016ad83Smrg  esac
27011016ad83Smrg  ;;
27021016ad83Smrg
27031016ad83Smrghaiku*)
27041016ad83Smrg  version_type=linux # correct to gnu/linux during the next big refactor
27051016ad83Smrg  need_lib_prefix=no
27061016ad83Smrg  need_version=no
27071016ad83Smrg  dynamic_linker="$host_os runtime_loader"
27087204935cSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
27097204935cSmrg  soname_spec='$libname$release$shared_ext$major'
27101016ad83Smrg  shlibpath_var=LIBRARY_PATH
27117204935cSmrg  shlibpath_overrides_runpath=no
27121016ad83Smrg  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
27131016ad83Smrg  hardcode_into_libs=yes
27141016ad83Smrg  ;;
27151016ad83Smrg
27161016ad83Smrghpux9* | hpux10* | hpux11*)
27171016ad83Smrg  # Give a soname corresponding to the major version so that dld.sl refuses to
27181016ad83Smrg  # link against other versions.
27191016ad83Smrg  version_type=sunos
27201016ad83Smrg  need_lib_prefix=no
27211016ad83Smrg  need_version=no
27221016ad83Smrg  case $host_cpu in
27231016ad83Smrg  ia64*)
27241016ad83Smrg    shrext_cmds='.so'
27251016ad83Smrg    hardcode_into_libs=yes
27261016ad83Smrg    dynamic_linker="$host_os dld.so"
27271016ad83Smrg    shlibpath_var=LD_LIBRARY_PATH
27281016ad83Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
27297204935cSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
27307204935cSmrg    soname_spec='$libname$release$shared_ext$major'
27317204935cSmrg    if test 32 = "$HPUX_IA64_MODE"; then
27321016ad83Smrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
27337204935cSmrg      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
27341016ad83Smrg    else
27351016ad83Smrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
27367204935cSmrg      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
27371016ad83Smrg    fi
27381016ad83Smrg    ;;
27391016ad83Smrg  hppa*64*)
27401016ad83Smrg    shrext_cmds='.sl'
27411016ad83Smrg    hardcode_into_libs=yes
27421016ad83Smrg    dynamic_linker="$host_os dld.sl"
27431016ad83Smrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
27441016ad83Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
27457204935cSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
27467204935cSmrg    soname_spec='$libname$release$shared_ext$major'
27471016ad83Smrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
27481016ad83Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
27491016ad83Smrg    ;;
27501016ad83Smrg  *)
27511016ad83Smrg    shrext_cmds='.sl'
27521016ad83Smrg    dynamic_linker="$host_os dld.sl"
27531016ad83Smrg    shlibpath_var=SHLIB_PATH
27541016ad83Smrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
27557204935cSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
27567204935cSmrg    soname_spec='$libname$release$shared_ext$major'
27571016ad83Smrg    ;;
27581016ad83Smrg  esac
27591016ad83Smrg  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
27601016ad83Smrg  postinstall_cmds='chmod 555 $lib'
27611016ad83Smrg  # or fails outright, so override atomically:
27621016ad83Smrg  install_override_mode=555
27631016ad83Smrg  ;;
27641016ad83Smrg
27651016ad83Smrginterix[[3-9]]*)
27661016ad83Smrg  version_type=linux # correct to gnu/linux during the next big refactor
27671016ad83Smrg  need_lib_prefix=no
27681016ad83Smrg  need_version=no
27697204935cSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
27707204935cSmrg  soname_spec='$libname$release$shared_ext$major'
27711016ad83Smrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
27721016ad83Smrg  shlibpath_var=LD_LIBRARY_PATH
27731016ad83Smrg  shlibpath_overrides_runpath=no
27741016ad83Smrg  hardcode_into_libs=yes
27751016ad83Smrg  ;;
27761016ad83Smrg
27771016ad83Smrgirix5* | irix6* | nonstopux*)
27781016ad83Smrg  case $host_os in
27791016ad83Smrg    nonstopux*) version_type=nonstopux ;;
27801016ad83Smrg    *)
27817204935cSmrg	if test yes = "$lt_cv_prog_gnu_ld"; then
27821016ad83Smrg		version_type=linux # correct to gnu/linux during the next big refactor
27831016ad83Smrg	else
27841016ad83Smrg		version_type=irix
27851016ad83Smrg	fi ;;
27861016ad83Smrg  esac
27871016ad83Smrg  need_lib_prefix=no
27881016ad83Smrg  need_version=no
27897204935cSmrg  soname_spec='$libname$release$shared_ext$major'
27907204935cSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
27911016ad83Smrg  case $host_os in
27921016ad83Smrg  irix5* | nonstopux*)
27931016ad83Smrg    libsuff= shlibsuff=
27941016ad83Smrg    ;;
27951016ad83Smrg  *)
27961016ad83Smrg    case $LD in # libtool.m4 will add one of these switches to LD
27971016ad83Smrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
27981016ad83Smrg      libsuff= shlibsuff= libmagic=32-bit;;
27991016ad83Smrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
28001016ad83Smrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
28011016ad83Smrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
28021016ad83Smrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
28031016ad83Smrg    *) libsuff= shlibsuff= libmagic=never-match;;
28041016ad83Smrg    esac
28051016ad83Smrg    ;;
28061016ad83Smrg  esac
28071016ad83Smrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
28081016ad83Smrg  shlibpath_overrides_runpath=no
28097204935cSmrg  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
28107204935cSmrg  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
28111016ad83Smrg  hardcode_into_libs=yes
28121016ad83Smrg  ;;
28131016ad83Smrg
28141016ad83Smrg# No shared lib support for Linux oldld, aout, or coff.
28151016ad83Smrglinux*oldld* | linux*aout* | linux*coff*)
28161016ad83Smrg  dynamic_linker=no
28171016ad83Smrg  ;;
28181016ad83Smrg
28197204935cSmrglinux*android*)
28207204935cSmrg  version_type=none # Android doesn't support versioned libraries.
28217204935cSmrg  need_lib_prefix=no
28227204935cSmrg  need_version=no
28237204935cSmrg  library_names_spec='$libname$release$shared_ext'
28247204935cSmrg  soname_spec='$libname$release$shared_ext'
28257204935cSmrg  finish_cmds=
28267204935cSmrg  shlibpath_var=LD_LIBRARY_PATH
28277204935cSmrg  shlibpath_overrides_runpath=yes
28287204935cSmrg
28297204935cSmrg  # This implies no fast_install, which is unacceptable.
28307204935cSmrg  # Some rework will be needed to allow for fast_install
28317204935cSmrg  # before this can be enabled.
28327204935cSmrg  hardcode_into_libs=yes
28337204935cSmrg
28347204935cSmrg  dynamic_linker='Android linker'
28357204935cSmrg  # Don't embed -rpath directories since the linker doesn't support them.
28367204935cSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
28377204935cSmrg  ;;
28387204935cSmrg
28391016ad83Smrg# This must be glibc/ELF.
28401016ad83Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
28411016ad83Smrg  version_type=linux # correct to gnu/linux during the next big refactor
28421016ad83Smrg  need_lib_prefix=no
28431016ad83Smrg  need_version=no
28447204935cSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
28457204935cSmrg  soname_spec='$libname$release$shared_ext$major'
28461016ad83Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
28471016ad83Smrg  shlibpath_var=LD_LIBRARY_PATH
28481016ad83Smrg  shlibpath_overrides_runpath=no
28491016ad83Smrg
28501016ad83Smrg  # Some binutils ld are patched to set DT_RUNPATH
28511016ad83Smrg  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
28521016ad83Smrg    [lt_cv_shlibpath_overrides_runpath=no
28531016ad83Smrg    save_LDFLAGS=$LDFLAGS
28541016ad83Smrg    save_libdir=$libdir
28551016ad83Smrg    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
28561016ad83Smrg	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
28571016ad83Smrg    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
28581016ad83Smrg      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
28591016ad83Smrg	 [lt_cv_shlibpath_overrides_runpath=yes])])
28601016ad83Smrg    LDFLAGS=$save_LDFLAGS
28611016ad83Smrg    libdir=$save_libdir
28621016ad83Smrg    ])
28631016ad83Smrg  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
28641016ad83Smrg
28651016ad83Smrg  # This implies no fast_install, which is unacceptable.
28661016ad83Smrg  # Some rework will be needed to allow for fast_install
28671016ad83Smrg  # before this can be enabled.
28681016ad83Smrg  hardcode_into_libs=yes
28691016ad83Smrg
28707204935cSmrg  # Ideally, we could use ldconfig to report *all* directores which are
28717204935cSmrg  # searched for libraries, however this is still not possible.  Aside from not
28727204935cSmrg  # being certain /sbin/ldconfig is available, command
28737204935cSmrg  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
28747204935cSmrg  # even though it is searched at run-time.  Try to do the best guess by
28757204935cSmrg  # appending ld.so.conf contents (and includes) to the search path.
28761016ad83Smrg  if test -f /etc/ld.so.conf; then
28771016ad83Smrg    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' ' '`
28781016ad83Smrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
28791016ad83Smrg  fi
28801016ad83Smrg
28811016ad83Smrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
28821016ad83Smrg  # powerpc, because MkLinux only supported shared libraries with the
28831016ad83Smrg  # GNU dynamic linker.  Since this was broken with cross compilers,
28841016ad83Smrg  # most powerpc-linux boxes support dynamic linking these days and
28851016ad83Smrg  # people can always --disable-shared, the test was removed, and we
28861016ad83Smrg  # assume the GNU/Linux dynamic linker is in use.
28871016ad83Smrg  dynamic_linker='GNU/Linux ld.so'
28881016ad83Smrg  ;;
28891016ad83Smrg
28901016ad83Smrgnetbsdelf*-gnu)
28911016ad83Smrg  version_type=linux
28921016ad83Smrg  need_lib_prefix=no
28931016ad83Smrg  need_version=no
28941016ad83Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
28951016ad83Smrg  soname_spec='${libname}${release}${shared_ext}$major'
28961016ad83Smrg  shlibpath_var=LD_LIBRARY_PATH
28971016ad83Smrg  shlibpath_overrides_runpath=no
28981016ad83Smrg  hardcode_into_libs=yes
28991016ad83Smrg  dynamic_linker='NetBSD ld.elf_so'
29001016ad83Smrg  ;;
29011016ad83Smrg
29021016ad83Smrgnetbsd*)
29031016ad83Smrg  version_type=sunos
29041016ad83Smrg  need_lib_prefix=no
29051016ad83Smrg  need_version=no
29061016ad83Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
29077204935cSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
29081016ad83Smrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
29091016ad83Smrg    dynamic_linker='NetBSD (a.out) ld.so'
29101016ad83Smrg  else
29117204935cSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
29127204935cSmrg    soname_spec='$libname$release$shared_ext$major'
29131016ad83Smrg    dynamic_linker='NetBSD ld.elf_so'
29141016ad83Smrg  fi
29151016ad83Smrg  shlibpath_var=LD_LIBRARY_PATH
29161016ad83Smrg  shlibpath_overrides_runpath=yes
29171016ad83Smrg  hardcode_into_libs=yes
29181016ad83Smrg  ;;
29191016ad83Smrg
29201016ad83Smrgnewsos6)
29211016ad83Smrg  version_type=linux # correct to gnu/linux during the next big refactor
29227204935cSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
29231016ad83Smrg  shlibpath_var=LD_LIBRARY_PATH
29241016ad83Smrg  shlibpath_overrides_runpath=yes
29251016ad83Smrg  ;;
29261016ad83Smrg
29271016ad83Smrg*nto* | *qnx*)
29281016ad83Smrg  version_type=qnx
29291016ad83Smrg  need_lib_prefix=no
29301016ad83Smrg  need_version=no
29317204935cSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
29327204935cSmrg  soname_spec='$libname$release$shared_ext$major'
29331016ad83Smrg  shlibpath_var=LD_LIBRARY_PATH
29341016ad83Smrg  shlibpath_overrides_runpath=no
29351016ad83Smrg  hardcode_into_libs=yes
29361016ad83Smrg  dynamic_linker='ldqnx.so'
29371016ad83Smrg  ;;
29381016ad83Smrg
29397204935cSmrgopenbsd* | bitrig*)
29401016ad83Smrg  version_type=sunos
29417204935cSmrg  sys_lib_dlsearch_path_spec=/usr/lib
29421016ad83Smrg  need_lib_prefix=no
29437204935cSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
29447204935cSmrg    need_version=no
29451016ad83Smrg  else
29467204935cSmrg    need_version=yes
29471016ad83Smrg  fi
29487204935cSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
29497204935cSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
29507204935cSmrg  shlibpath_var=LD_LIBRARY_PATH
29517204935cSmrg  shlibpath_overrides_runpath=yes
29521016ad83Smrg  ;;
29531016ad83Smrg
29541016ad83Smrgos2*)
29551016ad83Smrg  libname_spec='$name'
29567204935cSmrg  version_type=windows
29577204935cSmrg  shrext_cmds=.dll
29587204935cSmrg  need_version=no
29591016ad83Smrg  need_lib_prefix=no
29607204935cSmrg  # OS/2 can only load a DLL with a base name of 8 characters or less.
29617204935cSmrg  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
29627204935cSmrg    v=$($ECHO $release$versuffix | tr -d .-);
29637204935cSmrg    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
29647204935cSmrg    $ECHO $n$v`$shared_ext'
29657204935cSmrg  library_names_spec='${libname}_dll.$libext'
29661016ad83Smrg  dynamic_linker='OS/2 ld.exe'
29677204935cSmrg  shlibpath_var=BEGINLIBPATH
29687204935cSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
29697204935cSmrg  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
29707204935cSmrg  postinstall_cmds='base_file=`basename \$file`~
29717204935cSmrg    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
29727204935cSmrg    dldir=$destdir/`dirname \$dlpath`~
29737204935cSmrg    test -d \$dldir || mkdir -p \$dldir~
29747204935cSmrg    $install_prog $dir/$dlname \$dldir/$dlname~
29757204935cSmrg    chmod a+x \$dldir/$dlname~
29767204935cSmrg    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
29777204935cSmrg      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
29787204935cSmrg    fi'
29797204935cSmrg  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
29807204935cSmrg    dlpath=$dir/\$dldll~
29817204935cSmrg    $RM \$dlpath'
29821016ad83Smrg  ;;
29831016ad83Smrg
29841016ad83Smrgosf3* | osf4* | osf5*)
29851016ad83Smrg  version_type=osf
29861016ad83Smrg  need_lib_prefix=no
29871016ad83Smrg  need_version=no
29887204935cSmrg  soname_spec='$libname$release$shared_ext$major'
29897204935cSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
29901016ad83Smrg  shlibpath_var=LD_LIBRARY_PATH
29911016ad83Smrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
29927204935cSmrg  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
29931016ad83Smrg  ;;
29941016ad83Smrg
29951016ad83Smrgrdos*)
29961016ad83Smrg  dynamic_linker=no
29971016ad83Smrg  ;;
29981016ad83Smrg
29991016ad83Smrgsolaris*)
30001016ad83Smrg  version_type=linux # correct to gnu/linux during the next big refactor
30011016ad83Smrg  need_lib_prefix=no
30021016ad83Smrg  need_version=no
30037204935cSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
30047204935cSmrg  soname_spec='$libname$release$shared_ext$major'
30051016ad83Smrg  shlibpath_var=LD_LIBRARY_PATH
30061016ad83Smrg  shlibpath_overrides_runpath=yes
30071016ad83Smrg  hardcode_into_libs=yes
30081016ad83Smrg  # ldd complains unless libraries are executable
30091016ad83Smrg  postinstall_cmds='chmod +x $lib'
30101016ad83Smrg  ;;
30111016ad83Smrg
30121016ad83Smrgsunos4*)
30131016ad83Smrg  version_type=sunos
30147204935cSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
30151016ad83Smrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
30161016ad83Smrg  shlibpath_var=LD_LIBRARY_PATH
30171016ad83Smrg  shlibpath_overrides_runpath=yes
30187204935cSmrg  if test yes = "$with_gnu_ld"; then
30191016ad83Smrg    need_lib_prefix=no
30201016ad83Smrg  fi
30211016ad83Smrg  need_version=yes
30221016ad83Smrg  ;;
30231016ad83Smrg
30241016ad83Smrgsysv4 | sysv4.3*)
30251016ad83Smrg  version_type=linux # correct to gnu/linux during the next big refactor
30267204935cSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
30277204935cSmrg  soname_spec='$libname$release$shared_ext$major'
30281016ad83Smrg  shlibpath_var=LD_LIBRARY_PATH
30291016ad83Smrg  case $host_vendor in
30301016ad83Smrg    sni)
30311016ad83Smrg      shlibpath_overrides_runpath=no
30321016ad83Smrg      need_lib_prefix=no
30331016ad83Smrg      runpath_var=LD_RUN_PATH
30341016ad83Smrg      ;;
30351016ad83Smrg    siemens)
30361016ad83Smrg      need_lib_prefix=no
30371016ad83Smrg      ;;
30381016ad83Smrg    motorola)
30391016ad83Smrg      need_lib_prefix=no
30401016ad83Smrg      need_version=no
30411016ad83Smrg      shlibpath_overrides_runpath=no
30421016ad83Smrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
30431016ad83Smrg      ;;
30441016ad83Smrg  esac
30451016ad83Smrg  ;;
30461016ad83Smrg
30471016ad83Smrgsysv4*MP*)
30487204935cSmrg  if test -d /usr/nec; then
30491016ad83Smrg    version_type=linux # correct to gnu/linux during the next big refactor
30507204935cSmrg    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
30517204935cSmrg    soname_spec='$libname$shared_ext.$major'
30521016ad83Smrg    shlibpath_var=LD_LIBRARY_PATH
30531016ad83Smrg  fi
30541016ad83Smrg  ;;
30551016ad83Smrg
30561016ad83Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
30577204935cSmrg  version_type=sco
30581016ad83Smrg  need_lib_prefix=no
30591016ad83Smrg  need_version=no
30607204935cSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
30617204935cSmrg  soname_spec='$libname$release$shared_ext$major'
30621016ad83Smrg  shlibpath_var=LD_LIBRARY_PATH
30631016ad83Smrg  shlibpath_overrides_runpath=yes
30641016ad83Smrg  hardcode_into_libs=yes
30657204935cSmrg  if test yes = "$with_gnu_ld"; then
30661016ad83Smrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
30671016ad83Smrg  else
30681016ad83Smrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
30691016ad83Smrg    case $host_os in
30701016ad83Smrg      sco3.2v5*)
30711016ad83Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
30721016ad83Smrg	;;
30731016ad83Smrg    esac
30741016ad83Smrg  fi
30751016ad83Smrg  sys_lib_dlsearch_path_spec='/usr/lib'
30761016ad83Smrg  ;;
30771016ad83Smrg
30781016ad83Smrgtpf*)
30791016ad83Smrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
30801016ad83Smrg  version_type=linux # correct to gnu/linux during the next big refactor
30811016ad83Smrg  need_lib_prefix=no
30821016ad83Smrg  need_version=no
30837204935cSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
30841016ad83Smrg  shlibpath_var=LD_LIBRARY_PATH
30851016ad83Smrg  shlibpath_overrides_runpath=no
30861016ad83Smrg  hardcode_into_libs=yes
30871016ad83Smrg  ;;
30881016ad83Smrg
30891016ad83Smrguts4*)
30901016ad83Smrg  version_type=linux # correct to gnu/linux during the next big refactor
30917204935cSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
30927204935cSmrg  soname_spec='$libname$release$shared_ext$major'
30931016ad83Smrg  shlibpath_var=LD_LIBRARY_PATH
30941016ad83Smrg  ;;
30951016ad83Smrg
30961016ad83Smrg*)
30971016ad83Smrg  dynamic_linker=no
30981016ad83Smrg  ;;
30991016ad83Smrgesac
31001016ad83SmrgAC_MSG_RESULT([$dynamic_linker])
31017204935cSmrgtest no = "$dynamic_linker" && can_build_shared=no
31021016ad83Smrg
31031016ad83Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
31047204935cSmrgif test yes = "$GCC"; then
31051016ad83Smrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
31061016ad83Smrgfi
31071016ad83Smrg
31087204935cSmrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
31097204935cSmrg  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
31101016ad83Smrgfi
31117204935cSmrg
31127204935cSmrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
31137204935cSmrg  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
31141016ad83Smrgfi
31151016ad83Smrg
31167204935cSmrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
31177204935cSmrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
31187204935cSmrg
31197204935cSmrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
31207204935cSmrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
31217204935cSmrg
31227204935cSmrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
31237204935cSmrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
31247204935cSmrg
31251016ad83Smrg_LT_DECL([], [variables_saved_for_relink], [1],
31261016ad83Smrg    [Variables whose values should be saved in libtool wrapper scripts and
31271016ad83Smrg    restored at link time])
31281016ad83Smrg_LT_DECL([], [need_lib_prefix], [0],
31291016ad83Smrg    [Do we need the "lib" prefix for modules?])
31301016ad83Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
31311016ad83Smrg_LT_DECL([], [version_type], [0], [Library versioning type])
31321016ad83Smrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
31331016ad83Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
31341016ad83Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
31351016ad83Smrg    [Is shlibpath searched before the hard-coded library search path?])
31361016ad83Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
31371016ad83Smrg_LT_DECL([], [library_names_spec], [1],
31381016ad83Smrg    [[List of archive names.  First name is the real one, the rest are links.
31391016ad83Smrg    The last name is the one that the linker finds with -lNAME]])
31401016ad83Smrg_LT_DECL([], [soname_spec], [1],
31411016ad83Smrg    [[The coded name of the library, if different from the real name]])
31421016ad83Smrg_LT_DECL([], [install_override_mode], [1],
31431016ad83Smrg    [Permission mode override for installation of shared libraries])
31441016ad83Smrg_LT_DECL([], [postinstall_cmds], [2],
31451016ad83Smrg    [Command to use after installation of a shared archive])
31461016ad83Smrg_LT_DECL([], [postuninstall_cmds], [2],
31471016ad83Smrg    [Command to use after uninstallation of a shared archive])
31481016ad83Smrg_LT_DECL([], [finish_cmds], [2],
31491016ad83Smrg    [Commands used to finish a libtool library installation in a directory])
31501016ad83Smrg_LT_DECL([], [finish_eval], [1],
31511016ad83Smrg    [[As "finish_cmds", except a single script fragment to be evaled but
31521016ad83Smrg    not shown]])
31531016ad83Smrg_LT_DECL([], [hardcode_into_libs], [0],
31541016ad83Smrg    [Whether we should hardcode library paths into libraries])
31551016ad83Smrg_LT_DECL([], [sys_lib_search_path_spec], [2],
31561016ad83Smrg    [Compile-time system search path for libraries])
31577204935cSmrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
31587204935cSmrg    [Detected run-time system search path for libraries])
31597204935cSmrg_LT_DECL([], [configure_time_lt_sys_library_path], [2],
31607204935cSmrg    [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
31611016ad83Smrg])# _LT_SYS_DYNAMIC_LINKER
31621016ad83Smrg
31631016ad83Smrg
31641016ad83Smrg# _LT_PATH_TOOL_PREFIX(TOOL)
31651016ad83Smrg# --------------------------
31667204935cSmrg# find a file program that can recognize shared library
31671016ad83SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
31681016ad83Smrg[m4_require([_LT_DECL_EGREP])dnl
31691016ad83SmrgAC_MSG_CHECKING([for $1])
31701016ad83SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
31711016ad83Smrg[case $MAGIC_CMD in
31721016ad83Smrg[[\\/*] |  ?:[\\/]*])
31737204935cSmrg  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
31741016ad83Smrg  ;;
31751016ad83Smrg*)
31767204935cSmrg  lt_save_MAGIC_CMD=$MAGIC_CMD
31777204935cSmrg  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
31781016ad83Smrgdnl $ac_dummy forces splitting on constant user-supplied paths.
31791016ad83Smrgdnl POSIX.2 word splitting is done only on the output of word expansions,
31801016ad83Smrgdnl not every word.  This closes a longstanding sh security hole.
31811016ad83Smrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
31821016ad83Smrg  for ac_dir in $ac_dummy; do
31837204935cSmrg    IFS=$lt_save_ifs
31841016ad83Smrg    test -z "$ac_dir" && ac_dir=.
31857204935cSmrg    if test -f "$ac_dir/$1"; then
31867204935cSmrg      lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
31871016ad83Smrg      if test -n "$file_magic_test_file"; then
31881016ad83Smrg	case $deplibs_check_method in
31891016ad83Smrg	"file_magic "*)
31901016ad83Smrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
31917204935cSmrg	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
31921016ad83Smrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
31931016ad83Smrg	    $EGREP "$file_magic_regex" > /dev/null; then
31941016ad83Smrg	    :
31951016ad83Smrg	  else
31961016ad83Smrg	    cat <<_LT_EOF 1>&2
31971016ad83Smrg
31981016ad83Smrg*** Warning: the command libtool uses to detect shared libraries,
31991016ad83Smrg*** $file_magic_cmd, produces output that libtool cannot recognize.
32001016ad83Smrg*** The result is that libtool may fail to recognize shared libraries
32011016ad83Smrg*** as such.  This will affect the creation of libtool libraries that
32021016ad83Smrg*** depend on shared libraries, but programs linked with such libtool
32031016ad83Smrg*** libraries will work regardless of this problem.  Nevertheless, you
32041016ad83Smrg*** may want to report the problem to your system manager and/or to
32051016ad83Smrg*** bug-libtool@gnu.org
32061016ad83Smrg
32071016ad83Smrg_LT_EOF
32081016ad83Smrg	  fi ;;
32091016ad83Smrg	esac
32101016ad83Smrg      fi
32111016ad83Smrg      break
32121016ad83Smrg    fi
32131016ad83Smrg  done
32147204935cSmrg  IFS=$lt_save_ifs
32157204935cSmrg  MAGIC_CMD=$lt_save_MAGIC_CMD
32161016ad83Smrg  ;;
32171016ad83Smrgesac])
32187204935cSmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD
32191016ad83Smrgif test -n "$MAGIC_CMD"; then
32201016ad83Smrg  AC_MSG_RESULT($MAGIC_CMD)
32211016ad83Smrgelse
32221016ad83Smrg  AC_MSG_RESULT(no)
32231016ad83Smrgfi
32241016ad83Smrg_LT_DECL([], [MAGIC_CMD], [0],
32251016ad83Smrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
32261016ad83Smrg])# _LT_PATH_TOOL_PREFIX
32271016ad83Smrg
32281016ad83Smrg# Old name:
32291016ad83SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
32301016ad83Smrgdnl aclocal-1.4 backwards compatibility:
32311016ad83Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
32321016ad83Smrg
32331016ad83Smrg
32341016ad83Smrg# _LT_PATH_MAGIC
32351016ad83Smrg# --------------
32367204935cSmrg# find a file program that can recognize a shared library
32371016ad83Smrgm4_defun([_LT_PATH_MAGIC],
32381016ad83Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
32391016ad83Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then
32401016ad83Smrg  if test -n "$ac_tool_prefix"; then
32411016ad83Smrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
32421016ad83Smrg  else
32431016ad83Smrg    MAGIC_CMD=:
32441016ad83Smrg  fi
32451016ad83Smrgfi
32461016ad83Smrg])# _LT_PATH_MAGIC
32471016ad83Smrg
32481016ad83Smrg
32491016ad83Smrg# LT_PATH_LD
32501016ad83Smrg# ----------
32511016ad83Smrg# find the pathname to the GNU or non-GNU linker
32521016ad83SmrgAC_DEFUN([LT_PATH_LD],
32531016ad83Smrg[AC_REQUIRE([AC_PROG_CC])dnl
32541016ad83SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
32551016ad83SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
32561016ad83Smrgm4_require([_LT_DECL_SED])dnl
32571016ad83Smrgm4_require([_LT_DECL_EGREP])dnl
32581016ad83Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl
32591016ad83Smrg
32601016ad83SmrgAC_ARG_WITH([gnu-ld],
32611016ad83Smrg    [AS_HELP_STRING([--with-gnu-ld],
32621016ad83Smrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
32637204935cSmrg    [test no = "$withval" || with_gnu_ld=yes],
32641016ad83Smrg    [with_gnu_ld=no])dnl
32651016ad83Smrg
32661016ad83Smrgac_prog=ld
32677204935cSmrgif test yes = "$GCC"; then
32681016ad83Smrg  # Check if gcc -print-prog-name=ld gives a path.
32691016ad83Smrg  AC_MSG_CHECKING([for ld used by $CC])
32701016ad83Smrg  case $host in
32711016ad83Smrg  *-*-mingw*)
32727204935cSmrg    # gcc leaves a trailing carriage return, which upsets mingw
32731016ad83Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
32741016ad83Smrg  *)
32751016ad83Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
32761016ad83Smrg  esac
32771016ad83Smrg  case $ac_prog in
32781016ad83Smrg    # Accept absolute paths.
32791016ad83Smrg    [[\\/]]* | ?:[[\\/]]*)
32801016ad83Smrg      re_direlt='/[[^/]][[^/]]*/\.\./'
32811016ad83Smrg      # Canonicalize the pathname of ld
32821016ad83Smrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
32831016ad83Smrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
32841016ad83Smrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
32851016ad83Smrg      done
32867204935cSmrg      test -z "$LD" && LD=$ac_prog
32871016ad83Smrg      ;;
32881016ad83Smrg  "")
32891016ad83Smrg    # If it fails, then pretend we aren't using GCC.
32901016ad83Smrg    ac_prog=ld
32911016ad83Smrg    ;;
32921016ad83Smrg  *)
32931016ad83Smrg    # If it is relative, then search for the first ld in PATH.
32941016ad83Smrg    with_gnu_ld=unknown
32951016ad83Smrg    ;;
32961016ad83Smrg  esac
32977204935cSmrgelif test yes = "$with_gnu_ld"; then
32981016ad83Smrg  AC_MSG_CHECKING([for GNU ld])
32991016ad83Smrgelse
33001016ad83Smrg  AC_MSG_CHECKING([for non-GNU ld])
33011016ad83Smrgfi
33021016ad83SmrgAC_CACHE_VAL(lt_cv_path_LD,
33031016ad83Smrg[if test -z "$LD"; then
33047204935cSmrg  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
33051016ad83Smrg  for ac_dir in $PATH; do
33067204935cSmrg    IFS=$lt_save_ifs
33071016ad83Smrg    test -z "$ac_dir" && ac_dir=.
33081016ad83Smrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
33097204935cSmrg      lt_cv_path_LD=$ac_dir/$ac_prog
33101016ad83Smrg      # Check to see if the program is GNU ld.  I'd rather use --version,
33111016ad83Smrg      # but apparently some variants of GNU ld only accept -v.
33121016ad83Smrg      # Break only if it was the GNU/non-GNU ld that we prefer.
33131016ad83Smrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
33141016ad83Smrg      *GNU* | *'with BFD'*)
33157204935cSmrg	test no != "$with_gnu_ld" && break
33161016ad83Smrg	;;
33171016ad83Smrg      *)
33187204935cSmrg	test yes != "$with_gnu_ld" && break
33191016ad83Smrg	;;
33201016ad83Smrg      esac
33211016ad83Smrg    fi
33221016ad83Smrg  done
33237204935cSmrg  IFS=$lt_save_ifs
33241016ad83Smrgelse
33257204935cSmrg  lt_cv_path_LD=$LD # Let the user override the test with a path.
33261016ad83Smrgfi])
33277204935cSmrgLD=$lt_cv_path_LD
33281016ad83Smrgif test -n "$LD"; then
33291016ad83Smrg  AC_MSG_RESULT($LD)
33301016ad83Smrgelse
33311016ad83Smrg  AC_MSG_RESULT(no)
33321016ad83Smrgfi
33331016ad83Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
33341016ad83Smrg_LT_PATH_LD_GNU
33351016ad83SmrgAC_SUBST([LD])
33361016ad83Smrg
33371016ad83Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
33381016ad83Smrg])# LT_PATH_LD
33391016ad83Smrg
33401016ad83Smrg# Old names:
33411016ad83SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
33421016ad83SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
33431016ad83Smrgdnl aclocal-1.4 backwards compatibility:
33441016ad83Smrgdnl AC_DEFUN([AM_PROG_LD], [])
33451016ad83Smrgdnl AC_DEFUN([AC_PROG_LD], [])
33461016ad83Smrg
33471016ad83Smrg
33481016ad83Smrg# _LT_PATH_LD_GNU
33491016ad83Smrg#- --------------
33501016ad83Smrgm4_defun([_LT_PATH_LD_GNU],
33511016ad83Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
33521016ad83Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
33531016ad83Smrgcase `$LD -v 2>&1 </dev/null` in
33541016ad83Smrg*GNU* | *'with BFD'*)
33551016ad83Smrg  lt_cv_prog_gnu_ld=yes
33561016ad83Smrg  ;;
33571016ad83Smrg*)
33581016ad83Smrg  lt_cv_prog_gnu_ld=no
33591016ad83Smrg  ;;
33601016ad83Smrgesac])
33611016ad83Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
33621016ad83Smrg])# _LT_PATH_LD_GNU
33631016ad83Smrg
33641016ad83Smrg
33651016ad83Smrg# _LT_CMD_RELOAD
33661016ad83Smrg# --------------
33671016ad83Smrg# find reload flag for linker
33681016ad83Smrg#   -- PORTME Some linkers may need a different reload flag.
33691016ad83Smrgm4_defun([_LT_CMD_RELOAD],
33701016ad83Smrg[AC_CACHE_CHECK([for $LD option to reload object files],
33711016ad83Smrg  lt_cv_ld_reload_flag,
33721016ad83Smrg  [lt_cv_ld_reload_flag='-r'])
33731016ad83Smrgreload_flag=$lt_cv_ld_reload_flag
33741016ad83Smrgcase $reload_flag in
33751016ad83Smrg"" | " "*) ;;
33761016ad83Smrg*) reload_flag=" $reload_flag" ;;
33771016ad83Smrgesac
33781016ad83Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
33791016ad83Smrgcase $host_os in
33801016ad83Smrg  cygwin* | mingw* | pw32* | cegcc*)
33817204935cSmrg    if test yes != "$GCC"; then
33821016ad83Smrg      reload_cmds=false
33831016ad83Smrg    fi
33841016ad83Smrg    ;;
33851016ad83Smrg  darwin*)
33867204935cSmrg    if test yes = "$GCC"; then
33877204935cSmrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
33881016ad83Smrg    else
33891016ad83Smrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
33901016ad83Smrg    fi
33911016ad83Smrg    ;;
33921016ad83Smrgesac
33931016ad83Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
33941016ad83Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl
33951016ad83Smrg])# _LT_CMD_RELOAD
33961016ad83Smrg
33971016ad83Smrg
33987204935cSmrg# _LT_PATH_DD
33997204935cSmrg# -----------
34007204935cSmrg# find a working dd
34017204935cSmrgm4_defun([_LT_PATH_DD],
34027204935cSmrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
34037204935cSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i
34047204935cSmrgcat conftest.i conftest.i >conftest2.i
34057204935cSmrg: ${lt_DD:=$DD}
34067204935cSmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
34077204935cSmrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
34087204935cSmrg  cmp -s conftest.i conftest.out \
34097204935cSmrg  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
34107204935cSmrgfi])
34117204935cSmrgrm -f conftest.i conftest2.i conftest.out])
34127204935cSmrg])# _LT_PATH_DD
34137204935cSmrg
34147204935cSmrg
34157204935cSmrg# _LT_CMD_TRUNCATE
34167204935cSmrg# ----------------
34177204935cSmrg# find command to truncate a binary pipe
34187204935cSmrgm4_defun([_LT_CMD_TRUNCATE],
34197204935cSmrg[m4_require([_LT_PATH_DD])
34207204935cSmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
34217204935cSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i
34227204935cSmrgcat conftest.i conftest.i >conftest2.i
34237204935cSmrglt_cv_truncate_bin=
34247204935cSmrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
34257204935cSmrg  cmp -s conftest.i conftest.out \
34267204935cSmrg  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
34277204935cSmrgfi
34287204935cSmrgrm -f conftest.i conftest2.i conftest.out
34297204935cSmrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
34307204935cSmrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
34317204935cSmrg  [Command to truncate a binary pipe])
34327204935cSmrg])# _LT_CMD_TRUNCATE
34337204935cSmrg
34347204935cSmrg
34351016ad83Smrg# _LT_CHECK_MAGIC_METHOD
34361016ad83Smrg# ----------------------
34371016ad83Smrg# how to check for library dependencies
34381016ad83Smrg#  -- PORTME fill in with the dynamic library characteristics
34391016ad83Smrgm4_defun([_LT_CHECK_MAGIC_METHOD],
34401016ad83Smrg[m4_require([_LT_DECL_EGREP])
34411016ad83Smrgm4_require([_LT_DECL_OBJDUMP])
34421016ad83SmrgAC_CACHE_CHECK([how to recognize dependent libraries],
34431016ad83Smrglt_cv_deplibs_check_method,
34441016ad83Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
34451016ad83Smrglt_cv_file_magic_test_file=
34461016ad83Smrglt_cv_deplibs_check_method='unknown'
34471016ad83Smrg# Need to set the preceding variable on all platforms that support
34481016ad83Smrg# interlibrary dependencies.
34491016ad83Smrg# 'none' -- dependencies not supported.
34507204935cSmrg# 'unknown' -- same as none, but documents that we really don't know.
34511016ad83Smrg# 'pass_all' -- all dependencies passed with no checks.
34521016ad83Smrg# 'test_compile' -- check by making test program.
34531016ad83Smrg# 'file_magic [[regex]]' -- check by looking for files in library path
34547204935cSmrg# that responds to the $file_magic_cmd with a given extended regex.
34557204935cSmrg# If you have 'file' or equivalent on your system and you're not sure
34567204935cSmrg# whether 'pass_all' will *always* work, you probably want this one.
34571016ad83Smrg
34581016ad83Smrgcase $host_os in
34591016ad83Smrgaix[[4-9]]*)
34601016ad83Smrg  lt_cv_deplibs_check_method=pass_all
34611016ad83Smrg  ;;
34621016ad83Smrg
34631016ad83Smrgbeos*)
34641016ad83Smrg  lt_cv_deplibs_check_method=pass_all
34651016ad83Smrg  ;;
34661016ad83Smrg
34671016ad83Smrgbsdi[[45]]*)
34681016ad83Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
34691016ad83Smrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
34701016ad83Smrg  lt_cv_file_magic_test_file=/shlib/libc.so
34711016ad83Smrg  ;;
34721016ad83Smrg
34731016ad83Smrgcygwin*)
34741016ad83Smrg  # func_win32_libid is a shell function defined in ltmain.sh
34751016ad83Smrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
34761016ad83Smrg  lt_cv_file_magic_cmd='func_win32_libid'
34771016ad83Smrg  ;;
34781016ad83Smrg
34791016ad83Smrgmingw* | pw32*)
34801016ad83Smrg  # Base MSYS/MinGW do not provide the 'file' command needed by
34811016ad83Smrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
34821016ad83Smrg  # unless we find 'file', for example because we are cross-compiling.
34837204935cSmrg  if ( file / ) >/dev/null 2>&1; then
34841016ad83Smrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
34851016ad83Smrg    lt_cv_file_magic_cmd='func_win32_libid'
34861016ad83Smrg  else
34871016ad83Smrg    # Keep this pattern in sync with the one in func_win32_libid.
34881016ad83Smrg    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
34891016ad83Smrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
34901016ad83Smrg  fi
34911016ad83Smrg  ;;
34921016ad83Smrg
34931016ad83Smrgcegcc*)
34941016ad83Smrg  # use the weaker test based on 'objdump'. See mingw*.
34951016ad83Smrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
34961016ad83Smrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
34971016ad83Smrg  ;;
34981016ad83Smrg
34991016ad83Smrgdarwin* | rhapsody*)
35001016ad83Smrg  lt_cv_deplibs_check_method=pass_all
35011016ad83Smrg  ;;
35021016ad83Smrg
35031016ad83Smrgfreebsd* | dragonfly*)
35041016ad83Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
35051016ad83Smrg    case $host_cpu in
35061016ad83Smrg    i*86 )
35071016ad83Smrg      # Not sure whether the presence of OpenBSD here was a mistake.
35081016ad83Smrg      # Let's accept both of them until this is cleared up.
35091016ad83Smrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
35101016ad83Smrg      lt_cv_file_magic_cmd=/usr/bin/file
35111016ad83Smrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
35121016ad83Smrg      ;;
35131016ad83Smrg    esac
35141016ad83Smrg  else
35151016ad83Smrg    lt_cv_deplibs_check_method=pass_all
35161016ad83Smrg  fi
35171016ad83Smrg  ;;
35181016ad83Smrg
35191016ad83Smrghaiku*)
35201016ad83Smrg  lt_cv_deplibs_check_method=pass_all
35211016ad83Smrg  ;;
35221016ad83Smrg
35231016ad83Smrghpux10.20* | hpux11*)
35241016ad83Smrg  lt_cv_file_magic_cmd=/usr/bin/file
35251016ad83Smrg  case $host_cpu in
35261016ad83Smrg  ia64*)
35271016ad83Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
35281016ad83Smrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
35291016ad83Smrg    ;;
35301016ad83Smrg  hppa*64*)
35311016ad83Smrg    [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]']
35321016ad83Smrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
35331016ad83Smrg    ;;
35341016ad83Smrg  *)
35351016ad83Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
35361016ad83Smrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
35371016ad83Smrg    ;;
35381016ad83Smrg  esac
35391016ad83Smrg  ;;
35401016ad83Smrg
35411016ad83Smrginterix[[3-9]]*)
35421016ad83Smrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
35431016ad83Smrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
35441016ad83Smrg  ;;
35451016ad83Smrg
35461016ad83Smrgirix5* | irix6* | nonstopux*)
35471016ad83Smrg  case $LD in
35481016ad83Smrg  *-32|*"-32 ") libmagic=32-bit;;
35491016ad83Smrg  *-n32|*"-n32 ") libmagic=N32;;
35501016ad83Smrg  *-64|*"-64 ") libmagic=64-bit;;
35511016ad83Smrg  *) libmagic=never-match;;
35521016ad83Smrg  esac
35531016ad83Smrg  lt_cv_deplibs_check_method=pass_all
35541016ad83Smrg  ;;
35551016ad83Smrg
35561016ad83Smrg# This must be glibc/ELF.
35571016ad83Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
35581016ad83Smrg  lt_cv_deplibs_check_method=pass_all
35591016ad83Smrg  ;;
35601016ad83Smrg
35611016ad83Smrgnetbsd* | netbsdelf*-gnu)
35621016ad83Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
35631016ad83Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
35641016ad83Smrg  else
35651016ad83Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
35661016ad83Smrg  fi
35671016ad83Smrg  ;;
35681016ad83Smrg
35691016ad83Smrgnewos6*)
35701016ad83Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
35711016ad83Smrg  lt_cv_file_magic_cmd=/usr/bin/file
35721016ad83Smrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
35731016ad83Smrg  ;;
35741016ad83Smrg
35751016ad83Smrg*nto* | *qnx*)
35761016ad83Smrg  lt_cv_deplibs_check_method=pass_all
35771016ad83Smrg  ;;
35781016ad83Smrg
35797204935cSmrgopenbsd* | bitrig*)
35807204935cSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
35811016ad83Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
35821016ad83Smrg  else
35831016ad83Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
35841016ad83Smrg  fi
35851016ad83Smrg  ;;
35861016ad83Smrg
35871016ad83Smrgosf3* | osf4* | osf5*)
35881016ad83Smrg  lt_cv_deplibs_check_method=pass_all
35891016ad83Smrg  ;;
35901016ad83Smrg
35911016ad83Smrgrdos*)
35921016ad83Smrg  lt_cv_deplibs_check_method=pass_all
35931016ad83Smrg  ;;
35941016ad83Smrg
35951016ad83Smrgsolaris*)
35961016ad83Smrg  lt_cv_deplibs_check_method=pass_all
35971016ad83Smrg  ;;
35981016ad83Smrg
35991016ad83Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
36001016ad83Smrg  lt_cv_deplibs_check_method=pass_all
36011016ad83Smrg  ;;
36021016ad83Smrg
36031016ad83Smrgsysv4 | sysv4.3*)
36041016ad83Smrg  case $host_vendor in
36051016ad83Smrg  motorola)
36061016ad83Smrg    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]]'
36071016ad83Smrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
36081016ad83Smrg    ;;
36091016ad83Smrg  ncr)
36101016ad83Smrg    lt_cv_deplibs_check_method=pass_all
36111016ad83Smrg    ;;
36121016ad83Smrg  sequent)
36131016ad83Smrg    lt_cv_file_magic_cmd='/bin/file'
36141016ad83Smrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
36151016ad83Smrg    ;;
36161016ad83Smrg  sni)
36171016ad83Smrg    lt_cv_file_magic_cmd='/bin/file'
36181016ad83Smrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
36191016ad83Smrg    lt_cv_file_magic_test_file=/lib/libc.so
36201016ad83Smrg    ;;
36211016ad83Smrg  siemens)
36221016ad83Smrg    lt_cv_deplibs_check_method=pass_all
36231016ad83Smrg    ;;
36241016ad83Smrg  pc)
36251016ad83Smrg    lt_cv_deplibs_check_method=pass_all
36261016ad83Smrg    ;;
36271016ad83Smrg  esac
36281016ad83Smrg  ;;
36291016ad83Smrg
36301016ad83Smrgtpf*)
36311016ad83Smrg  lt_cv_deplibs_check_method=pass_all
36321016ad83Smrg  ;;
36337204935cSmrgos2*)
36347204935cSmrg  lt_cv_deplibs_check_method=pass_all
36357204935cSmrg  ;;
36361016ad83Smrgesac
36371016ad83Smrg])
36381016ad83Smrg
36391016ad83Smrgfile_magic_glob=
36401016ad83Smrgwant_nocaseglob=no
36411016ad83Smrgif test "$build" = "$host"; then
36421016ad83Smrg  case $host_os in
36431016ad83Smrg  mingw* | pw32*)
36441016ad83Smrg    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
36451016ad83Smrg      want_nocaseglob=yes
36461016ad83Smrg    else
36471016ad83Smrg      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
36481016ad83Smrg    fi
36491016ad83Smrg    ;;
36501016ad83Smrg  esac
36511016ad83Smrgfi
36521016ad83Smrg
36531016ad83Smrgfile_magic_cmd=$lt_cv_file_magic_cmd
36541016ad83Smrgdeplibs_check_method=$lt_cv_deplibs_check_method
36551016ad83Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
36561016ad83Smrg
36571016ad83Smrg_LT_DECL([], [deplibs_check_method], [1],
36581016ad83Smrg    [Method to check whether dependent libraries are shared objects])
36591016ad83Smrg_LT_DECL([], [file_magic_cmd], [1],
36601016ad83Smrg    [Command to use when deplibs_check_method = "file_magic"])
36611016ad83Smrg_LT_DECL([], [file_magic_glob], [1],
36621016ad83Smrg    [How to find potential files when deplibs_check_method = "file_magic"])
36631016ad83Smrg_LT_DECL([], [want_nocaseglob], [1],
36641016ad83Smrg    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
36651016ad83Smrg])# _LT_CHECK_MAGIC_METHOD
36661016ad83Smrg
36671016ad83Smrg
36681016ad83Smrg# LT_PATH_NM
36691016ad83Smrg# ----------
36701016ad83Smrg# find the pathname to a BSD- or MS-compatible name lister
36711016ad83SmrgAC_DEFUN([LT_PATH_NM],
36721016ad83Smrg[AC_REQUIRE([AC_PROG_CC])dnl
36731016ad83SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
36741016ad83Smrg[if test -n "$NM"; then
36751016ad83Smrg  # Let the user override the test.
36767204935cSmrg  lt_cv_path_NM=$NM
36771016ad83Smrgelse
36787204935cSmrg  lt_nm_to_check=${ac_tool_prefix}nm
36791016ad83Smrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
36801016ad83Smrg    lt_nm_to_check="$lt_nm_to_check nm"
36811016ad83Smrg  fi
36821016ad83Smrg  for lt_tmp_nm in $lt_nm_to_check; do
36837204935cSmrg    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
36841016ad83Smrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
36857204935cSmrg      IFS=$lt_save_ifs
36861016ad83Smrg      test -z "$ac_dir" && ac_dir=.
36877204935cSmrg      tmp_nm=$ac_dir/$lt_tmp_nm
36887204935cSmrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
36891016ad83Smrg	# Check to see if the nm accepts a BSD-compat flag.
36907204935cSmrg	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
36911016ad83Smrg	#   nm: unknown option "B" ignored
36921016ad83Smrg	# Tru64's nm complains that /dev/null is an invalid object file
36937204935cSmrg	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
36947204935cSmrg	case $build_os in
36957204935cSmrg	mingw*) lt_bad_file=conftest.nm/nofile ;;
36967204935cSmrg	*) lt_bad_file=/dev/null ;;
36977204935cSmrg	esac
36987204935cSmrg	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
36997204935cSmrg	*$lt_bad_file* | *'Invalid file or object type'*)
37001016ad83Smrg	  lt_cv_path_NM="$tmp_nm -B"
37017204935cSmrg	  break 2
37021016ad83Smrg	  ;;
37031016ad83Smrg	*)
37041016ad83Smrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
37051016ad83Smrg	  */dev/null*)
37061016ad83Smrg	    lt_cv_path_NM="$tmp_nm -p"
37077204935cSmrg	    break 2
37081016ad83Smrg	    ;;
37091016ad83Smrg	  *)
37101016ad83Smrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
37111016ad83Smrg	    continue # so that we can try to find one that supports BSD flags
37121016ad83Smrg	    ;;
37131016ad83Smrg	  esac
37141016ad83Smrg	  ;;
37151016ad83Smrg	esac
37161016ad83Smrg      fi
37171016ad83Smrg    done
37187204935cSmrg    IFS=$lt_save_ifs
37191016ad83Smrg  done
37201016ad83Smrg  : ${lt_cv_path_NM=no}
37211016ad83Smrgfi])
37227204935cSmrgif test no != "$lt_cv_path_NM"; then
37237204935cSmrg  NM=$lt_cv_path_NM
37241016ad83Smrgelse
37251016ad83Smrg  # Didn't find any BSD compatible name lister, look for dumpbin.
37261016ad83Smrg  if test -n "$DUMPBIN"; then :
37271016ad83Smrg    # Let the user override the test.
37281016ad83Smrg  else
37291016ad83Smrg    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
37307204935cSmrg    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
37311016ad83Smrg    *COFF*)
37327204935cSmrg      DUMPBIN="$DUMPBIN -symbols -headers"
37331016ad83Smrg      ;;
37341016ad83Smrg    *)
37351016ad83Smrg      DUMPBIN=:
37361016ad83Smrg      ;;
37371016ad83Smrg    esac
37381016ad83Smrg  fi
37391016ad83Smrg  AC_SUBST([DUMPBIN])
37407204935cSmrg  if test : != "$DUMPBIN"; then
37417204935cSmrg    NM=$DUMPBIN
37421016ad83Smrg  fi
37431016ad83Smrgfi
37441016ad83Smrgtest -z "$NM" && NM=nm
37451016ad83SmrgAC_SUBST([NM])
37461016ad83Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
37471016ad83Smrg
37481016ad83SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
37491016ad83Smrg  [lt_cv_nm_interface="BSD nm"
37501016ad83Smrg  echo "int some_variable = 0;" > conftest.$ac_ext
37511016ad83Smrg  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
37521016ad83Smrg  (eval "$ac_compile" 2>conftest.err)
37531016ad83Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
37541016ad83Smrg  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
37551016ad83Smrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
37561016ad83Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
37571016ad83Smrg  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
37581016ad83Smrg  cat conftest.out >&AS_MESSAGE_LOG_FD
37591016ad83Smrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
37601016ad83Smrg    lt_cv_nm_interface="MS dumpbin"
37611016ad83Smrg  fi
37621016ad83Smrg  rm -f conftest*])
37631016ad83Smrg])# LT_PATH_NM
37641016ad83Smrg
37651016ad83Smrg# Old names:
37661016ad83SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
37671016ad83SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
37681016ad83Smrgdnl aclocal-1.4 backwards compatibility:
37691016ad83Smrgdnl AC_DEFUN([AM_PROG_NM], [])
37701016ad83Smrgdnl AC_DEFUN([AC_PROG_NM], [])
37711016ad83Smrg
37721016ad83Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
37731016ad83Smrg# --------------------------------
37741016ad83Smrg# how to determine the name of the shared library
37751016ad83Smrg# associated with a specific link library.
37761016ad83Smrg#  -- PORTME fill in with the dynamic library characteristics
37771016ad83Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
37781016ad83Smrg[m4_require([_LT_DECL_EGREP])
37791016ad83Smrgm4_require([_LT_DECL_OBJDUMP])
37801016ad83Smrgm4_require([_LT_DECL_DLLTOOL])
37811016ad83SmrgAC_CACHE_CHECK([how to associate runtime and link libraries],
37821016ad83Smrglt_cv_sharedlib_from_linklib_cmd,
37831016ad83Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown'
37841016ad83Smrg
37851016ad83Smrgcase $host_os in
37861016ad83Smrgcygwin* | mingw* | pw32* | cegcc*)
37877204935cSmrg  # two different shell functions defined in ltmain.sh;
37887204935cSmrg  # decide which one to use based on capabilities of $DLLTOOL
37891016ad83Smrg  case `$DLLTOOL --help 2>&1` in
37901016ad83Smrg  *--identify-strict*)
37911016ad83Smrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
37921016ad83Smrg    ;;
37931016ad83Smrg  *)
37941016ad83Smrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
37951016ad83Smrg    ;;
37961016ad83Smrg  esac
37971016ad83Smrg  ;;
37981016ad83Smrg*)
37991016ad83Smrg  # fallback: assume linklib IS sharedlib
38007204935cSmrg  lt_cv_sharedlib_from_linklib_cmd=$ECHO
38011016ad83Smrg  ;;
38021016ad83Smrgesac
38031016ad83Smrg])
38041016ad83Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
38051016ad83Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
38061016ad83Smrg
38071016ad83Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
38081016ad83Smrg    [Command to associate shared and link libraries])
38091016ad83Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
38101016ad83Smrg
38111016ad83Smrg
38121016ad83Smrg# _LT_PATH_MANIFEST_TOOL
38131016ad83Smrg# ----------------------
38141016ad83Smrg# locate the manifest tool
38151016ad83Smrgm4_defun([_LT_PATH_MANIFEST_TOOL],
38161016ad83Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
38171016ad83Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
38181016ad83SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
38191016ad83Smrg  [lt_cv_path_mainfest_tool=no
38201016ad83Smrg  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
38211016ad83Smrg  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
38221016ad83Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
38231016ad83Smrg  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
38241016ad83Smrg    lt_cv_path_mainfest_tool=yes
38251016ad83Smrg  fi
38261016ad83Smrg  rm -f conftest*])
38277204935cSmrgif test yes != "$lt_cv_path_mainfest_tool"; then
38281016ad83Smrg  MANIFEST_TOOL=:
38291016ad83Smrgfi
38301016ad83Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
38311016ad83Smrg])# _LT_PATH_MANIFEST_TOOL
38321016ad83Smrg
38331016ad83Smrg
38347204935cSmrg# _LT_DLL_DEF_P([FILE])
38357204935cSmrg# ---------------------
38367204935cSmrg# True iff FILE is a Windows DLL '.def' file.
38377204935cSmrg# Keep in sync with func_dll_def_p in the libtool script
38387204935cSmrgAC_DEFUN([_LT_DLL_DEF_P],
38397204935cSmrg[dnl
38407204935cSmrg  test DEF = "`$SED -n dnl
38417204935cSmrg    -e '\''s/^[[	 ]]*//'\'' dnl Strip leading whitespace
38427204935cSmrg    -e '\''/^\(;.*\)*$/d'\'' dnl      Delete empty lines and comments
38437204935cSmrg    -e '\''s/^\(EXPORTS\|LIBRARY\)\([[	 ]].*\)*$/DEF/p'\'' dnl
38447204935cSmrg    -e q dnl                          Only consider the first "real" line
38457204935cSmrg    $1`" dnl
38467204935cSmrg])# _LT_DLL_DEF_P
38477204935cSmrg
38487204935cSmrg
38491016ad83Smrg# LT_LIB_M
38501016ad83Smrg# --------
38511016ad83Smrg# check for math library
38521016ad83SmrgAC_DEFUN([LT_LIB_M],
38531016ad83Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
38541016ad83SmrgLIBM=
38551016ad83Smrgcase $host in
38561016ad83Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
38571016ad83Smrg  # These system don't have libm, or don't need it
38581016ad83Smrg  ;;
38591016ad83Smrg*-ncr-sysv4.3*)
38607204935cSmrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
38611016ad83Smrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
38621016ad83Smrg  ;;
38631016ad83Smrg*)
38647204935cSmrg  AC_CHECK_LIB(m, cos, LIBM=-lm)
38651016ad83Smrg  ;;
38661016ad83Smrgesac
38671016ad83SmrgAC_SUBST([LIBM])
38681016ad83Smrg])# LT_LIB_M
38691016ad83Smrg
38701016ad83Smrg# Old name:
38711016ad83SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
38721016ad83Smrgdnl aclocal-1.4 backwards compatibility:
38731016ad83Smrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
38741016ad83Smrg
38751016ad83Smrg
38761016ad83Smrg# _LT_COMPILER_NO_RTTI([TAGNAME])
38771016ad83Smrg# -------------------------------
38781016ad83Smrgm4_defun([_LT_COMPILER_NO_RTTI],
38791016ad83Smrg[m4_require([_LT_TAG_COMPILER])dnl
38801016ad83Smrg
38811016ad83Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
38821016ad83Smrg
38837204935cSmrgif test yes = "$GCC"; then
38841016ad83Smrg  case $cc_basename in
38851016ad83Smrg  nvcc*)
38861016ad83Smrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
38871016ad83Smrg  *)
38881016ad83Smrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
38891016ad83Smrg  esac
38901016ad83Smrg
38911016ad83Smrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
38921016ad83Smrg    lt_cv_prog_compiler_rtti_exceptions,
38931016ad83Smrg    [-fno-rtti -fno-exceptions], [],
38941016ad83Smrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
38951016ad83Smrgfi
38961016ad83Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
38971016ad83Smrg	[Compiler flag to turn off builtin functions])
38981016ad83Smrg])# _LT_COMPILER_NO_RTTI
38991016ad83Smrg
39001016ad83Smrg
39011016ad83Smrg# _LT_CMD_GLOBAL_SYMBOLS
39021016ad83Smrg# ----------------------
39031016ad83Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
39041016ad83Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
39051016ad83SmrgAC_REQUIRE([AC_PROG_CC])dnl
39061016ad83SmrgAC_REQUIRE([AC_PROG_AWK])dnl
39071016ad83SmrgAC_REQUIRE([LT_PATH_NM])dnl
39081016ad83SmrgAC_REQUIRE([LT_PATH_LD])dnl
39091016ad83Smrgm4_require([_LT_DECL_SED])dnl
39101016ad83Smrgm4_require([_LT_DECL_EGREP])dnl
39111016ad83Smrgm4_require([_LT_TAG_COMPILER])dnl
39121016ad83Smrg
39131016ad83Smrg# Check for command to grab the raw symbol name followed by C symbol from nm.
39141016ad83SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
39151016ad83SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
39161016ad83Smrg[
39171016ad83Smrg# These are sane defaults that work on at least a few old systems.
39181016ad83Smrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
39191016ad83Smrg
39201016ad83Smrg# Character class describing NM global symbol codes.
39211016ad83Smrgsymcode='[[BCDEGRST]]'
39221016ad83Smrg
39231016ad83Smrg# Regexp to match symbols that can be accessed directly from C.
39241016ad83Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
39251016ad83Smrg
39261016ad83Smrg# Define system-specific variables.
39271016ad83Smrgcase $host_os in
39281016ad83Smrgaix*)
39291016ad83Smrg  symcode='[[BCDT]]'
39301016ad83Smrg  ;;
39311016ad83Smrgcygwin* | mingw* | pw32* | cegcc*)
39321016ad83Smrg  symcode='[[ABCDGISTW]]'
39331016ad83Smrg  ;;
39341016ad83Smrghpux*)
39357204935cSmrg  if test ia64 = "$host_cpu"; then
39361016ad83Smrg    symcode='[[ABCDEGRST]]'
39371016ad83Smrg  fi
39381016ad83Smrg  ;;
39391016ad83Smrgirix* | nonstopux*)
39401016ad83Smrg  symcode='[[BCDEGRST]]'
39411016ad83Smrg  ;;
39421016ad83Smrgosf*)
39431016ad83Smrg  symcode='[[BCDEGQRST]]'
39441016ad83Smrg  ;;
39451016ad83Smrgsolaris*)
39461016ad83Smrg  symcode='[[BDRT]]'
39471016ad83Smrg  ;;
39481016ad83Smrgsco3.2v5*)
39491016ad83Smrg  symcode='[[DT]]'
39501016ad83Smrg  ;;
39511016ad83Smrgsysv4.2uw2*)
39521016ad83Smrg  symcode='[[DT]]'
39531016ad83Smrg  ;;
39541016ad83Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
39551016ad83Smrg  symcode='[[ABDT]]'
39561016ad83Smrg  ;;
39571016ad83Smrgsysv4)
39581016ad83Smrg  symcode='[[DFNSTU]]'
39591016ad83Smrg  ;;
39601016ad83Smrgesac
39611016ad83Smrg
39621016ad83Smrg# If we're using GNU nm, then use its standard symbol codes.
39631016ad83Smrgcase `$NM -V 2>&1` in
39641016ad83Smrg*GNU* | *'with BFD'*)
39651016ad83Smrg  symcode='[[ABCDGIRSTW]]' ;;
39661016ad83Smrgesac
39671016ad83Smrg
39687204935cSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
39697204935cSmrg  # Gets list of data symbols to import.
39707204935cSmrg  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
39717204935cSmrg  # Adjust the below global symbol transforms to fixup imported variables.
39727204935cSmrg  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
39737204935cSmrg  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
39747204935cSmrg  lt_c_name_lib_hook="\
39757204935cSmrg  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
39767204935cSmrg  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
39777204935cSmrgelse
39787204935cSmrg  # Disable hooks by default.
39797204935cSmrg  lt_cv_sys_global_symbol_to_import=
39807204935cSmrg  lt_cdecl_hook=
39817204935cSmrg  lt_c_name_hook=
39827204935cSmrg  lt_c_name_lib_hook=
39837204935cSmrgfi
39847204935cSmrg
39851016ad83Smrg# Transform an extracted symbol line into a proper C declaration.
39861016ad83Smrg# Some systems (esp. on ia64) link data and code symbols differently,
39871016ad83Smrg# so use this general approach.
39887204935cSmrglt_cv_sys_global_symbol_to_cdecl="sed -n"\
39897204935cSmrg$lt_cdecl_hook\
39907204935cSmrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
39917204935cSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
39921016ad83Smrg
39931016ad83Smrg# Transform an extracted symbol line into symbol name and symbol address
39947204935cSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n"\
39957204935cSmrg$lt_c_name_hook\
39967204935cSmrg" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
39977204935cSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
39987204935cSmrg
39997204935cSmrg# Transform an extracted symbol line into symbol name with lib prefix and
40007204935cSmrg# symbol address.
40017204935cSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
40027204935cSmrg$lt_c_name_lib_hook\
40037204935cSmrg" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
40047204935cSmrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
40057204935cSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
40061016ad83Smrg
40071016ad83Smrg# Handle CRLF in mingw tool chain
40081016ad83Smrgopt_cr=
40091016ad83Smrgcase $build_os in
40101016ad83Smrgmingw*)
40111016ad83Smrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
40121016ad83Smrg  ;;
40131016ad83Smrgesac
40141016ad83Smrg
40151016ad83Smrg# Try without a prefix underscore, then with it.
40161016ad83Smrgfor ac_symprfx in "" "_"; do
40171016ad83Smrg
40181016ad83Smrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
40191016ad83Smrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
40201016ad83Smrg
40211016ad83Smrg  # Write the raw and C identifiers.
40221016ad83Smrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
40237204935cSmrg    # Fake it for dumpbin and say T for any non-static function,
40247204935cSmrg    # D for any global variable and I for any imported variable.
40251016ad83Smrg    # Also find C++ and __fastcall symbols from MSVC++,
40261016ad83Smrg    # which start with @ or ?.
40271016ad83Smrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
40281016ad83Smrg"     {last_section=section; section=\$ 3};"\
40291016ad83Smrg"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
40301016ad83Smrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
40317204935cSmrg"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
40327204935cSmrg"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
40337204935cSmrg"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
40341016ad83Smrg"     \$ 0!~/External *\|/{next};"\
40351016ad83Smrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
40361016ad83Smrg"     {if(hide[section]) next};"\
40377204935cSmrg"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
40387204935cSmrg"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
40397204935cSmrg"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
40407204935cSmrg"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
40411016ad83Smrg"     ' prfx=^$ac_symprfx]"
40421016ad83Smrg  else
40431016ad83Smrg    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
40441016ad83Smrg  fi
40451016ad83Smrg  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
40461016ad83Smrg
40471016ad83Smrg  # Check to see that the pipe works correctly.
40481016ad83Smrg  pipe_works=no
40491016ad83Smrg
40501016ad83Smrg  rm -f conftest*
40511016ad83Smrg  cat > conftest.$ac_ext <<_LT_EOF
40521016ad83Smrg#ifdef __cplusplus
40531016ad83Smrgextern "C" {
40541016ad83Smrg#endif
40551016ad83Smrgchar nm_test_var;
40561016ad83Smrgvoid nm_test_func(void);
40571016ad83Smrgvoid nm_test_func(void){}
40581016ad83Smrg#ifdef __cplusplus
40591016ad83Smrg}
40601016ad83Smrg#endif
40611016ad83Smrgint main(){nm_test_var='a';nm_test_func();return(0);}
40621016ad83Smrg_LT_EOF
40631016ad83Smrg
40641016ad83Smrg  if AC_TRY_EVAL(ac_compile); then
40651016ad83Smrg    # Now try to grab the symbols.
40661016ad83Smrg    nlist=conftest.nm
40671016ad83Smrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
40681016ad83Smrg      # Try sorting and uniquifying the output.
40691016ad83Smrg      if sort "$nlist" | uniq > "$nlist"T; then
40701016ad83Smrg	mv -f "$nlist"T "$nlist"
40711016ad83Smrg      else
40721016ad83Smrg	rm -f "$nlist"T
40731016ad83Smrg      fi
40741016ad83Smrg
40751016ad83Smrg      # Make sure that we snagged all the symbols we need.
40761016ad83Smrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
40771016ad83Smrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
40781016ad83Smrg	  cat <<_LT_EOF > conftest.$ac_ext
40791016ad83Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
40807204935cSmrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
40817204935cSmrg/* DATA imports from DLLs on WIN32 can't be const, because runtime
40821016ad83Smrg   relocations are performed -- see ld's documentation on pseudo-relocs.  */
40831016ad83Smrg# define LT@&t@_DLSYM_CONST
40847204935cSmrg#elif defined __osf__
40851016ad83Smrg/* This system does not cope well with relocations in const data.  */
40861016ad83Smrg# define LT@&t@_DLSYM_CONST
40871016ad83Smrg#else
40881016ad83Smrg# define LT@&t@_DLSYM_CONST const
40891016ad83Smrg#endif
40901016ad83Smrg
40911016ad83Smrg#ifdef __cplusplus
40921016ad83Smrgextern "C" {
40931016ad83Smrg#endif
40941016ad83Smrg
40951016ad83Smrg_LT_EOF
40961016ad83Smrg	  # Now generate the symbol file.
40971016ad83Smrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
40981016ad83Smrg
40991016ad83Smrg	  cat <<_LT_EOF >> conftest.$ac_ext
41001016ad83Smrg
41011016ad83Smrg/* The mapping between symbol names and symbols.  */
41021016ad83SmrgLT@&t@_DLSYM_CONST struct {
41031016ad83Smrg  const char *name;
41041016ad83Smrg  void       *address;
41051016ad83Smrg}
41061016ad83Smrglt__PROGRAM__LTX_preloaded_symbols[[]] =
41071016ad83Smrg{
41081016ad83Smrg  { "@PROGRAM@", (void *) 0 },
41091016ad83Smrg_LT_EOF
41107204935cSmrg	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
41111016ad83Smrg	  cat <<\_LT_EOF >> conftest.$ac_ext
41121016ad83Smrg  {0, (void *) 0}
41131016ad83Smrg};
41141016ad83Smrg
41151016ad83Smrg/* This works around a problem in FreeBSD linker */
41161016ad83Smrg#ifdef FREEBSD_WORKAROUND
41171016ad83Smrgstatic const void *lt_preloaded_setup() {
41181016ad83Smrg  return lt__PROGRAM__LTX_preloaded_symbols;
41191016ad83Smrg}
41201016ad83Smrg#endif
41211016ad83Smrg
41221016ad83Smrg#ifdef __cplusplus
41231016ad83Smrg}
41241016ad83Smrg#endif
41251016ad83Smrg_LT_EOF
41261016ad83Smrg	  # Now try linking the two files.
41271016ad83Smrg	  mv conftest.$ac_objext conftstm.$ac_objext
41281016ad83Smrg	  lt_globsym_save_LIBS=$LIBS
41291016ad83Smrg	  lt_globsym_save_CFLAGS=$CFLAGS
41307204935cSmrg	  LIBS=conftstm.$ac_objext
41311016ad83Smrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
41327204935cSmrg	  if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
41331016ad83Smrg	    pipe_works=yes
41341016ad83Smrg	  fi
41351016ad83Smrg	  LIBS=$lt_globsym_save_LIBS
41361016ad83Smrg	  CFLAGS=$lt_globsym_save_CFLAGS
41371016ad83Smrg	else
41381016ad83Smrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
41391016ad83Smrg	fi
41401016ad83Smrg      else
41411016ad83Smrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
41421016ad83Smrg      fi
41431016ad83Smrg    else
41441016ad83Smrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
41451016ad83Smrg    fi
41461016ad83Smrg  else
41471016ad83Smrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
41481016ad83Smrg    cat conftest.$ac_ext >&5
41491016ad83Smrg  fi
41501016ad83Smrg  rm -rf conftest* conftst*
41511016ad83Smrg
41521016ad83Smrg  # Do not use the global_symbol_pipe unless it works.
41537204935cSmrg  if test yes = "$pipe_works"; then
41541016ad83Smrg    break
41551016ad83Smrg  else
41561016ad83Smrg    lt_cv_sys_global_symbol_pipe=
41571016ad83Smrg  fi
41581016ad83Smrgdone
41591016ad83Smrg])
41601016ad83Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
41611016ad83Smrg  lt_cv_sys_global_symbol_to_cdecl=
41621016ad83Smrgfi
41631016ad83Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
41641016ad83Smrg  AC_MSG_RESULT(failed)
41651016ad83Smrgelse
41661016ad83Smrg  AC_MSG_RESULT(ok)
41671016ad83Smrgfi
41681016ad83Smrg
41691016ad83Smrg# Response file support.
41701016ad83Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
41711016ad83Smrg  nm_file_list_spec='@'
41721016ad83Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
41731016ad83Smrg  nm_file_list_spec='@'
41741016ad83Smrgfi
41751016ad83Smrg
41761016ad83Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
41771016ad83Smrg    [Take the output of nm and produce a listing of raw symbols and C names])
41781016ad83Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
41791016ad83Smrg    [Transform the output of nm in a proper C declaration])
41807204935cSmrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
41817204935cSmrg    [Transform the output of nm into a list of symbols to manually relocate])
41821016ad83Smrg_LT_DECL([global_symbol_to_c_name_address],
41831016ad83Smrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
41841016ad83Smrg    [Transform the output of nm in a C name address pair])
41851016ad83Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
41861016ad83Smrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
41871016ad83Smrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
41887204935cSmrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
41897204935cSmrg    [The name lister interface])
41901016ad83Smrg_LT_DECL([], [nm_file_list_spec], [1],
41911016ad83Smrg    [Specify filename containing input files for $NM])
41921016ad83Smrg]) # _LT_CMD_GLOBAL_SYMBOLS
41931016ad83Smrg
41941016ad83Smrg
41951016ad83Smrg# _LT_COMPILER_PIC([TAGNAME])
41961016ad83Smrg# ---------------------------
41971016ad83Smrgm4_defun([_LT_COMPILER_PIC],
41981016ad83Smrg[m4_require([_LT_TAG_COMPILER])dnl
41991016ad83Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
42001016ad83Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
42011016ad83Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
42021016ad83Smrg
42031016ad83Smrgm4_if([$1], [CXX], [
42041016ad83Smrg  # C++ specific cases for pic, static, wl, etc.
42057204935cSmrg  if test yes = "$GXX"; then
42061016ad83Smrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
42071016ad83Smrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
42081016ad83Smrg
42091016ad83Smrg    case $host_os in
42101016ad83Smrg    aix*)
42111016ad83Smrg      # All AIX code is PIC.
42127204935cSmrg      if test ia64 = "$host_cpu"; then
42131016ad83Smrg	# AIX 5 now supports IA64 processor
42141016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
42151016ad83Smrg      fi
42167204935cSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
42171016ad83Smrg      ;;
42181016ad83Smrg
42191016ad83Smrg    amigaos*)
42201016ad83Smrg      case $host_cpu in
42211016ad83Smrg      powerpc)
42221016ad83Smrg            # see comment about AmigaOS4 .so support
42231016ad83Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
42241016ad83Smrg        ;;
42251016ad83Smrg      m68k)
42261016ad83Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
42277204935cSmrg            # adding the '-m68020' flag to GCC prevents building anything better,
42287204935cSmrg            # like '-m68040'.
42291016ad83Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
42301016ad83Smrg        ;;
42311016ad83Smrg      esac
42321016ad83Smrg      ;;
42331016ad83Smrg
42341016ad83Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
42351016ad83Smrg      # PIC is the default for these OSes.
42361016ad83Smrg      ;;
42371016ad83Smrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
42381016ad83Smrg      # This hack is so that the source file can tell whether it is being
42391016ad83Smrg      # built for inclusion in a dll (and should export symbols for example).
42401016ad83Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
42411016ad83Smrg      # (--disable-auto-import) libraries
42421016ad83Smrg      m4_if([$1], [GCJ], [],
42431016ad83Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
42447204935cSmrg      case $host_os in
42457204935cSmrg      os2*)
42467204935cSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
42477204935cSmrg	;;
42487204935cSmrg      esac
42491016ad83Smrg      ;;
42501016ad83Smrg    darwin* | rhapsody*)
42511016ad83Smrg      # PIC is the default on this platform
42521016ad83Smrg      # Common symbols not allowed in MH_DYLIB files
42531016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
42541016ad83Smrg      ;;
42551016ad83Smrg    *djgpp*)
42561016ad83Smrg      # DJGPP does not support shared libraries at all
42571016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
42581016ad83Smrg      ;;
42591016ad83Smrg    haiku*)
42601016ad83Smrg      # PIC is the default for Haiku.
42611016ad83Smrg      # The "-static" flag exists, but is broken.
42621016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
42631016ad83Smrg      ;;
42641016ad83Smrg    interix[[3-9]]*)
42651016ad83Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
42661016ad83Smrg      # Instead, we relocate shared libraries at runtime.
42671016ad83Smrg      ;;
42681016ad83Smrg    sysv4*MP*)
42691016ad83Smrg      if test -d /usr/nec; then
42701016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
42711016ad83Smrg      fi
42721016ad83Smrg      ;;
42731016ad83Smrg    hpux*)
42741016ad83Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
42751016ad83Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
42761016ad83Smrg      # sets the default TLS model and affects inlining.
42771016ad83Smrg      case $host_cpu in
42781016ad83Smrg      hppa*64*)
42791016ad83Smrg	;;
42801016ad83Smrg      *)
42811016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
42821016ad83Smrg	;;
42831016ad83Smrg      esac
42841016ad83Smrg      ;;
42851016ad83Smrg    *qnx* | *nto*)
42861016ad83Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
42871016ad83Smrg      # it will coredump.
42881016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
42891016ad83Smrg      ;;
42901016ad83Smrg    *)
42911016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
42921016ad83Smrg      ;;
42931016ad83Smrg    esac
42941016ad83Smrg  else
42951016ad83Smrg    case $host_os in
42961016ad83Smrg      aix[[4-9]]*)
42971016ad83Smrg	# All AIX code is PIC.
42987204935cSmrg	if test ia64 = "$host_cpu"; then
42991016ad83Smrg	  # AIX 5 now supports IA64 processor
43001016ad83Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
43011016ad83Smrg	else
43021016ad83Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
43031016ad83Smrg	fi
43041016ad83Smrg	;;
43051016ad83Smrg      chorus*)
43061016ad83Smrg	case $cc_basename in
43071016ad83Smrg	cxch68*)
43081016ad83Smrg	  # Green Hills C++ Compiler
43091016ad83Smrg	  # _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"
43101016ad83Smrg	  ;;
43111016ad83Smrg	esac
43121016ad83Smrg	;;
43131016ad83Smrg      mingw* | cygwin* | os2* | pw32* | cegcc*)
43141016ad83Smrg	# This hack is so that the source file can tell whether it is being
43151016ad83Smrg	# built for inclusion in a dll (and should export symbols for example).
43161016ad83Smrg	m4_if([$1], [GCJ], [],
43171016ad83Smrg	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
43181016ad83Smrg	;;
43191016ad83Smrg      dgux*)
43201016ad83Smrg	case $cc_basename in
43211016ad83Smrg	  ec++*)
43221016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
43231016ad83Smrg	    ;;
43241016ad83Smrg	  ghcx*)
43251016ad83Smrg	    # Green Hills C++ Compiler
43261016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
43271016ad83Smrg	    ;;
43281016ad83Smrg	  *)
43291016ad83Smrg	    ;;
43301016ad83Smrg	esac
43311016ad83Smrg	;;
43321016ad83Smrg      freebsd* | dragonfly*)
43331016ad83Smrg	# FreeBSD uses GNU C++
43341016ad83Smrg	;;
43351016ad83Smrg      hpux9* | hpux10* | hpux11*)
43361016ad83Smrg	case $cc_basename in
43371016ad83Smrg	  CC*)
43381016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43397204935cSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
43407204935cSmrg	    if test ia64 != "$host_cpu"; then
43411016ad83Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
43421016ad83Smrg	    fi
43431016ad83Smrg	    ;;
43441016ad83Smrg	  aCC*)
43451016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43467204935cSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
43471016ad83Smrg	    case $host_cpu in
43481016ad83Smrg	    hppa*64*|ia64*)
43491016ad83Smrg	      # +Z the default
43501016ad83Smrg	      ;;
43511016ad83Smrg	    *)
43521016ad83Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
43531016ad83Smrg	      ;;
43541016ad83Smrg	    esac
43551016ad83Smrg	    ;;
43561016ad83Smrg	  *)
43571016ad83Smrg	    ;;
43581016ad83Smrg	esac
43591016ad83Smrg	;;
43601016ad83Smrg      interix*)
43611016ad83Smrg	# This is c89, which is MS Visual C++ (no shared libs)
43621016ad83Smrg	# Anyone wants to do a port?
43631016ad83Smrg	;;
43641016ad83Smrg      irix5* | irix6* | nonstopux*)
43651016ad83Smrg	case $cc_basename in
43661016ad83Smrg	  CC*)
43671016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43681016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
43691016ad83Smrg	    # CC pic flag -KPIC is the default.
43701016ad83Smrg	    ;;
43711016ad83Smrg	  *)
43721016ad83Smrg	    ;;
43731016ad83Smrg	esac
43741016ad83Smrg	;;
43751016ad83Smrg      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
43761016ad83Smrg	case $cc_basename in
43771016ad83Smrg	  KCC*)
43781016ad83Smrg	    # KAI C++ Compiler
43791016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
43801016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
43811016ad83Smrg	    ;;
43821016ad83Smrg	  ecpc* )
43837204935cSmrg	    # old Intel C++ for x86_64, which still supported -KPIC.
43841016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43851016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
43861016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
43871016ad83Smrg	    ;;
43881016ad83Smrg	  icpc* )
43891016ad83Smrg	    # Intel C++, used to be incompatible with GCC.
43901016ad83Smrg	    # ICC 10 doesn't accept -KPIC any more.
43911016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43921016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
43931016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
43941016ad83Smrg	    ;;
43951016ad83Smrg	  pgCC* | pgcpp*)
43961016ad83Smrg	    # Portland Group C++ compiler
43971016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43981016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
43991016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
44001016ad83Smrg	    ;;
44011016ad83Smrg	  cxx*)
44021016ad83Smrg	    # Compaq C++
44031016ad83Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
44041016ad83Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
44051016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
44061016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
44071016ad83Smrg	    ;;
44081016ad83Smrg	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
44091016ad83Smrg	    # IBM XL 8.0, 9.0 on PPC and BlueGene
44101016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
44111016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
44121016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
44131016ad83Smrg	    ;;
44141016ad83Smrg	  *)
44151016ad83Smrg	    case `$CC -V 2>&1 | sed 5q` in
44161016ad83Smrg	    *Sun\ C*)
44171016ad83Smrg	      # Sun C++ 5.9
44181016ad83Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
44191016ad83Smrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
44201016ad83Smrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
44211016ad83Smrg	      ;;
44221016ad83Smrg	    esac
44231016ad83Smrg	    ;;
44241016ad83Smrg	esac
44251016ad83Smrg	;;
44261016ad83Smrg      lynxos*)
44271016ad83Smrg	;;
44281016ad83Smrg      m88k*)
44291016ad83Smrg	;;
44301016ad83Smrg      mvs*)
44311016ad83Smrg	case $cc_basename in
44321016ad83Smrg	  cxx*)
44331016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
44341016ad83Smrg	    ;;
44351016ad83Smrg	  *)
44361016ad83Smrg	    ;;
44371016ad83Smrg	esac
44381016ad83Smrg	;;
44391016ad83Smrg      netbsd* | netbsdelf*-gnu)
44401016ad83Smrg	;;
44411016ad83Smrg      *qnx* | *nto*)
44421016ad83Smrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
44431016ad83Smrg        # it will coredump.
44441016ad83Smrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
44451016ad83Smrg        ;;
44461016ad83Smrg      osf3* | osf4* | osf5*)
44471016ad83Smrg	case $cc_basename in
44481016ad83Smrg	  KCC*)
44491016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
44501016ad83Smrg	    ;;
44511016ad83Smrg	  RCC*)
44521016ad83Smrg	    # Rational C++ 2.4.1
44531016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
44541016ad83Smrg	    ;;
44551016ad83Smrg	  cxx*)
44561016ad83Smrg	    # Digital/Compaq C++
44571016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
44581016ad83Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
44591016ad83Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
44601016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
44611016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
44621016ad83Smrg	    ;;
44631016ad83Smrg	  *)
44641016ad83Smrg	    ;;
44651016ad83Smrg	esac
44661016ad83Smrg	;;
44671016ad83Smrg      psos*)
44681016ad83Smrg	;;
44691016ad83Smrg      solaris*)
44701016ad83Smrg	case $cc_basename in
44711016ad83Smrg	  CC* | sunCC*)
44721016ad83Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
44731016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
44741016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
44751016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
44761016ad83Smrg	    ;;
44771016ad83Smrg	  gcx*)
44781016ad83Smrg	    # Green Hills C++ Compiler
44791016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
44801016ad83Smrg	    ;;
44811016ad83Smrg	  *)
44821016ad83Smrg	    ;;
44831016ad83Smrg	esac
44841016ad83Smrg	;;
44851016ad83Smrg      sunos4*)
44861016ad83Smrg	case $cc_basename in
44871016ad83Smrg	  CC*)
44881016ad83Smrg	    # Sun C++ 4.x
44891016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
44901016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
44911016ad83Smrg	    ;;
44921016ad83Smrg	  lcc*)
44931016ad83Smrg	    # Lucid
44941016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
44951016ad83Smrg	    ;;
44961016ad83Smrg	  *)
44971016ad83Smrg	    ;;
44981016ad83Smrg	esac
44991016ad83Smrg	;;
45001016ad83Smrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
45011016ad83Smrg	case $cc_basename in
45021016ad83Smrg	  CC*)
45031016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
45041016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
45051016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
45061016ad83Smrg	    ;;
45071016ad83Smrg	esac
45081016ad83Smrg	;;
45091016ad83Smrg      tandem*)
45101016ad83Smrg	case $cc_basename in
45111016ad83Smrg	  NCC*)
45121016ad83Smrg	    # NonStop-UX NCC 3.20
45131016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
45141016ad83Smrg	    ;;
45151016ad83Smrg	  *)
45161016ad83Smrg	    ;;
45171016ad83Smrg	esac
45181016ad83Smrg	;;
45191016ad83Smrg      vxworks*)
45201016ad83Smrg	;;
45211016ad83Smrg      *)
45221016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
45231016ad83Smrg	;;
45241016ad83Smrg    esac
45251016ad83Smrg  fi
45261016ad83Smrg],
45271016ad83Smrg[
45287204935cSmrg  if test yes = "$GCC"; then
45291016ad83Smrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
45301016ad83Smrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
45311016ad83Smrg
45321016ad83Smrg    case $host_os in
45331016ad83Smrg      aix*)
45341016ad83Smrg      # All AIX code is PIC.
45357204935cSmrg      if test ia64 = "$host_cpu"; then
45361016ad83Smrg	# AIX 5 now supports IA64 processor
45371016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
45381016ad83Smrg      fi
45397204935cSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
45401016ad83Smrg      ;;
45411016ad83Smrg
45421016ad83Smrg    amigaos*)
45431016ad83Smrg      case $host_cpu in
45441016ad83Smrg      powerpc)
45451016ad83Smrg            # see comment about AmigaOS4 .so support
45461016ad83Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
45471016ad83Smrg        ;;
45481016ad83Smrg      m68k)
45491016ad83Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
45507204935cSmrg            # adding the '-m68020' flag to GCC prevents building anything better,
45517204935cSmrg            # like '-m68040'.
45521016ad83Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
45531016ad83Smrg        ;;
45541016ad83Smrg      esac
45551016ad83Smrg      ;;
45561016ad83Smrg
45571016ad83Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
45581016ad83Smrg      # PIC is the default for these OSes.
45591016ad83Smrg      ;;
45601016ad83Smrg
45611016ad83Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
45621016ad83Smrg      # This hack is so that the source file can tell whether it is being
45631016ad83Smrg      # built for inclusion in a dll (and should export symbols for example).
45641016ad83Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
45651016ad83Smrg      # (--disable-auto-import) libraries
45661016ad83Smrg      m4_if([$1], [GCJ], [],
45671016ad83Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
45687204935cSmrg      case $host_os in
45697204935cSmrg      os2*)
45707204935cSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
45717204935cSmrg	;;
45727204935cSmrg      esac
45731016ad83Smrg      ;;
45741016ad83Smrg
45751016ad83Smrg    darwin* | rhapsody*)
45761016ad83Smrg      # PIC is the default on this platform
45771016ad83Smrg      # Common symbols not allowed in MH_DYLIB files
45781016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
45791016ad83Smrg      ;;
45801016ad83Smrg
45811016ad83Smrg    haiku*)
45821016ad83Smrg      # PIC is the default for Haiku.
45831016ad83Smrg      # The "-static" flag exists, but is broken.
45841016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
45851016ad83Smrg      ;;
45861016ad83Smrg
45871016ad83Smrg    hpux*)
45881016ad83Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
45891016ad83Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
45901016ad83Smrg      # sets the default TLS model and affects inlining.
45911016ad83Smrg      case $host_cpu in
45921016ad83Smrg      hppa*64*)
45931016ad83Smrg	# +Z the default
45941016ad83Smrg	;;
45951016ad83Smrg      *)
45961016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
45971016ad83Smrg	;;
45981016ad83Smrg      esac
45991016ad83Smrg      ;;
46001016ad83Smrg
46011016ad83Smrg    interix[[3-9]]*)
46021016ad83Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
46031016ad83Smrg      # Instead, we relocate shared libraries at runtime.
46041016ad83Smrg      ;;
46051016ad83Smrg
46061016ad83Smrg    msdosdjgpp*)
46071016ad83Smrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
46081016ad83Smrg      # on systems that don't support them.
46091016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
46101016ad83Smrg      enable_shared=no
46111016ad83Smrg      ;;
46121016ad83Smrg
46131016ad83Smrg    *nto* | *qnx*)
46141016ad83Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
46151016ad83Smrg      # it will coredump.
46161016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
46171016ad83Smrg      ;;
46181016ad83Smrg
46191016ad83Smrg    sysv4*MP*)
46201016ad83Smrg      if test -d /usr/nec; then
46211016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
46221016ad83Smrg      fi
46231016ad83Smrg      ;;
46241016ad83Smrg
46251016ad83Smrg    *)
46261016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
46271016ad83Smrg      ;;
46281016ad83Smrg    esac
46291016ad83Smrg
46301016ad83Smrg    case $cc_basename in
46311016ad83Smrg    nvcc*) # Cuda Compiler Driver 2.2
46321016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
46331016ad83Smrg      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
46341016ad83Smrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
46351016ad83Smrg      fi
46361016ad83Smrg      ;;
46371016ad83Smrg    esac
46381016ad83Smrg  else
46391016ad83Smrg    # PORTME Check for flag to pass linker flags through the system compiler.
46401016ad83Smrg    case $host_os in
46411016ad83Smrg    aix*)
46421016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
46437204935cSmrg      if test ia64 = "$host_cpu"; then
46441016ad83Smrg	# AIX 5 now supports IA64 processor
46451016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
46461016ad83Smrg      else
46471016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
46481016ad83Smrg      fi
46491016ad83Smrg      ;;
46501016ad83Smrg
46517204935cSmrg    darwin* | rhapsody*)
46527204935cSmrg      # PIC is the default on this platform
46537204935cSmrg      # Common symbols not allowed in MH_DYLIB files
46547204935cSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
46557204935cSmrg      case $cc_basename in
46567204935cSmrg      nagfor*)
46577204935cSmrg        # NAG Fortran compiler
46587204935cSmrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
46597204935cSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
46607204935cSmrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
46617204935cSmrg        ;;
46627204935cSmrg      esac
46637204935cSmrg      ;;
46647204935cSmrg
46651016ad83Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
46661016ad83Smrg      # This hack is so that the source file can tell whether it is being
46671016ad83Smrg      # built for inclusion in a dll (and should export symbols for example).
46681016ad83Smrg      m4_if([$1], [GCJ], [],
46691016ad83Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
46707204935cSmrg      case $host_os in
46717204935cSmrg      os2*)
46727204935cSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
46737204935cSmrg	;;
46747204935cSmrg      esac
46751016ad83Smrg      ;;
46761016ad83Smrg
46771016ad83Smrg    hpux9* | hpux10* | hpux11*)
46781016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
46791016ad83Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
46801016ad83Smrg      # not for PA HP-UX.
46811016ad83Smrg      case $host_cpu in
46821016ad83Smrg      hppa*64*|ia64*)
46831016ad83Smrg	# +Z the default
46841016ad83Smrg	;;
46851016ad83Smrg      *)
46861016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
46871016ad83Smrg	;;
46881016ad83Smrg      esac
46891016ad83Smrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
46907204935cSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
46911016ad83Smrg      ;;
46921016ad83Smrg
46931016ad83Smrg    irix5* | irix6* | nonstopux*)
46941016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
46951016ad83Smrg      # PIC (with -KPIC) is the default.
46961016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
46971016ad83Smrg      ;;
46981016ad83Smrg
46991016ad83Smrg    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
47001016ad83Smrg      case $cc_basename in
47017204935cSmrg      # old Intel for x86_64, which still supported -KPIC.
47021016ad83Smrg      ecc*)
47031016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47041016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
47051016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
47061016ad83Smrg        ;;
47071016ad83Smrg      # icc used to be incompatible with GCC.
47081016ad83Smrg      # ICC 10 doesn't accept -KPIC any more.
47091016ad83Smrg      icc* | ifort*)
47101016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47111016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
47121016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
47131016ad83Smrg        ;;
47141016ad83Smrg      # Lahey Fortran 8.1.
47151016ad83Smrg      lf95*)
47161016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47171016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
47181016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
47191016ad83Smrg	;;
47201016ad83Smrg      nagfor*)
47211016ad83Smrg	# NAG Fortran compiler
47221016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
47231016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
47241016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47251016ad83Smrg	;;
47267204935cSmrg      tcc*)
47277204935cSmrg	# Fabrice Bellard et al's Tiny C Compiler
47287204935cSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47297204935cSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
47307204935cSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
47317204935cSmrg	;;
47321016ad83Smrg      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
47331016ad83Smrg        # Portland Group compilers (*not* the Pentium gcc compiler,
47341016ad83Smrg	# which looks to be a dead project)
47351016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47361016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
47371016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47381016ad83Smrg        ;;
47391016ad83Smrg      ccc*)
47401016ad83Smrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47411016ad83Smrg        # All Alpha code is PIC.
47421016ad83Smrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
47431016ad83Smrg        ;;
47441016ad83Smrg      xl* | bgxl* | bgf* | mpixl*)
47451016ad83Smrg	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
47461016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47471016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
47481016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
47491016ad83Smrg	;;
47501016ad83Smrg      *)
47511016ad83Smrg	case `$CC -V 2>&1 | sed 5q` in
47521016ad83Smrg	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
47531016ad83Smrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
47541016ad83Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
47551016ad83Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47561016ad83Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
47571016ad83Smrg	  ;;
47581016ad83Smrg	*Sun\ F* | *Sun*Fortran*)
47591016ad83Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
47601016ad83Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47611016ad83Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
47621016ad83Smrg	  ;;
47631016ad83Smrg	*Sun\ C*)
47641016ad83Smrg	  # Sun C 5.9
47651016ad83Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
47661016ad83Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47671016ad83Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47681016ad83Smrg	  ;;
47691016ad83Smrg        *Intel*\ [[CF]]*Compiler*)
47701016ad83Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47711016ad83Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
47721016ad83Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
47731016ad83Smrg	  ;;
47741016ad83Smrg	*Portland\ Group*)
47751016ad83Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47761016ad83Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
47771016ad83Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47781016ad83Smrg	  ;;
47791016ad83Smrg	esac
47801016ad83Smrg	;;
47811016ad83Smrg      esac
47821016ad83Smrg      ;;
47831016ad83Smrg
47841016ad83Smrg    newsos6)
47851016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
47861016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47871016ad83Smrg      ;;
47881016ad83Smrg
47891016ad83Smrg    *nto* | *qnx*)
47901016ad83Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
47911016ad83Smrg      # it will coredump.
47921016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
47931016ad83Smrg      ;;
47941016ad83Smrg
47951016ad83Smrg    osf3* | osf4* | osf5*)
47961016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47971016ad83Smrg      # All OSF/1 code is PIC.
47981016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
47991016ad83Smrg      ;;
48001016ad83Smrg
48011016ad83Smrg    rdos*)
48021016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
48031016ad83Smrg      ;;
48041016ad83Smrg
48051016ad83Smrg    solaris*)
48061016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
48071016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48081016ad83Smrg      case $cc_basename in
48091016ad83Smrg      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
48101016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
48111016ad83Smrg      *)
48121016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
48131016ad83Smrg      esac
48141016ad83Smrg      ;;
48151016ad83Smrg
48161016ad83Smrg    sunos4*)
48171016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
48181016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
48191016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48201016ad83Smrg      ;;
48211016ad83Smrg
48221016ad83Smrg    sysv4 | sysv4.2uw2* | sysv4.3*)
48231016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
48241016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
48251016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48261016ad83Smrg      ;;
48271016ad83Smrg
48281016ad83Smrg    sysv4*MP*)
48297204935cSmrg      if test -d /usr/nec; then
48301016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
48311016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48321016ad83Smrg      fi
48331016ad83Smrg      ;;
48341016ad83Smrg
48351016ad83Smrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
48361016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
48371016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
48381016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48391016ad83Smrg      ;;
48401016ad83Smrg
48411016ad83Smrg    unicos*)
48421016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
48431016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
48441016ad83Smrg      ;;
48451016ad83Smrg
48461016ad83Smrg    uts4*)
48471016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
48481016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48491016ad83Smrg      ;;
48501016ad83Smrg
48511016ad83Smrg    *)
48521016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
48531016ad83Smrg      ;;
48541016ad83Smrg    esac
48551016ad83Smrg  fi
48561016ad83Smrg])
48571016ad83Smrgcase $host_os in
48587204935cSmrg  # For platforms that do not support PIC, -DPIC is meaningless:
48591016ad83Smrg  *djgpp*)
48601016ad83Smrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
48611016ad83Smrg    ;;
48621016ad83Smrg  *)
48631016ad83Smrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
48641016ad83Smrg    ;;
48651016ad83Smrgesac
48661016ad83Smrg
48671016ad83SmrgAC_CACHE_CHECK([for $compiler option to produce PIC],
48681016ad83Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
48691016ad83Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
48701016ad83Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
48711016ad83Smrg
48721016ad83Smrg#
48731016ad83Smrg# Check to make sure the PIC flag actually works.
48741016ad83Smrg#
48751016ad83Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
48761016ad83Smrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
48771016ad83Smrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
48781016ad83Smrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
48791016ad83Smrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
48801016ad83Smrg     "" | " "*) ;;
48811016ad83Smrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
48821016ad83Smrg     esac],
48831016ad83Smrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
48841016ad83Smrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
48851016ad83Smrgfi
48861016ad83Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
48871016ad83Smrg	[Additional compiler flags for building library objects])
48881016ad83Smrg
48891016ad83Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
48901016ad83Smrg	[How to pass a linker flag through the compiler])
48911016ad83Smrg#
48921016ad83Smrg# Check to make sure the static flag actually works.
48931016ad83Smrg#
48941016ad83Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
48951016ad83Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
48961016ad83Smrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
48971016ad83Smrg  $lt_tmp_static_flag,
48981016ad83Smrg  [],
48991016ad83Smrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
49001016ad83Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
49011016ad83Smrg	[Compiler flag to prevent dynamic linking])
49021016ad83Smrg])# _LT_COMPILER_PIC
49031016ad83Smrg
49041016ad83Smrg
49051016ad83Smrg# _LT_LINKER_SHLIBS([TAGNAME])
49061016ad83Smrg# ----------------------------
49071016ad83Smrg# See if the linker supports building shared libraries.
49081016ad83Smrgm4_defun([_LT_LINKER_SHLIBS],
49091016ad83Smrg[AC_REQUIRE([LT_PATH_LD])dnl
49101016ad83SmrgAC_REQUIRE([LT_PATH_NM])dnl
49111016ad83Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
49121016ad83Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
49131016ad83Smrgm4_require([_LT_DECL_EGREP])dnl
49141016ad83Smrgm4_require([_LT_DECL_SED])dnl
49151016ad83Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
49161016ad83Smrgm4_require([_LT_TAG_COMPILER])dnl
49171016ad83SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
49181016ad83Smrgm4_if([$1], [CXX], [
49191016ad83Smrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
49201016ad83Smrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
49211016ad83Smrg  case $host_os in
49221016ad83Smrg  aix[[4-9]]*)
49231016ad83Smrg    # If we're using GNU nm, then we don't want the "-C" option.
49247204935cSmrg    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
49257204935cSmrg    # Without the "-l" option, or with the "-B" option, AIX nm treats
49267204935cSmrg    # weak defined symbols like other global defined symbols, whereas
49277204935cSmrg    # GNU nm marks them as "W".
49287204935cSmrg    # While the 'weak' keyword is ignored in the Export File, we need
49297204935cSmrg    # it in the Import File for the 'aix-soname' feature, so we have
49307204935cSmrg    # to replace the "-B" option with "-P" for AIX nm.
49311016ad83Smrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
49327204935cSmrg      _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'
49331016ad83Smrg    else
49347204935cSmrg      _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 == "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'
49351016ad83Smrg    fi
49361016ad83Smrg    ;;
49371016ad83Smrg  pw32*)
49387204935cSmrg    _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
49391016ad83Smrg    ;;
49401016ad83Smrg  cygwin* | mingw* | cegcc*)
49411016ad83Smrg    case $cc_basename in
49421016ad83Smrg    cl*)
49431016ad83Smrg      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
49441016ad83Smrg      ;;
49451016ad83Smrg    *)
49461016ad83Smrg      _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'
49471016ad83Smrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
49481016ad83Smrg      ;;
49491016ad83Smrg    esac
49501016ad83Smrg    ;;
49511016ad83Smrg  linux* | k*bsd*-gnu | gnu*)
49521016ad83Smrg    _LT_TAGVAR(link_all_deplibs, $1)=no
49531016ad83Smrg    ;;
49541016ad83Smrg  *)
49551016ad83Smrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
49561016ad83Smrg    ;;
49571016ad83Smrg  esac
49581016ad83Smrg], [
49591016ad83Smrg  runpath_var=
49601016ad83Smrg  _LT_TAGVAR(allow_undefined_flag, $1)=
49611016ad83Smrg  _LT_TAGVAR(always_export_symbols, $1)=no
49621016ad83Smrg  _LT_TAGVAR(archive_cmds, $1)=
49631016ad83Smrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
49641016ad83Smrg  _LT_TAGVAR(compiler_needs_object, $1)=no
49651016ad83Smrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
49661016ad83Smrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
49671016ad83Smrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
49681016ad83Smrg  _LT_TAGVAR(hardcode_automatic, $1)=no
49691016ad83Smrg  _LT_TAGVAR(hardcode_direct, $1)=no
49701016ad83Smrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
49711016ad83Smrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
49721016ad83Smrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
49731016ad83Smrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
49741016ad83Smrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
49751016ad83Smrg  _LT_TAGVAR(inherit_rpath, $1)=no
49761016ad83Smrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
49771016ad83Smrg  _LT_TAGVAR(module_cmds, $1)=
49781016ad83Smrg  _LT_TAGVAR(module_expsym_cmds, $1)=
49791016ad83Smrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
49801016ad83Smrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
49811016ad83Smrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
49821016ad83Smrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
49831016ad83Smrg  # include_expsyms should be a list of space-separated symbols to be *always*
49841016ad83Smrg  # included in the symbol list
49851016ad83Smrg  _LT_TAGVAR(include_expsyms, $1)=
49861016ad83Smrg  # exclude_expsyms can be an extended regexp of symbols to exclude
49877204935cSmrg  # it will be wrapped by ' (' and ')$', so one must not match beginning or
49887204935cSmrg  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
49897204935cSmrg  # as well as any symbol that contains 'd'.
49901016ad83Smrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
49911016ad83Smrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
49921016ad83Smrg  # platforms (ab)use it in PIC code, but their linkers get confused if
49931016ad83Smrg  # the symbol is explicitly referenced.  Since portable code cannot
49941016ad83Smrg  # rely on this symbol name, it's probably fine to never include it in
49951016ad83Smrg  # preloaded symbol tables.
49961016ad83Smrg  # Exclude shared library initialization/finalization symbols.
49971016ad83Smrgdnl Note also adjust exclude_expsyms for C++ above.
49981016ad83Smrg  extract_expsyms_cmds=
49991016ad83Smrg
50001016ad83Smrg  case $host_os in
50011016ad83Smrg  cygwin* | mingw* | pw32* | cegcc*)
50021016ad83Smrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
50031016ad83Smrg    # When not using gcc, we currently assume that we are using
50041016ad83Smrg    # Microsoft Visual C++.
50057204935cSmrg    if test yes != "$GCC"; then
50061016ad83Smrg      with_gnu_ld=no
50071016ad83Smrg    fi
50081016ad83Smrg    ;;
50091016ad83Smrg  interix*)
50101016ad83Smrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
50111016ad83Smrg    with_gnu_ld=yes
50121016ad83Smrg    ;;
50137204935cSmrg  openbsd* | bitrig*)
50141016ad83Smrg    with_gnu_ld=no
50151016ad83Smrg    ;;
50161016ad83Smrg  linux* | k*bsd*-gnu | gnu*)
50171016ad83Smrg    _LT_TAGVAR(link_all_deplibs, $1)=no
50181016ad83Smrg    ;;
50191016ad83Smrg  esac
50201016ad83Smrg
50211016ad83Smrg  _LT_TAGVAR(ld_shlibs, $1)=yes
50221016ad83Smrg
50231016ad83Smrg  # On some targets, GNU ld is compatible enough with the native linker
50241016ad83Smrg  # that we're better off using the native interface for both.
50251016ad83Smrg  lt_use_gnu_ld_interface=no
50267204935cSmrg  if test yes = "$with_gnu_ld"; then
50271016ad83Smrg    case $host_os in
50281016ad83Smrg      aix*)
50291016ad83Smrg	# The AIX port of GNU ld has always aspired to compatibility
50301016ad83Smrg	# with the native linker.  However, as the warning in the GNU ld
50311016ad83Smrg	# block says, versions before 2.19.5* couldn't really create working
50321016ad83Smrg	# shared libraries, regardless of the interface used.
50331016ad83Smrg	case `$LD -v 2>&1` in
50341016ad83Smrg	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
50351016ad83Smrg	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
50361016ad83Smrg	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
50371016ad83Smrg	  *)
50381016ad83Smrg	    lt_use_gnu_ld_interface=yes
50391016ad83Smrg	    ;;
50401016ad83Smrg	esac
50411016ad83Smrg	;;
50421016ad83Smrg      *)
50431016ad83Smrg	lt_use_gnu_ld_interface=yes
50441016ad83Smrg	;;
50451016ad83Smrg    esac
50461016ad83Smrg  fi
50471016ad83Smrg
50487204935cSmrg  if test yes = "$lt_use_gnu_ld_interface"; then
50491016ad83Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
50507204935cSmrg    wlarc='$wl'
50511016ad83Smrg
50521016ad83Smrg    # Set some defaults for GNU ld with shared library support. These
50531016ad83Smrg    # are reset later if shared libraries are not supported. Putting them
50541016ad83Smrg    # here allows them to be overridden if necessary.
50551016ad83Smrg    runpath_var=LD_RUN_PATH
50567204935cSmrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
50577204935cSmrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
50581016ad83Smrg    # ancient GNU ld didn't support --whole-archive et. al.
50591016ad83Smrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
50607204935cSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
50611016ad83Smrg    else
50621016ad83Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
50631016ad83Smrg    fi
50641016ad83Smrg    supports_anon_versioning=no
50657204935cSmrg    case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
50661016ad83Smrg      *GNU\ gold*) supports_anon_versioning=yes ;;
50671016ad83Smrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
50681016ad83Smrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
50691016ad83Smrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
50701016ad83Smrg      *\ 2.11.*) ;; # other 2.11 versions
50711016ad83Smrg      *) supports_anon_versioning=yes ;;
50721016ad83Smrg    esac
50731016ad83Smrg
50741016ad83Smrg    # See if GNU ld supports shared libraries.
50751016ad83Smrg    case $host_os in
50761016ad83Smrg    aix[[3-9]]*)
50771016ad83Smrg      # On AIX/PPC, the GNU linker is very broken
50787204935cSmrg      if test ia64 != "$host_cpu"; then
50791016ad83Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
50801016ad83Smrg	cat <<_LT_EOF 1>&2
50811016ad83Smrg
50821016ad83Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported
50831016ad83Smrg*** to be unable to reliably create shared libraries on AIX.
50841016ad83Smrg*** Therefore, libtool is disabling shared libraries support.  If you
50851016ad83Smrg*** really care for shared libraries, you may want to install binutils
50861016ad83Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
50871016ad83Smrg*** You will then need to restart the configuration process.
50881016ad83Smrg
50891016ad83Smrg_LT_EOF
50901016ad83Smrg      fi
50911016ad83Smrg      ;;
50921016ad83Smrg
50931016ad83Smrg    amigaos*)
50941016ad83Smrg      case $host_cpu in
50951016ad83Smrg      powerpc)
50961016ad83Smrg            # see comment about AmigaOS4 .so support
50977204935cSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
50981016ad83Smrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
50991016ad83Smrg        ;;
51001016ad83Smrg      m68k)
51011016ad83Smrg            _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)'
51021016ad83Smrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
51031016ad83Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
51041016ad83Smrg        ;;
51051016ad83Smrg      esac
51061016ad83Smrg      ;;
51071016ad83Smrg
51081016ad83Smrg    beos*)
51091016ad83Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
51101016ad83Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
51111016ad83Smrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
51121016ad83Smrg	# support --undefined.  This deserves some investigation.  FIXME
51137204935cSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
51141016ad83Smrg      else
51151016ad83Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
51161016ad83Smrg      fi
51171016ad83Smrg      ;;
51181016ad83Smrg
51191016ad83Smrg    cygwin* | mingw* | pw32* | cegcc*)
51201016ad83Smrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
51211016ad83Smrg      # as there is no search path for DLLs.
51221016ad83Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
51237204935cSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
51241016ad83Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
51251016ad83Smrg      _LT_TAGVAR(always_export_symbols, $1)=no
51261016ad83Smrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
51271016ad83Smrg      _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'
51281016ad83Smrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
51291016ad83Smrg
51301016ad83Smrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
51317204935cSmrg        _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'
51327204935cSmrg	# If the export-symbols file already is a .def file, use it as
51337204935cSmrg	# is; otherwise, prepend EXPORTS...
51347204935cSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
51357204935cSmrg          cp $export_symbols $output_objdir/$soname.def;
51367204935cSmrg        else
51377204935cSmrg          echo EXPORTS > $output_objdir/$soname.def;
51387204935cSmrg          cat $export_symbols >> $output_objdir/$soname.def;
51397204935cSmrg        fi~
51407204935cSmrg        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
51411016ad83Smrg      else
51421016ad83Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
51431016ad83Smrg      fi
51441016ad83Smrg      ;;
51451016ad83Smrg
51461016ad83Smrg    haiku*)
51477204935cSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
51481016ad83Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
51491016ad83Smrg      ;;
51501016ad83Smrg
51517204935cSmrg    os2*)
51527204935cSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
51537204935cSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
51547204935cSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
51557204935cSmrg      shrext_cmds=.dll
51567204935cSmrg      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
51577204935cSmrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
51587204935cSmrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
51597204935cSmrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
51607204935cSmrg	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
51617204935cSmrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
51627204935cSmrg	emximp -o $lib $output_objdir/$libname.def'
51637204935cSmrg      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
51647204935cSmrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
51657204935cSmrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
51667204935cSmrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
51677204935cSmrg	prefix_cmds="$SED"~
51687204935cSmrg	if test EXPORTS = "`$SED 1q $export_symbols`"; then
51697204935cSmrg	  prefix_cmds="$prefix_cmds -e 1d";
51707204935cSmrg	fi~
51717204935cSmrg	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
51727204935cSmrg	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
51737204935cSmrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
51747204935cSmrg	emximp -o $lib $output_objdir/$libname.def'
51757204935cSmrg      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
51767204935cSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
51777204935cSmrg      ;;
51787204935cSmrg
51791016ad83Smrg    interix[[3-9]]*)
51801016ad83Smrg      _LT_TAGVAR(hardcode_direct, $1)=no
51811016ad83Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
51827204935cSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
51837204935cSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
51841016ad83Smrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
51851016ad83Smrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
51861016ad83Smrg      # default) and relocated if they conflict, which is a slow very memory
51871016ad83Smrg      # consuming and fragmenting process.  To avoid this, we pick a random,
51881016ad83Smrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
51891016ad83Smrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
51907204935cSmrg      _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'
51917204935cSmrg      _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'
51921016ad83Smrg      ;;
51931016ad83Smrg
51941016ad83Smrg    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
51951016ad83Smrg      tmp_diet=no
51967204935cSmrg      if test linux-dietlibc = "$host_os"; then
51971016ad83Smrg	case $cc_basename in
51981016ad83Smrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
51991016ad83Smrg	esac
52001016ad83Smrg      fi
52011016ad83Smrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
52027204935cSmrg	 && test no = "$tmp_diet"
52031016ad83Smrg      then
52041016ad83Smrg	tmp_addflag=' $pic_flag'
52051016ad83Smrg	tmp_sharedflag='-shared'
52061016ad83Smrg	case $cc_basename,$host_cpu in
52071016ad83Smrg        pgcc*)				# Portland Group C compiler
52087204935cSmrg	  _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'
52091016ad83Smrg	  tmp_addflag=' $pic_flag'
52101016ad83Smrg	  ;;
52111016ad83Smrg	pgf77* | pgf90* | pgf95* | pgfortran*)
52121016ad83Smrg					# Portland Group f77 and f90 compilers
52137204935cSmrg	  _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'
52141016ad83Smrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
52151016ad83Smrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
52161016ad83Smrg	  tmp_addflag=' -i_dynamic' ;;
52171016ad83Smrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
52181016ad83Smrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
52191016ad83Smrg	ifc* | ifort*)			# Intel Fortran compiler
52201016ad83Smrg	  tmp_addflag=' -nofor_main' ;;
52211016ad83Smrg	lf95*)				# Lahey Fortran 8.1
52221016ad83Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
52231016ad83Smrg	  tmp_sharedflag='--shared' ;;
52247204935cSmrg        nagfor*)                        # NAGFOR 5.3
52257204935cSmrg          tmp_sharedflag='-Wl,-shared' ;;
52261016ad83Smrg	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
52271016ad83Smrg	  tmp_sharedflag='-qmkshrobj'
52281016ad83Smrg	  tmp_addflag= ;;
52291016ad83Smrg	nvcc*)	# Cuda Compiler Driver 2.2
52307204935cSmrg	  _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'
52311016ad83Smrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
52321016ad83Smrg	  ;;
52331016ad83Smrg	esac
52341016ad83Smrg	case `$CC -V 2>&1 | sed 5q` in
52351016ad83Smrg	*Sun\ C*)			# Sun C 5.9
52367204935cSmrg	  _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'
52371016ad83Smrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
52381016ad83Smrg	  tmp_sharedflag='-G' ;;
52391016ad83Smrg	*Sun\ F*)			# Sun Fortran 8.3
52401016ad83Smrg	  tmp_sharedflag='-G' ;;
52411016ad83Smrg	esac
52427204935cSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
52431016ad83Smrg
52447204935cSmrg        if test yes = "$supports_anon_versioning"; then
52451016ad83Smrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
52467204935cSmrg            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
52477204935cSmrg            echo "local: *; };" >> $output_objdir/$libname.ver~
52487204935cSmrg            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
52491016ad83Smrg        fi
52501016ad83Smrg
52511016ad83Smrg	case $cc_basename in
52527204935cSmrg	tcc*)
52537204935cSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
52547204935cSmrg	  ;;
52551016ad83Smrg	xlf* | bgf* | bgxlf* | mpixlf*)
52561016ad83Smrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
52571016ad83Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
52587204935cSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
52591016ad83Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
52607204935cSmrg	  if test yes = "$supports_anon_versioning"; then
52611016ad83Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
52627204935cSmrg              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
52637204935cSmrg              echo "local: *; };" >> $output_objdir/$libname.ver~
52647204935cSmrg              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
52651016ad83Smrg	  fi
52661016ad83Smrg	  ;;
52671016ad83Smrg	esac
52681016ad83Smrg      else
52691016ad83Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
52701016ad83Smrg      fi
52711016ad83Smrg      ;;
52721016ad83Smrg
52731016ad83Smrg    netbsd* | netbsdelf*-gnu)
52741016ad83Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
52751016ad83Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
52761016ad83Smrg	wlarc=
52771016ad83Smrg      else
52787204935cSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
52797204935cSmrg	_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'
52801016ad83Smrg      fi
52811016ad83Smrg      ;;
52821016ad83Smrg
52831016ad83Smrg    solaris*)
52841016ad83Smrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
52851016ad83Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
52861016ad83Smrg	cat <<_LT_EOF 1>&2
52871016ad83Smrg
52881016ad83Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
52891016ad83Smrg*** create shared libraries on Solaris systems.  Therefore, libtool
52901016ad83Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
52911016ad83Smrg*** binutils to release 2.9.1 or newer.  Another option is to modify
52921016ad83Smrg*** your PATH or compiler configuration so that the native linker is
52931016ad83Smrg*** used, and then restart.
52941016ad83Smrg
52951016ad83Smrg_LT_EOF
52961016ad83Smrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
52977204935cSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
52987204935cSmrg	_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'
52991016ad83Smrg      else
53001016ad83Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
53011016ad83Smrg      fi
53021016ad83Smrg      ;;
53031016ad83Smrg
53041016ad83Smrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
53051016ad83Smrg      case `$LD -v 2>&1` in
53061016ad83Smrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
53071016ad83Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
53081016ad83Smrg	cat <<_LT_EOF 1>&2
53091016ad83Smrg
53107204935cSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
53111016ad83Smrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
53121016ad83Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
53131016ad83Smrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
53141016ad83Smrg*** your PATH or compiler configuration so that the native linker is
53151016ad83Smrg*** used, and then restart.
53161016ad83Smrg
53171016ad83Smrg_LT_EOF
53181016ad83Smrg	;;
53191016ad83Smrg	*)
53201016ad83Smrg	  # For security reasons, it is highly recommended that you always
53211016ad83Smrg	  # use absolute paths for naming shared libraries, and exclude the
53221016ad83Smrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
53231016ad83Smrg	  # requires that you compile everything twice, which is a pain.
53241016ad83Smrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
53257204935cSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
53267204935cSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
53277204935cSmrg	    _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'
53281016ad83Smrg	  else
53291016ad83Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
53301016ad83Smrg	  fi
53311016ad83Smrg	;;
53321016ad83Smrg      esac
53331016ad83Smrg      ;;
53341016ad83Smrg
53351016ad83Smrg    sunos4*)
53361016ad83Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
53371016ad83Smrg      wlarc=
53381016ad83Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
53391016ad83Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
53401016ad83Smrg      ;;
53411016ad83Smrg
53421016ad83Smrg    *)
53431016ad83Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
53447204935cSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
53457204935cSmrg	_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'
53461016ad83Smrg      else
53471016ad83Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
53481016ad83Smrg      fi
53491016ad83Smrg      ;;
53501016ad83Smrg    esac
53511016ad83Smrg
53527204935cSmrg    if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
53531016ad83Smrg      runpath_var=
53541016ad83Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
53551016ad83Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
53561016ad83Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
53571016ad83Smrg    fi
53581016ad83Smrg  else
53591016ad83Smrg    # PORTME fill in a description of your system's linker (not GNU ld)
53601016ad83Smrg    case $host_os in
53611016ad83Smrg    aix3*)
53621016ad83Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
53631016ad83Smrg      _LT_TAGVAR(always_export_symbols, $1)=yes
53641016ad83Smrg      _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'
53651016ad83Smrg      # Note: this linker hardcodes the directories in LIBPATH if there
53661016ad83Smrg      # are no directories specified by -L.
53671016ad83Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
53687204935cSmrg      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
53691016ad83Smrg	# Neither direct hardcoding nor static linking is supported with a
53701016ad83Smrg	# broken collect2.
53711016ad83Smrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
53721016ad83Smrg      fi
53731016ad83Smrg      ;;
53741016ad83Smrg
53751016ad83Smrg    aix[[4-9]]*)
53767204935cSmrg      if test ia64 = "$host_cpu"; then
53771016ad83Smrg	# On IA64, the linker does run time linking by default, so we don't
53781016ad83Smrg	# have to do anything special.
53791016ad83Smrg	aix_use_runtimelinking=no
53801016ad83Smrg	exp_sym_flag='-Bexport'
53817204935cSmrg	no_entry_flag=
53821016ad83Smrg      else
53831016ad83Smrg	# If we're using GNU nm, then we don't want the "-C" option.
53847204935cSmrg	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
53857204935cSmrg	# Without the "-l" option, or with the "-B" option, AIX nm treats
53867204935cSmrg	# weak defined symbols like other global defined symbols, whereas
53877204935cSmrg	# GNU nm marks them as "W".
53887204935cSmrg	# While the 'weak' keyword is ignored in the Export File, we need
53897204935cSmrg	# it in the Import File for the 'aix-soname' feature, so we have
53907204935cSmrg	# to replace the "-B" option with "-P" for AIX nm.
53911016ad83Smrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
53927204935cSmrg	  _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'
53931016ad83Smrg	else
53947204935cSmrg	  _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 == "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'
53951016ad83Smrg	fi
53961016ad83Smrg	aix_use_runtimelinking=no
53971016ad83Smrg
53981016ad83Smrg	# Test if we are trying to use run time linking or normal
53991016ad83Smrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
54007204935cSmrg	# have runtime linking enabled, and use it for executables.
54017204935cSmrg	# For shared libraries, we enable/disable runtime linking
54027204935cSmrg	# depending on the kind of the shared library created -
54037204935cSmrg	# when "with_aix_soname,aix_use_runtimelinking" is:
54047204935cSmrg	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
54057204935cSmrg	# "aix,yes"  lib.so          shared, rtl:yes, for executables
54067204935cSmrg	#            lib.a           static archive
54077204935cSmrg	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
54087204935cSmrg	#            lib.a(lib.so.V) shared, rtl:no,  for executables
54097204935cSmrg	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
54107204935cSmrg	#            lib.a(lib.so.V) shared, rtl:no
54117204935cSmrg	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
54127204935cSmrg	#            lib.a           static archive
54131016ad83Smrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
54141016ad83Smrg	  for ld_flag in $LDFLAGS; do
54157204935cSmrg	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
54161016ad83Smrg	    aix_use_runtimelinking=yes
54171016ad83Smrg	    break
54181016ad83Smrg	  fi
54191016ad83Smrg	  done
54207204935cSmrg	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
54217204935cSmrg	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
54227204935cSmrg	    # so we don't have lib.a shared libs to link our executables.
54237204935cSmrg	    # We have to force runtime linking in this case.
54247204935cSmrg	    aix_use_runtimelinking=yes
54257204935cSmrg	    LDFLAGS="$LDFLAGS -Wl,-brtl"
54267204935cSmrg	  fi
54271016ad83Smrg	  ;;
54281016ad83Smrg	esac
54291016ad83Smrg
54301016ad83Smrg	exp_sym_flag='-bexport'
54311016ad83Smrg	no_entry_flag='-bnoentry'
54321016ad83Smrg      fi
54331016ad83Smrg
54341016ad83Smrg      # When large executables or shared objects are built, AIX ld can
54351016ad83Smrg      # have problems creating the table of contents.  If linking a library
54361016ad83Smrg      # or program results in "error TOC overflow" add -mminimal-toc to
54371016ad83Smrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
54381016ad83Smrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
54391016ad83Smrg
54401016ad83Smrg      _LT_TAGVAR(archive_cmds, $1)=''
54411016ad83Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
54421016ad83Smrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
54431016ad83Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
54441016ad83Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
54457204935cSmrg      _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
54467204935cSmrg      case $with_aix_soname,$aix_use_runtimelinking in
54477204935cSmrg      aix,*) ;; # traditional, no import file
54487204935cSmrg      svr4,* | *,yes) # use import file
54497204935cSmrg	# The Import File defines what to hardcode.
54507204935cSmrg	_LT_TAGVAR(hardcode_direct, $1)=no
54517204935cSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=no
54527204935cSmrg	;;
54537204935cSmrg      esac
54541016ad83Smrg
54557204935cSmrg      if test yes = "$GCC"; then
54561016ad83Smrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
54571016ad83Smrg	# We only want to do this on AIX 4.2 and lower, the check
54581016ad83Smrg	# below for broken collect2 doesn't work under 4.3+
54597204935cSmrg	  collect2name=`$CC -print-prog-name=collect2`
54601016ad83Smrg	  if test -f "$collect2name" &&
54611016ad83Smrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
54621016ad83Smrg	  then
54631016ad83Smrg	  # We have reworked collect2
54641016ad83Smrg	  :
54651016ad83Smrg	  else
54661016ad83Smrg	  # We have old collect2
54671016ad83Smrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
54681016ad83Smrg	  # It fails to find uninstalled libraries when the uninstalled
54691016ad83Smrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
54701016ad83Smrg	  # to unsupported forces relinking
54711016ad83Smrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
54721016ad83Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
54731016ad83Smrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
54741016ad83Smrg	  fi
54751016ad83Smrg	  ;;
54761016ad83Smrg	esac
54771016ad83Smrg	shared_flag='-shared'
54787204935cSmrg	if test yes = "$aix_use_runtimelinking"; then
54797204935cSmrg	  shared_flag="$shared_flag "'$wl-G'
54801016ad83Smrg	fi
54817204935cSmrg	# Need to ensure runtime linking is disabled for the traditional
54827204935cSmrg	# shared library, or the linker may eventually find shared libraries
54837204935cSmrg	# /with/ Import File - we do not want to mix them.
54847204935cSmrg	shared_flag_aix='-shared'
54857204935cSmrg	shared_flag_svr4='-shared $wl-G'
54861016ad83Smrg      else
54871016ad83Smrg	# not using gcc
54887204935cSmrg	if test ia64 = "$host_cpu"; then
54891016ad83Smrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
54901016ad83Smrg	# chokes on -Wl,-G. The following line is correct:
54911016ad83Smrg	  shared_flag='-G'
54921016ad83Smrg	else
54937204935cSmrg	  if test yes = "$aix_use_runtimelinking"; then
54947204935cSmrg	    shared_flag='$wl-G'
54951016ad83Smrg	  else
54967204935cSmrg	    shared_flag='$wl-bM:SRE'
54971016ad83Smrg	  fi
54987204935cSmrg	  shared_flag_aix='$wl-bM:SRE'
54997204935cSmrg	  shared_flag_svr4='$wl-G'
55001016ad83Smrg	fi
55011016ad83Smrg      fi
55021016ad83Smrg
55037204935cSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
55041016ad83Smrg      # It seems that -bexpall does not export symbols beginning with
55051016ad83Smrg      # underscore (_), so it is better to generate a list of symbols to export.
55061016ad83Smrg      _LT_TAGVAR(always_export_symbols, $1)=yes
55077204935cSmrg      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
55081016ad83Smrg	# Warning - without using the other runtime loading flags (-brtl),
55091016ad83Smrg	# -berok will link without error, but may produce a broken library.
55101016ad83Smrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
55111016ad83Smrg        # Determine the default libpath from the value encoded in an
55121016ad83Smrg        # empty executable.
55131016ad83Smrg        _LT_SYS_MODULE_PATH_AIX([$1])
55147204935cSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
55157204935cSmrg        _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
55161016ad83Smrg      else
55177204935cSmrg	if test ia64 = "$host_cpu"; then
55187204935cSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
55191016ad83Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
55207204935cSmrg	  _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"
55211016ad83Smrg	else
55221016ad83Smrg	 # Determine the default libpath from the value encoded in an
55231016ad83Smrg	 # empty executable.
55241016ad83Smrg	 _LT_SYS_MODULE_PATH_AIX([$1])
55257204935cSmrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
55261016ad83Smrg	  # Warning - without using the other run time loading flags,
55271016ad83Smrg	  # -berok will link without error, but may produce a broken library.
55287204935cSmrg	  _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
55297204935cSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
55307204935cSmrg	  if test yes = "$with_gnu_ld"; then
55311016ad83Smrg	    # We only use this code for GNU lds that support --whole-archive.
55327204935cSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
55331016ad83Smrg	  else
55341016ad83Smrg	    # Exported symbols can be pulled into shared objects from archives
55351016ad83Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
55361016ad83Smrg	  fi
55371016ad83Smrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
55387204935cSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
55397204935cSmrg	  # -brtl affects multiple linker settings, -berok does not and is overridden later
55407204935cSmrg	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
55417204935cSmrg	  if test svr4 != "$with_aix_soname"; then
55427204935cSmrg	    # This is similar to how AIX traditionally builds its shared libraries.
55437204935cSmrg	    _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'
55447204935cSmrg	  fi
55457204935cSmrg	  if test aix != "$with_aix_soname"; then
55467204935cSmrg	    _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'
55477204935cSmrg	  else
55487204935cSmrg	    # used by -dlpreopen to get the symbols
55497204935cSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
55507204935cSmrg	  fi
55517204935cSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
55521016ad83Smrg	fi
55531016ad83Smrg      fi
55541016ad83Smrg      ;;
55551016ad83Smrg
55561016ad83Smrg    amigaos*)
55571016ad83Smrg      case $host_cpu in
55581016ad83Smrg      powerpc)
55591016ad83Smrg            # see comment about AmigaOS4 .so support
55607204935cSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
55611016ad83Smrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
55621016ad83Smrg        ;;
55631016ad83Smrg      m68k)
55641016ad83Smrg            _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)'
55651016ad83Smrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
55661016ad83Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
55671016ad83Smrg        ;;
55681016ad83Smrg      esac
55691016ad83Smrg      ;;
55701016ad83Smrg
55711016ad83Smrg    bsdi[[45]]*)
55721016ad83Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
55731016ad83Smrg      ;;
55741016ad83Smrg
55751016ad83Smrg    cygwin* | mingw* | pw32* | cegcc*)
55761016ad83Smrg      # When not using gcc, we currently assume that we are using
55771016ad83Smrg      # Microsoft Visual C++.
55781016ad83Smrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
55791016ad83Smrg      # no search path for DLLs.
55801016ad83Smrg      case $cc_basename in
55811016ad83Smrg      cl*)
55821016ad83Smrg	# Native MSVC
55831016ad83Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
55841016ad83Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
55851016ad83Smrg	_LT_TAGVAR(always_export_symbols, $1)=yes
55861016ad83Smrg	_LT_TAGVAR(file_list_spec, $1)='@'
55871016ad83Smrg	# Tell ltmain to make .lib files, not .a files.
55881016ad83Smrg	libext=lib
55891016ad83Smrg	# Tell ltmain to make .dll files, not .so files.
55907204935cSmrg	shrext_cmds=.dll
55911016ad83Smrg	# FIXME: Setting linknames here is a bad hack.
55927204935cSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
55937204935cSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
55947204935cSmrg            cp "$export_symbols" "$output_objdir/$soname.def";
55957204935cSmrg            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
55967204935cSmrg          else
55977204935cSmrg            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
55987204935cSmrg          fi~
55997204935cSmrg          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
56007204935cSmrg          linknames='
56011016ad83Smrg	# The linker will not automatically build a static lib if we build a DLL.
56021016ad83Smrg	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
56031016ad83Smrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
56041016ad83Smrg	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
56051016ad83Smrg	_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'
56061016ad83Smrg	# Don't use ranlib
56071016ad83Smrg	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
56081016ad83Smrg	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
56097204935cSmrg          lt_tool_outputfile="@TOOL_OUTPUT@"~
56107204935cSmrg          case $lt_outputfile in
56117204935cSmrg            *.exe|*.EXE) ;;
56127204935cSmrg            *)
56137204935cSmrg              lt_outputfile=$lt_outputfile.exe
56147204935cSmrg              lt_tool_outputfile=$lt_tool_outputfile.exe
56157204935cSmrg              ;;
56167204935cSmrg          esac~
56177204935cSmrg          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
56187204935cSmrg            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
56197204935cSmrg            $RM "$lt_outputfile.manifest";
56207204935cSmrg          fi'
56211016ad83Smrg	;;
56221016ad83Smrg      *)
56231016ad83Smrg	# Assume MSVC wrapper
56241016ad83Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
56251016ad83Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
56261016ad83Smrg	# Tell ltmain to make .lib files, not .a files.
56271016ad83Smrg	libext=lib
56281016ad83Smrg	# Tell ltmain to make .dll files, not .so files.
56297204935cSmrg	shrext_cmds=.dll
56301016ad83Smrg	# FIXME: Setting linknames here is a bad hack.
56311016ad83Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
56321016ad83Smrg	# The linker will automatically build a .lib file if we build a DLL.
56331016ad83Smrg	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
56341016ad83Smrg	# FIXME: Should let the user specify the lib program.
56351016ad83Smrg	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
56361016ad83Smrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
56371016ad83Smrg	;;
56381016ad83Smrg      esac
56391016ad83Smrg      ;;
56401016ad83Smrg
56411016ad83Smrg    darwin* | rhapsody*)
56421016ad83Smrg      _LT_DARWIN_LINKER_FEATURES($1)
56431016ad83Smrg      ;;
56441016ad83Smrg
56451016ad83Smrg    dgux*)
56461016ad83Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
56471016ad83Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
56481016ad83Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
56491016ad83Smrg      ;;
56501016ad83Smrg
56511016ad83Smrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
56521016ad83Smrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
56531016ad83Smrg    # does not break anything, and helps significantly (at the cost of a little
56541016ad83Smrg    # extra space).
56551016ad83Smrg    freebsd2.2*)
56561016ad83Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
56571016ad83Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
56581016ad83Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
56591016ad83Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
56601016ad83Smrg      ;;
56611016ad83Smrg
56621016ad83Smrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
56631016ad83Smrg    freebsd2.*)
56641016ad83Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
56651016ad83Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
56661016ad83Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
56671016ad83Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
56681016ad83Smrg      ;;
56691016ad83Smrg
56701016ad83Smrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
56711016ad83Smrg    freebsd* | dragonfly*)
56721016ad83Smrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
56731016ad83Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
56741016ad83Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
56751016ad83Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
56761016ad83Smrg      ;;
56771016ad83Smrg
56781016ad83Smrg    hpux9*)
56797204935cSmrg      if test yes = "$GCC"; then
56807204935cSmrg	_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'
56811016ad83Smrg      else
56827204935cSmrg	_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'
56831016ad83Smrg      fi
56847204935cSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
56851016ad83Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
56861016ad83Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
56871016ad83Smrg
56881016ad83Smrg      # hardcode_minus_L: Not really in the search PATH,
56891016ad83Smrg      # but as the default location of the library.
56901016ad83Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
56917204935cSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
56921016ad83Smrg      ;;
56931016ad83Smrg
56941016ad83Smrg    hpux10*)
56957204935cSmrg      if test yes,no = "$GCC,$with_gnu_ld"; then
56967204935cSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
56971016ad83Smrg      else
56981016ad83Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
56991016ad83Smrg      fi
57007204935cSmrg      if test no = "$with_gnu_ld"; then
57017204935cSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
57021016ad83Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
57031016ad83Smrg	_LT_TAGVAR(hardcode_direct, $1)=yes
57041016ad83Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
57057204935cSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
57061016ad83Smrg	# hardcode_minus_L: Not really in the search PATH,
57071016ad83Smrg	# but as the default location of the library.
57081016ad83Smrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
57091016ad83Smrg      fi
57101016ad83Smrg      ;;
57111016ad83Smrg
57121016ad83Smrg    hpux11*)
57137204935cSmrg      if test yes,no = "$GCC,$with_gnu_ld"; then
57141016ad83Smrg	case $host_cpu in
57151016ad83Smrg	hppa*64*)
57167204935cSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
57171016ad83Smrg	  ;;
57181016ad83Smrg	ia64*)
57197204935cSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
57201016ad83Smrg	  ;;
57211016ad83Smrg	*)
57227204935cSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
57231016ad83Smrg	  ;;
57241016ad83Smrg	esac
57251016ad83Smrg      else
57261016ad83Smrg	case $host_cpu in
57271016ad83Smrg	hppa*64*)
57287204935cSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
57291016ad83Smrg	  ;;
57301016ad83Smrg	ia64*)
57317204935cSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
57321016ad83Smrg	  ;;
57331016ad83Smrg	*)
57341016ad83Smrg	m4_if($1, [], [
57351016ad83Smrg	  # Older versions of the 11.00 compiler do not understand -b yet
57361016ad83Smrg	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
57371016ad83Smrg	  _LT_LINKER_OPTION([if $CC understands -b],
57381016ad83Smrg	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
57397204935cSmrg	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
57401016ad83Smrg	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
57417204935cSmrg	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
57421016ad83Smrg	  ;;
57431016ad83Smrg	esac
57441016ad83Smrg      fi
57457204935cSmrg      if test no = "$with_gnu_ld"; then
57467204935cSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
57471016ad83Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
57481016ad83Smrg
57491016ad83Smrg	case $host_cpu in
57501016ad83Smrg	hppa*64*|ia64*)
57511016ad83Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no
57521016ad83Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
57531016ad83Smrg	  ;;
57541016ad83Smrg	*)
57551016ad83Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
57561016ad83Smrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
57577204935cSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
57581016ad83Smrg
57591016ad83Smrg	  # hardcode_minus_L: Not really in the search PATH,
57601016ad83Smrg	  # but as the default location of the library.
57611016ad83Smrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
57621016ad83Smrg	  ;;
57631016ad83Smrg	esac
57641016ad83Smrg      fi
57651016ad83Smrg      ;;
57661016ad83Smrg
57671016ad83Smrg    irix5* | irix6* | nonstopux*)
57687204935cSmrg      if test yes = "$GCC"; then
57697204935cSmrg	_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'
57701016ad83Smrg	# Try to use the -exported_symbol ld option, if it does not
57711016ad83Smrg	# work, assume that -exports_file does not work either and
57721016ad83Smrg	# implicitly export all symbols.
57731016ad83Smrg	# This should be the same for all languages, so no per-tag cache variable.
57741016ad83Smrg	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
57751016ad83Smrg	  [lt_cv_irix_exported_symbol],
57767204935cSmrg	  [save_LDFLAGS=$LDFLAGS
57777204935cSmrg	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
57781016ad83Smrg	   AC_LINK_IFELSE(
57791016ad83Smrg	     [AC_LANG_SOURCE(
57801016ad83Smrg	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
57811016ad83Smrg			      [C++], [[int foo (void) { return 0; }]],
57821016ad83Smrg			      [Fortran 77], [[
57831016ad83Smrg      subroutine foo
57841016ad83Smrg      end]],
57851016ad83Smrg			      [Fortran], [[
57861016ad83Smrg      subroutine foo
57871016ad83Smrg      end]])])],
57881016ad83Smrg	      [lt_cv_irix_exported_symbol=yes],
57891016ad83Smrg	      [lt_cv_irix_exported_symbol=no])
57907204935cSmrg           LDFLAGS=$save_LDFLAGS])
57917204935cSmrg	if test yes = "$lt_cv_irix_exported_symbol"; then
57927204935cSmrg          _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'
57931016ad83Smrg	fi
57947204935cSmrg	_LT_TAGVAR(link_all_deplibs, $1)=no
57951016ad83Smrg      else
57967204935cSmrg	_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'
57977204935cSmrg	_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'
57981016ad83Smrg      fi
57991016ad83Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
58007204935cSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
58011016ad83Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
58021016ad83Smrg      _LT_TAGVAR(inherit_rpath, $1)=yes
58031016ad83Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
58041016ad83Smrg      ;;
58051016ad83Smrg
58067204935cSmrg    linux*)
58077204935cSmrg      case $cc_basename in
58087204935cSmrg      tcc*)
58097204935cSmrg	# Fabrice Bellard et al's Tiny C Compiler
58107204935cSmrg	_LT_TAGVAR(ld_shlibs, $1)=yes
58117204935cSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
58127204935cSmrg	;;
58137204935cSmrg      esac
58147204935cSmrg      ;;
58157204935cSmrg
58161016ad83Smrg    netbsd* | netbsdelf*-gnu)
58171016ad83Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
58181016ad83Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
58191016ad83Smrg      else
58201016ad83Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
58211016ad83Smrg      fi
58221016ad83Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
58231016ad83Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
58241016ad83Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
58251016ad83Smrg      ;;
58261016ad83Smrg
58271016ad83Smrg    newsos6)
58281016ad83Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
58291016ad83Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
58307204935cSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
58311016ad83Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
58321016ad83Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
58331016ad83Smrg      ;;
58341016ad83Smrg
58351016ad83Smrg    *nto* | *qnx*)
58361016ad83Smrg      ;;
58371016ad83Smrg
58387204935cSmrg    openbsd* | bitrig*)
58391016ad83Smrg      if test -f /usr/libexec/ld.so; then
58401016ad83Smrg	_LT_TAGVAR(hardcode_direct, $1)=yes
58411016ad83Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
58421016ad83Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
58437204935cSmrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
58441016ad83Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
58457204935cSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
58467204935cSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
58477204935cSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
58481016ad83Smrg	else
58497204935cSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
58507204935cSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
58511016ad83Smrg	fi
58521016ad83Smrg      else
58531016ad83Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
58541016ad83Smrg      fi
58551016ad83Smrg      ;;
58561016ad83Smrg
58571016ad83Smrg    os2*)
58581016ad83Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
58591016ad83Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
58601016ad83Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
58617204935cSmrg      shrext_cmds=.dll
58627204935cSmrg      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
58637204935cSmrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
58647204935cSmrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
58657204935cSmrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
58667204935cSmrg	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
58677204935cSmrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
58687204935cSmrg	emximp -o $lib $output_objdir/$libname.def'
58697204935cSmrg      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
58707204935cSmrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
58717204935cSmrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
58727204935cSmrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
58737204935cSmrg	prefix_cmds="$SED"~
58747204935cSmrg	if test EXPORTS = "`$SED 1q $export_symbols`"; then
58757204935cSmrg	  prefix_cmds="$prefix_cmds -e 1d";
58767204935cSmrg	fi~
58777204935cSmrg	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
58787204935cSmrg	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
58797204935cSmrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
58807204935cSmrg	emximp -o $lib $output_objdir/$libname.def'
58817204935cSmrg      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
58827204935cSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
58831016ad83Smrg      ;;
58841016ad83Smrg
58851016ad83Smrg    osf3*)
58867204935cSmrg      if test yes = "$GCC"; then
58877204935cSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
58887204935cSmrg	_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'
58891016ad83Smrg      else
58901016ad83Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
58917204935cSmrg	_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'
58921016ad83Smrg      fi
58931016ad83Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
58947204935cSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
58951016ad83Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
58961016ad83Smrg      ;;
58971016ad83Smrg
58981016ad83Smrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
58997204935cSmrg      if test yes = "$GCC"; then
59007204935cSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
59017204935cSmrg	_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'
59027204935cSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
59031016ad83Smrg      else
59041016ad83Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
59057204935cSmrg	_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'
59061016ad83Smrg	_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~
59077204935cSmrg          $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'
59081016ad83Smrg
59091016ad83Smrg	# Both c and cxx compiler support -rpath directly
59101016ad83Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
59111016ad83Smrg      fi
59121016ad83Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
59131016ad83Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
59141016ad83Smrg      ;;
59151016ad83Smrg
59161016ad83Smrg    solaris*)
59171016ad83Smrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
59187204935cSmrg      if test yes = "$GCC"; then
59197204935cSmrg	wlarc='$wl'
59207204935cSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
59211016ad83Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
59227204935cSmrg          $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'
59231016ad83Smrg      else
59241016ad83Smrg	case `$CC -V 2>&1` in
59251016ad83Smrg	*"Compilers 5.0"*)
59261016ad83Smrg	  wlarc=''
59277204935cSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
59281016ad83Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
59297204935cSmrg            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
59301016ad83Smrg	  ;;
59311016ad83Smrg	*)
59327204935cSmrg	  wlarc='$wl'
59337204935cSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
59341016ad83Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
59357204935cSmrg            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
59361016ad83Smrg	  ;;
59371016ad83Smrg	esac
59381016ad83Smrg      fi
59391016ad83Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
59401016ad83Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
59411016ad83Smrg      case $host_os in
59421016ad83Smrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
59431016ad83Smrg      *)
59441016ad83Smrg	# The compiler driver will combine and reorder linker options,
59457204935cSmrg	# but understands '-z linker_flag'.  GCC discards it without '$wl',
59461016ad83Smrg	# but is careful enough not to reorder.
59471016ad83Smrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
59487204935cSmrg	if test yes = "$GCC"; then
59497204935cSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
59501016ad83Smrg	else
59511016ad83Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
59521016ad83Smrg	fi
59531016ad83Smrg	;;
59541016ad83Smrg      esac
59551016ad83Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
59561016ad83Smrg      ;;
59571016ad83Smrg
59581016ad83Smrg    sunos4*)
59597204935cSmrg      if test sequent = "$host_vendor"; then
59601016ad83Smrg	# Use $CC to link under sequent, because it throws in some extra .o
59611016ad83Smrg	# files that make .init and .fini sections work.
59627204935cSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
59631016ad83Smrg      else
59641016ad83Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
59651016ad83Smrg      fi
59661016ad83Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
59671016ad83Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
59681016ad83Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
59691016ad83Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
59701016ad83Smrg      ;;
59711016ad83Smrg
59721016ad83Smrg    sysv4)
59731016ad83Smrg      case $host_vendor in
59741016ad83Smrg	sni)
59751016ad83Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
59761016ad83Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
59771016ad83Smrg	;;
59781016ad83Smrg	siemens)
59791016ad83Smrg	  ## LD is ld it makes a PLAMLIB
59801016ad83Smrg	  ## CC just makes a GrossModule.
59811016ad83Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
59821016ad83Smrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
59831016ad83Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no
59841016ad83Smrg        ;;
59851016ad83Smrg	motorola)
59861016ad83Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
59871016ad83Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
59881016ad83Smrg	;;
59891016ad83Smrg      esac
59901016ad83Smrg      runpath_var='LD_RUN_PATH'
59911016ad83Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
59921016ad83Smrg      ;;
59931016ad83Smrg
59941016ad83Smrg    sysv4.3*)
59951016ad83Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
59961016ad83Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
59971016ad83Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
59981016ad83Smrg      ;;
59991016ad83Smrg
60001016ad83Smrg    sysv4*MP*)
60011016ad83Smrg      if test -d /usr/nec; then
60021016ad83Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
60031016ad83Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60041016ad83Smrg	runpath_var=LD_RUN_PATH
60051016ad83Smrg	hardcode_runpath_var=yes
60061016ad83Smrg	_LT_TAGVAR(ld_shlibs, $1)=yes
60071016ad83Smrg      fi
60081016ad83Smrg      ;;
60091016ad83Smrg
60101016ad83Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
60117204935cSmrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
60121016ad83Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
60131016ad83Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60141016ad83Smrg      runpath_var='LD_RUN_PATH'
60151016ad83Smrg
60167204935cSmrg      if test yes = "$GCC"; then
60177204935cSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60187204935cSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60191016ad83Smrg      else
60207204935cSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60217204935cSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60221016ad83Smrg      fi
60231016ad83Smrg      ;;
60241016ad83Smrg
60251016ad83Smrg    sysv5* | sco3.2v5* | sco5v6*)
60267204935cSmrg      # Note: We CANNOT use -z defs as we might desire, because we do not
60271016ad83Smrg      # link with -lc, and that would cause any symbols used from libc to
60281016ad83Smrg      # always be unresolved, which means just about no library would
60291016ad83Smrg      # ever link correctly.  If we're not using GNU ld we use -z text
60301016ad83Smrg      # though, which does catch some bad symbols but isn't as heavy-handed
60311016ad83Smrg      # as -z defs.
60327204935cSmrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
60337204935cSmrg      _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
60341016ad83Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
60351016ad83Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60367204935cSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
60371016ad83Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
60381016ad83Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
60397204935cSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
60401016ad83Smrg      runpath_var='LD_RUN_PATH'
60411016ad83Smrg
60427204935cSmrg      if test yes = "$GCC"; then
60437204935cSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60447204935cSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60451016ad83Smrg      else
60467204935cSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60477204935cSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60481016ad83Smrg      fi
60491016ad83Smrg      ;;
60501016ad83Smrg
60511016ad83Smrg    uts4*)
60521016ad83Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
60531016ad83Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
60541016ad83Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60551016ad83Smrg      ;;
60561016ad83Smrg
60571016ad83Smrg    *)
60581016ad83Smrg      _LT_TAGVAR(ld_shlibs, $1)=no
60591016ad83Smrg      ;;
60601016ad83Smrg    esac
60611016ad83Smrg
60627204935cSmrg    if test sni = "$host_vendor"; then
60631016ad83Smrg      case $host in
60641016ad83Smrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
60657204935cSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
60661016ad83Smrg	;;
60671016ad83Smrg      esac
60681016ad83Smrg    fi
60691016ad83Smrg  fi
60701016ad83Smrg])
60711016ad83SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
60727204935cSmrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
60731016ad83Smrg
60741016ad83Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
60751016ad83Smrg
60761016ad83Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
60771016ad83Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
60781016ad83Smrg_LT_DECL([], [extract_expsyms_cmds], [2],
60791016ad83Smrg    [The commands to extract the exported symbol list from a shared archive])
60801016ad83Smrg
60811016ad83Smrg#
60821016ad83Smrg# Do we need to explicitly link libc?
60831016ad83Smrg#
60841016ad83Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
60851016ad83Smrgx|xyes)
60861016ad83Smrg  # Assume -lc should be added
60871016ad83Smrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
60881016ad83Smrg
60897204935cSmrg  if test yes,yes = "$GCC,$enable_shared"; then
60901016ad83Smrg    case $_LT_TAGVAR(archive_cmds, $1) in
60911016ad83Smrg    *'~'*)
60921016ad83Smrg      # FIXME: we may have to deal with multi-command sequences.
60931016ad83Smrg      ;;
60941016ad83Smrg    '$CC '*)
60951016ad83Smrg      # Test whether the compiler implicitly links with -lc since on some
60961016ad83Smrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
60971016ad83Smrg      # to ld, don't add -lc before -lgcc.
60981016ad83Smrg      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
60991016ad83Smrg	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
61001016ad83Smrg	[$RM conftest*
61011016ad83Smrg	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
61021016ad83Smrg
61031016ad83Smrg	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
61041016ad83Smrg	  soname=conftest
61051016ad83Smrg	  lib=conftest
61061016ad83Smrg	  libobjs=conftest.$ac_objext
61071016ad83Smrg	  deplibs=
61081016ad83Smrg	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
61091016ad83Smrg	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
61101016ad83Smrg	  compiler_flags=-v
61111016ad83Smrg	  linker_flags=-v
61121016ad83Smrg	  verstring=
61131016ad83Smrg	  output_objdir=.
61141016ad83Smrg	  libname=conftest
61151016ad83Smrg	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
61161016ad83Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=
61171016ad83Smrg	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
61181016ad83Smrg	  then
61191016ad83Smrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
61201016ad83Smrg	  else
61211016ad83Smrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
61221016ad83Smrg	  fi
61231016ad83Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
61241016ad83Smrg	else
61251016ad83Smrg	  cat conftest.err 1>&5
61261016ad83Smrg	fi
61271016ad83Smrg	$RM conftest*
61281016ad83Smrg	])
61291016ad83Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
61301016ad83Smrg      ;;
61311016ad83Smrg    esac
61321016ad83Smrg  fi
61331016ad83Smrg  ;;
61341016ad83Smrgesac
61351016ad83Smrg
61361016ad83Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
61371016ad83Smrg    [Whether or not to add -lc for building shared libraries])
61381016ad83Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
61391016ad83Smrg    [enable_shared_with_static_runtimes], [0],
61401016ad83Smrg    [Whether or not to disallow shared libs when runtime libs are static])
61411016ad83Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
61421016ad83Smrg    [Compiler flag to allow reflexive dlopens])
61431016ad83Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
61441016ad83Smrg    [Compiler flag to generate shared objects directly from archives])
61451016ad83Smrg_LT_TAGDECL([], [compiler_needs_object], [1],
61461016ad83Smrg    [Whether the compiler copes with passing no objects directly])
61471016ad83Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
61481016ad83Smrg    [Create an old-style archive from a shared archive])
61491016ad83Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
61501016ad83Smrg    [Create a temporary old-style archive to link instead of a shared archive])
61511016ad83Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
61521016ad83Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
61531016ad83Smrg_LT_TAGDECL([], [module_cmds], [2],
61541016ad83Smrg    [Commands used to build a loadable module if different from building
61551016ad83Smrg    a shared archive.])
61561016ad83Smrg_LT_TAGDECL([], [module_expsym_cmds], [2])
61571016ad83Smrg_LT_TAGDECL([], [with_gnu_ld], [1],
61581016ad83Smrg    [Whether we are building with GNU ld or not])
61591016ad83Smrg_LT_TAGDECL([], [allow_undefined_flag], [1],
61601016ad83Smrg    [Flag that allows shared libraries with undefined symbols to be built])
61611016ad83Smrg_LT_TAGDECL([], [no_undefined_flag], [1],
61621016ad83Smrg    [Flag that enforces no undefined symbols])
61631016ad83Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
61641016ad83Smrg    [Flag to hardcode $libdir into a binary during linking.
61651016ad83Smrg    This must work even if $libdir does not exist])
61661016ad83Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
61671016ad83Smrg    [Whether we need a single "-rpath" flag with a separated argument])
61681016ad83Smrg_LT_TAGDECL([], [hardcode_direct], [0],
61697204935cSmrg    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
61701016ad83Smrg    DIR into the resulting binary])
61711016ad83Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
61727204935cSmrg    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
61731016ad83Smrg    DIR into the resulting binary and the resulting library dependency is
61747204935cSmrg    "absolute", i.e impossible to change by setting $shlibpath_var if the
61751016ad83Smrg    library is relocated])
61761016ad83Smrg_LT_TAGDECL([], [hardcode_minus_L], [0],
61771016ad83Smrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
61781016ad83Smrg    into the resulting binary])
61791016ad83Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
61801016ad83Smrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
61811016ad83Smrg    into the resulting binary])
61821016ad83Smrg_LT_TAGDECL([], [hardcode_automatic], [0],
61831016ad83Smrg    [Set to "yes" if building a shared library automatically hardcodes DIR
61841016ad83Smrg    into the library and all subsequent libraries and executables linked
61851016ad83Smrg    against it])
61861016ad83Smrg_LT_TAGDECL([], [inherit_rpath], [0],
61871016ad83Smrg    [Set to yes if linker adds runtime paths of dependent libraries
61881016ad83Smrg    to runtime path list])
61891016ad83Smrg_LT_TAGDECL([], [link_all_deplibs], [0],
61901016ad83Smrg    [Whether libtool must link a program against all its dependency libraries])
61911016ad83Smrg_LT_TAGDECL([], [always_export_symbols], [0],
61921016ad83Smrg    [Set to "yes" if exported symbols are required])
61931016ad83Smrg_LT_TAGDECL([], [export_symbols_cmds], [2],
61941016ad83Smrg    [The commands to list exported symbols])
61951016ad83Smrg_LT_TAGDECL([], [exclude_expsyms], [1],
61961016ad83Smrg    [Symbols that should not be listed in the preloaded symbols])
61971016ad83Smrg_LT_TAGDECL([], [include_expsyms], [1],
61981016ad83Smrg    [Symbols that must always be exported])
61991016ad83Smrg_LT_TAGDECL([], [prelink_cmds], [2],
62001016ad83Smrg    [Commands necessary for linking programs (against libraries) with templates])
62011016ad83Smrg_LT_TAGDECL([], [postlink_cmds], [2],
62021016ad83Smrg    [Commands necessary for finishing linking programs])
62031016ad83Smrg_LT_TAGDECL([], [file_list_spec], [1],
62041016ad83Smrg    [Specify filename containing input files])
62051016ad83Smrgdnl FIXME: Not yet implemented
62061016ad83Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
62071016ad83Smrgdnl    [Compiler flag to generate thread safe objects])
62081016ad83Smrg])# _LT_LINKER_SHLIBS
62091016ad83Smrg
62101016ad83Smrg
62111016ad83Smrg# _LT_LANG_C_CONFIG([TAG])
62121016ad83Smrg# ------------------------
62131016ad83Smrg# Ensure that the configuration variables for a C compiler are suitably
62141016ad83Smrg# defined.  These variables are subsequently used by _LT_CONFIG to write
62157204935cSmrg# the compiler configuration to 'libtool'.
62161016ad83Smrgm4_defun([_LT_LANG_C_CONFIG],
62171016ad83Smrg[m4_require([_LT_DECL_EGREP])dnl
62187204935cSmrglt_save_CC=$CC
62191016ad83SmrgAC_LANG_PUSH(C)
62201016ad83Smrg
62211016ad83Smrg# Source file extension for C test sources.
62221016ad83Smrgac_ext=c
62231016ad83Smrg
62241016ad83Smrg# Object file extension for compiled C test sources.
62251016ad83Smrgobjext=o
62261016ad83Smrg_LT_TAGVAR(objext, $1)=$objext
62271016ad83Smrg
62281016ad83Smrg# Code to be used in simple compile tests
62291016ad83Smrglt_simple_compile_test_code="int some_variable = 0;"
62301016ad83Smrg
62311016ad83Smrg# Code to be used in simple link tests
62321016ad83Smrglt_simple_link_test_code='int main(){return(0);}'
62331016ad83Smrg
62341016ad83Smrg_LT_TAG_COMPILER
62351016ad83Smrg# Save the default compiler, since it gets overwritten when the other
62361016ad83Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
62371016ad83Smrgcompiler_DEFAULT=$CC
62381016ad83Smrg
62391016ad83Smrg# save warnings/boilerplate of simple test code
62401016ad83Smrg_LT_COMPILER_BOILERPLATE
62411016ad83Smrg_LT_LINKER_BOILERPLATE
62421016ad83Smrg
62431016ad83Smrg## CAVEAT EMPTOR:
62441016ad83Smrg## There is no encapsulation within the following macros, do not change
62451016ad83Smrg## the running order or otherwise move them around unless you know exactly
62461016ad83Smrg## what you are doing...
62471016ad83Smrgif test -n "$compiler"; then
62481016ad83Smrg  _LT_COMPILER_NO_RTTI($1)
62491016ad83Smrg  _LT_COMPILER_PIC($1)
62501016ad83Smrg  _LT_COMPILER_C_O($1)
62511016ad83Smrg  _LT_COMPILER_FILE_LOCKS($1)
62521016ad83Smrg  _LT_LINKER_SHLIBS($1)
62531016ad83Smrg  _LT_SYS_DYNAMIC_LINKER($1)
62541016ad83Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
62551016ad83Smrg  LT_SYS_DLOPEN_SELF
62561016ad83Smrg  _LT_CMD_STRIPLIB
62571016ad83Smrg
62587204935cSmrg  # Report what library types will actually be built
62591016ad83Smrg  AC_MSG_CHECKING([if libtool supports shared libraries])
62601016ad83Smrg  AC_MSG_RESULT([$can_build_shared])
62611016ad83Smrg
62621016ad83Smrg  AC_MSG_CHECKING([whether to build shared libraries])
62637204935cSmrg  test no = "$can_build_shared" && enable_shared=no
62641016ad83Smrg
62651016ad83Smrg  # On AIX, shared libraries and static libraries use the same namespace, and
62661016ad83Smrg  # are all built from PIC.
62671016ad83Smrg  case $host_os in
62681016ad83Smrg  aix3*)
62697204935cSmrg    test yes = "$enable_shared" && enable_static=no
62701016ad83Smrg    if test -n "$RANLIB"; then
62711016ad83Smrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
62721016ad83Smrg      postinstall_cmds='$RANLIB $lib'
62731016ad83Smrg    fi
62741016ad83Smrg    ;;
62751016ad83Smrg
62761016ad83Smrg  aix[[4-9]]*)
62777204935cSmrg    if test ia64 != "$host_cpu"; then
62787204935cSmrg      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
62797204935cSmrg      yes,aix,yes) ;;			# shared object as lib.so file only
62807204935cSmrg      yes,svr4,*) ;;			# shared object as lib.so archive member only
62817204935cSmrg      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
62827204935cSmrg      esac
62831016ad83Smrg    fi
62841016ad83Smrg    ;;
62851016ad83Smrg  esac
62861016ad83Smrg  AC_MSG_RESULT([$enable_shared])
62871016ad83Smrg
62881016ad83Smrg  AC_MSG_CHECKING([whether to build static libraries])
62891016ad83Smrg  # Make sure either enable_shared or enable_static is yes.
62907204935cSmrg  test yes = "$enable_shared" || enable_static=yes
62911016ad83Smrg  AC_MSG_RESULT([$enable_static])
62921016ad83Smrg
62931016ad83Smrg  _LT_CONFIG($1)
62941016ad83Smrgfi
62951016ad83SmrgAC_LANG_POP
62967204935cSmrgCC=$lt_save_CC
62971016ad83Smrg])# _LT_LANG_C_CONFIG
62981016ad83Smrg
62991016ad83Smrg
63001016ad83Smrg# _LT_LANG_CXX_CONFIG([TAG])
63011016ad83Smrg# --------------------------
63021016ad83Smrg# Ensure that the configuration variables for a C++ compiler are suitably
63031016ad83Smrg# defined.  These variables are subsequently used by _LT_CONFIG to write
63047204935cSmrg# the compiler configuration to 'libtool'.
63051016ad83Smrgm4_defun([_LT_LANG_CXX_CONFIG],
63061016ad83Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
63071016ad83Smrgm4_require([_LT_DECL_EGREP])dnl
63081016ad83Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
63097204935cSmrgif test -n "$CXX" && ( test no != "$CXX" &&
63107204935cSmrg    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
63117204935cSmrg    (test g++ != "$CXX"))); then
63121016ad83Smrg  AC_PROG_CXXCPP
63131016ad83Smrgelse
63141016ad83Smrg  _lt_caught_CXX_error=yes
63151016ad83Smrgfi
63161016ad83Smrg
63171016ad83SmrgAC_LANG_PUSH(C++)
63181016ad83Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
63191016ad83Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
63201016ad83Smrg_LT_TAGVAR(always_export_symbols, $1)=no
63211016ad83Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
63221016ad83Smrg_LT_TAGVAR(compiler_needs_object, $1)=no
63231016ad83Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
63241016ad83Smrg_LT_TAGVAR(hardcode_direct, $1)=no
63251016ad83Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
63261016ad83Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
63271016ad83Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
63281016ad83Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
63291016ad83Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
63301016ad83Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
63311016ad83Smrg_LT_TAGVAR(inherit_rpath, $1)=no
63321016ad83Smrg_LT_TAGVAR(module_cmds, $1)=
63331016ad83Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
63341016ad83Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
63351016ad83Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
63361016ad83Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
63371016ad83Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
63381016ad83Smrg_LT_TAGVAR(no_undefined_flag, $1)=
63391016ad83Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
63401016ad83Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
63411016ad83Smrg
63421016ad83Smrg# Source file extension for C++ test sources.
63431016ad83Smrgac_ext=cpp
63441016ad83Smrg
63451016ad83Smrg# Object file extension for compiled C++ test sources.
63461016ad83Smrgobjext=o
63471016ad83Smrg_LT_TAGVAR(objext, $1)=$objext
63481016ad83Smrg
63491016ad83Smrg# No sense in running all these tests if we already determined that
63501016ad83Smrg# the CXX compiler isn't working.  Some variables (like enable_shared)
63511016ad83Smrg# are currently assumed to apply to all compilers on this platform,
63521016ad83Smrg# and will be corrupted by setting them based on a non-working compiler.
63537204935cSmrgif test yes != "$_lt_caught_CXX_error"; then
63541016ad83Smrg  # Code to be used in simple compile tests
63551016ad83Smrg  lt_simple_compile_test_code="int some_variable = 0;"
63561016ad83Smrg
63571016ad83Smrg  # Code to be used in simple link tests
63581016ad83Smrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
63591016ad83Smrg
63601016ad83Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
63611016ad83Smrg  _LT_TAG_COMPILER
63621016ad83Smrg
63631016ad83Smrg  # save warnings/boilerplate of simple test code
63641016ad83Smrg  _LT_COMPILER_BOILERPLATE
63651016ad83Smrg  _LT_LINKER_BOILERPLATE
63661016ad83Smrg
63671016ad83Smrg  # Allow CC to be a program name with arguments.
63681016ad83Smrg  lt_save_CC=$CC
63691016ad83Smrg  lt_save_CFLAGS=$CFLAGS
63701016ad83Smrg  lt_save_LD=$LD
63711016ad83Smrg  lt_save_GCC=$GCC
63721016ad83Smrg  GCC=$GXX
63731016ad83Smrg  lt_save_with_gnu_ld=$with_gnu_ld
63741016ad83Smrg  lt_save_path_LD=$lt_cv_path_LD
63751016ad83Smrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
63761016ad83Smrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
63771016ad83Smrg  else
63781016ad83Smrg    $as_unset lt_cv_prog_gnu_ld
63791016ad83Smrg  fi
63801016ad83Smrg  if test -n "${lt_cv_path_LDCXX+set}"; then
63811016ad83Smrg    lt_cv_path_LD=$lt_cv_path_LDCXX
63821016ad83Smrg  else
63831016ad83Smrg    $as_unset lt_cv_path_LD
63841016ad83Smrg  fi
63851016ad83Smrg  test -z "${LDCXX+set}" || LD=$LDCXX
63861016ad83Smrg  CC=${CXX-"c++"}
63871016ad83Smrg  CFLAGS=$CXXFLAGS
63881016ad83Smrg  compiler=$CC
63891016ad83Smrg  _LT_TAGVAR(compiler, $1)=$CC
63901016ad83Smrg  _LT_CC_BASENAME([$compiler])
63911016ad83Smrg
63921016ad83Smrg  if test -n "$compiler"; then
63931016ad83Smrg    # We don't want -fno-exception when compiling C++ code, so set the
63941016ad83Smrg    # no_builtin_flag separately
63957204935cSmrg    if test yes = "$GXX"; then
63961016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
63971016ad83Smrg    else
63981016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
63991016ad83Smrg    fi
64001016ad83Smrg
64017204935cSmrg    if test yes = "$GXX"; then
64021016ad83Smrg      # Set up default GNU C++ configuration
64031016ad83Smrg
64041016ad83Smrg      LT_PATH_LD
64051016ad83Smrg
64061016ad83Smrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
64071016ad83Smrg      # archiving commands below assume that GNU ld is being used.
64087204935cSmrg      if test yes = "$with_gnu_ld"; then
64097204935cSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
64107204935cSmrg        _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'
64111016ad83Smrg
64127204935cSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
64137204935cSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
64141016ad83Smrg
64151016ad83Smrg        # If archive_cmds runs LD, not CC, wlarc should be empty
64161016ad83Smrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
64171016ad83Smrg        #     investigate it a little bit more. (MM)
64187204935cSmrg        wlarc='$wl'
64191016ad83Smrg
64201016ad83Smrg        # ancient GNU ld didn't support --whole-archive et. al.
64211016ad83Smrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
64221016ad83Smrg	  $GREP 'no-whole-archive' > /dev/null; then
64237204935cSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
64241016ad83Smrg        else
64251016ad83Smrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
64261016ad83Smrg        fi
64271016ad83Smrg      else
64281016ad83Smrg        with_gnu_ld=no
64291016ad83Smrg        wlarc=
64301016ad83Smrg
64311016ad83Smrg        # A generic and very simple default shared library creation
64321016ad83Smrg        # command for GNU C++ for the case where it uses the native
64331016ad83Smrg        # linker, instead of GNU ld.  If possible, this setting should
64341016ad83Smrg        # overridden to take advantage of the native linker features on
64351016ad83Smrg        # the platform it is being used on.
64361016ad83Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
64371016ad83Smrg      fi
64381016ad83Smrg
64391016ad83Smrg      # Commands to make compiler produce verbose output that lists
64401016ad83Smrg      # what "hidden" libraries, object files and flags are used when
64411016ad83Smrg      # linking a shared library.
64421016ad83Smrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
64431016ad83Smrg
64441016ad83Smrg    else
64451016ad83Smrg      GXX=no
64461016ad83Smrg      with_gnu_ld=no
64471016ad83Smrg      wlarc=
64481016ad83Smrg    fi
64491016ad83Smrg
64501016ad83Smrg    # PORTME: fill in a description of your system's C++ link characteristics
64511016ad83Smrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
64521016ad83Smrg    _LT_TAGVAR(ld_shlibs, $1)=yes
64531016ad83Smrg    case $host_os in
64541016ad83Smrg      aix3*)
64551016ad83Smrg        # FIXME: insert proper C++ library support
64561016ad83Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
64571016ad83Smrg        ;;
64581016ad83Smrg      aix[[4-9]]*)
64597204935cSmrg        if test ia64 = "$host_cpu"; then
64601016ad83Smrg          # On IA64, the linker does run time linking by default, so we don't
64611016ad83Smrg          # have to do anything special.
64621016ad83Smrg          aix_use_runtimelinking=no
64631016ad83Smrg          exp_sym_flag='-Bexport'
64647204935cSmrg          no_entry_flag=
64651016ad83Smrg        else
64661016ad83Smrg          aix_use_runtimelinking=no
64671016ad83Smrg
64681016ad83Smrg          # Test if we are trying to use run time linking or normal
64691016ad83Smrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
64707204935cSmrg          # have runtime linking enabled, and use it for executables.
64717204935cSmrg          # For shared libraries, we enable/disable runtime linking
64727204935cSmrg          # depending on the kind of the shared library created -
64737204935cSmrg          # when "with_aix_soname,aix_use_runtimelinking" is:
64747204935cSmrg          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
64757204935cSmrg          # "aix,yes"  lib.so          shared, rtl:yes, for executables
64767204935cSmrg          #            lib.a           static archive
64777204935cSmrg          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
64787204935cSmrg          #            lib.a(lib.so.V) shared, rtl:no,  for executables
64797204935cSmrg          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
64807204935cSmrg          #            lib.a(lib.so.V) shared, rtl:no
64817204935cSmrg          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
64827204935cSmrg          #            lib.a           static archive
64831016ad83Smrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
64841016ad83Smrg	    for ld_flag in $LDFLAGS; do
64851016ad83Smrg	      case $ld_flag in
64861016ad83Smrg	      *-brtl*)
64871016ad83Smrg	        aix_use_runtimelinking=yes
64881016ad83Smrg	        break
64891016ad83Smrg	        ;;
64901016ad83Smrg	      esac
64911016ad83Smrg	    done
64927204935cSmrg	    if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
64937204935cSmrg	      # With aix-soname=svr4, we create the lib.so.V shared archives only,
64947204935cSmrg	      # so we don't have lib.a shared libs to link our executables.
64957204935cSmrg	      # We have to force runtime linking in this case.
64967204935cSmrg	      aix_use_runtimelinking=yes
64977204935cSmrg	      LDFLAGS="$LDFLAGS -Wl,-brtl"
64987204935cSmrg	    fi
64991016ad83Smrg	    ;;
65001016ad83Smrg          esac
65011016ad83Smrg
65021016ad83Smrg          exp_sym_flag='-bexport'
65031016ad83Smrg          no_entry_flag='-bnoentry'
65041016ad83Smrg        fi
65051016ad83Smrg
65061016ad83Smrg        # When large executables or shared objects are built, AIX ld can
65071016ad83Smrg        # have problems creating the table of contents.  If linking a library
65081016ad83Smrg        # or program results in "error TOC overflow" add -mminimal-toc to
65091016ad83Smrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
65101016ad83Smrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
65111016ad83Smrg
65121016ad83Smrg        _LT_TAGVAR(archive_cmds, $1)=''
65131016ad83Smrg        _LT_TAGVAR(hardcode_direct, $1)=yes
65141016ad83Smrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
65151016ad83Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
65161016ad83Smrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
65177204935cSmrg        _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
65187204935cSmrg        case $with_aix_soname,$aix_use_runtimelinking in
65197204935cSmrg        aix,*) ;;	# no import file
65207204935cSmrg        svr4,* | *,yes) # use import file
65217204935cSmrg          # The Import File defines what to hardcode.
65227204935cSmrg          _LT_TAGVAR(hardcode_direct, $1)=no
65237204935cSmrg          _LT_TAGVAR(hardcode_direct_absolute, $1)=no
65247204935cSmrg          ;;
65257204935cSmrg        esac
65261016ad83Smrg
65277204935cSmrg        if test yes = "$GXX"; then
65281016ad83Smrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
65291016ad83Smrg          # We only want to do this on AIX 4.2 and lower, the check
65301016ad83Smrg          # below for broken collect2 doesn't work under 4.3+
65317204935cSmrg	  collect2name=`$CC -print-prog-name=collect2`
65321016ad83Smrg	  if test -f "$collect2name" &&
65331016ad83Smrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
65341016ad83Smrg	  then
65351016ad83Smrg	    # We have reworked collect2
65361016ad83Smrg	    :
65371016ad83Smrg	  else
65381016ad83Smrg	    # We have old collect2
65391016ad83Smrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
65401016ad83Smrg	    # It fails to find uninstalled libraries when the uninstalled
65411016ad83Smrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
65421016ad83Smrg	    # to unsupported forces relinking
65431016ad83Smrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
65441016ad83Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
65451016ad83Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
65461016ad83Smrg	  fi
65471016ad83Smrg          esac
65481016ad83Smrg          shared_flag='-shared'
65497204935cSmrg	  if test yes = "$aix_use_runtimelinking"; then
65507204935cSmrg	    shared_flag=$shared_flag' $wl-G'
65511016ad83Smrg	  fi
65527204935cSmrg	  # Need to ensure runtime linking is disabled for the traditional
65537204935cSmrg	  # shared library, or the linker may eventually find shared libraries
65547204935cSmrg	  # /with/ Import File - we do not want to mix them.
65557204935cSmrg	  shared_flag_aix='-shared'
65567204935cSmrg	  shared_flag_svr4='-shared $wl-G'
65571016ad83Smrg        else
65581016ad83Smrg          # not using gcc
65597204935cSmrg          if test ia64 = "$host_cpu"; then
65601016ad83Smrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
65611016ad83Smrg	  # chokes on -Wl,-G. The following line is correct:
65621016ad83Smrg	  shared_flag='-G'
65631016ad83Smrg          else
65647204935cSmrg	    if test yes = "$aix_use_runtimelinking"; then
65657204935cSmrg	      shared_flag='$wl-G'
65661016ad83Smrg	    else
65677204935cSmrg	      shared_flag='$wl-bM:SRE'
65681016ad83Smrg	    fi
65697204935cSmrg	    shared_flag_aix='$wl-bM:SRE'
65707204935cSmrg	    shared_flag_svr4='$wl-G'
65711016ad83Smrg          fi
65721016ad83Smrg        fi
65731016ad83Smrg
65747204935cSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
65751016ad83Smrg        # It seems that -bexpall does not export symbols beginning with
65761016ad83Smrg        # underscore (_), so it is better to generate a list of symbols to
65771016ad83Smrg	# export.
65781016ad83Smrg        _LT_TAGVAR(always_export_symbols, $1)=yes
65797204935cSmrg	if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
65801016ad83Smrg          # Warning - without using the other runtime loading flags (-brtl),
65811016ad83Smrg          # -berok will link without error, but may produce a broken library.
65827204935cSmrg          # The "-G" linker flag allows undefined symbols.
65837204935cSmrg          _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
65841016ad83Smrg          # Determine the default libpath from the value encoded in an empty
65851016ad83Smrg          # executable.
65861016ad83Smrg          _LT_SYS_MODULE_PATH_AIX([$1])
65877204935cSmrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
65881016ad83Smrg
65897204935cSmrg          _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
65901016ad83Smrg        else
65917204935cSmrg          if test ia64 = "$host_cpu"; then
65927204935cSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
65931016ad83Smrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
65947204935cSmrg	    _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"
65951016ad83Smrg          else
65961016ad83Smrg	    # Determine the default libpath from the value encoded in an
65971016ad83Smrg	    # empty executable.
65981016ad83Smrg	    _LT_SYS_MODULE_PATH_AIX([$1])
65997204935cSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
66001016ad83Smrg	    # Warning - without using the other run time loading flags,
66011016ad83Smrg	    # -berok will link without error, but may produce a broken library.
66027204935cSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
66037204935cSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
66047204935cSmrg	    if test yes = "$with_gnu_ld"; then
66051016ad83Smrg	      # We only use this code for GNU lds that support --whole-archive.
66067204935cSmrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
66071016ad83Smrg	    else
66081016ad83Smrg	      # Exported symbols can be pulled into shared objects from archives
66091016ad83Smrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
66101016ad83Smrg	    fi
66111016ad83Smrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
66127204935cSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
66137204935cSmrg	    # -brtl affects multiple linker settings, -berok does not and is overridden later
66147204935cSmrg	    compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
66157204935cSmrg	    if test svr4 != "$with_aix_soname"; then
66167204935cSmrg	      # This is similar to how AIX traditionally builds its shared
66177204935cSmrg	      # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
66187204935cSmrg	      _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'
66197204935cSmrg	    fi
66207204935cSmrg	    if test aix != "$with_aix_soname"; then
66217204935cSmrg	      _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'
66227204935cSmrg	    else
66237204935cSmrg	      # used by -dlpreopen to get the symbols
66247204935cSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
66257204935cSmrg	    fi
66267204935cSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
66271016ad83Smrg          fi
66281016ad83Smrg        fi
66291016ad83Smrg        ;;
66301016ad83Smrg
66311016ad83Smrg      beos*)
66321016ad83Smrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
66331016ad83Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
66341016ad83Smrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
66351016ad83Smrg	  # support --undefined.  This deserves some investigation.  FIXME
66367204935cSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
66371016ad83Smrg	else
66381016ad83Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
66391016ad83Smrg	fi
66401016ad83Smrg	;;
66411016ad83Smrg
66421016ad83Smrg      chorus*)
66431016ad83Smrg        case $cc_basename in
66441016ad83Smrg          *)
66451016ad83Smrg	  # FIXME: insert proper C++ library support
66461016ad83Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
66471016ad83Smrg	  ;;
66481016ad83Smrg        esac
66491016ad83Smrg        ;;
66501016ad83Smrg
66511016ad83Smrg      cygwin* | mingw* | pw32* | cegcc*)
66521016ad83Smrg	case $GXX,$cc_basename in
66531016ad83Smrg	,cl* | no,cl*)
66541016ad83Smrg	  # Native MSVC
66551016ad83Smrg	  # hardcode_libdir_flag_spec is actually meaningless, as there is
66561016ad83Smrg	  # no search path for DLLs.
66571016ad83Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
66581016ad83Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
66591016ad83Smrg	  _LT_TAGVAR(always_export_symbols, $1)=yes
66601016ad83Smrg	  _LT_TAGVAR(file_list_spec, $1)='@'
66611016ad83Smrg	  # Tell ltmain to make .lib files, not .a files.
66621016ad83Smrg	  libext=lib
66631016ad83Smrg	  # Tell ltmain to make .dll files, not .so files.
66647204935cSmrg	  shrext_cmds=.dll
66651016ad83Smrg	  # FIXME: Setting linknames here is a bad hack.
66667204935cSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
66677204935cSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
66687204935cSmrg              cp "$export_symbols" "$output_objdir/$soname.def";
66697204935cSmrg              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
66707204935cSmrg            else
66717204935cSmrg              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
66727204935cSmrg            fi~
66737204935cSmrg            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
66747204935cSmrg            linknames='
66751016ad83Smrg	  # The linker will not automatically build a static lib if we build a DLL.
66761016ad83Smrg	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
66771016ad83Smrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
66781016ad83Smrg	  # Don't use ranlib
66791016ad83Smrg	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
66801016ad83Smrg	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
66817204935cSmrg            lt_tool_outputfile="@TOOL_OUTPUT@"~
66827204935cSmrg            case $lt_outputfile in
66837204935cSmrg              *.exe|*.EXE) ;;
66847204935cSmrg              *)
66857204935cSmrg                lt_outputfile=$lt_outputfile.exe
66867204935cSmrg                lt_tool_outputfile=$lt_tool_outputfile.exe
66877204935cSmrg                ;;
66887204935cSmrg            esac~
66897204935cSmrg            func_to_tool_file "$lt_outputfile"~
66907204935cSmrg            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
66917204935cSmrg              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
66927204935cSmrg              $RM "$lt_outputfile.manifest";
66937204935cSmrg            fi'
66941016ad83Smrg	  ;;
66951016ad83Smrg	*)
66961016ad83Smrg	  # g++
66971016ad83Smrg	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
66981016ad83Smrg	  # as there is no search path for DLLs.
66991016ad83Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
67007204935cSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
67011016ad83Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
67021016ad83Smrg	  _LT_TAGVAR(always_export_symbols, $1)=no
67031016ad83Smrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
67041016ad83Smrg
67051016ad83Smrg	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
67067204935cSmrg	    _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'
67077204935cSmrg	    # If the export-symbols file already is a .def file, use it as
67087204935cSmrg	    # is; otherwise, prepend EXPORTS...
67097204935cSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
67107204935cSmrg              cp $export_symbols $output_objdir/$soname.def;
67117204935cSmrg            else
67127204935cSmrg              echo EXPORTS > $output_objdir/$soname.def;
67137204935cSmrg              cat $export_symbols >> $output_objdir/$soname.def;
67147204935cSmrg            fi~
67157204935cSmrg            $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'
67161016ad83Smrg	  else
67171016ad83Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
67181016ad83Smrg	  fi
67191016ad83Smrg	  ;;
67201016ad83Smrg	esac
67211016ad83Smrg	;;
67221016ad83Smrg      darwin* | rhapsody*)
67231016ad83Smrg        _LT_DARWIN_LINKER_FEATURES($1)
67241016ad83Smrg	;;
67251016ad83Smrg
67267204935cSmrg      os2*)
67277204935cSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
67287204935cSmrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
67297204935cSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
67307204935cSmrg	shrext_cmds=.dll
67317204935cSmrg	_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
67327204935cSmrg	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
67337204935cSmrg	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
67347204935cSmrg	  $ECHO EXPORTS >> $output_objdir/$libname.def~
67357204935cSmrg	  emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
67367204935cSmrg	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
67377204935cSmrg	  emximp -o $lib $output_objdir/$libname.def'
67387204935cSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
67397204935cSmrg	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
67407204935cSmrg	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
67417204935cSmrg	  $ECHO EXPORTS >> $output_objdir/$libname.def~
67427204935cSmrg	  prefix_cmds="$SED"~
67437204935cSmrg	  if test EXPORTS = "`$SED 1q $export_symbols`"; then
67447204935cSmrg	    prefix_cmds="$prefix_cmds -e 1d";
67457204935cSmrg	  fi~
67467204935cSmrg	  prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
67477204935cSmrg	  cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
67487204935cSmrg	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
67497204935cSmrg	  emximp -o $lib $output_objdir/$libname.def'
67507204935cSmrg	_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
67517204935cSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
67527204935cSmrg	;;
67537204935cSmrg
67541016ad83Smrg      dgux*)
67551016ad83Smrg        case $cc_basename in
67561016ad83Smrg          ec++*)
67571016ad83Smrg	    # FIXME: insert proper C++ library support
67581016ad83Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
67591016ad83Smrg	    ;;
67601016ad83Smrg          ghcx*)
67611016ad83Smrg	    # Green Hills C++ Compiler
67621016ad83Smrg	    # FIXME: insert proper C++ library support
67631016ad83Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
67641016ad83Smrg	    ;;
67651016ad83Smrg          *)
67661016ad83Smrg	    # FIXME: insert proper C++ library support
67671016ad83Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
67681016ad83Smrg	    ;;
67691016ad83Smrg        esac
67701016ad83Smrg        ;;
67711016ad83Smrg
67721016ad83Smrg      freebsd2.*)
67731016ad83Smrg        # C++ shared libraries reported to be fairly broken before
67741016ad83Smrg	# switch to ELF
67751016ad83Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
67761016ad83Smrg        ;;
67771016ad83Smrg
67781016ad83Smrg      freebsd-elf*)
67791016ad83Smrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
67801016ad83Smrg        ;;
67811016ad83Smrg
67821016ad83Smrg      freebsd* | dragonfly*)
67831016ad83Smrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
67841016ad83Smrg        # conventions
67851016ad83Smrg        _LT_TAGVAR(ld_shlibs, $1)=yes
67861016ad83Smrg        ;;
67871016ad83Smrg
67881016ad83Smrg      haiku*)
67897204935cSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
67901016ad83Smrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
67911016ad83Smrg        ;;
67921016ad83Smrg
67931016ad83Smrg      hpux9*)
67947204935cSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
67951016ad83Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
67967204935cSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
67971016ad83Smrg        _LT_TAGVAR(hardcode_direct, $1)=yes
67981016ad83Smrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
67991016ad83Smrg				             # but as the default
68001016ad83Smrg				             # location of the library.
68011016ad83Smrg
68021016ad83Smrg        case $cc_basename in
68031016ad83Smrg          CC*)
68041016ad83Smrg            # FIXME: insert proper C++ library support
68051016ad83Smrg            _LT_TAGVAR(ld_shlibs, $1)=no
68061016ad83Smrg            ;;
68071016ad83Smrg          aCC*)
68087204935cSmrg            _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'
68091016ad83Smrg            # Commands to make compiler produce verbose output that lists
68101016ad83Smrg            # what "hidden" libraries, object files and flags are used when
68111016ad83Smrg            # linking a shared library.
68121016ad83Smrg            #
68131016ad83Smrg            # There doesn't appear to be a way to prevent this compiler from
68141016ad83Smrg            # explicitly linking system object files so we need to strip them
68151016ad83Smrg            # from the output so that they don't get included in the library
68161016ad83Smrg            # dependencies.
68177204935cSmrg            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"'
68181016ad83Smrg            ;;
68191016ad83Smrg          *)
68207204935cSmrg            if test yes = "$GXX"; then
68217204935cSmrg              _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'
68221016ad83Smrg            else
68231016ad83Smrg              # FIXME: insert proper C++ library support
68241016ad83Smrg              _LT_TAGVAR(ld_shlibs, $1)=no
68251016ad83Smrg            fi
68261016ad83Smrg            ;;
68271016ad83Smrg        esac
68281016ad83Smrg        ;;
68291016ad83Smrg
68301016ad83Smrg      hpux10*|hpux11*)
68317204935cSmrg        if test no = "$with_gnu_ld"; then
68327204935cSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
68331016ad83Smrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
68341016ad83Smrg
68351016ad83Smrg          case $host_cpu in
68361016ad83Smrg            hppa*64*|ia64*)
68371016ad83Smrg              ;;
68381016ad83Smrg            *)
68397204935cSmrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
68401016ad83Smrg              ;;
68411016ad83Smrg          esac
68421016ad83Smrg        fi
68431016ad83Smrg        case $host_cpu in
68441016ad83Smrg          hppa*64*|ia64*)
68451016ad83Smrg            _LT_TAGVAR(hardcode_direct, $1)=no
68461016ad83Smrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
68471016ad83Smrg            ;;
68481016ad83Smrg          *)
68491016ad83Smrg            _LT_TAGVAR(hardcode_direct, $1)=yes
68501016ad83Smrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
68511016ad83Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
68521016ad83Smrg					         # but as the default
68531016ad83Smrg					         # location of the library.
68541016ad83Smrg            ;;
68551016ad83Smrg        esac
68561016ad83Smrg
68571016ad83Smrg        case $cc_basename in
68581016ad83Smrg          CC*)
68591016ad83Smrg	    # FIXME: insert proper C++ library support
68601016ad83Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
68611016ad83Smrg	    ;;
68621016ad83Smrg          aCC*)
68631016ad83Smrg	    case $host_cpu in
68641016ad83Smrg	      hppa*64*)
68657204935cSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
68661016ad83Smrg	        ;;
68671016ad83Smrg	      ia64*)
68687204935cSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
68691016ad83Smrg	        ;;
68701016ad83Smrg	      *)
68717204935cSmrg	        _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'
68721016ad83Smrg	        ;;
68731016ad83Smrg	    esac
68741016ad83Smrg	    # Commands to make compiler produce verbose output that lists
68751016ad83Smrg	    # what "hidden" libraries, object files and flags are used when
68761016ad83Smrg	    # linking a shared library.
68771016ad83Smrg	    #
68781016ad83Smrg	    # There doesn't appear to be a way to prevent this compiler from
68791016ad83Smrg	    # explicitly linking system object files so we need to strip them
68801016ad83Smrg	    # from the output so that they don't get included in the library
68811016ad83Smrg	    # dependencies.
68827204935cSmrg	    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"'
68831016ad83Smrg	    ;;
68841016ad83Smrg          *)
68857204935cSmrg	    if test yes = "$GXX"; then
68867204935cSmrg	      if test no = "$with_gnu_ld"; then
68871016ad83Smrg	        case $host_cpu in
68881016ad83Smrg	          hppa*64*)
68897204935cSmrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
68901016ad83Smrg	            ;;
68911016ad83Smrg	          ia64*)
68927204935cSmrg	            _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'
68931016ad83Smrg	            ;;
68941016ad83Smrg	          *)
68957204935cSmrg	            _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'
68961016ad83Smrg	            ;;
68971016ad83Smrg	        esac
68981016ad83Smrg	      fi
68991016ad83Smrg	    else
69001016ad83Smrg	      # FIXME: insert proper C++ library support
69011016ad83Smrg	      _LT_TAGVAR(ld_shlibs, $1)=no
69021016ad83Smrg	    fi
69031016ad83Smrg	    ;;
69041016ad83Smrg        esac
69051016ad83Smrg        ;;
69061016ad83Smrg
69071016ad83Smrg      interix[[3-9]]*)
69081016ad83Smrg	_LT_TAGVAR(hardcode_direct, $1)=no
69091016ad83Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
69107204935cSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
69117204935cSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
69121016ad83Smrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
69131016ad83Smrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
69141016ad83Smrg	# default) and relocated if they conflict, which is a slow very memory
69151016ad83Smrg	# consuming and fragmenting process.  To avoid this, we pick a random,
69161016ad83Smrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
69171016ad83Smrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
69187204935cSmrg	_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'
69197204935cSmrg	_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'
69201016ad83Smrg	;;
69211016ad83Smrg      irix5* | irix6*)
69221016ad83Smrg        case $cc_basename in
69231016ad83Smrg          CC*)
69241016ad83Smrg	    # SGI C++
69257204935cSmrg	    _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'
69261016ad83Smrg
69271016ad83Smrg	    # Archives containing C++ object files must be created using
69281016ad83Smrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
69291016ad83Smrg	    # necessary to make sure instantiated templates are included
69301016ad83Smrg	    # in the archive.
69311016ad83Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
69321016ad83Smrg	    ;;
69331016ad83Smrg          *)
69347204935cSmrg	    if test yes = "$GXX"; then
69357204935cSmrg	      if test no = "$with_gnu_ld"; then
69367204935cSmrg	        _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'
69371016ad83Smrg	      else
69387204935cSmrg	        _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'
69391016ad83Smrg	      fi
69401016ad83Smrg	    fi
69411016ad83Smrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
69421016ad83Smrg	    ;;
69431016ad83Smrg        esac
69447204935cSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
69451016ad83Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
69461016ad83Smrg        _LT_TAGVAR(inherit_rpath, $1)=yes
69471016ad83Smrg        ;;
69481016ad83Smrg
69491016ad83Smrg      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
69501016ad83Smrg        case $cc_basename in
69511016ad83Smrg          KCC*)
69521016ad83Smrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
69531016ad83Smrg
69541016ad83Smrg	    # KCC will only create a shared library if the output file
69551016ad83Smrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
69561016ad83Smrg	    # to its proper name (with version) after linking.
69577204935cSmrg	    _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'
69587204935cSmrg	    _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'
69591016ad83Smrg	    # Commands to make compiler produce verbose output that lists
69601016ad83Smrg	    # what "hidden" libraries, object files and flags are used when
69611016ad83Smrg	    # linking a shared library.
69621016ad83Smrg	    #
69631016ad83Smrg	    # There doesn't appear to be a way to prevent this compiler from
69641016ad83Smrg	    # explicitly linking system object files so we need to strip them
69651016ad83Smrg	    # from the output so that they don't get included in the library
69661016ad83Smrg	    # dependencies.
69677204935cSmrg	    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"'
69681016ad83Smrg
69697204935cSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
69707204935cSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
69711016ad83Smrg
69721016ad83Smrg	    # Archives containing C++ object files must be created using
69731016ad83Smrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
69741016ad83Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
69751016ad83Smrg	    ;;
69761016ad83Smrg	  icpc* | ecpc* )
69771016ad83Smrg	    # Intel C++
69781016ad83Smrg	    with_gnu_ld=yes
69791016ad83Smrg	    # version 8.0 and above of icpc choke on multiply defined symbols
69801016ad83Smrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
69811016ad83Smrg	    # earlier do not add the objects themselves.
69821016ad83Smrg	    case `$CC -V 2>&1` in
69831016ad83Smrg	      *"Version 7."*)
69847204935cSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
69857204935cSmrg		_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'
69861016ad83Smrg		;;
69871016ad83Smrg	      *)  # Version 8.0 or newer
69881016ad83Smrg	        tmp_idyn=
69891016ad83Smrg	        case $host_cpu in
69901016ad83Smrg		  ia64*) tmp_idyn=' -i_dynamic';;
69911016ad83Smrg		esac
69927204935cSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
69937204935cSmrg		_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'
69941016ad83Smrg		;;
69951016ad83Smrg	    esac
69961016ad83Smrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
69977204935cSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
69987204935cSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
69997204935cSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
70001016ad83Smrg	    ;;
70011016ad83Smrg          pgCC* | pgcpp*)
70021016ad83Smrg            # Portland Group C++ compiler
70031016ad83Smrg	    case `$CC -V` in
70041016ad83Smrg	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
70051016ad83Smrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
70067204935cSmrg               rm -rf $tpldir~
70077204935cSmrg               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
70087204935cSmrg               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
70091016ad83Smrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
70107204935cSmrg                rm -rf $tpldir~
70117204935cSmrg                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
70127204935cSmrg                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
70137204935cSmrg                $RANLIB $oldlib'
70141016ad83Smrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
70157204935cSmrg                rm -rf $tpldir~
70167204935cSmrg                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
70177204935cSmrg                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
70181016ad83Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
70197204935cSmrg                rm -rf $tpldir~
70207204935cSmrg                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
70217204935cSmrg                $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'
70221016ad83Smrg	      ;;
70231016ad83Smrg	    *) # Version 6 and above use weak symbols
70247204935cSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
70257204935cSmrg	      _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'
70261016ad83Smrg	      ;;
70271016ad83Smrg	    esac
70281016ad83Smrg
70297204935cSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
70307204935cSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
70317204935cSmrg	    _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'
70321016ad83Smrg            ;;
70331016ad83Smrg	  cxx*)
70341016ad83Smrg	    # Compaq C++
70357204935cSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
70367204935cSmrg	    _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'
70371016ad83Smrg
70381016ad83Smrg	    runpath_var=LD_RUN_PATH
70391016ad83Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
70401016ad83Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
70411016ad83Smrg
70421016ad83Smrg	    # Commands to make compiler produce verbose output that lists
70431016ad83Smrg	    # what "hidden" libraries, object files and flags are used when
70441016ad83Smrg	    # linking a shared library.
70451016ad83Smrg	    #
70461016ad83Smrg	    # There doesn't appear to be a way to prevent this compiler from
70471016ad83Smrg	    # explicitly linking system object files so we need to strip them
70481016ad83Smrg	    # from the output so that they don't get included in the library
70491016ad83Smrg	    # dependencies.
70507204935cSmrg	    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'
70511016ad83Smrg	    ;;
70521016ad83Smrg	  xl* | mpixl* | bgxl*)
70531016ad83Smrg	    # IBM XL 8.0 on PPC, with GNU ld
70547204935cSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
70557204935cSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
70567204935cSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
70577204935cSmrg	    if test yes = "$supports_anon_versioning"; then
70581016ad83Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
70597204935cSmrg                cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
70607204935cSmrg                echo "local: *; };" >> $output_objdir/$libname.ver~
70617204935cSmrg                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
70621016ad83Smrg	    fi
70631016ad83Smrg	    ;;
70641016ad83Smrg	  *)
70651016ad83Smrg	    case `$CC -V 2>&1 | sed 5q` in
70661016ad83Smrg	    *Sun\ C*)
70671016ad83Smrg	      # Sun C++ 5.9
70681016ad83Smrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
70697204935cSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
70707204935cSmrg	      _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'
70711016ad83Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
70727204935cSmrg	      _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'
70731016ad83Smrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
70741016ad83Smrg
70751016ad83Smrg	      # Not sure whether something based on
70761016ad83Smrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
70771016ad83Smrg	      # would be better.
70781016ad83Smrg	      output_verbose_link_cmd='func_echo_all'
70791016ad83Smrg
70801016ad83Smrg	      # Archives containing C++ object files must be created using
70811016ad83Smrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
70821016ad83Smrg	      # necessary to make sure instantiated templates are included
70831016ad83Smrg	      # in the archive.
70841016ad83Smrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
70851016ad83Smrg	      ;;
70861016ad83Smrg	    esac
70871016ad83Smrg	    ;;
70881016ad83Smrg	esac
70891016ad83Smrg	;;
70901016ad83Smrg
70911016ad83Smrg      lynxos*)
70921016ad83Smrg        # FIXME: insert proper C++ library support
70931016ad83Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
70941016ad83Smrg	;;
70951016ad83Smrg
70961016ad83Smrg      m88k*)
70971016ad83Smrg        # FIXME: insert proper C++ library support
70981016ad83Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
70991016ad83Smrg	;;
71001016ad83Smrg
71011016ad83Smrg      mvs*)
71021016ad83Smrg        case $cc_basename in
71031016ad83Smrg          cxx*)
71041016ad83Smrg	    # FIXME: insert proper C++ library support
71051016ad83Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
71061016ad83Smrg	    ;;
71071016ad83Smrg	  *)
71081016ad83Smrg	    # FIXME: insert proper C++ library support
71091016ad83Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
71101016ad83Smrg	    ;;
71111016ad83Smrg	esac
71121016ad83Smrg	;;
71131016ad83Smrg
71141016ad83Smrg      netbsd*)
71151016ad83Smrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
71161016ad83Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
71171016ad83Smrg	  wlarc=
71181016ad83Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
71191016ad83Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
71201016ad83Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
71211016ad83Smrg	fi
71221016ad83Smrg	# Workaround some broken pre-1.5 toolchains
71231016ad83Smrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
71241016ad83Smrg	;;
71251016ad83Smrg
71261016ad83Smrg      *nto* | *qnx*)
71271016ad83Smrg        _LT_TAGVAR(ld_shlibs, $1)=yes
71281016ad83Smrg	;;
71291016ad83Smrg
71307204935cSmrg      openbsd* | bitrig*)
71311016ad83Smrg	if test -f /usr/libexec/ld.so; then
71321016ad83Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
71331016ad83Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
71341016ad83Smrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
71351016ad83Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
71367204935cSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
71377204935cSmrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
71387204935cSmrg	    _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'
71397204935cSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
71407204935cSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
71411016ad83Smrg	  fi
71421016ad83Smrg	  output_verbose_link_cmd=func_echo_all
71431016ad83Smrg	else
71441016ad83Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
71451016ad83Smrg	fi
71461016ad83Smrg	;;
71471016ad83Smrg
71481016ad83Smrg      osf3* | osf4* | osf5*)
71491016ad83Smrg        case $cc_basename in
71501016ad83Smrg          KCC*)
71511016ad83Smrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
71521016ad83Smrg
71531016ad83Smrg	    # KCC will only create a shared library if the output file
71541016ad83Smrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
71551016ad83Smrg	    # to its proper name (with version) after linking.
71567204935cSmrg	    _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'
71571016ad83Smrg
71587204935cSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
71591016ad83Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
71601016ad83Smrg
71611016ad83Smrg	    # Archives containing C++ object files must be created using
71621016ad83Smrg	    # the KAI C++ compiler.
71631016ad83Smrg	    case $host in
71641016ad83Smrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
71651016ad83Smrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
71661016ad83Smrg	    esac
71671016ad83Smrg	    ;;
71681016ad83Smrg          RCC*)
71691016ad83Smrg	    # Rational C++ 2.4.1
71701016ad83Smrg	    # FIXME: insert proper C++ library support
71711016ad83Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
71721016ad83Smrg	    ;;
71731016ad83Smrg          cxx*)
71741016ad83Smrg	    case $host in
71751016ad83Smrg	      osf3*)
71767204935cSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
71777204935cSmrg	        _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'
71787204935cSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
71791016ad83Smrg		;;
71801016ad83Smrg	      *)
71811016ad83Smrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
71827204935cSmrg	        _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'
71831016ad83Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
71847204935cSmrg                  echo "-hidden">> $lib.exp~
71857204935cSmrg                  $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~
71867204935cSmrg                  $RM $lib.exp'
71871016ad83Smrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
71881016ad83Smrg		;;
71891016ad83Smrg	    esac
71901016ad83Smrg
71911016ad83Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
71921016ad83Smrg
71931016ad83Smrg	    # Commands to make compiler produce verbose output that lists
71941016ad83Smrg	    # what "hidden" libraries, object files and flags are used when
71951016ad83Smrg	    # linking a shared library.
71961016ad83Smrg	    #
71971016ad83Smrg	    # There doesn't appear to be a way to prevent this compiler from
71981016ad83Smrg	    # explicitly linking system object files so we need to strip them
71991016ad83Smrg	    # from the output so that they don't get included in the library
72001016ad83Smrg	    # dependencies.
72017204935cSmrg	    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"'
72021016ad83Smrg	    ;;
72031016ad83Smrg	  *)
72047204935cSmrg	    if test yes,no = "$GXX,$with_gnu_ld"; then
72057204935cSmrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
72061016ad83Smrg	      case $host in
72071016ad83Smrg	        osf3*)
72087204935cSmrg	          _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'
72091016ad83Smrg		  ;;
72101016ad83Smrg	        *)
72117204935cSmrg	          _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'
72121016ad83Smrg		  ;;
72131016ad83Smrg	      esac
72141016ad83Smrg
72157204935cSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
72161016ad83Smrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
72171016ad83Smrg
72181016ad83Smrg	      # Commands to make compiler produce verbose output that lists
72191016ad83Smrg	      # what "hidden" libraries, object files and flags are used when
72201016ad83Smrg	      # linking a shared library.
72211016ad83Smrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
72221016ad83Smrg
72231016ad83Smrg	    else
72241016ad83Smrg	      # FIXME: insert proper C++ library support
72251016ad83Smrg	      _LT_TAGVAR(ld_shlibs, $1)=no
72261016ad83Smrg	    fi
72271016ad83Smrg	    ;;
72281016ad83Smrg        esac
72291016ad83Smrg        ;;
72301016ad83Smrg
72311016ad83Smrg      psos*)
72321016ad83Smrg        # FIXME: insert proper C++ library support
72331016ad83Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
72341016ad83Smrg        ;;
72351016ad83Smrg
72361016ad83Smrg      sunos4*)
72371016ad83Smrg        case $cc_basename in
72381016ad83Smrg          CC*)
72391016ad83Smrg	    # Sun C++ 4.x
72401016ad83Smrg	    # FIXME: insert proper C++ library support
72411016ad83Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
72421016ad83Smrg	    ;;
72431016ad83Smrg          lcc*)
72441016ad83Smrg	    # Lucid
72451016ad83Smrg	    # FIXME: insert proper C++ library support
72461016ad83Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
72471016ad83Smrg	    ;;
72481016ad83Smrg          *)
72491016ad83Smrg	    # FIXME: insert proper C++ library support
72501016ad83Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
72511016ad83Smrg	    ;;
72521016ad83Smrg        esac
72531016ad83Smrg        ;;
72541016ad83Smrg
72551016ad83Smrg      solaris*)
72561016ad83Smrg        case $cc_basename in
72571016ad83Smrg          CC* | sunCC*)
72581016ad83Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
72591016ad83Smrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
72601016ad83Smrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
72617204935cSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
72621016ad83Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
72637204935cSmrg              $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'
72641016ad83Smrg
72651016ad83Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
72661016ad83Smrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
72671016ad83Smrg	    case $host_os in
72681016ad83Smrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
72691016ad83Smrg	      *)
72701016ad83Smrg		# The compiler driver will combine and reorder linker options,
72717204935cSmrg		# but understands '-z linker_flag'.
72721016ad83Smrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
72731016ad83Smrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
72741016ad83Smrg	        ;;
72751016ad83Smrg	    esac
72761016ad83Smrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
72771016ad83Smrg
72781016ad83Smrg	    output_verbose_link_cmd='func_echo_all'
72791016ad83Smrg
72801016ad83Smrg	    # Archives containing C++ object files must be created using
72811016ad83Smrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
72821016ad83Smrg	    # necessary to make sure instantiated templates are included
72831016ad83Smrg	    # in the archive.
72841016ad83Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
72851016ad83Smrg	    ;;
72861016ad83Smrg          gcx*)
72871016ad83Smrg	    # Green Hills C++ Compiler
72887204935cSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
72891016ad83Smrg
72901016ad83Smrg	    # The C++ compiler must be used to create the archive.
72911016ad83Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
72921016ad83Smrg	    ;;
72931016ad83Smrg          *)
72941016ad83Smrg	    # GNU C++ compiler with Solaris linker
72957204935cSmrg	    if test yes,no = "$GXX,$with_gnu_ld"; then
72967204935cSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
72971016ad83Smrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
72987204935cSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
72991016ad83Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
73007204935cSmrg                  $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'
73011016ad83Smrg
73021016ad83Smrg	        # Commands to make compiler produce verbose output that lists
73031016ad83Smrg	        # what "hidden" libraries, object files and flags are used when
73041016ad83Smrg	        # linking a shared library.
73051016ad83Smrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
73061016ad83Smrg	      else
73077204935cSmrg	        # g++ 2.7 appears to require '-G' NOT '-shared' on this
73081016ad83Smrg	        # platform.
73097204935cSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
73101016ad83Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
73117204935cSmrg                  $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'
73121016ad83Smrg
73131016ad83Smrg	        # Commands to make compiler produce verbose output that lists
73141016ad83Smrg	        # what "hidden" libraries, object files and flags are used when
73151016ad83Smrg	        # linking a shared library.
73161016ad83Smrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
73171016ad83Smrg	      fi
73181016ad83Smrg
73197204935cSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
73201016ad83Smrg	      case $host_os in
73211016ad83Smrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
73221016ad83Smrg		*)
73237204935cSmrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
73241016ad83Smrg		  ;;
73251016ad83Smrg	      esac
73261016ad83Smrg	    fi
73271016ad83Smrg	    ;;
73281016ad83Smrg        esac
73291016ad83Smrg        ;;
73301016ad83Smrg
73311016ad83Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
73327204935cSmrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
73331016ad83Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
73341016ad83Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
73351016ad83Smrg      runpath_var='LD_RUN_PATH'
73361016ad83Smrg
73371016ad83Smrg      case $cc_basename in
73381016ad83Smrg        CC*)
73397204935cSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73407204935cSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73411016ad83Smrg	  ;;
73421016ad83Smrg	*)
73437204935cSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73447204935cSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73451016ad83Smrg	  ;;
73461016ad83Smrg      esac
73471016ad83Smrg      ;;
73481016ad83Smrg
73491016ad83Smrg      sysv5* | sco3.2v5* | sco5v6*)
73507204935cSmrg	# Note: We CANNOT use -z defs as we might desire, because we do not
73511016ad83Smrg	# link with -lc, and that would cause any symbols used from libc to
73521016ad83Smrg	# always be unresolved, which means just about no library would
73531016ad83Smrg	# ever link correctly.  If we're not using GNU ld we use -z text
73541016ad83Smrg	# though, which does catch some bad symbols but isn't as heavy-handed
73551016ad83Smrg	# as -z defs.
73567204935cSmrg	_LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
73577204935cSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
73581016ad83Smrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
73591016ad83Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
73607204935cSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
73611016ad83Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
73621016ad83Smrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
73637204935cSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
73641016ad83Smrg	runpath_var='LD_RUN_PATH'
73651016ad83Smrg
73661016ad83Smrg	case $cc_basename in
73671016ad83Smrg          CC*)
73687204935cSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73697204935cSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73701016ad83Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
73717204935cSmrg              '"$_LT_TAGVAR(old_archive_cmds, $1)"
73721016ad83Smrg	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
73737204935cSmrg              '"$_LT_TAGVAR(reload_cmds, $1)"
73741016ad83Smrg	    ;;
73751016ad83Smrg	  *)
73767204935cSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73777204935cSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73781016ad83Smrg	    ;;
73791016ad83Smrg	esac
73801016ad83Smrg      ;;
73811016ad83Smrg
73821016ad83Smrg      tandem*)
73831016ad83Smrg        case $cc_basename in
73841016ad83Smrg          NCC*)
73851016ad83Smrg	    # NonStop-UX NCC 3.20
73861016ad83Smrg	    # FIXME: insert proper C++ library support
73871016ad83Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
73881016ad83Smrg	    ;;
73891016ad83Smrg          *)
73901016ad83Smrg	    # FIXME: insert proper C++ library support
73911016ad83Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
73921016ad83Smrg	    ;;
73931016ad83Smrg        esac
73941016ad83Smrg        ;;
73951016ad83Smrg
73961016ad83Smrg      vxworks*)
73971016ad83Smrg        # FIXME: insert proper C++ library support
73981016ad83Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
73991016ad83Smrg        ;;
74001016ad83Smrg
74011016ad83Smrg      *)
74021016ad83Smrg        # FIXME: insert proper C++ library support
74031016ad83Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
74041016ad83Smrg        ;;
74051016ad83Smrg    esac
74061016ad83Smrg
74071016ad83Smrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
74087204935cSmrg    test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
74091016ad83Smrg
74107204935cSmrg    _LT_TAGVAR(GCC, $1)=$GXX
74117204935cSmrg    _LT_TAGVAR(LD, $1)=$LD
74121016ad83Smrg
74131016ad83Smrg    ## CAVEAT EMPTOR:
74141016ad83Smrg    ## There is no encapsulation within the following macros, do not change
74151016ad83Smrg    ## the running order or otherwise move them around unless you know exactly
74161016ad83Smrg    ## what you are doing...
74171016ad83Smrg    _LT_SYS_HIDDEN_LIBDEPS($1)
74181016ad83Smrg    _LT_COMPILER_PIC($1)
74191016ad83Smrg    _LT_COMPILER_C_O($1)
74201016ad83Smrg    _LT_COMPILER_FILE_LOCKS($1)
74211016ad83Smrg    _LT_LINKER_SHLIBS($1)
74221016ad83Smrg    _LT_SYS_DYNAMIC_LINKER($1)
74231016ad83Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
74241016ad83Smrg
74251016ad83Smrg    _LT_CONFIG($1)
74261016ad83Smrg  fi # test -n "$compiler"
74271016ad83Smrg
74281016ad83Smrg  CC=$lt_save_CC
74291016ad83Smrg  CFLAGS=$lt_save_CFLAGS
74301016ad83Smrg  LDCXX=$LD
74311016ad83Smrg  LD=$lt_save_LD
74321016ad83Smrg  GCC=$lt_save_GCC
74331016ad83Smrg  with_gnu_ld=$lt_save_with_gnu_ld
74341016ad83Smrg  lt_cv_path_LDCXX=$lt_cv_path_LD
74351016ad83Smrg  lt_cv_path_LD=$lt_save_path_LD
74361016ad83Smrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
74371016ad83Smrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
74387204935cSmrgfi # test yes != "$_lt_caught_CXX_error"
74391016ad83Smrg
74401016ad83SmrgAC_LANG_POP
74411016ad83Smrg])# _LT_LANG_CXX_CONFIG
74421016ad83Smrg
74431016ad83Smrg
74441016ad83Smrg# _LT_FUNC_STRIPNAME_CNF
74451016ad83Smrg# ----------------------
74461016ad83Smrg# func_stripname_cnf prefix suffix name
74471016ad83Smrg# strip PREFIX and SUFFIX off of NAME.
74481016ad83Smrg# PREFIX and SUFFIX must not contain globbing or regex special
74491016ad83Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading
74501016ad83Smrg# dot (in which case that matches only a dot).
74511016ad83Smrg#
74521016ad83Smrg# This function is identical to the (non-XSI) version of func_stripname,
74531016ad83Smrg# except this one can be used by m4 code that may be executed by configure,
74541016ad83Smrg# rather than the libtool script.
74551016ad83Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
74561016ad83SmrgAC_REQUIRE([_LT_DECL_SED])
74571016ad83SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
74581016ad83Smrgfunc_stripname_cnf ()
74591016ad83Smrg{
74607204935cSmrg  case @S|@2 in
74617204935cSmrg  .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
74627204935cSmrg  *)  func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
74631016ad83Smrg  esac
74641016ad83Smrg} # func_stripname_cnf
74651016ad83Smrg])# _LT_FUNC_STRIPNAME_CNF
74661016ad83Smrg
74677204935cSmrg
74681016ad83Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
74691016ad83Smrg# ---------------------------------
74701016ad83Smrg# Figure out "hidden" library dependencies from verbose
74711016ad83Smrg# compiler output when linking a shared library.
74721016ad83Smrg# Parse the compiler output and extract the necessary
74731016ad83Smrg# objects, libraries and library flags.
74741016ad83Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
74751016ad83Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
74761016ad83SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
74771016ad83Smrg# Dependencies to place before and after the object being linked:
74781016ad83Smrg_LT_TAGVAR(predep_objects, $1)=
74791016ad83Smrg_LT_TAGVAR(postdep_objects, $1)=
74801016ad83Smrg_LT_TAGVAR(predeps, $1)=
74811016ad83Smrg_LT_TAGVAR(postdeps, $1)=
74821016ad83Smrg_LT_TAGVAR(compiler_lib_search_path, $1)=
74831016ad83Smrg
74841016ad83Smrgdnl we can't use the lt_simple_compile_test_code here,
74851016ad83Smrgdnl because it contains code intended for an executable,
74861016ad83Smrgdnl not a library.  It's possible we should let each
74871016ad83Smrgdnl tag define a new lt_????_link_test_code variable,
74881016ad83Smrgdnl but it's only used here...
74891016ad83Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
74901016ad83Smrgint a;
74911016ad83Smrgvoid foo (void) { a = 0; }
74921016ad83Smrg_LT_EOF
74931016ad83Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
74941016ad83Smrgclass Foo
74951016ad83Smrg{
74961016ad83Smrgpublic:
74971016ad83Smrg  Foo (void) { a = 0; }
74981016ad83Smrgprivate:
74991016ad83Smrg  int a;
75001016ad83Smrg};
75011016ad83Smrg_LT_EOF
75021016ad83Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
75031016ad83Smrg      subroutine foo
75041016ad83Smrg      implicit none
75051016ad83Smrg      integer*4 a
75061016ad83Smrg      a=0
75071016ad83Smrg      return
75081016ad83Smrg      end
75091016ad83Smrg_LT_EOF
75101016ad83Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
75111016ad83Smrg      subroutine foo
75121016ad83Smrg      implicit none
75131016ad83Smrg      integer a
75141016ad83Smrg      a=0
75151016ad83Smrg      return
75161016ad83Smrg      end
75171016ad83Smrg_LT_EOF
75181016ad83Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
75191016ad83Smrgpublic class foo {
75201016ad83Smrg  private int a;
75211016ad83Smrg  public void bar (void) {
75221016ad83Smrg    a = 0;
75231016ad83Smrg  }
75241016ad83Smrg};
75251016ad83Smrg_LT_EOF
75261016ad83Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
75271016ad83Smrgpackage foo
75281016ad83Smrgfunc foo() {
75291016ad83Smrg}
75301016ad83Smrg_LT_EOF
75311016ad83Smrg])
75321016ad83Smrg
75331016ad83Smrg_lt_libdeps_save_CFLAGS=$CFLAGS
75341016ad83Smrgcase "$CC $CFLAGS " in #(
75351016ad83Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
75361016ad83Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
75371016ad83Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
75381016ad83Smrgesac
75391016ad83Smrg
75401016ad83Smrgdnl Parse the compiler output and extract the necessary
75411016ad83Smrgdnl objects, libraries and library flags.
75421016ad83Smrgif AC_TRY_EVAL(ac_compile); then
75431016ad83Smrg  # Parse the compiler output and extract the necessary
75441016ad83Smrg  # objects, libraries and library flags.
75451016ad83Smrg
75461016ad83Smrg  # Sentinel used to keep track of whether or not we are before
75471016ad83Smrg  # the conftest object file.
75481016ad83Smrg  pre_test_object_deps_done=no
75491016ad83Smrg
75501016ad83Smrg  for p in `eval "$output_verbose_link_cmd"`; do
75517204935cSmrg    case $prev$p in
75521016ad83Smrg
75531016ad83Smrg    -L* | -R* | -l*)
75541016ad83Smrg       # Some compilers place space between "-{L,R}" and the path.
75551016ad83Smrg       # Remove the space.
75567204935cSmrg       if test x-L = "$p" ||
75577204935cSmrg          test x-R = "$p"; then
75581016ad83Smrg	 prev=$p
75591016ad83Smrg	 continue
75601016ad83Smrg       fi
75611016ad83Smrg
75621016ad83Smrg       # Expand the sysroot to ease extracting the directories later.
75631016ad83Smrg       if test -z "$prev"; then
75641016ad83Smrg         case $p in
75651016ad83Smrg         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
75661016ad83Smrg         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
75671016ad83Smrg         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
75681016ad83Smrg         esac
75691016ad83Smrg       fi
75701016ad83Smrg       case $p in
75711016ad83Smrg       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
75721016ad83Smrg       esac
75737204935cSmrg       if test no = "$pre_test_object_deps_done"; then
75747204935cSmrg	 case $prev in
75751016ad83Smrg	 -L | -R)
75761016ad83Smrg	   # Internal compiler library paths should come after those
75771016ad83Smrg	   # provided the user.  The postdeps already come after the
75781016ad83Smrg	   # user supplied libs so there is no need to process them.
75791016ad83Smrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
75807204935cSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
75811016ad83Smrg	   else
75827204935cSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
75831016ad83Smrg	   fi
75841016ad83Smrg	   ;;
75851016ad83Smrg	 # The "-l" case would never come before the object being
75861016ad83Smrg	 # linked, so don't bother handling this case.
75871016ad83Smrg	 esac
75881016ad83Smrg       else
75891016ad83Smrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
75907204935cSmrg	   _LT_TAGVAR(postdeps, $1)=$prev$p
75911016ad83Smrg	 else
75927204935cSmrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
75931016ad83Smrg	 fi
75941016ad83Smrg       fi
75951016ad83Smrg       prev=
75961016ad83Smrg       ;;
75971016ad83Smrg
75981016ad83Smrg    *.lto.$objext) ;; # Ignore GCC LTO objects
75991016ad83Smrg    *.$objext)
76001016ad83Smrg       # This assumes that the test object file only shows up
76011016ad83Smrg       # once in the compiler output.
76021016ad83Smrg       if test "$p" = "conftest.$objext"; then
76031016ad83Smrg	 pre_test_object_deps_done=yes
76041016ad83Smrg	 continue
76051016ad83Smrg       fi
76061016ad83Smrg
76077204935cSmrg       if test no = "$pre_test_object_deps_done"; then
76081016ad83Smrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
76097204935cSmrg	   _LT_TAGVAR(predep_objects, $1)=$p
76101016ad83Smrg	 else
76111016ad83Smrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
76121016ad83Smrg	 fi
76131016ad83Smrg       else
76141016ad83Smrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
76157204935cSmrg	   _LT_TAGVAR(postdep_objects, $1)=$p
76161016ad83Smrg	 else
76171016ad83Smrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
76181016ad83Smrg	 fi
76191016ad83Smrg       fi
76201016ad83Smrg       ;;
76211016ad83Smrg
76221016ad83Smrg    *) ;; # Ignore the rest.
76231016ad83Smrg
76241016ad83Smrg    esac
76251016ad83Smrg  done
76261016ad83Smrg
76271016ad83Smrg  # Clean up.
76281016ad83Smrg  rm -f a.out a.exe
76291016ad83Smrgelse
76301016ad83Smrg  echo "libtool.m4: error: problem compiling $1 test program"
76311016ad83Smrgfi
76321016ad83Smrg
76331016ad83Smrg$RM -f confest.$objext
76341016ad83SmrgCFLAGS=$_lt_libdeps_save_CFLAGS
76351016ad83Smrg
76361016ad83Smrg# PORTME: override above test on systems where it is broken
76371016ad83Smrgm4_if([$1], [CXX],
76381016ad83Smrg[case $host_os in
76391016ad83Smrginterix[[3-9]]*)
76401016ad83Smrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
76411016ad83Smrg  # hack all around it, let's just trust "g++" to DTRT.
76421016ad83Smrg  _LT_TAGVAR(predep_objects,$1)=
76431016ad83Smrg  _LT_TAGVAR(postdep_objects,$1)=
76441016ad83Smrg  _LT_TAGVAR(postdeps,$1)=
76451016ad83Smrg  ;;
76461016ad83Smrgesac
76471016ad83Smrg])
76481016ad83Smrg
76491016ad83Smrgcase " $_LT_TAGVAR(postdeps, $1) " in
76501016ad83Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
76511016ad83Smrgesac
76521016ad83Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
76531016ad83Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
76547204935cSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
76551016ad83Smrgfi
76561016ad83Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
76571016ad83Smrg    [The directories searched by this compiler when creating a shared library])
76581016ad83Smrg_LT_TAGDECL([], [predep_objects], [1],
76591016ad83Smrg    [Dependencies to place before and after the objects being linked to
76601016ad83Smrg    create a shared library])
76611016ad83Smrg_LT_TAGDECL([], [postdep_objects], [1])
76621016ad83Smrg_LT_TAGDECL([], [predeps], [1])
76631016ad83Smrg_LT_TAGDECL([], [postdeps], [1])
76641016ad83Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
76651016ad83Smrg    [The library search path used internally by the compiler when linking
76661016ad83Smrg    a shared library])
76671016ad83Smrg])# _LT_SYS_HIDDEN_LIBDEPS
76681016ad83Smrg
76691016ad83Smrg
76701016ad83Smrg# _LT_LANG_F77_CONFIG([TAG])
76711016ad83Smrg# --------------------------
76721016ad83Smrg# Ensure that the configuration variables for a Fortran 77 compiler are
76731016ad83Smrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
76747204935cSmrg# to write the compiler configuration to 'libtool'.
76751016ad83Smrgm4_defun([_LT_LANG_F77_CONFIG],
76761016ad83Smrg[AC_LANG_PUSH(Fortran 77)
76777204935cSmrgif test -z "$F77" || test no = "$F77"; then
76781016ad83Smrg  _lt_disable_F77=yes
76791016ad83Smrgfi
76801016ad83Smrg
76811016ad83Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
76821016ad83Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
76831016ad83Smrg_LT_TAGVAR(always_export_symbols, $1)=no
76841016ad83Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
76851016ad83Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
76861016ad83Smrg_LT_TAGVAR(hardcode_direct, $1)=no
76871016ad83Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
76881016ad83Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
76891016ad83Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
76901016ad83Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
76911016ad83Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
76921016ad83Smrg_LT_TAGVAR(inherit_rpath, $1)=no
76931016ad83Smrg_LT_TAGVAR(module_cmds, $1)=
76941016ad83Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
76951016ad83Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
76961016ad83Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
76971016ad83Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
76981016ad83Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
76991016ad83Smrg_LT_TAGVAR(no_undefined_flag, $1)=
77001016ad83Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
77011016ad83Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
77021016ad83Smrg
77031016ad83Smrg# Source file extension for f77 test sources.
77041016ad83Smrgac_ext=f
77051016ad83Smrg
77061016ad83Smrg# Object file extension for compiled f77 test sources.
77071016ad83Smrgobjext=o
77081016ad83Smrg_LT_TAGVAR(objext, $1)=$objext
77091016ad83Smrg
77101016ad83Smrg# No sense in running all these tests if we already determined that
77111016ad83Smrg# the F77 compiler isn't working.  Some variables (like enable_shared)
77121016ad83Smrg# are currently assumed to apply to all compilers on this platform,
77131016ad83Smrg# and will be corrupted by setting them based on a non-working compiler.
77147204935cSmrgif test yes != "$_lt_disable_F77"; then
77151016ad83Smrg  # Code to be used in simple compile tests
77161016ad83Smrg  lt_simple_compile_test_code="\
77171016ad83Smrg      subroutine t
77181016ad83Smrg      return
77191016ad83Smrg      end
77201016ad83Smrg"
77211016ad83Smrg
77221016ad83Smrg  # Code to be used in simple link tests
77231016ad83Smrg  lt_simple_link_test_code="\
77241016ad83Smrg      program t
77251016ad83Smrg      end
77261016ad83Smrg"
77271016ad83Smrg
77281016ad83Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
77291016ad83Smrg  _LT_TAG_COMPILER
77301016ad83Smrg
77311016ad83Smrg  # save warnings/boilerplate of simple test code
77321016ad83Smrg  _LT_COMPILER_BOILERPLATE
77331016ad83Smrg  _LT_LINKER_BOILERPLATE
77341016ad83Smrg
77351016ad83Smrg  # Allow CC to be a program name with arguments.
77367204935cSmrg  lt_save_CC=$CC
77371016ad83Smrg  lt_save_GCC=$GCC
77381016ad83Smrg  lt_save_CFLAGS=$CFLAGS
77391016ad83Smrg  CC=${F77-"f77"}
77401016ad83Smrg  CFLAGS=$FFLAGS
77411016ad83Smrg  compiler=$CC
77421016ad83Smrg  _LT_TAGVAR(compiler, $1)=$CC
77431016ad83Smrg  _LT_CC_BASENAME([$compiler])
77441016ad83Smrg  GCC=$G77
77451016ad83Smrg  if test -n "$compiler"; then
77461016ad83Smrg    AC_MSG_CHECKING([if libtool supports shared libraries])
77471016ad83Smrg    AC_MSG_RESULT([$can_build_shared])
77481016ad83Smrg
77491016ad83Smrg    AC_MSG_CHECKING([whether to build shared libraries])
77507204935cSmrg    test no = "$can_build_shared" && enable_shared=no
77511016ad83Smrg
77521016ad83Smrg    # On AIX, shared libraries and static libraries use the same namespace, and
77531016ad83Smrg    # are all built from PIC.
77541016ad83Smrg    case $host_os in
77551016ad83Smrg      aix3*)
77567204935cSmrg        test yes = "$enable_shared" && enable_static=no
77571016ad83Smrg        if test -n "$RANLIB"; then
77581016ad83Smrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
77591016ad83Smrg          postinstall_cmds='$RANLIB $lib'
77601016ad83Smrg        fi
77611016ad83Smrg        ;;
77621016ad83Smrg      aix[[4-9]]*)
77637204935cSmrg	if test ia64 != "$host_cpu"; then
77647204935cSmrg	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
77657204935cSmrg	  yes,aix,yes) ;;		# shared object as lib.so file only
77667204935cSmrg	  yes,svr4,*) ;;		# shared object as lib.so archive member only
77677204935cSmrg	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
77687204935cSmrg	  esac
77691016ad83Smrg	fi
77701016ad83Smrg        ;;
77711016ad83Smrg    esac
77721016ad83Smrg    AC_MSG_RESULT([$enable_shared])
77731016ad83Smrg
77741016ad83Smrg    AC_MSG_CHECKING([whether to build static libraries])
77751016ad83Smrg    # Make sure either enable_shared or enable_static is yes.
77767204935cSmrg    test yes = "$enable_shared" || enable_static=yes
77771016ad83Smrg    AC_MSG_RESULT([$enable_static])
77781016ad83Smrg
77797204935cSmrg    _LT_TAGVAR(GCC, $1)=$G77
77807204935cSmrg    _LT_TAGVAR(LD, $1)=$LD
77811016ad83Smrg
77821016ad83Smrg    ## CAVEAT EMPTOR:
77831016ad83Smrg    ## There is no encapsulation within the following macros, do not change
77841016ad83Smrg    ## the running order or otherwise move them around unless you know exactly
77851016ad83Smrg    ## what you are doing...
77861016ad83Smrg    _LT_COMPILER_PIC($1)
77871016ad83Smrg    _LT_COMPILER_C_O($1)
77881016ad83Smrg    _LT_COMPILER_FILE_LOCKS($1)
77891016ad83Smrg    _LT_LINKER_SHLIBS($1)
77901016ad83Smrg    _LT_SYS_DYNAMIC_LINKER($1)
77911016ad83Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
77921016ad83Smrg
77931016ad83Smrg    _LT_CONFIG($1)
77941016ad83Smrg  fi # test -n "$compiler"
77951016ad83Smrg
77961016ad83Smrg  GCC=$lt_save_GCC
77977204935cSmrg  CC=$lt_save_CC
77987204935cSmrg  CFLAGS=$lt_save_CFLAGS
77997204935cSmrgfi # test yes != "$_lt_disable_F77"
78001016ad83Smrg
78011016ad83SmrgAC_LANG_POP
78021016ad83Smrg])# _LT_LANG_F77_CONFIG
78031016ad83Smrg
78041016ad83Smrg
78051016ad83Smrg# _LT_LANG_FC_CONFIG([TAG])
78061016ad83Smrg# -------------------------
78071016ad83Smrg# Ensure that the configuration variables for a Fortran compiler are
78081016ad83Smrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
78097204935cSmrg# to write the compiler configuration to 'libtool'.
78101016ad83Smrgm4_defun([_LT_LANG_FC_CONFIG],
78111016ad83Smrg[AC_LANG_PUSH(Fortran)
78121016ad83Smrg
78137204935cSmrgif test -z "$FC" || test no = "$FC"; then
78141016ad83Smrg  _lt_disable_FC=yes
78151016ad83Smrgfi
78161016ad83Smrg
78171016ad83Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
78181016ad83Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
78191016ad83Smrg_LT_TAGVAR(always_export_symbols, $1)=no
78201016ad83Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
78211016ad83Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
78221016ad83Smrg_LT_TAGVAR(hardcode_direct, $1)=no
78231016ad83Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
78241016ad83Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
78251016ad83Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
78261016ad83Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
78271016ad83Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
78281016ad83Smrg_LT_TAGVAR(inherit_rpath, $1)=no
78291016ad83Smrg_LT_TAGVAR(module_cmds, $1)=
78301016ad83Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
78311016ad83Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
78321016ad83Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
78331016ad83Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
78341016ad83Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
78351016ad83Smrg_LT_TAGVAR(no_undefined_flag, $1)=
78361016ad83Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
78371016ad83Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
78381016ad83Smrg
78391016ad83Smrg# Source file extension for fc test sources.
78401016ad83Smrgac_ext=${ac_fc_srcext-f}
78411016ad83Smrg
78421016ad83Smrg# Object file extension for compiled fc test sources.
78431016ad83Smrgobjext=o
78441016ad83Smrg_LT_TAGVAR(objext, $1)=$objext
78451016ad83Smrg
78461016ad83Smrg# No sense in running all these tests if we already determined that
78471016ad83Smrg# the FC compiler isn't working.  Some variables (like enable_shared)
78481016ad83Smrg# are currently assumed to apply to all compilers on this platform,
78491016ad83Smrg# and will be corrupted by setting them based on a non-working compiler.
78507204935cSmrgif test yes != "$_lt_disable_FC"; then
78511016ad83Smrg  # Code to be used in simple compile tests
78521016ad83Smrg  lt_simple_compile_test_code="\
78531016ad83Smrg      subroutine t
78541016ad83Smrg      return
78551016ad83Smrg      end
78561016ad83Smrg"
78571016ad83Smrg
78581016ad83Smrg  # Code to be used in simple link tests
78591016ad83Smrg  lt_simple_link_test_code="\
78601016ad83Smrg      program t
78611016ad83Smrg      end
78621016ad83Smrg"
78631016ad83Smrg
78641016ad83Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
78651016ad83Smrg  _LT_TAG_COMPILER
78661016ad83Smrg
78671016ad83Smrg  # save warnings/boilerplate of simple test code
78681016ad83Smrg  _LT_COMPILER_BOILERPLATE
78691016ad83Smrg  _LT_LINKER_BOILERPLATE
78701016ad83Smrg
78711016ad83Smrg  # Allow CC to be a program name with arguments.
78727204935cSmrg  lt_save_CC=$CC
78731016ad83Smrg  lt_save_GCC=$GCC
78741016ad83Smrg  lt_save_CFLAGS=$CFLAGS
78751016ad83Smrg  CC=${FC-"f95"}
78761016ad83Smrg  CFLAGS=$FCFLAGS
78771016ad83Smrg  compiler=$CC
78781016ad83Smrg  GCC=$ac_cv_fc_compiler_gnu
78791016ad83Smrg
78801016ad83Smrg  _LT_TAGVAR(compiler, $1)=$CC
78811016ad83Smrg  _LT_CC_BASENAME([$compiler])
78821016ad83Smrg
78831016ad83Smrg  if test -n "$compiler"; then
78841016ad83Smrg    AC_MSG_CHECKING([if libtool supports shared libraries])
78851016ad83Smrg    AC_MSG_RESULT([$can_build_shared])
78861016ad83Smrg
78871016ad83Smrg    AC_MSG_CHECKING([whether to build shared libraries])
78887204935cSmrg    test no = "$can_build_shared" && enable_shared=no
78891016ad83Smrg
78901016ad83Smrg    # On AIX, shared libraries and static libraries use the same namespace, and
78911016ad83Smrg    # are all built from PIC.
78921016ad83Smrg    case $host_os in
78931016ad83Smrg      aix3*)
78947204935cSmrg        test yes = "$enable_shared" && enable_static=no
78951016ad83Smrg        if test -n "$RANLIB"; then
78961016ad83Smrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
78971016ad83Smrg          postinstall_cmds='$RANLIB $lib'
78981016ad83Smrg        fi
78991016ad83Smrg        ;;
79001016ad83Smrg      aix[[4-9]]*)
79017204935cSmrg	if test ia64 != "$host_cpu"; then
79027204935cSmrg	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
79037204935cSmrg	  yes,aix,yes) ;;		# shared object as lib.so file only
79047204935cSmrg	  yes,svr4,*) ;;		# shared object as lib.so archive member only
79057204935cSmrg	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
79067204935cSmrg	  esac
79071016ad83Smrg	fi
79081016ad83Smrg        ;;
79091016ad83Smrg    esac
79101016ad83Smrg    AC_MSG_RESULT([$enable_shared])
79111016ad83Smrg
79121016ad83Smrg    AC_MSG_CHECKING([whether to build static libraries])
79131016ad83Smrg    # Make sure either enable_shared or enable_static is yes.
79147204935cSmrg    test yes = "$enable_shared" || enable_static=yes
79151016ad83Smrg    AC_MSG_RESULT([$enable_static])
79161016ad83Smrg
79177204935cSmrg    _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
79187204935cSmrg    _LT_TAGVAR(LD, $1)=$LD
79191016ad83Smrg
79201016ad83Smrg    ## CAVEAT EMPTOR:
79211016ad83Smrg    ## There is no encapsulation within the following macros, do not change
79221016ad83Smrg    ## the running order or otherwise move them around unless you know exactly
79231016ad83Smrg    ## what you are doing...
79241016ad83Smrg    _LT_SYS_HIDDEN_LIBDEPS($1)
79251016ad83Smrg    _LT_COMPILER_PIC($1)
79261016ad83Smrg    _LT_COMPILER_C_O($1)
79271016ad83Smrg    _LT_COMPILER_FILE_LOCKS($1)
79281016ad83Smrg    _LT_LINKER_SHLIBS($1)
79291016ad83Smrg    _LT_SYS_DYNAMIC_LINKER($1)
79301016ad83Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
79311016ad83Smrg
79321016ad83Smrg    _LT_CONFIG($1)
79331016ad83Smrg  fi # test -n "$compiler"
79341016ad83Smrg
79351016ad83Smrg  GCC=$lt_save_GCC
79361016ad83Smrg  CC=$lt_save_CC
79371016ad83Smrg  CFLAGS=$lt_save_CFLAGS
79387204935cSmrgfi # test yes != "$_lt_disable_FC"
79391016ad83Smrg
79401016ad83SmrgAC_LANG_POP
79411016ad83Smrg])# _LT_LANG_FC_CONFIG
79421016ad83Smrg
79431016ad83Smrg
79441016ad83Smrg# _LT_LANG_GCJ_CONFIG([TAG])
79451016ad83Smrg# --------------------------
79461016ad83Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler
79471016ad83Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
79487204935cSmrg# to write the compiler configuration to 'libtool'.
79491016ad83Smrgm4_defun([_LT_LANG_GCJ_CONFIG],
79501016ad83Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl
79511016ad83SmrgAC_LANG_SAVE
79521016ad83Smrg
79531016ad83Smrg# Source file extension for Java test sources.
79541016ad83Smrgac_ext=java
79551016ad83Smrg
79561016ad83Smrg# Object file extension for compiled Java test sources.
79571016ad83Smrgobjext=o
79581016ad83Smrg_LT_TAGVAR(objext, $1)=$objext
79591016ad83Smrg
79601016ad83Smrg# Code to be used in simple compile tests
79611016ad83Smrglt_simple_compile_test_code="class foo {}"
79621016ad83Smrg
79631016ad83Smrg# Code to be used in simple link tests
79641016ad83Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
79651016ad83Smrg
79661016ad83Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
79671016ad83Smrg_LT_TAG_COMPILER
79681016ad83Smrg
79691016ad83Smrg# save warnings/boilerplate of simple test code
79701016ad83Smrg_LT_COMPILER_BOILERPLATE
79711016ad83Smrg_LT_LINKER_BOILERPLATE
79721016ad83Smrg
79731016ad83Smrg# Allow CC to be a program name with arguments.
79741016ad83Smrglt_save_CC=$CC
79751016ad83Smrglt_save_CFLAGS=$CFLAGS
79761016ad83Smrglt_save_GCC=$GCC
79771016ad83SmrgGCC=yes
79781016ad83SmrgCC=${GCJ-"gcj"}
79791016ad83SmrgCFLAGS=$GCJFLAGS
79801016ad83Smrgcompiler=$CC
79811016ad83Smrg_LT_TAGVAR(compiler, $1)=$CC
79827204935cSmrg_LT_TAGVAR(LD, $1)=$LD
79831016ad83Smrg_LT_CC_BASENAME([$compiler])
79841016ad83Smrg
79851016ad83Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
79861016ad83Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
79871016ad83Smrg
79881016ad83Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
79891016ad83Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
79901016ad83Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
79911016ad83Smrg
79921016ad83Smrg## CAVEAT EMPTOR:
79931016ad83Smrg## There is no encapsulation within the following macros, do not change
79941016ad83Smrg## the running order or otherwise move them around unless you know exactly
79951016ad83Smrg## what you are doing...
79961016ad83Smrgif test -n "$compiler"; then
79971016ad83Smrg  _LT_COMPILER_NO_RTTI($1)
79981016ad83Smrg  _LT_COMPILER_PIC($1)
79991016ad83Smrg  _LT_COMPILER_C_O($1)
80001016ad83Smrg  _LT_COMPILER_FILE_LOCKS($1)
80011016ad83Smrg  _LT_LINKER_SHLIBS($1)
80021016ad83Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
80031016ad83Smrg
80041016ad83Smrg  _LT_CONFIG($1)
80051016ad83Smrgfi
80061016ad83Smrg
80071016ad83SmrgAC_LANG_RESTORE
80081016ad83Smrg
80091016ad83SmrgGCC=$lt_save_GCC
80101016ad83SmrgCC=$lt_save_CC
80111016ad83SmrgCFLAGS=$lt_save_CFLAGS
80121016ad83Smrg])# _LT_LANG_GCJ_CONFIG
80131016ad83Smrg
80141016ad83Smrg
80151016ad83Smrg# _LT_LANG_GO_CONFIG([TAG])
80161016ad83Smrg# --------------------------
80171016ad83Smrg# Ensure that the configuration variables for the GNU Go compiler
80181016ad83Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
80197204935cSmrg# to write the compiler configuration to 'libtool'.
80201016ad83Smrgm4_defun([_LT_LANG_GO_CONFIG],
80211016ad83Smrg[AC_REQUIRE([LT_PROG_GO])dnl
80221016ad83SmrgAC_LANG_SAVE
80231016ad83Smrg
80241016ad83Smrg# Source file extension for Go test sources.
80251016ad83Smrgac_ext=go
80261016ad83Smrg
80271016ad83Smrg# Object file extension for compiled Go test sources.
80281016ad83Smrgobjext=o
80291016ad83Smrg_LT_TAGVAR(objext, $1)=$objext
80301016ad83Smrg
80311016ad83Smrg# Code to be used in simple compile tests
80321016ad83Smrglt_simple_compile_test_code="package main; func main() { }"
80331016ad83Smrg
80341016ad83Smrg# Code to be used in simple link tests
80351016ad83Smrglt_simple_link_test_code='package main; func main() { }'
80361016ad83Smrg
80371016ad83Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
80381016ad83Smrg_LT_TAG_COMPILER
80391016ad83Smrg
80401016ad83Smrg# save warnings/boilerplate of simple test code
80411016ad83Smrg_LT_COMPILER_BOILERPLATE
80421016ad83Smrg_LT_LINKER_BOILERPLATE
80431016ad83Smrg
80441016ad83Smrg# Allow CC to be a program name with arguments.
80451016ad83Smrglt_save_CC=$CC
80461016ad83Smrglt_save_CFLAGS=$CFLAGS
80471016ad83Smrglt_save_GCC=$GCC
80481016ad83SmrgGCC=yes
80491016ad83SmrgCC=${GOC-"gccgo"}
80501016ad83SmrgCFLAGS=$GOFLAGS
80511016ad83Smrgcompiler=$CC
80521016ad83Smrg_LT_TAGVAR(compiler, $1)=$CC
80537204935cSmrg_LT_TAGVAR(LD, $1)=$LD
80541016ad83Smrg_LT_CC_BASENAME([$compiler])
80551016ad83Smrg
80561016ad83Smrg# Go did not exist at the time GCC didn't implicitly link libc in.
80571016ad83Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
80581016ad83Smrg
80591016ad83Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
80601016ad83Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
80611016ad83Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
80621016ad83Smrg
80631016ad83Smrg## CAVEAT EMPTOR:
80641016ad83Smrg## There is no encapsulation within the following macros, do not change
80651016ad83Smrg## the running order or otherwise move them around unless you know exactly
80661016ad83Smrg## what you are doing...
80671016ad83Smrgif test -n "$compiler"; then
80681016ad83Smrg  _LT_COMPILER_NO_RTTI($1)
80691016ad83Smrg  _LT_COMPILER_PIC($1)
80701016ad83Smrg  _LT_COMPILER_C_O($1)
80711016ad83Smrg  _LT_COMPILER_FILE_LOCKS($1)
80721016ad83Smrg  _LT_LINKER_SHLIBS($1)
80731016ad83Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
80741016ad83Smrg
80751016ad83Smrg  _LT_CONFIG($1)
80761016ad83Smrgfi
80771016ad83Smrg
80781016ad83SmrgAC_LANG_RESTORE
80791016ad83Smrg
80801016ad83SmrgGCC=$lt_save_GCC
80811016ad83SmrgCC=$lt_save_CC
80821016ad83SmrgCFLAGS=$lt_save_CFLAGS
80831016ad83Smrg])# _LT_LANG_GO_CONFIG
80841016ad83Smrg
80851016ad83Smrg
80861016ad83Smrg# _LT_LANG_RC_CONFIG([TAG])
80871016ad83Smrg# -------------------------
80881016ad83Smrg# Ensure that the configuration variables for the Windows resource compiler
80891016ad83Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
80907204935cSmrg# to write the compiler configuration to 'libtool'.
80911016ad83Smrgm4_defun([_LT_LANG_RC_CONFIG],
80921016ad83Smrg[AC_REQUIRE([LT_PROG_RC])dnl
80931016ad83SmrgAC_LANG_SAVE
80941016ad83Smrg
80951016ad83Smrg# Source file extension for RC test sources.
80961016ad83Smrgac_ext=rc
80971016ad83Smrg
80981016ad83Smrg# Object file extension for compiled RC test sources.
80991016ad83Smrgobjext=o
81001016ad83Smrg_LT_TAGVAR(objext, $1)=$objext
81011016ad83Smrg
81021016ad83Smrg# Code to be used in simple compile tests
81031016ad83Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
81041016ad83Smrg
81051016ad83Smrg# Code to be used in simple link tests
81067204935cSmrglt_simple_link_test_code=$lt_simple_compile_test_code
81071016ad83Smrg
81081016ad83Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
81091016ad83Smrg_LT_TAG_COMPILER
81101016ad83Smrg
81111016ad83Smrg# save warnings/boilerplate of simple test code
81121016ad83Smrg_LT_COMPILER_BOILERPLATE
81131016ad83Smrg_LT_LINKER_BOILERPLATE
81141016ad83Smrg
81151016ad83Smrg# Allow CC to be a program name with arguments.
81167204935cSmrglt_save_CC=$CC
81171016ad83Smrglt_save_CFLAGS=$CFLAGS
81181016ad83Smrglt_save_GCC=$GCC
81191016ad83SmrgGCC=
81201016ad83SmrgCC=${RC-"windres"}
81211016ad83SmrgCFLAGS=
81221016ad83Smrgcompiler=$CC
81231016ad83Smrg_LT_TAGVAR(compiler, $1)=$CC
81241016ad83Smrg_LT_CC_BASENAME([$compiler])
81251016ad83Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
81261016ad83Smrg
81271016ad83Smrgif test -n "$compiler"; then
81281016ad83Smrg  :
81291016ad83Smrg  _LT_CONFIG($1)
81301016ad83Smrgfi
81311016ad83Smrg
81321016ad83SmrgGCC=$lt_save_GCC
81331016ad83SmrgAC_LANG_RESTORE
81341016ad83SmrgCC=$lt_save_CC
81351016ad83SmrgCFLAGS=$lt_save_CFLAGS
81361016ad83Smrg])# _LT_LANG_RC_CONFIG
81371016ad83Smrg
81381016ad83Smrg
81391016ad83Smrg# LT_PROG_GCJ
81401016ad83Smrg# -----------
81411016ad83SmrgAC_DEFUN([LT_PROG_GCJ],
81421016ad83Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
81431016ad83Smrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
81441016ad83Smrg    [AC_CHECK_TOOL(GCJ, gcj,)
81457204935cSmrg      test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
81461016ad83Smrg      AC_SUBST(GCJFLAGS)])])[]dnl
81471016ad83Smrg])
81481016ad83Smrg
81491016ad83Smrg# Old name:
81501016ad83SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
81511016ad83Smrgdnl aclocal-1.4 backwards compatibility:
81521016ad83Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
81531016ad83Smrg
81541016ad83Smrg
81551016ad83Smrg# LT_PROG_GO
81561016ad83Smrg# ----------
81571016ad83SmrgAC_DEFUN([LT_PROG_GO],
81581016ad83Smrg[AC_CHECK_TOOL(GOC, gccgo,)
81591016ad83Smrg])
81601016ad83Smrg
81611016ad83Smrg
81621016ad83Smrg# LT_PROG_RC
81631016ad83Smrg# ----------
81641016ad83SmrgAC_DEFUN([LT_PROG_RC],
81651016ad83Smrg[AC_CHECK_TOOL(RC, windres,)
81661016ad83Smrg])
81671016ad83Smrg
81681016ad83Smrg# Old name:
81691016ad83SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
81701016ad83Smrgdnl aclocal-1.4 backwards compatibility:
81711016ad83Smrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
81721016ad83Smrg
81731016ad83Smrg
81741016ad83Smrg# _LT_DECL_EGREP
81751016ad83Smrg# --------------
81761016ad83Smrg# If we don't have a new enough Autoconf to choose the best grep
81771016ad83Smrg# available, choose the one first in the user's PATH.
81781016ad83Smrgm4_defun([_LT_DECL_EGREP],
81791016ad83Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
81801016ad83SmrgAC_REQUIRE([AC_PROG_FGREP])dnl
81811016ad83Smrgtest -z "$GREP" && GREP=grep
81821016ad83Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
81831016ad83Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
81841016ad83Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
81851016ad83Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
81861016ad83SmrgAC_SUBST([GREP])
81871016ad83Smrg])
81881016ad83Smrg
81891016ad83Smrg
81901016ad83Smrg# _LT_DECL_OBJDUMP
81911016ad83Smrg# --------------
81921016ad83Smrg# If we don't have a new enough Autoconf to choose the best objdump
81931016ad83Smrg# available, choose the one first in the user's PATH.
81941016ad83Smrgm4_defun([_LT_DECL_OBJDUMP],
81951016ad83Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
81961016ad83Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
81971016ad83Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
81981016ad83SmrgAC_SUBST([OBJDUMP])
81991016ad83Smrg])
82001016ad83Smrg
82011016ad83Smrg# _LT_DECL_DLLTOOL
82021016ad83Smrg# ----------------
82031016ad83Smrg# Ensure DLLTOOL variable is set.
82041016ad83Smrgm4_defun([_LT_DECL_DLLTOOL],
82051016ad83Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
82061016ad83Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
82071016ad83Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
82081016ad83SmrgAC_SUBST([DLLTOOL])
82091016ad83Smrg])
82101016ad83Smrg
82111016ad83Smrg# _LT_DECL_SED
82121016ad83Smrg# ------------
82131016ad83Smrg# Check for a fully-functional sed program, that truncates
82141016ad83Smrg# as few characters as possible.  Prefer GNU sed if found.
82151016ad83Smrgm4_defun([_LT_DECL_SED],
82161016ad83Smrg[AC_PROG_SED
82171016ad83Smrgtest -z "$SED" && SED=sed
82181016ad83SmrgXsed="$SED -e 1s/^X//"
82191016ad83Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
82201016ad83Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
82211016ad83Smrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
82221016ad83Smrg])# _LT_DECL_SED
82231016ad83Smrg
82241016ad83Smrgm4_ifndef([AC_PROG_SED], [
82251016ad83Smrg############################################################
82261016ad83Smrg# NOTE: This macro has been submitted for inclusion into   #
82271016ad83Smrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
82281016ad83Smrg#  a released version of Autoconf we should remove this    #
82291016ad83Smrg#  macro and use it instead.                               #
82301016ad83Smrg############################################################
82311016ad83Smrg
82321016ad83Smrgm4_defun([AC_PROG_SED],
82331016ad83Smrg[AC_MSG_CHECKING([for a sed that does not truncate output])
82341016ad83SmrgAC_CACHE_VAL(lt_cv_path_SED,
82351016ad83Smrg[# Loop through the user's path and test for sed and gsed.
82361016ad83Smrg# Then use that list of sed's as ones to test for truncation.
82371016ad83Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
82381016ad83Smrgfor as_dir in $PATH
82391016ad83Smrgdo
82401016ad83Smrg  IFS=$as_save_IFS
82411016ad83Smrg  test -z "$as_dir" && as_dir=.
82421016ad83Smrg  for lt_ac_prog in sed gsed; do
82431016ad83Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
82441016ad83Smrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
82451016ad83Smrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
82461016ad83Smrg      fi
82471016ad83Smrg    done
82481016ad83Smrg  done
82491016ad83Smrgdone
82501016ad83SmrgIFS=$as_save_IFS
82511016ad83Smrglt_ac_max=0
82521016ad83Smrglt_ac_count=0
82531016ad83Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
82541016ad83Smrg# along with /bin/sed that truncates output.
82551016ad83Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
82567204935cSmrg  test ! -f "$lt_ac_sed" && continue
82571016ad83Smrg  cat /dev/null > conftest.in
82581016ad83Smrg  lt_ac_count=0
82591016ad83Smrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
82601016ad83Smrg  # Check for GNU sed and select it if it is found.
82611016ad83Smrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
82621016ad83Smrg    lt_cv_path_SED=$lt_ac_sed
82631016ad83Smrg    break
82641016ad83Smrg  fi
82651016ad83Smrg  while true; do
82661016ad83Smrg    cat conftest.in conftest.in >conftest.tmp
82671016ad83Smrg    mv conftest.tmp conftest.in
82681016ad83Smrg    cp conftest.in conftest.nl
82691016ad83Smrg    echo >>conftest.nl
82701016ad83Smrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
82711016ad83Smrg    cmp -s conftest.out conftest.nl || break
82721016ad83Smrg    # 10000 chars as input seems more than enough
82737204935cSmrg    test 10 -lt "$lt_ac_count" && break
82741016ad83Smrg    lt_ac_count=`expr $lt_ac_count + 1`
82757204935cSmrg    if test "$lt_ac_count" -gt "$lt_ac_max"; then
82761016ad83Smrg      lt_ac_max=$lt_ac_count
82771016ad83Smrg      lt_cv_path_SED=$lt_ac_sed
82781016ad83Smrg    fi
82791016ad83Smrg  done
82801016ad83Smrgdone
82811016ad83Smrg])
82821016ad83SmrgSED=$lt_cv_path_SED
82831016ad83SmrgAC_SUBST([SED])
82841016ad83SmrgAC_MSG_RESULT([$SED])
82851016ad83Smrg])#AC_PROG_SED
82861016ad83Smrg])#m4_ifndef
82871016ad83Smrg
82881016ad83Smrg# Old name:
82891016ad83SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
82901016ad83Smrgdnl aclocal-1.4 backwards compatibility:
82911016ad83Smrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
82921016ad83Smrg
82931016ad83Smrg
82941016ad83Smrg# _LT_CHECK_SHELL_FEATURES
82951016ad83Smrg# ------------------------
82961016ad83Smrg# Find out whether the shell is Bourne or XSI compatible,
82971016ad83Smrg# or has some other useful features.
82981016ad83Smrgm4_defun([_LT_CHECK_SHELL_FEATURES],
82997204935cSmrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
83001016ad83Smrg  lt_unset=unset
83011016ad83Smrgelse
83021016ad83Smrg  lt_unset=false
83031016ad83Smrgfi
83041016ad83Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
83051016ad83Smrg
83061016ad83Smrg# test EBCDIC or ASCII
83071016ad83Smrgcase `echo X|tr X '\101'` in
83081016ad83Smrg A) # ASCII based system
83091016ad83Smrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
83101016ad83Smrg  lt_SP2NL='tr \040 \012'
83111016ad83Smrg  lt_NL2SP='tr \015\012 \040\040'
83121016ad83Smrg  ;;
83131016ad83Smrg *) # EBCDIC based system
83141016ad83Smrg  lt_SP2NL='tr \100 \n'
83151016ad83Smrg  lt_NL2SP='tr \r\n \100\100'
83161016ad83Smrg  ;;
83171016ad83Smrgesac
83181016ad83Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
83191016ad83Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
83201016ad83Smrg])# _LT_CHECK_SHELL_FEATURES
83211016ad83Smrg
83221016ad83Smrg
83231016ad83Smrg# _LT_PATH_CONVERSION_FUNCTIONS
83241016ad83Smrg# -----------------------------
83257204935cSmrg# Determine what file name conversion functions should be used by
83261016ad83Smrg# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
83271016ad83Smrg# for certain cross-compile configurations and native mingw.
83281016ad83Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
83291016ad83Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
83301016ad83SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
83311016ad83SmrgAC_MSG_CHECKING([how to convert $build file names to $host format])
83321016ad83SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd,
83331016ad83Smrg[case $host in
83341016ad83Smrg  *-*-mingw* )
83351016ad83Smrg    case $build in
83361016ad83Smrg      *-*-mingw* ) # actually msys
83371016ad83Smrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
83381016ad83Smrg        ;;
83391016ad83Smrg      *-*-cygwin* )
83401016ad83Smrg        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
83411016ad83Smrg        ;;
83421016ad83Smrg      * ) # otherwise, assume *nix
83431016ad83Smrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
83441016ad83Smrg        ;;
83451016ad83Smrg    esac
83461016ad83Smrg    ;;
83471016ad83Smrg  *-*-cygwin* )
83481016ad83Smrg    case $build in
83491016ad83Smrg      *-*-mingw* ) # actually msys
83501016ad83Smrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
83511016ad83Smrg        ;;
83521016ad83Smrg      *-*-cygwin* )
83531016ad83Smrg        lt_cv_to_host_file_cmd=func_convert_file_noop
83541016ad83Smrg        ;;
83551016ad83Smrg      * ) # otherwise, assume *nix
83561016ad83Smrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
83571016ad83Smrg        ;;
83581016ad83Smrg    esac
83591016ad83Smrg    ;;
83601016ad83Smrg  * ) # unhandled hosts (and "normal" native builds)
83611016ad83Smrg    lt_cv_to_host_file_cmd=func_convert_file_noop
83621016ad83Smrg    ;;
83631016ad83Smrgesac
83641016ad83Smrg])
83651016ad83Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd
83661016ad83SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd])
83671016ad83Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
83681016ad83Smrg         [0], [convert $build file names to $host format])dnl
83691016ad83Smrg
83701016ad83SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format])
83711016ad83SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd,
83721016ad83Smrg[#assume ordinary cross tools, or native build.
83731016ad83Smrglt_cv_to_tool_file_cmd=func_convert_file_noop
83741016ad83Smrgcase $host in
83751016ad83Smrg  *-*-mingw* )
83761016ad83Smrg    case $build in
83771016ad83Smrg      *-*-mingw* ) # actually msys
83781016ad83Smrg        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
83791016ad83Smrg        ;;
83801016ad83Smrg    esac
83811016ad83Smrg    ;;
83821016ad83Smrgesac
83831016ad83Smrg])
83841016ad83Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd
83851016ad83SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
83861016ad83Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
83871016ad83Smrg         [0], [convert $build files to toolchain format])dnl
83881016ad83Smrg])# _LT_PATH_CONVERSION_FUNCTIONS
8389