libtool.m4 revision 1016ad83
11016ad83Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
21016ad83Smrg#
31016ad83Smrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
41016ad83Smrg#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
51016ad83Smrg#                 Foundation, Inc.
61016ad83Smrg#   Written by Gordon Matzigkeit, 1996
71016ad83Smrg#
81016ad83Smrg# This file is free software; the Free Software Foundation gives
91016ad83Smrg# unlimited permission to copy and/or distribute it, with or without
101016ad83Smrg# modifications, as long as this notice is preserved.
111016ad83Smrg
121016ad83Smrgm4_define([_LT_COPYING], [dnl
131016ad83Smrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
141016ad83Smrg#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
151016ad83Smrg#                 Foundation, Inc.
161016ad83Smrg#   Written by Gordon Matzigkeit, 1996
171016ad83Smrg#
181016ad83Smrg#   This file is part of GNU Libtool.
191016ad83Smrg#
201016ad83Smrg# GNU Libtool is free software; you can redistribute it and/or
211016ad83Smrg# modify it under the terms of the GNU General Public License as
221016ad83Smrg# published by the Free Software Foundation; either version 2 of
231016ad83Smrg# the License, or (at your option) any later version.
241016ad83Smrg#
251016ad83Smrg# As a special exception to the GNU General Public License,
261016ad83Smrg# if you distribute this file as part of a program or library that
271016ad83Smrg# is built using GNU Libtool, you may include this file under the
281016ad83Smrg# same distribution terms that you use for the rest of that program.
291016ad83Smrg#
301016ad83Smrg# GNU Libtool is distributed in the hope that it will be useful,
311016ad83Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
321016ad83Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
331016ad83Smrg# GNU General Public License for more details.
341016ad83Smrg#
351016ad83Smrg# You should have received a copy of the GNU General Public License
361016ad83Smrg# along with GNU Libtool; see the file COPYING.  If not, a copy
371016ad83Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
381016ad83Smrg# obtained by writing to the Free Software Foundation, Inc.,
391016ad83Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
401016ad83Smrg])
411016ad83Smrg
421016ad83Smrg# serial 57 LT_INIT
431016ad83Smrg
441016ad83Smrg
451016ad83Smrg# LT_PREREQ(VERSION)
461016ad83Smrg# ------------------
471016ad83Smrg# Complain and exit if this libtool version is less that VERSION.
481016ad83Smrgm4_defun([LT_PREREQ],
491016ad83Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
501016ad83Smrg       [m4_default([$3],
511016ad83Smrg		   [m4_fatal([Libtool version $1 or higher is required],
521016ad83Smrg		             63)])],
531016ad83Smrg       [$2])])
541016ad83Smrg
551016ad83Smrg
561016ad83Smrg# _LT_CHECK_BUILDDIR
571016ad83Smrg# ------------------
581016ad83Smrg# Complain if the absolute build directory name contains unusual characters
591016ad83Smrgm4_defun([_LT_CHECK_BUILDDIR],
601016ad83Smrg[case `pwd` in
611016ad83Smrg  *\ * | *\	*)
621016ad83Smrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
631016ad83Smrgesac
641016ad83Smrg])
651016ad83Smrg
661016ad83Smrg
671016ad83Smrg# LT_INIT([OPTIONS])
681016ad83Smrg# ------------------
691016ad83SmrgAC_DEFUN([LT_INIT],
701016ad83Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
711016ad83SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
721016ad83SmrgAC_BEFORE([$0], [LT_LANG])dnl
731016ad83SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
741016ad83SmrgAC_BEFORE([$0], [LTDL_INIT])dnl
751016ad83Smrgm4_require([_LT_CHECK_BUILDDIR])dnl
761016ad83Smrg
771016ad83Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
781016ad83Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
791016ad83Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
801016ad83Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
811016ad83Smrgdnl unless we require an AC_DEFUNed macro:
821016ad83SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
831016ad83SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
841016ad83SmrgAC_REQUIRE([LTVERSION_VERSION])dnl
851016ad83SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
861016ad83Smrgm4_require([_LT_PROG_LTMAIN])dnl
871016ad83Smrg
881016ad83Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
891016ad83Smrg
901016ad83Smrgdnl Parse OPTIONS
911016ad83Smrg_LT_SET_OPTIONS([$0], [$1])
921016ad83Smrg
931016ad83Smrg# This can be used to rebuild libtool when needed
941016ad83SmrgLIBTOOL_DEPS="$ltmain"
951016ad83Smrg
961016ad83Smrg# Always use our own libtool.
971016ad83SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
981016ad83SmrgAC_SUBST(LIBTOOL)dnl
991016ad83Smrg
1001016ad83Smrg_LT_SETUP
1011016ad83Smrg
1021016ad83Smrg# Only expand once:
1031016ad83Smrgm4_define([LT_INIT])
1041016ad83Smrg])# LT_INIT
1051016ad83Smrg
1061016ad83Smrg# Old names:
1071016ad83SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1081016ad83SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1091016ad83Smrgdnl aclocal-1.4 backwards compatibility:
1101016ad83Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1111016ad83Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1121016ad83Smrg
1131016ad83Smrg
1141016ad83Smrg# _LT_CC_BASENAME(CC)
1151016ad83Smrg# -------------------
1161016ad83Smrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1171016ad83Smrgm4_defun([_LT_CC_BASENAME],
1181016ad83Smrg[for cc_temp in $1""; do
1191016ad83Smrg  case $cc_temp in
1201016ad83Smrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1211016ad83Smrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1221016ad83Smrg    \-*) ;;
1231016ad83Smrg    *) break;;
1241016ad83Smrg  esac
1251016ad83Smrgdone
1261016ad83Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
1271016ad83Smrg])
1281016ad83Smrg
1291016ad83Smrg
1301016ad83Smrg# _LT_FILEUTILS_DEFAULTS
1311016ad83Smrg# ----------------------
1321016ad83Smrg# It is okay to use these file commands and assume they have been set
1331016ad83Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
1341016ad83Smrgm4_defun([_LT_FILEUTILS_DEFAULTS],
1351016ad83Smrg[: ${CP="cp -f"}
1361016ad83Smrg: ${MV="mv -f"}
1371016ad83Smrg: ${RM="rm -f"}
1381016ad83Smrg])# _LT_FILEUTILS_DEFAULTS
1391016ad83Smrg
1401016ad83Smrg
1411016ad83Smrg# _LT_SETUP
1421016ad83Smrg# ---------
1431016ad83Smrgm4_defun([_LT_SETUP],
1441016ad83Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1451016ad83SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
1461016ad83SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
1471016ad83SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1481016ad83Smrg
1491016ad83Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
1501016ad83Smrgdnl
1511016ad83Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl
1521016ad83Smrg_LT_DECL([], [host], [0])dnl
1531016ad83Smrg_LT_DECL([], [host_os], [0])dnl
1541016ad83Smrgdnl
1551016ad83Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl
1561016ad83Smrg_LT_DECL([], [build], [0])dnl
1571016ad83Smrg_LT_DECL([], [build_os], [0])dnl
1581016ad83Smrgdnl
1591016ad83SmrgAC_REQUIRE([AC_PROG_CC])dnl
1601016ad83SmrgAC_REQUIRE([LT_PATH_LD])dnl
1611016ad83SmrgAC_REQUIRE([LT_PATH_NM])dnl
1621016ad83Smrgdnl
1631016ad83SmrgAC_REQUIRE([AC_PROG_LN_S])dnl
1641016ad83Smrgtest -z "$LN_S" && LN_S="ln -s"
1651016ad83Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1661016ad83Smrgdnl
1671016ad83SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
1681016ad83Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1691016ad83Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1701016ad83Smrgdnl
1711016ad83Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
1721016ad83Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
1731016ad83Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
1741016ad83Smrgm4_require([_LT_CMD_RELOAD])dnl
1751016ad83Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
1761016ad83Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
1771016ad83Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
1781016ad83Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1791016ad83Smrgm4_require([_LT_WITH_SYSROOT])dnl
1801016ad83Smrg
1811016ad83Smrg_LT_CONFIG_LIBTOOL_INIT([
1821016ad83Smrg# See if we are running on zsh, and set the options which allow our
1831016ad83Smrg# commands through without removal of \ escapes INIT.
1841016ad83Smrgif test -n "\${ZSH_VERSION+set}" ; then
1851016ad83Smrg   setopt NO_GLOB_SUBST
1861016ad83Smrgfi
1871016ad83Smrg])
1881016ad83Smrgif test -n "${ZSH_VERSION+set}" ; then
1891016ad83Smrg   setopt NO_GLOB_SUBST
1901016ad83Smrgfi
1911016ad83Smrg
1921016ad83Smrg_LT_CHECK_OBJDIR
1931016ad83Smrg
1941016ad83Smrgm4_require([_LT_TAG_COMPILER])dnl
1951016ad83Smrg
1961016ad83Smrgcase $host_os in
1971016ad83Smrgaix3*)
1981016ad83Smrg  # AIX sometimes has problems with the GCC collect2 program.  For some
1991016ad83Smrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
2001016ad83Smrg  # vanish in a puff of smoke.
2011016ad83Smrg  if test "X${COLLECT_NAMES+set}" != Xset; then
2021016ad83Smrg    COLLECT_NAMES=
2031016ad83Smrg    export COLLECT_NAMES
2041016ad83Smrg  fi
2051016ad83Smrg  ;;
2061016ad83Smrgesac
2071016ad83Smrg
2081016ad83Smrg# Global variables:
2091016ad83Smrgofile=libtool
2101016ad83Smrgcan_build_shared=yes
2111016ad83Smrg
2121016ad83Smrg# All known linkers require a `.a' archive for static linking (except MSVC,
2131016ad83Smrg# which needs '.lib').
2141016ad83Smrglibext=a
2151016ad83Smrg
2161016ad83Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
2171016ad83Smrg
2181016ad83Smrgold_CC="$CC"
2191016ad83Smrgold_CFLAGS="$CFLAGS"
2201016ad83Smrg
2211016ad83Smrg# Set sane defaults for various variables
2221016ad83Smrgtest -z "$CC" && CC=cc
2231016ad83Smrgtest -z "$LTCC" && LTCC=$CC
2241016ad83Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
2251016ad83Smrgtest -z "$LD" && LD=ld
2261016ad83Smrgtest -z "$ac_objext" && ac_objext=o
2271016ad83Smrg
2281016ad83Smrg_LT_CC_BASENAME([$compiler])
2291016ad83Smrg
2301016ad83Smrg# Only perform the check for file, if the check method requires it
2311016ad83Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
2321016ad83Smrgcase $deplibs_check_method in
2331016ad83Smrgfile_magic*)
2341016ad83Smrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2351016ad83Smrg    _LT_PATH_MAGIC
2361016ad83Smrg  fi
2371016ad83Smrg  ;;
2381016ad83Smrgesac
2391016ad83Smrg
2401016ad83Smrg# Use C for the default configuration in the libtool script
2411016ad83SmrgLT_SUPPORTED_TAG([CC])
2421016ad83Smrg_LT_LANG_C_CONFIG
2431016ad83Smrg_LT_LANG_DEFAULT_CONFIG
2441016ad83Smrg_LT_CONFIG_COMMANDS
2451016ad83Smrg])# _LT_SETUP
2461016ad83Smrg
2471016ad83Smrg
2481016ad83Smrg# _LT_PREPARE_SED_QUOTE_VARS
2491016ad83Smrg# --------------------------
2501016ad83Smrg# Define a few sed substitution that help us do robust quoting.
2511016ad83Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS],
2521016ad83Smrg[# Backslashify metacharacters that are still active within
2531016ad83Smrg# double-quoted strings.
2541016ad83Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
2551016ad83Smrg
2561016ad83Smrg# Same as above, but do not quote variable references.
2571016ad83Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
2581016ad83Smrg
2591016ad83Smrg# Sed substitution to delay expansion of an escaped shell variable in a
2601016ad83Smrg# double_quote_subst'ed string.
2611016ad83Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
2621016ad83Smrg
2631016ad83Smrg# Sed substitution to delay expansion of an escaped single quote.
2641016ad83Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
2651016ad83Smrg
2661016ad83Smrg# Sed substitution to avoid accidental globbing in evaled expressions
2671016ad83Smrgno_glob_subst='s/\*/\\\*/g'
2681016ad83Smrg])
2691016ad83Smrg
2701016ad83Smrg# _LT_PROG_LTMAIN
2711016ad83Smrg# ---------------
2721016ad83Smrg# Note that this code is called both from `configure', and `config.status'
2731016ad83Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
2741016ad83Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake,
2751016ad83Smrg# so we pass a copy along to make sure it has a sensible value anyway.
2761016ad83Smrgm4_defun([_LT_PROG_LTMAIN],
2771016ad83Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
2781016ad83Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
2791016ad83Smrgltmain="$ac_aux_dir/ltmain.sh"
2801016ad83Smrg])# _LT_PROG_LTMAIN
2811016ad83Smrg
2821016ad83Smrg
2831016ad83Smrg## ------------------------------------- ##
2841016ad83Smrg## Accumulate code for creating libtool. ##
2851016ad83Smrg## ------------------------------------- ##
2861016ad83Smrg
2871016ad83Smrg# So that we can recreate a full libtool script including additional
2881016ad83Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
2891016ad83Smrg# in macros and then make a single call at the end using the `libtool'
2901016ad83Smrg# label.
2911016ad83Smrg
2921016ad83Smrg
2931016ad83Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
2941016ad83Smrg# ----------------------------------------
2951016ad83Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2961016ad83Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
2971016ad83Smrg[m4_ifval([$1],
2981016ad83Smrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
2991016ad83Smrg                     [$1
3001016ad83Smrg])])])
3011016ad83Smrg
3021016ad83Smrg# Initialize.
3031016ad83Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
3041016ad83Smrg
3051016ad83Smrg
3061016ad83Smrg# _LT_CONFIG_LIBTOOL([COMMANDS])
3071016ad83Smrg# ------------------------------
3081016ad83Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
3091016ad83Smrgm4_define([_LT_CONFIG_LIBTOOL],
3101016ad83Smrg[m4_ifval([$1],
3111016ad83Smrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
3121016ad83Smrg                     [$1
3131016ad83Smrg])])])
3141016ad83Smrg
3151016ad83Smrg# Initialize.
3161016ad83Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
3171016ad83Smrg
3181016ad83Smrg
3191016ad83Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
3201016ad83Smrg# -----------------------------------------------------
3211016ad83Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
3221016ad83Smrg[_LT_CONFIG_LIBTOOL([$1])
3231016ad83Smrg_LT_CONFIG_LIBTOOL_INIT([$2])
3241016ad83Smrg])
3251016ad83Smrg
3261016ad83Smrg
3271016ad83Smrg# _LT_FORMAT_COMMENT([COMMENT])
3281016ad83Smrg# -----------------------------
3291016ad83Smrg# Add leading comment marks to the start of each line, and a trailing
3301016ad83Smrg# full-stop to the whole comment if one is not present already.
3311016ad83Smrgm4_define([_LT_FORMAT_COMMENT],
3321016ad83Smrg[m4_ifval([$1], [
3331016ad83Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
3341016ad83Smrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
3351016ad83Smrg)])
3361016ad83Smrg
3371016ad83Smrg
3381016ad83Smrg
3391016ad83Smrg## ------------------------ ##
3401016ad83Smrg## FIXME: Eliminate VARNAME ##
3411016ad83Smrg## ------------------------ ##
3421016ad83Smrg
3431016ad83Smrg
3441016ad83Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
3451016ad83Smrg# -------------------------------------------------------------------
3461016ad83Smrg# CONFIGNAME is the name given to the value in the libtool script.
3471016ad83Smrg# VARNAME is the (base) name used in the configure script.
3481016ad83Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
3491016ad83Smrg# VARNAME.  Any other value will be used directly.
3501016ad83Smrgm4_define([_LT_DECL],
3511016ad83Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
3521016ad83Smrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
3531016ad83Smrg	[m4_ifval([$1], [$1], [$2])])
3541016ad83Smrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
3551016ad83Smrg    m4_ifval([$4],
3561016ad83Smrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
3571016ad83Smrg    lt_dict_add_subkey([lt_decl_dict], [$2],
3581016ad83Smrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
3591016ad83Smrg])
3601016ad83Smrg
3611016ad83Smrg
3621016ad83Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
3631016ad83Smrg# --------------------------------------------------------
3641016ad83Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
3651016ad83Smrg
3661016ad83Smrg
3671016ad83Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
3681016ad83Smrg# ------------------------------------------------
3691016ad83Smrgm4_define([lt_decl_tag_varnames],
3701016ad83Smrg[_lt_decl_filter([tagged?], [yes], $@)])
3711016ad83Smrg
3721016ad83Smrg
3731016ad83Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
3741016ad83Smrg# ---------------------------------------------------------
3751016ad83Smrgm4_define([_lt_decl_filter],
3761016ad83Smrg[m4_case([$#],
3771016ad83Smrg  [0], [m4_fatal([$0: too few arguments: $#])],
3781016ad83Smrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
3791016ad83Smrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
3801016ad83Smrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
3811016ad83Smrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
3821016ad83Smrg])
3831016ad83Smrg
3841016ad83Smrg
3851016ad83Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
3861016ad83Smrg# --------------------------------------------------
3871016ad83Smrgm4_define([lt_decl_quote_varnames],
3881016ad83Smrg[_lt_decl_filter([value], [1], $@)])
3891016ad83Smrg
3901016ad83Smrg
3911016ad83Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
3921016ad83Smrg# ---------------------------------------------------
3931016ad83Smrgm4_define([lt_decl_dquote_varnames],
3941016ad83Smrg[_lt_decl_filter([value], [2], $@)])
3951016ad83Smrg
3961016ad83Smrg
3971016ad83Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
3981016ad83Smrg# ---------------------------------------------------
3991016ad83Smrgm4_define([lt_decl_varnames_tagged],
4001016ad83Smrg[m4_assert([$# <= 2])dnl
4011016ad83Smrg_$0(m4_quote(m4_default([$1], [[, ]])),
4021016ad83Smrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
4031016ad83Smrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
4041016ad83Smrgm4_define([_lt_decl_varnames_tagged],
4051016ad83Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
4061016ad83Smrg
4071016ad83Smrg
4081016ad83Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
4091016ad83Smrg# ------------------------------------------------
4101016ad83Smrgm4_define([lt_decl_all_varnames],
4111016ad83Smrg[_$0(m4_quote(m4_default([$1], [[, ]])),
4121016ad83Smrg     m4_if([$2], [],
4131016ad83Smrg	   m4_quote(lt_decl_varnames),
4141016ad83Smrg	m4_quote(m4_shift($@))))[]dnl
4151016ad83Smrg])
4161016ad83Smrgm4_define([_lt_decl_all_varnames],
4171016ad83Smrg[lt_join($@, lt_decl_varnames_tagged([$1],
4181016ad83Smrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
4191016ad83Smrg])
4201016ad83Smrg
4211016ad83Smrg
4221016ad83Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
4231016ad83Smrg# ------------------------------------
4241016ad83Smrg# Quote a variable value, and forward it to `config.status' so that its
4251016ad83Smrg# declaration there will have the same value as in `configure'.  VARNAME
4261016ad83Smrg# must have a single quote delimited value for this to work.
4271016ad83Smrgm4_define([_LT_CONFIG_STATUS_DECLARE],
4281016ad83Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
4291016ad83Smrg
4301016ad83Smrg
4311016ad83Smrg# _LT_CONFIG_STATUS_DECLARATIONS
4321016ad83Smrg# ------------------------------
4331016ad83Smrg# We delimit libtool config variables with single quotes, so when
4341016ad83Smrg# we write them to config.status, we have to be sure to quote all
4351016ad83Smrg# embedded single quotes properly.  In configure, this macro expands
4361016ad83Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
4371016ad83Smrg#
4381016ad83Smrg#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
4391016ad83Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
4401016ad83Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
4411016ad83Smrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
4421016ad83Smrg
4431016ad83Smrg
4441016ad83Smrg# _LT_LIBTOOL_TAGS
4451016ad83Smrg# ----------------
4461016ad83Smrg# Output comment and list of tags supported by the script
4471016ad83Smrgm4_defun([_LT_LIBTOOL_TAGS],
4481016ad83Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
4491016ad83Smrgavailable_tags="_LT_TAGS"dnl
4501016ad83Smrg])
4511016ad83Smrg
4521016ad83Smrg
4531016ad83Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
4541016ad83Smrg# -----------------------------------
4551016ad83Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and
4561016ad83Smrg# expand to a commented shell variable setting:
4571016ad83Smrg#
4581016ad83Smrg#    # Some comment about what VAR is for.
4591016ad83Smrg#    visible_name=$lt_internal_name
4601016ad83Smrgm4_define([_LT_LIBTOOL_DECLARE],
4611016ad83Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
4621016ad83Smrg					   [description])))[]dnl
4631016ad83Smrgm4_pushdef([_libtool_name],
4641016ad83Smrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
4651016ad83Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
4661016ad83Smrg    [0], [_libtool_name=[$]$1],
4671016ad83Smrg    [1], [_libtool_name=$lt_[]$1],
4681016ad83Smrg    [2], [_libtool_name=$lt_[]$1],
4691016ad83Smrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
4701016ad83Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
4711016ad83Smrg])
4721016ad83Smrg
4731016ad83Smrg
4741016ad83Smrg# _LT_LIBTOOL_CONFIG_VARS
4751016ad83Smrg# -----------------------
4761016ad83Smrg# Produce commented declarations of non-tagged libtool config variables
4771016ad83Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
4781016ad83Smrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
4791016ad83Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
4801016ad83Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
4811016ad83Smrg[m4_foreach([_lt_var],
4821016ad83Smrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
4831016ad83Smrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
4841016ad83Smrg
4851016ad83Smrg
4861016ad83Smrg# _LT_LIBTOOL_TAG_VARS(TAG)
4871016ad83Smrg# -------------------------
4881016ad83Smrgm4_define([_LT_LIBTOOL_TAG_VARS],
4891016ad83Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
4901016ad83Smrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
4911016ad83Smrg
4921016ad83Smrg
4931016ad83Smrg# _LT_TAGVAR(VARNAME, [TAGNAME])
4941016ad83Smrg# ------------------------------
4951016ad83Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
4961016ad83Smrg
4971016ad83Smrg
4981016ad83Smrg# _LT_CONFIG_COMMANDS
4991016ad83Smrg# -------------------
5001016ad83Smrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
5011016ad83Smrg# variables for single and double quote escaping we saved from calls
5021016ad83Smrg# to _LT_DECL, we can put quote escaped variables declarations
5031016ad83Smrg# into `config.status', and then the shell code to quote escape them in
5041016ad83Smrg# for loops in `config.status'.  Finally, any additional code accumulated
5051016ad83Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
5061016ad83Smrgm4_defun([_LT_CONFIG_COMMANDS],
5071016ad83Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
5081016ad83Smrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
5091016ad83Smrg	dnl instead of duplicating it all over again into config.status,
5101016ad83Smrg	dnl then we will have config.status run $CONFIG_LT later, so it
5111016ad83Smrg	dnl needs to know what name is stored there:
5121016ad83Smrg        [AC_CONFIG_COMMANDS([libtool],
5131016ad83Smrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
5141016ad83Smrg    dnl If the libtool generation code is destined for config.status,
5151016ad83Smrg    dnl expand the accumulated commands and init code now:
5161016ad83Smrg    [AC_CONFIG_COMMANDS([libtool],
5171016ad83Smrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
5181016ad83Smrg])#_LT_CONFIG_COMMANDS
5191016ad83Smrg
5201016ad83Smrg
5211016ad83Smrg# Initialize.
5221016ad83Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
5231016ad83Smrg[
5241016ad83Smrg
5251016ad83Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
5261016ad83Smrg# if CDPATH is set.
5271016ad83Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5281016ad83Smrg
5291016ad83Smrgsed_quote_subst='$sed_quote_subst'
5301016ad83Smrgdouble_quote_subst='$double_quote_subst'
5311016ad83Smrgdelay_variable_subst='$delay_variable_subst'
5321016ad83Smrg_LT_CONFIG_STATUS_DECLARATIONS
5331016ad83SmrgLTCC='$LTCC'
5341016ad83SmrgLTCFLAGS='$LTCFLAGS'
5351016ad83Smrgcompiler='$compiler_DEFAULT'
5361016ad83Smrg
5371016ad83Smrg# A function that is used when there is no print builtin or printf.
5381016ad83Smrgfunc_fallback_echo ()
5391016ad83Smrg{
5401016ad83Smrg  eval 'cat <<_LTECHO_EOF
5411016ad83Smrg\$[]1
5421016ad83Smrg_LTECHO_EOF'
5431016ad83Smrg}
5441016ad83Smrg
5451016ad83Smrg# Quote evaled strings.
5461016ad83Smrgfor var in lt_decl_all_varnames([[ \
5471016ad83Smrg]], lt_decl_quote_varnames); do
5481016ad83Smrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
5491016ad83Smrg    *[[\\\\\\\`\\"\\\$]]*)
5501016ad83Smrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
5511016ad83Smrg      ;;
5521016ad83Smrg    *)
5531016ad83Smrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
5541016ad83Smrg      ;;
5551016ad83Smrg    esac
5561016ad83Smrgdone
5571016ad83Smrg
5581016ad83Smrg# Double-quote double-evaled strings.
5591016ad83Smrgfor var in lt_decl_all_varnames([[ \
5601016ad83Smrg]], lt_decl_dquote_varnames); do
5611016ad83Smrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
5621016ad83Smrg    *[[\\\\\\\`\\"\\\$]]*)
5631016ad83Smrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
5641016ad83Smrg      ;;
5651016ad83Smrg    *)
5661016ad83Smrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
5671016ad83Smrg      ;;
5681016ad83Smrg    esac
5691016ad83Smrgdone
5701016ad83Smrg
5711016ad83Smrg_LT_OUTPUT_LIBTOOL_INIT
5721016ad83Smrg])
5731016ad83Smrg
5741016ad83Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
5751016ad83Smrg# ------------------------------------
5761016ad83Smrg# Generate a child script FILE with all initialization necessary to
5771016ad83Smrg# reuse the environment learned by the parent script, and make the
5781016ad83Smrg# file executable.  If COMMENT is supplied, it is inserted after the
5791016ad83Smrg# `#!' sequence but before initialization text begins.  After this
5801016ad83Smrg# macro, additional text can be appended to FILE to form the body of
5811016ad83Smrg# the child script.  The macro ends with non-zero status if the
5821016ad83Smrg# file could not be fully written (such as if the disk is full).
5831016ad83Smrgm4_ifdef([AS_INIT_GENERATED],
5841016ad83Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
5851016ad83Smrg[m4_defun([_LT_GENERATED_FILE_INIT],
5861016ad83Smrg[m4_require([AS_PREPARE])]dnl
5871016ad83Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
5881016ad83Smrg[lt_write_fail=0
5891016ad83Smrgcat >$1 <<_ASEOF || lt_write_fail=1
5901016ad83Smrg#! $SHELL
5911016ad83Smrg# Generated by $as_me.
5921016ad83Smrg$2
5931016ad83SmrgSHELL=\${CONFIG_SHELL-$SHELL}
5941016ad83Smrgexport SHELL
5951016ad83Smrg_ASEOF
5961016ad83Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1
5971016ad83SmrgAS_SHELL_SANITIZE
5981016ad83Smrg_AS_PREPARE
5991016ad83Smrgexec AS_MESSAGE_FD>&1
6001016ad83Smrg_ASEOF
6011016ad83Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl
6021016ad83Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
6031016ad83Smrg
6041016ad83Smrg# LT_OUTPUT
6051016ad83Smrg# ---------
6061016ad83Smrg# This macro allows early generation of the libtool script (before
6071016ad83Smrg# AC_OUTPUT is called), incase it is used in configure for compilation
6081016ad83Smrg# tests.
6091016ad83SmrgAC_DEFUN([LT_OUTPUT],
6101016ad83Smrg[: ${CONFIG_LT=./config.lt}
6111016ad83SmrgAC_MSG_NOTICE([creating $CONFIG_LT])
6121016ad83Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
6131016ad83Smrg[# Run this file to recreate a libtool stub with the current configuration.])
6141016ad83Smrg
6151016ad83Smrgcat >>"$CONFIG_LT" <<\_LTEOF
6161016ad83Smrglt_cl_silent=false
6171016ad83Smrgexec AS_MESSAGE_LOG_FD>>config.log
6181016ad83Smrg{
6191016ad83Smrg  echo
6201016ad83Smrg  AS_BOX([Running $as_me.])
6211016ad83Smrg} >&AS_MESSAGE_LOG_FD
6221016ad83Smrg
6231016ad83Smrglt_cl_help="\
6241016ad83Smrg\`$as_me' creates a local libtool stub from the current configuration,
6251016ad83Smrgfor use in further configure time tests before the real libtool is
6261016ad83Smrggenerated.
6271016ad83Smrg
6281016ad83SmrgUsage: $[0] [[OPTIONS]]
6291016ad83Smrg
6301016ad83Smrg  -h, --help      print this help, then exit
6311016ad83Smrg  -V, --version   print version number, then exit
6321016ad83Smrg  -q, --quiet     do not print progress messages
6331016ad83Smrg  -d, --debug     don't remove temporary files
6341016ad83Smrg
6351016ad83SmrgReport bugs to <bug-libtool@gnu.org>."
6361016ad83Smrg
6371016ad83Smrglt_cl_version="\
6381016ad83Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
6391016ad83Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
6401016ad83Smrgconfigured by $[0], generated by m4_PACKAGE_STRING.
6411016ad83Smrg
6421016ad83SmrgCopyright (C) 2011 Free Software Foundation, Inc.
6431016ad83SmrgThis config.lt script is free software; the Free Software Foundation
6441016ad83Smrggives unlimited permision to copy, distribute and modify it."
6451016ad83Smrg
6461016ad83Smrgwhile test $[#] != 0
6471016ad83Smrgdo
6481016ad83Smrg  case $[1] in
6491016ad83Smrg    --version | --v* | -V )
6501016ad83Smrg      echo "$lt_cl_version"; exit 0 ;;
6511016ad83Smrg    --help | --h* | -h )
6521016ad83Smrg      echo "$lt_cl_help"; exit 0 ;;
6531016ad83Smrg    --debug | --d* | -d )
6541016ad83Smrg      debug=: ;;
6551016ad83Smrg    --quiet | --q* | --silent | --s* | -q )
6561016ad83Smrg      lt_cl_silent=: ;;
6571016ad83Smrg
6581016ad83Smrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
6591016ad83SmrgTry \`$[0] --help' for more information.]) ;;
6601016ad83Smrg
6611016ad83Smrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
6621016ad83SmrgTry \`$[0] --help' for more information.]) ;;
6631016ad83Smrg  esac
6641016ad83Smrg  shift
6651016ad83Smrgdone
6661016ad83Smrg
6671016ad83Smrgif $lt_cl_silent; then
6681016ad83Smrg  exec AS_MESSAGE_FD>/dev/null
6691016ad83Smrgfi
6701016ad83Smrg_LTEOF
6711016ad83Smrg
6721016ad83Smrgcat >>"$CONFIG_LT" <<_LTEOF
6731016ad83Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
6741016ad83Smrg_LTEOF
6751016ad83Smrg
6761016ad83Smrgcat >>"$CONFIG_LT" <<\_LTEOF
6771016ad83SmrgAC_MSG_NOTICE([creating $ofile])
6781016ad83Smrg_LT_OUTPUT_LIBTOOL_COMMANDS
6791016ad83SmrgAS_EXIT(0)
6801016ad83Smrg_LTEOF
6811016ad83Smrgchmod +x "$CONFIG_LT"
6821016ad83Smrg
6831016ad83Smrg# configure is writing to config.log, but config.lt does its own redirection,
6841016ad83Smrg# appending to config.log, which fails on DOS, as config.log is still kept
6851016ad83Smrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
6861016ad83Smrg# config.log, so it can be properly (re)opened and appended to by config.lt.
6871016ad83Smrglt_cl_success=:
6881016ad83Smrgtest "$silent" = yes &&
6891016ad83Smrg  lt_config_lt_args="$lt_config_lt_args --quiet"
6901016ad83Smrgexec AS_MESSAGE_LOG_FD>/dev/null
6911016ad83Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
6921016ad83Smrgexec AS_MESSAGE_LOG_FD>>config.log
6931016ad83Smrg$lt_cl_success || AS_EXIT(1)
6941016ad83Smrg])# LT_OUTPUT
6951016ad83Smrg
6961016ad83Smrg
6971016ad83Smrg# _LT_CONFIG(TAG)
6981016ad83Smrg# ---------------
6991016ad83Smrg# If TAG is the built-in tag, create an initial libtool script with a
7001016ad83Smrg# default configuration from the untagged config vars.  Otherwise add code
7011016ad83Smrg# to config.status for appending the configuration named by TAG from the
7021016ad83Smrg# matching tagged config vars.
7031016ad83Smrgm4_defun([_LT_CONFIG],
7041016ad83Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7051016ad83Smrg_LT_CONFIG_SAVE_COMMANDS([
7061016ad83Smrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
7071016ad83Smrg  m4_if(_LT_TAG, [C], [
7081016ad83Smrg    # See if we are running on zsh, and set the options which allow our
7091016ad83Smrg    # commands through without removal of \ escapes.
7101016ad83Smrg    if test -n "${ZSH_VERSION+set}" ; then
7111016ad83Smrg      setopt NO_GLOB_SUBST
7121016ad83Smrg    fi
7131016ad83Smrg
7141016ad83Smrg    cfgfile="${ofile}T"
7151016ad83Smrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
7161016ad83Smrg    $RM "$cfgfile"
7171016ad83Smrg
7181016ad83Smrg    cat <<_LT_EOF >> "$cfgfile"
7191016ad83Smrg#! $SHELL
7201016ad83Smrg
7211016ad83Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7221016ad83Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
7231016ad83Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7241016ad83Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
7251016ad83Smrg#
7261016ad83Smrg_LT_COPYING
7271016ad83Smrg_LT_LIBTOOL_TAGS
7281016ad83Smrg
7291016ad83Smrg# ### BEGIN LIBTOOL CONFIG
7301016ad83Smrg_LT_LIBTOOL_CONFIG_VARS
7311016ad83Smrg_LT_LIBTOOL_TAG_VARS
7321016ad83Smrg# ### END LIBTOOL CONFIG
7331016ad83Smrg
7341016ad83Smrg_LT_EOF
7351016ad83Smrg
7361016ad83Smrg  case $host_os in
7371016ad83Smrg  aix3*)
7381016ad83Smrg    cat <<\_LT_EOF >> "$cfgfile"
7391016ad83Smrg# AIX sometimes has problems with the GCC collect2 program.  For some
7401016ad83Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems
7411016ad83Smrg# vanish in a puff of smoke.
7421016ad83Smrgif test "X${COLLECT_NAMES+set}" != Xset; then
7431016ad83Smrg  COLLECT_NAMES=
7441016ad83Smrg  export COLLECT_NAMES
7451016ad83Smrgfi
7461016ad83Smrg_LT_EOF
7471016ad83Smrg    ;;
7481016ad83Smrg  esac
7491016ad83Smrg
7501016ad83Smrg  _LT_PROG_LTMAIN
7511016ad83Smrg
7521016ad83Smrg  # We use sed instead of cat because bash on DJGPP gets confused if
7531016ad83Smrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7541016ad83Smrg  # text mode, it properly converts lines to CR/LF.  This bash problem
7551016ad83Smrg  # is reportedly fixed, but why not run on old versions too?
7561016ad83Smrg  sed '$q' "$ltmain" >> "$cfgfile" \
7571016ad83Smrg     || (rm -f "$cfgfile"; exit 1)
7581016ad83Smrg
7591016ad83Smrg  _LT_PROG_REPLACE_SHELLFNS
7601016ad83Smrg
7611016ad83Smrg   mv -f "$cfgfile" "$ofile" ||
7621016ad83Smrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
7631016ad83Smrg  chmod +x "$ofile"
7641016ad83Smrg],
7651016ad83Smrg[cat <<_LT_EOF >> "$ofile"
7661016ad83Smrg
7671016ad83Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
7681016ad83Smrgdnl in a comment (ie after a #).
7691016ad83Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1
7701016ad83Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
7711016ad83Smrg# ### END LIBTOOL TAG CONFIG: $1
7721016ad83Smrg_LT_EOF
7731016ad83Smrg])dnl /m4_if
7741016ad83Smrg],
7751016ad83Smrg[m4_if([$1], [], [
7761016ad83Smrg    PACKAGE='$PACKAGE'
7771016ad83Smrg    VERSION='$VERSION'
7781016ad83Smrg    TIMESTAMP='$TIMESTAMP'
7791016ad83Smrg    RM='$RM'
7801016ad83Smrg    ofile='$ofile'], [])
7811016ad83Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS
7821016ad83Smrg])# _LT_CONFIG
7831016ad83Smrg
7841016ad83Smrg
7851016ad83Smrg# LT_SUPPORTED_TAG(TAG)
7861016ad83Smrg# ---------------------
7871016ad83Smrg# Trace this macro to discover what tags are supported by the libtool
7881016ad83Smrg# --tag option, using:
7891016ad83Smrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
7901016ad83SmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
7911016ad83Smrg
7921016ad83Smrg
7931016ad83Smrg# C support is built-in for now
7941016ad83Smrgm4_define([_LT_LANG_C_enabled], [])
7951016ad83Smrgm4_define([_LT_TAGS], [])
7961016ad83Smrg
7971016ad83Smrg
7981016ad83Smrg# LT_LANG(LANG)
7991016ad83Smrg# -------------
8001016ad83Smrg# Enable libtool support for the given language if not already enabled.
8011016ad83SmrgAC_DEFUN([LT_LANG],
8021016ad83Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
8031016ad83Smrgm4_case([$1],
8041016ad83Smrg  [C],			[_LT_LANG(C)],
8051016ad83Smrg  [C++],		[_LT_LANG(CXX)],
8061016ad83Smrg  [Go],			[_LT_LANG(GO)],
8071016ad83Smrg  [Java],		[_LT_LANG(GCJ)],
8081016ad83Smrg  [Fortran 77],		[_LT_LANG(F77)],
8091016ad83Smrg  [Fortran],		[_LT_LANG(FC)],
8101016ad83Smrg  [Windows Resource],	[_LT_LANG(RC)],
8111016ad83Smrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
8121016ad83Smrg    [_LT_LANG($1)],
8131016ad83Smrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
8141016ad83Smrg])# LT_LANG
8151016ad83Smrg
8161016ad83Smrg
8171016ad83Smrg# _LT_LANG(LANGNAME)
8181016ad83Smrg# ------------------
8191016ad83Smrgm4_defun([_LT_LANG],
8201016ad83Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
8211016ad83Smrg  [LT_SUPPORTED_TAG([$1])dnl
8221016ad83Smrg  m4_append([_LT_TAGS], [$1 ])dnl
8231016ad83Smrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
8241016ad83Smrg  _LT_LANG_$1_CONFIG($1)])dnl
8251016ad83Smrg])# _LT_LANG
8261016ad83Smrg
8271016ad83Smrg
8281016ad83Smrgm4_ifndef([AC_PROG_GO], [
8291016ad83Smrg############################################################
8301016ad83Smrg# NOTE: This macro has been submitted for inclusion into   #
8311016ad83Smrg#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
8321016ad83Smrg#  a released version of Autoconf we should remove this    #
8331016ad83Smrg#  macro and use it instead.                               #
8341016ad83Smrg############################################################
8351016ad83Smrgm4_defun([AC_PROG_GO],
8361016ad83Smrg[AC_LANG_PUSH(Go)dnl
8371016ad83SmrgAC_ARG_VAR([GOC],     [Go compiler command])dnl
8381016ad83SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
8391016ad83Smrg_AC_ARG_VAR_LDFLAGS()dnl
8401016ad83SmrgAC_CHECK_TOOL(GOC, gccgo)
8411016ad83Smrgif test -z "$GOC"; then
8421016ad83Smrg  if test -n "$ac_tool_prefix"; then
8431016ad83Smrg    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
8441016ad83Smrg  fi
8451016ad83Smrgfi
8461016ad83Smrgif test -z "$GOC"; then
8471016ad83Smrg  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
8481016ad83Smrgfi
8491016ad83Smrg])#m4_defun
8501016ad83Smrg])#m4_ifndef
8511016ad83Smrg
8521016ad83Smrg
8531016ad83Smrg# _LT_LANG_DEFAULT_CONFIG
8541016ad83Smrg# -----------------------
8551016ad83Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
8561016ad83Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
8571016ad83Smrg  [LT_LANG(CXX)],
8581016ad83Smrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
8591016ad83Smrg
8601016ad83SmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
8611016ad83Smrg  [LT_LANG(F77)],
8621016ad83Smrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
8631016ad83Smrg
8641016ad83SmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
8651016ad83Smrg  [LT_LANG(FC)],
8661016ad83Smrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
8671016ad83Smrg
8681016ad83Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
8691016ad83Smrgdnl pulling things in needlessly.
8701016ad83SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
8711016ad83Smrg  [LT_LANG(GCJ)],
8721016ad83Smrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
8731016ad83Smrg    [LT_LANG(GCJ)],
8741016ad83Smrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
8751016ad83Smrg      [LT_LANG(GCJ)],
8761016ad83Smrg      [m4_ifdef([AC_PROG_GCJ],
8771016ad83Smrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
8781016ad83Smrg       m4_ifdef([A][M_PROG_GCJ],
8791016ad83Smrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
8801016ad83Smrg       m4_ifdef([LT_PROG_GCJ],
8811016ad83Smrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
8821016ad83Smrg
8831016ad83SmrgAC_PROVIDE_IFELSE([AC_PROG_GO],
8841016ad83Smrg  [LT_LANG(GO)],
8851016ad83Smrg  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
8861016ad83Smrg
8871016ad83SmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
8881016ad83Smrg  [LT_LANG(RC)],
8891016ad83Smrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
8901016ad83Smrg])# _LT_LANG_DEFAULT_CONFIG
8911016ad83Smrg
8921016ad83Smrg# Obsolete macros:
8931016ad83SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
8941016ad83SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
8951016ad83SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
8961016ad83SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
8971016ad83SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
8981016ad83Smrgdnl aclocal-1.4 backwards compatibility:
8991016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
9001016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
9011016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
9021016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
9031016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], [])
9041016ad83Smrg
9051016ad83Smrg
9061016ad83Smrg# _LT_TAG_COMPILER
9071016ad83Smrg# ----------------
9081016ad83Smrgm4_defun([_LT_TAG_COMPILER],
9091016ad83Smrg[AC_REQUIRE([AC_PROG_CC])dnl
9101016ad83Smrg
9111016ad83Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
9121016ad83Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
9131016ad83Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
9141016ad83Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
9151016ad83Smrg
9161016ad83Smrg# If no C compiler was specified, use CC.
9171016ad83SmrgLTCC=${LTCC-"$CC"}
9181016ad83Smrg
9191016ad83Smrg# If no C compiler flags were specified, use CFLAGS.
9201016ad83SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
9211016ad83Smrg
9221016ad83Smrg# Allow CC to be a program name with arguments.
9231016ad83Smrgcompiler=$CC
9241016ad83Smrg])# _LT_TAG_COMPILER
9251016ad83Smrg
9261016ad83Smrg
9271016ad83Smrg# _LT_COMPILER_BOILERPLATE
9281016ad83Smrg# ------------------------
9291016ad83Smrg# Check for compiler boilerplate output or warnings with
9301016ad83Smrg# the simple compiler test code.
9311016ad83Smrgm4_defun([_LT_COMPILER_BOILERPLATE],
9321016ad83Smrg[m4_require([_LT_DECL_SED])dnl
9331016ad83Smrgac_outfile=conftest.$ac_objext
9341016ad83Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
9351016ad83Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
9361016ad83Smrg_lt_compiler_boilerplate=`cat conftest.err`
9371016ad83Smrg$RM conftest*
9381016ad83Smrg])# _LT_COMPILER_BOILERPLATE
9391016ad83Smrg
9401016ad83Smrg
9411016ad83Smrg# _LT_LINKER_BOILERPLATE
9421016ad83Smrg# ----------------------
9431016ad83Smrg# Check for linker boilerplate output or warnings with
9441016ad83Smrg# the simple link test code.
9451016ad83Smrgm4_defun([_LT_LINKER_BOILERPLATE],
9461016ad83Smrg[m4_require([_LT_DECL_SED])dnl
9471016ad83Smrgac_outfile=conftest.$ac_objext
9481016ad83Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
9491016ad83Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
9501016ad83Smrg_lt_linker_boilerplate=`cat conftest.err`
9511016ad83Smrg$RM -r conftest*
9521016ad83Smrg])# _LT_LINKER_BOILERPLATE
9531016ad83Smrg
9541016ad83Smrg# _LT_REQUIRED_DARWIN_CHECKS
9551016ad83Smrg# -------------------------
9561016ad83Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
9571016ad83Smrg  case $host_os in
9581016ad83Smrg    rhapsody* | darwin*)
9591016ad83Smrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
9601016ad83Smrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
9611016ad83Smrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
9621016ad83Smrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
9631016ad83Smrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
9641016ad83Smrg    _LT_DECL([], [DSYMUTIL], [1],
9651016ad83Smrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
9661016ad83Smrg    _LT_DECL([], [NMEDIT], [1],
9671016ad83Smrg      [Tool to change global to local symbols on Mac OS X])
9681016ad83Smrg    _LT_DECL([], [LIPO], [1],
9691016ad83Smrg      [Tool to manipulate fat objects and archives on Mac OS X])
9701016ad83Smrg    _LT_DECL([], [OTOOL], [1],
9711016ad83Smrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
9721016ad83Smrg    _LT_DECL([], [OTOOL64], [1],
9731016ad83Smrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
9741016ad83Smrg
9751016ad83Smrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
9761016ad83Smrg      [lt_cv_apple_cc_single_mod=no
9771016ad83Smrg      if test -z "${LT_MULTI_MODULE}"; then
9781016ad83Smrg	# By default we will add the -single_module flag. You can override
9791016ad83Smrg	# by either setting the environment variable LT_MULTI_MODULE
9801016ad83Smrg	# non-empty at configure time, or by adding -multi_module to the
9811016ad83Smrg	# link flags.
9821016ad83Smrg	rm -rf libconftest.dylib*
9831016ad83Smrg	echo "int foo(void){return 1;}" > conftest.c
9841016ad83Smrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
9851016ad83Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
9861016ad83Smrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
9871016ad83Smrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
9881016ad83Smrg        _lt_result=$?
9891016ad83Smrg	# If there is a non-empty error log, and "single_module"
9901016ad83Smrg	# appears in it, assume the flag caused a linker warning
9911016ad83Smrg        if test -s conftest.err && $GREP single_module conftest.err; then
9921016ad83Smrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
9931016ad83Smrg	# Otherwise, if the output was created with a 0 exit code from
9941016ad83Smrg	# the compiler, it worked.
9951016ad83Smrg	elif test -f libconftest.dylib && test $_lt_result -eq 0; then
9961016ad83Smrg	  lt_cv_apple_cc_single_mod=yes
9971016ad83Smrg	else
9981016ad83Smrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
9991016ad83Smrg	fi
10001016ad83Smrg	rm -rf libconftest.dylib*
10011016ad83Smrg	rm -f conftest.*
10021016ad83Smrg      fi])
10031016ad83Smrg
10041016ad83Smrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
10051016ad83Smrg      [lt_cv_ld_exported_symbols_list],
10061016ad83Smrg      [lt_cv_ld_exported_symbols_list=no
10071016ad83Smrg      save_LDFLAGS=$LDFLAGS
10081016ad83Smrg      echo "_main" > conftest.sym
10091016ad83Smrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
10101016ad83Smrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
10111016ad83Smrg	[lt_cv_ld_exported_symbols_list=yes],
10121016ad83Smrg	[lt_cv_ld_exported_symbols_list=no])
10131016ad83Smrg	LDFLAGS="$save_LDFLAGS"
10141016ad83Smrg    ])
10151016ad83Smrg
10161016ad83Smrg    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
10171016ad83Smrg      [lt_cv_ld_force_load=no
10181016ad83Smrg      cat > conftest.c << _LT_EOF
10191016ad83Smrgint forced_loaded() { return 2;}
10201016ad83Smrg_LT_EOF
10211016ad83Smrg      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
10221016ad83Smrg      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
10231016ad83Smrg      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
10241016ad83Smrg      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
10251016ad83Smrg      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
10261016ad83Smrg      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
10271016ad83Smrg      cat > conftest.c << _LT_EOF
10281016ad83Smrgint main() { return 0;}
10291016ad83Smrg_LT_EOF
10301016ad83Smrg      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
10311016ad83Smrg      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
10321016ad83Smrg      _lt_result=$?
10331016ad83Smrg      if test -s conftest.err && $GREP force_load conftest.err; then
10341016ad83Smrg	cat conftest.err >&AS_MESSAGE_LOG_FD
10351016ad83Smrg      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
10361016ad83Smrg	lt_cv_ld_force_load=yes
10371016ad83Smrg      else
10381016ad83Smrg	cat conftest.err >&AS_MESSAGE_LOG_FD
10391016ad83Smrg      fi
10401016ad83Smrg        rm -f conftest.err libconftest.a conftest conftest.c
10411016ad83Smrg        rm -rf conftest.dSYM
10421016ad83Smrg    ])
10431016ad83Smrg    case $host_os in
10441016ad83Smrg    rhapsody* | darwin1.[[012]])
10451016ad83Smrg      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
10461016ad83Smrg    darwin1.*)
10471016ad83Smrg      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
10481016ad83Smrg    darwin*) # darwin 5.x on
10491016ad83Smrg      # if running on 10.5 or later, the deployment target defaults
10501016ad83Smrg      # to the OS version, if on x86, and 10.4, the deployment
10511016ad83Smrg      # target defaults to 10.4. Don't you love it?
10521016ad83Smrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10531016ad83Smrg	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
10541016ad83Smrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
10551016ad83Smrg	10.[[012]]*)
10561016ad83Smrg	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
10571016ad83Smrg	10.*)
10581016ad83Smrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
10591016ad83Smrg      esac
10601016ad83Smrg    ;;
10611016ad83Smrg  esac
10621016ad83Smrg    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
10631016ad83Smrg      _lt_dar_single_mod='$single_module'
10641016ad83Smrg    fi
10651016ad83Smrg    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
10661016ad83Smrg      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
10671016ad83Smrg    else
10681016ad83Smrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
10691016ad83Smrg    fi
10701016ad83Smrg    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
10711016ad83Smrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
10721016ad83Smrg    else
10731016ad83Smrg      _lt_dsymutil=
10741016ad83Smrg    fi
10751016ad83Smrg    ;;
10761016ad83Smrg  esac
10771016ad83Smrg])
10781016ad83Smrg
10791016ad83Smrg
10801016ad83Smrg# _LT_DARWIN_LINKER_FEATURES([TAG])
10811016ad83Smrg# ---------------------------------
10821016ad83Smrg# Checks for linker and compiler features on darwin
10831016ad83Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
10841016ad83Smrg[
10851016ad83Smrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
10861016ad83Smrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
10871016ad83Smrg  _LT_TAGVAR(hardcode_direct, $1)=no
10881016ad83Smrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
10891016ad83Smrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
10901016ad83Smrg  if test "$lt_cv_ld_force_load" = "yes"; then
10911016ad83Smrg    _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\"`'
10921016ad83Smrg    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
10931016ad83Smrg                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
10941016ad83Smrg  else
10951016ad83Smrg    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
10961016ad83Smrg  fi
10971016ad83Smrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
10981016ad83Smrg  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
10991016ad83Smrg  case $cc_basename in
11001016ad83Smrg     ifort*) _lt_dar_can_shared=yes ;;
11011016ad83Smrg     *) _lt_dar_can_shared=$GCC ;;
11021016ad83Smrg  esac
11031016ad83Smrg  if test "$_lt_dar_can_shared" = "yes"; then
11041016ad83Smrg    output_verbose_link_cmd=func_echo_all
11051016ad83Smrg    _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}"
11061016ad83Smrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
11071016ad83Smrg    _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}"
11081016ad83Smrg    _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}"
11091016ad83Smrg    m4_if([$1], [CXX],
11101016ad83Smrg[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
11111016ad83Smrg      _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}"
11121016ad83Smrg      _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}"
11131016ad83Smrg    fi
11141016ad83Smrg],[])
11151016ad83Smrg  else
11161016ad83Smrg  _LT_TAGVAR(ld_shlibs, $1)=no
11171016ad83Smrg  fi
11181016ad83Smrg])
11191016ad83Smrg
11201016ad83Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
11211016ad83Smrg# ----------------------------------
11221016ad83Smrg# Links a minimal program and checks the executable
11231016ad83Smrg# for the system default hardcoded library path. In most cases,
11241016ad83Smrg# this is /usr/lib:/lib, but when the MPI compilers are used
11251016ad83Smrg# the location of the communication and MPI libs are included too.
11261016ad83Smrg# If we don't find anything, use the default library path according
11271016ad83Smrg# to the aix ld manual.
11281016ad83Smrg# Store the results from the different compilers for each TAGNAME.
11291016ad83Smrg# Allow to override them for all tags through lt_cv_aix_libpath.
11301016ad83Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
11311016ad83Smrg[m4_require([_LT_DECL_SED])dnl
11321016ad83Smrgif test "${lt_cv_aix_libpath+set}" = set; then
11331016ad83Smrg  aix_libpath=$lt_cv_aix_libpath
11341016ad83Smrgelse
11351016ad83Smrg  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
11361016ad83Smrg  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
11371016ad83Smrg  lt_aix_libpath_sed='[
11381016ad83Smrg      /Import File Strings/,/^$/ {
11391016ad83Smrg	  /^0/ {
11401016ad83Smrg	      s/^0  *\([^ ]*\) *$/\1/
11411016ad83Smrg	      p
11421016ad83Smrg	  }
11431016ad83Smrg      }]'
11441016ad83Smrg  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11451016ad83Smrg  # Check for a 64-bit object if we didn't find anything.
11461016ad83Smrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
11471016ad83Smrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11481016ad83Smrg  fi],[])
11491016ad83Smrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
11501016ad83Smrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
11511016ad83Smrg  fi
11521016ad83Smrg  ])
11531016ad83Smrg  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
11541016ad83Smrgfi
11551016ad83Smrg])# _LT_SYS_MODULE_PATH_AIX
11561016ad83Smrg
11571016ad83Smrg
11581016ad83Smrg# _LT_SHELL_INIT(ARG)
11591016ad83Smrg# -------------------
11601016ad83Smrgm4_define([_LT_SHELL_INIT],
11611016ad83Smrg[m4_divert_text([M4SH-INIT], [$1
11621016ad83Smrg])])# _LT_SHELL_INIT
11631016ad83Smrg
11641016ad83Smrg
11651016ad83Smrg
11661016ad83Smrg# _LT_PROG_ECHO_BACKSLASH
11671016ad83Smrg# -----------------------
11681016ad83Smrg# Find how we can fake an echo command that does not interpret backslash.
11691016ad83Smrg# In particular, with Autoconf 2.60 or later we add some code to the start
11701016ad83Smrg# of the generated configure script which will find a shell with a builtin
11711016ad83Smrg# printf (which we can use as an echo command).
11721016ad83Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
11731016ad83Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
11741016ad83SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
11751016ad83SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
11761016ad83Smrg
11771016ad83SmrgAC_MSG_CHECKING([how to print strings])
11781016ad83Smrg# Test print first, because it will be a builtin if present.
11791016ad83Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
11801016ad83Smrg   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
11811016ad83Smrg  ECHO='print -r --'
11821016ad83Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
11831016ad83Smrg  ECHO='printf %s\n'
11841016ad83Smrgelse
11851016ad83Smrg  # Use this function as a fallback that always works.
11861016ad83Smrg  func_fallback_echo ()
11871016ad83Smrg  {
11881016ad83Smrg    eval 'cat <<_LTECHO_EOF
11891016ad83Smrg$[]1
11901016ad83Smrg_LTECHO_EOF'
11911016ad83Smrg  }
11921016ad83Smrg  ECHO='func_fallback_echo'
11931016ad83Smrgfi
11941016ad83Smrg
11951016ad83Smrg# func_echo_all arg...
11961016ad83Smrg# Invoke $ECHO with all args, space-separated.
11971016ad83Smrgfunc_echo_all ()
11981016ad83Smrg{
11991016ad83Smrg    $ECHO "$*" 
12001016ad83Smrg}
12011016ad83Smrg
12021016ad83Smrgcase "$ECHO" in
12031016ad83Smrg  printf*) AC_MSG_RESULT([printf]) ;;
12041016ad83Smrg  print*) AC_MSG_RESULT([print -r]) ;;
12051016ad83Smrg  *) AC_MSG_RESULT([cat]) ;;
12061016ad83Smrgesac
12071016ad83Smrg
12081016ad83Smrgm4_ifdef([_AS_DETECT_SUGGESTED],
12091016ad83Smrg[_AS_DETECT_SUGGESTED([
12101016ad83Smrg  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
12111016ad83Smrg    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
12121016ad83Smrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
12131016ad83Smrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
12141016ad83Smrg    PATH=/empty FPATH=/empty; export PATH FPATH
12151016ad83Smrg    test "X`printf %s $ECHO`" = "X$ECHO" \
12161016ad83Smrg      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
12171016ad83Smrg
12181016ad83Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
12191016ad83Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
12201016ad83Smrg])# _LT_PROG_ECHO_BACKSLASH
12211016ad83Smrg
12221016ad83Smrg
12231016ad83Smrg# _LT_WITH_SYSROOT
12241016ad83Smrg# ----------------
12251016ad83SmrgAC_DEFUN([_LT_WITH_SYSROOT],
12261016ad83Smrg[AC_MSG_CHECKING([for sysroot])
12271016ad83SmrgAC_ARG_WITH([sysroot],
12281016ad83Smrg[  --with-sysroot[=DIR] Search for dependent libraries within DIR
12291016ad83Smrg                        (or the compiler's sysroot if not specified).],
12301016ad83Smrg[], [with_sysroot=no])
12311016ad83Smrg
12321016ad83Smrgdnl lt_sysroot will always be passed unquoted.  We quote it here
12331016ad83Smrgdnl in case the user passed a directory name.
12341016ad83Smrglt_sysroot=
12351016ad83Smrgcase ${with_sysroot} in #(
12361016ad83Smrg yes)
12371016ad83Smrg   if test "$GCC" = yes; then
12381016ad83Smrg     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
12391016ad83Smrg   fi
12401016ad83Smrg   ;; #(
12411016ad83Smrg /*)
12421016ad83Smrg   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
12431016ad83Smrg   ;; #(
12441016ad83Smrg no|'')
12451016ad83Smrg   ;; #(
12461016ad83Smrg *)
12471016ad83Smrg   AC_MSG_RESULT([${with_sysroot}])
12481016ad83Smrg   AC_MSG_ERROR([The sysroot must be an absolute path.])
12491016ad83Smrg   ;;
12501016ad83Smrgesac
12511016ad83Smrg
12521016ad83Smrg AC_MSG_RESULT([${lt_sysroot:-no}])
12531016ad83Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
12541016ad83Smrg[dependent libraries, and in which our libraries should be installed.])])
12551016ad83Smrg
12561016ad83Smrg# _LT_ENABLE_LOCK
12571016ad83Smrg# ---------------
12581016ad83Smrgm4_defun([_LT_ENABLE_LOCK],
12591016ad83Smrg[AC_ARG_ENABLE([libtool-lock],
12601016ad83Smrg  [AS_HELP_STRING([--disable-libtool-lock],
12611016ad83Smrg    [avoid locking (might break parallel builds)])])
12621016ad83Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
12631016ad83Smrg
12641016ad83Smrg# Some flags need to be propagated to the compiler or linker for good
12651016ad83Smrg# libtool support.
12661016ad83Smrgcase $host in
12671016ad83Smrgia64-*-hpux*)
12681016ad83Smrg  # Find out which ABI we are using.
12691016ad83Smrg  echo 'int i;' > conftest.$ac_ext
12701016ad83Smrg  if AC_TRY_EVAL(ac_compile); then
12711016ad83Smrg    case `/usr/bin/file conftest.$ac_objext` in
12721016ad83Smrg      *ELF-32*)
12731016ad83Smrg	HPUX_IA64_MODE="32"
12741016ad83Smrg	;;
12751016ad83Smrg      *ELF-64*)
12761016ad83Smrg	HPUX_IA64_MODE="64"
12771016ad83Smrg	;;
12781016ad83Smrg    esac
12791016ad83Smrg  fi
12801016ad83Smrg  rm -rf conftest*
12811016ad83Smrg  ;;
12821016ad83Smrg*-*-irix6*)
12831016ad83Smrg  # Find out which ABI we are using.
12841016ad83Smrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
12851016ad83Smrg  if AC_TRY_EVAL(ac_compile); then
12861016ad83Smrg    if test "$lt_cv_prog_gnu_ld" = yes; then
12871016ad83Smrg      case `/usr/bin/file conftest.$ac_objext` in
12881016ad83Smrg	*32-bit*)
12891016ad83Smrg	  LD="${LD-ld} -melf32bsmip"
12901016ad83Smrg	  ;;
12911016ad83Smrg	*N32*)
12921016ad83Smrg	  LD="${LD-ld} -melf32bmipn32"
12931016ad83Smrg	  ;;
12941016ad83Smrg	*64-bit*)
12951016ad83Smrg	  LD="${LD-ld} -melf64bmip"
12961016ad83Smrg	;;
12971016ad83Smrg      esac
12981016ad83Smrg    else
12991016ad83Smrg      case `/usr/bin/file conftest.$ac_objext` in
13001016ad83Smrg	*32-bit*)
13011016ad83Smrg	  LD="${LD-ld} -32"
13021016ad83Smrg	  ;;
13031016ad83Smrg	*N32*)
13041016ad83Smrg	  LD="${LD-ld} -n32"
13051016ad83Smrg	  ;;
13061016ad83Smrg	*64-bit*)
13071016ad83Smrg	  LD="${LD-ld} -64"
13081016ad83Smrg	  ;;
13091016ad83Smrg      esac
13101016ad83Smrg    fi
13111016ad83Smrg  fi
13121016ad83Smrg  rm -rf conftest*
13131016ad83Smrg  ;;
13141016ad83Smrg
13151016ad83Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
13161016ad83Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
13171016ad83Smrg  # Find out which ABI we are using.
13181016ad83Smrg  echo 'int i;' > conftest.$ac_ext
13191016ad83Smrg  if AC_TRY_EVAL(ac_compile); then
13201016ad83Smrg    case `/usr/bin/file conftest.o` in
13211016ad83Smrg      *32-bit*)
13221016ad83Smrg	case $host in
13231016ad83Smrg	  x86_64-*kfreebsd*-gnu)
13241016ad83Smrg	    LD="${LD-ld} -m elf_i386_fbsd"
13251016ad83Smrg	    ;;
13261016ad83Smrg	  x86_64-*linux*)
13271016ad83Smrg	    case `/usr/bin/file conftest.o` in
13281016ad83Smrg	      *x86-64*)
13291016ad83Smrg		LD="${LD-ld} -m elf32_x86_64"
13301016ad83Smrg		;;
13311016ad83Smrg	      *)
13321016ad83Smrg		LD="${LD-ld} -m elf_i386"
13331016ad83Smrg		;;
13341016ad83Smrg	    esac
13351016ad83Smrg	    ;;
13361016ad83Smrg	  ppc64-*linux*|powerpc64-*linux*)
13371016ad83Smrg	    LD="${LD-ld} -m elf32ppclinux"
13381016ad83Smrg	    ;;
13391016ad83Smrg	  s390x-*linux*)
13401016ad83Smrg	    LD="${LD-ld} -m elf_s390"
13411016ad83Smrg	    ;;
13421016ad83Smrg	  sparc64-*linux*)
13431016ad83Smrg	    LD="${LD-ld} -m elf32_sparc"
13441016ad83Smrg	    ;;
13451016ad83Smrg	esac
13461016ad83Smrg	;;
13471016ad83Smrg      *64-bit*)
13481016ad83Smrg	case $host in
13491016ad83Smrg	  x86_64-*kfreebsd*-gnu)
13501016ad83Smrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
13511016ad83Smrg	    ;;
13521016ad83Smrg	  x86_64-*linux*)
13531016ad83Smrg	    LD="${LD-ld} -m elf_x86_64"
13541016ad83Smrg	    ;;
13551016ad83Smrg	  ppc*-*linux*|powerpc*-*linux*)
13561016ad83Smrg	    LD="${LD-ld} -m elf64ppc"
13571016ad83Smrg	    ;;
13581016ad83Smrg	  s390*-*linux*|s390*-*tpf*)
13591016ad83Smrg	    LD="${LD-ld} -m elf64_s390"
13601016ad83Smrg	    ;;
13611016ad83Smrg	  sparc*-*linux*)
13621016ad83Smrg	    LD="${LD-ld} -m elf64_sparc"
13631016ad83Smrg	    ;;
13641016ad83Smrg	esac
13651016ad83Smrg	;;
13661016ad83Smrg    esac
13671016ad83Smrg  fi
13681016ad83Smrg  rm -rf conftest*
13691016ad83Smrg  ;;
13701016ad83Smrg
13711016ad83Smrg*-*-sco3.2v5*)
13721016ad83Smrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
13731016ad83Smrg  SAVE_CFLAGS="$CFLAGS"
13741016ad83Smrg  CFLAGS="$CFLAGS -belf"
13751016ad83Smrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
13761016ad83Smrg    [AC_LANG_PUSH(C)
13771016ad83Smrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
13781016ad83Smrg     AC_LANG_POP])
13791016ad83Smrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
13801016ad83Smrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
13811016ad83Smrg    CFLAGS="$SAVE_CFLAGS"
13821016ad83Smrg  fi
13831016ad83Smrg  ;;
13841016ad83Smrg*-*solaris*)
13851016ad83Smrg  # Find out which ABI we are using.
13861016ad83Smrg  echo 'int i;' > conftest.$ac_ext
13871016ad83Smrg  if AC_TRY_EVAL(ac_compile); then
13881016ad83Smrg    case `/usr/bin/file conftest.o` in
13891016ad83Smrg    *64-bit*)
13901016ad83Smrg      case $lt_cv_prog_gnu_ld in
13911016ad83Smrg      yes*)
13921016ad83Smrg        case $host in
13931016ad83Smrg        i?86-*-solaris*)
13941016ad83Smrg          LD="${LD-ld} -m elf_x86_64"
13951016ad83Smrg          ;;
13961016ad83Smrg        sparc*-*-solaris*)
13971016ad83Smrg          LD="${LD-ld} -m elf64_sparc"
13981016ad83Smrg          ;;
13991016ad83Smrg        esac
14001016ad83Smrg        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
14011016ad83Smrg        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
14021016ad83Smrg          LD="${LD-ld}_sol2"
14031016ad83Smrg        fi
14041016ad83Smrg        ;;
14051016ad83Smrg      *)
14061016ad83Smrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
14071016ad83Smrg	  LD="${LD-ld} -64"
14081016ad83Smrg	fi
14091016ad83Smrg	;;
14101016ad83Smrg      esac
14111016ad83Smrg      ;;
14121016ad83Smrg    esac
14131016ad83Smrg  fi
14141016ad83Smrg  rm -rf conftest*
14151016ad83Smrg  ;;
14161016ad83Smrgesac
14171016ad83Smrg
14181016ad83Smrgneed_locks="$enable_libtool_lock"
14191016ad83Smrg])# _LT_ENABLE_LOCK
14201016ad83Smrg
14211016ad83Smrg
14221016ad83Smrg# _LT_PROG_AR
14231016ad83Smrg# -----------
14241016ad83Smrgm4_defun([_LT_PROG_AR],
14251016ad83Smrg[AC_CHECK_TOOLS(AR, [ar], false)
14261016ad83Smrg: ${AR=ar}
14271016ad83Smrg: ${AR_FLAGS=cru}
14281016ad83Smrg_LT_DECL([], [AR], [1], [The archiver])
14291016ad83Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
14301016ad83Smrg
14311016ad83SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
14321016ad83Smrg  [lt_cv_ar_at_file=no
14331016ad83Smrg   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
14341016ad83Smrg     [echo conftest.$ac_objext > conftest.lst
14351016ad83Smrg      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
14361016ad83Smrg      AC_TRY_EVAL([lt_ar_try])
14371016ad83Smrg      if test "$ac_status" -eq 0; then
14381016ad83Smrg	# Ensure the archiver fails upon bogus file names.
14391016ad83Smrg	rm -f conftest.$ac_objext libconftest.a
14401016ad83Smrg	AC_TRY_EVAL([lt_ar_try])
14411016ad83Smrg	if test "$ac_status" -ne 0; then
14421016ad83Smrg          lt_cv_ar_at_file=@
14431016ad83Smrg        fi
14441016ad83Smrg      fi
14451016ad83Smrg      rm -f conftest.* libconftest.a
14461016ad83Smrg     ])
14471016ad83Smrg  ])
14481016ad83Smrg
14491016ad83Smrgif test "x$lt_cv_ar_at_file" = xno; then
14501016ad83Smrg  archiver_list_spec=
14511016ad83Smrgelse
14521016ad83Smrg  archiver_list_spec=$lt_cv_ar_at_file
14531016ad83Smrgfi
14541016ad83Smrg_LT_DECL([], [archiver_list_spec], [1],
14551016ad83Smrg  [How to feed a file listing to the archiver])
14561016ad83Smrg])# _LT_PROG_AR
14571016ad83Smrg
14581016ad83Smrg
14591016ad83Smrg# _LT_CMD_OLD_ARCHIVE
14601016ad83Smrg# -------------------
14611016ad83Smrgm4_defun([_LT_CMD_OLD_ARCHIVE],
14621016ad83Smrg[_LT_PROG_AR
14631016ad83Smrg
14641016ad83SmrgAC_CHECK_TOOL(STRIP, strip, :)
14651016ad83Smrgtest -z "$STRIP" && STRIP=:
14661016ad83Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
14671016ad83Smrg
14681016ad83SmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
14691016ad83Smrgtest -z "$RANLIB" && RANLIB=:
14701016ad83Smrg_LT_DECL([], [RANLIB], [1],
14711016ad83Smrg    [Commands used to install an old-style archive])
14721016ad83Smrg
14731016ad83Smrg# Determine commands to create old-style static archives.
14741016ad83Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
14751016ad83Smrgold_postinstall_cmds='chmod 644 $oldlib'
14761016ad83Smrgold_postuninstall_cmds=
14771016ad83Smrg
14781016ad83Smrgif test -n "$RANLIB"; then
14791016ad83Smrg  case $host_os in
14801016ad83Smrg  openbsd*)
14811016ad83Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
14821016ad83Smrg    ;;
14831016ad83Smrg  *)
14841016ad83Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
14851016ad83Smrg    ;;
14861016ad83Smrg  esac
14871016ad83Smrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
14881016ad83Smrgfi
14891016ad83Smrg
14901016ad83Smrgcase $host_os in
14911016ad83Smrg  darwin*)
14921016ad83Smrg    lock_old_archive_extraction=yes ;;
14931016ad83Smrg  *)
14941016ad83Smrg    lock_old_archive_extraction=no ;;
14951016ad83Smrgesac
14961016ad83Smrg_LT_DECL([], [old_postinstall_cmds], [2])
14971016ad83Smrg_LT_DECL([], [old_postuninstall_cmds], [2])
14981016ad83Smrg_LT_TAGDECL([], [old_archive_cmds], [2],
14991016ad83Smrg    [Commands used to build an old-style archive])
15001016ad83Smrg_LT_DECL([], [lock_old_archive_extraction], [0],
15011016ad83Smrg    [Whether to use a lock for old archive extraction])
15021016ad83Smrg])# _LT_CMD_OLD_ARCHIVE
15031016ad83Smrg
15041016ad83Smrg
15051016ad83Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
15061016ad83Smrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
15071016ad83Smrg# ----------------------------------------------------------------
15081016ad83Smrg# Check whether the given compiler option works
15091016ad83SmrgAC_DEFUN([_LT_COMPILER_OPTION],
15101016ad83Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
15111016ad83Smrgm4_require([_LT_DECL_SED])dnl
15121016ad83SmrgAC_CACHE_CHECK([$1], [$2],
15131016ad83Smrg  [$2=no
15141016ad83Smrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
15151016ad83Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
15161016ad83Smrg   lt_compiler_flag="$3"
15171016ad83Smrg   # Insert the option either (1) after the last *FLAGS variable, or
15181016ad83Smrg   # (2) before a word containing "conftest.", or (3) at the end.
15191016ad83Smrg   # Note that $ac_compile itself does not contain backslashes and begins
15201016ad83Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
15211016ad83Smrg   # The option is referenced via a variable to avoid confusing sed.
15221016ad83Smrg   lt_compile=`echo "$ac_compile" | $SED \
15231016ad83Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
15241016ad83Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
15251016ad83Smrg   -e 's:$: $lt_compiler_flag:'`
15261016ad83Smrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
15271016ad83Smrg   (eval "$lt_compile" 2>conftest.err)
15281016ad83Smrg   ac_status=$?
15291016ad83Smrg   cat conftest.err >&AS_MESSAGE_LOG_FD
15301016ad83Smrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
15311016ad83Smrg   if (exit $ac_status) && test -s "$ac_outfile"; then
15321016ad83Smrg     # The compiler can only warn and ignore the option if not recognized
15331016ad83Smrg     # So say no if there are warnings other than the usual output.
15341016ad83Smrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
15351016ad83Smrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
15361016ad83Smrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
15371016ad83Smrg       $2=yes
15381016ad83Smrg     fi
15391016ad83Smrg   fi
15401016ad83Smrg   $RM conftest*
15411016ad83Smrg])
15421016ad83Smrg
15431016ad83Smrgif test x"[$]$2" = xyes; then
15441016ad83Smrg    m4_if([$5], , :, [$5])
15451016ad83Smrgelse
15461016ad83Smrg    m4_if([$6], , :, [$6])
15471016ad83Smrgfi
15481016ad83Smrg])# _LT_COMPILER_OPTION
15491016ad83Smrg
15501016ad83Smrg# Old name:
15511016ad83SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
15521016ad83Smrgdnl aclocal-1.4 backwards compatibility:
15531016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
15541016ad83Smrg
15551016ad83Smrg
15561016ad83Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
15571016ad83Smrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
15581016ad83Smrg# ----------------------------------------------------
15591016ad83Smrg# Check whether the given linker option works
15601016ad83SmrgAC_DEFUN([_LT_LINKER_OPTION],
15611016ad83Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
15621016ad83Smrgm4_require([_LT_DECL_SED])dnl
15631016ad83SmrgAC_CACHE_CHECK([$1], [$2],
15641016ad83Smrg  [$2=no
15651016ad83Smrg   save_LDFLAGS="$LDFLAGS"
15661016ad83Smrg   LDFLAGS="$LDFLAGS $3"
15671016ad83Smrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
15681016ad83Smrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
15691016ad83Smrg     # The linker can only warn and ignore the option if not recognized
15701016ad83Smrg     # So say no if there are warnings
15711016ad83Smrg     if test -s conftest.err; then
15721016ad83Smrg       # Append any errors to the config.log.
15731016ad83Smrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
15741016ad83Smrg       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
15751016ad83Smrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
15761016ad83Smrg       if diff conftest.exp conftest.er2 >/dev/null; then
15771016ad83Smrg         $2=yes
15781016ad83Smrg       fi
15791016ad83Smrg     else
15801016ad83Smrg       $2=yes
15811016ad83Smrg     fi
15821016ad83Smrg   fi
15831016ad83Smrg   $RM -r conftest*
15841016ad83Smrg   LDFLAGS="$save_LDFLAGS"
15851016ad83Smrg])
15861016ad83Smrg
15871016ad83Smrgif test x"[$]$2" = xyes; then
15881016ad83Smrg    m4_if([$4], , :, [$4])
15891016ad83Smrgelse
15901016ad83Smrg    m4_if([$5], , :, [$5])
15911016ad83Smrgfi
15921016ad83Smrg])# _LT_LINKER_OPTION
15931016ad83Smrg
15941016ad83Smrg# Old name:
15951016ad83SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
15961016ad83Smrgdnl aclocal-1.4 backwards compatibility:
15971016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
15981016ad83Smrg
15991016ad83Smrg
16001016ad83Smrg# LT_CMD_MAX_LEN
16011016ad83Smrg#---------------
16021016ad83SmrgAC_DEFUN([LT_CMD_MAX_LEN],
16031016ad83Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
16041016ad83Smrg# find the maximum length of command line arguments
16051016ad83SmrgAC_MSG_CHECKING([the maximum length of command line arguments])
16061016ad83SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
16071016ad83Smrg  i=0
16081016ad83Smrg  teststring="ABCD"
16091016ad83Smrg
16101016ad83Smrg  case $build_os in
16111016ad83Smrg  msdosdjgpp*)
16121016ad83Smrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
16131016ad83Smrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
16141016ad83Smrg    # during glob expansion).  Even if it were fixed, the result of this
16151016ad83Smrg    # check would be larger than it should be.
16161016ad83Smrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
16171016ad83Smrg    ;;
16181016ad83Smrg
16191016ad83Smrg  gnu*)
16201016ad83Smrg    # Under GNU Hurd, this test is not required because there is
16211016ad83Smrg    # no limit to the length of command line arguments.
16221016ad83Smrg    # Libtool will interpret -1 as no limit whatsoever
16231016ad83Smrg    lt_cv_sys_max_cmd_len=-1;
16241016ad83Smrg    ;;
16251016ad83Smrg
16261016ad83Smrg  cygwin* | mingw* | cegcc*)
16271016ad83Smrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
16281016ad83Smrg    # about 5 minutes as the teststring grows exponentially.
16291016ad83Smrg    # Worse, since 9x/ME are not pre-emptively multitasking,
16301016ad83Smrg    # you end up with a "frozen" computer, even though with patience
16311016ad83Smrg    # the test eventually succeeds (with a max line length of 256k).
16321016ad83Smrg    # Instead, let's just punt: use the minimum linelength reported by
16331016ad83Smrg    # all of the supported platforms: 8192 (on NT/2K/XP).
16341016ad83Smrg    lt_cv_sys_max_cmd_len=8192;
16351016ad83Smrg    ;;
16361016ad83Smrg
16371016ad83Smrg  mint*)
16381016ad83Smrg    # On MiNT this can take a long time and run out of memory.
16391016ad83Smrg    lt_cv_sys_max_cmd_len=8192;
16401016ad83Smrg    ;;
16411016ad83Smrg
16421016ad83Smrg  amigaos*)
16431016ad83Smrg    # On AmigaOS with pdksh, this test takes hours, literally.
16441016ad83Smrg    # So we just punt and use a minimum line length of 8192.
16451016ad83Smrg    lt_cv_sys_max_cmd_len=8192;
16461016ad83Smrg    ;;
16471016ad83Smrg
16481016ad83Smrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
16491016ad83Smrg    # This has been around since 386BSD, at least.  Likely further.
16501016ad83Smrg    if test -x /sbin/sysctl; then
16511016ad83Smrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
16521016ad83Smrg    elif test -x /usr/sbin/sysctl; then
16531016ad83Smrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
16541016ad83Smrg    else
16551016ad83Smrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
16561016ad83Smrg    fi
16571016ad83Smrg    # And add a safety zone
16581016ad83Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
16591016ad83Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
16601016ad83Smrg    ;;
16611016ad83Smrg
16621016ad83Smrg  interix*)
16631016ad83Smrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
16641016ad83Smrg    lt_cv_sys_max_cmd_len=196608
16651016ad83Smrg    ;;
16661016ad83Smrg
16671016ad83Smrg  os2*)
16681016ad83Smrg    # The test takes a long time on OS/2.
16691016ad83Smrg    lt_cv_sys_max_cmd_len=8192
16701016ad83Smrg    ;;
16711016ad83Smrg
16721016ad83Smrg  osf*)
16731016ad83Smrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
16741016ad83Smrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
16751016ad83Smrg    # nice to cause kernel panics so lets avoid the loop below.
16761016ad83Smrg    # First set a reasonable default.
16771016ad83Smrg    lt_cv_sys_max_cmd_len=16384
16781016ad83Smrg    #
16791016ad83Smrg    if test -x /sbin/sysconfig; then
16801016ad83Smrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
16811016ad83Smrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
16821016ad83Smrg      esac
16831016ad83Smrg    fi
16841016ad83Smrg    ;;
16851016ad83Smrg  sco3.2v5*)
16861016ad83Smrg    lt_cv_sys_max_cmd_len=102400
16871016ad83Smrg    ;;
16881016ad83Smrg  sysv5* | sco5v6* | sysv4.2uw2*)
16891016ad83Smrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
16901016ad83Smrg    if test -n "$kargmax"; then
16911016ad83Smrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
16921016ad83Smrg    else
16931016ad83Smrg      lt_cv_sys_max_cmd_len=32768
16941016ad83Smrg    fi
16951016ad83Smrg    ;;
16961016ad83Smrg  *)
16971016ad83Smrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
16981016ad83Smrg    if test -n "$lt_cv_sys_max_cmd_len" && \
16991016ad83Smrg	test undefined != "$lt_cv_sys_max_cmd_len"; then
17001016ad83Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
17011016ad83Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
17021016ad83Smrg    else
17031016ad83Smrg      # Make teststring a little bigger before we do anything with it.
17041016ad83Smrg      # a 1K string should be a reasonable start.
17051016ad83Smrg      for i in 1 2 3 4 5 6 7 8 ; do
17061016ad83Smrg        teststring=$teststring$teststring
17071016ad83Smrg      done
17081016ad83Smrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
17091016ad83Smrg      # If test is not a shell built-in, we'll probably end up computing a
17101016ad83Smrg      # maximum length that is only half of the actual maximum length, but
17111016ad83Smrg      # we can't tell.
17121016ad83Smrg      while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
17131016ad83Smrg	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
17141016ad83Smrg	      test $i != 17 # 1/2 MB should be enough
17151016ad83Smrg      do
17161016ad83Smrg        i=`expr $i + 1`
17171016ad83Smrg        teststring=$teststring$teststring
17181016ad83Smrg      done
17191016ad83Smrg      # Only check the string length outside the loop.
17201016ad83Smrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
17211016ad83Smrg      teststring=
17221016ad83Smrg      # Add a significant safety factor because C++ compilers can tack on
17231016ad83Smrg      # massive amounts of additional arguments before passing them to the
17241016ad83Smrg      # linker.  It appears as though 1/2 is a usable value.
17251016ad83Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
17261016ad83Smrg    fi
17271016ad83Smrg    ;;
17281016ad83Smrg  esac
17291016ad83Smrg])
17301016ad83Smrgif test -n $lt_cv_sys_max_cmd_len ; then
17311016ad83Smrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
17321016ad83Smrgelse
17331016ad83Smrg  AC_MSG_RESULT(none)
17341016ad83Smrgfi
17351016ad83Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len
17361016ad83Smrg_LT_DECL([], [max_cmd_len], [0],
17371016ad83Smrg    [What is the maximum length of a command?])
17381016ad83Smrg])# LT_CMD_MAX_LEN
17391016ad83Smrg
17401016ad83Smrg# Old name:
17411016ad83SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
17421016ad83Smrgdnl aclocal-1.4 backwards compatibility:
17431016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
17441016ad83Smrg
17451016ad83Smrg
17461016ad83Smrg# _LT_HEADER_DLFCN
17471016ad83Smrg# ----------------
17481016ad83Smrgm4_defun([_LT_HEADER_DLFCN],
17491016ad83Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
17501016ad83Smrg])# _LT_HEADER_DLFCN
17511016ad83Smrg
17521016ad83Smrg
17531016ad83Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
17541016ad83Smrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
17551016ad83Smrg# ----------------------------------------------------------------
17561016ad83Smrgm4_defun([_LT_TRY_DLOPEN_SELF],
17571016ad83Smrg[m4_require([_LT_HEADER_DLFCN])dnl
17581016ad83Smrgif test "$cross_compiling" = yes; then :
17591016ad83Smrg  [$4]
17601016ad83Smrgelse
17611016ad83Smrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
17621016ad83Smrg  lt_status=$lt_dlunknown
17631016ad83Smrg  cat > conftest.$ac_ext <<_LT_EOF
17641016ad83Smrg[#line $LINENO "configure"
17651016ad83Smrg#include "confdefs.h"
17661016ad83Smrg
17671016ad83Smrg#if HAVE_DLFCN_H
17681016ad83Smrg#include <dlfcn.h>
17691016ad83Smrg#endif
17701016ad83Smrg
17711016ad83Smrg#include <stdio.h>
17721016ad83Smrg
17731016ad83Smrg#ifdef RTLD_GLOBAL
17741016ad83Smrg#  define LT_DLGLOBAL		RTLD_GLOBAL
17751016ad83Smrg#else
17761016ad83Smrg#  ifdef DL_GLOBAL
17771016ad83Smrg#    define LT_DLGLOBAL		DL_GLOBAL
17781016ad83Smrg#  else
17791016ad83Smrg#    define LT_DLGLOBAL		0
17801016ad83Smrg#  endif
17811016ad83Smrg#endif
17821016ad83Smrg
17831016ad83Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
17841016ad83Smrg   find out it does not work in some platform. */
17851016ad83Smrg#ifndef LT_DLLAZY_OR_NOW
17861016ad83Smrg#  ifdef RTLD_LAZY
17871016ad83Smrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
17881016ad83Smrg#  else
17891016ad83Smrg#    ifdef DL_LAZY
17901016ad83Smrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
17911016ad83Smrg#    else
17921016ad83Smrg#      ifdef RTLD_NOW
17931016ad83Smrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
17941016ad83Smrg#      else
17951016ad83Smrg#        ifdef DL_NOW
17961016ad83Smrg#          define LT_DLLAZY_OR_NOW	DL_NOW
17971016ad83Smrg#        else
17981016ad83Smrg#          define LT_DLLAZY_OR_NOW	0
17991016ad83Smrg#        endif
18001016ad83Smrg#      endif
18011016ad83Smrg#    endif
18021016ad83Smrg#  endif
18031016ad83Smrg#endif
18041016ad83Smrg
18051016ad83Smrg/* When -fvisbility=hidden is used, assume the code has been annotated
18061016ad83Smrg   correspondingly for the symbols needed.  */
18071016ad83Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
18081016ad83Smrgint fnord () __attribute__((visibility("default")));
18091016ad83Smrg#endif
18101016ad83Smrg
18111016ad83Smrgint fnord () { return 42; }
18121016ad83Smrgint main ()
18131016ad83Smrg{
18141016ad83Smrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
18151016ad83Smrg  int status = $lt_dlunknown;
18161016ad83Smrg
18171016ad83Smrg  if (self)
18181016ad83Smrg    {
18191016ad83Smrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
18201016ad83Smrg      else
18211016ad83Smrg        {
18221016ad83Smrg	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
18231016ad83Smrg          else puts (dlerror ());
18241016ad83Smrg	}
18251016ad83Smrg      /* dlclose (self); */
18261016ad83Smrg    }
18271016ad83Smrg  else
18281016ad83Smrg    puts (dlerror ());
18291016ad83Smrg
18301016ad83Smrg  return status;
18311016ad83Smrg}]
18321016ad83Smrg_LT_EOF
18331016ad83Smrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
18341016ad83Smrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
18351016ad83Smrg    lt_status=$?
18361016ad83Smrg    case x$lt_status in
18371016ad83Smrg      x$lt_dlno_uscore) $1 ;;
18381016ad83Smrg      x$lt_dlneed_uscore) $2 ;;
18391016ad83Smrg      x$lt_dlunknown|x*) $3 ;;
18401016ad83Smrg    esac
18411016ad83Smrg  else :
18421016ad83Smrg    # compilation failed
18431016ad83Smrg    $3
18441016ad83Smrg  fi
18451016ad83Smrgfi
18461016ad83Smrgrm -fr conftest*
18471016ad83Smrg])# _LT_TRY_DLOPEN_SELF
18481016ad83Smrg
18491016ad83Smrg
18501016ad83Smrg# LT_SYS_DLOPEN_SELF
18511016ad83Smrg# ------------------
18521016ad83SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
18531016ad83Smrg[m4_require([_LT_HEADER_DLFCN])dnl
18541016ad83Smrgif test "x$enable_dlopen" != xyes; then
18551016ad83Smrg  enable_dlopen=unknown
18561016ad83Smrg  enable_dlopen_self=unknown
18571016ad83Smrg  enable_dlopen_self_static=unknown
18581016ad83Smrgelse
18591016ad83Smrg  lt_cv_dlopen=no
18601016ad83Smrg  lt_cv_dlopen_libs=
18611016ad83Smrg
18621016ad83Smrg  case $host_os in
18631016ad83Smrg  beos*)
18641016ad83Smrg    lt_cv_dlopen="load_add_on"
18651016ad83Smrg    lt_cv_dlopen_libs=
18661016ad83Smrg    lt_cv_dlopen_self=yes
18671016ad83Smrg    ;;
18681016ad83Smrg
18691016ad83Smrg  mingw* | pw32* | cegcc*)
18701016ad83Smrg    lt_cv_dlopen="LoadLibrary"
18711016ad83Smrg    lt_cv_dlopen_libs=
18721016ad83Smrg    ;;
18731016ad83Smrg
18741016ad83Smrg  cygwin*)
18751016ad83Smrg    lt_cv_dlopen="dlopen"
18761016ad83Smrg    lt_cv_dlopen_libs=
18771016ad83Smrg    ;;
18781016ad83Smrg
18791016ad83Smrg  darwin*)
18801016ad83Smrg  # if libdl is installed we need to link against it
18811016ad83Smrg    AC_CHECK_LIB([dl], [dlopen],
18821016ad83Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
18831016ad83Smrg    lt_cv_dlopen="dyld"
18841016ad83Smrg    lt_cv_dlopen_libs=
18851016ad83Smrg    lt_cv_dlopen_self=yes
18861016ad83Smrg    ])
18871016ad83Smrg    ;;
18881016ad83Smrg
18891016ad83Smrg  *)
18901016ad83Smrg    AC_CHECK_FUNC([shl_load],
18911016ad83Smrg	  [lt_cv_dlopen="shl_load"],
18921016ad83Smrg      [AC_CHECK_LIB([dld], [shl_load],
18931016ad83Smrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
18941016ad83Smrg	[AC_CHECK_FUNC([dlopen],
18951016ad83Smrg	      [lt_cv_dlopen="dlopen"],
18961016ad83Smrg	  [AC_CHECK_LIB([dl], [dlopen],
18971016ad83Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
18981016ad83Smrg	    [AC_CHECK_LIB([svld], [dlopen],
18991016ad83Smrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
19001016ad83Smrg	      [AC_CHECK_LIB([dld], [dld_link],
19011016ad83Smrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
19021016ad83Smrg	      ])
19031016ad83Smrg	    ])
19041016ad83Smrg	  ])
19051016ad83Smrg	])
19061016ad83Smrg      ])
19071016ad83Smrg    ;;
19081016ad83Smrg  esac
19091016ad83Smrg
19101016ad83Smrg  if test "x$lt_cv_dlopen" != xno; then
19111016ad83Smrg    enable_dlopen=yes
19121016ad83Smrg  else
19131016ad83Smrg    enable_dlopen=no
19141016ad83Smrg  fi
19151016ad83Smrg
19161016ad83Smrg  case $lt_cv_dlopen in
19171016ad83Smrg  dlopen)
19181016ad83Smrg    save_CPPFLAGS="$CPPFLAGS"
19191016ad83Smrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
19201016ad83Smrg
19211016ad83Smrg    save_LDFLAGS="$LDFLAGS"
19221016ad83Smrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
19231016ad83Smrg
19241016ad83Smrg    save_LIBS="$LIBS"
19251016ad83Smrg    LIBS="$lt_cv_dlopen_libs $LIBS"
19261016ad83Smrg
19271016ad83Smrg    AC_CACHE_CHECK([whether a program can dlopen itself],
19281016ad83Smrg	  lt_cv_dlopen_self, [dnl
19291016ad83Smrg	  _LT_TRY_DLOPEN_SELF(
19301016ad83Smrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
19311016ad83Smrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
19321016ad83Smrg    ])
19331016ad83Smrg
19341016ad83Smrg    if test "x$lt_cv_dlopen_self" = xyes; then
19351016ad83Smrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
19361016ad83Smrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
19371016ad83Smrg	  lt_cv_dlopen_self_static, [dnl
19381016ad83Smrg	  _LT_TRY_DLOPEN_SELF(
19391016ad83Smrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
19401016ad83Smrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
19411016ad83Smrg      ])
19421016ad83Smrg    fi
19431016ad83Smrg
19441016ad83Smrg    CPPFLAGS="$save_CPPFLAGS"
19451016ad83Smrg    LDFLAGS="$save_LDFLAGS"
19461016ad83Smrg    LIBS="$save_LIBS"
19471016ad83Smrg    ;;
19481016ad83Smrg  esac
19491016ad83Smrg
19501016ad83Smrg  case $lt_cv_dlopen_self in
19511016ad83Smrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
19521016ad83Smrg  *) enable_dlopen_self=unknown ;;
19531016ad83Smrg  esac
19541016ad83Smrg
19551016ad83Smrg  case $lt_cv_dlopen_self_static in
19561016ad83Smrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
19571016ad83Smrg  *) enable_dlopen_self_static=unknown ;;
19581016ad83Smrg  esac
19591016ad83Smrgfi
19601016ad83Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
19611016ad83Smrg	 [Whether dlopen is supported])
19621016ad83Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
19631016ad83Smrg	 [Whether dlopen of programs is supported])
19641016ad83Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
19651016ad83Smrg	 [Whether dlopen of statically linked programs is supported])
19661016ad83Smrg])# LT_SYS_DLOPEN_SELF
19671016ad83Smrg
19681016ad83Smrg# Old name:
19691016ad83SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
19701016ad83Smrgdnl aclocal-1.4 backwards compatibility:
19711016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
19721016ad83Smrg
19731016ad83Smrg
19741016ad83Smrg# _LT_COMPILER_C_O([TAGNAME])
19751016ad83Smrg# ---------------------------
19761016ad83Smrg# Check to see if options -c and -o are simultaneously supported by compiler.
19771016ad83Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
19781016ad83Smrgm4_defun([_LT_COMPILER_C_O],
19791016ad83Smrg[m4_require([_LT_DECL_SED])dnl
19801016ad83Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
19811016ad83Smrgm4_require([_LT_TAG_COMPILER])dnl
19821016ad83SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
19831016ad83Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
19841016ad83Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
19851016ad83Smrg   $RM -r conftest 2>/dev/null
19861016ad83Smrg   mkdir conftest
19871016ad83Smrg   cd conftest
19881016ad83Smrg   mkdir out
19891016ad83Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
19901016ad83Smrg
19911016ad83Smrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
19921016ad83Smrg   # Insert the option either (1) after the last *FLAGS variable, or
19931016ad83Smrg   # (2) before a word containing "conftest.", or (3) at the end.
19941016ad83Smrg   # Note that $ac_compile itself does not contain backslashes and begins
19951016ad83Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
19961016ad83Smrg   lt_compile=`echo "$ac_compile" | $SED \
19971016ad83Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
19981016ad83Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
19991016ad83Smrg   -e 's:$: $lt_compiler_flag:'`
20001016ad83Smrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
20011016ad83Smrg   (eval "$lt_compile" 2>out/conftest.err)
20021016ad83Smrg   ac_status=$?
20031016ad83Smrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
20041016ad83Smrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
20051016ad83Smrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
20061016ad83Smrg   then
20071016ad83Smrg     # The compiler can only warn and ignore the option if not recognized
20081016ad83Smrg     # So say no if there are warnings
20091016ad83Smrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
20101016ad83Smrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
20111016ad83Smrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
20121016ad83Smrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
20131016ad83Smrg     fi
20141016ad83Smrg   fi
20151016ad83Smrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
20161016ad83Smrg   $RM conftest*
20171016ad83Smrg   # SGI C++ compiler will create directory out/ii_files/ for
20181016ad83Smrg   # template instantiation
20191016ad83Smrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
20201016ad83Smrg   $RM out/* && rmdir out
20211016ad83Smrg   cd ..
20221016ad83Smrg   $RM -r conftest
20231016ad83Smrg   $RM conftest*
20241016ad83Smrg])
20251016ad83Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
20261016ad83Smrg	[Does compiler simultaneously support -c and -o options?])
20271016ad83Smrg])# _LT_COMPILER_C_O
20281016ad83Smrg
20291016ad83Smrg
20301016ad83Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
20311016ad83Smrg# ----------------------------------
20321016ad83Smrg# Check to see if we can do hard links to lock some files if needed
20331016ad83Smrgm4_defun([_LT_COMPILER_FILE_LOCKS],
20341016ad83Smrg[m4_require([_LT_ENABLE_LOCK])dnl
20351016ad83Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
20361016ad83Smrg_LT_COMPILER_C_O([$1])
20371016ad83Smrg
20381016ad83Smrghard_links="nottested"
20391016ad83Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
20401016ad83Smrg  # do not overwrite the value of need_locks provided by the user
20411016ad83Smrg  AC_MSG_CHECKING([if we can lock with hard links])
20421016ad83Smrg  hard_links=yes
20431016ad83Smrg  $RM conftest*
20441016ad83Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
20451016ad83Smrg  touch conftest.a
20461016ad83Smrg  ln conftest.a conftest.b 2>&5 || hard_links=no
20471016ad83Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
20481016ad83Smrg  AC_MSG_RESULT([$hard_links])
20491016ad83Smrg  if test "$hard_links" = no; then
20501016ad83Smrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
20511016ad83Smrg    need_locks=warn
20521016ad83Smrg  fi
20531016ad83Smrgelse
20541016ad83Smrg  need_locks=no
20551016ad83Smrgfi
20561016ad83Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
20571016ad83Smrg])# _LT_COMPILER_FILE_LOCKS
20581016ad83Smrg
20591016ad83Smrg
20601016ad83Smrg# _LT_CHECK_OBJDIR
20611016ad83Smrg# ----------------
20621016ad83Smrgm4_defun([_LT_CHECK_OBJDIR],
20631016ad83Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
20641016ad83Smrg[rm -f .libs 2>/dev/null
20651016ad83Smrgmkdir .libs 2>/dev/null
20661016ad83Smrgif test -d .libs; then
20671016ad83Smrg  lt_cv_objdir=.libs
20681016ad83Smrgelse
20691016ad83Smrg  # MS-DOS does not allow filenames that begin with a dot.
20701016ad83Smrg  lt_cv_objdir=_libs
20711016ad83Smrgfi
20721016ad83Smrgrmdir .libs 2>/dev/null])
20731016ad83Smrgobjdir=$lt_cv_objdir
20741016ad83Smrg_LT_DECL([], [objdir], [0],
20751016ad83Smrg         [The name of the directory that contains temporary libtool files])dnl
20761016ad83Smrgm4_pattern_allow([LT_OBJDIR])dnl
20771016ad83SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
20781016ad83Smrg  [Define to the sub-directory in which libtool stores uninstalled libraries.])
20791016ad83Smrg])# _LT_CHECK_OBJDIR
20801016ad83Smrg
20811016ad83Smrg
20821016ad83Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
20831016ad83Smrg# --------------------------------------
20841016ad83Smrg# Check hardcoding attributes.
20851016ad83Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
20861016ad83Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
20871016ad83Smrg_LT_TAGVAR(hardcode_action, $1)=
20881016ad83Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
20891016ad83Smrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
20901016ad83Smrg   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
20911016ad83Smrg
20921016ad83Smrg  # We can hardcode non-existent directories.
20931016ad83Smrg  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
20941016ad83Smrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
20951016ad83Smrg     # have to relink, otherwise we might link with an installed library
20961016ad83Smrg     # when we should be linking with a yet-to-be-installed one
20971016ad83Smrg     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
20981016ad83Smrg     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
20991016ad83Smrg    # Linking always hardcodes the temporary library directory.
21001016ad83Smrg    _LT_TAGVAR(hardcode_action, $1)=relink
21011016ad83Smrg  else
21021016ad83Smrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
21031016ad83Smrg    _LT_TAGVAR(hardcode_action, $1)=immediate
21041016ad83Smrg  fi
21051016ad83Smrgelse
21061016ad83Smrg  # We cannot hardcode anything, or else we can only hardcode existing
21071016ad83Smrg  # directories.
21081016ad83Smrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
21091016ad83Smrgfi
21101016ad83SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
21111016ad83Smrg
21121016ad83Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
21131016ad83Smrg   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
21141016ad83Smrg  # Fast installation is not supported
21151016ad83Smrg  enable_fast_install=no
21161016ad83Smrgelif test "$shlibpath_overrides_runpath" = yes ||
21171016ad83Smrg     test "$enable_shared" = no; then
21181016ad83Smrg  # Fast installation is not necessary
21191016ad83Smrg  enable_fast_install=needless
21201016ad83Smrgfi
21211016ad83Smrg_LT_TAGDECL([], [hardcode_action], [0],
21221016ad83Smrg    [How to hardcode a shared library path into an executable])
21231016ad83Smrg])# _LT_LINKER_HARDCODE_LIBPATH
21241016ad83Smrg
21251016ad83Smrg
21261016ad83Smrg# _LT_CMD_STRIPLIB
21271016ad83Smrg# ----------------
21281016ad83Smrgm4_defun([_LT_CMD_STRIPLIB],
21291016ad83Smrg[m4_require([_LT_DECL_EGREP])
21301016ad83Smrgstriplib=
21311016ad83Smrgold_striplib=
21321016ad83SmrgAC_MSG_CHECKING([whether stripping libraries is possible])
21331016ad83Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
21341016ad83Smrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
21351016ad83Smrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
21361016ad83Smrg  AC_MSG_RESULT([yes])
21371016ad83Smrgelse
21381016ad83Smrg# FIXME - insert some real tests, host_os isn't really good enough
21391016ad83Smrg  case $host_os in
21401016ad83Smrg  darwin*)
21411016ad83Smrg    if test -n "$STRIP" ; then
21421016ad83Smrg      striplib="$STRIP -x"
21431016ad83Smrg      old_striplib="$STRIP -S"
21441016ad83Smrg      AC_MSG_RESULT([yes])
21451016ad83Smrg    else
21461016ad83Smrg      AC_MSG_RESULT([no])
21471016ad83Smrg    fi
21481016ad83Smrg    ;;
21491016ad83Smrg  *)
21501016ad83Smrg    AC_MSG_RESULT([no])
21511016ad83Smrg    ;;
21521016ad83Smrg  esac
21531016ad83Smrgfi
21541016ad83Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
21551016ad83Smrg_LT_DECL([], [striplib], [1])
21561016ad83Smrg])# _LT_CMD_STRIPLIB
21571016ad83Smrg
21581016ad83Smrg
21591016ad83Smrg# _LT_SYS_DYNAMIC_LINKER([TAG])
21601016ad83Smrg# -----------------------------
21611016ad83Smrg# PORTME Fill in your ld.so characteristics
21621016ad83Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
21631016ad83Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
21641016ad83Smrgm4_require([_LT_DECL_EGREP])dnl
21651016ad83Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
21661016ad83Smrgm4_require([_LT_DECL_OBJDUMP])dnl
21671016ad83Smrgm4_require([_LT_DECL_SED])dnl
21681016ad83Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
21691016ad83SmrgAC_MSG_CHECKING([dynamic linker characteristics])
21701016ad83Smrgm4_if([$1],
21711016ad83Smrg	[], [
21721016ad83Smrgif test "$GCC" = yes; then
21731016ad83Smrg  case $host_os in
21741016ad83Smrg    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
21751016ad83Smrg    *) lt_awk_arg="/^libraries:/" ;;
21761016ad83Smrg  esac
21771016ad83Smrg  case $host_os in
21781016ad83Smrg    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
21791016ad83Smrg    *) lt_sed_strip_eq="s,=/,/,g" ;;
21801016ad83Smrg  esac
21811016ad83Smrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
21821016ad83Smrg  case $lt_search_path_spec in
21831016ad83Smrg  *\;*)
21841016ad83Smrg    # if the path contains ";" then we assume it to be the separator
21851016ad83Smrg    # otherwise default to the standard path separator (i.e. ":") - it is
21861016ad83Smrg    # assumed that no part of a normal pathname contains ";" but that should
21871016ad83Smrg    # okay in the real world where ";" in dirpaths is itself problematic.
21881016ad83Smrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
21891016ad83Smrg    ;;
21901016ad83Smrg  *)
21911016ad83Smrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
21921016ad83Smrg    ;;
21931016ad83Smrg  esac
21941016ad83Smrg  # Ok, now we have the path, separated by spaces, we can step through it
21951016ad83Smrg  # and add multilib dir if necessary.
21961016ad83Smrg  lt_tmp_lt_search_path_spec=
21971016ad83Smrg  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
21981016ad83Smrg  for lt_sys_path in $lt_search_path_spec; do
21991016ad83Smrg    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
22001016ad83Smrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
22011016ad83Smrg    else
22021016ad83Smrg      test -d "$lt_sys_path" && \
22031016ad83Smrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
22041016ad83Smrg    fi
22051016ad83Smrg  done
22061016ad83Smrg  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
22071016ad83SmrgBEGIN {RS=" "; FS="/|\n";} {
22081016ad83Smrg  lt_foo="";
22091016ad83Smrg  lt_count=0;
22101016ad83Smrg  for (lt_i = NF; lt_i > 0; lt_i--) {
22111016ad83Smrg    if ($lt_i != "" && $lt_i != ".") {
22121016ad83Smrg      if ($lt_i == "..") {
22131016ad83Smrg        lt_count++;
22141016ad83Smrg      } else {
22151016ad83Smrg        if (lt_count == 0) {
22161016ad83Smrg          lt_foo="/" $lt_i lt_foo;
22171016ad83Smrg        } else {
22181016ad83Smrg          lt_count--;
22191016ad83Smrg        }
22201016ad83Smrg      }
22211016ad83Smrg    }
22221016ad83Smrg  }
22231016ad83Smrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
22241016ad83Smrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
22251016ad83Smrg}'`
22261016ad83Smrg  # AWK program above erroneously prepends '/' to C:/dos/paths
22271016ad83Smrg  # for these hosts.
22281016ad83Smrg  case $host_os in
22291016ad83Smrg    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
22301016ad83Smrg      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
22311016ad83Smrg  esac
22321016ad83Smrg  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
22331016ad83Smrgelse
22341016ad83Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
22351016ad83Smrgfi])
22361016ad83Smrglibrary_names_spec=
22371016ad83Smrglibname_spec='lib$name'
22381016ad83Smrgsoname_spec=
22391016ad83Smrgshrext_cmds=".so"
22401016ad83Smrgpostinstall_cmds=
22411016ad83Smrgpostuninstall_cmds=
22421016ad83Smrgfinish_cmds=
22431016ad83Smrgfinish_eval=
22441016ad83Smrgshlibpath_var=
22451016ad83Smrgshlibpath_overrides_runpath=unknown
22461016ad83Smrgversion_type=none
22471016ad83Smrgdynamic_linker="$host_os ld.so"
22481016ad83Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
22491016ad83Smrgneed_lib_prefix=unknown
22501016ad83Smrghardcode_into_libs=no
22511016ad83Smrg
22521016ad83Smrg# when you set need_version to no, make sure it does not cause -set_version
22531016ad83Smrg# flags to be left without arguments
22541016ad83Smrgneed_version=unknown
22551016ad83Smrg
22561016ad83Smrgcase $host_os in
22571016ad83Smrgaix3*)
22581016ad83Smrg  version_type=linux # correct to gnu/linux during the next big refactor
22591016ad83Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
22601016ad83Smrg  shlibpath_var=LIBPATH
22611016ad83Smrg
22621016ad83Smrg  # AIX 3 has no versioning support, so we append a major version to the name.
22631016ad83Smrg  soname_spec='${libname}${release}${shared_ext}$major'
22641016ad83Smrg  ;;
22651016ad83Smrg
22661016ad83Smrgaix[[4-9]]*)
22671016ad83Smrg  version_type=linux # correct to gnu/linux during the next big refactor
22681016ad83Smrg  need_lib_prefix=no
22691016ad83Smrg  need_version=no
22701016ad83Smrg  hardcode_into_libs=yes
22711016ad83Smrg  if test "$host_cpu" = ia64; then
22721016ad83Smrg    # AIX 5 supports IA64
22731016ad83Smrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
22741016ad83Smrg    shlibpath_var=LD_LIBRARY_PATH
22751016ad83Smrg  else
22761016ad83Smrg    # With GCC up to 2.95.x, collect2 would create an import file
22771016ad83Smrg    # for dependence libraries.  The import file would start with
22781016ad83Smrg    # the line `#! .'.  This would cause the generated library to
22791016ad83Smrg    # depend on `.', always an invalid library.  This was fixed in
22801016ad83Smrg    # development snapshots of GCC prior to 3.0.
22811016ad83Smrg    case $host_os in
22821016ad83Smrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
22831016ad83Smrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
22841016ad83Smrg	   echo ' yes '
22851016ad83Smrg	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
22861016ad83Smrg	:
22871016ad83Smrg      else
22881016ad83Smrg	can_build_shared=no
22891016ad83Smrg      fi
22901016ad83Smrg      ;;
22911016ad83Smrg    esac
22921016ad83Smrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
22931016ad83Smrg    # soname into executable. Probably we can add versioning support to
22941016ad83Smrg    # collect2, so additional links can be useful in future.
22951016ad83Smrg    if test "$aix_use_runtimelinking" = yes; then
22961016ad83Smrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
22971016ad83Smrg      # instead of lib<name>.a to let people know that these are not
22981016ad83Smrg      # typical AIX shared libraries.
22991016ad83Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
23001016ad83Smrg    else
23011016ad83Smrg      # We preserve .a as extension for shared libraries through AIX4.2
23021016ad83Smrg      # and later when we are not doing run time linking.
23031016ad83Smrg      library_names_spec='${libname}${release}.a $libname.a'
23041016ad83Smrg      soname_spec='${libname}${release}${shared_ext}$major'
23051016ad83Smrg    fi
23061016ad83Smrg    shlibpath_var=LIBPATH
23071016ad83Smrg  fi
23081016ad83Smrg  ;;
23091016ad83Smrg
23101016ad83Smrgamigaos*)
23111016ad83Smrg  case $host_cpu in
23121016ad83Smrg  powerpc)
23131016ad83Smrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
23141016ad83Smrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
23151016ad83Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
23161016ad83Smrg    ;;
23171016ad83Smrg  m68k)
23181016ad83Smrg    library_names_spec='$libname.ixlibrary $libname.a'
23191016ad83Smrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
23201016ad83Smrg    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $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'
23211016ad83Smrg    ;;
23221016ad83Smrg  esac
23231016ad83Smrg  ;;
23241016ad83Smrg
23251016ad83Smrgbeos*)
23261016ad83Smrg  library_names_spec='${libname}${shared_ext}'
23271016ad83Smrg  dynamic_linker="$host_os ld.so"
23281016ad83Smrg  shlibpath_var=LIBRARY_PATH
23291016ad83Smrg  ;;
23301016ad83Smrg
23311016ad83Smrgbsdi[[45]]*)
23321016ad83Smrg  version_type=linux # correct to gnu/linux during the next big refactor
23331016ad83Smrg  need_version=no
23341016ad83Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
23351016ad83Smrg  soname_spec='${libname}${release}${shared_ext}$major'
23361016ad83Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
23371016ad83Smrg  shlibpath_var=LD_LIBRARY_PATH
23381016ad83Smrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
23391016ad83Smrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
23401016ad83Smrg  # the default ld.so.conf also contains /usr/contrib/lib and
23411016ad83Smrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
23421016ad83Smrg  # libtool to hard-code these into programs
23431016ad83Smrg  ;;
23441016ad83Smrg
23451016ad83Smrgcygwin* | mingw* | pw32* | cegcc*)
23461016ad83Smrg  version_type=windows
23471016ad83Smrg  shrext_cmds=".dll"
23481016ad83Smrg  need_version=no
23491016ad83Smrg  need_lib_prefix=no
23501016ad83Smrg
23511016ad83Smrg  case $GCC,$cc_basename in
23521016ad83Smrg  yes,*)
23531016ad83Smrg    # gcc
23541016ad83Smrg    library_names_spec='$libname.dll.a'
23551016ad83Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
23561016ad83Smrg    postinstall_cmds='base_file=`basename \${file}`~
23571016ad83Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
23581016ad83Smrg      dldir=$destdir/`dirname \$dlpath`~
23591016ad83Smrg      test -d \$dldir || mkdir -p \$dldir~
23601016ad83Smrg      $install_prog $dir/$dlname \$dldir/$dlname~
23611016ad83Smrg      chmod a+x \$dldir/$dlname~
23621016ad83Smrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
23631016ad83Smrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
23641016ad83Smrg      fi'
23651016ad83Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
23661016ad83Smrg      dlpath=$dir/\$dldll~
23671016ad83Smrg       $RM \$dlpath'
23681016ad83Smrg    shlibpath_overrides_runpath=yes
23691016ad83Smrg
23701016ad83Smrg    case $host_os in
23711016ad83Smrg    cygwin*)
23721016ad83Smrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
23731016ad83Smrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
23741016ad83Smrgm4_if([$1], [],[
23751016ad83Smrg      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
23761016ad83Smrg      ;;
23771016ad83Smrg    mingw* | cegcc*)
23781016ad83Smrg      # MinGW DLLs use traditional 'lib' prefix
23791016ad83Smrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
23801016ad83Smrg      ;;
23811016ad83Smrg    pw32*)
23821016ad83Smrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
23831016ad83Smrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
23841016ad83Smrg      ;;
23851016ad83Smrg    esac
23861016ad83Smrg    dynamic_linker='Win32 ld.exe'
23871016ad83Smrg    ;;
23881016ad83Smrg
23891016ad83Smrg  *,cl*)
23901016ad83Smrg    # Native MSVC
23911016ad83Smrg    libname_spec='$name'
23921016ad83Smrg    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
23931016ad83Smrg    library_names_spec='${libname}.dll.lib'
23941016ad83Smrg
23951016ad83Smrg    case $build_os in
23961016ad83Smrg    mingw*)
23971016ad83Smrg      sys_lib_search_path_spec=
23981016ad83Smrg      lt_save_ifs=$IFS
23991016ad83Smrg      IFS=';'
24001016ad83Smrg      for lt_path in $LIB
24011016ad83Smrg      do
24021016ad83Smrg        IFS=$lt_save_ifs
24031016ad83Smrg        # Let DOS variable expansion print the short 8.3 style file name.
24041016ad83Smrg        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
24051016ad83Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
24061016ad83Smrg      done
24071016ad83Smrg      IFS=$lt_save_ifs
24081016ad83Smrg      # Convert to MSYS style.
24091016ad83Smrg      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
24101016ad83Smrg      ;;
24111016ad83Smrg    cygwin*)
24121016ad83Smrg      # Convert to unix form, then to dos form, then back to unix form
24131016ad83Smrg      # but this time dos style (no spaces!) so that the unix form looks
24141016ad83Smrg      # like /cygdrive/c/PROGRA~1:/cygdr...
24151016ad83Smrg      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
24161016ad83Smrg      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
24171016ad83Smrg      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
24181016ad83Smrg      ;;
24191016ad83Smrg    *)
24201016ad83Smrg      sys_lib_search_path_spec="$LIB"
24211016ad83Smrg      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
24221016ad83Smrg        # It is most probably a Windows format PATH.
24231016ad83Smrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
24241016ad83Smrg      else
24251016ad83Smrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
24261016ad83Smrg      fi
24271016ad83Smrg      # FIXME: find the short name or the path components, as spaces are
24281016ad83Smrg      # common. (e.g. "Program Files" -> "PROGRA~1")
24291016ad83Smrg      ;;
24301016ad83Smrg    esac
24311016ad83Smrg
24321016ad83Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
24331016ad83Smrg    postinstall_cmds='base_file=`basename \${file}`~
24341016ad83Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
24351016ad83Smrg      dldir=$destdir/`dirname \$dlpath`~
24361016ad83Smrg      test -d \$dldir || mkdir -p \$dldir~
24371016ad83Smrg      $install_prog $dir/$dlname \$dldir/$dlname'
24381016ad83Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
24391016ad83Smrg      dlpath=$dir/\$dldll~
24401016ad83Smrg       $RM \$dlpath'
24411016ad83Smrg    shlibpath_overrides_runpath=yes
24421016ad83Smrg    dynamic_linker='Win32 link.exe'
24431016ad83Smrg    ;;
24441016ad83Smrg
24451016ad83Smrg  *)
24461016ad83Smrg    # Assume MSVC wrapper
24471016ad83Smrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
24481016ad83Smrg    dynamic_linker='Win32 ld.exe'
24491016ad83Smrg    ;;
24501016ad83Smrg  esac
24511016ad83Smrg  # FIXME: first we should search . and the directory the executable is in
24521016ad83Smrg  shlibpath_var=PATH
24531016ad83Smrg  ;;
24541016ad83Smrg
24551016ad83Smrgdarwin* | rhapsody*)
24561016ad83Smrg  dynamic_linker="$host_os dyld"
24571016ad83Smrg  version_type=darwin
24581016ad83Smrg  need_lib_prefix=no
24591016ad83Smrg  need_version=no
24601016ad83Smrg  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
24611016ad83Smrg  soname_spec='${libname}${release}${major}$shared_ext'
24621016ad83Smrg  shlibpath_overrides_runpath=yes
24631016ad83Smrg  shlibpath_var=DYLD_LIBRARY_PATH
24641016ad83Smrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
24651016ad83Smrgm4_if([$1], [],[
24661016ad83Smrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
24671016ad83Smrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
24681016ad83Smrg  ;;
24691016ad83Smrg
24701016ad83Smrgdgux*)
24711016ad83Smrg  version_type=linux # correct to gnu/linux during the next big refactor
24721016ad83Smrg  need_lib_prefix=no
24731016ad83Smrg  need_version=no
24741016ad83Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
24751016ad83Smrg  soname_spec='${libname}${release}${shared_ext}$major'
24761016ad83Smrg  shlibpath_var=LD_LIBRARY_PATH
24771016ad83Smrg  ;;
24781016ad83Smrg
24791016ad83Smrgfreebsd* | dragonfly*)
24801016ad83Smrg  # DragonFly does not have aout.  When/if they implement a new
24811016ad83Smrg  # versioning mechanism, adjust this.
24821016ad83Smrg  if test -x /usr/bin/objformat; then
24831016ad83Smrg    objformat=`/usr/bin/objformat`
24841016ad83Smrg  else
24851016ad83Smrg    case $host_os in
24861016ad83Smrg    freebsd[[23]].*) objformat=aout ;;
24871016ad83Smrg    *) objformat=elf ;;
24881016ad83Smrg    esac
24891016ad83Smrg  fi
24901016ad83Smrg  version_type=freebsd-$objformat
24911016ad83Smrg  case $version_type in
24921016ad83Smrg    freebsd-elf*)
24931016ad83Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
24941016ad83Smrg      need_version=no
24951016ad83Smrg      need_lib_prefix=no
24961016ad83Smrg      ;;
24971016ad83Smrg    freebsd-*)
24981016ad83Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
24991016ad83Smrg      need_version=yes
25001016ad83Smrg      ;;
25011016ad83Smrg  esac
25021016ad83Smrg  shlibpath_var=LD_LIBRARY_PATH
25031016ad83Smrg  case $host_os in
25041016ad83Smrg  freebsd2.*)
25051016ad83Smrg    shlibpath_overrides_runpath=yes
25061016ad83Smrg    ;;
25071016ad83Smrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
25081016ad83Smrg    shlibpath_overrides_runpath=yes
25091016ad83Smrg    hardcode_into_libs=yes
25101016ad83Smrg    ;;
25111016ad83Smrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
25121016ad83Smrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
25131016ad83Smrg    shlibpath_overrides_runpath=no
25141016ad83Smrg    hardcode_into_libs=yes
25151016ad83Smrg    ;;
25161016ad83Smrg  *) # from 4.6 on, and DragonFly
25171016ad83Smrg    shlibpath_overrides_runpath=yes
25181016ad83Smrg    hardcode_into_libs=yes
25191016ad83Smrg    ;;
25201016ad83Smrg  esac
25211016ad83Smrg  ;;
25221016ad83Smrg
25231016ad83Smrghaiku*)
25241016ad83Smrg  version_type=linux # correct to gnu/linux during the next big refactor
25251016ad83Smrg  need_lib_prefix=no
25261016ad83Smrg  need_version=no
25271016ad83Smrg  dynamic_linker="$host_os runtime_loader"
25281016ad83Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
25291016ad83Smrg  soname_spec='${libname}${release}${shared_ext}$major'
25301016ad83Smrg  shlibpath_var=LIBRARY_PATH
25311016ad83Smrg  shlibpath_overrides_runpath=yes
25321016ad83Smrg  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
25331016ad83Smrg  hardcode_into_libs=yes
25341016ad83Smrg  ;;
25351016ad83Smrg
25361016ad83Smrghpux9* | hpux10* | hpux11*)
25371016ad83Smrg  # Give a soname corresponding to the major version so that dld.sl refuses to
25381016ad83Smrg  # link against other versions.
25391016ad83Smrg  version_type=sunos
25401016ad83Smrg  need_lib_prefix=no
25411016ad83Smrg  need_version=no
25421016ad83Smrg  case $host_cpu in
25431016ad83Smrg  ia64*)
25441016ad83Smrg    shrext_cmds='.so'
25451016ad83Smrg    hardcode_into_libs=yes
25461016ad83Smrg    dynamic_linker="$host_os dld.so"
25471016ad83Smrg    shlibpath_var=LD_LIBRARY_PATH
25481016ad83Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
25491016ad83Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
25501016ad83Smrg    soname_spec='${libname}${release}${shared_ext}$major'
25511016ad83Smrg    if test "X$HPUX_IA64_MODE" = X32; then
25521016ad83Smrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
25531016ad83Smrg    else
25541016ad83Smrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
25551016ad83Smrg    fi
25561016ad83Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
25571016ad83Smrg    ;;
25581016ad83Smrg  hppa*64*)
25591016ad83Smrg    shrext_cmds='.sl'
25601016ad83Smrg    hardcode_into_libs=yes
25611016ad83Smrg    dynamic_linker="$host_os dld.sl"
25621016ad83Smrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
25631016ad83Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
25641016ad83Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
25651016ad83Smrg    soname_spec='${libname}${release}${shared_ext}$major'
25661016ad83Smrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
25671016ad83Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
25681016ad83Smrg    ;;
25691016ad83Smrg  *)
25701016ad83Smrg    shrext_cmds='.sl'
25711016ad83Smrg    dynamic_linker="$host_os dld.sl"
25721016ad83Smrg    shlibpath_var=SHLIB_PATH
25731016ad83Smrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
25741016ad83Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
25751016ad83Smrg    soname_spec='${libname}${release}${shared_ext}$major'
25761016ad83Smrg    ;;
25771016ad83Smrg  esac
25781016ad83Smrg  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
25791016ad83Smrg  postinstall_cmds='chmod 555 $lib'
25801016ad83Smrg  # or fails outright, so override atomically:
25811016ad83Smrg  install_override_mode=555
25821016ad83Smrg  ;;
25831016ad83Smrg
25841016ad83Smrginterix[[3-9]]*)
25851016ad83Smrg  version_type=linux # correct to gnu/linux during the next big refactor
25861016ad83Smrg  need_lib_prefix=no
25871016ad83Smrg  need_version=no
25881016ad83Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
25891016ad83Smrg  soname_spec='${libname}${release}${shared_ext}$major'
25901016ad83Smrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
25911016ad83Smrg  shlibpath_var=LD_LIBRARY_PATH
25921016ad83Smrg  shlibpath_overrides_runpath=no
25931016ad83Smrg  hardcode_into_libs=yes
25941016ad83Smrg  ;;
25951016ad83Smrg
25961016ad83Smrgirix5* | irix6* | nonstopux*)
25971016ad83Smrg  case $host_os in
25981016ad83Smrg    nonstopux*) version_type=nonstopux ;;
25991016ad83Smrg    *)
26001016ad83Smrg	if test "$lt_cv_prog_gnu_ld" = yes; then
26011016ad83Smrg		version_type=linux # correct to gnu/linux during the next big refactor
26021016ad83Smrg	else
26031016ad83Smrg		version_type=irix
26041016ad83Smrg	fi ;;
26051016ad83Smrg  esac
26061016ad83Smrg  need_lib_prefix=no
26071016ad83Smrg  need_version=no
26081016ad83Smrg  soname_spec='${libname}${release}${shared_ext}$major'
26091016ad83Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
26101016ad83Smrg  case $host_os in
26111016ad83Smrg  irix5* | nonstopux*)
26121016ad83Smrg    libsuff= shlibsuff=
26131016ad83Smrg    ;;
26141016ad83Smrg  *)
26151016ad83Smrg    case $LD in # libtool.m4 will add one of these switches to LD
26161016ad83Smrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
26171016ad83Smrg      libsuff= shlibsuff= libmagic=32-bit;;
26181016ad83Smrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
26191016ad83Smrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
26201016ad83Smrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
26211016ad83Smrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
26221016ad83Smrg    *) libsuff= shlibsuff= libmagic=never-match;;
26231016ad83Smrg    esac
26241016ad83Smrg    ;;
26251016ad83Smrg  esac
26261016ad83Smrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
26271016ad83Smrg  shlibpath_overrides_runpath=no
26281016ad83Smrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
26291016ad83Smrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
26301016ad83Smrg  hardcode_into_libs=yes
26311016ad83Smrg  ;;
26321016ad83Smrg
26331016ad83Smrg# No shared lib support for Linux oldld, aout, or coff.
26341016ad83Smrglinux*oldld* | linux*aout* | linux*coff*)
26351016ad83Smrg  dynamic_linker=no
26361016ad83Smrg  ;;
26371016ad83Smrg
26381016ad83Smrg# This must be glibc/ELF.
26391016ad83Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
26401016ad83Smrg  version_type=linux # correct to gnu/linux during the next big refactor
26411016ad83Smrg  need_lib_prefix=no
26421016ad83Smrg  need_version=no
26431016ad83Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
26441016ad83Smrg  soname_spec='${libname}${release}${shared_ext}$major'
26451016ad83Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
26461016ad83Smrg  shlibpath_var=LD_LIBRARY_PATH
26471016ad83Smrg  shlibpath_overrides_runpath=no
26481016ad83Smrg
26491016ad83Smrg  # Some binutils ld are patched to set DT_RUNPATH
26501016ad83Smrg  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
26511016ad83Smrg    [lt_cv_shlibpath_overrides_runpath=no
26521016ad83Smrg    save_LDFLAGS=$LDFLAGS
26531016ad83Smrg    save_libdir=$libdir
26541016ad83Smrg    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
26551016ad83Smrg	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
26561016ad83Smrg    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
26571016ad83Smrg      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
26581016ad83Smrg	 [lt_cv_shlibpath_overrides_runpath=yes])])
26591016ad83Smrg    LDFLAGS=$save_LDFLAGS
26601016ad83Smrg    libdir=$save_libdir
26611016ad83Smrg    ])
26621016ad83Smrg  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
26631016ad83Smrg
26641016ad83Smrg  # This implies no fast_install, which is unacceptable.
26651016ad83Smrg  # Some rework will be needed to allow for fast_install
26661016ad83Smrg  # before this can be enabled.
26671016ad83Smrg  hardcode_into_libs=yes
26681016ad83Smrg
26691016ad83Smrg  # Append ld.so.conf contents to the search path
26701016ad83Smrg  if test -f /etc/ld.so.conf; then
26711016ad83Smrg    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' ' '`
26721016ad83Smrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
26731016ad83Smrg  fi
26741016ad83Smrg
26751016ad83Smrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
26761016ad83Smrg  # powerpc, because MkLinux only supported shared libraries with the
26771016ad83Smrg  # GNU dynamic linker.  Since this was broken with cross compilers,
26781016ad83Smrg  # most powerpc-linux boxes support dynamic linking these days and
26791016ad83Smrg  # people can always --disable-shared, the test was removed, and we
26801016ad83Smrg  # assume the GNU/Linux dynamic linker is in use.
26811016ad83Smrg  dynamic_linker='GNU/Linux ld.so'
26821016ad83Smrg  ;;
26831016ad83Smrg
26841016ad83Smrgnetbsdelf*-gnu)
26851016ad83Smrg  version_type=linux
26861016ad83Smrg  need_lib_prefix=no
26871016ad83Smrg  need_version=no
26881016ad83Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
26891016ad83Smrg  soname_spec='${libname}${release}${shared_ext}$major'
26901016ad83Smrg  shlibpath_var=LD_LIBRARY_PATH
26911016ad83Smrg  shlibpath_overrides_runpath=no
26921016ad83Smrg  hardcode_into_libs=yes
26931016ad83Smrg  dynamic_linker='NetBSD ld.elf_so'
26941016ad83Smrg  ;;
26951016ad83Smrg
26961016ad83Smrgnetbsd*)
26971016ad83Smrg  version_type=sunos
26981016ad83Smrg  need_lib_prefix=no
26991016ad83Smrg  need_version=no
27001016ad83Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
27011016ad83Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
27021016ad83Smrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
27031016ad83Smrg    dynamic_linker='NetBSD (a.out) ld.so'
27041016ad83Smrg  else
27051016ad83Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
27061016ad83Smrg    soname_spec='${libname}${release}${shared_ext}$major'
27071016ad83Smrg    dynamic_linker='NetBSD ld.elf_so'
27081016ad83Smrg  fi
27091016ad83Smrg  shlibpath_var=LD_LIBRARY_PATH
27101016ad83Smrg  shlibpath_overrides_runpath=yes
27111016ad83Smrg  hardcode_into_libs=yes
27121016ad83Smrg  ;;
27131016ad83Smrg
27141016ad83Smrgnewsos6)
27151016ad83Smrg  version_type=linux # correct to gnu/linux during the next big refactor
27161016ad83Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
27171016ad83Smrg  shlibpath_var=LD_LIBRARY_PATH
27181016ad83Smrg  shlibpath_overrides_runpath=yes
27191016ad83Smrg  ;;
27201016ad83Smrg
27211016ad83Smrg*nto* | *qnx*)
27221016ad83Smrg  version_type=qnx
27231016ad83Smrg  need_lib_prefix=no
27241016ad83Smrg  need_version=no
27251016ad83Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
27261016ad83Smrg  soname_spec='${libname}${release}${shared_ext}$major'
27271016ad83Smrg  shlibpath_var=LD_LIBRARY_PATH
27281016ad83Smrg  shlibpath_overrides_runpath=no
27291016ad83Smrg  hardcode_into_libs=yes
27301016ad83Smrg  dynamic_linker='ldqnx.so'
27311016ad83Smrg  ;;
27321016ad83Smrg
27331016ad83Smrgopenbsd*)
27341016ad83Smrg  version_type=sunos
27351016ad83Smrg  sys_lib_dlsearch_path_spec="/usr/lib"
27361016ad83Smrg  need_lib_prefix=no
27371016ad83Smrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
27381016ad83Smrg  case $host_os in
27391016ad83Smrg    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
27401016ad83Smrg    *)				need_version=no  ;;
27411016ad83Smrg  esac
27421016ad83Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
27431016ad83Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
27441016ad83Smrg  shlibpath_var=LD_LIBRARY_PATH
27451016ad83Smrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
27461016ad83Smrg    case $host_os in
27471016ad83Smrg      openbsd2.[[89]] | openbsd2.[[89]].*)
27481016ad83Smrg	shlibpath_overrides_runpath=no
27491016ad83Smrg	;;
27501016ad83Smrg      *)
27511016ad83Smrg	shlibpath_overrides_runpath=yes
27521016ad83Smrg	;;
27531016ad83Smrg      esac
27541016ad83Smrg  else
27551016ad83Smrg    shlibpath_overrides_runpath=yes
27561016ad83Smrg  fi
27571016ad83Smrg  ;;
27581016ad83Smrg
27591016ad83Smrgos2*)
27601016ad83Smrg  libname_spec='$name'
27611016ad83Smrg  shrext_cmds=".dll"
27621016ad83Smrg  need_lib_prefix=no
27631016ad83Smrg  library_names_spec='$libname${shared_ext} $libname.a'
27641016ad83Smrg  dynamic_linker='OS/2 ld.exe'
27651016ad83Smrg  shlibpath_var=LIBPATH
27661016ad83Smrg  ;;
27671016ad83Smrg
27681016ad83Smrgosf3* | osf4* | osf5*)
27691016ad83Smrg  version_type=osf
27701016ad83Smrg  need_lib_prefix=no
27711016ad83Smrg  need_version=no
27721016ad83Smrg  soname_spec='${libname}${release}${shared_ext}$major'
27731016ad83Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
27741016ad83Smrg  shlibpath_var=LD_LIBRARY_PATH
27751016ad83Smrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
27761016ad83Smrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
27771016ad83Smrg  ;;
27781016ad83Smrg
27791016ad83Smrgrdos*)
27801016ad83Smrg  dynamic_linker=no
27811016ad83Smrg  ;;
27821016ad83Smrg
27831016ad83Smrgsolaris*)
27841016ad83Smrg  version_type=linux # correct to gnu/linux during the next big refactor
27851016ad83Smrg  need_lib_prefix=no
27861016ad83Smrg  need_version=no
27871016ad83Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
27881016ad83Smrg  soname_spec='${libname}${release}${shared_ext}$major'
27891016ad83Smrg  shlibpath_var=LD_LIBRARY_PATH
27901016ad83Smrg  shlibpath_overrides_runpath=yes
27911016ad83Smrg  hardcode_into_libs=yes
27921016ad83Smrg  # ldd complains unless libraries are executable
27931016ad83Smrg  postinstall_cmds='chmod +x $lib'
27941016ad83Smrg  ;;
27951016ad83Smrg
27961016ad83Smrgsunos4*)
27971016ad83Smrg  version_type=sunos
27981016ad83Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
27991016ad83Smrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
28001016ad83Smrg  shlibpath_var=LD_LIBRARY_PATH
28011016ad83Smrg  shlibpath_overrides_runpath=yes
28021016ad83Smrg  if test "$with_gnu_ld" = yes; then
28031016ad83Smrg    need_lib_prefix=no
28041016ad83Smrg  fi
28051016ad83Smrg  need_version=yes
28061016ad83Smrg  ;;
28071016ad83Smrg
28081016ad83Smrgsysv4 | sysv4.3*)
28091016ad83Smrg  version_type=linux # correct to gnu/linux during the next big refactor
28101016ad83Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
28111016ad83Smrg  soname_spec='${libname}${release}${shared_ext}$major'
28121016ad83Smrg  shlibpath_var=LD_LIBRARY_PATH
28131016ad83Smrg  case $host_vendor in
28141016ad83Smrg    sni)
28151016ad83Smrg      shlibpath_overrides_runpath=no
28161016ad83Smrg      need_lib_prefix=no
28171016ad83Smrg      runpath_var=LD_RUN_PATH
28181016ad83Smrg      ;;
28191016ad83Smrg    siemens)
28201016ad83Smrg      need_lib_prefix=no
28211016ad83Smrg      ;;
28221016ad83Smrg    motorola)
28231016ad83Smrg      need_lib_prefix=no
28241016ad83Smrg      need_version=no
28251016ad83Smrg      shlibpath_overrides_runpath=no
28261016ad83Smrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
28271016ad83Smrg      ;;
28281016ad83Smrg  esac
28291016ad83Smrg  ;;
28301016ad83Smrg
28311016ad83Smrgsysv4*MP*)
28321016ad83Smrg  if test -d /usr/nec ;then
28331016ad83Smrg    version_type=linux # correct to gnu/linux during the next big refactor
28341016ad83Smrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
28351016ad83Smrg    soname_spec='$libname${shared_ext}.$major'
28361016ad83Smrg    shlibpath_var=LD_LIBRARY_PATH
28371016ad83Smrg  fi
28381016ad83Smrg  ;;
28391016ad83Smrg
28401016ad83Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
28411016ad83Smrg  version_type=freebsd-elf
28421016ad83Smrg  need_lib_prefix=no
28431016ad83Smrg  need_version=no
28441016ad83Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
28451016ad83Smrg  soname_spec='${libname}${release}${shared_ext}$major'
28461016ad83Smrg  shlibpath_var=LD_LIBRARY_PATH
28471016ad83Smrg  shlibpath_overrides_runpath=yes
28481016ad83Smrg  hardcode_into_libs=yes
28491016ad83Smrg  if test "$with_gnu_ld" = yes; then
28501016ad83Smrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
28511016ad83Smrg  else
28521016ad83Smrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
28531016ad83Smrg    case $host_os in
28541016ad83Smrg      sco3.2v5*)
28551016ad83Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
28561016ad83Smrg	;;
28571016ad83Smrg    esac
28581016ad83Smrg  fi
28591016ad83Smrg  sys_lib_dlsearch_path_spec='/usr/lib'
28601016ad83Smrg  ;;
28611016ad83Smrg
28621016ad83Smrgtpf*)
28631016ad83Smrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
28641016ad83Smrg  version_type=linux # correct to gnu/linux during the next big refactor
28651016ad83Smrg  need_lib_prefix=no
28661016ad83Smrg  need_version=no
28671016ad83Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
28681016ad83Smrg  shlibpath_var=LD_LIBRARY_PATH
28691016ad83Smrg  shlibpath_overrides_runpath=no
28701016ad83Smrg  hardcode_into_libs=yes
28711016ad83Smrg  ;;
28721016ad83Smrg
28731016ad83Smrguts4*)
28741016ad83Smrg  version_type=linux # correct to gnu/linux during the next big refactor
28751016ad83Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
28761016ad83Smrg  soname_spec='${libname}${release}${shared_ext}$major'
28771016ad83Smrg  shlibpath_var=LD_LIBRARY_PATH
28781016ad83Smrg  ;;
28791016ad83Smrg
28801016ad83Smrg*)
28811016ad83Smrg  dynamic_linker=no
28821016ad83Smrg  ;;
28831016ad83Smrgesac
28841016ad83SmrgAC_MSG_RESULT([$dynamic_linker])
28851016ad83Smrgtest "$dynamic_linker" = no && can_build_shared=no
28861016ad83Smrg
28871016ad83Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
28881016ad83Smrgif test "$GCC" = yes; then
28891016ad83Smrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
28901016ad83Smrgfi
28911016ad83Smrg
28921016ad83Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
28931016ad83Smrg  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
28941016ad83Smrgfi
28951016ad83Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
28961016ad83Smrg  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
28971016ad83Smrgfi
28981016ad83Smrg
28991016ad83Smrg_LT_DECL([], [variables_saved_for_relink], [1],
29001016ad83Smrg    [Variables whose values should be saved in libtool wrapper scripts and
29011016ad83Smrg    restored at link time])
29021016ad83Smrg_LT_DECL([], [need_lib_prefix], [0],
29031016ad83Smrg    [Do we need the "lib" prefix for modules?])
29041016ad83Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
29051016ad83Smrg_LT_DECL([], [version_type], [0], [Library versioning type])
29061016ad83Smrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
29071016ad83Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
29081016ad83Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
29091016ad83Smrg    [Is shlibpath searched before the hard-coded library search path?])
29101016ad83Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
29111016ad83Smrg_LT_DECL([], [library_names_spec], [1],
29121016ad83Smrg    [[List of archive names.  First name is the real one, the rest are links.
29131016ad83Smrg    The last name is the one that the linker finds with -lNAME]])
29141016ad83Smrg_LT_DECL([], [soname_spec], [1],
29151016ad83Smrg    [[The coded name of the library, if different from the real name]])
29161016ad83Smrg_LT_DECL([], [install_override_mode], [1],
29171016ad83Smrg    [Permission mode override for installation of shared libraries])
29181016ad83Smrg_LT_DECL([], [postinstall_cmds], [2],
29191016ad83Smrg    [Command to use after installation of a shared archive])
29201016ad83Smrg_LT_DECL([], [postuninstall_cmds], [2],
29211016ad83Smrg    [Command to use after uninstallation of a shared archive])
29221016ad83Smrg_LT_DECL([], [finish_cmds], [2],
29231016ad83Smrg    [Commands used to finish a libtool library installation in a directory])
29241016ad83Smrg_LT_DECL([], [finish_eval], [1],
29251016ad83Smrg    [[As "finish_cmds", except a single script fragment to be evaled but
29261016ad83Smrg    not shown]])
29271016ad83Smrg_LT_DECL([], [hardcode_into_libs], [0],
29281016ad83Smrg    [Whether we should hardcode library paths into libraries])
29291016ad83Smrg_LT_DECL([], [sys_lib_search_path_spec], [2],
29301016ad83Smrg    [Compile-time system search path for libraries])
29311016ad83Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
29321016ad83Smrg    [Run-time system search path for libraries])
29331016ad83Smrg])# _LT_SYS_DYNAMIC_LINKER
29341016ad83Smrg
29351016ad83Smrg
29361016ad83Smrg# _LT_PATH_TOOL_PREFIX(TOOL)
29371016ad83Smrg# --------------------------
29381016ad83Smrg# find a file program which can recognize shared library
29391016ad83SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
29401016ad83Smrg[m4_require([_LT_DECL_EGREP])dnl
29411016ad83SmrgAC_MSG_CHECKING([for $1])
29421016ad83SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
29431016ad83Smrg[case $MAGIC_CMD in
29441016ad83Smrg[[\\/*] |  ?:[\\/]*])
29451016ad83Smrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
29461016ad83Smrg  ;;
29471016ad83Smrg*)
29481016ad83Smrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
29491016ad83Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
29501016ad83Smrgdnl $ac_dummy forces splitting on constant user-supplied paths.
29511016ad83Smrgdnl POSIX.2 word splitting is done only on the output of word expansions,
29521016ad83Smrgdnl not every word.  This closes a longstanding sh security hole.
29531016ad83Smrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
29541016ad83Smrg  for ac_dir in $ac_dummy; do
29551016ad83Smrg    IFS="$lt_save_ifs"
29561016ad83Smrg    test -z "$ac_dir" && ac_dir=.
29571016ad83Smrg    if test -f $ac_dir/$1; then
29581016ad83Smrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
29591016ad83Smrg      if test -n "$file_magic_test_file"; then
29601016ad83Smrg	case $deplibs_check_method in
29611016ad83Smrg	"file_magic "*)
29621016ad83Smrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
29631016ad83Smrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
29641016ad83Smrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
29651016ad83Smrg	    $EGREP "$file_magic_regex" > /dev/null; then
29661016ad83Smrg	    :
29671016ad83Smrg	  else
29681016ad83Smrg	    cat <<_LT_EOF 1>&2
29691016ad83Smrg
29701016ad83Smrg*** Warning: the command libtool uses to detect shared libraries,
29711016ad83Smrg*** $file_magic_cmd, produces output that libtool cannot recognize.
29721016ad83Smrg*** The result is that libtool may fail to recognize shared libraries
29731016ad83Smrg*** as such.  This will affect the creation of libtool libraries that
29741016ad83Smrg*** depend on shared libraries, but programs linked with such libtool
29751016ad83Smrg*** libraries will work regardless of this problem.  Nevertheless, you
29761016ad83Smrg*** may want to report the problem to your system manager and/or to
29771016ad83Smrg*** bug-libtool@gnu.org
29781016ad83Smrg
29791016ad83Smrg_LT_EOF
29801016ad83Smrg	  fi ;;
29811016ad83Smrg	esac
29821016ad83Smrg      fi
29831016ad83Smrg      break
29841016ad83Smrg    fi
29851016ad83Smrg  done
29861016ad83Smrg  IFS="$lt_save_ifs"
29871016ad83Smrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
29881016ad83Smrg  ;;
29891016ad83Smrgesac])
29901016ad83SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
29911016ad83Smrgif test -n "$MAGIC_CMD"; then
29921016ad83Smrg  AC_MSG_RESULT($MAGIC_CMD)
29931016ad83Smrgelse
29941016ad83Smrg  AC_MSG_RESULT(no)
29951016ad83Smrgfi
29961016ad83Smrg_LT_DECL([], [MAGIC_CMD], [0],
29971016ad83Smrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
29981016ad83Smrg])# _LT_PATH_TOOL_PREFIX
29991016ad83Smrg
30001016ad83Smrg# Old name:
30011016ad83SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
30021016ad83Smrgdnl aclocal-1.4 backwards compatibility:
30031016ad83Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
30041016ad83Smrg
30051016ad83Smrg
30061016ad83Smrg# _LT_PATH_MAGIC
30071016ad83Smrg# --------------
30081016ad83Smrg# find a file program which can recognize a shared library
30091016ad83Smrgm4_defun([_LT_PATH_MAGIC],
30101016ad83Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
30111016ad83Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then
30121016ad83Smrg  if test -n "$ac_tool_prefix"; then
30131016ad83Smrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
30141016ad83Smrg  else
30151016ad83Smrg    MAGIC_CMD=:
30161016ad83Smrg  fi
30171016ad83Smrgfi
30181016ad83Smrg])# _LT_PATH_MAGIC
30191016ad83Smrg
30201016ad83Smrg
30211016ad83Smrg# LT_PATH_LD
30221016ad83Smrg# ----------
30231016ad83Smrg# find the pathname to the GNU or non-GNU linker
30241016ad83SmrgAC_DEFUN([LT_PATH_LD],
30251016ad83Smrg[AC_REQUIRE([AC_PROG_CC])dnl
30261016ad83SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
30271016ad83SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
30281016ad83Smrgm4_require([_LT_DECL_SED])dnl
30291016ad83Smrgm4_require([_LT_DECL_EGREP])dnl
30301016ad83Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl
30311016ad83Smrg
30321016ad83SmrgAC_ARG_WITH([gnu-ld],
30331016ad83Smrg    [AS_HELP_STRING([--with-gnu-ld],
30341016ad83Smrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
30351016ad83Smrg    [test "$withval" = no || with_gnu_ld=yes],
30361016ad83Smrg    [with_gnu_ld=no])dnl
30371016ad83Smrg
30381016ad83Smrgac_prog=ld
30391016ad83Smrgif test "$GCC" = yes; then
30401016ad83Smrg  # Check if gcc -print-prog-name=ld gives a path.
30411016ad83Smrg  AC_MSG_CHECKING([for ld used by $CC])
30421016ad83Smrg  case $host in
30431016ad83Smrg  *-*-mingw*)
30441016ad83Smrg    # gcc leaves a trailing carriage return which upsets mingw
30451016ad83Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
30461016ad83Smrg  *)
30471016ad83Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
30481016ad83Smrg  esac
30491016ad83Smrg  case $ac_prog in
30501016ad83Smrg    # Accept absolute paths.
30511016ad83Smrg    [[\\/]]* | ?:[[\\/]]*)
30521016ad83Smrg      re_direlt='/[[^/]][[^/]]*/\.\./'
30531016ad83Smrg      # Canonicalize the pathname of ld
30541016ad83Smrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
30551016ad83Smrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
30561016ad83Smrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
30571016ad83Smrg      done
30581016ad83Smrg      test -z "$LD" && LD="$ac_prog"
30591016ad83Smrg      ;;
30601016ad83Smrg  "")
30611016ad83Smrg    # If it fails, then pretend we aren't using GCC.
30621016ad83Smrg    ac_prog=ld
30631016ad83Smrg    ;;
30641016ad83Smrg  *)
30651016ad83Smrg    # If it is relative, then search for the first ld in PATH.
30661016ad83Smrg    with_gnu_ld=unknown
30671016ad83Smrg    ;;
30681016ad83Smrg  esac
30691016ad83Smrgelif test "$with_gnu_ld" = yes; then
30701016ad83Smrg  AC_MSG_CHECKING([for GNU ld])
30711016ad83Smrgelse
30721016ad83Smrg  AC_MSG_CHECKING([for non-GNU ld])
30731016ad83Smrgfi
30741016ad83SmrgAC_CACHE_VAL(lt_cv_path_LD,
30751016ad83Smrg[if test -z "$LD"; then
30761016ad83Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
30771016ad83Smrg  for ac_dir in $PATH; do
30781016ad83Smrg    IFS="$lt_save_ifs"
30791016ad83Smrg    test -z "$ac_dir" && ac_dir=.
30801016ad83Smrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
30811016ad83Smrg      lt_cv_path_LD="$ac_dir/$ac_prog"
30821016ad83Smrg      # Check to see if the program is GNU ld.  I'd rather use --version,
30831016ad83Smrg      # but apparently some variants of GNU ld only accept -v.
30841016ad83Smrg      # Break only if it was the GNU/non-GNU ld that we prefer.
30851016ad83Smrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
30861016ad83Smrg      *GNU* | *'with BFD'*)
30871016ad83Smrg	test "$with_gnu_ld" != no && break
30881016ad83Smrg	;;
30891016ad83Smrg      *)
30901016ad83Smrg	test "$with_gnu_ld" != yes && break
30911016ad83Smrg	;;
30921016ad83Smrg      esac
30931016ad83Smrg    fi
30941016ad83Smrg  done
30951016ad83Smrg  IFS="$lt_save_ifs"
30961016ad83Smrgelse
30971016ad83Smrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
30981016ad83Smrgfi])
30991016ad83SmrgLD="$lt_cv_path_LD"
31001016ad83Smrgif test -n "$LD"; then
31011016ad83Smrg  AC_MSG_RESULT($LD)
31021016ad83Smrgelse
31031016ad83Smrg  AC_MSG_RESULT(no)
31041016ad83Smrgfi
31051016ad83Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
31061016ad83Smrg_LT_PATH_LD_GNU
31071016ad83SmrgAC_SUBST([LD])
31081016ad83Smrg
31091016ad83Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
31101016ad83Smrg])# LT_PATH_LD
31111016ad83Smrg
31121016ad83Smrg# Old names:
31131016ad83SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
31141016ad83SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
31151016ad83Smrgdnl aclocal-1.4 backwards compatibility:
31161016ad83Smrgdnl AC_DEFUN([AM_PROG_LD], [])
31171016ad83Smrgdnl AC_DEFUN([AC_PROG_LD], [])
31181016ad83Smrg
31191016ad83Smrg
31201016ad83Smrg# _LT_PATH_LD_GNU
31211016ad83Smrg#- --------------
31221016ad83Smrgm4_defun([_LT_PATH_LD_GNU],
31231016ad83Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
31241016ad83Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
31251016ad83Smrgcase `$LD -v 2>&1 </dev/null` in
31261016ad83Smrg*GNU* | *'with BFD'*)
31271016ad83Smrg  lt_cv_prog_gnu_ld=yes
31281016ad83Smrg  ;;
31291016ad83Smrg*)
31301016ad83Smrg  lt_cv_prog_gnu_ld=no
31311016ad83Smrg  ;;
31321016ad83Smrgesac])
31331016ad83Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
31341016ad83Smrg])# _LT_PATH_LD_GNU
31351016ad83Smrg
31361016ad83Smrg
31371016ad83Smrg# _LT_CMD_RELOAD
31381016ad83Smrg# --------------
31391016ad83Smrg# find reload flag for linker
31401016ad83Smrg#   -- PORTME Some linkers may need a different reload flag.
31411016ad83Smrgm4_defun([_LT_CMD_RELOAD],
31421016ad83Smrg[AC_CACHE_CHECK([for $LD option to reload object files],
31431016ad83Smrg  lt_cv_ld_reload_flag,
31441016ad83Smrg  [lt_cv_ld_reload_flag='-r'])
31451016ad83Smrgreload_flag=$lt_cv_ld_reload_flag
31461016ad83Smrgcase $reload_flag in
31471016ad83Smrg"" | " "*) ;;
31481016ad83Smrg*) reload_flag=" $reload_flag" ;;
31491016ad83Smrgesac
31501016ad83Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
31511016ad83Smrgcase $host_os in
31521016ad83Smrg  cygwin* | mingw* | pw32* | cegcc*)
31531016ad83Smrg    if test "$GCC" != yes; then
31541016ad83Smrg      reload_cmds=false
31551016ad83Smrg    fi
31561016ad83Smrg    ;;
31571016ad83Smrg  darwin*)
31581016ad83Smrg    if test "$GCC" = yes; then
31591016ad83Smrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
31601016ad83Smrg    else
31611016ad83Smrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
31621016ad83Smrg    fi
31631016ad83Smrg    ;;
31641016ad83Smrgesac
31651016ad83Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
31661016ad83Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl
31671016ad83Smrg])# _LT_CMD_RELOAD
31681016ad83Smrg
31691016ad83Smrg
31701016ad83Smrg# _LT_CHECK_MAGIC_METHOD
31711016ad83Smrg# ----------------------
31721016ad83Smrg# how to check for library dependencies
31731016ad83Smrg#  -- PORTME fill in with the dynamic library characteristics
31741016ad83Smrgm4_defun([_LT_CHECK_MAGIC_METHOD],
31751016ad83Smrg[m4_require([_LT_DECL_EGREP])
31761016ad83Smrgm4_require([_LT_DECL_OBJDUMP])
31771016ad83SmrgAC_CACHE_CHECK([how to recognize dependent libraries],
31781016ad83Smrglt_cv_deplibs_check_method,
31791016ad83Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
31801016ad83Smrglt_cv_file_magic_test_file=
31811016ad83Smrglt_cv_deplibs_check_method='unknown'
31821016ad83Smrg# Need to set the preceding variable on all platforms that support
31831016ad83Smrg# interlibrary dependencies.
31841016ad83Smrg# 'none' -- dependencies not supported.
31851016ad83Smrg# `unknown' -- same as none, but documents that we really don't know.
31861016ad83Smrg# 'pass_all' -- all dependencies passed with no checks.
31871016ad83Smrg# 'test_compile' -- check by making test program.
31881016ad83Smrg# 'file_magic [[regex]]' -- check by looking for files in library path
31891016ad83Smrg# which responds to the $file_magic_cmd with a given extended regex.
31901016ad83Smrg# If you have `file' or equivalent on your system and you're not sure
31911016ad83Smrg# whether `pass_all' will *always* work, you probably want this one.
31921016ad83Smrg
31931016ad83Smrgcase $host_os in
31941016ad83Smrgaix[[4-9]]*)
31951016ad83Smrg  lt_cv_deplibs_check_method=pass_all
31961016ad83Smrg  ;;
31971016ad83Smrg
31981016ad83Smrgbeos*)
31991016ad83Smrg  lt_cv_deplibs_check_method=pass_all
32001016ad83Smrg  ;;
32011016ad83Smrg
32021016ad83Smrgbsdi[[45]]*)
32031016ad83Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
32041016ad83Smrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
32051016ad83Smrg  lt_cv_file_magic_test_file=/shlib/libc.so
32061016ad83Smrg  ;;
32071016ad83Smrg
32081016ad83Smrgcygwin*)
32091016ad83Smrg  # func_win32_libid is a shell function defined in ltmain.sh
32101016ad83Smrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
32111016ad83Smrg  lt_cv_file_magic_cmd='func_win32_libid'
32121016ad83Smrg  ;;
32131016ad83Smrg
32141016ad83Smrgmingw* | pw32*)
32151016ad83Smrg  # Base MSYS/MinGW do not provide the 'file' command needed by
32161016ad83Smrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
32171016ad83Smrg  # unless we find 'file', for example because we are cross-compiling.
32181016ad83Smrg  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
32191016ad83Smrg  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
32201016ad83Smrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
32211016ad83Smrg    lt_cv_file_magic_cmd='func_win32_libid'
32221016ad83Smrg  else
32231016ad83Smrg    # Keep this pattern in sync with the one in func_win32_libid.
32241016ad83Smrg    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
32251016ad83Smrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
32261016ad83Smrg  fi
32271016ad83Smrg  ;;
32281016ad83Smrg
32291016ad83Smrgcegcc*)
32301016ad83Smrg  # use the weaker test based on 'objdump'. See mingw*.
32311016ad83Smrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
32321016ad83Smrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
32331016ad83Smrg  ;;
32341016ad83Smrg
32351016ad83Smrgdarwin* | rhapsody*)
32361016ad83Smrg  lt_cv_deplibs_check_method=pass_all
32371016ad83Smrg  ;;
32381016ad83Smrg
32391016ad83Smrgfreebsd* | dragonfly*)
32401016ad83Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
32411016ad83Smrg    case $host_cpu in
32421016ad83Smrg    i*86 )
32431016ad83Smrg      # Not sure whether the presence of OpenBSD here was a mistake.
32441016ad83Smrg      # Let's accept both of them until this is cleared up.
32451016ad83Smrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
32461016ad83Smrg      lt_cv_file_magic_cmd=/usr/bin/file
32471016ad83Smrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
32481016ad83Smrg      ;;
32491016ad83Smrg    esac
32501016ad83Smrg  else
32511016ad83Smrg    lt_cv_deplibs_check_method=pass_all
32521016ad83Smrg  fi
32531016ad83Smrg  ;;
32541016ad83Smrg
32551016ad83Smrghaiku*)
32561016ad83Smrg  lt_cv_deplibs_check_method=pass_all
32571016ad83Smrg  ;;
32581016ad83Smrg
32591016ad83Smrghpux10.20* | hpux11*)
32601016ad83Smrg  lt_cv_file_magic_cmd=/usr/bin/file
32611016ad83Smrg  case $host_cpu in
32621016ad83Smrg  ia64*)
32631016ad83Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
32641016ad83Smrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
32651016ad83Smrg    ;;
32661016ad83Smrg  hppa*64*)
32671016ad83Smrg    [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]']
32681016ad83Smrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
32691016ad83Smrg    ;;
32701016ad83Smrg  *)
32711016ad83Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
32721016ad83Smrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
32731016ad83Smrg    ;;
32741016ad83Smrg  esac
32751016ad83Smrg  ;;
32761016ad83Smrg
32771016ad83Smrginterix[[3-9]]*)
32781016ad83Smrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
32791016ad83Smrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
32801016ad83Smrg  ;;
32811016ad83Smrg
32821016ad83Smrgirix5* | irix6* | nonstopux*)
32831016ad83Smrg  case $LD in
32841016ad83Smrg  *-32|*"-32 ") libmagic=32-bit;;
32851016ad83Smrg  *-n32|*"-n32 ") libmagic=N32;;
32861016ad83Smrg  *-64|*"-64 ") libmagic=64-bit;;
32871016ad83Smrg  *) libmagic=never-match;;
32881016ad83Smrg  esac
32891016ad83Smrg  lt_cv_deplibs_check_method=pass_all
32901016ad83Smrg  ;;
32911016ad83Smrg
32921016ad83Smrg# This must be glibc/ELF.
32931016ad83Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
32941016ad83Smrg  lt_cv_deplibs_check_method=pass_all
32951016ad83Smrg  ;;
32961016ad83Smrg
32971016ad83Smrgnetbsd* | netbsdelf*-gnu)
32981016ad83Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
32991016ad83Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
33001016ad83Smrg  else
33011016ad83Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
33021016ad83Smrg  fi
33031016ad83Smrg  ;;
33041016ad83Smrg
33051016ad83Smrgnewos6*)
33061016ad83Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
33071016ad83Smrg  lt_cv_file_magic_cmd=/usr/bin/file
33081016ad83Smrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
33091016ad83Smrg  ;;
33101016ad83Smrg
33111016ad83Smrg*nto* | *qnx*)
33121016ad83Smrg  lt_cv_deplibs_check_method=pass_all
33131016ad83Smrg  ;;
33141016ad83Smrg
33151016ad83Smrgopenbsd*)
33161016ad83Smrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
33171016ad83Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
33181016ad83Smrg  else
33191016ad83Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
33201016ad83Smrg  fi
33211016ad83Smrg  ;;
33221016ad83Smrg
33231016ad83Smrgosf3* | osf4* | osf5*)
33241016ad83Smrg  lt_cv_deplibs_check_method=pass_all
33251016ad83Smrg  ;;
33261016ad83Smrg
33271016ad83Smrgrdos*)
33281016ad83Smrg  lt_cv_deplibs_check_method=pass_all
33291016ad83Smrg  ;;
33301016ad83Smrg
33311016ad83Smrgsolaris*)
33321016ad83Smrg  lt_cv_deplibs_check_method=pass_all
33331016ad83Smrg  ;;
33341016ad83Smrg
33351016ad83Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
33361016ad83Smrg  lt_cv_deplibs_check_method=pass_all
33371016ad83Smrg  ;;
33381016ad83Smrg
33391016ad83Smrgsysv4 | sysv4.3*)
33401016ad83Smrg  case $host_vendor in
33411016ad83Smrg  motorola)
33421016ad83Smrg    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]]'
33431016ad83Smrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
33441016ad83Smrg    ;;
33451016ad83Smrg  ncr)
33461016ad83Smrg    lt_cv_deplibs_check_method=pass_all
33471016ad83Smrg    ;;
33481016ad83Smrg  sequent)
33491016ad83Smrg    lt_cv_file_magic_cmd='/bin/file'
33501016ad83Smrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
33511016ad83Smrg    ;;
33521016ad83Smrg  sni)
33531016ad83Smrg    lt_cv_file_magic_cmd='/bin/file'
33541016ad83Smrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
33551016ad83Smrg    lt_cv_file_magic_test_file=/lib/libc.so
33561016ad83Smrg    ;;
33571016ad83Smrg  siemens)
33581016ad83Smrg    lt_cv_deplibs_check_method=pass_all
33591016ad83Smrg    ;;
33601016ad83Smrg  pc)
33611016ad83Smrg    lt_cv_deplibs_check_method=pass_all
33621016ad83Smrg    ;;
33631016ad83Smrg  esac
33641016ad83Smrg  ;;
33651016ad83Smrg
33661016ad83Smrgtpf*)
33671016ad83Smrg  lt_cv_deplibs_check_method=pass_all
33681016ad83Smrg  ;;
33691016ad83Smrgesac
33701016ad83Smrg])
33711016ad83Smrg
33721016ad83Smrgfile_magic_glob=
33731016ad83Smrgwant_nocaseglob=no
33741016ad83Smrgif test "$build" = "$host"; then
33751016ad83Smrg  case $host_os in
33761016ad83Smrg  mingw* | pw32*)
33771016ad83Smrg    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
33781016ad83Smrg      want_nocaseglob=yes
33791016ad83Smrg    else
33801016ad83Smrg      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
33811016ad83Smrg    fi
33821016ad83Smrg    ;;
33831016ad83Smrg  esac
33841016ad83Smrgfi
33851016ad83Smrg
33861016ad83Smrgfile_magic_cmd=$lt_cv_file_magic_cmd
33871016ad83Smrgdeplibs_check_method=$lt_cv_deplibs_check_method
33881016ad83Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
33891016ad83Smrg
33901016ad83Smrg_LT_DECL([], [deplibs_check_method], [1],
33911016ad83Smrg    [Method to check whether dependent libraries are shared objects])
33921016ad83Smrg_LT_DECL([], [file_magic_cmd], [1],
33931016ad83Smrg    [Command to use when deplibs_check_method = "file_magic"])
33941016ad83Smrg_LT_DECL([], [file_magic_glob], [1],
33951016ad83Smrg    [How to find potential files when deplibs_check_method = "file_magic"])
33961016ad83Smrg_LT_DECL([], [want_nocaseglob], [1],
33971016ad83Smrg    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
33981016ad83Smrg])# _LT_CHECK_MAGIC_METHOD
33991016ad83Smrg
34001016ad83Smrg
34011016ad83Smrg# LT_PATH_NM
34021016ad83Smrg# ----------
34031016ad83Smrg# find the pathname to a BSD- or MS-compatible name lister
34041016ad83SmrgAC_DEFUN([LT_PATH_NM],
34051016ad83Smrg[AC_REQUIRE([AC_PROG_CC])dnl
34061016ad83SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
34071016ad83Smrg[if test -n "$NM"; then
34081016ad83Smrg  # Let the user override the test.
34091016ad83Smrg  lt_cv_path_NM="$NM"
34101016ad83Smrgelse
34111016ad83Smrg  lt_nm_to_check="${ac_tool_prefix}nm"
34121016ad83Smrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
34131016ad83Smrg    lt_nm_to_check="$lt_nm_to_check nm"
34141016ad83Smrg  fi
34151016ad83Smrg  for lt_tmp_nm in $lt_nm_to_check; do
34161016ad83Smrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
34171016ad83Smrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
34181016ad83Smrg      IFS="$lt_save_ifs"
34191016ad83Smrg      test -z "$ac_dir" && ac_dir=.
34201016ad83Smrg      tmp_nm="$ac_dir/$lt_tmp_nm"
34211016ad83Smrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
34221016ad83Smrg	# Check to see if the nm accepts a BSD-compat flag.
34231016ad83Smrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
34241016ad83Smrg	#   nm: unknown option "B" ignored
34251016ad83Smrg	# Tru64's nm complains that /dev/null is an invalid object file
34261016ad83Smrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
34271016ad83Smrg	*/dev/null* | *'Invalid file or object type'*)
34281016ad83Smrg	  lt_cv_path_NM="$tmp_nm -B"
34291016ad83Smrg	  break
34301016ad83Smrg	  ;;
34311016ad83Smrg	*)
34321016ad83Smrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
34331016ad83Smrg	  */dev/null*)
34341016ad83Smrg	    lt_cv_path_NM="$tmp_nm -p"
34351016ad83Smrg	    break
34361016ad83Smrg	    ;;
34371016ad83Smrg	  *)
34381016ad83Smrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
34391016ad83Smrg	    continue # so that we can try to find one that supports BSD flags
34401016ad83Smrg	    ;;
34411016ad83Smrg	  esac
34421016ad83Smrg	  ;;
34431016ad83Smrg	esac
34441016ad83Smrg      fi
34451016ad83Smrg    done
34461016ad83Smrg    IFS="$lt_save_ifs"
34471016ad83Smrg  done
34481016ad83Smrg  : ${lt_cv_path_NM=no}
34491016ad83Smrgfi])
34501016ad83Smrgif test "$lt_cv_path_NM" != "no"; then
34511016ad83Smrg  NM="$lt_cv_path_NM"
34521016ad83Smrgelse
34531016ad83Smrg  # Didn't find any BSD compatible name lister, look for dumpbin.
34541016ad83Smrg  if test -n "$DUMPBIN"; then :
34551016ad83Smrg    # Let the user override the test.
34561016ad83Smrg  else
34571016ad83Smrg    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
34581016ad83Smrg    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
34591016ad83Smrg    *COFF*)
34601016ad83Smrg      DUMPBIN="$DUMPBIN -symbols"
34611016ad83Smrg      ;;
34621016ad83Smrg    *)
34631016ad83Smrg      DUMPBIN=:
34641016ad83Smrg      ;;
34651016ad83Smrg    esac
34661016ad83Smrg  fi
34671016ad83Smrg  AC_SUBST([DUMPBIN])
34681016ad83Smrg  if test "$DUMPBIN" != ":"; then
34691016ad83Smrg    NM="$DUMPBIN"
34701016ad83Smrg  fi
34711016ad83Smrgfi
34721016ad83Smrgtest -z "$NM" && NM=nm
34731016ad83SmrgAC_SUBST([NM])
34741016ad83Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
34751016ad83Smrg
34761016ad83SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
34771016ad83Smrg  [lt_cv_nm_interface="BSD nm"
34781016ad83Smrg  echo "int some_variable = 0;" > conftest.$ac_ext
34791016ad83Smrg  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
34801016ad83Smrg  (eval "$ac_compile" 2>conftest.err)
34811016ad83Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
34821016ad83Smrg  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
34831016ad83Smrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
34841016ad83Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
34851016ad83Smrg  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
34861016ad83Smrg  cat conftest.out >&AS_MESSAGE_LOG_FD
34871016ad83Smrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
34881016ad83Smrg    lt_cv_nm_interface="MS dumpbin"
34891016ad83Smrg  fi
34901016ad83Smrg  rm -f conftest*])
34911016ad83Smrg])# LT_PATH_NM
34921016ad83Smrg
34931016ad83Smrg# Old names:
34941016ad83SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
34951016ad83SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
34961016ad83Smrgdnl aclocal-1.4 backwards compatibility:
34971016ad83Smrgdnl AC_DEFUN([AM_PROG_NM], [])
34981016ad83Smrgdnl AC_DEFUN([AC_PROG_NM], [])
34991016ad83Smrg
35001016ad83Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
35011016ad83Smrg# --------------------------------
35021016ad83Smrg# how to determine the name of the shared library
35031016ad83Smrg# associated with a specific link library.
35041016ad83Smrg#  -- PORTME fill in with the dynamic library characteristics
35051016ad83Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
35061016ad83Smrg[m4_require([_LT_DECL_EGREP])
35071016ad83Smrgm4_require([_LT_DECL_OBJDUMP])
35081016ad83Smrgm4_require([_LT_DECL_DLLTOOL])
35091016ad83SmrgAC_CACHE_CHECK([how to associate runtime and link libraries],
35101016ad83Smrglt_cv_sharedlib_from_linklib_cmd,
35111016ad83Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown'
35121016ad83Smrg
35131016ad83Smrgcase $host_os in
35141016ad83Smrgcygwin* | mingw* | pw32* | cegcc*)
35151016ad83Smrg  # two different shell functions defined in ltmain.sh
35161016ad83Smrg  # decide which to use based on capabilities of $DLLTOOL
35171016ad83Smrg  case `$DLLTOOL --help 2>&1` in
35181016ad83Smrg  *--identify-strict*)
35191016ad83Smrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
35201016ad83Smrg    ;;
35211016ad83Smrg  *)
35221016ad83Smrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
35231016ad83Smrg    ;;
35241016ad83Smrg  esac
35251016ad83Smrg  ;;
35261016ad83Smrg*)
35271016ad83Smrg  # fallback: assume linklib IS sharedlib
35281016ad83Smrg  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
35291016ad83Smrg  ;;
35301016ad83Smrgesac
35311016ad83Smrg])
35321016ad83Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
35331016ad83Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
35341016ad83Smrg
35351016ad83Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
35361016ad83Smrg    [Command to associate shared and link libraries])
35371016ad83Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
35381016ad83Smrg
35391016ad83Smrg
35401016ad83Smrg# _LT_PATH_MANIFEST_TOOL
35411016ad83Smrg# ----------------------
35421016ad83Smrg# locate the manifest tool
35431016ad83Smrgm4_defun([_LT_PATH_MANIFEST_TOOL],
35441016ad83Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
35451016ad83Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
35461016ad83SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
35471016ad83Smrg  [lt_cv_path_mainfest_tool=no
35481016ad83Smrg  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
35491016ad83Smrg  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
35501016ad83Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
35511016ad83Smrg  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
35521016ad83Smrg    lt_cv_path_mainfest_tool=yes
35531016ad83Smrg  fi
35541016ad83Smrg  rm -f conftest*])
35551016ad83Smrgif test "x$lt_cv_path_mainfest_tool" != xyes; then
35561016ad83Smrg  MANIFEST_TOOL=:
35571016ad83Smrgfi
35581016ad83Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
35591016ad83Smrg])# _LT_PATH_MANIFEST_TOOL
35601016ad83Smrg
35611016ad83Smrg
35621016ad83Smrg# LT_LIB_M
35631016ad83Smrg# --------
35641016ad83Smrg# check for math library
35651016ad83SmrgAC_DEFUN([LT_LIB_M],
35661016ad83Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
35671016ad83SmrgLIBM=
35681016ad83Smrgcase $host in
35691016ad83Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
35701016ad83Smrg  # These system don't have libm, or don't need it
35711016ad83Smrg  ;;
35721016ad83Smrg*-ncr-sysv4.3*)
35731016ad83Smrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
35741016ad83Smrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
35751016ad83Smrg  ;;
35761016ad83Smrg*)
35771016ad83Smrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
35781016ad83Smrg  ;;
35791016ad83Smrgesac
35801016ad83SmrgAC_SUBST([LIBM])
35811016ad83Smrg])# LT_LIB_M
35821016ad83Smrg
35831016ad83Smrg# Old name:
35841016ad83SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
35851016ad83Smrgdnl aclocal-1.4 backwards compatibility:
35861016ad83Smrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
35871016ad83Smrg
35881016ad83Smrg
35891016ad83Smrg# _LT_COMPILER_NO_RTTI([TAGNAME])
35901016ad83Smrg# -------------------------------
35911016ad83Smrgm4_defun([_LT_COMPILER_NO_RTTI],
35921016ad83Smrg[m4_require([_LT_TAG_COMPILER])dnl
35931016ad83Smrg
35941016ad83Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
35951016ad83Smrg
35961016ad83Smrgif test "$GCC" = yes; then
35971016ad83Smrg  case $cc_basename in
35981016ad83Smrg  nvcc*)
35991016ad83Smrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
36001016ad83Smrg  *)
36011016ad83Smrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
36021016ad83Smrg  esac
36031016ad83Smrg
36041016ad83Smrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
36051016ad83Smrg    lt_cv_prog_compiler_rtti_exceptions,
36061016ad83Smrg    [-fno-rtti -fno-exceptions], [],
36071016ad83Smrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
36081016ad83Smrgfi
36091016ad83Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
36101016ad83Smrg	[Compiler flag to turn off builtin functions])
36111016ad83Smrg])# _LT_COMPILER_NO_RTTI
36121016ad83Smrg
36131016ad83Smrg
36141016ad83Smrg# _LT_CMD_GLOBAL_SYMBOLS
36151016ad83Smrg# ----------------------
36161016ad83Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
36171016ad83Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
36181016ad83SmrgAC_REQUIRE([AC_PROG_CC])dnl
36191016ad83SmrgAC_REQUIRE([AC_PROG_AWK])dnl
36201016ad83SmrgAC_REQUIRE([LT_PATH_NM])dnl
36211016ad83SmrgAC_REQUIRE([LT_PATH_LD])dnl
36221016ad83Smrgm4_require([_LT_DECL_SED])dnl
36231016ad83Smrgm4_require([_LT_DECL_EGREP])dnl
36241016ad83Smrgm4_require([_LT_TAG_COMPILER])dnl
36251016ad83Smrg
36261016ad83Smrg# Check for command to grab the raw symbol name followed by C symbol from nm.
36271016ad83SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
36281016ad83SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
36291016ad83Smrg[
36301016ad83Smrg# These are sane defaults that work on at least a few old systems.
36311016ad83Smrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
36321016ad83Smrg
36331016ad83Smrg# Character class describing NM global symbol codes.
36341016ad83Smrgsymcode='[[BCDEGRST]]'
36351016ad83Smrg
36361016ad83Smrg# Regexp to match symbols that can be accessed directly from C.
36371016ad83Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
36381016ad83Smrg
36391016ad83Smrg# Define system-specific variables.
36401016ad83Smrgcase $host_os in
36411016ad83Smrgaix*)
36421016ad83Smrg  symcode='[[BCDT]]'
36431016ad83Smrg  ;;
36441016ad83Smrgcygwin* | mingw* | pw32* | cegcc*)
36451016ad83Smrg  symcode='[[ABCDGISTW]]'
36461016ad83Smrg  ;;
36471016ad83Smrghpux*)
36481016ad83Smrg  if test "$host_cpu" = ia64; then
36491016ad83Smrg    symcode='[[ABCDEGRST]]'
36501016ad83Smrg  fi
36511016ad83Smrg  ;;
36521016ad83Smrgirix* | nonstopux*)
36531016ad83Smrg  symcode='[[BCDEGRST]]'
36541016ad83Smrg  ;;
36551016ad83Smrgosf*)
36561016ad83Smrg  symcode='[[BCDEGQRST]]'
36571016ad83Smrg  ;;
36581016ad83Smrgsolaris*)
36591016ad83Smrg  symcode='[[BDRT]]'
36601016ad83Smrg  ;;
36611016ad83Smrgsco3.2v5*)
36621016ad83Smrg  symcode='[[DT]]'
36631016ad83Smrg  ;;
36641016ad83Smrgsysv4.2uw2*)
36651016ad83Smrg  symcode='[[DT]]'
36661016ad83Smrg  ;;
36671016ad83Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
36681016ad83Smrg  symcode='[[ABDT]]'
36691016ad83Smrg  ;;
36701016ad83Smrgsysv4)
36711016ad83Smrg  symcode='[[DFNSTU]]'
36721016ad83Smrg  ;;
36731016ad83Smrgesac
36741016ad83Smrg
36751016ad83Smrg# If we're using GNU nm, then use its standard symbol codes.
36761016ad83Smrgcase `$NM -V 2>&1` in
36771016ad83Smrg*GNU* | *'with BFD'*)
36781016ad83Smrg  symcode='[[ABCDGIRSTW]]' ;;
36791016ad83Smrgesac
36801016ad83Smrg
36811016ad83Smrg# Transform an extracted symbol line into a proper C declaration.
36821016ad83Smrg# Some systems (esp. on ia64) link data and code symbols differently,
36831016ad83Smrg# so use this general approach.
36841016ad83Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
36851016ad83Smrg
36861016ad83Smrg# Transform an extracted symbol line into symbol name and symbol address
36871016ad83Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
36881016ad83Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
36891016ad83Smrg
36901016ad83Smrg# Handle CRLF in mingw tool chain
36911016ad83Smrgopt_cr=
36921016ad83Smrgcase $build_os in
36931016ad83Smrgmingw*)
36941016ad83Smrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
36951016ad83Smrg  ;;
36961016ad83Smrgesac
36971016ad83Smrg
36981016ad83Smrg# Try without a prefix underscore, then with it.
36991016ad83Smrgfor ac_symprfx in "" "_"; do
37001016ad83Smrg
37011016ad83Smrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
37021016ad83Smrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
37031016ad83Smrg
37041016ad83Smrg  # Write the raw and C identifiers.
37051016ad83Smrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
37061016ad83Smrg    # Fake it for dumpbin and say T for any non-static function
37071016ad83Smrg    # and D for any global variable.
37081016ad83Smrg    # Also find C++ and __fastcall symbols from MSVC++,
37091016ad83Smrg    # which start with @ or ?.
37101016ad83Smrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
37111016ad83Smrg"     {last_section=section; section=\$ 3};"\
37121016ad83Smrg"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
37131016ad83Smrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
37141016ad83Smrg"     \$ 0!~/External *\|/{next};"\
37151016ad83Smrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
37161016ad83Smrg"     {if(hide[section]) next};"\
37171016ad83Smrg"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
37181016ad83Smrg"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
37191016ad83Smrg"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
37201016ad83Smrg"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
37211016ad83Smrg"     ' prfx=^$ac_symprfx]"
37221016ad83Smrg  else
37231016ad83Smrg    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
37241016ad83Smrg  fi
37251016ad83Smrg  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
37261016ad83Smrg
37271016ad83Smrg  # Check to see that the pipe works correctly.
37281016ad83Smrg  pipe_works=no
37291016ad83Smrg
37301016ad83Smrg  rm -f conftest*
37311016ad83Smrg  cat > conftest.$ac_ext <<_LT_EOF
37321016ad83Smrg#ifdef __cplusplus
37331016ad83Smrgextern "C" {
37341016ad83Smrg#endif
37351016ad83Smrgchar nm_test_var;
37361016ad83Smrgvoid nm_test_func(void);
37371016ad83Smrgvoid nm_test_func(void){}
37381016ad83Smrg#ifdef __cplusplus
37391016ad83Smrg}
37401016ad83Smrg#endif
37411016ad83Smrgint main(){nm_test_var='a';nm_test_func();return(0);}
37421016ad83Smrg_LT_EOF
37431016ad83Smrg
37441016ad83Smrg  if AC_TRY_EVAL(ac_compile); then
37451016ad83Smrg    # Now try to grab the symbols.
37461016ad83Smrg    nlist=conftest.nm
37471016ad83Smrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
37481016ad83Smrg      # Try sorting and uniquifying the output.
37491016ad83Smrg      if sort "$nlist" | uniq > "$nlist"T; then
37501016ad83Smrg	mv -f "$nlist"T "$nlist"
37511016ad83Smrg      else
37521016ad83Smrg	rm -f "$nlist"T
37531016ad83Smrg      fi
37541016ad83Smrg
37551016ad83Smrg      # Make sure that we snagged all the symbols we need.
37561016ad83Smrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
37571016ad83Smrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
37581016ad83Smrg	  cat <<_LT_EOF > conftest.$ac_ext
37591016ad83Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
37601016ad83Smrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
37611016ad83Smrg/* DATA imports from DLLs on WIN32 con't be const, because runtime
37621016ad83Smrg   relocations are performed -- see ld's documentation on pseudo-relocs.  */
37631016ad83Smrg# define LT@&t@_DLSYM_CONST
37641016ad83Smrg#elif defined(__osf__)
37651016ad83Smrg/* This system does not cope well with relocations in const data.  */
37661016ad83Smrg# define LT@&t@_DLSYM_CONST
37671016ad83Smrg#else
37681016ad83Smrg# define LT@&t@_DLSYM_CONST const
37691016ad83Smrg#endif
37701016ad83Smrg
37711016ad83Smrg#ifdef __cplusplus
37721016ad83Smrgextern "C" {
37731016ad83Smrg#endif
37741016ad83Smrg
37751016ad83Smrg_LT_EOF
37761016ad83Smrg	  # Now generate the symbol file.
37771016ad83Smrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
37781016ad83Smrg
37791016ad83Smrg	  cat <<_LT_EOF >> conftest.$ac_ext
37801016ad83Smrg
37811016ad83Smrg/* The mapping between symbol names and symbols.  */
37821016ad83SmrgLT@&t@_DLSYM_CONST struct {
37831016ad83Smrg  const char *name;
37841016ad83Smrg  void       *address;
37851016ad83Smrg}
37861016ad83Smrglt__PROGRAM__LTX_preloaded_symbols[[]] =
37871016ad83Smrg{
37881016ad83Smrg  { "@PROGRAM@", (void *) 0 },
37891016ad83Smrg_LT_EOF
37901016ad83Smrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
37911016ad83Smrg	  cat <<\_LT_EOF >> conftest.$ac_ext
37921016ad83Smrg  {0, (void *) 0}
37931016ad83Smrg};
37941016ad83Smrg
37951016ad83Smrg/* This works around a problem in FreeBSD linker */
37961016ad83Smrg#ifdef FREEBSD_WORKAROUND
37971016ad83Smrgstatic const void *lt_preloaded_setup() {
37981016ad83Smrg  return lt__PROGRAM__LTX_preloaded_symbols;
37991016ad83Smrg}
38001016ad83Smrg#endif
38011016ad83Smrg
38021016ad83Smrg#ifdef __cplusplus
38031016ad83Smrg}
38041016ad83Smrg#endif
38051016ad83Smrg_LT_EOF
38061016ad83Smrg	  # Now try linking the two files.
38071016ad83Smrg	  mv conftest.$ac_objext conftstm.$ac_objext
38081016ad83Smrg	  lt_globsym_save_LIBS=$LIBS
38091016ad83Smrg	  lt_globsym_save_CFLAGS=$CFLAGS
38101016ad83Smrg	  LIBS="conftstm.$ac_objext"
38111016ad83Smrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
38121016ad83Smrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
38131016ad83Smrg	    pipe_works=yes
38141016ad83Smrg	  fi
38151016ad83Smrg	  LIBS=$lt_globsym_save_LIBS
38161016ad83Smrg	  CFLAGS=$lt_globsym_save_CFLAGS
38171016ad83Smrg	else
38181016ad83Smrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
38191016ad83Smrg	fi
38201016ad83Smrg      else
38211016ad83Smrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
38221016ad83Smrg      fi
38231016ad83Smrg    else
38241016ad83Smrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
38251016ad83Smrg    fi
38261016ad83Smrg  else
38271016ad83Smrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
38281016ad83Smrg    cat conftest.$ac_ext >&5
38291016ad83Smrg  fi
38301016ad83Smrg  rm -rf conftest* conftst*
38311016ad83Smrg
38321016ad83Smrg  # Do not use the global_symbol_pipe unless it works.
38331016ad83Smrg  if test "$pipe_works" = yes; then
38341016ad83Smrg    break
38351016ad83Smrg  else
38361016ad83Smrg    lt_cv_sys_global_symbol_pipe=
38371016ad83Smrg  fi
38381016ad83Smrgdone
38391016ad83Smrg])
38401016ad83Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
38411016ad83Smrg  lt_cv_sys_global_symbol_to_cdecl=
38421016ad83Smrgfi
38431016ad83Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
38441016ad83Smrg  AC_MSG_RESULT(failed)
38451016ad83Smrgelse
38461016ad83Smrg  AC_MSG_RESULT(ok)
38471016ad83Smrgfi
38481016ad83Smrg
38491016ad83Smrg# Response file support.
38501016ad83Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
38511016ad83Smrg  nm_file_list_spec='@'
38521016ad83Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
38531016ad83Smrg  nm_file_list_spec='@'
38541016ad83Smrgfi
38551016ad83Smrg
38561016ad83Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
38571016ad83Smrg    [Take the output of nm and produce a listing of raw symbols and C names])
38581016ad83Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
38591016ad83Smrg    [Transform the output of nm in a proper C declaration])
38601016ad83Smrg_LT_DECL([global_symbol_to_c_name_address],
38611016ad83Smrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
38621016ad83Smrg    [Transform the output of nm in a C name address pair])
38631016ad83Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
38641016ad83Smrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
38651016ad83Smrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
38661016ad83Smrg_LT_DECL([], [nm_file_list_spec], [1],
38671016ad83Smrg    [Specify filename containing input files for $NM])
38681016ad83Smrg]) # _LT_CMD_GLOBAL_SYMBOLS
38691016ad83Smrg
38701016ad83Smrg
38711016ad83Smrg# _LT_COMPILER_PIC([TAGNAME])
38721016ad83Smrg# ---------------------------
38731016ad83Smrgm4_defun([_LT_COMPILER_PIC],
38741016ad83Smrg[m4_require([_LT_TAG_COMPILER])dnl
38751016ad83Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
38761016ad83Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
38771016ad83Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
38781016ad83Smrg
38791016ad83Smrgm4_if([$1], [CXX], [
38801016ad83Smrg  # C++ specific cases for pic, static, wl, etc.
38811016ad83Smrg  if test "$GXX" = yes; then
38821016ad83Smrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
38831016ad83Smrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
38841016ad83Smrg
38851016ad83Smrg    case $host_os in
38861016ad83Smrg    aix*)
38871016ad83Smrg      # All AIX code is PIC.
38881016ad83Smrg      if test "$host_cpu" = ia64; then
38891016ad83Smrg	# AIX 5 now supports IA64 processor
38901016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
38911016ad83Smrg      fi
38921016ad83Smrg      ;;
38931016ad83Smrg
38941016ad83Smrg    amigaos*)
38951016ad83Smrg      case $host_cpu in
38961016ad83Smrg      powerpc)
38971016ad83Smrg            # see comment about AmigaOS4 .so support
38981016ad83Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
38991016ad83Smrg        ;;
39001016ad83Smrg      m68k)
39011016ad83Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
39021016ad83Smrg            # adding the `-m68020' flag to GCC prevents building anything better,
39031016ad83Smrg            # like `-m68040'.
39041016ad83Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
39051016ad83Smrg        ;;
39061016ad83Smrg      esac
39071016ad83Smrg      ;;
39081016ad83Smrg
39091016ad83Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
39101016ad83Smrg      # PIC is the default for these OSes.
39111016ad83Smrg      ;;
39121016ad83Smrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
39131016ad83Smrg      # This hack is so that the source file can tell whether it is being
39141016ad83Smrg      # built for inclusion in a dll (and should export symbols for example).
39151016ad83Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
39161016ad83Smrg      # (--disable-auto-import) libraries
39171016ad83Smrg      m4_if([$1], [GCJ], [],
39181016ad83Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
39191016ad83Smrg      ;;
39201016ad83Smrg    darwin* | rhapsody*)
39211016ad83Smrg      # PIC is the default on this platform
39221016ad83Smrg      # Common symbols not allowed in MH_DYLIB files
39231016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
39241016ad83Smrg      ;;
39251016ad83Smrg    *djgpp*)
39261016ad83Smrg      # DJGPP does not support shared libraries at all
39271016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
39281016ad83Smrg      ;;
39291016ad83Smrg    haiku*)
39301016ad83Smrg      # PIC is the default for Haiku.
39311016ad83Smrg      # The "-static" flag exists, but is broken.
39321016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
39331016ad83Smrg      ;;
39341016ad83Smrg    interix[[3-9]]*)
39351016ad83Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
39361016ad83Smrg      # Instead, we relocate shared libraries at runtime.
39371016ad83Smrg      ;;
39381016ad83Smrg    sysv4*MP*)
39391016ad83Smrg      if test -d /usr/nec; then
39401016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
39411016ad83Smrg      fi
39421016ad83Smrg      ;;
39431016ad83Smrg    hpux*)
39441016ad83Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
39451016ad83Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
39461016ad83Smrg      # sets the default TLS model and affects inlining.
39471016ad83Smrg      case $host_cpu in
39481016ad83Smrg      hppa*64*)
39491016ad83Smrg	;;
39501016ad83Smrg      *)
39511016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
39521016ad83Smrg	;;
39531016ad83Smrg      esac
39541016ad83Smrg      ;;
39551016ad83Smrg    *qnx* | *nto*)
39561016ad83Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
39571016ad83Smrg      # it will coredump.
39581016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
39591016ad83Smrg      ;;
39601016ad83Smrg    *)
39611016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
39621016ad83Smrg      ;;
39631016ad83Smrg    esac
39641016ad83Smrg  else
39651016ad83Smrg    case $host_os in
39661016ad83Smrg      aix[[4-9]]*)
39671016ad83Smrg	# All AIX code is PIC.
39681016ad83Smrg	if test "$host_cpu" = ia64; then
39691016ad83Smrg	  # AIX 5 now supports IA64 processor
39701016ad83Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
39711016ad83Smrg	else
39721016ad83Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
39731016ad83Smrg	fi
39741016ad83Smrg	;;
39751016ad83Smrg      chorus*)
39761016ad83Smrg	case $cc_basename in
39771016ad83Smrg	cxch68*)
39781016ad83Smrg	  # Green Hills C++ Compiler
39791016ad83Smrg	  # _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"
39801016ad83Smrg	  ;;
39811016ad83Smrg	esac
39821016ad83Smrg	;;
39831016ad83Smrg      mingw* | cygwin* | os2* | pw32* | cegcc*)
39841016ad83Smrg	# This hack is so that the source file can tell whether it is being
39851016ad83Smrg	# built for inclusion in a dll (and should export symbols for example).
39861016ad83Smrg	m4_if([$1], [GCJ], [],
39871016ad83Smrg	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
39881016ad83Smrg	;;
39891016ad83Smrg      dgux*)
39901016ad83Smrg	case $cc_basename in
39911016ad83Smrg	  ec++*)
39921016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
39931016ad83Smrg	    ;;
39941016ad83Smrg	  ghcx*)
39951016ad83Smrg	    # Green Hills C++ Compiler
39961016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
39971016ad83Smrg	    ;;
39981016ad83Smrg	  *)
39991016ad83Smrg	    ;;
40001016ad83Smrg	esac
40011016ad83Smrg	;;
40021016ad83Smrg      freebsd* | dragonfly*)
40031016ad83Smrg	# FreeBSD uses GNU C++
40041016ad83Smrg	;;
40051016ad83Smrg      hpux9* | hpux10* | hpux11*)
40061016ad83Smrg	case $cc_basename in
40071016ad83Smrg	  CC*)
40081016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
40091016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
40101016ad83Smrg	    if test "$host_cpu" != ia64; then
40111016ad83Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
40121016ad83Smrg	    fi
40131016ad83Smrg	    ;;
40141016ad83Smrg	  aCC*)
40151016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
40161016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
40171016ad83Smrg	    case $host_cpu in
40181016ad83Smrg	    hppa*64*|ia64*)
40191016ad83Smrg	      # +Z the default
40201016ad83Smrg	      ;;
40211016ad83Smrg	    *)
40221016ad83Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
40231016ad83Smrg	      ;;
40241016ad83Smrg	    esac
40251016ad83Smrg	    ;;
40261016ad83Smrg	  *)
40271016ad83Smrg	    ;;
40281016ad83Smrg	esac
40291016ad83Smrg	;;
40301016ad83Smrg      interix*)
40311016ad83Smrg	# This is c89, which is MS Visual C++ (no shared libs)
40321016ad83Smrg	# Anyone wants to do a port?
40331016ad83Smrg	;;
40341016ad83Smrg      irix5* | irix6* | nonstopux*)
40351016ad83Smrg	case $cc_basename in
40361016ad83Smrg	  CC*)
40371016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
40381016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
40391016ad83Smrg	    # CC pic flag -KPIC is the default.
40401016ad83Smrg	    ;;
40411016ad83Smrg	  *)
40421016ad83Smrg	    ;;
40431016ad83Smrg	esac
40441016ad83Smrg	;;
40451016ad83Smrg      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
40461016ad83Smrg	case $cc_basename in
40471016ad83Smrg	  KCC*)
40481016ad83Smrg	    # KAI C++ Compiler
40491016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
40501016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
40511016ad83Smrg	    ;;
40521016ad83Smrg	  ecpc* )
40531016ad83Smrg	    # old Intel C++ for x86_64 which still supported -KPIC.
40541016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
40551016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
40561016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
40571016ad83Smrg	    ;;
40581016ad83Smrg	  icpc* )
40591016ad83Smrg	    # Intel C++, used to be incompatible with GCC.
40601016ad83Smrg	    # ICC 10 doesn't accept -KPIC any more.
40611016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
40621016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
40631016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
40641016ad83Smrg	    ;;
40651016ad83Smrg	  pgCC* | pgcpp*)
40661016ad83Smrg	    # Portland Group C++ compiler
40671016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
40681016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
40691016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
40701016ad83Smrg	    ;;
40711016ad83Smrg	  cxx*)
40721016ad83Smrg	    # Compaq C++
40731016ad83Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
40741016ad83Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
40751016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
40761016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
40771016ad83Smrg	    ;;
40781016ad83Smrg	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
40791016ad83Smrg	    # IBM XL 8.0, 9.0 on PPC and BlueGene
40801016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
40811016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
40821016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
40831016ad83Smrg	    ;;
40841016ad83Smrg	  *)
40851016ad83Smrg	    case `$CC -V 2>&1 | sed 5q` in
40861016ad83Smrg	    *Sun\ C*)
40871016ad83Smrg	      # Sun C++ 5.9
40881016ad83Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
40891016ad83Smrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
40901016ad83Smrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
40911016ad83Smrg	      ;;
40921016ad83Smrg	    esac
40931016ad83Smrg	    ;;
40941016ad83Smrg	esac
40951016ad83Smrg	;;
40961016ad83Smrg      lynxos*)
40971016ad83Smrg	;;
40981016ad83Smrg      m88k*)
40991016ad83Smrg	;;
41001016ad83Smrg      mvs*)
41011016ad83Smrg	case $cc_basename in
41021016ad83Smrg	  cxx*)
41031016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
41041016ad83Smrg	    ;;
41051016ad83Smrg	  *)
41061016ad83Smrg	    ;;
41071016ad83Smrg	esac
41081016ad83Smrg	;;
41091016ad83Smrg      netbsd* | netbsdelf*-gnu)
41101016ad83Smrg	;;
41111016ad83Smrg      *qnx* | *nto*)
41121016ad83Smrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
41131016ad83Smrg        # it will coredump.
41141016ad83Smrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
41151016ad83Smrg        ;;
41161016ad83Smrg      osf3* | osf4* | osf5*)
41171016ad83Smrg	case $cc_basename in
41181016ad83Smrg	  KCC*)
41191016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
41201016ad83Smrg	    ;;
41211016ad83Smrg	  RCC*)
41221016ad83Smrg	    # Rational C++ 2.4.1
41231016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
41241016ad83Smrg	    ;;
41251016ad83Smrg	  cxx*)
41261016ad83Smrg	    # Digital/Compaq C++
41271016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
41281016ad83Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
41291016ad83Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
41301016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
41311016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
41321016ad83Smrg	    ;;
41331016ad83Smrg	  *)
41341016ad83Smrg	    ;;
41351016ad83Smrg	esac
41361016ad83Smrg	;;
41371016ad83Smrg      psos*)
41381016ad83Smrg	;;
41391016ad83Smrg      solaris*)
41401016ad83Smrg	case $cc_basename in
41411016ad83Smrg	  CC* | sunCC*)
41421016ad83Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
41431016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
41441016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
41451016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
41461016ad83Smrg	    ;;
41471016ad83Smrg	  gcx*)
41481016ad83Smrg	    # Green Hills C++ Compiler
41491016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
41501016ad83Smrg	    ;;
41511016ad83Smrg	  *)
41521016ad83Smrg	    ;;
41531016ad83Smrg	esac
41541016ad83Smrg	;;
41551016ad83Smrg      sunos4*)
41561016ad83Smrg	case $cc_basename in
41571016ad83Smrg	  CC*)
41581016ad83Smrg	    # Sun C++ 4.x
41591016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
41601016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
41611016ad83Smrg	    ;;
41621016ad83Smrg	  lcc*)
41631016ad83Smrg	    # Lucid
41641016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
41651016ad83Smrg	    ;;
41661016ad83Smrg	  *)
41671016ad83Smrg	    ;;
41681016ad83Smrg	esac
41691016ad83Smrg	;;
41701016ad83Smrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
41711016ad83Smrg	case $cc_basename in
41721016ad83Smrg	  CC*)
41731016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
41741016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
41751016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
41761016ad83Smrg	    ;;
41771016ad83Smrg	esac
41781016ad83Smrg	;;
41791016ad83Smrg      tandem*)
41801016ad83Smrg	case $cc_basename in
41811016ad83Smrg	  NCC*)
41821016ad83Smrg	    # NonStop-UX NCC 3.20
41831016ad83Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
41841016ad83Smrg	    ;;
41851016ad83Smrg	  *)
41861016ad83Smrg	    ;;
41871016ad83Smrg	esac
41881016ad83Smrg	;;
41891016ad83Smrg      vxworks*)
41901016ad83Smrg	;;
41911016ad83Smrg      *)
41921016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
41931016ad83Smrg	;;
41941016ad83Smrg    esac
41951016ad83Smrg  fi
41961016ad83Smrg],
41971016ad83Smrg[
41981016ad83Smrg  if test "$GCC" = yes; then
41991016ad83Smrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
42001016ad83Smrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
42011016ad83Smrg
42021016ad83Smrg    case $host_os in
42031016ad83Smrg      aix*)
42041016ad83Smrg      # All AIX code is PIC.
42051016ad83Smrg      if test "$host_cpu" = ia64; then
42061016ad83Smrg	# AIX 5 now supports IA64 processor
42071016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
42081016ad83Smrg      fi
42091016ad83Smrg      ;;
42101016ad83Smrg
42111016ad83Smrg    amigaos*)
42121016ad83Smrg      case $host_cpu in
42131016ad83Smrg      powerpc)
42141016ad83Smrg            # see comment about AmigaOS4 .so support
42151016ad83Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
42161016ad83Smrg        ;;
42171016ad83Smrg      m68k)
42181016ad83Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
42191016ad83Smrg            # adding the `-m68020' flag to GCC prevents building anything better,
42201016ad83Smrg            # like `-m68040'.
42211016ad83Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
42221016ad83Smrg        ;;
42231016ad83Smrg      esac
42241016ad83Smrg      ;;
42251016ad83Smrg
42261016ad83Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
42271016ad83Smrg      # PIC is the default for these OSes.
42281016ad83Smrg      ;;
42291016ad83Smrg
42301016ad83Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
42311016ad83Smrg      # This hack is so that the source file can tell whether it is being
42321016ad83Smrg      # built for inclusion in a dll (and should export symbols for example).
42331016ad83Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
42341016ad83Smrg      # (--disable-auto-import) libraries
42351016ad83Smrg      m4_if([$1], [GCJ], [],
42361016ad83Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
42371016ad83Smrg      ;;
42381016ad83Smrg
42391016ad83Smrg    darwin* | rhapsody*)
42401016ad83Smrg      # PIC is the default on this platform
42411016ad83Smrg      # Common symbols not allowed in MH_DYLIB files
42421016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
42431016ad83Smrg      ;;
42441016ad83Smrg
42451016ad83Smrg    haiku*)
42461016ad83Smrg      # PIC is the default for Haiku.
42471016ad83Smrg      # The "-static" flag exists, but is broken.
42481016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
42491016ad83Smrg      ;;
42501016ad83Smrg
42511016ad83Smrg    hpux*)
42521016ad83Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
42531016ad83Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
42541016ad83Smrg      # sets the default TLS model and affects inlining.
42551016ad83Smrg      case $host_cpu in
42561016ad83Smrg      hppa*64*)
42571016ad83Smrg	# +Z the default
42581016ad83Smrg	;;
42591016ad83Smrg      *)
42601016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
42611016ad83Smrg	;;
42621016ad83Smrg      esac
42631016ad83Smrg      ;;
42641016ad83Smrg
42651016ad83Smrg    interix[[3-9]]*)
42661016ad83Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
42671016ad83Smrg      # Instead, we relocate shared libraries at runtime.
42681016ad83Smrg      ;;
42691016ad83Smrg
42701016ad83Smrg    msdosdjgpp*)
42711016ad83Smrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
42721016ad83Smrg      # on systems that don't support them.
42731016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
42741016ad83Smrg      enable_shared=no
42751016ad83Smrg      ;;
42761016ad83Smrg
42771016ad83Smrg    *nto* | *qnx*)
42781016ad83Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
42791016ad83Smrg      # it will coredump.
42801016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
42811016ad83Smrg      ;;
42821016ad83Smrg
42831016ad83Smrg    sysv4*MP*)
42841016ad83Smrg      if test -d /usr/nec; then
42851016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
42861016ad83Smrg      fi
42871016ad83Smrg      ;;
42881016ad83Smrg
42891016ad83Smrg    *)
42901016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
42911016ad83Smrg      ;;
42921016ad83Smrg    esac
42931016ad83Smrg
42941016ad83Smrg    case $cc_basename in
42951016ad83Smrg    nvcc*) # Cuda Compiler Driver 2.2
42961016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
42971016ad83Smrg      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
42981016ad83Smrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
42991016ad83Smrg      fi
43001016ad83Smrg      ;;
43011016ad83Smrg    esac
43021016ad83Smrg  else
43031016ad83Smrg    # PORTME Check for flag to pass linker flags through the system compiler.
43041016ad83Smrg    case $host_os in
43051016ad83Smrg    aix*)
43061016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43071016ad83Smrg      if test "$host_cpu" = ia64; then
43081016ad83Smrg	# AIX 5 now supports IA64 processor
43091016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
43101016ad83Smrg      else
43111016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
43121016ad83Smrg      fi
43131016ad83Smrg      ;;
43141016ad83Smrg
43151016ad83Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
43161016ad83Smrg      # This hack is so that the source file can tell whether it is being
43171016ad83Smrg      # built for inclusion in a dll (and should export symbols for example).
43181016ad83Smrg      m4_if([$1], [GCJ], [],
43191016ad83Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
43201016ad83Smrg      ;;
43211016ad83Smrg
43221016ad83Smrg    hpux9* | hpux10* | hpux11*)
43231016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43241016ad83Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
43251016ad83Smrg      # not for PA HP-UX.
43261016ad83Smrg      case $host_cpu in
43271016ad83Smrg      hppa*64*|ia64*)
43281016ad83Smrg	# +Z the default
43291016ad83Smrg	;;
43301016ad83Smrg      *)
43311016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
43321016ad83Smrg	;;
43331016ad83Smrg      esac
43341016ad83Smrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
43351016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
43361016ad83Smrg      ;;
43371016ad83Smrg
43381016ad83Smrg    irix5* | irix6* | nonstopux*)
43391016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43401016ad83Smrg      # PIC (with -KPIC) is the default.
43411016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
43421016ad83Smrg      ;;
43431016ad83Smrg
43441016ad83Smrg    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
43451016ad83Smrg      case $cc_basename in
43461016ad83Smrg      # old Intel for x86_64 which still supported -KPIC.
43471016ad83Smrg      ecc*)
43481016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43491016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
43501016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
43511016ad83Smrg        ;;
43521016ad83Smrg      # icc used to be incompatible with GCC.
43531016ad83Smrg      # ICC 10 doesn't accept -KPIC any more.
43541016ad83Smrg      icc* | ifort*)
43551016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43561016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
43571016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
43581016ad83Smrg        ;;
43591016ad83Smrg      # Lahey Fortran 8.1.
43601016ad83Smrg      lf95*)
43611016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43621016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
43631016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
43641016ad83Smrg	;;
43651016ad83Smrg      nagfor*)
43661016ad83Smrg	# NAG Fortran compiler
43671016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
43681016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
43691016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
43701016ad83Smrg	;;
43711016ad83Smrg      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
43721016ad83Smrg        # Portland Group compilers (*not* the Pentium gcc compiler,
43731016ad83Smrg	# which looks to be a dead project)
43741016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43751016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
43761016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
43771016ad83Smrg        ;;
43781016ad83Smrg      ccc*)
43791016ad83Smrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43801016ad83Smrg        # All Alpha code is PIC.
43811016ad83Smrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
43821016ad83Smrg        ;;
43831016ad83Smrg      xl* | bgxl* | bgf* | mpixl*)
43841016ad83Smrg	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
43851016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43861016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
43871016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
43881016ad83Smrg	;;
43891016ad83Smrg      *)
43901016ad83Smrg	case `$CC -V 2>&1 | sed 5q` in
43911016ad83Smrg	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
43921016ad83Smrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
43931016ad83Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
43941016ad83Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
43951016ad83Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
43961016ad83Smrg	  ;;
43971016ad83Smrg	*Sun\ F* | *Sun*Fortran*)
43981016ad83Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
43991016ad83Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
44001016ad83Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
44011016ad83Smrg	  ;;
44021016ad83Smrg	*Sun\ C*)
44031016ad83Smrg	  # Sun C 5.9
44041016ad83Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
44051016ad83Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
44061016ad83Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
44071016ad83Smrg	  ;;
44081016ad83Smrg        *Intel*\ [[CF]]*Compiler*)
44091016ad83Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
44101016ad83Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
44111016ad83Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
44121016ad83Smrg	  ;;
44131016ad83Smrg	*Portland\ Group*)
44141016ad83Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
44151016ad83Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
44161016ad83Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
44171016ad83Smrg	  ;;
44181016ad83Smrg	esac
44191016ad83Smrg	;;
44201016ad83Smrg      esac
44211016ad83Smrg      ;;
44221016ad83Smrg
44231016ad83Smrg    newsos6)
44241016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
44251016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
44261016ad83Smrg      ;;
44271016ad83Smrg
44281016ad83Smrg    *nto* | *qnx*)
44291016ad83Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
44301016ad83Smrg      # it will coredump.
44311016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
44321016ad83Smrg      ;;
44331016ad83Smrg
44341016ad83Smrg    osf3* | osf4* | osf5*)
44351016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
44361016ad83Smrg      # All OSF/1 code is PIC.
44371016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
44381016ad83Smrg      ;;
44391016ad83Smrg
44401016ad83Smrg    rdos*)
44411016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
44421016ad83Smrg      ;;
44431016ad83Smrg
44441016ad83Smrg    solaris*)
44451016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
44461016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
44471016ad83Smrg      case $cc_basename in
44481016ad83Smrg      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
44491016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
44501016ad83Smrg      *)
44511016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
44521016ad83Smrg      esac
44531016ad83Smrg      ;;
44541016ad83Smrg
44551016ad83Smrg    sunos4*)
44561016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
44571016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
44581016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
44591016ad83Smrg      ;;
44601016ad83Smrg
44611016ad83Smrg    sysv4 | sysv4.2uw2* | sysv4.3*)
44621016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
44631016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
44641016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
44651016ad83Smrg      ;;
44661016ad83Smrg
44671016ad83Smrg    sysv4*MP*)
44681016ad83Smrg      if test -d /usr/nec ;then
44691016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
44701016ad83Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
44711016ad83Smrg      fi
44721016ad83Smrg      ;;
44731016ad83Smrg
44741016ad83Smrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
44751016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
44761016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
44771016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
44781016ad83Smrg      ;;
44791016ad83Smrg
44801016ad83Smrg    unicos*)
44811016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
44821016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
44831016ad83Smrg      ;;
44841016ad83Smrg
44851016ad83Smrg    uts4*)
44861016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
44871016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
44881016ad83Smrg      ;;
44891016ad83Smrg
44901016ad83Smrg    *)
44911016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
44921016ad83Smrg      ;;
44931016ad83Smrg    esac
44941016ad83Smrg  fi
44951016ad83Smrg])
44961016ad83Smrgcase $host_os in
44971016ad83Smrg  # For platforms which do not support PIC, -DPIC is meaningless:
44981016ad83Smrg  *djgpp*)
44991016ad83Smrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
45001016ad83Smrg    ;;
45011016ad83Smrg  *)
45021016ad83Smrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
45031016ad83Smrg    ;;
45041016ad83Smrgesac
45051016ad83Smrg
45061016ad83SmrgAC_CACHE_CHECK([for $compiler option to produce PIC],
45071016ad83Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
45081016ad83Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
45091016ad83Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
45101016ad83Smrg
45111016ad83Smrg#
45121016ad83Smrg# Check to make sure the PIC flag actually works.
45131016ad83Smrg#
45141016ad83Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
45151016ad83Smrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
45161016ad83Smrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
45171016ad83Smrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
45181016ad83Smrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
45191016ad83Smrg     "" | " "*) ;;
45201016ad83Smrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
45211016ad83Smrg     esac],
45221016ad83Smrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
45231016ad83Smrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
45241016ad83Smrgfi
45251016ad83Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
45261016ad83Smrg	[Additional compiler flags for building library objects])
45271016ad83Smrg
45281016ad83Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
45291016ad83Smrg	[How to pass a linker flag through the compiler])
45301016ad83Smrg#
45311016ad83Smrg# Check to make sure the static flag actually works.
45321016ad83Smrg#
45331016ad83Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
45341016ad83Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
45351016ad83Smrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
45361016ad83Smrg  $lt_tmp_static_flag,
45371016ad83Smrg  [],
45381016ad83Smrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
45391016ad83Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
45401016ad83Smrg	[Compiler flag to prevent dynamic linking])
45411016ad83Smrg])# _LT_COMPILER_PIC
45421016ad83Smrg
45431016ad83Smrg
45441016ad83Smrg# _LT_LINKER_SHLIBS([TAGNAME])
45451016ad83Smrg# ----------------------------
45461016ad83Smrg# See if the linker supports building shared libraries.
45471016ad83Smrgm4_defun([_LT_LINKER_SHLIBS],
45481016ad83Smrg[AC_REQUIRE([LT_PATH_LD])dnl
45491016ad83SmrgAC_REQUIRE([LT_PATH_NM])dnl
45501016ad83Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
45511016ad83Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
45521016ad83Smrgm4_require([_LT_DECL_EGREP])dnl
45531016ad83Smrgm4_require([_LT_DECL_SED])dnl
45541016ad83Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
45551016ad83Smrgm4_require([_LT_TAG_COMPILER])dnl
45561016ad83SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
45571016ad83Smrgm4_if([$1], [CXX], [
45581016ad83Smrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
45591016ad83Smrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
45601016ad83Smrg  case $host_os in
45611016ad83Smrg  aix[[4-9]]*)
45621016ad83Smrg    # If we're using GNU nm, then we don't want the "-C" option.
45631016ad83Smrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
45641016ad83Smrg    # Also, AIX nm treats weak defined symbols like other global defined
45651016ad83Smrg    # symbols, whereas GNU nm marks them as "W".
45661016ad83Smrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
45671016ad83Smrg      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
45681016ad83Smrg    else
45691016ad83Smrg      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
45701016ad83Smrg    fi
45711016ad83Smrg    ;;
45721016ad83Smrg  pw32*)
45731016ad83Smrg    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
45741016ad83Smrg    ;;
45751016ad83Smrg  cygwin* | mingw* | cegcc*)
45761016ad83Smrg    case $cc_basename in
45771016ad83Smrg    cl*)
45781016ad83Smrg      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
45791016ad83Smrg      ;;
45801016ad83Smrg    *)
45811016ad83Smrg      _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'
45821016ad83Smrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
45831016ad83Smrg      ;;
45841016ad83Smrg    esac
45851016ad83Smrg    ;;
45861016ad83Smrg  linux* | k*bsd*-gnu | gnu*)
45871016ad83Smrg    _LT_TAGVAR(link_all_deplibs, $1)=no
45881016ad83Smrg    ;;
45891016ad83Smrg  *)
45901016ad83Smrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
45911016ad83Smrg    ;;
45921016ad83Smrg  esac
45931016ad83Smrg], [
45941016ad83Smrg  runpath_var=
45951016ad83Smrg  _LT_TAGVAR(allow_undefined_flag, $1)=
45961016ad83Smrg  _LT_TAGVAR(always_export_symbols, $1)=no
45971016ad83Smrg  _LT_TAGVAR(archive_cmds, $1)=
45981016ad83Smrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
45991016ad83Smrg  _LT_TAGVAR(compiler_needs_object, $1)=no
46001016ad83Smrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
46011016ad83Smrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
46021016ad83Smrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
46031016ad83Smrg  _LT_TAGVAR(hardcode_automatic, $1)=no
46041016ad83Smrg  _LT_TAGVAR(hardcode_direct, $1)=no
46051016ad83Smrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
46061016ad83Smrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
46071016ad83Smrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
46081016ad83Smrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
46091016ad83Smrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
46101016ad83Smrg  _LT_TAGVAR(inherit_rpath, $1)=no
46111016ad83Smrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
46121016ad83Smrg  _LT_TAGVAR(module_cmds, $1)=
46131016ad83Smrg  _LT_TAGVAR(module_expsym_cmds, $1)=
46141016ad83Smrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
46151016ad83Smrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
46161016ad83Smrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
46171016ad83Smrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
46181016ad83Smrg  # include_expsyms should be a list of space-separated symbols to be *always*
46191016ad83Smrg  # included in the symbol list
46201016ad83Smrg  _LT_TAGVAR(include_expsyms, $1)=
46211016ad83Smrg  # exclude_expsyms can be an extended regexp of symbols to exclude
46221016ad83Smrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
46231016ad83Smrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
46241016ad83Smrg  # as well as any symbol that contains `d'.
46251016ad83Smrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
46261016ad83Smrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
46271016ad83Smrg  # platforms (ab)use it in PIC code, but their linkers get confused if
46281016ad83Smrg  # the symbol is explicitly referenced.  Since portable code cannot
46291016ad83Smrg  # rely on this symbol name, it's probably fine to never include it in
46301016ad83Smrg  # preloaded symbol tables.
46311016ad83Smrg  # Exclude shared library initialization/finalization symbols.
46321016ad83Smrgdnl Note also adjust exclude_expsyms for C++ above.
46331016ad83Smrg  extract_expsyms_cmds=
46341016ad83Smrg
46351016ad83Smrg  case $host_os in
46361016ad83Smrg  cygwin* | mingw* | pw32* | cegcc*)
46371016ad83Smrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
46381016ad83Smrg    # When not using gcc, we currently assume that we are using
46391016ad83Smrg    # Microsoft Visual C++.
46401016ad83Smrg    if test "$GCC" != yes; then
46411016ad83Smrg      with_gnu_ld=no
46421016ad83Smrg    fi
46431016ad83Smrg    ;;
46441016ad83Smrg  interix*)
46451016ad83Smrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
46461016ad83Smrg    with_gnu_ld=yes
46471016ad83Smrg    ;;
46481016ad83Smrg  openbsd*)
46491016ad83Smrg    with_gnu_ld=no
46501016ad83Smrg    ;;
46511016ad83Smrg  linux* | k*bsd*-gnu | gnu*)
46521016ad83Smrg    _LT_TAGVAR(link_all_deplibs, $1)=no
46531016ad83Smrg    ;;
46541016ad83Smrg  esac
46551016ad83Smrg
46561016ad83Smrg  _LT_TAGVAR(ld_shlibs, $1)=yes
46571016ad83Smrg
46581016ad83Smrg  # On some targets, GNU ld is compatible enough with the native linker
46591016ad83Smrg  # that we're better off using the native interface for both.
46601016ad83Smrg  lt_use_gnu_ld_interface=no
46611016ad83Smrg  if test "$with_gnu_ld" = yes; then
46621016ad83Smrg    case $host_os in
46631016ad83Smrg      aix*)
46641016ad83Smrg	# The AIX port of GNU ld has always aspired to compatibility
46651016ad83Smrg	# with the native linker.  However, as the warning in the GNU ld
46661016ad83Smrg	# block says, versions before 2.19.5* couldn't really create working
46671016ad83Smrg	# shared libraries, regardless of the interface used.
46681016ad83Smrg	case `$LD -v 2>&1` in
46691016ad83Smrg	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
46701016ad83Smrg	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
46711016ad83Smrg	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
46721016ad83Smrg	  *)
46731016ad83Smrg	    lt_use_gnu_ld_interface=yes
46741016ad83Smrg	    ;;
46751016ad83Smrg	esac
46761016ad83Smrg	;;
46771016ad83Smrg      *)
46781016ad83Smrg	lt_use_gnu_ld_interface=yes
46791016ad83Smrg	;;
46801016ad83Smrg    esac
46811016ad83Smrg  fi
46821016ad83Smrg
46831016ad83Smrg  if test "$lt_use_gnu_ld_interface" = yes; then
46841016ad83Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
46851016ad83Smrg    wlarc='${wl}'
46861016ad83Smrg
46871016ad83Smrg    # Set some defaults for GNU ld with shared library support. These
46881016ad83Smrg    # are reset later if shared libraries are not supported. Putting them
46891016ad83Smrg    # here allows them to be overridden if necessary.
46901016ad83Smrg    runpath_var=LD_RUN_PATH
46911016ad83Smrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
46921016ad83Smrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
46931016ad83Smrg    # ancient GNU ld didn't support --whole-archive et. al.
46941016ad83Smrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
46951016ad83Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
46961016ad83Smrg    else
46971016ad83Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
46981016ad83Smrg    fi
46991016ad83Smrg    supports_anon_versioning=no
47001016ad83Smrg    case `$LD -v 2>&1` in
47011016ad83Smrg      *GNU\ gold*) supports_anon_versioning=yes ;;
47021016ad83Smrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
47031016ad83Smrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
47041016ad83Smrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
47051016ad83Smrg      *\ 2.11.*) ;; # other 2.11 versions
47061016ad83Smrg      *) supports_anon_versioning=yes ;;
47071016ad83Smrg    esac
47081016ad83Smrg
47091016ad83Smrg    # See if GNU ld supports shared libraries.
47101016ad83Smrg    case $host_os in
47111016ad83Smrg    aix[[3-9]]*)
47121016ad83Smrg      # On AIX/PPC, the GNU linker is very broken
47131016ad83Smrg      if test "$host_cpu" != ia64; then
47141016ad83Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
47151016ad83Smrg	cat <<_LT_EOF 1>&2
47161016ad83Smrg
47171016ad83Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported
47181016ad83Smrg*** to be unable to reliably create shared libraries on AIX.
47191016ad83Smrg*** Therefore, libtool is disabling shared libraries support.  If you
47201016ad83Smrg*** really care for shared libraries, you may want to install binutils
47211016ad83Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
47221016ad83Smrg*** You will then need to restart the configuration process.
47231016ad83Smrg
47241016ad83Smrg_LT_EOF
47251016ad83Smrg      fi
47261016ad83Smrg      ;;
47271016ad83Smrg
47281016ad83Smrg    amigaos*)
47291016ad83Smrg      case $host_cpu in
47301016ad83Smrg      powerpc)
47311016ad83Smrg            # see comment about AmigaOS4 .so support
47321016ad83Smrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
47331016ad83Smrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
47341016ad83Smrg        ;;
47351016ad83Smrg      m68k)
47361016ad83Smrg            _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)'
47371016ad83Smrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
47381016ad83Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
47391016ad83Smrg        ;;
47401016ad83Smrg      esac
47411016ad83Smrg      ;;
47421016ad83Smrg
47431016ad83Smrg    beos*)
47441016ad83Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
47451016ad83Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
47461016ad83Smrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
47471016ad83Smrg	# support --undefined.  This deserves some investigation.  FIXME
47481016ad83Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
47491016ad83Smrg      else
47501016ad83Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
47511016ad83Smrg      fi
47521016ad83Smrg      ;;
47531016ad83Smrg
47541016ad83Smrg    cygwin* | mingw* | pw32* | cegcc*)
47551016ad83Smrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
47561016ad83Smrg      # as there is no search path for DLLs.
47571016ad83Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
47581016ad83Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
47591016ad83Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
47601016ad83Smrg      _LT_TAGVAR(always_export_symbols, $1)=no
47611016ad83Smrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
47621016ad83Smrg      _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'
47631016ad83Smrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
47641016ad83Smrg
47651016ad83Smrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
47661016ad83Smrg        _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'
47671016ad83Smrg	# If the export-symbols file already is a .def file (1st line
47681016ad83Smrg	# is EXPORTS), use it as is; otherwise, prepend...
47691016ad83Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
47701016ad83Smrg	  cp $export_symbols $output_objdir/$soname.def;
47711016ad83Smrg	else
47721016ad83Smrg	  echo EXPORTS > $output_objdir/$soname.def;
47731016ad83Smrg	  cat $export_symbols >> $output_objdir/$soname.def;
47741016ad83Smrg	fi~
47751016ad83Smrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
47761016ad83Smrg      else
47771016ad83Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
47781016ad83Smrg      fi
47791016ad83Smrg      ;;
47801016ad83Smrg
47811016ad83Smrg    haiku*)
47821016ad83Smrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
47831016ad83Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
47841016ad83Smrg      ;;
47851016ad83Smrg
47861016ad83Smrg    interix[[3-9]]*)
47871016ad83Smrg      _LT_TAGVAR(hardcode_direct, $1)=no
47881016ad83Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
47891016ad83Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
47901016ad83Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
47911016ad83Smrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
47921016ad83Smrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
47931016ad83Smrg      # default) and relocated if they conflict, which is a slow very memory
47941016ad83Smrg      # consuming and fragmenting process.  To avoid this, we pick a random,
47951016ad83Smrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
47961016ad83Smrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
47971016ad83Smrg      _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'
47981016ad83Smrg      _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'
47991016ad83Smrg      ;;
48001016ad83Smrg
48011016ad83Smrg    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
48021016ad83Smrg      tmp_diet=no
48031016ad83Smrg      if test "$host_os" = linux-dietlibc; then
48041016ad83Smrg	case $cc_basename in
48051016ad83Smrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
48061016ad83Smrg	esac
48071016ad83Smrg      fi
48081016ad83Smrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
48091016ad83Smrg	 && test "$tmp_diet" = no
48101016ad83Smrg      then
48111016ad83Smrg	tmp_addflag=' $pic_flag'
48121016ad83Smrg	tmp_sharedflag='-shared'
48131016ad83Smrg	case $cc_basename,$host_cpu in
48141016ad83Smrg        pgcc*)				# Portland Group C compiler
48151016ad83Smrg	  _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'
48161016ad83Smrg	  tmp_addflag=' $pic_flag'
48171016ad83Smrg	  ;;
48181016ad83Smrg	pgf77* | pgf90* | pgf95* | pgfortran*)
48191016ad83Smrg					# Portland Group f77 and f90 compilers
48201016ad83Smrg	  _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'
48211016ad83Smrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
48221016ad83Smrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
48231016ad83Smrg	  tmp_addflag=' -i_dynamic' ;;
48241016ad83Smrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
48251016ad83Smrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
48261016ad83Smrg	ifc* | ifort*)			# Intel Fortran compiler
48271016ad83Smrg	  tmp_addflag=' -nofor_main' ;;
48281016ad83Smrg	lf95*)				# Lahey Fortran 8.1
48291016ad83Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
48301016ad83Smrg	  tmp_sharedflag='--shared' ;;
48311016ad83Smrg	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
48321016ad83Smrg	  tmp_sharedflag='-qmkshrobj'
48331016ad83Smrg	  tmp_addflag= ;;
48341016ad83Smrg	nvcc*)	# Cuda Compiler Driver 2.2
48351016ad83Smrg	  _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'
48361016ad83Smrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
48371016ad83Smrg	  ;;
48381016ad83Smrg	esac
48391016ad83Smrg	case `$CC -V 2>&1 | sed 5q` in
48401016ad83Smrg	*Sun\ C*)			# Sun C 5.9
48411016ad83Smrg	  _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'
48421016ad83Smrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
48431016ad83Smrg	  tmp_sharedflag='-G' ;;
48441016ad83Smrg	*Sun\ F*)			# Sun Fortran 8.3
48451016ad83Smrg	  tmp_sharedflag='-G' ;;
48461016ad83Smrg	esac
48471016ad83Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
48481016ad83Smrg
48491016ad83Smrg        if test "x$supports_anon_versioning" = xyes; then
48501016ad83Smrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
48511016ad83Smrg	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
48521016ad83Smrg	    echo "local: *; };" >> $output_objdir/$libname.ver~
48531016ad83Smrg	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
48541016ad83Smrg        fi
48551016ad83Smrg
48561016ad83Smrg	case $cc_basename in
48571016ad83Smrg	xlf* | bgf* | bgxlf* | mpixlf*)
48581016ad83Smrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
48591016ad83Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
48601016ad83Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
48611016ad83Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
48621016ad83Smrg	  if test "x$supports_anon_versioning" = xyes; then
48631016ad83Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
48641016ad83Smrg	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
48651016ad83Smrg	      echo "local: *; };" >> $output_objdir/$libname.ver~
48661016ad83Smrg	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
48671016ad83Smrg	  fi
48681016ad83Smrg	  ;;
48691016ad83Smrg	esac
48701016ad83Smrg      else
48711016ad83Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
48721016ad83Smrg      fi
48731016ad83Smrg      ;;
48741016ad83Smrg
48751016ad83Smrg    netbsd* | netbsdelf*-gnu)
48761016ad83Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
48771016ad83Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
48781016ad83Smrg	wlarc=
48791016ad83Smrg      else
48801016ad83Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
48811016ad83Smrg	_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'
48821016ad83Smrg      fi
48831016ad83Smrg      ;;
48841016ad83Smrg
48851016ad83Smrg    solaris*)
48861016ad83Smrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
48871016ad83Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
48881016ad83Smrg	cat <<_LT_EOF 1>&2
48891016ad83Smrg
48901016ad83Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
48911016ad83Smrg*** create shared libraries on Solaris systems.  Therefore, libtool
48921016ad83Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
48931016ad83Smrg*** binutils to release 2.9.1 or newer.  Another option is to modify
48941016ad83Smrg*** your PATH or compiler configuration so that the native linker is
48951016ad83Smrg*** used, and then restart.
48961016ad83Smrg
48971016ad83Smrg_LT_EOF
48981016ad83Smrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
48991016ad83Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
49001016ad83Smrg	_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'
49011016ad83Smrg      else
49021016ad83Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
49031016ad83Smrg      fi
49041016ad83Smrg      ;;
49051016ad83Smrg
49061016ad83Smrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
49071016ad83Smrg      case `$LD -v 2>&1` in
49081016ad83Smrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
49091016ad83Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
49101016ad83Smrg	cat <<_LT_EOF 1>&2
49111016ad83Smrg
49121016ad83Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
49131016ad83Smrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
49141016ad83Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
49151016ad83Smrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
49161016ad83Smrg*** your PATH or compiler configuration so that the native linker is
49171016ad83Smrg*** used, and then restart.
49181016ad83Smrg
49191016ad83Smrg_LT_EOF
49201016ad83Smrg	;;
49211016ad83Smrg	*)
49221016ad83Smrg	  # For security reasons, it is highly recommended that you always
49231016ad83Smrg	  # use absolute paths for naming shared libraries, and exclude the
49241016ad83Smrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
49251016ad83Smrg	  # requires that you compile everything twice, which is a pain.
49261016ad83Smrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
49271016ad83Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
49281016ad83Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
49291016ad83Smrg	    _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'
49301016ad83Smrg	  else
49311016ad83Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
49321016ad83Smrg	  fi
49331016ad83Smrg	;;
49341016ad83Smrg      esac
49351016ad83Smrg      ;;
49361016ad83Smrg
49371016ad83Smrg    sunos4*)
49381016ad83Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
49391016ad83Smrg      wlarc=
49401016ad83Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
49411016ad83Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
49421016ad83Smrg      ;;
49431016ad83Smrg
49441016ad83Smrg    *)
49451016ad83Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
49461016ad83Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
49471016ad83Smrg	_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'
49481016ad83Smrg      else
49491016ad83Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
49501016ad83Smrg      fi
49511016ad83Smrg      ;;
49521016ad83Smrg    esac
49531016ad83Smrg
49541016ad83Smrg    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
49551016ad83Smrg      runpath_var=
49561016ad83Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
49571016ad83Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
49581016ad83Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
49591016ad83Smrg    fi
49601016ad83Smrg  else
49611016ad83Smrg    # PORTME fill in a description of your system's linker (not GNU ld)
49621016ad83Smrg    case $host_os in
49631016ad83Smrg    aix3*)
49641016ad83Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
49651016ad83Smrg      _LT_TAGVAR(always_export_symbols, $1)=yes
49661016ad83Smrg      _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'
49671016ad83Smrg      # Note: this linker hardcodes the directories in LIBPATH if there
49681016ad83Smrg      # are no directories specified by -L.
49691016ad83Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
49701016ad83Smrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
49711016ad83Smrg	# Neither direct hardcoding nor static linking is supported with a
49721016ad83Smrg	# broken collect2.
49731016ad83Smrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
49741016ad83Smrg      fi
49751016ad83Smrg      ;;
49761016ad83Smrg
49771016ad83Smrg    aix[[4-9]]*)
49781016ad83Smrg      if test "$host_cpu" = ia64; then
49791016ad83Smrg	# On IA64, the linker does run time linking by default, so we don't
49801016ad83Smrg	# have to do anything special.
49811016ad83Smrg	aix_use_runtimelinking=no
49821016ad83Smrg	exp_sym_flag='-Bexport'
49831016ad83Smrg	no_entry_flag=""
49841016ad83Smrg      else
49851016ad83Smrg	# If we're using GNU nm, then we don't want the "-C" option.
49861016ad83Smrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
49871016ad83Smrg	# Also, AIX nm treats weak defined symbols like other global
49881016ad83Smrg	# defined symbols, whereas GNU nm marks them as "W".
49891016ad83Smrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
49901016ad83Smrg	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
49911016ad83Smrg	else
49921016ad83Smrg	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
49931016ad83Smrg	fi
49941016ad83Smrg	aix_use_runtimelinking=no
49951016ad83Smrg
49961016ad83Smrg	# Test if we are trying to use run time linking or normal
49971016ad83Smrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
49981016ad83Smrg	# need to do runtime linking.
49991016ad83Smrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
50001016ad83Smrg	  for ld_flag in $LDFLAGS; do
50011016ad83Smrg	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
50021016ad83Smrg	    aix_use_runtimelinking=yes
50031016ad83Smrg	    break
50041016ad83Smrg	  fi
50051016ad83Smrg	  done
50061016ad83Smrg	  ;;
50071016ad83Smrg	esac
50081016ad83Smrg
50091016ad83Smrg	exp_sym_flag='-bexport'
50101016ad83Smrg	no_entry_flag='-bnoentry'
50111016ad83Smrg      fi
50121016ad83Smrg
50131016ad83Smrg      # When large executables or shared objects are built, AIX ld can
50141016ad83Smrg      # have problems creating the table of contents.  If linking a library
50151016ad83Smrg      # or program results in "error TOC overflow" add -mminimal-toc to
50161016ad83Smrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
50171016ad83Smrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
50181016ad83Smrg
50191016ad83Smrg      _LT_TAGVAR(archive_cmds, $1)=''
50201016ad83Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
50211016ad83Smrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
50221016ad83Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
50231016ad83Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
50241016ad83Smrg      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
50251016ad83Smrg
50261016ad83Smrg      if test "$GCC" = yes; then
50271016ad83Smrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
50281016ad83Smrg	# We only want to do this on AIX 4.2 and lower, the check
50291016ad83Smrg	# below for broken collect2 doesn't work under 4.3+
50301016ad83Smrg	  collect2name=`${CC} -print-prog-name=collect2`
50311016ad83Smrg	  if test -f "$collect2name" &&
50321016ad83Smrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
50331016ad83Smrg	  then
50341016ad83Smrg	  # We have reworked collect2
50351016ad83Smrg	  :
50361016ad83Smrg	  else
50371016ad83Smrg	  # We have old collect2
50381016ad83Smrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
50391016ad83Smrg	  # It fails to find uninstalled libraries when the uninstalled
50401016ad83Smrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
50411016ad83Smrg	  # to unsupported forces relinking
50421016ad83Smrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
50431016ad83Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
50441016ad83Smrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
50451016ad83Smrg	  fi
50461016ad83Smrg	  ;;
50471016ad83Smrg	esac
50481016ad83Smrg	shared_flag='-shared'
50491016ad83Smrg	if test "$aix_use_runtimelinking" = yes; then
50501016ad83Smrg	  shared_flag="$shared_flag "'${wl}-G'
50511016ad83Smrg	fi
50521016ad83Smrg	_LT_TAGVAR(link_all_deplibs, $1)=no
50531016ad83Smrg      else
50541016ad83Smrg	# not using gcc
50551016ad83Smrg	if test "$host_cpu" = ia64; then
50561016ad83Smrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
50571016ad83Smrg	# chokes on -Wl,-G. The following line is correct:
50581016ad83Smrg	  shared_flag='-G'
50591016ad83Smrg	else
50601016ad83Smrg	  if test "$aix_use_runtimelinking" = yes; then
50611016ad83Smrg	    shared_flag='${wl}-G'
50621016ad83Smrg	  else
50631016ad83Smrg	    shared_flag='${wl}-bM:SRE'
50641016ad83Smrg	  fi
50651016ad83Smrg	fi
50661016ad83Smrg      fi
50671016ad83Smrg
50681016ad83Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
50691016ad83Smrg      # It seems that -bexpall does not export symbols beginning with
50701016ad83Smrg      # underscore (_), so it is better to generate a list of symbols to export.
50711016ad83Smrg      _LT_TAGVAR(always_export_symbols, $1)=yes
50721016ad83Smrg      if test "$aix_use_runtimelinking" = yes; then
50731016ad83Smrg	# Warning - without using the other runtime loading flags (-brtl),
50741016ad83Smrg	# -berok will link without error, but may produce a broken library.
50751016ad83Smrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
50761016ad83Smrg        # Determine the default libpath from the value encoded in an
50771016ad83Smrg        # empty executable.
50781016ad83Smrg        _LT_SYS_MODULE_PATH_AIX([$1])
50791016ad83Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
50801016ad83Smrg        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
50811016ad83Smrg      else
50821016ad83Smrg	if test "$host_cpu" = ia64; then
50831016ad83Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
50841016ad83Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
50851016ad83Smrg	  _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"
50861016ad83Smrg	else
50871016ad83Smrg	 # Determine the default libpath from the value encoded in an
50881016ad83Smrg	 # empty executable.
50891016ad83Smrg	 _LT_SYS_MODULE_PATH_AIX([$1])
50901016ad83Smrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
50911016ad83Smrg	  # Warning - without using the other run time loading flags,
50921016ad83Smrg	  # -berok will link without error, but may produce a broken library.
50931016ad83Smrg	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
50941016ad83Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
50951016ad83Smrg	  if test "$with_gnu_ld" = yes; then
50961016ad83Smrg	    # We only use this code for GNU lds that support --whole-archive.
50971016ad83Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
50981016ad83Smrg	  else
50991016ad83Smrg	    # Exported symbols can be pulled into shared objects from archives
51001016ad83Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
51011016ad83Smrg	  fi
51021016ad83Smrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
51031016ad83Smrg	  # This is similar to how AIX traditionally builds its shared libraries.
51041016ad83Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
51051016ad83Smrg	fi
51061016ad83Smrg      fi
51071016ad83Smrg      ;;
51081016ad83Smrg
51091016ad83Smrg    amigaos*)
51101016ad83Smrg      case $host_cpu in
51111016ad83Smrg      powerpc)
51121016ad83Smrg            # see comment about AmigaOS4 .so support
51131016ad83Smrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
51141016ad83Smrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
51151016ad83Smrg        ;;
51161016ad83Smrg      m68k)
51171016ad83Smrg            _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)'
51181016ad83Smrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
51191016ad83Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
51201016ad83Smrg        ;;
51211016ad83Smrg      esac
51221016ad83Smrg      ;;
51231016ad83Smrg
51241016ad83Smrg    bsdi[[45]]*)
51251016ad83Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
51261016ad83Smrg      ;;
51271016ad83Smrg
51281016ad83Smrg    cygwin* | mingw* | pw32* | cegcc*)
51291016ad83Smrg      # When not using gcc, we currently assume that we are using
51301016ad83Smrg      # Microsoft Visual C++.
51311016ad83Smrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
51321016ad83Smrg      # no search path for DLLs.
51331016ad83Smrg      case $cc_basename in
51341016ad83Smrg      cl*)
51351016ad83Smrg	# Native MSVC
51361016ad83Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
51371016ad83Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
51381016ad83Smrg	_LT_TAGVAR(always_export_symbols, $1)=yes
51391016ad83Smrg	_LT_TAGVAR(file_list_spec, $1)='@'
51401016ad83Smrg	# Tell ltmain to make .lib files, not .a files.
51411016ad83Smrg	libext=lib
51421016ad83Smrg	# Tell ltmain to make .dll files, not .so files.
51431016ad83Smrg	shrext_cmds=".dll"
51441016ad83Smrg	# FIXME: Setting linknames here is a bad hack.
51451016ad83Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
51461016ad83Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
51471016ad83Smrg	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
51481016ad83Smrg	  else
51491016ad83Smrg	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
51501016ad83Smrg	  fi~
51511016ad83Smrg	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
51521016ad83Smrg	  linknames='
51531016ad83Smrg	# The linker will not automatically build a static lib if we build a DLL.
51541016ad83Smrg	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
51551016ad83Smrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
51561016ad83Smrg	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
51571016ad83Smrg	_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'
51581016ad83Smrg	# Don't use ranlib
51591016ad83Smrg	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
51601016ad83Smrg	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
51611016ad83Smrg	  lt_tool_outputfile="@TOOL_OUTPUT@"~
51621016ad83Smrg	  case $lt_outputfile in
51631016ad83Smrg	    *.exe|*.EXE) ;;
51641016ad83Smrg	    *)
51651016ad83Smrg	      lt_outputfile="$lt_outputfile.exe"
51661016ad83Smrg	      lt_tool_outputfile="$lt_tool_outputfile.exe"
51671016ad83Smrg	      ;;
51681016ad83Smrg	  esac~
51691016ad83Smrg	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
51701016ad83Smrg	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
51711016ad83Smrg	    $RM "$lt_outputfile.manifest";
51721016ad83Smrg	  fi'
51731016ad83Smrg	;;
51741016ad83Smrg      *)
51751016ad83Smrg	# Assume MSVC wrapper
51761016ad83Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
51771016ad83Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
51781016ad83Smrg	# Tell ltmain to make .lib files, not .a files.
51791016ad83Smrg	libext=lib
51801016ad83Smrg	# Tell ltmain to make .dll files, not .so files.
51811016ad83Smrg	shrext_cmds=".dll"
51821016ad83Smrg	# FIXME: Setting linknames here is a bad hack.
51831016ad83Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
51841016ad83Smrg	# The linker will automatically build a .lib file if we build a DLL.
51851016ad83Smrg	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
51861016ad83Smrg	# FIXME: Should let the user specify the lib program.
51871016ad83Smrg	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
51881016ad83Smrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
51891016ad83Smrg	;;
51901016ad83Smrg      esac
51911016ad83Smrg      ;;
51921016ad83Smrg
51931016ad83Smrg    darwin* | rhapsody*)
51941016ad83Smrg      _LT_DARWIN_LINKER_FEATURES($1)
51951016ad83Smrg      ;;
51961016ad83Smrg
51971016ad83Smrg    dgux*)
51981016ad83Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
51991016ad83Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
52001016ad83Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
52011016ad83Smrg      ;;
52021016ad83Smrg
52031016ad83Smrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
52041016ad83Smrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
52051016ad83Smrg    # does not break anything, and helps significantly (at the cost of a little
52061016ad83Smrg    # extra space).
52071016ad83Smrg    freebsd2.2*)
52081016ad83Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
52091016ad83Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
52101016ad83Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
52111016ad83Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
52121016ad83Smrg      ;;
52131016ad83Smrg
52141016ad83Smrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
52151016ad83Smrg    freebsd2.*)
52161016ad83Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
52171016ad83Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
52181016ad83Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
52191016ad83Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
52201016ad83Smrg      ;;
52211016ad83Smrg
52221016ad83Smrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
52231016ad83Smrg    freebsd* | dragonfly*)
52241016ad83Smrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
52251016ad83Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
52261016ad83Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
52271016ad83Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
52281016ad83Smrg      ;;
52291016ad83Smrg
52301016ad83Smrg    hpux9*)
52311016ad83Smrg      if test "$GCC" = yes; then
52321016ad83Smrg	_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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
52331016ad83Smrg      else
52341016ad83Smrg	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
52351016ad83Smrg      fi
52361016ad83Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
52371016ad83Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
52381016ad83Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
52391016ad83Smrg
52401016ad83Smrg      # hardcode_minus_L: Not really in the search PATH,
52411016ad83Smrg      # but as the default location of the library.
52421016ad83Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
52431016ad83Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
52441016ad83Smrg      ;;
52451016ad83Smrg
52461016ad83Smrg    hpux10*)
52471016ad83Smrg      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
52481016ad83Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
52491016ad83Smrg      else
52501016ad83Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
52511016ad83Smrg      fi
52521016ad83Smrg      if test "$with_gnu_ld" = no; then
52531016ad83Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
52541016ad83Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
52551016ad83Smrg	_LT_TAGVAR(hardcode_direct, $1)=yes
52561016ad83Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
52571016ad83Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
52581016ad83Smrg	# hardcode_minus_L: Not really in the search PATH,
52591016ad83Smrg	# but as the default location of the library.
52601016ad83Smrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
52611016ad83Smrg      fi
52621016ad83Smrg      ;;
52631016ad83Smrg
52641016ad83Smrg    hpux11*)
52651016ad83Smrg      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
52661016ad83Smrg	case $host_cpu in
52671016ad83Smrg	hppa*64*)
52681016ad83Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
52691016ad83Smrg	  ;;
52701016ad83Smrg	ia64*)
52711016ad83Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
52721016ad83Smrg	  ;;
52731016ad83Smrg	*)
52741016ad83Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
52751016ad83Smrg	  ;;
52761016ad83Smrg	esac
52771016ad83Smrg      else
52781016ad83Smrg	case $host_cpu in
52791016ad83Smrg	hppa*64*)
52801016ad83Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
52811016ad83Smrg	  ;;
52821016ad83Smrg	ia64*)
52831016ad83Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
52841016ad83Smrg	  ;;
52851016ad83Smrg	*)
52861016ad83Smrg	m4_if($1, [], [
52871016ad83Smrg	  # Older versions of the 11.00 compiler do not understand -b yet
52881016ad83Smrg	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
52891016ad83Smrg	  _LT_LINKER_OPTION([if $CC understands -b],
52901016ad83Smrg	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
52911016ad83Smrg	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
52921016ad83Smrg	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
52931016ad83Smrg	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
52941016ad83Smrg	  ;;
52951016ad83Smrg	esac
52961016ad83Smrg      fi
52971016ad83Smrg      if test "$with_gnu_ld" = no; then
52981016ad83Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
52991016ad83Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
53001016ad83Smrg
53011016ad83Smrg	case $host_cpu in
53021016ad83Smrg	hppa*64*|ia64*)
53031016ad83Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no
53041016ad83Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
53051016ad83Smrg	  ;;
53061016ad83Smrg	*)
53071016ad83Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
53081016ad83Smrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
53091016ad83Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
53101016ad83Smrg
53111016ad83Smrg	  # hardcode_minus_L: Not really in the search PATH,
53121016ad83Smrg	  # but as the default location of the library.
53131016ad83Smrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
53141016ad83Smrg	  ;;
53151016ad83Smrg	esac
53161016ad83Smrg      fi
53171016ad83Smrg      ;;
53181016ad83Smrg
53191016ad83Smrg    irix5* | irix6* | nonstopux*)
53201016ad83Smrg      if test "$GCC" = yes; then
53211016ad83Smrg	_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'
53221016ad83Smrg	# Try to use the -exported_symbol ld option, if it does not
53231016ad83Smrg	# work, assume that -exports_file does not work either and
53241016ad83Smrg	# implicitly export all symbols.
53251016ad83Smrg	# This should be the same for all languages, so no per-tag cache variable.
53261016ad83Smrg	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
53271016ad83Smrg	  [lt_cv_irix_exported_symbol],
53281016ad83Smrg	  [save_LDFLAGS="$LDFLAGS"
53291016ad83Smrg	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
53301016ad83Smrg	   AC_LINK_IFELSE(
53311016ad83Smrg	     [AC_LANG_SOURCE(
53321016ad83Smrg	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
53331016ad83Smrg			      [C++], [[int foo (void) { return 0; }]],
53341016ad83Smrg			      [Fortran 77], [[
53351016ad83Smrg      subroutine foo
53361016ad83Smrg      end]],
53371016ad83Smrg			      [Fortran], [[
53381016ad83Smrg      subroutine foo
53391016ad83Smrg      end]])])],
53401016ad83Smrg	      [lt_cv_irix_exported_symbol=yes],
53411016ad83Smrg	      [lt_cv_irix_exported_symbol=no])
53421016ad83Smrg           LDFLAGS="$save_LDFLAGS"])
53431016ad83Smrg	if test "$lt_cv_irix_exported_symbol" = yes; then
53441016ad83Smrg          _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'
53451016ad83Smrg	fi
53461016ad83Smrg      else
53471016ad83Smrg	_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'
53481016ad83Smrg	_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'
53491016ad83Smrg      fi
53501016ad83Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
53511016ad83Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
53521016ad83Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
53531016ad83Smrg      _LT_TAGVAR(inherit_rpath, $1)=yes
53541016ad83Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
53551016ad83Smrg      ;;
53561016ad83Smrg
53571016ad83Smrg    netbsd* | netbsdelf*-gnu)
53581016ad83Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
53591016ad83Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
53601016ad83Smrg      else
53611016ad83Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
53621016ad83Smrg      fi
53631016ad83Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
53641016ad83Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
53651016ad83Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
53661016ad83Smrg      ;;
53671016ad83Smrg
53681016ad83Smrg    newsos6)
53691016ad83Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
53701016ad83Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
53711016ad83Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
53721016ad83Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
53731016ad83Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
53741016ad83Smrg      ;;
53751016ad83Smrg
53761016ad83Smrg    *nto* | *qnx*)
53771016ad83Smrg      ;;
53781016ad83Smrg
53791016ad83Smrg    openbsd*)
53801016ad83Smrg      if test -f /usr/libexec/ld.so; then
53811016ad83Smrg	_LT_TAGVAR(hardcode_direct, $1)=yes
53821016ad83Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
53831016ad83Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
53841016ad83Smrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
53851016ad83Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
53861016ad83Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
53871016ad83Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
53881016ad83Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
53891016ad83Smrg	else
53901016ad83Smrg	  case $host_os in
53911016ad83Smrg	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
53921016ad83Smrg	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
53931016ad83Smrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
53941016ad83Smrg	     ;;
53951016ad83Smrg	   *)
53961016ad83Smrg	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
53971016ad83Smrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
53981016ad83Smrg	     ;;
53991016ad83Smrg	  esac
54001016ad83Smrg	fi
54011016ad83Smrg      else
54021016ad83Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
54031016ad83Smrg      fi
54041016ad83Smrg      ;;
54051016ad83Smrg
54061016ad83Smrg    os2*)
54071016ad83Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
54081016ad83Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
54091016ad83Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
54101016ad83Smrg      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
54111016ad83Smrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
54121016ad83Smrg      ;;
54131016ad83Smrg
54141016ad83Smrg    osf3*)
54151016ad83Smrg      if test "$GCC" = yes; then
54161016ad83Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
54171016ad83Smrg	_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'
54181016ad83Smrg      else
54191016ad83Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
54201016ad83Smrg	_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'
54211016ad83Smrg      fi
54221016ad83Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
54231016ad83Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
54241016ad83Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
54251016ad83Smrg      ;;
54261016ad83Smrg
54271016ad83Smrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
54281016ad83Smrg      if test "$GCC" = yes; then
54291016ad83Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
54301016ad83Smrg	_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'
54311016ad83Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
54321016ad83Smrg      else
54331016ad83Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
54341016ad83Smrg	_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'
54351016ad83Smrg	_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~
54361016ad83Smrg	$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'
54371016ad83Smrg
54381016ad83Smrg	# Both c and cxx compiler support -rpath directly
54391016ad83Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
54401016ad83Smrg      fi
54411016ad83Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
54421016ad83Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
54431016ad83Smrg      ;;
54441016ad83Smrg
54451016ad83Smrg    solaris*)
54461016ad83Smrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
54471016ad83Smrg      if test "$GCC" = yes; then
54481016ad83Smrg	wlarc='${wl}'
54491016ad83Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
54501016ad83Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
54511016ad83Smrg	  $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'
54521016ad83Smrg      else
54531016ad83Smrg	case `$CC -V 2>&1` in
54541016ad83Smrg	*"Compilers 5.0"*)
54551016ad83Smrg	  wlarc=''
54561016ad83Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
54571016ad83Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
54581016ad83Smrg	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
54591016ad83Smrg	  ;;
54601016ad83Smrg	*)
54611016ad83Smrg	  wlarc='${wl}'
54621016ad83Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
54631016ad83Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
54641016ad83Smrg	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
54651016ad83Smrg	  ;;
54661016ad83Smrg	esac
54671016ad83Smrg      fi
54681016ad83Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
54691016ad83Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
54701016ad83Smrg      case $host_os in
54711016ad83Smrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
54721016ad83Smrg      *)
54731016ad83Smrg	# The compiler driver will combine and reorder linker options,
54741016ad83Smrg	# but understands `-z linker_flag'.  GCC discards it without `$wl',
54751016ad83Smrg	# but is careful enough not to reorder.
54761016ad83Smrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
54771016ad83Smrg	if test "$GCC" = yes; then
54781016ad83Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
54791016ad83Smrg	else
54801016ad83Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
54811016ad83Smrg	fi
54821016ad83Smrg	;;
54831016ad83Smrg      esac
54841016ad83Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
54851016ad83Smrg      ;;
54861016ad83Smrg
54871016ad83Smrg    sunos4*)
54881016ad83Smrg      if test "x$host_vendor" = xsequent; then
54891016ad83Smrg	# Use $CC to link under sequent, because it throws in some extra .o
54901016ad83Smrg	# files that make .init and .fini sections work.
54911016ad83Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
54921016ad83Smrg      else
54931016ad83Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
54941016ad83Smrg      fi
54951016ad83Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
54961016ad83Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
54971016ad83Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
54981016ad83Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
54991016ad83Smrg      ;;
55001016ad83Smrg
55011016ad83Smrg    sysv4)
55021016ad83Smrg      case $host_vendor in
55031016ad83Smrg	sni)
55041016ad83Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
55051016ad83Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
55061016ad83Smrg	;;
55071016ad83Smrg	siemens)
55081016ad83Smrg	  ## LD is ld it makes a PLAMLIB
55091016ad83Smrg	  ## CC just makes a GrossModule.
55101016ad83Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
55111016ad83Smrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
55121016ad83Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no
55131016ad83Smrg        ;;
55141016ad83Smrg	motorola)
55151016ad83Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
55161016ad83Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
55171016ad83Smrg	;;
55181016ad83Smrg      esac
55191016ad83Smrg      runpath_var='LD_RUN_PATH'
55201016ad83Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
55211016ad83Smrg      ;;
55221016ad83Smrg
55231016ad83Smrg    sysv4.3*)
55241016ad83Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
55251016ad83Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
55261016ad83Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
55271016ad83Smrg      ;;
55281016ad83Smrg
55291016ad83Smrg    sysv4*MP*)
55301016ad83Smrg      if test -d /usr/nec; then
55311016ad83Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
55321016ad83Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
55331016ad83Smrg	runpath_var=LD_RUN_PATH
55341016ad83Smrg	hardcode_runpath_var=yes
55351016ad83Smrg	_LT_TAGVAR(ld_shlibs, $1)=yes
55361016ad83Smrg      fi
55371016ad83Smrg      ;;
55381016ad83Smrg
55391016ad83Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
55401016ad83Smrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
55411016ad83Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
55421016ad83Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
55431016ad83Smrg      runpath_var='LD_RUN_PATH'
55441016ad83Smrg
55451016ad83Smrg      if test "$GCC" = yes; then
55461016ad83Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
55471016ad83Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
55481016ad83Smrg      else
55491016ad83Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
55501016ad83Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
55511016ad83Smrg      fi
55521016ad83Smrg      ;;
55531016ad83Smrg
55541016ad83Smrg    sysv5* | sco3.2v5* | sco5v6*)
55551016ad83Smrg      # Note: We can NOT use -z defs as we might desire, because we do not
55561016ad83Smrg      # link with -lc, and that would cause any symbols used from libc to
55571016ad83Smrg      # always be unresolved, which means just about no library would
55581016ad83Smrg      # ever link correctly.  If we're not using GNU ld we use -z text
55591016ad83Smrg      # though, which does catch some bad symbols but isn't as heavy-handed
55601016ad83Smrg      # as -z defs.
55611016ad83Smrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
55621016ad83Smrg      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
55631016ad83Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
55641016ad83Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
55651016ad83Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
55661016ad83Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
55671016ad83Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
55681016ad83Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
55691016ad83Smrg      runpath_var='LD_RUN_PATH'
55701016ad83Smrg
55711016ad83Smrg      if test "$GCC" = yes; then
55721016ad83Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
55731016ad83Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
55741016ad83Smrg      else
55751016ad83Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
55761016ad83Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
55771016ad83Smrg      fi
55781016ad83Smrg      ;;
55791016ad83Smrg
55801016ad83Smrg    uts4*)
55811016ad83Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
55821016ad83Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
55831016ad83Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
55841016ad83Smrg      ;;
55851016ad83Smrg
55861016ad83Smrg    *)
55871016ad83Smrg      _LT_TAGVAR(ld_shlibs, $1)=no
55881016ad83Smrg      ;;
55891016ad83Smrg    esac
55901016ad83Smrg
55911016ad83Smrg    if test x$host_vendor = xsni; then
55921016ad83Smrg      case $host in
55931016ad83Smrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
55941016ad83Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
55951016ad83Smrg	;;
55961016ad83Smrg      esac
55971016ad83Smrg    fi
55981016ad83Smrg  fi
55991016ad83Smrg])
56001016ad83SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
56011016ad83Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
56021016ad83Smrg
56031016ad83Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
56041016ad83Smrg
56051016ad83Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
56061016ad83Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
56071016ad83Smrg_LT_DECL([], [extract_expsyms_cmds], [2],
56081016ad83Smrg    [The commands to extract the exported symbol list from a shared archive])
56091016ad83Smrg
56101016ad83Smrg#
56111016ad83Smrg# Do we need to explicitly link libc?
56121016ad83Smrg#
56131016ad83Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
56141016ad83Smrgx|xyes)
56151016ad83Smrg  # Assume -lc should be added
56161016ad83Smrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
56171016ad83Smrg
56181016ad83Smrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
56191016ad83Smrg    case $_LT_TAGVAR(archive_cmds, $1) in
56201016ad83Smrg    *'~'*)
56211016ad83Smrg      # FIXME: we may have to deal with multi-command sequences.
56221016ad83Smrg      ;;
56231016ad83Smrg    '$CC '*)
56241016ad83Smrg      # Test whether the compiler implicitly links with -lc since on some
56251016ad83Smrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
56261016ad83Smrg      # to ld, don't add -lc before -lgcc.
56271016ad83Smrg      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
56281016ad83Smrg	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
56291016ad83Smrg	[$RM conftest*
56301016ad83Smrg	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
56311016ad83Smrg
56321016ad83Smrg	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
56331016ad83Smrg	  soname=conftest
56341016ad83Smrg	  lib=conftest
56351016ad83Smrg	  libobjs=conftest.$ac_objext
56361016ad83Smrg	  deplibs=
56371016ad83Smrg	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
56381016ad83Smrg	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
56391016ad83Smrg	  compiler_flags=-v
56401016ad83Smrg	  linker_flags=-v
56411016ad83Smrg	  verstring=
56421016ad83Smrg	  output_objdir=.
56431016ad83Smrg	  libname=conftest
56441016ad83Smrg	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
56451016ad83Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=
56461016ad83Smrg	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
56471016ad83Smrg	  then
56481016ad83Smrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
56491016ad83Smrg	  else
56501016ad83Smrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
56511016ad83Smrg	  fi
56521016ad83Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
56531016ad83Smrg	else
56541016ad83Smrg	  cat conftest.err 1>&5
56551016ad83Smrg	fi
56561016ad83Smrg	$RM conftest*
56571016ad83Smrg	])
56581016ad83Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
56591016ad83Smrg      ;;
56601016ad83Smrg    esac
56611016ad83Smrg  fi
56621016ad83Smrg  ;;
56631016ad83Smrgesac
56641016ad83Smrg
56651016ad83Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
56661016ad83Smrg    [Whether or not to add -lc for building shared libraries])
56671016ad83Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
56681016ad83Smrg    [enable_shared_with_static_runtimes], [0],
56691016ad83Smrg    [Whether or not to disallow shared libs when runtime libs are static])
56701016ad83Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
56711016ad83Smrg    [Compiler flag to allow reflexive dlopens])
56721016ad83Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
56731016ad83Smrg    [Compiler flag to generate shared objects directly from archives])
56741016ad83Smrg_LT_TAGDECL([], [compiler_needs_object], [1],
56751016ad83Smrg    [Whether the compiler copes with passing no objects directly])
56761016ad83Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
56771016ad83Smrg    [Create an old-style archive from a shared archive])
56781016ad83Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
56791016ad83Smrg    [Create a temporary old-style archive to link instead of a shared archive])
56801016ad83Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
56811016ad83Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
56821016ad83Smrg_LT_TAGDECL([], [module_cmds], [2],
56831016ad83Smrg    [Commands used to build a loadable module if different from building
56841016ad83Smrg    a shared archive.])
56851016ad83Smrg_LT_TAGDECL([], [module_expsym_cmds], [2])
56861016ad83Smrg_LT_TAGDECL([], [with_gnu_ld], [1],
56871016ad83Smrg    [Whether we are building with GNU ld or not])
56881016ad83Smrg_LT_TAGDECL([], [allow_undefined_flag], [1],
56891016ad83Smrg    [Flag that allows shared libraries with undefined symbols to be built])
56901016ad83Smrg_LT_TAGDECL([], [no_undefined_flag], [1],
56911016ad83Smrg    [Flag that enforces no undefined symbols])
56921016ad83Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
56931016ad83Smrg    [Flag to hardcode $libdir into a binary during linking.
56941016ad83Smrg    This must work even if $libdir does not exist])
56951016ad83Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
56961016ad83Smrg    [Whether we need a single "-rpath" flag with a separated argument])
56971016ad83Smrg_LT_TAGDECL([], [hardcode_direct], [0],
56981016ad83Smrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
56991016ad83Smrg    DIR into the resulting binary])
57001016ad83Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
57011016ad83Smrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
57021016ad83Smrg    DIR into the resulting binary and the resulting library dependency is
57031016ad83Smrg    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
57041016ad83Smrg    library is relocated])
57051016ad83Smrg_LT_TAGDECL([], [hardcode_minus_L], [0],
57061016ad83Smrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
57071016ad83Smrg    into the resulting binary])
57081016ad83Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
57091016ad83Smrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
57101016ad83Smrg    into the resulting binary])
57111016ad83Smrg_LT_TAGDECL([], [hardcode_automatic], [0],
57121016ad83Smrg    [Set to "yes" if building a shared library automatically hardcodes DIR
57131016ad83Smrg    into the library and all subsequent libraries and executables linked
57141016ad83Smrg    against it])
57151016ad83Smrg_LT_TAGDECL([], [inherit_rpath], [0],
57161016ad83Smrg    [Set to yes if linker adds runtime paths of dependent libraries
57171016ad83Smrg    to runtime path list])
57181016ad83Smrg_LT_TAGDECL([], [link_all_deplibs], [0],
57191016ad83Smrg    [Whether libtool must link a program against all its dependency libraries])
57201016ad83Smrg_LT_TAGDECL([], [always_export_symbols], [0],
57211016ad83Smrg    [Set to "yes" if exported symbols are required])
57221016ad83Smrg_LT_TAGDECL([], [export_symbols_cmds], [2],
57231016ad83Smrg    [The commands to list exported symbols])
57241016ad83Smrg_LT_TAGDECL([], [exclude_expsyms], [1],
57251016ad83Smrg    [Symbols that should not be listed in the preloaded symbols])
57261016ad83Smrg_LT_TAGDECL([], [include_expsyms], [1],
57271016ad83Smrg    [Symbols that must always be exported])
57281016ad83Smrg_LT_TAGDECL([], [prelink_cmds], [2],
57291016ad83Smrg    [Commands necessary for linking programs (against libraries) with templates])
57301016ad83Smrg_LT_TAGDECL([], [postlink_cmds], [2],
57311016ad83Smrg    [Commands necessary for finishing linking programs])
57321016ad83Smrg_LT_TAGDECL([], [file_list_spec], [1],
57331016ad83Smrg    [Specify filename containing input files])
57341016ad83Smrgdnl FIXME: Not yet implemented
57351016ad83Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
57361016ad83Smrgdnl    [Compiler flag to generate thread safe objects])
57371016ad83Smrg])# _LT_LINKER_SHLIBS
57381016ad83Smrg
57391016ad83Smrg
57401016ad83Smrg# _LT_LANG_C_CONFIG([TAG])
57411016ad83Smrg# ------------------------
57421016ad83Smrg# Ensure that the configuration variables for a C compiler are suitably
57431016ad83Smrg# defined.  These variables are subsequently used by _LT_CONFIG to write
57441016ad83Smrg# the compiler configuration to `libtool'.
57451016ad83Smrgm4_defun([_LT_LANG_C_CONFIG],
57461016ad83Smrg[m4_require([_LT_DECL_EGREP])dnl
57471016ad83Smrglt_save_CC="$CC"
57481016ad83SmrgAC_LANG_PUSH(C)
57491016ad83Smrg
57501016ad83Smrg# Source file extension for C test sources.
57511016ad83Smrgac_ext=c
57521016ad83Smrg
57531016ad83Smrg# Object file extension for compiled C test sources.
57541016ad83Smrgobjext=o
57551016ad83Smrg_LT_TAGVAR(objext, $1)=$objext
57561016ad83Smrg
57571016ad83Smrg# Code to be used in simple compile tests
57581016ad83Smrglt_simple_compile_test_code="int some_variable = 0;"
57591016ad83Smrg
57601016ad83Smrg# Code to be used in simple link tests
57611016ad83Smrglt_simple_link_test_code='int main(){return(0);}'
57621016ad83Smrg
57631016ad83Smrg_LT_TAG_COMPILER
57641016ad83Smrg# Save the default compiler, since it gets overwritten when the other
57651016ad83Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
57661016ad83Smrgcompiler_DEFAULT=$CC
57671016ad83Smrg
57681016ad83Smrg# save warnings/boilerplate of simple test code
57691016ad83Smrg_LT_COMPILER_BOILERPLATE
57701016ad83Smrg_LT_LINKER_BOILERPLATE
57711016ad83Smrg
57721016ad83Smrg## CAVEAT EMPTOR:
57731016ad83Smrg## There is no encapsulation within the following macros, do not change
57741016ad83Smrg## the running order or otherwise move them around unless you know exactly
57751016ad83Smrg## what you are doing...
57761016ad83Smrgif test -n "$compiler"; then
57771016ad83Smrg  _LT_COMPILER_NO_RTTI($1)
57781016ad83Smrg  _LT_COMPILER_PIC($1)
57791016ad83Smrg  _LT_COMPILER_C_O($1)
57801016ad83Smrg  _LT_COMPILER_FILE_LOCKS($1)
57811016ad83Smrg  _LT_LINKER_SHLIBS($1)
57821016ad83Smrg  _LT_SYS_DYNAMIC_LINKER($1)
57831016ad83Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
57841016ad83Smrg  LT_SYS_DLOPEN_SELF
57851016ad83Smrg  _LT_CMD_STRIPLIB
57861016ad83Smrg
57871016ad83Smrg  # Report which library types will actually be built
57881016ad83Smrg  AC_MSG_CHECKING([if libtool supports shared libraries])
57891016ad83Smrg  AC_MSG_RESULT([$can_build_shared])
57901016ad83Smrg
57911016ad83Smrg  AC_MSG_CHECKING([whether to build shared libraries])
57921016ad83Smrg  test "$can_build_shared" = "no" && enable_shared=no
57931016ad83Smrg
57941016ad83Smrg  # On AIX, shared libraries and static libraries use the same namespace, and
57951016ad83Smrg  # are all built from PIC.
57961016ad83Smrg  case $host_os in
57971016ad83Smrg  aix3*)
57981016ad83Smrg    test "$enable_shared" = yes && enable_static=no
57991016ad83Smrg    if test -n "$RANLIB"; then
58001016ad83Smrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
58011016ad83Smrg      postinstall_cmds='$RANLIB $lib'
58021016ad83Smrg    fi
58031016ad83Smrg    ;;
58041016ad83Smrg
58051016ad83Smrg  aix[[4-9]]*)
58061016ad83Smrg    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
58071016ad83Smrg      test "$enable_shared" = yes && enable_static=no
58081016ad83Smrg    fi
58091016ad83Smrg    ;;
58101016ad83Smrg  esac
58111016ad83Smrg  AC_MSG_RESULT([$enable_shared])
58121016ad83Smrg
58131016ad83Smrg  AC_MSG_CHECKING([whether to build static libraries])
58141016ad83Smrg  # Make sure either enable_shared or enable_static is yes.
58151016ad83Smrg  test "$enable_shared" = yes || enable_static=yes
58161016ad83Smrg  AC_MSG_RESULT([$enable_static])
58171016ad83Smrg
58181016ad83Smrg  _LT_CONFIG($1)
58191016ad83Smrgfi
58201016ad83SmrgAC_LANG_POP
58211016ad83SmrgCC="$lt_save_CC"
58221016ad83Smrg])# _LT_LANG_C_CONFIG
58231016ad83Smrg
58241016ad83Smrg
58251016ad83Smrg# _LT_LANG_CXX_CONFIG([TAG])
58261016ad83Smrg# --------------------------
58271016ad83Smrg# Ensure that the configuration variables for a C++ compiler are suitably
58281016ad83Smrg# defined.  These variables are subsequently used by _LT_CONFIG to write
58291016ad83Smrg# the compiler configuration to `libtool'.
58301016ad83Smrgm4_defun([_LT_LANG_CXX_CONFIG],
58311016ad83Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
58321016ad83Smrgm4_require([_LT_DECL_EGREP])dnl
58331016ad83Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
58341016ad83Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
58351016ad83Smrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
58361016ad83Smrg    (test "X$CXX" != "Xg++"))) ; then
58371016ad83Smrg  AC_PROG_CXXCPP
58381016ad83Smrgelse
58391016ad83Smrg  _lt_caught_CXX_error=yes
58401016ad83Smrgfi
58411016ad83Smrg
58421016ad83SmrgAC_LANG_PUSH(C++)
58431016ad83Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
58441016ad83Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
58451016ad83Smrg_LT_TAGVAR(always_export_symbols, $1)=no
58461016ad83Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
58471016ad83Smrg_LT_TAGVAR(compiler_needs_object, $1)=no
58481016ad83Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
58491016ad83Smrg_LT_TAGVAR(hardcode_direct, $1)=no
58501016ad83Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
58511016ad83Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
58521016ad83Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
58531016ad83Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
58541016ad83Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
58551016ad83Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
58561016ad83Smrg_LT_TAGVAR(inherit_rpath, $1)=no
58571016ad83Smrg_LT_TAGVAR(module_cmds, $1)=
58581016ad83Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
58591016ad83Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
58601016ad83Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
58611016ad83Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
58621016ad83Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
58631016ad83Smrg_LT_TAGVAR(no_undefined_flag, $1)=
58641016ad83Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
58651016ad83Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
58661016ad83Smrg
58671016ad83Smrg# Source file extension for C++ test sources.
58681016ad83Smrgac_ext=cpp
58691016ad83Smrg
58701016ad83Smrg# Object file extension for compiled C++ test sources.
58711016ad83Smrgobjext=o
58721016ad83Smrg_LT_TAGVAR(objext, $1)=$objext
58731016ad83Smrg
58741016ad83Smrg# No sense in running all these tests if we already determined that
58751016ad83Smrg# the CXX compiler isn't working.  Some variables (like enable_shared)
58761016ad83Smrg# are currently assumed to apply to all compilers on this platform,
58771016ad83Smrg# and will be corrupted by setting them based on a non-working compiler.
58781016ad83Smrgif test "$_lt_caught_CXX_error" != yes; then
58791016ad83Smrg  # Code to be used in simple compile tests
58801016ad83Smrg  lt_simple_compile_test_code="int some_variable = 0;"
58811016ad83Smrg
58821016ad83Smrg  # Code to be used in simple link tests
58831016ad83Smrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
58841016ad83Smrg
58851016ad83Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
58861016ad83Smrg  _LT_TAG_COMPILER
58871016ad83Smrg
58881016ad83Smrg  # save warnings/boilerplate of simple test code
58891016ad83Smrg  _LT_COMPILER_BOILERPLATE
58901016ad83Smrg  _LT_LINKER_BOILERPLATE
58911016ad83Smrg
58921016ad83Smrg  # Allow CC to be a program name with arguments.
58931016ad83Smrg  lt_save_CC=$CC
58941016ad83Smrg  lt_save_CFLAGS=$CFLAGS
58951016ad83Smrg  lt_save_LD=$LD
58961016ad83Smrg  lt_save_GCC=$GCC
58971016ad83Smrg  GCC=$GXX
58981016ad83Smrg  lt_save_with_gnu_ld=$with_gnu_ld
58991016ad83Smrg  lt_save_path_LD=$lt_cv_path_LD
59001016ad83Smrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
59011016ad83Smrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
59021016ad83Smrg  else
59031016ad83Smrg    $as_unset lt_cv_prog_gnu_ld
59041016ad83Smrg  fi
59051016ad83Smrg  if test -n "${lt_cv_path_LDCXX+set}"; then
59061016ad83Smrg    lt_cv_path_LD=$lt_cv_path_LDCXX
59071016ad83Smrg  else
59081016ad83Smrg    $as_unset lt_cv_path_LD
59091016ad83Smrg  fi
59101016ad83Smrg  test -z "${LDCXX+set}" || LD=$LDCXX
59111016ad83Smrg  CC=${CXX-"c++"}
59121016ad83Smrg  CFLAGS=$CXXFLAGS
59131016ad83Smrg  compiler=$CC
59141016ad83Smrg  _LT_TAGVAR(compiler, $1)=$CC
59151016ad83Smrg  _LT_CC_BASENAME([$compiler])
59161016ad83Smrg
59171016ad83Smrg  if test -n "$compiler"; then
59181016ad83Smrg    # We don't want -fno-exception when compiling C++ code, so set the
59191016ad83Smrg    # no_builtin_flag separately
59201016ad83Smrg    if test "$GXX" = yes; then
59211016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
59221016ad83Smrg    else
59231016ad83Smrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
59241016ad83Smrg    fi
59251016ad83Smrg
59261016ad83Smrg    if test "$GXX" = yes; then
59271016ad83Smrg      # Set up default GNU C++ configuration
59281016ad83Smrg
59291016ad83Smrg      LT_PATH_LD
59301016ad83Smrg
59311016ad83Smrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
59321016ad83Smrg      # archiving commands below assume that GNU ld is being used.
59331016ad83Smrg      if test "$with_gnu_ld" = yes; then
59341016ad83Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
59351016ad83Smrg        _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'
59361016ad83Smrg
59371016ad83Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
59381016ad83Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
59391016ad83Smrg
59401016ad83Smrg        # If archive_cmds runs LD, not CC, wlarc should be empty
59411016ad83Smrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
59421016ad83Smrg        #     investigate it a little bit more. (MM)
59431016ad83Smrg        wlarc='${wl}'
59441016ad83Smrg
59451016ad83Smrg        # ancient GNU ld didn't support --whole-archive et. al.
59461016ad83Smrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
59471016ad83Smrg	  $GREP 'no-whole-archive' > /dev/null; then
59481016ad83Smrg          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
59491016ad83Smrg        else
59501016ad83Smrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
59511016ad83Smrg        fi
59521016ad83Smrg      else
59531016ad83Smrg        with_gnu_ld=no
59541016ad83Smrg        wlarc=
59551016ad83Smrg
59561016ad83Smrg        # A generic and very simple default shared library creation
59571016ad83Smrg        # command for GNU C++ for the case where it uses the native
59581016ad83Smrg        # linker, instead of GNU ld.  If possible, this setting should
59591016ad83Smrg        # overridden to take advantage of the native linker features on
59601016ad83Smrg        # the platform it is being used on.
59611016ad83Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
59621016ad83Smrg      fi
59631016ad83Smrg
59641016ad83Smrg      # Commands to make compiler produce verbose output that lists
59651016ad83Smrg      # what "hidden" libraries, object files and flags are used when
59661016ad83Smrg      # linking a shared library.
59671016ad83Smrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
59681016ad83Smrg
59691016ad83Smrg    else
59701016ad83Smrg      GXX=no
59711016ad83Smrg      with_gnu_ld=no
59721016ad83Smrg      wlarc=
59731016ad83Smrg    fi
59741016ad83Smrg
59751016ad83Smrg    # PORTME: fill in a description of your system's C++ link characteristics
59761016ad83Smrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
59771016ad83Smrg    _LT_TAGVAR(ld_shlibs, $1)=yes
59781016ad83Smrg    case $host_os in
59791016ad83Smrg      aix3*)
59801016ad83Smrg        # FIXME: insert proper C++ library support
59811016ad83Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
59821016ad83Smrg        ;;
59831016ad83Smrg      aix[[4-9]]*)
59841016ad83Smrg        if test "$host_cpu" = ia64; then
59851016ad83Smrg          # On IA64, the linker does run time linking by default, so we don't
59861016ad83Smrg          # have to do anything special.
59871016ad83Smrg          aix_use_runtimelinking=no
59881016ad83Smrg          exp_sym_flag='-Bexport'
59891016ad83Smrg          no_entry_flag=""
59901016ad83Smrg        else
59911016ad83Smrg          aix_use_runtimelinking=no
59921016ad83Smrg
59931016ad83Smrg          # Test if we are trying to use run time linking or normal
59941016ad83Smrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
59951016ad83Smrg          # need to do runtime linking.
59961016ad83Smrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
59971016ad83Smrg	    for ld_flag in $LDFLAGS; do
59981016ad83Smrg	      case $ld_flag in
59991016ad83Smrg	      *-brtl*)
60001016ad83Smrg	        aix_use_runtimelinking=yes
60011016ad83Smrg	        break
60021016ad83Smrg	        ;;
60031016ad83Smrg	      esac
60041016ad83Smrg	    done
60051016ad83Smrg	    ;;
60061016ad83Smrg          esac
60071016ad83Smrg
60081016ad83Smrg          exp_sym_flag='-bexport'
60091016ad83Smrg          no_entry_flag='-bnoentry'
60101016ad83Smrg        fi
60111016ad83Smrg
60121016ad83Smrg        # When large executables or shared objects are built, AIX ld can
60131016ad83Smrg        # have problems creating the table of contents.  If linking a library
60141016ad83Smrg        # or program results in "error TOC overflow" add -mminimal-toc to
60151016ad83Smrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
60161016ad83Smrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
60171016ad83Smrg
60181016ad83Smrg        _LT_TAGVAR(archive_cmds, $1)=''
60191016ad83Smrg        _LT_TAGVAR(hardcode_direct, $1)=yes
60201016ad83Smrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
60211016ad83Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
60221016ad83Smrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
60231016ad83Smrg        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
60241016ad83Smrg
60251016ad83Smrg        if test "$GXX" = yes; then
60261016ad83Smrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
60271016ad83Smrg          # We only want to do this on AIX 4.2 and lower, the check
60281016ad83Smrg          # below for broken collect2 doesn't work under 4.3+
60291016ad83Smrg	  collect2name=`${CC} -print-prog-name=collect2`
60301016ad83Smrg	  if test -f "$collect2name" &&
60311016ad83Smrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
60321016ad83Smrg	  then
60331016ad83Smrg	    # We have reworked collect2
60341016ad83Smrg	    :
60351016ad83Smrg	  else
60361016ad83Smrg	    # We have old collect2
60371016ad83Smrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
60381016ad83Smrg	    # It fails to find uninstalled libraries when the uninstalled
60391016ad83Smrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
60401016ad83Smrg	    # to unsupported forces relinking
60411016ad83Smrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
60421016ad83Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
60431016ad83Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
60441016ad83Smrg	  fi
60451016ad83Smrg          esac
60461016ad83Smrg          shared_flag='-shared'
60471016ad83Smrg	  if test "$aix_use_runtimelinking" = yes; then
60481016ad83Smrg	    shared_flag="$shared_flag "'${wl}-G'
60491016ad83Smrg	  fi
60501016ad83Smrg        else
60511016ad83Smrg          # not using gcc
60521016ad83Smrg          if test "$host_cpu" = ia64; then
60531016ad83Smrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
60541016ad83Smrg	  # chokes on -Wl,-G. The following line is correct:
60551016ad83Smrg	  shared_flag='-G'
60561016ad83Smrg          else
60571016ad83Smrg	    if test "$aix_use_runtimelinking" = yes; then
60581016ad83Smrg	      shared_flag='${wl}-G'
60591016ad83Smrg	    else
60601016ad83Smrg	      shared_flag='${wl}-bM:SRE'
60611016ad83Smrg	    fi
60621016ad83Smrg          fi
60631016ad83Smrg        fi
60641016ad83Smrg
60651016ad83Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
60661016ad83Smrg        # It seems that -bexpall does not export symbols beginning with
60671016ad83Smrg        # underscore (_), so it is better to generate a list of symbols to
60681016ad83Smrg	# export.
60691016ad83Smrg        _LT_TAGVAR(always_export_symbols, $1)=yes
60701016ad83Smrg        if test "$aix_use_runtimelinking" = yes; then
60711016ad83Smrg          # Warning - without using the other runtime loading flags (-brtl),
60721016ad83Smrg          # -berok will link without error, but may produce a broken library.
60731016ad83Smrg          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
60741016ad83Smrg          # Determine the default libpath from the value encoded in an empty
60751016ad83Smrg          # executable.
60761016ad83Smrg          _LT_SYS_MODULE_PATH_AIX([$1])
60771016ad83Smrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
60781016ad83Smrg
60791016ad83Smrg          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
60801016ad83Smrg        else
60811016ad83Smrg          if test "$host_cpu" = ia64; then
60821016ad83Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
60831016ad83Smrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
60841016ad83Smrg	    _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"
60851016ad83Smrg          else
60861016ad83Smrg	    # Determine the default libpath from the value encoded in an
60871016ad83Smrg	    # empty executable.
60881016ad83Smrg	    _LT_SYS_MODULE_PATH_AIX([$1])
60891016ad83Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
60901016ad83Smrg	    # Warning - without using the other run time loading flags,
60911016ad83Smrg	    # -berok will link without error, but may produce a broken library.
60921016ad83Smrg	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
60931016ad83Smrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
60941016ad83Smrg	    if test "$with_gnu_ld" = yes; then
60951016ad83Smrg	      # We only use this code for GNU lds that support --whole-archive.
60961016ad83Smrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
60971016ad83Smrg	    else
60981016ad83Smrg	      # Exported symbols can be pulled into shared objects from archives
60991016ad83Smrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
61001016ad83Smrg	    fi
61011016ad83Smrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
61021016ad83Smrg	    # This is similar to how AIX traditionally builds its shared
61031016ad83Smrg	    # libraries.
61041016ad83Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
61051016ad83Smrg          fi
61061016ad83Smrg        fi
61071016ad83Smrg        ;;
61081016ad83Smrg
61091016ad83Smrg      beos*)
61101016ad83Smrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
61111016ad83Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
61121016ad83Smrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
61131016ad83Smrg	  # support --undefined.  This deserves some investigation.  FIXME
61141016ad83Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
61151016ad83Smrg	else
61161016ad83Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
61171016ad83Smrg	fi
61181016ad83Smrg	;;
61191016ad83Smrg
61201016ad83Smrg      chorus*)
61211016ad83Smrg        case $cc_basename in
61221016ad83Smrg          *)
61231016ad83Smrg	  # FIXME: insert proper C++ library support
61241016ad83Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
61251016ad83Smrg	  ;;
61261016ad83Smrg        esac
61271016ad83Smrg        ;;
61281016ad83Smrg
61291016ad83Smrg      cygwin* | mingw* | pw32* | cegcc*)
61301016ad83Smrg	case $GXX,$cc_basename in
61311016ad83Smrg	,cl* | no,cl*)
61321016ad83Smrg	  # Native MSVC
61331016ad83Smrg	  # hardcode_libdir_flag_spec is actually meaningless, as there is
61341016ad83Smrg	  # no search path for DLLs.
61351016ad83Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
61361016ad83Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
61371016ad83Smrg	  _LT_TAGVAR(always_export_symbols, $1)=yes
61381016ad83Smrg	  _LT_TAGVAR(file_list_spec, $1)='@'
61391016ad83Smrg	  # Tell ltmain to make .lib files, not .a files.
61401016ad83Smrg	  libext=lib
61411016ad83Smrg	  # Tell ltmain to make .dll files, not .so files.
61421016ad83Smrg	  shrext_cmds=".dll"
61431016ad83Smrg	  # FIXME: Setting linknames here is a bad hack.
61441016ad83Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
61451016ad83Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
61461016ad83Smrg	      $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
61471016ad83Smrg	    else
61481016ad83Smrg	      $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
61491016ad83Smrg	    fi~
61501016ad83Smrg	    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
61511016ad83Smrg	    linknames='
61521016ad83Smrg	  # The linker will not automatically build a static lib if we build a DLL.
61531016ad83Smrg	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
61541016ad83Smrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
61551016ad83Smrg	  # Don't use ranlib
61561016ad83Smrg	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
61571016ad83Smrg	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
61581016ad83Smrg	    lt_tool_outputfile="@TOOL_OUTPUT@"~
61591016ad83Smrg	    case $lt_outputfile in
61601016ad83Smrg	      *.exe|*.EXE) ;;
61611016ad83Smrg	      *)
61621016ad83Smrg		lt_outputfile="$lt_outputfile.exe"
61631016ad83Smrg		lt_tool_outputfile="$lt_tool_outputfile.exe"
61641016ad83Smrg		;;
61651016ad83Smrg	    esac~
61661016ad83Smrg	    func_to_tool_file "$lt_outputfile"~
61671016ad83Smrg	    if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
61681016ad83Smrg	      $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
61691016ad83Smrg	      $RM "$lt_outputfile.manifest";
61701016ad83Smrg	    fi'
61711016ad83Smrg	  ;;
61721016ad83Smrg	*)
61731016ad83Smrg	  # g++
61741016ad83Smrg	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
61751016ad83Smrg	  # as there is no search path for DLLs.
61761016ad83Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
61771016ad83Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
61781016ad83Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
61791016ad83Smrg	  _LT_TAGVAR(always_export_symbols, $1)=no
61801016ad83Smrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
61811016ad83Smrg
61821016ad83Smrg	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
61831016ad83Smrg	    _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'
61841016ad83Smrg	    # If the export-symbols file already is a .def file (1st line
61851016ad83Smrg	    # is EXPORTS), use it as is; otherwise, prepend...
61861016ad83Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
61871016ad83Smrg	      cp $export_symbols $output_objdir/$soname.def;
61881016ad83Smrg	    else
61891016ad83Smrg	      echo EXPORTS > $output_objdir/$soname.def;
61901016ad83Smrg	      cat $export_symbols >> $output_objdir/$soname.def;
61911016ad83Smrg	    fi~
61921016ad83Smrg	    $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'
61931016ad83Smrg	  else
61941016ad83Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
61951016ad83Smrg	  fi
61961016ad83Smrg	  ;;
61971016ad83Smrg	esac
61981016ad83Smrg	;;
61991016ad83Smrg      darwin* | rhapsody*)
62001016ad83Smrg        _LT_DARWIN_LINKER_FEATURES($1)
62011016ad83Smrg	;;
62021016ad83Smrg
62031016ad83Smrg      dgux*)
62041016ad83Smrg        case $cc_basename in
62051016ad83Smrg          ec++*)
62061016ad83Smrg	    # FIXME: insert proper C++ library support
62071016ad83Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
62081016ad83Smrg	    ;;
62091016ad83Smrg          ghcx*)
62101016ad83Smrg	    # Green Hills C++ Compiler
62111016ad83Smrg	    # FIXME: insert proper C++ library support
62121016ad83Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
62131016ad83Smrg	    ;;
62141016ad83Smrg          *)
62151016ad83Smrg	    # FIXME: insert proper C++ library support
62161016ad83Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
62171016ad83Smrg	    ;;
62181016ad83Smrg        esac
62191016ad83Smrg        ;;
62201016ad83Smrg
62211016ad83Smrg      freebsd2.*)
62221016ad83Smrg        # C++ shared libraries reported to be fairly broken before
62231016ad83Smrg	# switch to ELF
62241016ad83Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
62251016ad83Smrg        ;;
62261016ad83Smrg
62271016ad83Smrg      freebsd-elf*)
62281016ad83Smrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
62291016ad83Smrg        ;;
62301016ad83Smrg
62311016ad83Smrg      freebsd* | dragonfly*)
62321016ad83Smrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
62331016ad83Smrg        # conventions
62341016ad83Smrg        _LT_TAGVAR(ld_shlibs, $1)=yes
62351016ad83Smrg        ;;
62361016ad83Smrg
62371016ad83Smrg      haiku*)
62381016ad83Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
62391016ad83Smrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
62401016ad83Smrg        ;;
62411016ad83Smrg
62421016ad83Smrg      hpux9*)
62431016ad83Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
62441016ad83Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
62451016ad83Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
62461016ad83Smrg        _LT_TAGVAR(hardcode_direct, $1)=yes
62471016ad83Smrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
62481016ad83Smrg				             # but as the default
62491016ad83Smrg				             # location of the library.
62501016ad83Smrg
62511016ad83Smrg        case $cc_basename in
62521016ad83Smrg          CC*)
62531016ad83Smrg            # FIXME: insert proper C++ library support
62541016ad83Smrg            _LT_TAGVAR(ld_shlibs, $1)=no
62551016ad83Smrg            ;;
62561016ad83Smrg          aCC*)
62571016ad83Smrg            _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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
62581016ad83Smrg            # Commands to make compiler produce verbose output that lists
62591016ad83Smrg            # what "hidden" libraries, object files and flags are used when
62601016ad83Smrg            # linking a shared library.
62611016ad83Smrg            #
62621016ad83Smrg            # There doesn't appear to be a way to prevent this compiler from
62631016ad83Smrg            # explicitly linking system object files so we need to strip them
62641016ad83Smrg            # from the output so that they don't get included in the library
62651016ad83Smrg            # dependencies.
62661016ad83Smrg            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"'
62671016ad83Smrg            ;;
62681016ad83Smrg          *)
62691016ad83Smrg            if test "$GXX" = yes; then
62701016ad83Smrg              _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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
62711016ad83Smrg            else
62721016ad83Smrg              # FIXME: insert proper C++ library support
62731016ad83Smrg              _LT_TAGVAR(ld_shlibs, $1)=no
62741016ad83Smrg            fi
62751016ad83Smrg            ;;
62761016ad83Smrg        esac
62771016ad83Smrg        ;;
62781016ad83Smrg
62791016ad83Smrg      hpux10*|hpux11*)
62801016ad83Smrg        if test $with_gnu_ld = no; then
62811016ad83Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
62821016ad83Smrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
62831016ad83Smrg
62841016ad83Smrg          case $host_cpu in
62851016ad83Smrg            hppa*64*|ia64*)
62861016ad83Smrg              ;;
62871016ad83Smrg            *)
62881016ad83Smrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
62891016ad83Smrg              ;;
62901016ad83Smrg          esac
62911016ad83Smrg        fi
62921016ad83Smrg        case $host_cpu in
62931016ad83Smrg          hppa*64*|ia64*)
62941016ad83Smrg            _LT_TAGVAR(hardcode_direct, $1)=no
62951016ad83Smrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
62961016ad83Smrg            ;;
62971016ad83Smrg          *)
62981016ad83Smrg            _LT_TAGVAR(hardcode_direct, $1)=yes
62991016ad83Smrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
63001016ad83Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
63011016ad83Smrg					         # but as the default
63021016ad83Smrg					         # location of the library.
63031016ad83Smrg            ;;
63041016ad83Smrg        esac
63051016ad83Smrg
63061016ad83Smrg        case $cc_basename in
63071016ad83Smrg          CC*)
63081016ad83Smrg	    # FIXME: insert proper C++ library support
63091016ad83Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
63101016ad83Smrg	    ;;
63111016ad83Smrg          aCC*)
63121016ad83Smrg	    case $host_cpu in
63131016ad83Smrg	      hppa*64*)
63141016ad83Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
63151016ad83Smrg	        ;;
63161016ad83Smrg	      ia64*)
63171016ad83Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
63181016ad83Smrg	        ;;
63191016ad83Smrg	      *)
63201016ad83Smrg	        _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'
63211016ad83Smrg	        ;;
63221016ad83Smrg	    esac
63231016ad83Smrg	    # Commands to make compiler produce verbose output that lists
63241016ad83Smrg	    # what "hidden" libraries, object files and flags are used when
63251016ad83Smrg	    # linking a shared library.
63261016ad83Smrg	    #
63271016ad83Smrg	    # There doesn't appear to be a way to prevent this compiler from
63281016ad83Smrg	    # explicitly linking system object files so we need to strip them
63291016ad83Smrg	    # from the output so that they don't get included in the library
63301016ad83Smrg	    # dependencies.
63311016ad83Smrg	    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"'
63321016ad83Smrg	    ;;
63331016ad83Smrg          *)
63341016ad83Smrg	    if test "$GXX" = yes; then
63351016ad83Smrg	      if test $with_gnu_ld = no; then
63361016ad83Smrg	        case $host_cpu in
63371016ad83Smrg	          hppa*64*)
63381016ad83Smrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
63391016ad83Smrg	            ;;
63401016ad83Smrg	          ia64*)
63411016ad83Smrg	            _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'
63421016ad83Smrg	            ;;
63431016ad83Smrg	          *)
63441016ad83Smrg	            _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'
63451016ad83Smrg	            ;;
63461016ad83Smrg	        esac
63471016ad83Smrg	      fi
63481016ad83Smrg	    else
63491016ad83Smrg	      # FIXME: insert proper C++ library support
63501016ad83Smrg	      _LT_TAGVAR(ld_shlibs, $1)=no
63511016ad83Smrg	    fi
63521016ad83Smrg	    ;;
63531016ad83Smrg        esac
63541016ad83Smrg        ;;
63551016ad83Smrg
63561016ad83Smrg      interix[[3-9]]*)
63571016ad83Smrg	_LT_TAGVAR(hardcode_direct, $1)=no
63581016ad83Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
63591016ad83Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
63601016ad83Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
63611016ad83Smrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
63621016ad83Smrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
63631016ad83Smrg	# default) and relocated if they conflict, which is a slow very memory
63641016ad83Smrg	# consuming and fragmenting process.  To avoid this, we pick a random,
63651016ad83Smrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
63661016ad83Smrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
63671016ad83Smrg	_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'
63681016ad83Smrg	_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'
63691016ad83Smrg	;;
63701016ad83Smrg      irix5* | irix6*)
63711016ad83Smrg        case $cc_basename in
63721016ad83Smrg          CC*)
63731016ad83Smrg	    # SGI C++
63741016ad83Smrg	    _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'
63751016ad83Smrg
63761016ad83Smrg	    # Archives containing C++ object files must be created using
63771016ad83Smrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
63781016ad83Smrg	    # necessary to make sure instantiated templates are included
63791016ad83Smrg	    # in the archive.
63801016ad83Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
63811016ad83Smrg	    ;;
63821016ad83Smrg          *)
63831016ad83Smrg	    if test "$GXX" = yes; then
63841016ad83Smrg	      if test "$with_gnu_ld" = no; then
63851016ad83Smrg	        _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'
63861016ad83Smrg	      else
63871016ad83Smrg	        _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'
63881016ad83Smrg	      fi
63891016ad83Smrg	    fi
63901016ad83Smrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
63911016ad83Smrg	    ;;
63921016ad83Smrg        esac
63931016ad83Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
63941016ad83Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
63951016ad83Smrg        _LT_TAGVAR(inherit_rpath, $1)=yes
63961016ad83Smrg        ;;
63971016ad83Smrg
63981016ad83Smrg      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
63991016ad83Smrg        case $cc_basename in
64001016ad83Smrg          KCC*)
64011016ad83Smrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
64021016ad83Smrg
64031016ad83Smrg	    # KCC will only create a shared library if the output file
64041016ad83Smrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
64051016ad83Smrg	    # to its proper name (with version) after linking.
64061016ad83Smrg	    _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'
64071016ad83Smrg	    _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'
64081016ad83Smrg	    # Commands to make compiler produce verbose output that lists
64091016ad83Smrg	    # what "hidden" libraries, object files and flags are used when
64101016ad83Smrg	    # linking a shared library.
64111016ad83Smrg	    #
64121016ad83Smrg	    # There doesn't appear to be a way to prevent this compiler from
64131016ad83Smrg	    # explicitly linking system object files so we need to strip them
64141016ad83Smrg	    # from the output so that they don't get included in the library
64151016ad83Smrg	    # dependencies.
64161016ad83Smrg	    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"'
64171016ad83Smrg
64181016ad83Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
64191016ad83Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
64201016ad83Smrg
64211016ad83Smrg	    # Archives containing C++ object files must be created using
64221016ad83Smrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
64231016ad83Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
64241016ad83Smrg	    ;;
64251016ad83Smrg	  icpc* | ecpc* )
64261016ad83Smrg	    # Intel C++
64271016ad83Smrg	    with_gnu_ld=yes
64281016ad83Smrg	    # version 8.0 and above of icpc choke on multiply defined symbols
64291016ad83Smrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
64301016ad83Smrg	    # earlier do not add the objects themselves.
64311016ad83Smrg	    case `$CC -V 2>&1` in
64321016ad83Smrg	      *"Version 7."*)
64331016ad83Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
64341016ad83Smrg		_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'
64351016ad83Smrg		;;
64361016ad83Smrg	      *)  # Version 8.0 or newer
64371016ad83Smrg	        tmp_idyn=
64381016ad83Smrg	        case $host_cpu in
64391016ad83Smrg		  ia64*) tmp_idyn=' -i_dynamic';;
64401016ad83Smrg		esac
64411016ad83Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
64421016ad83Smrg		_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'
64431016ad83Smrg		;;
64441016ad83Smrg	    esac
64451016ad83Smrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
64461016ad83Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
64471016ad83Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
64481016ad83Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
64491016ad83Smrg	    ;;
64501016ad83Smrg          pgCC* | pgcpp*)
64511016ad83Smrg            # Portland Group C++ compiler
64521016ad83Smrg	    case `$CC -V` in
64531016ad83Smrg	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
64541016ad83Smrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
64551016ad83Smrg		rm -rf $tpldir~
64561016ad83Smrg		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
64571016ad83Smrg		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
64581016ad83Smrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
64591016ad83Smrg		rm -rf $tpldir~
64601016ad83Smrg		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
64611016ad83Smrg		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
64621016ad83Smrg		$RANLIB $oldlib'
64631016ad83Smrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
64641016ad83Smrg		rm -rf $tpldir~
64651016ad83Smrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
64661016ad83Smrg		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
64671016ad83Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
64681016ad83Smrg		rm -rf $tpldir~
64691016ad83Smrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
64701016ad83Smrg		$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'
64711016ad83Smrg	      ;;
64721016ad83Smrg	    *) # Version 6 and above use weak symbols
64731016ad83Smrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
64741016ad83Smrg	      _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'
64751016ad83Smrg	      ;;
64761016ad83Smrg	    esac
64771016ad83Smrg
64781016ad83Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
64791016ad83Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
64801016ad83Smrg	    _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'
64811016ad83Smrg            ;;
64821016ad83Smrg	  cxx*)
64831016ad83Smrg	    # Compaq C++
64841016ad83Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
64851016ad83Smrg	    _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'
64861016ad83Smrg
64871016ad83Smrg	    runpath_var=LD_RUN_PATH
64881016ad83Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
64891016ad83Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
64901016ad83Smrg
64911016ad83Smrg	    # Commands to make compiler produce verbose output that lists
64921016ad83Smrg	    # what "hidden" libraries, object files and flags are used when
64931016ad83Smrg	    # linking a shared library.
64941016ad83Smrg	    #
64951016ad83Smrg	    # There doesn't appear to be a way to prevent this compiler from
64961016ad83Smrg	    # explicitly linking system object files so we need to strip them
64971016ad83Smrg	    # from the output so that they don't get included in the library
64981016ad83Smrg	    # dependencies.
64991016ad83Smrg	    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'
65001016ad83Smrg	    ;;
65011016ad83Smrg	  xl* | mpixl* | bgxl*)
65021016ad83Smrg	    # IBM XL 8.0 on PPC, with GNU ld
65031016ad83Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
65041016ad83Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
65051016ad83Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
65061016ad83Smrg	    if test "x$supports_anon_versioning" = xyes; then
65071016ad83Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
65081016ad83Smrg		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
65091016ad83Smrg		echo "local: *; };" >> $output_objdir/$libname.ver~
65101016ad83Smrg		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
65111016ad83Smrg	    fi
65121016ad83Smrg	    ;;
65131016ad83Smrg	  *)
65141016ad83Smrg	    case `$CC -V 2>&1 | sed 5q` in
65151016ad83Smrg	    *Sun\ C*)
65161016ad83Smrg	      # Sun C++ 5.9
65171016ad83Smrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
65181016ad83Smrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
65191016ad83Smrg	      _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'
65201016ad83Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
65211016ad83Smrg	      _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'
65221016ad83Smrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
65231016ad83Smrg
65241016ad83Smrg	      # Not sure whether something based on
65251016ad83Smrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
65261016ad83Smrg	      # would be better.
65271016ad83Smrg	      output_verbose_link_cmd='func_echo_all'
65281016ad83Smrg
65291016ad83Smrg	      # Archives containing C++ object files must be created using
65301016ad83Smrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
65311016ad83Smrg	      # necessary to make sure instantiated templates are included
65321016ad83Smrg	      # in the archive.
65331016ad83Smrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
65341016ad83Smrg	      ;;
65351016ad83Smrg	    esac
65361016ad83Smrg	    ;;
65371016ad83Smrg	esac
65381016ad83Smrg	;;
65391016ad83Smrg
65401016ad83Smrg      lynxos*)
65411016ad83Smrg        # FIXME: insert proper C++ library support
65421016ad83Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
65431016ad83Smrg	;;
65441016ad83Smrg
65451016ad83Smrg      m88k*)
65461016ad83Smrg        # FIXME: insert proper C++ library support
65471016ad83Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
65481016ad83Smrg	;;
65491016ad83Smrg
65501016ad83Smrg      mvs*)
65511016ad83Smrg        case $cc_basename in
65521016ad83Smrg          cxx*)
65531016ad83Smrg	    # FIXME: insert proper C++ library support
65541016ad83Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
65551016ad83Smrg	    ;;
65561016ad83Smrg	  *)
65571016ad83Smrg	    # FIXME: insert proper C++ library support
65581016ad83Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
65591016ad83Smrg	    ;;
65601016ad83Smrg	esac
65611016ad83Smrg	;;
65621016ad83Smrg
65631016ad83Smrg      netbsd*)
65641016ad83Smrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
65651016ad83Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
65661016ad83Smrg	  wlarc=
65671016ad83Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
65681016ad83Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
65691016ad83Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
65701016ad83Smrg	fi
65711016ad83Smrg	# Workaround some broken pre-1.5 toolchains
65721016ad83Smrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
65731016ad83Smrg	;;
65741016ad83Smrg
65751016ad83Smrg      *nto* | *qnx*)
65761016ad83Smrg        _LT_TAGVAR(ld_shlibs, $1)=yes
65771016ad83Smrg	;;
65781016ad83Smrg
65791016ad83Smrg      openbsd2*)
65801016ad83Smrg        # C++ shared libraries are fairly broken
65811016ad83Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
65821016ad83Smrg	;;
65831016ad83Smrg
65841016ad83Smrg      openbsd*)
65851016ad83Smrg	if test -f /usr/libexec/ld.so; then
65861016ad83Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
65871016ad83Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
65881016ad83Smrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
65891016ad83Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
65901016ad83Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
65911016ad83Smrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
65921016ad83Smrg	    _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'
65931016ad83Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
65941016ad83Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
65951016ad83Smrg	  fi
65961016ad83Smrg	  output_verbose_link_cmd=func_echo_all
65971016ad83Smrg	else
65981016ad83Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
65991016ad83Smrg	fi
66001016ad83Smrg	;;
66011016ad83Smrg
66021016ad83Smrg      osf3* | osf4* | osf5*)
66031016ad83Smrg        case $cc_basename in
66041016ad83Smrg          KCC*)
66051016ad83Smrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
66061016ad83Smrg
66071016ad83Smrg	    # KCC will only create a shared library if the output file
66081016ad83Smrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
66091016ad83Smrg	    # to its proper name (with version) after linking.
66101016ad83Smrg	    _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'
66111016ad83Smrg
66121016ad83Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
66131016ad83Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
66141016ad83Smrg
66151016ad83Smrg	    # Archives containing C++ object files must be created using
66161016ad83Smrg	    # the KAI C++ compiler.
66171016ad83Smrg	    case $host in
66181016ad83Smrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
66191016ad83Smrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
66201016ad83Smrg	    esac
66211016ad83Smrg	    ;;
66221016ad83Smrg          RCC*)
66231016ad83Smrg	    # Rational C++ 2.4.1
66241016ad83Smrg	    # FIXME: insert proper C++ library support
66251016ad83Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
66261016ad83Smrg	    ;;
66271016ad83Smrg          cxx*)
66281016ad83Smrg	    case $host in
66291016ad83Smrg	      osf3*)
66301016ad83Smrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
66311016ad83Smrg	        _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'
66321016ad83Smrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
66331016ad83Smrg		;;
66341016ad83Smrg	      *)
66351016ad83Smrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
66361016ad83Smrg	        _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'
66371016ad83Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
66381016ad83Smrg	          echo "-hidden">> $lib.exp~
66391016ad83Smrg	          $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~
66401016ad83Smrg	          $RM $lib.exp'
66411016ad83Smrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
66421016ad83Smrg		;;
66431016ad83Smrg	    esac
66441016ad83Smrg
66451016ad83Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
66461016ad83Smrg
66471016ad83Smrg	    # Commands to make compiler produce verbose output that lists
66481016ad83Smrg	    # what "hidden" libraries, object files and flags are used when
66491016ad83Smrg	    # linking a shared library.
66501016ad83Smrg	    #
66511016ad83Smrg	    # There doesn't appear to be a way to prevent this compiler from
66521016ad83Smrg	    # explicitly linking system object files so we need to strip them
66531016ad83Smrg	    # from the output so that they don't get included in the library
66541016ad83Smrg	    # dependencies.
66551016ad83Smrg	    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"'
66561016ad83Smrg	    ;;
66571016ad83Smrg	  *)
66581016ad83Smrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
66591016ad83Smrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
66601016ad83Smrg	      case $host in
66611016ad83Smrg	        osf3*)
66621016ad83Smrg	          _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'
66631016ad83Smrg		  ;;
66641016ad83Smrg	        *)
66651016ad83Smrg	          _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'
66661016ad83Smrg		  ;;
66671016ad83Smrg	      esac
66681016ad83Smrg
66691016ad83Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
66701016ad83Smrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
66711016ad83Smrg
66721016ad83Smrg	      # Commands to make compiler produce verbose output that lists
66731016ad83Smrg	      # what "hidden" libraries, object files and flags are used when
66741016ad83Smrg	      # linking a shared library.
66751016ad83Smrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
66761016ad83Smrg
66771016ad83Smrg	    else
66781016ad83Smrg	      # FIXME: insert proper C++ library support
66791016ad83Smrg	      _LT_TAGVAR(ld_shlibs, $1)=no
66801016ad83Smrg	    fi
66811016ad83Smrg	    ;;
66821016ad83Smrg        esac
66831016ad83Smrg        ;;
66841016ad83Smrg
66851016ad83Smrg      psos*)
66861016ad83Smrg        # FIXME: insert proper C++ library support
66871016ad83Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
66881016ad83Smrg        ;;
66891016ad83Smrg
66901016ad83Smrg      sunos4*)
66911016ad83Smrg        case $cc_basename in
66921016ad83Smrg          CC*)
66931016ad83Smrg	    # Sun C++ 4.x
66941016ad83Smrg	    # FIXME: insert proper C++ library support
66951016ad83Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
66961016ad83Smrg	    ;;
66971016ad83Smrg          lcc*)
66981016ad83Smrg	    # Lucid
66991016ad83Smrg	    # FIXME: insert proper C++ library support
67001016ad83Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
67011016ad83Smrg	    ;;
67021016ad83Smrg          *)
67031016ad83Smrg	    # FIXME: insert proper C++ library support
67041016ad83Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
67051016ad83Smrg	    ;;
67061016ad83Smrg        esac
67071016ad83Smrg        ;;
67081016ad83Smrg
67091016ad83Smrg      solaris*)
67101016ad83Smrg        case $cc_basename in
67111016ad83Smrg          CC* | sunCC*)
67121016ad83Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
67131016ad83Smrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
67141016ad83Smrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
67151016ad83Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
67161016ad83Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
67171016ad83Smrg	      $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'
67181016ad83Smrg
67191016ad83Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
67201016ad83Smrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
67211016ad83Smrg	    case $host_os in
67221016ad83Smrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
67231016ad83Smrg	      *)
67241016ad83Smrg		# The compiler driver will combine and reorder linker options,
67251016ad83Smrg		# but understands `-z linker_flag'.
67261016ad83Smrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
67271016ad83Smrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
67281016ad83Smrg	        ;;
67291016ad83Smrg	    esac
67301016ad83Smrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
67311016ad83Smrg
67321016ad83Smrg	    output_verbose_link_cmd='func_echo_all'
67331016ad83Smrg
67341016ad83Smrg	    # Archives containing C++ object files must be created using
67351016ad83Smrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
67361016ad83Smrg	    # necessary to make sure instantiated templates are included
67371016ad83Smrg	    # in the archive.
67381016ad83Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
67391016ad83Smrg	    ;;
67401016ad83Smrg          gcx*)
67411016ad83Smrg	    # Green Hills C++ Compiler
67421016ad83Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
67431016ad83Smrg
67441016ad83Smrg	    # The C++ compiler must be used to create the archive.
67451016ad83Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
67461016ad83Smrg	    ;;
67471016ad83Smrg          *)
67481016ad83Smrg	    # GNU C++ compiler with Solaris linker
67491016ad83Smrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
67501016ad83Smrg	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
67511016ad83Smrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
67521016ad83Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
67531016ad83Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
67541016ad83Smrg		  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
67551016ad83Smrg
67561016ad83Smrg	        # Commands to make compiler produce verbose output that lists
67571016ad83Smrg	        # what "hidden" libraries, object files and flags are used when
67581016ad83Smrg	        # linking a shared library.
67591016ad83Smrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
67601016ad83Smrg	      else
67611016ad83Smrg	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
67621016ad83Smrg	        # platform.
67631016ad83Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
67641016ad83Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
67651016ad83Smrg		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
67661016ad83Smrg
67671016ad83Smrg	        # Commands to make compiler produce verbose output that lists
67681016ad83Smrg	        # what "hidden" libraries, object files and flags are used when
67691016ad83Smrg	        # linking a shared library.
67701016ad83Smrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
67711016ad83Smrg	      fi
67721016ad83Smrg
67731016ad83Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
67741016ad83Smrg	      case $host_os in
67751016ad83Smrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
67761016ad83Smrg		*)
67771016ad83Smrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
67781016ad83Smrg		  ;;
67791016ad83Smrg	      esac
67801016ad83Smrg	    fi
67811016ad83Smrg	    ;;
67821016ad83Smrg        esac
67831016ad83Smrg        ;;
67841016ad83Smrg
67851016ad83Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
67861016ad83Smrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
67871016ad83Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
67881016ad83Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
67891016ad83Smrg      runpath_var='LD_RUN_PATH'
67901016ad83Smrg
67911016ad83Smrg      case $cc_basename in
67921016ad83Smrg        CC*)
67931016ad83Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
67941016ad83Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
67951016ad83Smrg	  ;;
67961016ad83Smrg	*)
67971016ad83Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
67981016ad83Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
67991016ad83Smrg	  ;;
68001016ad83Smrg      esac
68011016ad83Smrg      ;;
68021016ad83Smrg
68031016ad83Smrg      sysv5* | sco3.2v5* | sco5v6*)
68041016ad83Smrg	# Note: We can NOT use -z defs as we might desire, because we do not
68051016ad83Smrg	# link with -lc, and that would cause any symbols used from libc to
68061016ad83Smrg	# always be unresolved, which means just about no library would
68071016ad83Smrg	# ever link correctly.  If we're not using GNU ld we use -z text
68081016ad83Smrg	# though, which does catch some bad symbols but isn't as heavy-handed
68091016ad83Smrg	# as -z defs.
68101016ad83Smrg	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
68111016ad83Smrg	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
68121016ad83Smrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
68131016ad83Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
68141016ad83Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
68151016ad83Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
68161016ad83Smrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
68171016ad83Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
68181016ad83Smrg	runpath_var='LD_RUN_PATH'
68191016ad83Smrg
68201016ad83Smrg	case $cc_basename in
68211016ad83Smrg          CC*)
68221016ad83Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
68231016ad83Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
68241016ad83Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
68251016ad83Smrg	      '"$_LT_TAGVAR(old_archive_cmds, $1)"
68261016ad83Smrg	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
68271016ad83Smrg	      '"$_LT_TAGVAR(reload_cmds, $1)"
68281016ad83Smrg	    ;;
68291016ad83Smrg	  *)
68301016ad83Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
68311016ad83Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
68321016ad83Smrg	    ;;
68331016ad83Smrg	esac
68341016ad83Smrg      ;;
68351016ad83Smrg
68361016ad83Smrg      tandem*)
68371016ad83Smrg        case $cc_basename in
68381016ad83Smrg          NCC*)
68391016ad83Smrg	    # NonStop-UX NCC 3.20
68401016ad83Smrg	    # FIXME: insert proper C++ library support
68411016ad83Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
68421016ad83Smrg	    ;;
68431016ad83Smrg          *)
68441016ad83Smrg	    # FIXME: insert proper C++ library support
68451016ad83Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
68461016ad83Smrg	    ;;
68471016ad83Smrg        esac
68481016ad83Smrg        ;;
68491016ad83Smrg
68501016ad83Smrg      vxworks*)
68511016ad83Smrg        # FIXME: insert proper C++ library support
68521016ad83Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
68531016ad83Smrg        ;;
68541016ad83Smrg
68551016ad83Smrg      *)
68561016ad83Smrg        # FIXME: insert proper C++ library support
68571016ad83Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
68581016ad83Smrg        ;;
68591016ad83Smrg    esac
68601016ad83Smrg
68611016ad83Smrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
68621016ad83Smrg    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
68631016ad83Smrg
68641016ad83Smrg    _LT_TAGVAR(GCC, $1)="$GXX"
68651016ad83Smrg    _LT_TAGVAR(LD, $1)="$LD"
68661016ad83Smrg
68671016ad83Smrg    ## CAVEAT EMPTOR:
68681016ad83Smrg    ## There is no encapsulation within the following macros, do not change
68691016ad83Smrg    ## the running order or otherwise move them around unless you know exactly
68701016ad83Smrg    ## what you are doing...
68711016ad83Smrg    _LT_SYS_HIDDEN_LIBDEPS($1)
68721016ad83Smrg    _LT_COMPILER_PIC($1)
68731016ad83Smrg    _LT_COMPILER_C_O($1)
68741016ad83Smrg    _LT_COMPILER_FILE_LOCKS($1)
68751016ad83Smrg    _LT_LINKER_SHLIBS($1)
68761016ad83Smrg    _LT_SYS_DYNAMIC_LINKER($1)
68771016ad83Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
68781016ad83Smrg
68791016ad83Smrg    _LT_CONFIG($1)
68801016ad83Smrg  fi # test -n "$compiler"
68811016ad83Smrg
68821016ad83Smrg  CC=$lt_save_CC
68831016ad83Smrg  CFLAGS=$lt_save_CFLAGS
68841016ad83Smrg  LDCXX=$LD
68851016ad83Smrg  LD=$lt_save_LD
68861016ad83Smrg  GCC=$lt_save_GCC
68871016ad83Smrg  with_gnu_ld=$lt_save_with_gnu_ld
68881016ad83Smrg  lt_cv_path_LDCXX=$lt_cv_path_LD
68891016ad83Smrg  lt_cv_path_LD=$lt_save_path_LD
68901016ad83Smrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
68911016ad83Smrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
68921016ad83Smrgfi # test "$_lt_caught_CXX_error" != yes
68931016ad83Smrg
68941016ad83SmrgAC_LANG_POP
68951016ad83Smrg])# _LT_LANG_CXX_CONFIG
68961016ad83Smrg
68971016ad83Smrg
68981016ad83Smrg# _LT_FUNC_STRIPNAME_CNF
68991016ad83Smrg# ----------------------
69001016ad83Smrg# func_stripname_cnf prefix suffix name
69011016ad83Smrg# strip PREFIX and SUFFIX off of NAME.
69021016ad83Smrg# PREFIX and SUFFIX must not contain globbing or regex special
69031016ad83Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading
69041016ad83Smrg# dot (in which case that matches only a dot).
69051016ad83Smrg#
69061016ad83Smrg# This function is identical to the (non-XSI) version of func_stripname,
69071016ad83Smrg# except this one can be used by m4 code that may be executed by configure,
69081016ad83Smrg# rather than the libtool script.
69091016ad83Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
69101016ad83SmrgAC_REQUIRE([_LT_DECL_SED])
69111016ad83SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
69121016ad83Smrgfunc_stripname_cnf ()
69131016ad83Smrg{
69141016ad83Smrg  case ${2} in
69151016ad83Smrg  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
69161016ad83Smrg  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
69171016ad83Smrg  esac
69181016ad83Smrg} # func_stripname_cnf
69191016ad83Smrg])# _LT_FUNC_STRIPNAME_CNF
69201016ad83Smrg
69211016ad83Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
69221016ad83Smrg# ---------------------------------
69231016ad83Smrg# Figure out "hidden" library dependencies from verbose
69241016ad83Smrg# compiler output when linking a shared library.
69251016ad83Smrg# Parse the compiler output and extract the necessary
69261016ad83Smrg# objects, libraries and library flags.
69271016ad83Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
69281016ad83Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
69291016ad83SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
69301016ad83Smrg# Dependencies to place before and after the object being linked:
69311016ad83Smrg_LT_TAGVAR(predep_objects, $1)=
69321016ad83Smrg_LT_TAGVAR(postdep_objects, $1)=
69331016ad83Smrg_LT_TAGVAR(predeps, $1)=
69341016ad83Smrg_LT_TAGVAR(postdeps, $1)=
69351016ad83Smrg_LT_TAGVAR(compiler_lib_search_path, $1)=
69361016ad83Smrg
69371016ad83Smrgdnl we can't use the lt_simple_compile_test_code here,
69381016ad83Smrgdnl because it contains code intended for an executable,
69391016ad83Smrgdnl not a library.  It's possible we should let each
69401016ad83Smrgdnl tag define a new lt_????_link_test_code variable,
69411016ad83Smrgdnl but it's only used here...
69421016ad83Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
69431016ad83Smrgint a;
69441016ad83Smrgvoid foo (void) { a = 0; }
69451016ad83Smrg_LT_EOF
69461016ad83Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
69471016ad83Smrgclass Foo
69481016ad83Smrg{
69491016ad83Smrgpublic:
69501016ad83Smrg  Foo (void) { a = 0; }
69511016ad83Smrgprivate:
69521016ad83Smrg  int a;
69531016ad83Smrg};
69541016ad83Smrg_LT_EOF
69551016ad83Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
69561016ad83Smrg      subroutine foo
69571016ad83Smrg      implicit none
69581016ad83Smrg      integer*4 a
69591016ad83Smrg      a=0
69601016ad83Smrg      return
69611016ad83Smrg      end
69621016ad83Smrg_LT_EOF
69631016ad83Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
69641016ad83Smrg      subroutine foo
69651016ad83Smrg      implicit none
69661016ad83Smrg      integer a
69671016ad83Smrg      a=0
69681016ad83Smrg      return
69691016ad83Smrg      end
69701016ad83Smrg_LT_EOF
69711016ad83Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
69721016ad83Smrgpublic class foo {
69731016ad83Smrg  private int a;
69741016ad83Smrg  public void bar (void) {
69751016ad83Smrg    a = 0;
69761016ad83Smrg  }
69771016ad83Smrg};
69781016ad83Smrg_LT_EOF
69791016ad83Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
69801016ad83Smrgpackage foo
69811016ad83Smrgfunc foo() {
69821016ad83Smrg}
69831016ad83Smrg_LT_EOF
69841016ad83Smrg])
69851016ad83Smrg
69861016ad83Smrg_lt_libdeps_save_CFLAGS=$CFLAGS
69871016ad83Smrgcase "$CC $CFLAGS " in #(
69881016ad83Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
69891016ad83Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
69901016ad83Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
69911016ad83Smrgesac
69921016ad83Smrg
69931016ad83Smrgdnl Parse the compiler output and extract the necessary
69941016ad83Smrgdnl objects, libraries and library flags.
69951016ad83Smrgif AC_TRY_EVAL(ac_compile); then
69961016ad83Smrg  # Parse the compiler output and extract the necessary
69971016ad83Smrg  # objects, libraries and library flags.
69981016ad83Smrg
69991016ad83Smrg  # Sentinel used to keep track of whether or not we are before
70001016ad83Smrg  # the conftest object file.
70011016ad83Smrg  pre_test_object_deps_done=no
70021016ad83Smrg
70031016ad83Smrg  for p in `eval "$output_verbose_link_cmd"`; do
70041016ad83Smrg    case ${prev}${p} in
70051016ad83Smrg
70061016ad83Smrg    -L* | -R* | -l*)
70071016ad83Smrg       # Some compilers place space between "-{L,R}" and the path.
70081016ad83Smrg       # Remove the space.
70091016ad83Smrg       if test $p = "-L" ||
70101016ad83Smrg          test $p = "-R"; then
70111016ad83Smrg	 prev=$p
70121016ad83Smrg	 continue
70131016ad83Smrg       fi
70141016ad83Smrg
70151016ad83Smrg       # Expand the sysroot to ease extracting the directories later.
70161016ad83Smrg       if test -z "$prev"; then
70171016ad83Smrg         case $p in
70181016ad83Smrg         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
70191016ad83Smrg         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
70201016ad83Smrg         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
70211016ad83Smrg         esac
70221016ad83Smrg       fi
70231016ad83Smrg       case $p in
70241016ad83Smrg       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
70251016ad83Smrg       esac
70261016ad83Smrg       if test "$pre_test_object_deps_done" = no; then
70271016ad83Smrg	 case ${prev} in
70281016ad83Smrg	 -L | -R)
70291016ad83Smrg	   # Internal compiler library paths should come after those
70301016ad83Smrg	   # provided the user.  The postdeps already come after the
70311016ad83Smrg	   # user supplied libs so there is no need to process them.
70321016ad83Smrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
70331016ad83Smrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
70341016ad83Smrg	   else
70351016ad83Smrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
70361016ad83Smrg	   fi
70371016ad83Smrg	   ;;
70381016ad83Smrg	 # The "-l" case would never come before the object being
70391016ad83Smrg	 # linked, so don't bother handling this case.
70401016ad83Smrg	 esac
70411016ad83Smrg       else
70421016ad83Smrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
70431016ad83Smrg	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
70441016ad83Smrg	 else
70451016ad83Smrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
70461016ad83Smrg	 fi
70471016ad83Smrg       fi
70481016ad83Smrg       prev=
70491016ad83Smrg       ;;
70501016ad83Smrg
70511016ad83Smrg    *.lto.$objext) ;; # Ignore GCC LTO objects
70521016ad83Smrg    *.$objext)
70531016ad83Smrg       # This assumes that the test object file only shows up
70541016ad83Smrg       # once in the compiler output.
70551016ad83Smrg       if test "$p" = "conftest.$objext"; then
70561016ad83Smrg	 pre_test_object_deps_done=yes
70571016ad83Smrg	 continue
70581016ad83Smrg       fi
70591016ad83Smrg
70601016ad83Smrg       if test "$pre_test_object_deps_done" = no; then
70611016ad83Smrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
70621016ad83Smrg	   _LT_TAGVAR(predep_objects, $1)="$p"
70631016ad83Smrg	 else
70641016ad83Smrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
70651016ad83Smrg	 fi
70661016ad83Smrg       else
70671016ad83Smrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
70681016ad83Smrg	   _LT_TAGVAR(postdep_objects, $1)="$p"
70691016ad83Smrg	 else
70701016ad83Smrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
70711016ad83Smrg	 fi
70721016ad83Smrg       fi
70731016ad83Smrg       ;;
70741016ad83Smrg
70751016ad83Smrg    *) ;; # Ignore the rest.
70761016ad83Smrg
70771016ad83Smrg    esac
70781016ad83Smrg  done
70791016ad83Smrg
70801016ad83Smrg  # Clean up.
70811016ad83Smrg  rm -f a.out a.exe
70821016ad83Smrgelse
70831016ad83Smrg  echo "libtool.m4: error: problem compiling $1 test program"
70841016ad83Smrgfi
70851016ad83Smrg
70861016ad83Smrg$RM -f confest.$objext
70871016ad83SmrgCFLAGS=$_lt_libdeps_save_CFLAGS
70881016ad83Smrg
70891016ad83Smrg# PORTME: override above test on systems where it is broken
70901016ad83Smrgm4_if([$1], [CXX],
70911016ad83Smrg[case $host_os in
70921016ad83Smrginterix[[3-9]]*)
70931016ad83Smrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
70941016ad83Smrg  # hack all around it, let's just trust "g++" to DTRT.
70951016ad83Smrg  _LT_TAGVAR(predep_objects,$1)=
70961016ad83Smrg  _LT_TAGVAR(postdep_objects,$1)=
70971016ad83Smrg  _LT_TAGVAR(postdeps,$1)=
70981016ad83Smrg  ;;
70991016ad83Smrg
71001016ad83Smrglinux*)
71011016ad83Smrg  case `$CC -V 2>&1 | sed 5q` in
71021016ad83Smrg  *Sun\ C*)
71031016ad83Smrg    # Sun C++ 5.9
71041016ad83Smrg
71051016ad83Smrg    # The more standards-conforming stlport4 library is
71061016ad83Smrg    # incompatible with the Cstd library. Avoid specifying
71071016ad83Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
71081016ad83Smrg    # -library=stlport4 depends on it.
71091016ad83Smrg    case " $CXX $CXXFLAGS " in
71101016ad83Smrg    *" -library=stlport4 "*)
71111016ad83Smrg      solaris_use_stlport4=yes
71121016ad83Smrg      ;;
71131016ad83Smrg    esac
71141016ad83Smrg
71151016ad83Smrg    if test "$solaris_use_stlport4" != yes; then
71161016ad83Smrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
71171016ad83Smrg    fi
71181016ad83Smrg    ;;
71191016ad83Smrg  esac
71201016ad83Smrg  ;;
71211016ad83Smrg
71221016ad83Smrgsolaris*)
71231016ad83Smrg  case $cc_basename in
71241016ad83Smrg  CC* | sunCC*)
71251016ad83Smrg    # The more standards-conforming stlport4 library is
71261016ad83Smrg    # incompatible with the Cstd library. Avoid specifying
71271016ad83Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
71281016ad83Smrg    # -library=stlport4 depends on it.
71291016ad83Smrg    case " $CXX $CXXFLAGS " in
71301016ad83Smrg    *" -library=stlport4 "*)
71311016ad83Smrg      solaris_use_stlport4=yes
71321016ad83Smrg      ;;
71331016ad83Smrg    esac
71341016ad83Smrg
71351016ad83Smrg    # Adding this requires a known-good setup of shared libraries for
71361016ad83Smrg    # Sun compiler versions before 5.6, else PIC objects from an old
71371016ad83Smrg    # archive will be linked into the output, leading to subtle bugs.
71381016ad83Smrg    if test "$solaris_use_stlport4" != yes; then
71391016ad83Smrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
71401016ad83Smrg    fi
71411016ad83Smrg    ;;
71421016ad83Smrg  esac
71431016ad83Smrg  ;;
71441016ad83Smrgesac
71451016ad83Smrg])
71461016ad83Smrg
71471016ad83Smrgcase " $_LT_TAGVAR(postdeps, $1) " in
71481016ad83Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
71491016ad83Smrgesac
71501016ad83Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
71511016ad83Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
71521016ad83Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
71531016ad83Smrgfi
71541016ad83Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
71551016ad83Smrg    [The directories searched by this compiler when creating a shared library])
71561016ad83Smrg_LT_TAGDECL([], [predep_objects], [1],
71571016ad83Smrg    [Dependencies to place before and after the objects being linked to
71581016ad83Smrg    create a shared library])
71591016ad83Smrg_LT_TAGDECL([], [postdep_objects], [1])
71601016ad83Smrg_LT_TAGDECL([], [predeps], [1])
71611016ad83Smrg_LT_TAGDECL([], [postdeps], [1])
71621016ad83Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
71631016ad83Smrg    [The library search path used internally by the compiler when linking
71641016ad83Smrg    a shared library])
71651016ad83Smrg])# _LT_SYS_HIDDEN_LIBDEPS
71661016ad83Smrg
71671016ad83Smrg
71681016ad83Smrg# _LT_LANG_F77_CONFIG([TAG])
71691016ad83Smrg# --------------------------
71701016ad83Smrg# Ensure that the configuration variables for a Fortran 77 compiler are
71711016ad83Smrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
71721016ad83Smrg# to write the compiler configuration to `libtool'.
71731016ad83Smrgm4_defun([_LT_LANG_F77_CONFIG],
71741016ad83Smrg[AC_LANG_PUSH(Fortran 77)
71751016ad83Smrgif test -z "$F77" || test "X$F77" = "Xno"; then
71761016ad83Smrg  _lt_disable_F77=yes
71771016ad83Smrgfi
71781016ad83Smrg
71791016ad83Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
71801016ad83Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
71811016ad83Smrg_LT_TAGVAR(always_export_symbols, $1)=no
71821016ad83Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
71831016ad83Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
71841016ad83Smrg_LT_TAGVAR(hardcode_direct, $1)=no
71851016ad83Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
71861016ad83Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
71871016ad83Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
71881016ad83Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
71891016ad83Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
71901016ad83Smrg_LT_TAGVAR(inherit_rpath, $1)=no
71911016ad83Smrg_LT_TAGVAR(module_cmds, $1)=
71921016ad83Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
71931016ad83Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
71941016ad83Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
71951016ad83Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
71961016ad83Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
71971016ad83Smrg_LT_TAGVAR(no_undefined_flag, $1)=
71981016ad83Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
71991016ad83Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
72001016ad83Smrg
72011016ad83Smrg# Source file extension for f77 test sources.
72021016ad83Smrgac_ext=f
72031016ad83Smrg
72041016ad83Smrg# Object file extension for compiled f77 test sources.
72051016ad83Smrgobjext=o
72061016ad83Smrg_LT_TAGVAR(objext, $1)=$objext
72071016ad83Smrg
72081016ad83Smrg# No sense in running all these tests if we already determined that
72091016ad83Smrg# the F77 compiler isn't working.  Some variables (like enable_shared)
72101016ad83Smrg# are currently assumed to apply to all compilers on this platform,
72111016ad83Smrg# and will be corrupted by setting them based on a non-working compiler.
72121016ad83Smrgif test "$_lt_disable_F77" != yes; then
72131016ad83Smrg  # Code to be used in simple compile tests
72141016ad83Smrg  lt_simple_compile_test_code="\
72151016ad83Smrg      subroutine t
72161016ad83Smrg      return
72171016ad83Smrg      end
72181016ad83Smrg"
72191016ad83Smrg
72201016ad83Smrg  # Code to be used in simple link tests
72211016ad83Smrg  lt_simple_link_test_code="\
72221016ad83Smrg      program t
72231016ad83Smrg      end
72241016ad83Smrg"
72251016ad83Smrg
72261016ad83Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
72271016ad83Smrg  _LT_TAG_COMPILER
72281016ad83Smrg
72291016ad83Smrg  # save warnings/boilerplate of simple test code
72301016ad83Smrg  _LT_COMPILER_BOILERPLATE
72311016ad83Smrg  _LT_LINKER_BOILERPLATE
72321016ad83Smrg
72331016ad83Smrg  # Allow CC to be a program name with arguments.
72341016ad83Smrg  lt_save_CC="$CC"
72351016ad83Smrg  lt_save_GCC=$GCC
72361016ad83Smrg  lt_save_CFLAGS=$CFLAGS
72371016ad83Smrg  CC=${F77-"f77"}
72381016ad83Smrg  CFLAGS=$FFLAGS
72391016ad83Smrg  compiler=$CC
72401016ad83Smrg  _LT_TAGVAR(compiler, $1)=$CC
72411016ad83Smrg  _LT_CC_BASENAME([$compiler])
72421016ad83Smrg  GCC=$G77
72431016ad83Smrg  if test -n "$compiler"; then
72441016ad83Smrg    AC_MSG_CHECKING([if libtool supports shared libraries])
72451016ad83Smrg    AC_MSG_RESULT([$can_build_shared])
72461016ad83Smrg
72471016ad83Smrg    AC_MSG_CHECKING([whether to build shared libraries])
72481016ad83Smrg    test "$can_build_shared" = "no" && enable_shared=no
72491016ad83Smrg
72501016ad83Smrg    # On AIX, shared libraries and static libraries use the same namespace, and
72511016ad83Smrg    # are all built from PIC.
72521016ad83Smrg    case $host_os in
72531016ad83Smrg      aix3*)
72541016ad83Smrg        test "$enable_shared" = yes && enable_static=no
72551016ad83Smrg        if test -n "$RANLIB"; then
72561016ad83Smrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
72571016ad83Smrg          postinstall_cmds='$RANLIB $lib'
72581016ad83Smrg        fi
72591016ad83Smrg        ;;
72601016ad83Smrg      aix[[4-9]]*)
72611016ad83Smrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
72621016ad83Smrg	  test "$enable_shared" = yes && enable_static=no
72631016ad83Smrg	fi
72641016ad83Smrg        ;;
72651016ad83Smrg    esac
72661016ad83Smrg    AC_MSG_RESULT([$enable_shared])
72671016ad83Smrg
72681016ad83Smrg    AC_MSG_CHECKING([whether to build static libraries])
72691016ad83Smrg    # Make sure either enable_shared or enable_static is yes.
72701016ad83Smrg    test "$enable_shared" = yes || enable_static=yes
72711016ad83Smrg    AC_MSG_RESULT([$enable_static])
72721016ad83Smrg
72731016ad83Smrg    _LT_TAGVAR(GCC, $1)="$G77"
72741016ad83Smrg    _LT_TAGVAR(LD, $1)="$LD"
72751016ad83Smrg
72761016ad83Smrg    ## CAVEAT EMPTOR:
72771016ad83Smrg    ## There is no encapsulation within the following macros, do not change
72781016ad83Smrg    ## the running order or otherwise move them around unless you know exactly
72791016ad83Smrg    ## what you are doing...
72801016ad83Smrg    _LT_COMPILER_PIC($1)
72811016ad83Smrg    _LT_COMPILER_C_O($1)
72821016ad83Smrg    _LT_COMPILER_FILE_LOCKS($1)
72831016ad83Smrg    _LT_LINKER_SHLIBS($1)
72841016ad83Smrg    _LT_SYS_DYNAMIC_LINKER($1)
72851016ad83Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
72861016ad83Smrg
72871016ad83Smrg    _LT_CONFIG($1)
72881016ad83Smrg  fi # test -n "$compiler"
72891016ad83Smrg
72901016ad83Smrg  GCC=$lt_save_GCC
72911016ad83Smrg  CC="$lt_save_CC"
72921016ad83Smrg  CFLAGS="$lt_save_CFLAGS"
72931016ad83Smrgfi # test "$_lt_disable_F77" != yes
72941016ad83Smrg
72951016ad83SmrgAC_LANG_POP
72961016ad83Smrg])# _LT_LANG_F77_CONFIG
72971016ad83Smrg
72981016ad83Smrg
72991016ad83Smrg# _LT_LANG_FC_CONFIG([TAG])
73001016ad83Smrg# -------------------------
73011016ad83Smrg# Ensure that the configuration variables for a Fortran compiler are
73021016ad83Smrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
73031016ad83Smrg# to write the compiler configuration to `libtool'.
73041016ad83Smrgm4_defun([_LT_LANG_FC_CONFIG],
73051016ad83Smrg[AC_LANG_PUSH(Fortran)
73061016ad83Smrg
73071016ad83Smrgif test -z "$FC" || test "X$FC" = "Xno"; then
73081016ad83Smrg  _lt_disable_FC=yes
73091016ad83Smrgfi
73101016ad83Smrg
73111016ad83Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
73121016ad83Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
73131016ad83Smrg_LT_TAGVAR(always_export_symbols, $1)=no
73141016ad83Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
73151016ad83Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
73161016ad83Smrg_LT_TAGVAR(hardcode_direct, $1)=no
73171016ad83Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
73181016ad83Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
73191016ad83Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
73201016ad83Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
73211016ad83Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
73221016ad83Smrg_LT_TAGVAR(inherit_rpath, $1)=no
73231016ad83Smrg_LT_TAGVAR(module_cmds, $1)=
73241016ad83Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
73251016ad83Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
73261016ad83Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
73271016ad83Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
73281016ad83Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
73291016ad83Smrg_LT_TAGVAR(no_undefined_flag, $1)=
73301016ad83Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
73311016ad83Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
73321016ad83Smrg
73331016ad83Smrg# Source file extension for fc test sources.
73341016ad83Smrgac_ext=${ac_fc_srcext-f}
73351016ad83Smrg
73361016ad83Smrg# Object file extension for compiled fc test sources.
73371016ad83Smrgobjext=o
73381016ad83Smrg_LT_TAGVAR(objext, $1)=$objext
73391016ad83Smrg
73401016ad83Smrg# No sense in running all these tests if we already determined that
73411016ad83Smrg# the FC compiler isn't working.  Some variables (like enable_shared)
73421016ad83Smrg# are currently assumed to apply to all compilers on this platform,
73431016ad83Smrg# and will be corrupted by setting them based on a non-working compiler.
73441016ad83Smrgif test "$_lt_disable_FC" != yes; then
73451016ad83Smrg  # Code to be used in simple compile tests
73461016ad83Smrg  lt_simple_compile_test_code="\
73471016ad83Smrg      subroutine t
73481016ad83Smrg      return
73491016ad83Smrg      end
73501016ad83Smrg"
73511016ad83Smrg
73521016ad83Smrg  # Code to be used in simple link tests
73531016ad83Smrg  lt_simple_link_test_code="\
73541016ad83Smrg      program t
73551016ad83Smrg      end
73561016ad83Smrg"
73571016ad83Smrg
73581016ad83Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
73591016ad83Smrg  _LT_TAG_COMPILER
73601016ad83Smrg
73611016ad83Smrg  # save warnings/boilerplate of simple test code
73621016ad83Smrg  _LT_COMPILER_BOILERPLATE
73631016ad83Smrg  _LT_LINKER_BOILERPLATE
73641016ad83Smrg
73651016ad83Smrg  # Allow CC to be a program name with arguments.
73661016ad83Smrg  lt_save_CC="$CC"
73671016ad83Smrg  lt_save_GCC=$GCC
73681016ad83Smrg  lt_save_CFLAGS=$CFLAGS
73691016ad83Smrg  CC=${FC-"f95"}
73701016ad83Smrg  CFLAGS=$FCFLAGS
73711016ad83Smrg  compiler=$CC
73721016ad83Smrg  GCC=$ac_cv_fc_compiler_gnu
73731016ad83Smrg
73741016ad83Smrg  _LT_TAGVAR(compiler, $1)=$CC
73751016ad83Smrg  _LT_CC_BASENAME([$compiler])
73761016ad83Smrg
73771016ad83Smrg  if test -n "$compiler"; then
73781016ad83Smrg    AC_MSG_CHECKING([if libtool supports shared libraries])
73791016ad83Smrg    AC_MSG_RESULT([$can_build_shared])
73801016ad83Smrg
73811016ad83Smrg    AC_MSG_CHECKING([whether to build shared libraries])
73821016ad83Smrg    test "$can_build_shared" = "no" && enable_shared=no
73831016ad83Smrg
73841016ad83Smrg    # On AIX, shared libraries and static libraries use the same namespace, and
73851016ad83Smrg    # are all built from PIC.
73861016ad83Smrg    case $host_os in
73871016ad83Smrg      aix3*)
73881016ad83Smrg        test "$enable_shared" = yes && enable_static=no
73891016ad83Smrg        if test -n "$RANLIB"; then
73901016ad83Smrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
73911016ad83Smrg          postinstall_cmds='$RANLIB $lib'
73921016ad83Smrg        fi
73931016ad83Smrg        ;;
73941016ad83Smrg      aix[[4-9]]*)
73951016ad83Smrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
73961016ad83Smrg	  test "$enable_shared" = yes && enable_static=no
73971016ad83Smrg	fi
73981016ad83Smrg        ;;
73991016ad83Smrg    esac
74001016ad83Smrg    AC_MSG_RESULT([$enable_shared])
74011016ad83Smrg
74021016ad83Smrg    AC_MSG_CHECKING([whether to build static libraries])
74031016ad83Smrg    # Make sure either enable_shared or enable_static is yes.
74041016ad83Smrg    test "$enable_shared" = yes || enable_static=yes
74051016ad83Smrg    AC_MSG_RESULT([$enable_static])
74061016ad83Smrg
74071016ad83Smrg    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
74081016ad83Smrg    _LT_TAGVAR(LD, $1)="$LD"
74091016ad83Smrg
74101016ad83Smrg    ## CAVEAT EMPTOR:
74111016ad83Smrg    ## There is no encapsulation within the following macros, do not change
74121016ad83Smrg    ## the running order or otherwise move them around unless you know exactly
74131016ad83Smrg    ## what you are doing...
74141016ad83Smrg    _LT_SYS_HIDDEN_LIBDEPS($1)
74151016ad83Smrg    _LT_COMPILER_PIC($1)
74161016ad83Smrg    _LT_COMPILER_C_O($1)
74171016ad83Smrg    _LT_COMPILER_FILE_LOCKS($1)
74181016ad83Smrg    _LT_LINKER_SHLIBS($1)
74191016ad83Smrg    _LT_SYS_DYNAMIC_LINKER($1)
74201016ad83Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
74211016ad83Smrg
74221016ad83Smrg    _LT_CONFIG($1)
74231016ad83Smrg  fi # test -n "$compiler"
74241016ad83Smrg
74251016ad83Smrg  GCC=$lt_save_GCC
74261016ad83Smrg  CC=$lt_save_CC
74271016ad83Smrg  CFLAGS=$lt_save_CFLAGS
74281016ad83Smrgfi # test "$_lt_disable_FC" != yes
74291016ad83Smrg
74301016ad83SmrgAC_LANG_POP
74311016ad83Smrg])# _LT_LANG_FC_CONFIG
74321016ad83Smrg
74331016ad83Smrg
74341016ad83Smrg# _LT_LANG_GCJ_CONFIG([TAG])
74351016ad83Smrg# --------------------------
74361016ad83Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler
74371016ad83Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
74381016ad83Smrg# to write the compiler configuration to `libtool'.
74391016ad83Smrgm4_defun([_LT_LANG_GCJ_CONFIG],
74401016ad83Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl
74411016ad83SmrgAC_LANG_SAVE
74421016ad83Smrg
74431016ad83Smrg# Source file extension for Java test sources.
74441016ad83Smrgac_ext=java
74451016ad83Smrg
74461016ad83Smrg# Object file extension for compiled Java test sources.
74471016ad83Smrgobjext=o
74481016ad83Smrg_LT_TAGVAR(objext, $1)=$objext
74491016ad83Smrg
74501016ad83Smrg# Code to be used in simple compile tests
74511016ad83Smrglt_simple_compile_test_code="class foo {}"
74521016ad83Smrg
74531016ad83Smrg# Code to be used in simple link tests
74541016ad83Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
74551016ad83Smrg
74561016ad83Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
74571016ad83Smrg_LT_TAG_COMPILER
74581016ad83Smrg
74591016ad83Smrg# save warnings/boilerplate of simple test code
74601016ad83Smrg_LT_COMPILER_BOILERPLATE
74611016ad83Smrg_LT_LINKER_BOILERPLATE
74621016ad83Smrg
74631016ad83Smrg# Allow CC to be a program name with arguments.
74641016ad83Smrglt_save_CC=$CC
74651016ad83Smrglt_save_CFLAGS=$CFLAGS
74661016ad83Smrglt_save_GCC=$GCC
74671016ad83SmrgGCC=yes
74681016ad83SmrgCC=${GCJ-"gcj"}
74691016ad83SmrgCFLAGS=$GCJFLAGS
74701016ad83Smrgcompiler=$CC
74711016ad83Smrg_LT_TAGVAR(compiler, $1)=$CC
74721016ad83Smrg_LT_TAGVAR(LD, $1)="$LD"
74731016ad83Smrg_LT_CC_BASENAME([$compiler])
74741016ad83Smrg
74751016ad83Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
74761016ad83Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
74771016ad83Smrg
74781016ad83Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
74791016ad83Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
74801016ad83Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
74811016ad83Smrg
74821016ad83Smrg## CAVEAT EMPTOR:
74831016ad83Smrg## There is no encapsulation within the following macros, do not change
74841016ad83Smrg## the running order or otherwise move them around unless you know exactly
74851016ad83Smrg## what you are doing...
74861016ad83Smrgif test -n "$compiler"; then
74871016ad83Smrg  _LT_COMPILER_NO_RTTI($1)
74881016ad83Smrg  _LT_COMPILER_PIC($1)
74891016ad83Smrg  _LT_COMPILER_C_O($1)
74901016ad83Smrg  _LT_COMPILER_FILE_LOCKS($1)
74911016ad83Smrg  _LT_LINKER_SHLIBS($1)
74921016ad83Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
74931016ad83Smrg
74941016ad83Smrg  _LT_CONFIG($1)
74951016ad83Smrgfi
74961016ad83Smrg
74971016ad83SmrgAC_LANG_RESTORE
74981016ad83Smrg
74991016ad83SmrgGCC=$lt_save_GCC
75001016ad83SmrgCC=$lt_save_CC
75011016ad83SmrgCFLAGS=$lt_save_CFLAGS
75021016ad83Smrg])# _LT_LANG_GCJ_CONFIG
75031016ad83Smrg
75041016ad83Smrg
75051016ad83Smrg# _LT_LANG_GO_CONFIG([TAG])
75061016ad83Smrg# --------------------------
75071016ad83Smrg# Ensure that the configuration variables for the GNU Go compiler
75081016ad83Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
75091016ad83Smrg# to write the compiler configuration to `libtool'.
75101016ad83Smrgm4_defun([_LT_LANG_GO_CONFIG],
75111016ad83Smrg[AC_REQUIRE([LT_PROG_GO])dnl
75121016ad83SmrgAC_LANG_SAVE
75131016ad83Smrg
75141016ad83Smrg# Source file extension for Go test sources.
75151016ad83Smrgac_ext=go
75161016ad83Smrg
75171016ad83Smrg# Object file extension for compiled Go test sources.
75181016ad83Smrgobjext=o
75191016ad83Smrg_LT_TAGVAR(objext, $1)=$objext
75201016ad83Smrg
75211016ad83Smrg# Code to be used in simple compile tests
75221016ad83Smrglt_simple_compile_test_code="package main; func main() { }"
75231016ad83Smrg
75241016ad83Smrg# Code to be used in simple link tests
75251016ad83Smrglt_simple_link_test_code='package main; func main() { }'
75261016ad83Smrg
75271016ad83Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
75281016ad83Smrg_LT_TAG_COMPILER
75291016ad83Smrg
75301016ad83Smrg# save warnings/boilerplate of simple test code
75311016ad83Smrg_LT_COMPILER_BOILERPLATE
75321016ad83Smrg_LT_LINKER_BOILERPLATE
75331016ad83Smrg
75341016ad83Smrg# Allow CC to be a program name with arguments.
75351016ad83Smrglt_save_CC=$CC
75361016ad83Smrglt_save_CFLAGS=$CFLAGS
75371016ad83Smrglt_save_GCC=$GCC
75381016ad83SmrgGCC=yes
75391016ad83SmrgCC=${GOC-"gccgo"}
75401016ad83SmrgCFLAGS=$GOFLAGS
75411016ad83Smrgcompiler=$CC
75421016ad83Smrg_LT_TAGVAR(compiler, $1)=$CC
75431016ad83Smrg_LT_TAGVAR(LD, $1)="$LD"
75441016ad83Smrg_LT_CC_BASENAME([$compiler])
75451016ad83Smrg
75461016ad83Smrg# Go did not exist at the time GCC didn't implicitly link libc in.
75471016ad83Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
75481016ad83Smrg
75491016ad83Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
75501016ad83Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
75511016ad83Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
75521016ad83Smrg
75531016ad83Smrg## CAVEAT EMPTOR:
75541016ad83Smrg## There is no encapsulation within the following macros, do not change
75551016ad83Smrg## the running order or otherwise move them around unless you know exactly
75561016ad83Smrg## what you are doing...
75571016ad83Smrgif test -n "$compiler"; then
75581016ad83Smrg  _LT_COMPILER_NO_RTTI($1)
75591016ad83Smrg  _LT_COMPILER_PIC($1)
75601016ad83Smrg  _LT_COMPILER_C_O($1)
75611016ad83Smrg  _LT_COMPILER_FILE_LOCKS($1)
75621016ad83Smrg  _LT_LINKER_SHLIBS($1)
75631016ad83Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
75641016ad83Smrg
75651016ad83Smrg  _LT_CONFIG($1)
75661016ad83Smrgfi
75671016ad83Smrg
75681016ad83SmrgAC_LANG_RESTORE
75691016ad83Smrg
75701016ad83SmrgGCC=$lt_save_GCC
75711016ad83SmrgCC=$lt_save_CC
75721016ad83SmrgCFLAGS=$lt_save_CFLAGS
75731016ad83Smrg])# _LT_LANG_GO_CONFIG
75741016ad83Smrg
75751016ad83Smrg
75761016ad83Smrg# _LT_LANG_RC_CONFIG([TAG])
75771016ad83Smrg# -------------------------
75781016ad83Smrg# Ensure that the configuration variables for the Windows resource compiler
75791016ad83Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
75801016ad83Smrg# to write the compiler configuration to `libtool'.
75811016ad83Smrgm4_defun([_LT_LANG_RC_CONFIG],
75821016ad83Smrg[AC_REQUIRE([LT_PROG_RC])dnl
75831016ad83SmrgAC_LANG_SAVE
75841016ad83Smrg
75851016ad83Smrg# Source file extension for RC test sources.
75861016ad83Smrgac_ext=rc
75871016ad83Smrg
75881016ad83Smrg# Object file extension for compiled RC test sources.
75891016ad83Smrgobjext=o
75901016ad83Smrg_LT_TAGVAR(objext, $1)=$objext
75911016ad83Smrg
75921016ad83Smrg# Code to be used in simple compile tests
75931016ad83Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
75941016ad83Smrg
75951016ad83Smrg# Code to be used in simple link tests
75961016ad83Smrglt_simple_link_test_code="$lt_simple_compile_test_code"
75971016ad83Smrg
75981016ad83Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
75991016ad83Smrg_LT_TAG_COMPILER
76001016ad83Smrg
76011016ad83Smrg# save warnings/boilerplate of simple test code
76021016ad83Smrg_LT_COMPILER_BOILERPLATE
76031016ad83Smrg_LT_LINKER_BOILERPLATE
76041016ad83Smrg
76051016ad83Smrg# Allow CC to be a program name with arguments.
76061016ad83Smrglt_save_CC="$CC"
76071016ad83Smrglt_save_CFLAGS=$CFLAGS
76081016ad83Smrglt_save_GCC=$GCC
76091016ad83SmrgGCC=
76101016ad83SmrgCC=${RC-"windres"}
76111016ad83SmrgCFLAGS=
76121016ad83Smrgcompiler=$CC
76131016ad83Smrg_LT_TAGVAR(compiler, $1)=$CC
76141016ad83Smrg_LT_CC_BASENAME([$compiler])
76151016ad83Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
76161016ad83Smrg
76171016ad83Smrgif test -n "$compiler"; then
76181016ad83Smrg  :
76191016ad83Smrg  _LT_CONFIG($1)
76201016ad83Smrgfi
76211016ad83Smrg
76221016ad83SmrgGCC=$lt_save_GCC
76231016ad83SmrgAC_LANG_RESTORE
76241016ad83SmrgCC=$lt_save_CC
76251016ad83SmrgCFLAGS=$lt_save_CFLAGS
76261016ad83Smrg])# _LT_LANG_RC_CONFIG
76271016ad83Smrg
76281016ad83Smrg
76291016ad83Smrg# LT_PROG_GCJ
76301016ad83Smrg# -----------
76311016ad83SmrgAC_DEFUN([LT_PROG_GCJ],
76321016ad83Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
76331016ad83Smrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
76341016ad83Smrg    [AC_CHECK_TOOL(GCJ, gcj,)
76351016ad83Smrg      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
76361016ad83Smrg      AC_SUBST(GCJFLAGS)])])[]dnl
76371016ad83Smrg])
76381016ad83Smrg
76391016ad83Smrg# Old name:
76401016ad83SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
76411016ad83Smrgdnl aclocal-1.4 backwards compatibility:
76421016ad83Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
76431016ad83Smrg
76441016ad83Smrg
76451016ad83Smrg# LT_PROG_GO
76461016ad83Smrg# ----------
76471016ad83SmrgAC_DEFUN([LT_PROG_GO],
76481016ad83Smrg[AC_CHECK_TOOL(GOC, gccgo,)
76491016ad83Smrg])
76501016ad83Smrg
76511016ad83Smrg
76521016ad83Smrg# LT_PROG_RC
76531016ad83Smrg# ----------
76541016ad83SmrgAC_DEFUN([LT_PROG_RC],
76551016ad83Smrg[AC_CHECK_TOOL(RC, windres,)
76561016ad83Smrg])
76571016ad83Smrg
76581016ad83Smrg# Old name:
76591016ad83SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
76601016ad83Smrgdnl aclocal-1.4 backwards compatibility:
76611016ad83Smrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
76621016ad83Smrg
76631016ad83Smrg
76641016ad83Smrg# _LT_DECL_EGREP
76651016ad83Smrg# --------------
76661016ad83Smrg# If we don't have a new enough Autoconf to choose the best grep
76671016ad83Smrg# available, choose the one first in the user's PATH.
76681016ad83Smrgm4_defun([_LT_DECL_EGREP],
76691016ad83Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
76701016ad83SmrgAC_REQUIRE([AC_PROG_FGREP])dnl
76711016ad83Smrgtest -z "$GREP" && GREP=grep
76721016ad83Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
76731016ad83Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
76741016ad83Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
76751016ad83Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
76761016ad83SmrgAC_SUBST([GREP])
76771016ad83Smrg])
76781016ad83Smrg
76791016ad83Smrg
76801016ad83Smrg# _LT_DECL_OBJDUMP
76811016ad83Smrg# --------------
76821016ad83Smrg# If we don't have a new enough Autoconf to choose the best objdump
76831016ad83Smrg# available, choose the one first in the user's PATH.
76841016ad83Smrgm4_defun([_LT_DECL_OBJDUMP],
76851016ad83Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
76861016ad83Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
76871016ad83Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
76881016ad83SmrgAC_SUBST([OBJDUMP])
76891016ad83Smrg])
76901016ad83Smrg
76911016ad83Smrg# _LT_DECL_DLLTOOL
76921016ad83Smrg# ----------------
76931016ad83Smrg# Ensure DLLTOOL variable is set.
76941016ad83Smrgm4_defun([_LT_DECL_DLLTOOL],
76951016ad83Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
76961016ad83Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
76971016ad83Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
76981016ad83SmrgAC_SUBST([DLLTOOL])
76991016ad83Smrg])
77001016ad83Smrg
77011016ad83Smrg# _LT_DECL_SED
77021016ad83Smrg# ------------
77031016ad83Smrg# Check for a fully-functional sed program, that truncates
77041016ad83Smrg# as few characters as possible.  Prefer GNU sed if found.
77051016ad83Smrgm4_defun([_LT_DECL_SED],
77061016ad83Smrg[AC_PROG_SED
77071016ad83Smrgtest -z "$SED" && SED=sed
77081016ad83SmrgXsed="$SED -e 1s/^X//"
77091016ad83Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
77101016ad83Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
77111016ad83Smrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
77121016ad83Smrg])# _LT_DECL_SED
77131016ad83Smrg
77141016ad83Smrgm4_ifndef([AC_PROG_SED], [
77151016ad83Smrg############################################################
77161016ad83Smrg# NOTE: This macro has been submitted for inclusion into   #
77171016ad83Smrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
77181016ad83Smrg#  a released version of Autoconf we should remove this    #
77191016ad83Smrg#  macro and use it instead.                               #
77201016ad83Smrg############################################################
77211016ad83Smrg
77221016ad83Smrgm4_defun([AC_PROG_SED],
77231016ad83Smrg[AC_MSG_CHECKING([for a sed that does not truncate output])
77241016ad83SmrgAC_CACHE_VAL(lt_cv_path_SED,
77251016ad83Smrg[# Loop through the user's path and test for sed and gsed.
77261016ad83Smrg# Then use that list of sed's as ones to test for truncation.
77271016ad83Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
77281016ad83Smrgfor as_dir in $PATH
77291016ad83Smrgdo
77301016ad83Smrg  IFS=$as_save_IFS
77311016ad83Smrg  test -z "$as_dir" && as_dir=.
77321016ad83Smrg  for lt_ac_prog in sed gsed; do
77331016ad83Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
77341016ad83Smrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
77351016ad83Smrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
77361016ad83Smrg      fi
77371016ad83Smrg    done
77381016ad83Smrg  done
77391016ad83Smrgdone
77401016ad83SmrgIFS=$as_save_IFS
77411016ad83Smrglt_ac_max=0
77421016ad83Smrglt_ac_count=0
77431016ad83Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
77441016ad83Smrg# along with /bin/sed that truncates output.
77451016ad83Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
77461016ad83Smrg  test ! -f $lt_ac_sed && continue
77471016ad83Smrg  cat /dev/null > conftest.in
77481016ad83Smrg  lt_ac_count=0
77491016ad83Smrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
77501016ad83Smrg  # Check for GNU sed and select it if it is found.
77511016ad83Smrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
77521016ad83Smrg    lt_cv_path_SED=$lt_ac_sed
77531016ad83Smrg    break
77541016ad83Smrg  fi
77551016ad83Smrg  while true; do
77561016ad83Smrg    cat conftest.in conftest.in >conftest.tmp
77571016ad83Smrg    mv conftest.tmp conftest.in
77581016ad83Smrg    cp conftest.in conftest.nl
77591016ad83Smrg    echo >>conftest.nl
77601016ad83Smrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
77611016ad83Smrg    cmp -s conftest.out conftest.nl || break
77621016ad83Smrg    # 10000 chars as input seems more than enough
77631016ad83Smrg    test $lt_ac_count -gt 10 && break
77641016ad83Smrg    lt_ac_count=`expr $lt_ac_count + 1`
77651016ad83Smrg    if test $lt_ac_count -gt $lt_ac_max; then
77661016ad83Smrg      lt_ac_max=$lt_ac_count
77671016ad83Smrg      lt_cv_path_SED=$lt_ac_sed
77681016ad83Smrg    fi
77691016ad83Smrg  done
77701016ad83Smrgdone
77711016ad83Smrg])
77721016ad83SmrgSED=$lt_cv_path_SED
77731016ad83SmrgAC_SUBST([SED])
77741016ad83SmrgAC_MSG_RESULT([$SED])
77751016ad83Smrg])#AC_PROG_SED
77761016ad83Smrg])#m4_ifndef
77771016ad83Smrg
77781016ad83Smrg# Old name:
77791016ad83SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
77801016ad83Smrgdnl aclocal-1.4 backwards compatibility:
77811016ad83Smrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
77821016ad83Smrg
77831016ad83Smrg
77841016ad83Smrg# _LT_CHECK_SHELL_FEATURES
77851016ad83Smrg# ------------------------
77861016ad83Smrg# Find out whether the shell is Bourne or XSI compatible,
77871016ad83Smrg# or has some other useful features.
77881016ad83Smrgm4_defun([_LT_CHECK_SHELL_FEATURES],
77891016ad83Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
77901016ad83Smrg# Try some XSI features
77911016ad83Smrgxsi_shell=no
77921016ad83Smrg( _lt_dummy="a/b/c"
77931016ad83Smrg  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
77941016ad83Smrg      = c,a/b,b/c, \
77951016ad83Smrg    && eval 'test $(( 1 + 1 )) -eq 2 \
77961016ad83Smrg    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
77971016ad83Smrg  && xsi_shell=yes
77981016ad83SmrgAC_MSG_RESULT([$xsi_shell])
77991016ad83Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
78001016ad83Smrg
78011016ad83SmrgAC_MSG_CHECKING([whether the shell understands "+="])
78021016ad83Smrglt_shell_append=no
78031016ad83Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
78041016ad83Smrg    >/dev/null 2>&1 \
78051016ad83Smrg  && lt_shell_append=yes
78061016ad83SmrgAC_MSG_RESULT([$lt_shell_append])
78071016ad83Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
78081016ad83Smrg
78091016ad83Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
78101016ad83Smrg  lt_unset=unset
78111016ad83Smrgelse
78121016ad83Smrg  lt_unset=false
78131016ad83Smrgfi
78141016ad83Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
78151016ad83Smrg
78161016ad83Smrg# test EBCDIC or ASCII
78171016ad83Smrgcase `echo X|tr X '\101'` in
78181016ad83Smrg A) # ASCII based system
78191016ad83Smrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
78201016ad83Smrg  lt_SP2NL='tr \040 \012'
78211016ad83Smrg  lt_NL2SP='tr \015\012 \040\040'
78221016ad83Smrg  ;;
78231016ad83Smrg *) # EBCDIC based system
78241016ad83Smrg  lt_SP2NL='tr \100 \n'
78251016ad83Smrg  lt_NL2SP='tr \r\n \100\100'
78261016ad83Smrg  ;;
78271016ad83Smrgesac
78281016ad83Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
78291016ad83Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
78301016ad83Smrg])# _LT_CHECK_SHELL_FEATURES
78311016ad83Smrg
78321016ad83Smrg
78331016ad83Smrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
78341016ad83Smrg# ------------------------------------------------------
78351016ad83Smrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
78361016ad83Smrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
78371016ad83Smrgm4_defun([_LT_PROG_FUNCTION_REPLACE],
78381016ad83Smrg[dnl {
78391016ad83Smrgsed -e '/^$1 ()$/,/^} # $1 /c\
78401016ad83Smrg$1 ()\
78411016ad83Smrg{\
78421016ad83Smrgm4_bpatsubsts([$2], [$], [\\], [^\([	 ]\)], [\\\1])
78431016ad83Smrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
78441016ad83Smrg  && mv -f "$cfgfile.tmp" "$cfgfile" \
78451016ad83Smrg    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
78461016ad83Smrgtest 0 -eq $? || _lt_function_replace_fail=:
78471016ad83Smrg])
78481016ad83Smrg
78491016ad83Smrg
78501016ad83Smrg# _LT_PROG_REPLACE_SHELLFNS
78511016ad83Smrg# -------------------------
78521016ad83Smrg# Replace existing portable implementations of several shell functions with
78531016ad83Smrg# equivalent extended shell implementations where those features are available..
78541016ad83Smrgm4_defun([_LT_PROG_REPLACE_SHELLFNS],
78551016ad83Smrg[if test x"$xsi_shell" = xyes; then
78561016ad83Smrg  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
78571016ad83Smrg    case ${1} in
78581016ad83Smrg      */*) func_dirname_result="${1%/*}${2}" ;;
78591016ad83Smrg      *  ) func_dirname_result="${3}" ;;
78601016ad83Smrg    esac])
78611016ad83Smrg
78621016ad83Smrg  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
78631016ad83Smrg    func_basename_result="${1##*/}"])
78641016ad83Smrg
78651016ad83Smrg  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
78661016ad83Smrg    case ${1} in
78671016ad83Smrg      */*) func_dirname_result="${1%/*}${2}" ;;
78681016ad83Smrg      *  ) func_dirname_result="${3}" ;;
78691016ad83Smrg    esac
78701016ad83Smrg    func_basename_result="${1##*/}"])
78711016ad83Smrg
78721016ad83Smrg  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
78731016ad83Smrg    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
78741016ad83Smrg    # positional parameters, so assign one to ordinary parameter first.
78751016ad83Smrg    func_stripname_result=${3}
78761016ad83Smrg    func_stripname_result=${func_stripname_result#"${1}"}
78771016ad83Smrg    func_stripname_result=${func_stripname_result%"${2}"}])
78781016ad83Smrg
78791016ad83Smrg  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
78801016ad83Smrg    func_split_long_opt_name=${1%%=*}
78811016ad83Smrg    func_split_long_opt_arg=${1#*=}])
78821016ad83Smrg
78831016ad83Smrg  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
78841016ad83Smrg    func_split_short_opt_arg=${1#??}
78851016ad83Smrg    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
78861016ad83Smrg
78871016ad83Smrg  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
78881016ad83Smrg    case ${1} in
78891016ad83Smrg      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
78901016ad83Smrg      *)    func_lo2o_result=${1} ;;
78911016ad83Smrg    esac])
78921016ad83Smrg
78931016ad83Smrg  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
78941016ad83Smrg
78951016ad83Smrg  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
78961016ad83Smrg
78971016ad83Smrg  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
78981016ad83Smrgfi
78991016ad83Smrg
79001016ad83Smrgif test x"$lt_shell_append" = xyes; then
79011016ad83Smrg  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
79021016ad83Smrg
79031016ad83Smrg  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
79041016ad83Smrg    func_quote_for_eval "${2}"
79051016ad83Smrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
79061016ad83Smrg    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
79071016ad83Smrg
79081016ad83Smrg  # Save a `func_append' function call where possible by direct use of '+='
79091016ad83Smrg  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
79101016ad83Smrg    && mv -f "$cfgfile.tmp" "$cfgfile" \
79111016ad83Smrg      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
79121016ad83Smrg  test 0 -eq $? || _lt_function_replace_fail=:
79131016ad83Smrgelse
79141016ad83Smrg  # Save a `func_append' function call even when '+=' is not available
79151016ad83Smrg  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
79161016ad83Smrg    && mv -f "$cfgfile.tmp" "$cfgfile" \
79171016ad83Smrg      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
79181016ad83Smrg  test 0 -eq $? || _lt_function_replace_fail=:
79191016ad83Smrgfi
79201016ad83Smrg
79211016ad83Smrgif test x"$_lt_function_replace_fail" = x":"; then
79221016ad83Smrg  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
79231016ad83Smrgfi
79241016ad83Smrg])
79251016ad83Smrg
79261016ad83Smrg# _LT_PATH_CONVERSION_FUNCTIONS
79271016ad83Smrg# -----------------------------
79281016ad83Smrg# Determine which file name conversion functions should be used by
79291016ad83Smrg# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
79301016ad83Smrg# for certain cross-compile configurations and native mingw.
79311016ad83Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
79321016ad83Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
79331016ad83SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
79341016ad83SmrgAC_MSG_CHECKING([how to convert $build file names to $host format])
79351016ad83SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd,
79361016ad83Smrg[case $host in
79371016ad83Smrg  *-*-mingw* )
79381016ad83Smrg    case $build in
79391016ad83Smrg      *-*-mingw* ) # actually msys
79401016ad83Smrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
79411016ad83Smrg        ;;
79421016ad83Smrg      *-*-cygwin* )
79431016ad83Smrg        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
79441016ad83Smrg        ;;
79451016ad83Smrg      * ) # otherwise, assume *nix
79461016ad83Smrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
79471016ad83Smrg        ;;
79481016ad83Smrg    esac
79491016ad83Smrg    ;;
79501016ad83Smrg  *-*-cygwin* )
79511016ad83Smrg    case $build in
79521016ad83Smrg      *-*-mingw* ) # actually msys
79531016ad83Smrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
79541016ad83Smrg        ;;
79551016ad83Smrg      *-*-cygwin* )
79561016ad83Smrg        lt_cv_to_host_file_cmd=func_convert_file_noop
79571016ad83Smrg        ;;
79581016ad83Smrg      * ) # otherwise, assume *nix
79591016ad83Smrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
79601016ad83Smrg        ;;
79611016ad83Smrg    esac
79621016ad83Smrg    ;;
79631016ad83Smrg  * ) # unhandled hosts (and "normal" native builds)
79641016ad83Smrg    lt_cv_to_host_file_cmd=func_convert_file_noop
79651016ad83Smrg    ;;
79661016ad83Smrgesac
79671016ad83Smrg])
79681016ad83Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd
79691016ad83SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd])
79701016ad83Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
79711016ad83Smrg         [0], [convert $build file names to $host format])dnl
79721016ad83Smrg
79731016ad83SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format])
79741016ad83SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd,
79751016ad83Smrg[#assume ordinary cross tools, or native build.
79761016ad83Smrglt_cv_to_tool_file_cmd=func_convert_file_noop
79771016ad83Smrgcase $host in
79781016ad83Smrg  *-*-mingw* )
79791016ad83Smrg    case $build in
79801016ad83Smrg      *-*-mingw* ) # actually msys
79811016ad83Smrg        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
79821016ad83Smrg        ;;
79831016ad83Smrg    esac
79841016ad83Smrg    ;;
79851016ad83Smrgesac
79861016ad83Smrg])
79871016ad83Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd
79881016ad83SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
79891016ad83Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
79901016ad83Smrg         [0], [convert $build files to toolchain format])dnl
79911016ad83Smrg])# _LT_PATH_CONVERSION_FUNCTIONS
7992