libtool.m4 revision edce3322
19f00f3a1Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
29f00f3a1Smrg#
3edce3322Smrg#   Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
49f00f3a1Smrg#   Written by Gordon Matzigkeit, 1996
59f00f3a1Smrg#
69f00f3a1Smrg# This file is free software; the Free Software Foundation gives
79f00f3a1Smrg# unlimited permission to copy and/or distribute it, with or without
89f00f3a1Smrg# modifications, as long as this notice is preserved.
99f00f3a1Smrg
109f00f3a1Smrgm4_define([_LT_COPYING], [dnl
11edce3322Smrg# Copyright (C) 2014 Free Software Foundation, Inc.
12edce3322Smrg# This is free software; see the source for copying conditions.  There is NO
13edce3322Smrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14edce3322Smrg
15edce3322Smrg# GNU Libtool is free software; you can redistribute it and/or modify
16edce3322Smrg# it under the terms of the GNU General Public License as published by
17edce3322Smrg# the Free Software Foundation; either version 2 of of the License, or
18edce3322Smrg# (at your option) any later version.
199f00f3a1Smrg#
20edce3322Smrg# As a special exception to the GNU General Public License, if you
21edce3322Smrg# distribute this file as part of a program or library that is built
22edce3322Smrg# using GNU Libtool, you may include this file under the  same
23edce3322Smrg# distribution terms that you use for the rest of that program.
249f00f3a1Smrg#
25edce3322Smrg# GNU Libtool is distributed in the hope that it will be useful, but
26edce3322Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
279f00f3a1Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
289f00f3a1Smrg# GNU General Public License for more details.
299f00f3a1Smrg#
309f00f3a1Smrg# You should have received a copy of the GNU General Public License
31edce3322Smrg# along with this program.  If not, see <http://www.gnu.org/licenses/>.
329f00f3a1Smrg])
339f00f3a1Smrg
34edce3322Smrg# serial 58 LT_INIT
359f00f3a1Smrg
369f00f3a1Smrg
379f00f3a1Smrg# LT_PREREQ(VERSION)
389f00f3a1Smrg# ------------------
399f00f3a1Smrg# Complain and exit if this libtool version is less that VERSION.
409f00f3a1Smrgm4_defun([LT_PREREQ],
419f00f3a1Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
429f00f3a1Smrg       [m4_default([$3],
439f00f3a1Smrg		   [m4_fatal([Libtool version $1 or higher is required],
449f00f3a1Smrg		             63)])],
459f00f3a1Smrg       [$2])])
469f00f3a1Smrg
479f00f3a1Smrg
489f00f3a1Smrg# _LT_CHECK_BUILDDIR
499f00f3a1Smrg# ------------------
509f00f3a1Smrg# Complain if the absolute build directory name contains unusual characters
519f00f3a1Smrgm4_defun([_LT_CHECK_BUILDDIR],
529f00f3a1Smrg[case `pwd` in
539f00f3a1Smrg  *\ * | *\	*)
549f00f3a1Smrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
559f00f3a1Smrgesac
569f00f3a1Smrg])
579f00f3a1Smrg
589f00f3a1Smrg
599f00f3a1Smrg# LT_INIT([OPTIONS])
609f00f3a1Smrg# ------------------
619f00f3a1SmrgAC_DEFUN([LT_INIT],
62edce3322Smrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
639f00f3a1SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
649f00f3a1SmrgAC_BEFORE([$0], [LT_LANG])dnl
659f00f3a1SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
669f00f3a1SmrgAC_BEFORE([$0], [LTDL_INIT])dnl
679f00f3a1Smrgm4_require([_LT_CHECK_BUILDDIR])dnl
689f00f3a1Smrg
699f00f3a1Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
709f00f3a1Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
719f00f3a1Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
729f00f3a1Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
739f00f3a1Smrgdnl unless we require an AC_DEFUNed macro:
749f00f3a1SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
759f00f3a1SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
769f00f3a1SmrgAC_REQUIRE([LTVERSION_VERSION])dnl
779f00f3a1SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
789f00f3a1Smrgm4_require([_LT_PROG_LTMAIN])dnl
799f00f3a1Smrg
809f00f3a1Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
819f00f3a1Smrg
829f00f3a1Smrgdnl Parse OPTIONS
839f00f3a1Smrg_LT_SET_OPTIONS([$0], [$1])
849f00f3a1Smrg
859f00f3a1Smrg# This can be used to rebuild libtool when needed
86edce3322SmrgLIBTOOL_DEPS=$ltmain
879f00f3a1Smrg
889f00f3a1Smrg# Always use our own libtool.
899f00f3a1SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
909f00f3a1SmrgAC_SUBST(LIBTOOL)dnl
919f00f3a1Smrg
929f00f3a1Smrg_LT_SETUP
939f00f3a1Smrg
949f00f3a1Smrg# Only expand once:
959f00f3a1Smrgm4_define([LT_INIT])
969f00f3a1Smrg])# LT_INIT
979f00f3a1Smrg
989f00f3a1Smrg# Old names:
999f00f3a1SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1009f00f3a1SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1019f00f3a1Smrgdnl aclocal-1.4 backwards compatibility:
1029f00f3a1Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1039f00f3a1Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1049f00f3a1Smrg
1059f00f3a1Smrg
106edce3322Smrg# _LT_PREPARE_CC_BASENAME
107edce3322Smrg# -----------------------
108edce3322Smrgm4_defun([_LT_PREPARE_CC_BASENAME], [
109edce3322Smrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
110edce3322Smrgfunc_cc_basename ()
111edce3322Smrg{
112edce3322Smrg    for cc_temp in @S|@*""; do
113edce3322Smrg      case $cc_temp in
114edce3322Smrg        compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
115edce3322Smrg        distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
116edce3322Smrg        \-*) ;;
117edce3322Smrg        *) break;;
118edce3322Smrg      esac
119edce3322Smrg    done
120edce3322Smrg    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
121edce3322Smrg}
122edce3322Smrg])# _LT_PREPARE_CC_BASENAME
123edce3322Smrg
124edce3322Smrg
1259f00f3a1Smrg# _LT_CC_BASENAME(CC)
1269f00f3a1Smrg# -------------------
127edce3322Smrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
128edce3322Smrg# but that macro is also expanded into generated libtool script, which
129edce3322Smrg# arranges for $SED and $ECHO to be set by different means.
1309f00f3a1Smrgm4_defun([_LT_CC_BASENAME],
131edce3322Smrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl
132edce3322SmrgAC_REQUIRE([_LT_DECL_SED])dnl
133edce3322SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
134edce3322Smrgfunc_cc_basename $1
135edce3322Smrgcc_basename=$func_cc_basename_result
1369f00f3a1Smrg])
1379f00f3a1Smrg
1389f00f3a1Smrg
1399f00f3a1Smrg# _LT_FILEUTILS_DEFAULTS
1409f00f3a1Smrg# ----------------------
1419f00f3a1Smrg# It is okay to use these file commands and assume they have been set
142edce3322Smrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
1439f00f3a1Smrgm4_defun([_LT_FILEUTILS_DEFAULTS],
1449f00f3a1Smrg[: ${CP="cp -f"}
1459f00f3a1Smrg: ${MV="mv -f"}
1469f00f3a1Smrg: ${RM="rm -f"}
1479f00f3a1Smrg])# _LT_FILEUTILS_DEFAULTS
1489f00f3a1Smrg
1499f00f3a1Smrg
1509f00f3a1Smrg# _LT_SETUP
1519f00f3a1Smrg# ---------
1529f00f3a1Smrgm4_defun([_LT_SETUP],
1539f00f3a1Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1549f00f3a1SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
1559f00f3a1SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
1569f00f3a1SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1579f00f3a1Smrg
1589f00f3a1Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
1599f00f3a1Smrgdnl
1609f00f3a1Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl
1619f00f3a1Smrg_LT_DECL([], [host], [0])dnl
1629f00f3a1Smrg_LT_DECL([], [host_os], [0])dnl
1639f00f3a1Smrgdnl
1649f00f3a1Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl
1659f00f3a1Smrg_LT_DECL([], [build], [0])dnl
1669f00f3a1Smrg_LT_DECL([], [build_os], [0])dnl
1679f00f3a1Smrgdnl
1689f00f3a1SmrgAC_REQUIRE([AC_PROG_CC])dnl
1699f00f3a1SmrgAC_REQUIRE([LT_PATH_LD])dnl
1709f00f3a1SmrgAC_REQUIRE([LT_PATH_NM])dnl
1719f00f3a1Smrgdnl
1729f00f3a1SmrgAC_REQUIRE([AC_PROG_LN_S])dnl
1739f00f3a1Smrgtest -z "$LN_S" && LN_S="ln -s"
1749f00f3a1Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1759f00f3a1Smrgdnl
1769f00f3a1SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
1779f00f3a1Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1789f00f3a1Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1799f00f3a1Smrgdnl
1809f00f3a1Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
1819f00f3a1Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
1829f00f3a1Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
1839f00f3a1Smrgm4_require([_LT_CMD_RELOAD])dnl
1849f00f3a1Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
1859f00f3a1Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
1869f00f3a1Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
1879f00f3a1Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1889f00f3a1Smrgm4_require([_LT_WITH_SYSROOT])dnl
189edce3322Smrgm4_require([_LT_CMD_TRUNCATE])dnl
1909f00f3a1Smrg
1919f00f3a1Smrg_LT_CONFIG_LIBTOOL_INIT([
192edce3322Smrg# See if we are running on zsh, and set the options that allow our
1939f00f3a1Smrg# commands through without removal of \ escapes INIT.
194edce3322Smrgif test -n "\${ZSH_VERSION+set}"; then
1959f00f3a1Smrg   setopt NO_GLOB_SUBST
1969f00f3a1Smrgfi
1979f00f3a1Smrg])
198edce3322Smrgif test -n "${ZSH_VERSION+set}"; then
1999f00f3a1Smrg   setopt NO_GLOB_SUBST
2009f00f3a1Smrgfi
2019f00f3a1Smrg
2029f00f3a1Smrg_LT_CHECK_OBJDIR
2039f00f3a1Smrg
2049f00f3a1Smrgm4_require([_LT_TAG_COMPILER])dnl
2059f00f3a1Smrg
2069f00f3a1Smrgcase $host_os in
2079f00f3a1Smrgaix3*)
2089f00f3a1Smrg  # AIX sometimes has problems with the GCC collect2 program.  For some
2099f00f3a1Smrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
2109f00f3a1Smrg  # vanish in a puff of smoke.
211edce3322Smrg  if test set != "${COLLECT_NAMES+set}"; then
2129f00f3a1Smrg    COLLECT_NAMES=
2139f00f3a1Smrg    export COLLECT_NAMES
2149f00f3a1Smrg  fi
2159f00f3a1Smrg  ;;
2169f00f3a1Smrgesac
2179f00f3a1Smrg
2189f00f3a1Smrg# Global variables:
2199f00f3a1Smrgofile=libtool
2209f00f3a1Smrgcan_build_shared=yes
2219f00f3a1Smrg
222edce3322Smrg# All known linkers require a '.a' archive for static linking (except MSVC,
2239f00f3a1Smrg# which needs '.lib').
2249f00f3a1Smrglibext=a
2259f00f3a1Smrg
226edce3322Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
2279f00f3a1Smrg
228edce3322Smrgold_CC=$CC
229edce3322Smrgold_CFLAGS=$CFLAGS
2309f00f3a1Smrg
2319f00f3a1Smrg# Set sane defaults for various variables
2329f00f3a1Smrgtest -z "$CC" && CC=cc
2339f00f3a1Smrgtest -z "$LTCC" && LTCC=$CC
2349f00f3a1Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
2359f00f3a1Smrgtest -z "$LD" && LD=ld
2369f00f3a1Smrgtest -z "$ac_objext" && ac_objext=o
2379f00f3a1Smrg
2389f00f3a1Smrg_LT_CC_BASENAME([$compiler])
2399f00f3a1Smrg
2409f00f3a1Smrg# Only perform the check for file, if the check method requires it
2419f00f3a1Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
2429f00f3a1Smrgcase $deplibs_check_method in
2439f00f3a1Smrgfile_magic*)
2449f00f3a1Smrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2459f00f3a1Smrg    _LT_PATH_MAGIC
2469f00f3a1Smrg  fi
2479f00f3a1Smrg  ;;
2489f00f3a1Smrgesac
2499f00f3a1Smrg
2509f00f3a1Smrg# Use C for the default configuration in the libtool script
2519f00f3a1SmrgLT_SUPPORTED_TAG([CC])
2529f00f3a1Smrg_LT_LANG_C_CONFIG
2539f00f3a1Smrg_LT_LANG_DEFAULT_CONFIG
2549f00f3a1Smrg_LT_CONFIG_COMMANDS
2559f00f3a1Smrg])# _LT_SETUP
2569f00f3a1Smrg
2579f00f3a1Smrg
2589f00f3a1Smrg# _LT_PREPARE_SED_QUOTE_VARS
2599f00f3a1Smrg# --------------------------
2609f00f3a1Smrg# Define a few sed substitution that help us do robust quoting.
2619f00f3a1Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS],
2629f00f3a1Smrg[# Backslashify metacharacters that are still active within
2639f00f3a1Smrg# double-quoted strings.
2649f00f3a1Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
2659f00f3a1Smrg
2669f00f3a1Smrg# Same as above, but do not quote variable references.
2679f00f3a1Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
2689f00f3a1Smrg
2699f00f3a1Smrg# Sed substitution to delay expansion of an escaped shell variable in a
2709f00f3a1Smrg# double_quote_subst'ed string.
2719f00f3a1Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
2729f00f3a1Smrg
2739f00f3a1Smrg# Sed substitution to delay expansion of an escaped single quote.
2749f00f3a1Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
2759f00f3a1Smrg
2769f00f3a1Smrg# Sed substitution to avoid accidental globbing in evaled expressions
2779f00f3a1Smrgno_glob_subst='s/\*/\\\*/g'
2789f00f3a1Smrg])
2799f00f3a1Smrg
2809f00f3a1Smrg# _LT_PROG_LTMAIN
2819f00f3a1Smrg# ---------------
282edce3322Smrg# Note that this code is called both from 'configure', and 'config.status'
2839f00f3a1Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
284edce3322Smrg# 'config.status' has no value for ac_aux_dir unless we are using Automake,
2859f00f3a1Smrg# so we pass a copy along to make sure it has a sensible value anyway.
2869f00f3a1Smrgm4_defun([_LT_PROG_LTMAIN],
2879f00f3a1Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
2889f00f3a1Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
289edce3322Smrgltmain=$ac_aux_dir/ltmain.sh
2909f00f3a1Smrg])# _LT_PROG_LTMAIN
2919f00f3a1Smrg
2929f00f3a1Smrg
2939f00f3a1Smrg## ------------------------------------- ##
2949f00f3a1Smrg## Accumulate code for creating libtool. ##
2959f00f3a1Smrg## ------------------------------------- ##
2969f00f3a1Smrg
2979f00f3a1Smrg# So that we can recreate a full libtool script including additional
2989f00f3a1Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
299edce3322Smrg# in macros and then make a single call at the end using the 'libtool'
3009f00f3a1Smrg# label.
3019f00f3a1Smrg
3029f00f3a1Smrg
3039f00f3a1Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
3049f00f3a1Smrg# ----------------------------------------
3059f00f3a1Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
3069f00f3a1Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
3079f00f3a1Smrg[m4_ifval([$1],
3089f00f3a1Smrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
3099f00f3a1Smrg                     [$1
3109f00f3a1Smrg])])])
3119f00f3a1Smrg
3129f00f3a1Smrg# Initialize.
3139f00f3a1Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
3149f00f3a1Smrg
3159f00f3a1Smrg
3169f00f3a1Smrg# _LT_CONFIG_LIBTOOL([COMMANDS])
3179f00f3a1Smrg# ------------------------------
3189f00f3a1Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
3199f00f3a1Smrgm4_define([_LT_CONFIG_LIBTOOL],
3209f00f3a1Smrg[m4_ifval([$1],
3219f00f3a1Smrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
3229f00f3a1Smrg                     [$1
3239f00f3a1Smrg])])])
3249f00f3a1Smrg
3259f00f3a1Smrg# Initialize.
3269f00f3a1Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
3279f00f3a1Smrg
3289f00f3a1Smrg
3299f00f3a1Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
3309f00f3a1Smrg# -----------------------------------------------------
3319f00f3a1Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
3329f00f3a1Smrg[_LT_CONFIG_LIBTOOL([$1])
3339f00f3a1Smrg_LT_CONFIG_LIBTOOL_INIT([$2])
3349f00f3a1Smrg])
3359f00f3a1Smrg
3369f00f3a1Smrg
3379f00f3a1Smrg# _LT_FORMAT_COMMENT([COMMENT])
3389f00f3a1Smrg# -----------------------------
3399f00f3a1Smrg# Add leading comment marks to the start of each line, and a trailing
3409f00f3a1Smrg# full-stop to the whole comment if one is not present already.
3419f00f3a1Smrgm4_define([_LT_FORMAT_COMMENT],
3429f00f3a1Smrg[m4_ifval([$1], [
3439f00f3a1Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
3449f00f3a1Smrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
3459f00f3a1Smrg)])
3469f00f3a1Smrg
3479f00f3a1Smrg
3489f00f3a1Smrg
3499f00f3a1Smrg## ------------------------ ##
3509f00f3a1Smrg## FIXME: Eliminate VARNAME ##
3519f00f3a1Smrg## ------------------------ ##
3529f00f3a1Smrg
3539f00f3a1Smrg
3549f00f3a1Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
3559f00f3a1Smrg# -------------------------------------------------------------------
3569f00f3a1Smrg# CONFIGNAME is the name given to the value in the libtool script.
3579f00f3a1Smrg# VARNAME is the (base) name used in the configure script.
3589f00f3a1Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
3599f00f3a1Smrg# VARNAME.  Any other value will be used directly.
3609f00f3a1Smrgm4_define([_LT_DECL],
3619f00f3a1Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
3629f00f3a1Smrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
3639f00f3a1Smrg	[m4_ifval([$1], [$1], [$2])])
3649f00f3a1Smrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
3659f00f3a1Smrg    m4_ifval([$4],
3669f00f3a1Smrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
3679f00f3a1Smrg    lt_dict_add_subkey([lt_decl_dict], [$2],
3689f00f3a1Smrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
3699f00f3a1Smrg])
3709f00f3a1Smrg
3719f00f3a1Smrg
3729f00f3a1Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
3739f00f3a1Smrg# --------------------------------------------------------
3749f00f3a1Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
3759f00f3a1Smrg
3769f00f3a1Smrg
3779f00f3a1Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
3789f00f3a1Smrg# ------------------------------------------------
3799f00f3a1Smrgm4_define([lt_decl_tag_varnames],
3809f00f3a1Smrg[_lt_decl_filter([tagged?], [yes], $@)])
3819f00f3a1Smrg
3829f00f3a1Smrg
3839f00f3a1Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
3849f00f3a1Smrg# ---------------------------------------------------------
3859f00f3a1Smrgm4_define([_lt_decl_filter],
3869f00f3a1Smrg[m4_case([$#],
3879f00f3a1Smrg  [0], [m4_fatal([$0: too few arguments: $#])],
3889f00f3a1Smrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
3899f00f3a1Smrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
3909f00f3a1Smrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
3919f00f3a1Smrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
3929f00f3a1Smrg])
3939f00f3a1Smrg
3949f00f3a1Smrg
3959f00f3a1Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
3969f00f3a1Smrg# --------------------------------------------------
3979f00f3a1Smrgm4_define([lt_decl_quote_varnames],
3989f00f3a1Smrg[_lt_decl_filter([value], [1], $@)])
3999f00f3a1Smrg
4009f00f3a1Smrg
4019f00f3a1Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
4029f00f3a1Smrg# ---------------------------------------------------
4039f00f3a1Smrgm4_define([lt_decl_dquote_varnames],
4049f00f3a1Smrg[_lt_decl_filter([value], [2], $@)])
4059f00f3a1Smrg
4069f00f3a1Smrg
4079f00f3a1Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
4089f00f3a1Smrg# ---------------------------------------------------
4099f00f3a1Smrgm4_define([lt_decl_varnames_tagged],
4109f00f3a1Smrg[m4_assert([$# <= 2])dnl
4119f00f3a1Smrg_$0(m4_quote(m4_default([$1], [[, ]])),
4129f00f3a1Smrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
4139f00f3a1Smrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
4149f00f3a1Smrgm4_define([_lt_decl_varnames_tagged],
4159f00f3a1Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
4169f00f3a1Smrg
4179f00f3a1Smrg
4189f00f3a1Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
4199f00f3a1Smrg# ------------------------------------------------
4209f00f3a1Smrgm4_define([lt_decl_all_varnames],
4219f00f3a1Smrg[_$0(m4_quote(m4_default([$1], [[, ]])),
4229f00f3a1Smrg     m4_if([$2], [],
4239f00f3a1Smrg	   m4_quote(lt_decl_varnames),
4249f00f3a1Smrg	m4_quote(m4_shift($@))))[]dnl
4259f00f3a1Smrg])
4269f00f3a1Smrgm4_define([_lt_decl_all_varnames],
4279f00f3a1Smrg[lt_join($@, lt_decl_varnames_tagged([$1],
4289f00f3a1Smrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
4299f00f3a1Smrg])
4309f00f3a1Smrg
4319f00f3a1Smrg
4329f00f3a1Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
4339f00f3a1Smrg# ------------------------------------
434edce3322Smrg# Quote a variable value, and forward it to 'config.status' so that its
435edce3322Smrg# declaration there will have the same value as in 'configure'.  VARNAME
4369f00f3a1Smrg# must have a single quote delimited value for this to work.
4379f00f3a1Smrgm4_define([_LT_CONFIG_STATUS_DECLARE],
4389f00f3a1Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
4399f00f3a1Smrg
4409f00f3a1Smrg
4419f00f3a1Smrg# _LT_CONFIG_STATUS_DECLARATIONS
4429f00f3a1Smrg# ------------------------------
4439f00f3a1Smrg# We delimit libtool config variables with single quotes, so when
4449f00f3a1Smrg# we write them to config.status, we have to be sure to quote all
4459f00f3a1Smrg# embedded single quotes properly.  In configure, this macro expands
4469f00f3a1Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
4479f00f3a1Smrg#
4489f00f3a1Smrg#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
4499f00f3a1Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
4509f00f3a1Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
4519f00f3a1Smrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
4529f00f3a1Smrg
4539f00f3a1Smrg
4549f00f3a1Smrg# _LT_LIBTOOL_TAGS
4559f00f3a1Smrg# ----------------
4569f00f3a1Smrg# Output comment and list of tags supported by the script
4579f00f3a1Smrgm4_defun([_LT_LIBTOOL_TAGS],
4589f00f3a1Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
459edce3322Smrgavailable_tags='_LT_TAGS'dnl
4609f00f3a1Smrg])
4619f00f3a1Smrg
4629f00f3a1Smrg
4639f00f3a1Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
4649f00f3a1Smrg# -----------------------------------
4659f00f3a1Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and
4669f00f3a1Smrg# expand to a commented shell variable setting:
4679f00f3a1Smrg#
4689f00f3a1Smrg#    # Some comment about what VAR is for.
4699f00f3a1Smrg#    visible_name=$lt_internal_name
4709f00f3a1Smrgm4_define([_LT_LIBTOOL_DECLARE],
4719f00f3a1Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
4729f00f3a1Smrg					   [description])))[]dnl
4739f00f3a1Smrgm4_pushdef([_libtool_name],
4749f00f3a1Smrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
4759f00f3a1Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
4769f00f3a1Smrg    [0], [_libtool_name=[$]$1],
4779f00f3a1Smrg    [1], [_libtool_name=$lt_[]$1],
4789f00f3a1Smrg    [2], [_libtool_name=$lt_[]$1],
4799f00f3a1Smrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
4809f00f3a1Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
4819f00f3a1Smrg])
4829f00f3a1Smrg
4839f00f3a1Smrg
4849f00f3a1Smrg# _LT_LIBTOOL_CONFIG_VARS
4859f00f3a1Smrg# -----------------------
4869f00f3a1Smrg# Produce commented declarations of non-tagged libtool config variables
487edce3322Smrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
4889f00f3a1Smrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
4899f00f3a1Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
4909f00f3a1Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
4919f00f3a1Smrg[m4_foreach([_lt_var],
4929f00f3a1Smrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
4939f00f3a1Smrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
4949f00f3a1Smrg
4959f00f3a1Smrg
4969f00f3a1Smrg# _LT_LIBTOOL_TAG_VARS(TAG)
4979f00f3a1Smrg# -------------------------
4989f00f3a1Smrgm4_define([_LT_LIBTOOL_TAG_VARS],
4999f00f3a1Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
5009f00f3a1Smrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
5019f00f3a1Smrg
5029f00f3a1Smrg
5039f00f3a1Smrg# _LT_TAGVAR(VARNAME, [TAGNAME])
5049f00f3a1Smrg# ------------------------------
5059f00f3a1Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
5069f00f3a1Smrg
5079f00f3a1Smrg
5089f00f3a1Smrg# _LT_CONFIG_COMMANDS
5099f00f3a1Smrg# -------------------
5109f00f3a1Smrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
5119f00f3a1Smrg# variables for single and double quote escaping we saved from calls
5129f00f3a1Smrg# to _LT_DECL, we can put quote escaped variables declarations
513edce3322Smrg# into 'config.status', and then the shell code to quote escape them in
514edce3322Smrg# for loops in 'config.status'.  Finally, any additional code accumulated
5159f00f3a1Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
5169f00f3a1Smrgm4_defun([_LT_CONFIG_COMMANDS],
5179f00f3a1Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
5189f00f3a1Smrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
5199f00f3a1Smrg	dnl instead of duplicating it all over again into config.status,
5209f00f3a1Smrg	dnl then we will have config.status run $CONFIG_LT later, so it
5219f00f3a1Smrg	dnl needs to know what name is stored there:
5229f00f3a1Smrg        [AC_CONFIG_COMMANDS([libtool],
5239f00f3a1Smrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
5249f00f3a1Smrg    dnl If the libtool generation code is destined for config.status,
5259f00f3a1Smrg    dnl expand the accumulated commands and init code now:
5269f00f3a1Smrg    [AC_CONFIG_COMMANDS([libtool],
5279f00f3a1Smrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
5289f00f3a1Smrg])#_LT_CONFIG_COMMANDS
5299f00f3a1Smrg
5309f00f3a1Smrg
5319f00f3a1Smrg# Initialize.
5329f00f3a1Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
5339f00f3a1Smrg[
5349f00f3a1Smrg
5359f00f3a1Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
5369f00f3a1Smrg# if CDPATH is set.
5379f00f3a1Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5389f00f3a1Smrg
5399f00f3a1Smrgsed_quote_subst='$sed_quote_subst'
5409f00f3a1Smrgdouble_quote_subst='$double_quote_subst'
5419f00f3a1Smrgdelay_variable_subst='$delay_variable_subst'
5429f00f3a1Smrg_LT_CONFIG_STATUS_DECLARATIONS
5439f00f3a1SmrgLTCC='$LTCC'
5449f00f3a1SmrgLTCFLAGS='$LTCFLAGS'
5459f00f3a1Smrgcompiler='$compiler_DEFAULT'
5469f00f3a1Smrg
5479f00f3a1Smrg# A function that is used when there is no print builtin or printf.
5489f00f3a1Smrgfunc_fallback_echo ()
5499f00f3a1Smrg{
5509f00f3a1Smrg  eval 'cat <<_LTECHO_EOF
5519f00f3a1Smrg\$[]1
5529f00f3a1Smrg_LTECHO_EOF'
5539f00f3a1Smrg}
5549f00f3a1Smrg
5559f00f3a1Smrg# Quote evaled strings.
5569f00f3a1Smrgfor var in lt_decl_all_varnames([[ \
5579f00f3a1Smrg]], lt_decl_quote_varnames); do
5589f00f3a1Smrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
5599f00f3a1Smrg    *[[\\\\\\\`\\"\\\$]]*)
560edce3322Smrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
5619f00f3a1Smrg      ;;
5629f00f3a1Smrg    *)
5639f00f3a1Smrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
5649f00f3a1Smrg      ;;
5659f00f3a1Smrg    esac
5669f00f3a1Smrgdone
5679f00f3a1Smrg
5689f00f3a1Smrg# Double-quote double-evaled strings.
5699f00f3a1Smrgfor var in lt_decl_all_varnames([[ \
5709f00f3a1Smrg]], lt_decl_dquote_varnames); do
5719f00f3a1Smrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
5729f00f3a1Smrg    *[[\\\\\\\`\\"\\\$]]*)
573edce3322Smrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
5749f00f3a1Smrg      ;;
5759f00f3a1Smrg    *)
5769f00f3a1Smrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
5779f00f3a1Smrg      ;;
5789f00f3a1Smrg    esac
5799f00f3a1Smrgdone
5809f00f3a1Smrg
5819f00f3a1Smrg_LT_OUTPUT_LIBTOOL_INIT
5829f00f3a1Smrg])
5839f00f3a1Smrg
5849f00f3a1Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
5859f00f3a1Smrg# ------------------------------------
5869f00f3a1Smrg# Generate a child script FILE with all initialization necessary to
5879f00f3a1Smrg# reuse the environment learned by the parent script, and make the
5889f00f3a1Smrg# file executable.  If COMMENT is supplied, it is inserted after the
589edce3322Smrg# '#!' sequence but before initialization text begins.  After this
5909f00f3a1Smrg# macro, additional text can be appended to FILE to form the body of
5919f00f3a1Smrg# the child script.  The macro ends with non-zero status if the
5929f00f3a1Smrg# file could not be fully written (such as if the disk is full).
5939f00f3a1Smrgm4_ifdef([AS_INIT_GENERATED],
5949f00f3a1Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
5959f00f3a1Smrg[m4_defun([_LT_GENERATED_FILE_INIT],
5969f00f3a1Smrg[m4_require([AS_PREPARE])]dnl
5979f00f3a1Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
5989f00f3a1Smrg[lt_write_fail=0
5999f00f3a1Smrgcat >$1 <<_ASEOF || lt_write_fail=1
6009f00f3a1Smrg#! $SHELL
6019f00f3a1Smrg# Generated by $as_me.
6029f00f3a1Smrg$2
6039f00f3a1SmrgSHELL=\${CONFIG_SHELL-$SHELL}
6049f00f3a1Smrgexport SHELL
6059f00f3a1Smrg_ASEOF
6069f00f3a1Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1
6079f00f3a1SmrgAS_SHELL_SANITIZE
6089f00f3a1Smrg_AS_PREPARE
6099f00f3a1Smrgexec AS_MESSAGE_FD>&1
6109f00f3a1Smrg_ASEOF
611edce3322Smrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl
6129f00f3a1Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
6139f00f3a1Smrg
6149f00f3a1Smrg# LT_OUTPUT
6159f00f3a1Smrg# ---------
6169f00f3a1Smrg# This macro allows early generation of the libtool script (before
6179f00f3a1Smrg# AC_OUTPUT is called), incase it is used in configure for compilation
6189f00f3a1Smrg# tests.
6199f00f3a1SmrgAC_DEFUN([LT_OUTPUT],
6209f00f3a1Smrg[: ${CONFIG_LT=./config.lt}
6219f00f3a1SmrgAC_MSG_NOTICE([creating $CONFIG_LT])
6229f00f3a1Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
6239f00f3a1Smrg[# Run this file to recreate a libtool stub with the current configuration.])
6249f00f3a1Smrg
6259f00f3a1Smrgcat >>"$CONFIG_LT" <<\_LTEOF
6269f00f3a1Smrglt_cl_silent=false
6279f00f3a1Smrgexec AS_MESSAGE_LOG_FD>>config.log
6289f00f3a1Smrg{
6299f00f3a1Smrg  echo
6309f00f3a1Smrg  AS_BOX([Running $as_me.])
6319f00f3a1Smrg} >&AS_MESSAGE_LOG_FD
6329f00f3a1Smrg
6339f00f3a1Smrglt_cl_help="\
634edce3322Smrg'$as_me' creates a local libtool stub from the current configuration,
6359f00f3a1Smrgfor use in further configure time tests before the real libtool is
6369f00f3a1Smrggenerated.
6379f00f3a1Smrg
6389f00f3a1SmrgUsage: $[0] [[OPTIONS]]
6399f00f3a1Smrg
6409f00f3a1Smrg  -h, --help      print this help, then exit
6419f00f3a1Smrg  -V, --version   print version number, then exit
6429f00f3a1Smrg  -q, --quiet     do not print progress messages
6439f00f3a1Smrg  -d, --debug     don't remove temporary files
6449f00f3a1Smrg
6459f00f3a1SmrgReport bugs to <bug-libtool@gnu.org>."
6469f00f3a1Smrg
6479f00f3a1Smrglt_cl_version="\
6489f00f3a1Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
6499f00f3a1Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
6509f00f3a1Smrgconfigured by $[0], generated by m4_PACKAGE_STRING.
6519f00f3a1Smrg
6529f00f3a1SmrgCopyright (C) 2011 Free Software Foundation, Inc.
6539f00f3a1SmrgThis config.lt script is free software; the Free Software Foundation
6549f00f3a1Smrggives unlimited permision to copy, distribute and modify it."
6559f00f3a1Smrg
656edce3322Smrgwhile test 0 != $[#]
6579f00f3a1Smrgdo
6589f00f3a1Smrg  case $[1] in
6599f00f3a1Smrg    --version | --v* | -V )
6609f00f3a1Smrg      echo "$lt_cl_version"; exit 0 ;;
6619f00f3a1Smrg    --help | --h* | -h )
6629f00f3a1Smrg      echo "$lt_cl_help"; exit 0 ;;
6639f00f3a1Smrg    --debug | --d* | -d )
6649f00f3a1Smrg      debug=: ;;
6659f00f3a1Smrg    --quiet | --q* | --silent | --s* | -q )
6669f00f3a1Smrg      lt_cl_silent=: ;;
6679f00f3a1Smrg
6689f00f3a1Smrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
669edce3322SmrgTry '$[0] --help' for more information.]) ;;
6709f00f3a1Smrg
6719f00f3a1Smrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
672edce3322SmrgTry '$[0] --help' for more information.]) ;;
6739f00f3a1Smrg  esac
6749f00f3a1Smrg  shift
6759f00f3a1Smrgdone
6769f00f3a1Smrg
6779f00f3a1Smrgif $lt_cl_silent; then
6789f00f3a1Smrg  exec AS_MESSAGE_FD>/dev/null
6799f00f3a1Smrgfi
6809f00f3a1Smrg_LTEOF
6819f00f3a1Smrg
6829f00f3a1Smrgcat >>"$CONFIG_LT" <<_LTEOF
6839f00f3a1Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
6849f00f3a1Smrg_LTEOF
6859f00f3a1Smrg
6869f00f3a1Smrgcat >>"$CONFIG_LT" <<\_LTEOF
6879f00f3a1SmrgAC_MSG_NOTICE([creating $ofile])
6889f00f3a1Smrg_LT_OUTPUT_LIBTOOL_COMMANDS
6899f00f3a1SmrgAS_EXIT(0)
6909f00f3a1Smrg_LTEOF
6919f00f3a1Smrgchmod +x "$CONFIG_LT"
6929f00f3a1Smrg
6939f00f3a1Smrg# configure is writing to config.log, but config.lt does its own redirection,
6949f00f3a1Smrg# appending to config.log, which fails on DOS, as config.log is still kept
6959f00f3a1Smrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
6969f00f3a1Smrg# config.log, so it can be properly (re)opened and appended to by config.lt.
6979f00f3a1Smrglt_cl_success=:
698edce3322Smrgtest yes = "$silent" &&
6999f00f3a1Smrg  lt_config_lt_args="$lt_config_lt_args --quiet"
7009f00f3a1Smrgexec AS_MESSAGE_LOG_FD>/dev/null
7019f00f3a1Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
7029f00f3a1Smrgexec AS_MESSAGE_LOG_FD>>config.log
7039f00f3a1Smrg$lt_cl_success || AS_EXIT(1)
7049f00f3a1Smrg])# LT_OUTPUT
7059f00f3a1Smrg
7069f00f3a1Smrg
7079f00f3a1Smrg# _LT_CONFIG(TAG)
7089f00f3a1Smrg# ---------------
7099f00f3a1Smrg# If TAG is the built-in tag, create an initial libtool script with a
7109f00f3a1Smrg# default configuration from the untagged config vars.  Otherwise add code
7119f00f3a1Smrg# to config.status for appending the configuration named by TAG from the
7129f00f3a1Smrg# matching tagged config vars.
7139f00f3a1Smrgm4_defun([_LT_CONFIG],
7149f00f3a1Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7159f00f3a1Smrg_LT_CONFIG_SAVE_COMMANDS([
7169f00f3a1Smrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
7179f00f3a1Smrg  m4_if(_LT_TAG, [C], [
718edce3322Smrg    # See if we are running on zsh, and set the options that allow our
7199f00f3a1Smrg    # commands through without removal of \ escapes.
720edce3322Smrg    if test -n "${ZSH_VERSION+set}"; then
7219f00f3a1Smrg      setopt NO_GLOB_SUBST
7229f00f3a1Smrg    fi
7239f00f3a1Smrg
724edce3322Smrg    cfgfile=${ofile}T
7259f00f3a1Smrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
7269f00f3a1Smrg    $RM "$cfgfile"
7279f00f3a1Smrg
7289f00f3a1Smrg    cat <<_LT_EOF >> "$cfgfile"
7299f00f3a1Smrg#! $SHELL
730edce3322Smrg# Generated automatically by $as_me ($PACKAGE) $VERSION
7319f00f3a1Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7329f00f3a1Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
733edce3322Smrg
734edce3322Smrg# Provide generalized library-building support services.
735edce3322Smrg# Written by Gordon Matzigkeit, 1996
736edce3322Smrg
7379f00f3a1Smrg_LT_COPYING
7389f00f3a1Smrg_LT_LIBTOOL_TAGS
7399f00f3a1Smrg
740edce3322Smrg# Configured defaults for sys_lib_dlsearch_path munging.
741edce3322Smrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
742edce3322Smrg
7439f00f3a1Smrg# ### BEGIN LIBTOOL CONFIG
7449f00f3a1Smrg_LT_LIBTOOL_CONFIG_VARS
7459f00f3a1Smrg_LT_LIBTOOL_TAG_VARS
7469f00f3a1Smrg# ### END LIBTOOL CONFIG
7479f00f3a1Smrg
748edce3322Smrg_LT_EOF
749edce3322Smrg
750edce3322Smrg    cat <<'_LT_EOF' >> "$cfgfile"
751edce3322Smrg
752edce3322Smrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
753edce3322Smrg
754edce3322Smrg_LT_PREPARE_MUNGE_PATH_LIST
755edce3322Smrg_LT_PREPARE_CC_BASENAME
756edce3322Smrg
757edce3322Smrg# ### END FUNCTIONS SHARED WITH CONFIGURE
758edce3322Smrg
7599f00f3a1Smrg_LT_EOF
7609f00f3a1Smrg
7619f00f3a1Smrg  case $host_os in
7629f00f3a1Smrg  aix3*)
7639f00f3a1Smrg    cat <<\_LT_EOF >> "$cfgfile"
7649f00f3a1Smrg# AIX sometimes has problems with the GCC collect2 program.  For some
7659f00f3a1Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems
7669f00f3a1Smrg# vanish in a puff of smoke.
767edce3322Smrgif test set != "${COLLECT_NAMES+set}"; then
7689f00f3a1Smrg  COLLECT_NAMES=
7699f00f3a1Smrg  export COLLECT_NAMES
7709f00f3a1Smrgfi
7719f00f3a1Smrg_LT_EOF
7729f00f3a1Smrg    ;;
7739f00f3a1Smrg  esac
7749f00f3a1Smrg
7759f00f3a1Smrg  _LT_PROG_LTMAIN
7769f00f3a1Smrg
7779f00f3a1Smrg  # We use sed instead of cat because bash on DJGPP gets confused if
7789f00f3a1Smrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7799f00f3a1Smrg  # text mode, it properly converts lines to CR/LF.  This bash problem
7809f00f3a1Smrg  # is reportedly fixed, but why not run on old versions too?
7819f00f3a1Smrg  sed '$q' "$ltmain" >> "$cfgfile" \
7829f00f3a1Smrg     || (rm -f "$cfgfile"; exit 1)
7839f00f3a1Smrg
7849f00f3a1Smrg   mv -f "$cfgfile" "$ofile" ||
7859f00f3a1Smrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
7869f00f3a1Smrg  chmod +x "$ofile"
7879f00f3a1Smrg],
7889f00f3a1Smrg[cat <<_LT_EOF >> "$ofile"
7899f00f3a1Smrg
7909f00f3a1Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
7919f00f3a1Smrgdnl in a comment (ie after a #).
7929f00f3a1Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1
7939f00f3a1Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
7949f00f3a1Smrg# ### END LIBTOOL TAG CONFIG: $1
7959f00f3a1Smrg_LT_EOF
7969f00f3a1Smrg])dnl /m4_if
7979f00f3a1Smrg],
7989f00f3a1Smrg[m4_if([$1], [], [
7999f00f3a1Smrg    PACKAGE='$PACKAGE'
8009f00f3a1Smrg    VERSION='$VERSION'
8019f00f3a1Smrg    RM='$RM'
8029f00f3a1Smrg    ofile='$ofile'], [])
8039f00f3a1Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS
8049f00f3a1Smrg])# _LT_CONFIG
8059f00f3a1Smrg
8069f00f3a1Smrg
8079f00f3a1Smrg# LT_SUPPORTED_TAG(TAG)
8089f00f3a1Smrg# ---------------------
8099f00f3a1Smrg# Trace this macro to discover what tags are supported by the libtool
8109f00f3a1Smrg# --tag option, using:
8119f00f3a1Smrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
8129f00f3a1SmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
8139f00f3a1Smrg
8149f00f3a1Smrg
8159f00f3a1Smrg# C support is built-in for now
8169f00f3a1Smrgm4_define([_LT_LANG_C_enabled], [])
8179f00f3a1Smrgm4_define([_LT_TAGS], [])
8189f00f3a1Smrg
8199f00f3a1Smrg
8209f00f3a1Smrg# LT_LANG(LANG)
8219f00f3a1Smrg# -------------
8229f00f3a1Smrg# Enable libtool support for the given language if not already enabled.
8239f00f3a1SmrgAC_DEFUN([LT_LANG],
8249f00f3a1Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
8259f00f3a1Smrgm4_case([$1],
8269f00f3a1Smrg  [C],			[_LT_LANG(C)],
8279f00f3a1Smrg  [C++],		[_LT_LANG(CXX)],
8289f00f3a1Smrg  [Go],			[_LT_LANG(GO)],
8299f00f3a1Smrg  [Java],		[_LT_LANG(GCJ)],
8309f00f3a1Smrg  [Fortran 77],		[_LT_LANG(F77)],
8319f00f3a1Smrg  [Fortran],		[_LT_LANG(FC)],
8329f00f3a1Smrg  [Windows Resource],	[_LT_LANG(RC)],
8339f00f3a1Smrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
8349f00f3a1Smrg    [_LT_LANG($1)],
8359f00f3a1Smrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
8369f00f3a1Smrg])# LT_LANG
8379f00f3a1Smrg
8389f00f3a1Smrg
8399f00f3a1Smrg# _LT_LANG(LANGNAME)
8409f00f3a1Smrg# ------------------
8419f00f3a1Smrgm4_defun([_LT_LANG],
8429f00f3a1Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
8439f00f3a1Smrg  [LT_SUPPORTED_TAG([$1])dnl
8449f00f3a1Smrg  m4_append([_LT_TAGS], [$1 ])dnl
8459f00f3a1Smrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
8469f00f3a1Smrg  _LT_LANG_$1_CONFIG($1)])dnl
8479f00f3a1Smrg])# _LT_LANG
8489f00f3a1Smrg
8499f00f3a1Smrg
8509f00f3a1Smrgm4_ifndef([AC_PROG_GO], [
8519f00f3a1Smrg############################################################
8529f00f3a1Smrg# NOTE: This macro has been submitted for inclusion into   #
8539f00f3a1Smrg#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
8549f00f3a1Smrg#  a released version of Autoconf we should remove this    #
8559f00f3a1Smrg#  macro and use it instead.                               #
8569f00f3a1Smrg############################################################
8579f00f3a1Smrgm4_defun([AC_PROG_GO],
8589f00f3a1Smrg[AC_LANG_PUSH(Go)dnl
8599f00f3a1SmrgAC_ARG_VAR([GOC],     [Go compiler command])dnl
8609f00f3a1SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
8619f00f3a1Smrg_AC_ARG_VAR_LDFLAGS()dnl
8629f00f3a1SmrgAC_CHECK_TOOL(GOC, gccgo)
8639f00f3a1Smrgif test -z "$GOC"; then
8649f00f3a1Smrg  if test -n "$ac_tool_prefix"; then
8659f00f3a1Smrg    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
8669f00f3a1Smrg  fi
8679f00f3a1Smrgfi
8689f00f3a1Smrgif test -z "$GOC"; then
8699f00f3a1Smrg  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
8709f00f3a1Smrgfi
8719f00f3a1Smrg])#m4_defun
8729f00f3a1Smrg])#m4_ifndef
8739f00f3a1Smrg
8749f00f3a1Smrg
8759f00f3a1Smrg# _LT_LANG_DEFAULT_CONFIG
8769f00f3a1Smrg# -----------------------
8779f00f3a1Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
8789f00f3a1Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
8799f00f3a1Smrg  [LT_LANG(CXX)],
8809f00f3a1Smrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
8819f00f3a1Smrg
8829f00f3a1SmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
8839f00f3a1Smrg  [LT_LANG(F77)],
8849f00f3a1Smrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
8859f00f3a1Smrg
8869f00f3a1SmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
8879f00f3a1Smrg  [LT_LANG(FC)],
8889f00f3a1Smrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
8899f00f3a1Smrg
8909f00f3a1Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
8919f00f3a1Smrgdnl pulling things in needlessly.
8929f00f3a1SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
8939f00f3a1Smrg  [LT_LANG(GCJ)],
8949f00f3a1Smrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
8959f00f3a1Smrg    [LT_LANG(GCJ)],
8969f00f3a1Smrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
8979f00f3a1Smrg      [LT_LANG(GCJ)],
8989f00f3a1Smrg      [m4_ifdef([AC_PROG_GCJ],
8999f00f3a1Smrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
9009f00f3a1Smrg       m4_ifdef([A][M_PROG_GCJ],
9019f00f3a1Smrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
9029f00f3a1Smrg       m4_ifdef([LT_PROG_GCJ],
9039f00f3a1Smrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
9049f00f3a1Smrg
9059f00f3a1SmrgAC_PROVIDE_IFELSE([AC_PROG_GO],
9069f00f3a1Smrg  [LT_LANG(GO)],
9079f00f3a1Smrg  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
9089f00f3a1Smrg
9099f00f3a1SmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
9109f00f3a1Smrg  [LT_LANG(RC)],
9119f00f3a1Smrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
9129f00f3a1Smrg])# _LT_LANG_DEFAULT_CONFIG
9139f00f3a1Smrg
9149f00f3a1Smrg# Obsolete macros:
9159f00f3a1SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
9169f00f3a1SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
9179f00f3a1SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
9189f00f3a1SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
9199f00f3a1SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
9209f00f3a1Smrgdnl aclocal-1.4 backwards compatibility:
9219f00f3a1Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
9229f00f3a1Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
9239f00f3a1Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
9249f00f3a1Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
9259f00f3a1Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], [])
9269f00f3a1Smrg
9279f00f3a1Smrg
9289f00f3a1Smrg# _LT_TAG_COMPILER
9299f00f3a1Smrg# ----------------
9309f00f3a1Smrgm4_defun([_LT_TAG_COMPILER],
9319f00f3a1Smrg[AC_REQUIRE([AC_PROG_CC])dnl
9329f00f3a1Smrg
9339f00f3a1Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
9349f00f3a1Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
9359f00f3a1Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
9369f00f3a1Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
9379f00f3a1Smrg
9389f00f3a1Smrg# If no C compiler was specified, use CC.
9399f00f3a1SmrgLTCC=${LTCC-"$CC"}
9409f00f3a1Smrg
9419f00f3a1Smrg# If no C compiler flags were specified, use CFLAGS.
9429f00f3a1SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
9439f00f3a1Smrg
9449f00f3a1Smrg# Allow CC to be a program name with arguments.
9459f00f3a1Smrgcompiler=$CC
9469f00f3a1Smrg])# _LT_TAG_COMPILER
9479f00f3a1Smrg
9489f00f3a1Smrg
9499f00f3a1Smrg# _LT_COMPILER_BOILERPLATE
9509f00f3a1Smrg# ------------------------
9519f00f3a1Smrg# Check for compiler boilerplate output or warnings with
9529f00f3a1Smrg# the simple compiler test code.
9539f00f3a1Smrgm4_defun([_LT_COMPILER_BOILERPLATE],
9549f00f3a1Smrg[m4_require([_LT_DECL_SED])dnl
9559f00f3a1Smrgac_outfile=conftest.$ac_objext
9569f00f3a1Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
9579f00f3a1Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
9589f00f3a1Smrg_lt_compiler_boilerplate=`cat conftest.err`
9599f00f3a1Smrg$RM conftest*
9609f00f3a1Smrg])# _LT_COMPILER_BOILERPLATE
9619f00f3a1Smrg
9629f00f3a1Smrg
9639f00f3a1Smrg# _LT_LINKER_BOILERPLATE
9649f00f3a1Smrg# ----------------------
9659f00f3a1Smrg# Check for linker boilerplate output or warnings with
9669f00f3a1Smrg# the simple link test code.
9679f00f3a1Smrgm4_defun([_LT_LINKER_BOILERPLATE],
9689f00f3a1Smrg[m4_require([_LT_DECL_SED])dnl
9699f00f3a1Smrgac_outfile=conftest.$ac_objext
9709f00f3a1Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
9719f00f3a1Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
9729f00f3a1Smrg_lt_linker_boilerplate=`cat conftest.err`
9739f00f3a1Smrg$RM -r conftest*
9749f00f3a1Smrg])# _LT_LINKER_BOILERPLATE
9759f00f3a1Smrg
9769f00f3a1Smrg# _LT_REQUIRED_DARWIN_CHECKS
9779f00f3a1Smrg# -------------------------
9789f00f3a1Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
9799f00f3a1Smrg  case $host_os in
9809f00f3a1Smrg    rhapsody* | darwin*)
9819f00f3a1Smrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
9829f00f3a1Smrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
9839f00f3a1Smrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
9849f00f3a1Smrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
9859f00f3a1Smrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
9869f00f3a1Smrg    _LT_DECL([], [DSYMUTIL], [1],
9879f00f3a1Smrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
9889f00f3a1Smrg    _LT_DECL([], [NMEDIT], [1],
9899f00f3a1Smrg      [Tool to change global to local symbols on Mac OS X])
9909f00f3a1Smrg    _LT_DECL([], [LIPO], [1],
9919f00f3a1Smrg      [Tool to manipulate fat objects and archives on Mac OS X])
9929f00f3a1Smrg    _LT_DECL([], [OTOOL], [1],
9939f00f3a1Smrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
9949f00f3a1Smrg    _LT_DECL([], [OTOOL64], [1],
9959f00f3a1Smrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
9969f00f3a1Smrg
9979f00f3a1Smrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
9989f00f3a1Smrg      [lt_cv_apple_cc_single_mod=no
999edce3322Smrg      if test -z "$LT_MULTI_MODULE"; then
10009f00f3a1Smrg	# By default we will add the -single_module flag. You can override
10019f00f3a1Smrg	# by either setting the environment variable LT_MULTI_MODULE
10029f00f3a1Smrg	# non-empty at configure time, or by adding -multi_module to the
10039f00f3a1Smrg	# link flags.
10049f00f3a1Smrg	rm -rf libconftest.dylib*
10059f00f3a1Smrg	echo "int foo(void){return 1;}" > conftest.c
10069f00f3a1Smrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10079f00f3a1Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
10089f00f3a1Smrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10099f00f3a1Smrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
10109f00f3a1Smrg        _lt_result=$?
10119f00f3a1Smrg	# If there is a non-empty error log, and "single_module"
10129f00f3a1Smrg	# appears in it, assume the flag caused a linker warning
10139f00f3a1Smrg        if test -s conftest.err && $GREP single_module conftest.err; then
10149f00f3a1Smrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
10159f00f3a1Smrg	# Otherwise, if the output was created with a 0 exit code from
10169f00f3a1Smrg	# the compiler, it worked.
1017edce3322Smrg	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
10189f00f3a1Smrg	  lt_cv_apple_cc_single_mod=yes
10199f00f3a1Smrg	else
10209f00f3a1Smrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
10219f00f3a1Smrg	fi
10229f00f3a1Smrg	rm -rf libconftest.dylib*
10239f00f3a1Smrg	rm -f conftest.*
10249f00f3a1Smrg      fi])
10259f00f3a1Smrg
10269f00f3a1Smrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
10279f00f3a1Smrg      [lt_cv_ld_exported_symbols_list],
10289f00f3a1Smrg      [lt_cv_ld_exported_symbols_list=no
10299f00f3a1Smrg      save_LDFLAGS=$LDFLAGS
10309f00f3a1Smrg      echo "_main" > conftest.sym
10319f00f3a1Smrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
10329f00f3a1Smrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
10339f00f3a1Smrg	[lt_cv_ld_exported_symbols_list=yes],
10349f00f3a1Smrg	[lt_cv_ld_exported_symbols_list=no])
1035edce3322Smrg	LDFLAGS=$save_LDFLAGS
10369f00f3a1Smrg    ])
10379f00f3a1Smrg
10389f00f3a1Smrg    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
10399f00f3a1Smrg      [lt_cv_ld_force_load=no
10409f00f3a1Smrg      cat > conftest.c << _LT_EOF
10419f00f3a1Smrgint forced_loaded() { return 2;}
10429f00f3a1Smrg_LT_EOF
10439f00f3a1Smrg      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
10449f00f3a1Smrg      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
10459f00f3a1Smrg      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
10469f00f3a1Smrg      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
10479f00f3a1Smrg      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
10489f00f3a1Smrg      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
10499f00f3a1Smrg      cat > conftest.c << _LT_EOF
10509f00f3a1Smrgint main() { return 0;}
10519f00f3a1Smrg_LT_EOF
10529f00f3a1Smrg      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
10539f00f3a1Smrg      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
10549f00f3a1Smrg      _lt_result=$?
10559f00f3a1Smrg      if test -s conftest.err && $GREP force_load conftest.err; then
10569f00f3a1Smrg	cat conftest.err >&AS_MESSAGE_LOG_FD
1057edce3322Smrg      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
10589f00f3a1Smrg	lt_cv_ld_force_load=yes
10599f00f3a1Smrg      else
10609f00f3a1Smrg	cat conftest.err >&AS_MESSAGE_LOG_FD
10619f00f3a1Smrg      fi
10629f00f3a1Smrg        rm -f conftest.err libconftest.a conftest conftest.c
10639f00f3a1Smrg        rm -rf conftest.dSYM
10649f00f3a1Smrg    ])
10659f00f3a1Smrg    case $host_os in
10669f00f3a1Smrg    rhapsody* | darwin1.[[012]])
1067edce3322Smrg      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
10689f00f3a1Smrg    darwin1.*)
1069edce3322Smrg      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10709f00f3a1Smrg    darwin*) # darwin 5.x on
10719f00f3a1Smrg      # if running on 10.5 or later, the deployment target defaults
10729f00f3a1Smrg      # to the OS version, if on x86, and 10.4, the deployment
10739f00f3a1Smrg      # target defaults to 10.4. Don't you love it?
10749f00f3a1Smrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10759f00f3a1Smrg	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1076edce3322Smrg	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1077edce3322Smrg	10.[[012]][[,.]]*)
1078edce3322Smrg	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10799f00f3a1Smrg	10.*)
1080edce3322Smrg	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10819f00f3a1Smrg      esac
10829f00f3a1Smrg    ;;
10839f00f3a1Smrg  esac
1084edce3322Smrg    if test yes = "$lt_cv_apple_cc_single_mod"; then
10859f00f3a1Smrg      _lt_dar_single_mod='$single_module'
10869f00f3a1Smrg    fi
1087edce3322Smrg    if test yes = "$lt_cv_ld_exported_symbols_list"; then
1088edce3322Smrg      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
10899f00f3a1Smrg    else
1090edce3322Smrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
10919f00f3a1Smrg    fi
1092edce3322Smrg    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
10939f00f3a1Smrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
10949f00f3a1Smrg    else
10959f00f3a1Smrg      _lt_dsymutil=
10969f00f3a1Smrg    fi
10979f00f3a1Smrg    ;;
10989f00f3a1Smrg  esac
10999f00f3a1Smrg])
11009f00f3a1Smrg
11019f00f3a1Smrg
11029f00f3a1Smrg# _LT_DARWIN_LINKER_FEATURES([TAG])
11039f00f3a1Smrg# ---------------------------------
11049f00f3a1Smrg# Checks for linker and compiler features on darwin
11059f00f3a1Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
11069f00f3a1Smrg[
11079f00f3a1Smrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
11089f00f3a1Smrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
11099f00f3a1Smrg  _LT_TAGVAR(hardcode_direct, $1)=no
11109f00f3a1Smrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
11119f00f3a1Smrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1112edce3322Smrg  if test yes = "$lt_cv_ld_force_load"; then
1113edce3322Smrg    _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\"`'
11149f00f3a1Smrg    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
11159f00f3a1Smrg                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
11169f00f3a1Smrg  else
11179f00f3a1Smrg    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
11189f00f3a1Smrg  fi
11199f00f3a1Smrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
1120edce3322Smrg  _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
11219f00f3a1Smrg  case $cc_basename in
1122edce3322Smrg     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
11239f00f3a1Smrg     *) _lt_dar_can_shared=$GCC ;;
11249f00f3a1Smrg  esac
1125edce3322Smrg  if test yes = "$_lt_dar_can_shared"; then
11269f00f3a1Smrg    output_verbose_link_cmd=func_echo_all
1127edce3322Smrg    _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"
1128edce3322Smrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
1129edce3322Smrg    _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"
1130edce3322Smrg    _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"
11319f00f3a1Smrg    m4_if([$1], [CXX],
1132edce3322Smrg[   if test yes != "$lt_cv_apple_cc_single_mod"; then
1133edce3322Smrg      _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"
1134edce3322Smrg      _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"
11359f00f3a1Smrg    fi
11369f00f3a1Smrg],[])
11379f00f3a1Smrg  else
11389f00f3a1Smrg  _LT_TAGVAR(ld_shlibs, $1)=no
11399f00f3a1Smrg  fi
11409f00f3a1Smrg])
11419f00f3a1Smrg
11429f00f3a1Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
11439f00f3a1Smrg# ----------------------------------
11449f00f3a1Smrg# Links a minimal program and checks the executable
11459f00f3a1Smrg# for the system default hardcoded library path. In most cases,
11469f00f3a1Smrg# this is /usr/lib:/lib, but when the MPI compilers are used
11479f00f3a1Smrg# the location of the communication and MPI libs are included too.
11489f00f3a1Smrg# If we don't find anything, use the default library path according
11499f00f3a1Smrg# to the aix ld manual.
11509f00f3a1Smrg# Store the results from the different compilers for each TAGNAME.
11519f00f3a1Smrg# Allow to override them for all tags through lt_cv_aix_libpath.
11529f00f3a1Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
11539f00f3a1Smrg[m4_require([_LT_DECL_SED])dnl
1154edce3322Smrgif test set = "${lt_cv_aix_libpath+set}"; then
11559f00f3a1Smrg  aix_libpath=$lt_cv_aix_libpath
11569f00f3a1Smrgelse
11579f00f3a1Smrg  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
11589f00f3a1Smrg  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
11599f00f3a1Smrg  lt_aix_libpath_sed='[
11609f00f3a1Smrg      /Import File Strings/,/^$/ {
11619f00f3a1Smrg	  /^0/ {
11629f00f3a1Smrg	      s/^0  *\([^ ]*\) *$/\1/
11639f00f3a1Smrg	      p
11649f00f3a1Smrg	  }
11659f00f3a1Smrg      }]'
11669f00f3a1Smrg  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11679f00f3a1Smrg  # Check for a 64-bit object if we didn't find anything.
11689f00f3a1Smrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
11699f00f3a1Smrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11709f00f3a1Smrg  fi],[])
11719f00f3a1Smrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1172edce3322Smrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
11739f00f3a1Smrg  fi
11749f00f3a1Smrg  ])
11759f00f3a1Smrg  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
11769f00f3a1Smrgfi
11779f00f3a1Smrg])# _LT_SYS_MODULE_PATH_AIX
11789f00f3a1Smrg
11799f00f3a1Smrg
11809f00f3a1Smrg# _LT_SHELL_INIT(ARG)
11819f00f3a1Smrg# -------------------
11829f00f3a1Smrgm4_define([_LT_SHELL_INIT],
11839f00f3a1Smrg[m4_divert_text([M4SH-INIT], [$1
11849f00f3a1Smrg])])# _LT_SHELL_INIT
11859f00f3a1Smrg
11869f00f3a1Smrg
11879f00f3a1Smrg
11889f00f3a1Smrg# _LT_PROG_ECHO_BACKSLASH
11899f00f3a1Smrg# -----------------------
11909f00f3a1Smrg# Find how we can fake an echo command that does not interpret backslash.
11919f00f3a1Smrg# In particular, with Autoconf 2.60 or later we add some code to the start
1192edce3322Smrg# of the generated configure script that will find a shell with a builtin
1193edce3322Smrg# printf (that we can use as an echo command).
11949f00f3a1Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
11959f00f3a1Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
11969f00f3a1SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
11979f00f3a1SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
11989f00f3a1Smrg
11999f00f3a1SmrgAC_MSG_CHECKING([how to print strings])
12009f00f3a1Smrg# Test print first, because it will be a builtin if present.
12019f00f3a1Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
12029f00f3a1Smrg   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
12039f00f3a1Smrg  ECHO='print -r --'
12049f00f3a1Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
12059f00f3a1Smrg  ECHO='printf %s\n'
12069f00f3a1Smrgelse
12079f00f3a1Smrg  # Use this function as a fallback that always works.
12089f00f3a1Smrg  func_fallback_echo ()
12099f00f3a1Smrg  {
12109f00f3a1Smrg    eval 'cat <<_LTECHO_EOF
12119f00f3a1Smrg$[]1
12129f00f3a1Smrg_LTECHO_EOF'
12139f00f3a1Smrg  }
12149f00f3a1Smrg  ECHO='func_fallback_echo'
12159f00f3a1Smrgfi
12169f00f3a1Smrg
12179f00f3a1Smrg# func_echo_all arg...
12189f00f3a1Smrg# Invoke $ECHO with all args, space-separated.
12199f00f3a1Smrgfunc_echo_all ()
12209f00f3a1Smrg{
1221edce3322Smrg    $ECHO "$*"
12229f00f3a1Smrg}
12239f00f3a1Smrg
1224edce3322Smrgcase $ECHO in
12259f00f3a1Smrg  printf*) AC_MSG_RESULT([printf]) ;;
12269f00f3a1Smrg  print*) AC_MSG_RESULT([print -r]) ;;
12279f00f3a1Smrg  *) AC_MSG_RESULT([cat]) ;;
12289f00f3a1Smrgesac
12299f00f3a1Smrg
12309f00f3a1Smrgm4_ifdef([_AS_DETECT_SUGGESTED],
12319f00f3a1Smrg[_AS_DETECT_SUGGESTED([
12329f00f3a1Smrg  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
12339f00f3a1Smrg    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
12349f00f3a1Smrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
12359f00f3a1Smrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
12369f00f3a1Smrg    PATH=/empty FPATH=/empty; export PATH FPATH
12379f00f3a1Smrg    test "X`printf %s $ECHO`" = "X$ECHO" \
12389f00f3a1Smrg      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
12399f00f3a1Smrg
12409f00f3a1Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
12419f00f3a1Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
12429f00f3a1Smrg])# _LT_PROG_ECHO_BACKSLASH
12439f00f3a1Smrg
12449f00f3a1Smrg
12459f00f3a1Smrg# _LT_WITH_SYSROOT
12469f00f3a1Smrg# ----------------
12479f00f3a1SmrgAC_DEFUN([_LT_WITH_SYSROOT],
12489f00f3a1Smrg[AC_MSG_CHECKING([for sysroot])
12499f00f3a1SmrgAC_ARG_WITH([sysroot],
1250edce3322Smrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
1251edce3322Smrg  [Search for dependent libraries within DIR (or the compiler's sysroot
1252edce3322Smrg   if not specified).])],
12539f00f3a1Smrg[], [with_sysroot=no])
12549f00f3a1Smrg
12559f00f3a1Smrgdnl lt_sysroot will always be passed unquoted.  We quote it here
12569f00f3a1Smrgdnl in case the user passed a directory name.
12579f00f3a1Smrglt_sysroot=
1258edce3322Smrgcase $with_sysroot in #(
12599f00f3a1Smrg yes)
1260edce3322Smrg   if test yes = "$GCC"; then
12619f00f3a1Smrg     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
12629f00f3a1Smrg   fi
12639f00f3a1Smrg   ;; #(
12649f00f3a1Smrg /*)
12659f00f3a1Smrg   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
12669f00f3a1Smrg   ;; #(
12679f00f3a1Smrg no|'')
12689f00f3a1Smrg   ;; #(
12699f00f3a1Smrg *)
1270edce3322Smrg   AC_MSG_RESULT([$with_sysroot])
12719f00f3a1Smrg   AC_MSG_ERROR([The sysroot must be an absolute path.])
12729f00f3a1Smrg   ;;
12739f00f3a1Smrgesac
12749f00f3a1Smrg
12759f00f3a1Smrg AC_MSG_RESULT([${lt_sysroot:-no}])
12769f00f3a1Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1277edce3322Smrg[dependent libraries, and where our libraries should be installed.])])
12789f00f3a1Smrg
12799f00f3a1Smrg# _LT_ENABLE_LOCK
12809f00f3a1Smrg# ---------------
12819f00f3a1Smrgm4_defun([_LT_ENABLE_LOCK],
12829f00f3a1Smrg[AC_ARG_ENABLE([libtool-lock],
12839f00f3a1Smrg  [AS_HELP_STRING([--disable-libtool-lock],
12849f00f3a1Smrg    [avoid locking (might break parallel builds)])])
1285edce3322Smrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes
12869f00f3a1Smrg
12879f00f3a1Smrg# Some flags need to be propagated to the compiler or linker for good
12889f00f3a1Smrg# libtool support.
12899f00f3a1Smrgcase $host in
12909f00f3a1Smrgia64-*-hpux*)
1291edce3322Smrg  # Find out what ABI is being produced by ac_compile, and set mode
1292edce3322Smrg  # options accordingly.
12939f00f3a1Smrg  echo 'int i;' > conftest.$ac_ext
12949f00f3a1Smrg  if AC_TRY_EVAL(ac_compile); then
12959f00f3a1Smrg    case `/usr/bin/file conftest.$ac_objext` in
12969f00f3a1Smrg      *ELF-32*)
1297edce3322Smrg	HPUX_IA64_MODE=32
12989f00f3a1Smrg	;;
12999f00f3a1Smrg      *ELF-64*)
1300edce3322Smrg	HPUX_IA64_MODE=64
13019f00f3a1Smrg	;;
13029f00f3a1Smrg    esac
13039f00f3a1Smrg  fi
13049f00f3a1Smrg  rm -rf conftest*
13059f00f3a1Smrg  ;;
13069f00f3a1Smrg*-*-irix6*)
1307edce3322Smrg  # Find out what ABI is being produced by ac_compile, and set linker
1308edce3322Smrg  # options accordingly.
13099f00f3a1Smrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
13109f00f3a1Smrg  if AC_TRY_EVAL(ac_compile); then
1311edce3322Smrg    if test yes = "$lt_cv_prog_gnu_ld"; then
13129f00f3a1Smrg      case `/usr/bin/file conftest.$ac_objext` in
13139f00f3a1Smrg	*32-bit*)
13149f00f3a1Smrg	  LD="${LD-ld} -melf32bsmip"
13159f00f3a1Smrg	  ;;
13169f00f3a1Smrg	*N32*)
13179f00f3a1Smrg	  LD="${LD-ld} -melf32bmipn32"
13189f00f3a1Smrg	  ;;
13199f00f3a1Smrg	*64-bit*)
13209f00f3a1Smrg	  LD="${LD-ld} -melf64bmip"
13219f00f3a1Smrg	;;
13229f00f3a1Smrg      esac
13239f00f3a1Smrg    else
13249f00f3a1Smrg      case `/usr/bin/file conftest.$ac_objext` in
13259f00f3a1Smrg	*32-bit*)
13269f00f3a1Smrg	  LD="${LD-ld} -32"
13279f00f3a1Smrg	  ;;
13289f00f3a1Smrg	*N32*)
13299f00f3a1Smrg	  LD="${LD-ld} -n32"
13309f00f3a1Smrg	  ;;
13319f00f3a1Smrg	*64-bit*)
13329f00f3a1Smrg	  LD="${LD-ld} -64"
13339f00f3a1Smrg	  ;;
13349f00f3a1Smrg      esac
13359f00f3a1Smrg    fi
13369f00f3a1Smrg  fi
13379f00f3a1Smrg  rm -rf conftest*
13389f00f3a1Smrg  ;;
13399f00f3a1Smrg
1340edce3322Smrgmips64*-*linux*)
1341edce3322Smrg  # Find out what ABI is being produced by ac_compile, and set linker
1342edce3322Smrg  # options accordingly.
1343edce3322Smrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1344edce3322Smrg  if AC_TRY_EVAL(ac_compile); then
1345edce3322Smrg    emul=elf
1346edce3322Smrg    case `/usr/bin/file conftest.$ac_objext` in
1347edce3322Smrg      *32-bit*)
1348edce3322Smrg	emul="${emul}32"
1349edce3322Smrg	;;
1350edce3322Smrg      *64-bit*)
1351edce3322Smrg	emul="${emul}64"
1352edce3322Smrg	;;
1353edce3322Smrg    esac
1354edce3322Smrg    case `/usr/bin/file conftest.$ac_objext` in
1355edce3322Smrg      *MSB*)
1356edce3322Smrg	emul="${emul}btsmip"
1357edce3322Smrg	;;
1358edce3322Smrg      *LSB*)
1359edce3322Smrg	emul="${emul}ltsmip"
1360edce3322Smrg	;;
1361edce3322Smrg    esac
1362edce3322Smrg    case `/usr/bin/file conftest.$ac_objext` in
1363edce3322Smrg      *N32*)
1364edce3322Smrg	emul="${emul}n32"
1365edce3322Smrg	;;
1366edce3322Smrg    esac
1367edce3322Smrg    LD="${LD-ld} -m $emul"
1368edce3322Smrg  fi
1369edce3322Smrg  rm -rf conftest*
1370edce3322Smrg  ;;
1371edce3322Smrg
13729f00f3a1Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
13739f00f3a1Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1374edce3322Smrg  # Find out what ABI is being produced by ac_compile, and set linker
1375edce3322Smrg  # options accordingly.  Note that the listed cases only cover the
1376edce3322Smrg  # situations where additional linker options are needed (such as when
1377edce3322Smrg  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
1378edce3322Smrg  # vice versa); the common cases where no linker options are needed do
1379edce3322Smrg  # not appear in the list.
13809f00f3a1Smrg  echo 'int i;' > conftest.$ac_ext
13819f00f3a1Smrg  if AC_TRY_EVAL(ac_compile); then
13829f00f3a1Smrg    case `/usr/bin/file conftest.o` in
13839f00f3a1Smrg      *32-bit*)
13849f00f3a1Smrg	case $host in
13859f00f3a1Smrg	  x86_64-*kfreebsd*-gnu)
13869f00f3a1Smrg	    LD="${LD-ld} -m elf_i386_fbsd"
13879f00f3a1Smrg	    ;;
13889f00f3a1Smrg	  x86_64-*linux*)
13899f00f3a1Smrg	    case `/usr/bin/file conftest.o` in
13909f00f3a1Smrg	      *x86-64*)
13919f00f3a1Smrg		LD="${LD-ld} -m elf32_x86_64"
13929f00f3a1Smrg		;;
13939f00f3a1Smrg	      *)
13949f00f3a1Smrg		LD="${LD-ld} -m elf_i386"
13959f00f3a1Smrg		;;
13969f00f3a1Smrg	    esac
13979f00f3a1Smrg	    ;;
1398edce3322Smrg	  powerpc64le-*linux*)
13999f00f3a1Smrg	    LD="${LD-ld} -m elf32lppclinux"
14009f00f3a1Smrg	    ;;
1401edce3322Smrg	  powerpc64-*linux*)
14029f00f3a1Smrg	    LD="${LD-ld} -m elf32ppclinux"
14039f00f3a1Smrg	    ;;
14049f00f3a1Smrg	  s390x-*linux*)
14059f00f3a1Smrg	    LD="${LD-ld} -m elf_s390"
14069f00f3a1Smrg	    ;;
14079f00f3a1Smrg	  sparc64-*linux*)
14089f00f3a1Smrg	    LD="${LD-ld} -m elf32_sparc"
14099f00f3a1Smrg	    ;;
14109f00f3a1Smrg	esac
14119f00f3a1Smrg	;;
14129f00f3a1Smrg      *64-bit*)
14139f00f3a1Smrg	case $host in
14149f00f3a1Smrg	  x86_64-*kfreebsd*-gnu)
14159f00f3a1Smrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
14169f00f3a1Smrg	    ;;
14179f00f3a1Smrg	  x86_64-*linux*)
14189f00f3a1Smrg	    LD="${LD-ld} -m elf_x86_64"
14199f00f3a1Smrg	    ;;
1420edce3322Smrg	  powerpcle-*linux*)
14219f00f3a1Smrg	    LD="${LD-ld} -m elf64lppc"
14229f00f3a1Smrg	    ;;
1423edce3322Smrg	  powerpc-*linux*)
14249f00f3a1Smrg	    LD="${LD-ld} -m elf64ppc"
14259f00f3a1Smrg	    ;;
14269f00f3a1Smrg	  s390*-*linux*|s390*-*tpf*)
14279f00f3a1Smrg	    LD="${LD-ld} -m elf64_s390"
14289f00f3a1Smrg	    ;;
14299f00f3a1Smrg	  sparc*-*linux*)
14309f00f3a1Smrg	    LD="${LD-ld} -m elf64_sparc"
14319f00f3a1Smrg	    ;;
14329f00f3a1Smrg	esac
14339f00f3a1Smrg	;;
14349f00f3a1Smrg    esac
14359f00f3a1Smrg  fi
14369f00f3a1Smrg  rm -rf conftest*
14379f00f3a1Smrg  ;;
14389f00f3a1Smrg
14399f00f3a1Smrg*-*-sco3.2v5*)
14409f00f3a1Smrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1441edce3322Smrg  SAVE_CFLAGS=$CFLAGS
14429f00f3a1Smrg  CFLAGS="$CFLAGS -belf"
14439f00f3a1Smrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
14449f00f3a1Smrg    [AC_LANG_PUSH(C)
14459f00f3a1Smrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
14469f00f3a1Smrg     AC_LANG_POP])
1447edce3322Smrg  if test yes != "$lt_cv_cc_needs_belf"; then
14489f00f3a1Smrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1449edce3322Smrg    CFLAGS=$SAVE_CFLAGS
14509f00f3a1Smrg  fi
14519f00f3a1Smrg  ;;
14529f00f3a1Smrg*-*solaris*)
1453edce3322Smrg  # Find out what ABI is being produced by ac_compile, and set linker
1454edce3322Smrg  # options accordingly.
14559f00f3a1Smrg  echo 'int i;' > conftest.$ac_ext
14569f00f3a1Smrg  if AC_TRY_EVAL(ac_compile); then
14579f00f3a1Smrg    case `/usr/bin/file conftest.o` in
14589f00f3a1Smrg    *64-bit*)
14599f00f3a1Smrg      case $lt_cv_prog_gnu_ld in
14609f00f3a1Smrg      yes*)
14619f00f3a1Smrg        case $host in
1462edce3322Smrg        i?86-*-solaris*|x86_64-*-solaris*)
14639f00f3a1Smrg          LD="${LD-ld} -m elf_x86_64"
14649f00f3a1Smrg          ;;
14659f00f3a1Smrg        sparc*-*-solaris*)
14669f00f3a1Smrg          LD="${LD-ld} -m elf64_sparc"
14679f00f3a1Smrg          ;;
14689f00f3a1Smrg        esac
14699f00f3a1Smrg        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
14709f00f3a1Smrg        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
1471edce3322Smrg          LD=${LD-ld}_sol2
14729f00f3a1Smrg        fi
14739f00f3a1Smrg        ;;
14749f00f3a1Smrg      *)
14759f00f3a1Smrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
14769f00f3a1Smrg	  LD="${LD-ld} -64"
14779f00f3a1Smrg	fi
14789f00f3a1Smrg	;;
14799f00f3a1Smrg      esac
14809f00f3a1Smrg      ;;
14819f00f3a1Smrg    esac
14829f00f3a1Smrg  fi
14839f00f3a1Smrg  rm -rf conftest*
14849f00f3a1Smrg  ;;
14859f00f3a1Smrgesac
14869f00f3a1Smrg
1487edce3322Smrgneed_locks=$enable_libtool_lock
14889f00f3a1Smrg])# _LT_ENABLE_LOCK
14899f00f3a1Smrg
14909f00f3a1Smrg
14919f00f3a1Smrg# _LT_PROG_AR
14929f00f3a1Smrg# -----------
14939f00f3a1Smrgm4_defun([_LT_PROG_AR],
14949f00f3a1Smrg[AC_CHECK_TOOLS(AR, [ar], false)
14959f00f3a1Smrg: ${AR=ar}
14969f00f3a1Smrg: ${AR_FLAGS=cru}
14979f00f3a1Smrg_LT_DECL([], [AR], [1], [The archiver])
14989f00f3a1Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
14999f00f3a1Smrg
15009f00f3a1SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
15019f00f3a1Smrg  [lt_cv_ar_at_file=no
15029f00f3a1Smrg   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
15039f00f3a1Smrg     [echo conftest.$ac_objext > conftest.lst
15049f00f3a1Smrg      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
15059f00f3a1Smrg      AC_TRY_EVAL([lt_ar_try])
1506edce3322Smrg      if test 0 -eq "$ac_status"; then
15079f00f3a1Smrg	# Ensure the archiver fails upon bogus file names.
15089f00f3a1Smrg	rm -f conftest.$ac_objext libconftest.a
15099f00f3a1Smrg	AC_TRY_EVAL([lt_ar_try])
1510edce3322Smrg	if test 0 -ne "$ac_status"; then
15119f00f3a1Smrg          lt_cv_ar_at_file=@
15129f00f3a1Smrg        fi
15139f00f3a1Smrg      fi
15149f00f3a1Smrg      rm -f conftest.* libconftest.a
15159f00f3a1Smrg     ])
15169f00f3a1Smrg  ])
15179f00f3a1Smrg
1518edce3322Smrgif test no = "$lt_cv_ar_at_file"; then
15199f00f3a1Smrg  archiver_list_spec=
15209f00f3a1Smrgelse
15219f00f3a1Smrg  archiver_list_spec=$lt_cv_ar_at_file
15229f00f3a1Smrgfi
15239f00f3a1Smrg_LT_DECL([], [archiver_list_spec], [1],
15249f00f3a1Smrg  [How to feed a file listing to the archiver])
15259f00f3a1Smrg])# _LT_PROG_AR
15269f00f3a1Smrg
15279f00f3a1Smrg
15289f00f3a1Smrg# _LT_CMD_OLD_ARCHIVE
15299f00f3a1Smrg# -------------------
15309f00f3a1Smrgm4_defun([_LT_CMD_OLD_ARCHIVE],
15319f00f3a1Smrg[_LT_PROG_AR
15329f00f3a1Smrg
15339f00f3a1SmrgAC_CHECK_TOOL(STRIP, strip, :)
15349f00f3a1Smrgtest -z "$STRIP" && STRIP=:
15359f00f3a1Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
15369f00f3a1Smrg
15379f00f3a1SmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
15389f00f3a1Smrgtest -z "$RANLIB" && RANLIB=:
15399f00f3a1Smrg_LT_DECL([], [RANLIB], [1],
15409f00f3a1Smrg    [Commands used to install an old-style archive])
15419f00f3a1Smrg
15429f00f3a1Smrg# Determine commands to create old-style static archives.
15439f00f3a1Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
15449f00f3a1Smrgold_postinstall_cmds='chmod 644 $oldlib'
15459f00f3a1Smrgold_postuninstall_cmds=
15469f00f3a1Smrg
15479f00f3a1Smrgif test -n "$RANLIB"; then
15489f00f3a1Smrg  case $host_os in
1549edce3322Smrg  bitrig* | openbsd*)
15509f00f3a1Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
15519f00f3a1Smrg    ;;
15529f00f3a1Smrg  *)
15539f00f3a1Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
15549f00f3a1Smrg    ;;
15559f00f3a1Smrg  esac
15569f00f3a1Smrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
15579f00f3a1Smrgfi
15589f00f3a1Smrg
15599f00f3a1Smrgcase $host_os in
15609f00f3a1Smrg  darwin*)
15619f00f3a1Smrg    lock_old_archive_extraction=yes ;;
15629f00f3a1Smrg  *)
15639f00f3a1Smrg    lock_old_archive_extraction=no ;;
15649f00f3a1Smrgesac
15659f00f3a1Smrg_LT_DECL([], [old_postinstall_cmds], [2])
15669f00f3a1Smrg_LT_DECL([], [old_postuninstall_cmds], [2])
15679f00f3a1Smrg_LT_TAGDECL([], [old_archive_cmds], [2],
15689f00f3a1Smrg    [Commands used to build an old-style archive])
15699f00f3a1Smrg_LT_DECL([], [lock_old_archive_extraction], [0],
15709f00f3a1Smrg    [Whether to use a lock for old archive extraction])
15719f00f3a1Smrg])# _LT_CMD_OLD_ARCHIVE
15729f00f3a1Smrg
15739f00f3a1Smrg
15749f00f3a1Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
15759f00f3a1Smrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
15769f00f3a1Smrg# ----------------------------------------------------------------
15779f00f3a1Smrg# Check whether the given compiler option works
15789f00f3a1SmrgAC_DEFUN([_LT_COMPILER_OPTION],
15799f00f3a1Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
15809f00f3a1Smrgm4_require([_LT_DECL_SED])dnl
15819f00f3a1SmrgAC_CACHE_CHECK([$1], [$2],
15829f00f3a1Smrg  [$2=no
15839f00f3a1Smrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
15849f00f3a1Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1585edce3322Smrg   lt_compiler_flag="$3"  ## exclude from sc_useless_quotes_in_assignment
15869f00f3a1Smrg   # Insert the option either (1) after the last *FLAGS variable, or
15879f00f3a1Smrg   # (2) before a word containing "conftest.", or (3) at the end.
15889f00f3a1Smrg   # Note that $ac_compile itself does not contain backslashes and begins
15899f00f3a1Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
15909f00f3a1Smrg   # The option is referenced via a variable to avoid confusing sed.
15919f00f3a1Smrg   lt_compile=`echo "$ac_compile" | $SED \
15929f00f3a1Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
15939f00f3a1Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
15949f00f3a1Smrg   -e 's:$: $lt_compiler_flag:'`
15959f00f3a1Smrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
15969f00f3a1Smrg   (eval "$lt_compile" 2>conftest.err)
15979f00f3a1Smrg   ac_status=$?
15989f00f3a1Smrg   cat conftest.err >&AS_MESSAGE_LOG_FD
15999f00f3a1Smrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
16009f00f3a1Smrg   if (exit $ac_status) && test -s "$ac_outfile"; then
16019f00f3a1Smrg     # The compiler can only warn and ignore the option if not recognized
16029f00f3a1Smrg     # So say no if there are warnings other than the usual output.
16039f00f3a1Smrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
16049f00f3a1Smrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
16059f00f3a1Smrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
16069f00f3a1Smrg       $2=yes
16079f00f3a1Smrg     fi
16089f00f3a1Smrg   fi
16099f00f3a1Smrg   $RM conftest*
16109f00f3a1Smrg])
16119f00f3a1Smrg
1612edce3322Smrgif test yes = "[$]$2"; then
16139f00f3a1Smrg    m4_if([$5], , :, [$5])
16149f00f3a1Smrgelse
16159f00f3a1Smrg    m4_if([$6], , :, [$6])
16169f00f3a1Smrgfi
16179f00f3a1Smrg])# _LT_COMPILER_OPTION
16189f00f3a1Smrg
16199f00f3a1Smrg# Old name:
16209f00f3a1SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
16219f00f3a1Smrgdnl aclocal-1.4 backwards compatibility:
16229f00f3a1Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
16239f00f3a1Smrg
16249f00f3a1Smrg
16259f00f3a1Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
16269f00f3a1Smrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
16279f00f3a1Smrg# ----------------------------------------------------
16289f00f3a1Smrg# Check whether the given linker option works
16299f00f3a1SmrgAC_DEFUN([_LT_LINKER_OPTION],
16309f00f3a1Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
16319f00f3a1Smrgm4_require([_LT_DECL_SED])dnl
16329f00f3a1SmrgAC_CACHE_CHECK([$1], [$2],
16339f00f3a1Smrg  [$2=no
1634edce3322Smrg   save_LDFLAGS=$LDFLAGS
16359f00f3a1Smrg   LDFLAGS="$LDFLAGS $3"
16369f00f3a1Smrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
16379f00f3a1Smrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
16389f00f3a1Smrg     # The linker can only warn and ignore the option if not recognized
16399f00f3a1Smrg     # So say no if there are warnings
16409f00f3a1Smrg     if test -s conftest.err; then
16419f00f3a1Smrg       # Append any errors to the config.log.
16429f00f3a1Smrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
16439f00f3a1Smrg       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
16449f00f3a1Smrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
16459f00f3a1Smrg       if diff conftest.exp conftest.er2 >/dev/null; then
16469f00f3a1Smrg         $2=yes
16479f00f3a1Smrg       fi
16489f00f3a1Smrg     else
16499f00f3a1Smrg       $2=yes
16509f00f3a1Smrg     fi
16519f00f3a1Smrg   fi
16529f00f3a1Smrg   $RM -r conftest*
1653edce3322Smrg   LDFLAGS=$save_LDFLAGS
16549f00f3a1Smrg])
16559f00f3a1Smrg
1656edce3322Smrgif test yes = "[$]$2"; then
16579f00f3a1Smrg    m4_if([$4], , :, [$4])
16589f00f3a1Smrgelse
16599f00f3a1Smrg    m4_if([$5], , :, [$5])
16609f00f3a1Smrgfi
16619f00f3a1Smrg])# _LT_LINKER_OPTION
16629f00f3a1Smrg
16639f00f3a1Smrg# Old name:
16649f00f3a1SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
16659f00f3a1Smrgdnl aclocal-1.4 backwards compatibility:
16669f00f3a1Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
16679f00f3a1Smrg
16689f00f3a1Smrg
16699f00f3a1Smrg# LT_CMD_MAX_LEN
16709f00f3a1Smrg#---------------
16719f00f3a1SmrgAC_DEFUN([LT_CMD_MAX_LEN],
16729f00f3a1Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
16739f00f3a1Smrg# find the maximum length of command line arguments
16749f00f3a1SmrgAC_MSG_CHECKING([the maximum length of command line arguments])
16759f00f3a1SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
16769f00f3a1Smrg  i=0
1677edce3322Smrg  teststring=ABCD
16789f00f3a1Smrg
16799f00f3a1Smrg  case $build_os in
16809f00f3a1Smrg  msdosdjgpp*)
16819f00f3a1Smrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
16829f00f3a1Smrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
16839f00f3a1Smrg    # during glob expansion).  Even if it were fixed, the result of this
16849f00f3a1Smrg    # check would be larger than it should be.
16859f00f3a1Smrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
16869f00f3a1Smrg    ;;
16879f00f3a1Smrg
16889f00f3a1Smrg  gnu*)
16899f00f3a1Smrg    # Under GNU Hurd, this test is not required because there is
16909f00f3a1Smrg    # no limit to the length of command line arguments.
16919f00f3a1Smrg    # Libtool will interpret -1 as no limit whatsoever
16929f00f3a1Smrg    lt_cv_sys_max_cmd_len=-1;
16939f00f3a1Smrg    ;;
16949f00f3a1Smrg
16959f00f3a1Smrg  cygwin* | mingw* | cegcc*)
16969f00f3a1Smrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
16979f00f3a1Smrg    # about 5 minutes as the teststring grows exponentially.
16989f00f3a1Smrg    # Worse, since 9x/ME are not pre-emptively multitasking,
16999f00f3a1Smrg    # you end up with a "frozen" computer, even though with patience
17009f00f3a1Smrg    # the test eventually succeeds (with a max line length of 256k).
17019f00f3a1Smrg    # Instead, let's just punt: use the minimum linelength reported by
17029f00f3a1Smrg    # all of the supported platforms: 8192 (on NT/2K/XP).
17039f00f3a1Smrg    lt_cv_sys_max_cmd_len=8192;
17049f00f3a1Smrg    ;;
17059f00f3a1Smrg
17069f00f3a1Smrg  mint*)
17079f00f3a1Smrg    # On MiNT this can take a long time and run out of memory.
17089f00f3a1Smrg    lt_cv_sys_max_cmd_len=8192;
17099f00f3a1Smrg    ;;
17109f00f3a1Smrg
17119f00f3a1Smrg  amigaos*)
17129f00f3a1Smrg    # On AmigaOS with pdksh, this test takes hours, literally.
17139f00f3a1Smrg    # So we just punt and use a minimum line length of 8192.
17149f00f3a1Smrg    lt_cv_sys_max_cmd_len=8192;
17159f00f3a1Smrg    ;;
17169f00f3a1Smrg
1717edce3322Smrg  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
17189f00f3a1Smrg    # This has been around since 386BSD, at least.  Likely further.
17199f00f3a1Smrg    if test -x /sbin/sysctl; then
17209f00f3a1Smrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
17219f00f3a1Smrg    elif test -x /usr/sbin/sysctl; then
17229f00f3a1Smrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
17239f00f3a1Smrg    else
17249f00f3a1Smrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
17259f00f3a1Smrg    fi
17269f00f3a1Smrg    # And add a safety zone
17279f00f3a1Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
17289f00f3a1Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
17299f00f3a1Smrg    ;;
17309f00f3a1Smrg
17319f00f3a1Smrg  interix*)
17329f00f3a1Smrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
17339f00f3a1Smrg    lt_cv_sys_max_cmd_len=196608
17349f00f3a1Smrg    ;;
17359f00f3a1Smrg
17369f00f3a1Smrg  os2*)
17379f00f3a1Smrg    # The test takes a long time on OS/2.
17389f00f3a1Smrg    lt_cv_sys_max_cmd_len=8192
17399f00f3a1Smrg    ;;
17409f00f3a1Smrg
17419f00f3a1Smrg  osf*)
17429f00f3a1Smrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
17439f00f3a1Smrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
17449f00f3a1Smrg    # nice to cause kernel panics so lets avoid the loop below.
17459f00f3a1Smrg    # First set a reasonable default.
17469f00f3a1Smrg    lt_cv_sys_max_cmd_len=16384
17479f00f3a1Smrg    #
17489f00f3a1Smrg    if test -x /sbin/sysconfig; then
17499f00f3a1Smrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
17509f00f3a1Smrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
17519f00f3a1Smrg      esac
17529f00f3a1Smrg    fi
17539f00f3a1Smrg    ;;
17549f00f3a1Smrg  sco3.2v5*)
17559f00f3a1Smrg    lt_cv_sys_max_cmd_len=102400
17569f00f3a1Smrg    ;;
17579f00f3a1Smrg  sysv5* | sco5v6* | sysv4.2uw2*)
17589f00f3a1Smrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
17599f00f3a1Smrg    if test -n "$kargmax"; then
17609f00f3a1Smrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
17619f00f3a1Smrg    else
17629f00f3a1Smrg      lt_cv_sys_max_cmd_len=32768
17639f00f3a1Smrg    fi
17649f00f3a1Smrg    ;;
17659f00f3a1Smrg  *)
17669f00f3a1Smrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
17679f00f3a1Smrg    if test -n "$lt_cv_sys_max_cmd_len" && \
1768edce3322Smrg       test undefined != "$lt_cv_sys_max_cmd_len"; then
17699f00f3a1Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
17709f00f3a1Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
17719f00f3a1Smrg    else
17729f00f3a1Smrg      # Make teststring a little bigger before we do anything with it.
17739f00f3a1Smrg      # a 1K string should be a reasonable start.
1774edce3322Smrg      for i in 1 2 3 4 5 6 7 8; do
17759f00f3a1Smrg        teststring=$teststring$teststring
17769f00f3a1Smrg      done
17779f00f3a1Smrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
17789f00f3a1Smrg      # If test is not a shell built-in, we'll probably end up computing a
17799f00f3a1Smrg      # maximum length that is only half of the actual maximum length, but
17809f00f3a1Smrg      # we can't tell.
1781edce3322Smrg      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
17829f00f3a1Smrg	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1783edce3322Smrg	      test 17 != "$i" # 1/2 MB should be enough
17849f00f3a1Smrg      do
17859f00f3a1Smrg        i=`expr $i + 1`
17869f00f3a1Smrg        teststring=$teststring$teststring
17879f00f3a1Smrg      done
17889f00f3a1Smrg      # Only check the string length outside the loop.
17899f00f3a1Smrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
17909f00f3a1Smrg      teststring=
17919f00f3a1Smrg      # Add a significant safety factor because C++ compilers can tack on
17929f00f3a1Smrg      # massive amounts of additional arguments before passing them to the
17939f00f3a1Smrg      # linker.  It appears as though 1/2 is a usable value.
17949f00f3a1Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
17959f00f3a1Smrg    fi
17969f00f3a1Smrg    ;;
17979f00f3a1Smrg  esac
17989f00f3a1Smrg])
1799edce3322Smrgif test -n "$lt_cv_sys_max_cmd_len"; then
18009f00f3a1Smrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
18019f00f3a1Smrgelse
18029f00f3a1Smrg  AC_MSG_RESULT(none)
18039f00f3a1Smrgfi
18049f00f3a1Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len
18059f00f3a1Smrg_LT_DECL([], [max_cmd_len], [0],
18069f00f3a1Smrg    [What is the maximum length of a command?])
18079f00f3a1Smrg])# LT_CMD_MAX_LEN
18089f00f3a1Smrg
18099f00f3a1Smrg# Old name:
18109f00f3a1SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
18119f00f3a1Smrgdnl aclocal-1.4 backwards compatibility:
18129f00f3a1Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
18139f00f3a1Smrg
18149f00f3a1Smrg
18159f00f3a1Smrg# _LT_HEADER_DLFCN
18169f00f3a1Smrg# ----------------
18179f00f3a1Smrgm4_defun([_LT_HEADER_DLFCN],
18189f00f3a1Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
18199f00f3a1Smrg])# _LT_HEADER_DLFCN
18209f00f3a1Smrg
18219f00f3a1Smrg
18229f00f3a1Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
18239f00f3a1Smrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
18249f00f3a1Smrg# ----------------------------------------------------------------
18259f00f3a1Smrgm4_defun([_LT_TRY_DLOPEN_SELF],
18269f00f3a1Smrg[m4_require([_LT_HEADER_DLFCN])dnl
1827edce3322Smrgif test yes = "$cross_compiling"; then :
18289f00f3a1Smrg  [$4]
18299f00f3a1Smrgelse
18309f00f3a1Smrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
18319f00f3a1Smrg  lt_status=$lt_dlunknown
18329f00f3a1Smrg  cat > conftest.$ac_ext <<_LT_EOF
18339f00f3a1Smrg[#line $LINENO "configure"
18349f00f3a1Smrg#include "confdefs.h"
18359f00f3a1Smrg
18369f00f3a1Smrg#if HAVE_DLFCN_H
18379f00f3a1Smrg#include <dlfcn.h>
18389f00f3a1Smrg#endif
18399f00f3a1Smrg
18409f00f3a1Smrg#include <stdio.h>
18419f00f3a1Smrg
18429f00f3a1Smrg#ifdef RTLD_GLOBAL
18439f00f3a1Smrg#  define LT_DLGLOBAL		RTLD_GLOBAL
18449f00f3a1Smrg#else
18459f00f3a1Smrg#  ifdef DL_GLOBAL
18469f00f3a1Smrg#    define LT_DLGLOBAL		DL_GLOBAL
18479f00f3a1Smrg#  else
18489f00f3a1Smrg#    define LT_DLGLOBAL		0
18499f00f3a1Smrg#  endif
18509f00f3a1Smrg#endif
18519f00f3a1Smrg
18529f00f3a1Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
18539f00f3a1Smrg   find out it does not work in some platform. */
18549f00f3a1Smrg#ifndef LT_DLLAZY_OR_NOW
18559f00f3a1Smrg#  ifdef RTLD_LAZY
18569f00f3a1Smrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
18579f00f3a1Smrg#  else
18589f00f3a1Smrg#    ifdef DL_LAZY
18599f00f3a1Smrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
18609f00f3a1Smrg#    else
18619f00f3a1Smrg#      ifdef RTLD_NOW
18629f00f3a1Smrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
18639f00f3a1Smrg#      else
18649f00f3a1Smrg#        ifdef DL_NOW
18659f00f3a1Smrg#          define LT_DLLAZY_OR_NOW	DL_NOW
18669f00f3a1Smrg#        else
18679f00f3a1Smrg#          define LT_DLLAZY_OR_NOW	0
18689f00f3a1Smrg#        endif
18699f00f3a1Smrg#      endif
18709f00f3a1Smrg#    endif
18719f00f3a1Smrg#  endif
18729f00f3a1Smrg#endif
18739f00f3a1Smrg
1874edce3322Smrg/* When -fvisibility=hidden is used, assume the code has been annotated
18759f00f3a1Smrg   correspondingly for the symbols needed.  */
1876edce3322Smrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
18779f00f3a1Smrgint fnord () __attribute__((visibility("default")));
18789f00f3a1Smrg#endif
18799f00f3a1Smrg
18809f00f3a1Smrgint fnord () { return 42; }
18819f00f3a1Smrgint main ()
18829f00f3a1Smrg{
18839f00f3a1Smrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
18849f00f3a1Smrg  int status = $lt_dlunknown;
18859f00f3a1Smrg
18869f00f3a1Smrg  if (self)
18879f00f3a1Smrg    {
18889f00f3a1Smrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
18899f00f3a1Smrg      else
18909f00f3a1Smrg        {
18919f00f3a1Smrg	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
18929f00f3a1Smrg          else puts (dlerror ());
18939f00f3a1Smrg	}
18949f00f3a1Smrg      /* dlclose (self); */
18959f00f3a1Smrg    }
18969f00f3a1Smrg  else
18979f00f3a1Smrg    puts (dlerror ());
18989f00f3a1Smrg
18999f00f3a1Smrg  return status;
19009f00f3a1Smrg}]
19019f00f3a1Smrg_LT_EOF
1902edce3322Smrg  if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
19039f00f3a1Smrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
19049f00f3a1Smrg    lt_status=$?
19059f00f3a1Smrg    case x$lt_status in
19069f00f3a1Smrg      x$lt_dlno_uscore) $1 ;;
19079f00f3a1Smrg      x$lt_dlneed_uscore) $2 ;;
19089f00f3a1Smrg      x$lt_dlunknown|x*) $3 ;;
19099f00f3a1Smrg    esac
19109f00f3a1Smrg  else :
19119f00f3a1Smrg    # compilation failed
19129f00f3a1Smrg    $3
19139f00f3a1Smrg  fi
19149f00f3a1Smrgfi
19159f00f3a1Smrgrm -fr conftest*
19169f00f3a1Smrg])# _LT_TRY_DLOPEN_SELF
19179f00f3a1Smrg
19189f00f3a1Smrg
19199f00f3a1Smrg# LT_SYS_DLOPEN_SELF
19209f00f3a1Smrg# ------------------
19219f00f3a1SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
19229f00f3a1Smrg[m4_require([_LT_HEADER_DLFCN])dnl
1923edce3322Smrgif test yes != "$enable_dlopen"; then
19249f00f3a1Smrg  enable_dlopen=unknown
19259f00f3a1Smrg  enable_dlopen_self=unknown
19269f00f3a1Smrg  enable_dlopen_self_static=unknown
19279f00f3a1Smrgelse
19289f00f3a1Smrg  lt_cv_dlopen=no
19299f00f3a1Smrg  lt_cv_dlopen_libs=
19309f00f3a1Smrg
19319f00f3a1Smrg  case $host_os in
19329f00f3a1Smrg  beos*)
1933edce3322Smrg    lt_cv_dlopen=load_add_on
19349f00f3a1Smrg    lt_cv_dlopen_libs=
19359f00f3a1Smrg    lt_cv_dlopen_self=yes
19369f00f3a1Smrg    ;;
19379f00f3a1Smrg
19389f00f3a1Smrg  mingw* | pw32* | cegcc*)
1939edce3322Smrg    lt_cv_dlopen=LoadLibrary
19409f00f3a1Smrg    lt_cv_dlopen_libs=
19419f00f3a1Smrg    ;;
19429f00f3a1Smrg
19439f00f3a1Smrg  cygwin*)
1944edce3322Smrg    lt_cv_dlopen=dlopen
19459f00f3a1Smrg    lt_cv_dlopen_libs=
19469f00f3a1Smrg    ;;
19479f00f3a1Smrg
19489f00f3a1Smrg  darwin*)
1949edce3322Smrg    # if libdl is installed we need to link against it
19509f00f3a1Smrg    AC_CHECK_LIB([dl], [dlopen],
1951edce3322Smrg		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
1952edce3322Smrg    lt_cv_dlopen=dyld
19539f00f3a1Smrg    lt_cv_dlopen_libs=
19549f00f3a1Smrg    lt_cv_dlopen_self=yes
19559f00f3a1Smrg    ])
19569f00f3a1Smrg    ;;
19579f00f3a1Smrg
1958edce3322Smrg  tpf*)
1959edce3322Smrg    # Don't try to run any link tests for TPF.  We know it's impossible
1960edce3322Smrg    # because TPF is a cross-compiler, and we know how we open DSOs.
1961edce3322Smrg    lt_cv_dlopen=dlopen
1962edce3322Smrg    lt_cv_dlopen_libs=
1963edce3322Smrg    lt_cv_dlopen_self=no
1964edce3322Smrg    ;;
1965edce3322Smrg
19669f00f3a1Smrg  *)
19679f00f3a1Smrg    AC_CHECK_FUNC([shl_load],
1968edce3322Smrg	  [lt_cv_dlopen=shl_load],
19699f00f3a1Smrg      [AC_CHECK_LIB([dld], [shl_load],
1970edce3322Smrg	    [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
19719f00f3a1Smrg	[AC_CHECK_FUNC([dlopen],
1972edce3322Smrg	      [lt_cv_dlopen=dlopen],
19739f00f3a1Smrg	  [AC_CHECK_LIB([dl], [dlopen],
1974edce3322Smrg		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
19759f00f3a1Smrg	    [AC_CHECK_LIB([svld], [dlopen],
1976edce3322Smrg		  [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
19779f00f3a1Smrg	      [AC_CHECK_LIB([dld], [dld_link],
1978edce3322Smrg		    [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
19799f00f3a1Smrg	      ])
19809f00f3a1Smrg	    ])
19819f00f3a1Smrg	  ])
19829f00f3a1Smrg	])
19839f00f3a1Smrg      ])
19849f00f3a1Smrg    ;;
19859f00f3a1Smrg  esac
19869f00f3a1Smrg
1987edce3322Smrg  if test no = "$lt_cv_dlopen"; then
19889f00f3a1Smrg    enable_dlopen=no
1989edce3322Smrg  else
1990edce3322Smrg    enable_dlopen=yes
19919f00f3a1Smrg  fi
19929f00f3a1Smrg
19939f00f3a1Smrg  case $lt_cv_dlopen in
19949f00f3a1Smrg  dlopen)
1995edce3322Smrg    save_CPPFLAGS=$CPPFLAGS
1996edce3322Smrg    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
19979f00f3a1Smrg
1998edce3322Smrg    save_LDFLAGS=$LDFLAGS
19999f00f3a1Smrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
20009f00f3a1Smrg
2001edce3322Smrg    save_LIBS=$LIBS
20029f00f3a1Smrg    LIBS="$lt_cv_dlopen_libs $LIBS"
20039f00f3a1Smrg
20049f00f3a1Smrg    AC_CACHE_CHECK([whether a program can dlopen itself],
20059f00f3a1Smrg	  lt_cv_dlopen_self, [dnl
20069f00f3a1Smrg	  _LT_TRY_DLOPEN_SELF(
20079f00f3a1Smrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
20089f00f3a1Smrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
20099f00f3a1Smrg    ])
20109f00f3a1Smrg
2011edce3322Smrg    if test yes = "$lt_cv_dlopen_self"; then
20129f00f3a1Smrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
20139f00f3a1Smrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
20149f00f3a1Smrg	  lt_cv_dlopen_self_static, [dnl
20159f00f3a1Smrg	  _LT_TRY_DLOPEN_SELF(
20169f00f3a1Smrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
20179f00f3a1Smrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
20189f00f3a1Smrg      ])
20199f00f3a1Smrg    fi
20209f00f3a1Smrg
2021edce3322Smrg    CPPFLAGS=$save_CPPFLAGS
2022edce3322Smrg    LDFLAGS=$save_LDFLAGS
2023edce3322Smrg    LIBS=$save_LIBS
20249f00f3a1Smrg    ;;
20259f00f3a1Smrg  esac
20269f00f3a1Smrg
20279f00f3a1Smrg  case $lt_cv_dlopen_self in
20289f00f3a1Smrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
20299f00f3a1Smrg  *) enable_dlopen_self=unknown ;;
20309f00f3a1Smrg  esac
20319f00f3a1Smrg
20329f00f3a1Smrg  case $lt_cv_dlopen_self_static in
20339f00f3a1Smrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
20349f00f3a1Smrg  *) enable_dlopen_self_static=unknown ;;
20359f00f3a1Smrg  esac
20369f00f3a1Smrgfi
20379f00f3a1Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
20389f00f3a1Smrg	 [Whether dlopen is supported])
20399f00f3a1Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
20409f00f3a1Smrg	 [Whether dlopen of programs is supported])
20419f00f3a1Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
20429f00f3a1Smrg	 [Whether dlopen of statically linked programs is supported])
20439f00f3a1Smrg])# LT_SYS_DLOPEN_SELF
20449f00f3a1Smrg
20459f00f3a1Smrg# Old name:
20469f00f3a1SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
20479f00f3a1Smrgdnl aclocal-1.4 backwards compatibility:
20489f00f3a1Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
20499f00f3a1Smrg
20509f00f3a1Smrg
20519f00f3a1Smrg# _LT_COMPILER_C_O([TAGNAME])
20529f00f3a1Smrg# ---------------------------
20539f00f3a1Smrg# Check to see if options -c and -o are simultaneously supported by compiler.
20549f00f3a1Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
20559f00f3a1Smrgm4_defun([_LT_COMPILER_C_O],
20569f00f3a1Smrg[m4_require([_LT_DECL_SED])dnl
20579f00f3a1Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
20589f00f3a1Smrgm4_require([_LT_TAG_COMPILER])dnl
20599f00f3a1SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
20609f00f3a1Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
20619f00f3a1Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
20629f00f3a1Smrg   $RM -r conftest 2>/dev/null
20639f00f3a1Smrg   mkdir conftest
20649f00f3a1Smrg   cd conftest
20659f00f3a1Smrg   mkdir out
20669f00f3a1Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
20679f00f3a1Smrg
20689f00f3a1Smrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
20699f00f3a1Smrg   # Insert the option either (1) after the last *FLAGS variable, or
20709f00f3a1Smrg   # (2) before a word containing "conftest.", or (3) at the end.
20719f00f3a1Smrg   # Note that $ac_compile itself does not contain backslashes and begins
20729f00f3a1Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
20739f00f3a1Smrg   lt_compile=`echo "$ac_compile" | $SED \
20749f00f3a1Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
20759f00f3a1Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
20769f00f3a1Smrg   -e 's:$: $lt_compiler_flag:'`
20779f00f3a1Smrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
20789f00f3a1Smrg   (eval "$lt_compile" 2>out/conftest.err)
20799f00f3a1Smrg   ac_status=$?
20809f00f3a1Smrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
20819f00f3a1Smrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
20829f00f3a1Smrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
20839f00f3a1Smrg   then
20849f00f3a1Smrg     # The compiler can only warn and ignore the option if not recognized
20859f00f3a1Smrg     # So say no if there are warnings
20869f00f3a1Smrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
20879f00f3a1Smrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
20889f00f3a1Smrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
20899f00f3a1Smrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
20909f00f3a1Smrg     fi
20919f00f3a1Smrg   fi
20929f00f3a1Smrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
20939f00f3a1Smrg   $RM conftest*
20949f00f3a1Smrg   # SGI C++ compiler will create directory out/ii_files/ for
20959f00f3a1Smrg   # template instantiation
20969f00f3a1Smrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
20979f00f3a1Smrg   $RM out/* && rmdir out
20989f00f3a1Smrg   cd ..
20999f00f3a1Smrg   $RM -r conftest
21009f00f3a1Smrg   $RM conftest*
21019f00f3a1Smrg])
21029f00f3a1Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
21039f00f3a1Smrg	[Does compiler simultaneously support -c and -o options?])
21049f00f3a1Smrg])# _LT_COMPILER_C_O
21059f00f3a1Smrg
21069f00f3a1Smrg
21079f00f3a1Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
21089f00f3a1Smrg# ----------------------------------
21099f00f3a1Smrg# Check to see if we can do hard links to lock some files if needed
21109f00f3a1Smrgm4_defun([_LT_COMPILER_FILE_LOCKS],
21119f00f3a1Smrg[m4_require([_LT_ENABLE_LOCK])dnl
21129f00f3a1Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
21139f00f3a1Smrg_LT_COMPILER_C_O([$1])
21149f00f3a1Smrg
2115edce3322Smrghard_links=nottested
2116edce3322Smrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
21179f00f3a1Smrg  # do not overwrite the value of need_locks provided by the user
21189f00f3a1Smrg  AC_MSG_CHECKING([if we can lock with hard links])
21199f00f3a1Smrg  hard_links=yes
21209f00f3a1Smrg  $RM conftest*
21219f00f3a1Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
21229f00f3a1Smrg  touch conftest.a
21239f00f3a1Smrg  ln conftest.a conftest.b 2>&5 || hard_links=no
21249f00f3a1Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
21259f00f3a1Smrg  AC_MSG_RESULT([$hard_links])
2126edce3322Smrg  if test no = "$hard_links"; then
2127edce3322Smrg    AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
21289f00f3a1Smrg    need_locks=warn
21299f00f3a1Smrg  fi
21309f00f3a1Smrgelse
21319f00f3a1Smrg  need_locks=no
21329f00f3a1Smrgfi
21339f00f3a1Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
21349f00f3a1Smrg])# _LT_COMPILER_FILE_LOCKS
21359f00f3a1Smrg
21369f00f3a1Smrg
21379f00f3a1Smrg# _LT_CHECK_OBJDIR
21389f00f3a1Smrg# ----------------
21399f00f3a1Smrgm4_defun([_LT_CHECK_OBJDIR],
21409f00f3a1Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
21419f00f3a1Smrg[rm -f .libs 2>/dev/null
21429f00f3a1Smrgmkdir .libs 2>/dev/null
21439f00f3a1Smrgif test -d .libs; then
21449f00f3a1Smrg  lt_cv_objdir=.libs
21459f00f3a1Smrgelse
21469f00f3a1Smrg  # MS-DOS does not allow filenames that begin with a dot.
21479f00f3a1Smrg  lt_cv_objdir=_libs
21489f00f3a1Smrgfi
21499f00f3a1Smrgrmdir .libs 2>/dev/null])
21509f00f3a1Smrgobjdir=$lt_cv_objdir
21519f00f3a1Smrg_LT_DECL([], [objdir], [0],
21529f00f3a1Smrg         [The name of the directory that contains temporary libtool files])dnl
21539f00f3a1Smrgm4_pattern_allow([LT_OBJDIR])dnl
2154edce3322SmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
2155edce3322Smrg  [Define to the sub-directory where libtool stores uninstalled libraries.])
21569f00f3a1Smrg])# _LT_CHECK_OBJDIR
21579f00f3a1Smrg
21589f00f3a1Smrg
21599f00f3a1Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
21609f00f3a1Smrg# --------------------------------------
21619f00f3a1Smrg# Check hardcoding attributes.
21629f00f3a1Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
21639f00f3a1Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
21649f00f3a1Smrg_LT_TAGVAR(hardcode_action, $1)=
21659f00f3a1Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
21669f00f3a1Smrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2167edce3322Smrg   test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
21689f00f3a1Smrg
21699f00f3a1Smrg  # We can hardcode non-existent directories.
2170edce3322Smrg  if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
21719f00f3a1Smrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
21729f00f3a1Smrg     # have to relink, otherwise we might link with an installed library
21739f00f3a1Smrg     # when we should be linking with a yet-to-be-installed one
2174edce3322Smrg     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
2175edce3322Smrg     test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
21769f00f3a1Smrg    # Linking always hardcodes the temporary library directory.
21779f00f3a1Smrg    _LT_TAGVAR(hardcode_action, $1)=relink
21789f00f3a1Smrg  else
21799f00f3a1Smrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
21809f00f3a1Smrg    _LT_TAGVAR(hardcode_action, $1)=immediate
21819f00f3a1Smrg  fi
21829f00f3a1Smrgelse
21839f00f3a1Smrg  # We cannot hardcode anything, or else we can only hardcode existing
21849f00f3a1Smrg  # directories.
21859f00f3a1Smrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
21869f00f3a1Smrgfi
21879f00f3a1SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
21889f00f3a1Smrg
2189edce3322Smrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
2190edce3322Smrg   test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
21919f00f3a1Smrg  # Fast installation is not supported
21929f00f3a1Smrg  enable_fast_install=no
2193edce3322Smrgelif test yes = "$shlibpath_overrides_runpath" ||
2194edce3322Smrg     test no = "$enable_shared"; then
21959f00f3a1Smrg  # Fast installation is not necessary
21969f00f3a1Smrg  enable_fast_install=needless
21979f00f3a1Smrgfi
21989f00f3a1Smrg_LT_TAGDECL([], [hardcode_action], [0],
21999f00f3a1Smrg    [How to hardcode a shared library path into an executable])
22009f00f3a1Smrg])# _LT_LINKER_HARDCODE_LIBPATH
22019f00f3a1Smrg
22029f00f3a1Smrg
22039f00f3a1Smrg# _LT_CMD_STRIPLIB
22049f00f3a1Smrg# ----------------
22059f00f3a1Smrgm4_defun([_LT_CMD_STRIPLIB],
22069f00f3a1Smrg[m4_require([_LT_DECL_EGREP])
22079f00f3a1Smrgstriplib=
22089f00f3a1Smrgold_striplib=
22099f00f3a1SmrgAC_MSG_CHECKING([whether stripping libraries is possible])
22109f00f3a1Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
22119f00f3a1Smrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
22129f00f3a1Smrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
22139f00f3a1Smrg  AC_MSG_RESULT([yes])
22149f00f3a1Smrgelse
22159f00f3a1Smrg# FIXME - insert some real tests, host_os isn't really good enough
22169f00f3a1Smrg  case $host_os in
22179f00f3a1Smrg  darwin*)
2218edce3322Smrg    if test -n "$STRIP"; then
22199f00f3a1Smrg      striplib="$STRIP -x"
22209f00f3a1Smrg      old_striplib="$STRIP -S"
22219f00f3a1Smrg      AC_MSG_RESULT([yes])
22229f00f3a1Smrg    else
22239f00f3a1Smrg      AC_MSG_RESULT([no])
22249f00f3a1Smrg    fi
22259f00f3a1Smrg    ;;
22269f00f3a1Smrg  *)
22279f00f3a1Smrg    AC_MSG_RESULT([no])
22289f00f3a1Smrg    ;;
22299f00f3a1Smrg  esac
22309f00f3a1Smrgfi
22319f00f3a1Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
22329f00f3a1Smrg_LT_DECL([], [striplib], [1])
22339f00f3a1Smrg])# _LT_CMD_STRIPLIB
22349f00f3a1Smrg
22359f00f3a1Smrg
2236edce3322Smrg# _LT_PREPARE_MUNGE_PATH_LIST
2237edce3322Smrg# ---------------------------
2238edce3322Smrg# Make sure func_munge_path_list() is defined correctly.
2239edce3322Smrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
2240edce3322Smrg[[# func_munge_path_list VARIABLE PATH
2241edce3322Smrg# -----------------------------------
2242edce3322Smrg# VARIABLE is name of variable containing _space_ separated list of
2243edce3322Smrg# directories to be munged by the contents of PATH, which is string
2244edce3322Smrg# having a format:
2245edce3322Smrg# "DIR[:DIR]:"
2246edce3322Smrg#       string "DIR[ DIR]" will be prepended to VARIABLE
2247edce3322Smrg# ":DIR[:DIR]"
2248edce3322Smrg#       string "DIR[ DIR]" will be appended to VARIABLE
2249edce3322Smrg# "DIRP[:DIRP]::[DIRA:]DIRA"
2250edce3322Smrg#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
2251edce3322Smrg#       "DIRA[ DIRA]" will be appended to VARIABLE
2252edce3322Smrg# "DIR[:DIR]"
2253edce3322Smrg#       VARIABLE will be replaced by "DIR[ DIR]"
2254edce3322Smrgfunc_munge_path_list ()
2255edce3322Smrg{
2256edce3322Smrg    case x@S|@2 in
2257edce3322Smrg    x)
2258edce3322Smrg        ;;
2259edce3322Smrg    *:)
2260edce3322Smrg        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
2261edce3322Smrg        ;;
2262edce3322Smrg    x:*)
2263edce3322Smrg        eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
2264edce3322Smrg        ;;
2265edce3322Smrg    *::*)
2266edce3322Smrg        eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
2267edce3322Smrg        eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
2268edce3322Smrg        ;;
2269edce3322Smrg    *)
2270edce3322Smrg        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
2271edce3322Smrg        ;;
2272edce3322Smrg    esac
2273edce3322Smrg}
2274edce3322Smrg]])# _LT_PREPARE_PATH_LIST
2275edce3322Smrg
2276edce3322Smrg
22779f00f3a1Smrg# _LT_SYS_DYNAMIC_LINKER([TAG])
22789f00f3a1Smrg# -----------------------------
22799f00f3a1Smrg# PORTME Fill in your ld.so characteristics
22809f00f3a1Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
22819f00f3a1Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
22829f00f3a1Smrgm4_require([_LT_DECL_EGREP])dnl
22839f00f3a1Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
22849f00f3a1Smrgm4_require([_LT_DECL_OBJDUMP])dnl
22859f00f3a1Smrgm4_require([_LT_DECL_SED])dnl
22869f00f3a1Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
2287edce3322Smrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
22889f00f3a1SmrgAC_MSG_CHECKING([dynamic linker characteristics])
22899f00f3a1Smrgm4_if([$1],
22909f00f3a1Smrg	[], [
2291edce3322Smrgif test yes = "$GCC"; then
22929f00f3a1Smrg  case $host_os in
2293edce3322Smrg    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
2294edce3322Smrg    *) lt_awk_arg='/^libraries:/' ;;
22959f00f3a1Smrg  esac
22969f00f3a1Smrg  case $host_os in
2297edce3322Smrg    mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
2298edce3322Smrg    *) lt_sed_strip_eq='s|=/|/|g' ;;
22999f00f3a1Smrg  esac
23009f00f3a1Smrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
23019f00f3a1Smrg  case $lt_search_path_spec in
23029f00f3a1Smrg  *\;*)
23039f00f3a1Smrg    # if the path contains ";" then we assume it to be the separator
23049f00f3a1Smrg    # otherwise default to the standard path separator (i.e. ":") - it is
23059f00f3a1Smrg    # assumed that no part of a normal pathname contains ";" but that should
23069f00f3a1Smrg    # okay in the real world where ";" in dirpaths is itself problematic.
23079f00f3a1Smrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
23089f00f3a1Smrg    ;;
23099f00f3a1Smrg  *)
23109f00f3a1Smrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
23119f00f3a1Smrg    ;;
23129f00f3a1Smrg  esac
23139f00f3a1Smrg  # Ok, now we have the path, separated by spaces, we can step through it
2314edce3322Smrg  # and add multilib dir if necessary...
23159f00f3a1Smrg  lt_tmp_lt_search_path_spec=
2316edce3322Smrg  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2317edce3322Smrg  # ...but if some path component already ends with the multilib dir we assume
2318edce3322Smrg  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
2319edce3322Smrg  case "$lt_multi_os_dir; $lt_search_path_spec " in
2320edce3322Smrg  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
2321edce3322Smrg    lt_multi_os_dir=
2322edce3322Smrg    ;;
2323edce3322Smrg  esac
23249f00f3a1Smrg  for lt_sys_path in $lt_search_path_spec; do
2325edce3322Smrg    if test -d "$lt_sys_path$lt_multi_os_dir"; then
2326edce3322Smrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
2327edce3322Smrg    elif test -n "$lt_multi_os_dir"; then
23289f00f3a1Smrg      test -d "$lt_sys_path" && \
23299f00f3a1Smrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
23309f00f3a1Smrg    fi
23319f00f3a1Smrg  done
23329f00f3a1Smrg  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2333edce3322SmrgBEGIN {RS = " "; FS = "/|\n";} {
2334edce3322Smrg  lt_foo = "";
2335edce3322Smrg  lt_count = 0;
23369f00f3a1Smrg  for (lt_i = NF; lt_i > 0; lt_i--) {
23379f00f3a1Smrg    if ($lt_i != "" && $lt_i != ".") {
23389f00f3a1Smrg      if ($lt_i == "..") {
23399f00f3a1Smrg        lt_count++;
23409f00f3a1Smrg      } else {
23419f00f3a1Smrg        if (lt_count == 0) {
2342edce3322Smrg          lt_foo = "/" $lt_i lt_foo;
23439f00f3a1Smrg        } else {
23449f00f3a1Smrg          lt_count--;
23459f00f3a1Smrg        }
23469f00f3a1Smrg      }
23479f00f3a1Smrg    }
23489f00f3a1Smrg  }
23499f00f3a1Smrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
23509f00f3a1Smrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
23519f00f3a1Smrg}'`
23529f00f3a1Smrg  # AWK program above erroneously prepends '/' to C:/dos/paths
23539f00f3a1Smrg  # for these hosts.
23549f00f3a1Smrg  case $host_os in
23559f00f3a1Smrg    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2356edce3322Smrg      $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
23579f00f3a1Smrg  esac
23589f00f3a1Smrg  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
23599f00f3a1Smrgelse
23609f00f3a1Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
23619f00f3a1Smrgfi])
23629f00f3a1Smrglibrary_names_spec=
23639f00f3a1Smrglibname_spec='lib$name'
23649f00f3a1Smrgsoname_spec=
2365edce3322Smrgshrext_cmds=.so
23669f00f3a1Smrgpostinstall_cmds=
23679f00f3a1Smrgpostuninstall_cmds=
23689f00f3a1Smrgfinish_cmds=
23699f00f3a1Smrgfinish_eval=
23709f00f3a1Smrgshlibpath_var=
23719f00f3a1Smrgshlibpath_overrides_runpath=unknown
23729f00f3a1Smrgversion_type=none
23739f00f3a1Smrgdynamic_linker="$host_os ld.so"
23749f00f3a1Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
23759f00f3a1Smrgneed_lib_prefix=unknown
23769f00f3a1Smrghardcode_into_libs=no
23779f00f3a1Smrg
23789f00f3a1Smrg# when you set need_version to no, make sure it does not cause -set_version
23799f00f3a1Smrg# flags to be left without arguments
23809f00f3a1Smrgneed_version=unknown
23819f00f3a1Smrg
2382edce3322SmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH],
2383edce3322Smrg[User-defined run-time library search path.])
2384edce3322Smrg
23859f00f3a1Smrgcase $host_os in
23869f00f3a1Smrgaix3*)
23879f00f3a1Smrg  version_type=linux # correct to gnu/linux during the next big refactor
2388edce3322Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
23899f00f3a1Smrg  shlibpath_var=LIBPATH
23909f00f3a1Smrg
23919f00f3a1Smrg  # AIX 3 has no versioning support, so we append a major version to the name.
2392edce3322Smrg  soname_spec='$libname$release$shared_ext$major'
23939f00f3a1Smrg  ;;
23949f00f3a1Smrg
23959f00f3a1Smrgaix[[4-9]]*)
23969f00f3a1Smrg  version_type=linux # correct to gnu/linux during the next big refactor
23979f00f3a1Smrg  need_lib_prefix=no
23989f00f3a1Smrg  need_version=no
23999f00f3a1Smrg  hardcode_into_libs=yes
2400edce3322Smrg  if test ia64 = "$host_cpu"; then
24019f00f3a1Smrg    # AIX 5 supports IA64
2402edce3322Smrg    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
24039f00f3a1Smrg    shlibpath_var=LD_LIBRARY_PATH
24049f00f3a1Smrg  else
24059f00f3a1Smrg    # With GCC up to 2.95.x, collect2 would create an import file
24069f00f3a1Smrg    # for dependence libraries.  The import file would start with
2407edce3322Smrg    # the line '#! .'.  This would cause the generated library to
2408edce3322Smrg    # depend on '.', always an invalid library.  This was fixed in
24099f00f3a1Smrg    # development snapshots of GCC prior to 3.0.
24109f00f3a1Smrg    case $host_os in
24119f00f3a1Smrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
24129f00f3a1Smrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
24139f00f3a1Smrg	   echo ' yes '
2414edce3322Smrg	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
24159f00f3a1Smrg	:
24169f00f3a1Smrg      else
24179f00f3a1Smrg	can_build_shared=no
24189f00f3a1Smrg      fi
24199f00f3a1Smrg      ;;
24209f00f3a1Smrg    esac
2421edce3322Smrg    # Using Import Files as archive members, it is possible to support
2422edce3322Smrg    # filename-based versioning of shared library archives on AIX. While
2423edce3322Smrg    # this would work for both with and without runtime linking, it will
2424edce3322Smrg    # prevent static linking of such archives. So we do filename-based
2425edce3322Smrg    # shared library versioning with .so extension only, which is used
2426edce3322Smrg    # when both runtime linking and shared linking is enabled.
2427edce3322Smrg    # Unfortunately, runtime linking may impact performance, so we do
2428edce3322Smrg    # not want this to be the default eventually. Also, we use the
2429edce3322Smrg    # versioned .so libs for executables only if there is the -brtl
2430edce3322Smrg    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
2431edce3322Smrg    # To allow for filename-based versioning support, we need to create
2432edce3322Smrg    # libNAME.so.V as an archive file, containing:
2433edce3322Smrg    # *) an Import File, referring to the versioned filename of the
2434edce3322Smrg    #    archive as well as the shared archive member, telling the
2435edce3322Smrg    #    bitwidth (32 or 64) of that shared object, and providing the
2436edce3322Smrg    #    list of exported symbols of that shared object, eventually
2437edce3322Smrg    #    decorated with the 'weak' keyword
2438edce3322Smrg    # *) the shared object with the F_LOADONLY flag set, to really avoid
2439edce3322Smrg    #    it being seen by the linker.
2440edce3322Smrg    # At run time we better use the real file rather than another symlink,
2441edce3322Smrg    # but for link time we create the symlink libNAME.so -> libNAME.so.V
2442edce3322Smrg
2443edce3322Smrg    case $with_aix_soname,$aix_use_runtimelinking in
2444edce3322Smrg    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
24459f00f3a1Smrg    # soname into executable. Probably we can add versioning support to
24469f00f3a1Smrg    # collect2, so additional links can be useful in future.
2447edce3322Smrg    aix,yes) # traditional libtool
2448edce3322Smrg      dynamic_linker='AIX unversionable lib.so'
24499f00f3a1Smrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
24509f00f3a1Smrg      # instead of lib<name>.a to let people know that these are not
24519f00f3a1Smrg      # typical AIX shared libraries.
2452edce3322Smrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2453edce3322Smrg      ;;
2454edce3322Smrg    aix,no) # traditional AIX only
2455edce3322Smrg      dynamic_linker='AIX lib.a[(]lib.so.V[)]'
24569f00f3a1Smrg      # We preserve .a as extension for shared libraries through AIX4.2
24579f00f3a1Smrg      # and later when we are not doing run time linking.
2458edce3322Smrg      library_names_spec='$libname$release.a $libname.a'
2459edce3322Smrg      soname_spec='$libname$release$shared_ext$major'
2460edce3322Smrg      ;;
2461edce3322Smrg    svr4,*) # full svr4 only
2462edce3322Smrg      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
2463edce3322Smrg      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2464edce3322Smrg      # We do not specify a path in Import Files, so LIBPATH fires.
2465edce3322Smrg      shlibpath_overrides_runpath=yes
2466edce3322Smrg      ;;
2467edce3322Smrg    *,yes) # both, prefer svr4
2468edce3322Smrg      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
2469edce3322Smrg      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2470edce3322Smrg      # unpreferred sharedlib libNAME.a needs extra handling
2471edce3322Smrg      postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
2472edce3322Smrg      postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
2473edce3322Smrg      # We do not specify a path in Import Files, so LIBPATH fires.
2474edce3322Smrg      shlibpath_overrides_runpath=yes
2475edce3322Smrg      ;;
2476edce3322Smrg    *,no) # both, prefer aix
2477edce3322Smrg      dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
2478edce3322Smrg      library_names_spec='$libname$release.a $libname.a'
2479edce3322Smrg      soname_spec='$libname$release$shared_ext$major'
2480edce3322Smrg      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
2481edce3322Smrg      postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
2482edce3322Smrg      postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
2483edce3322Smrg      ;;
2484edce3322Smrg    esac
24859f00f3a1Smrg    shlibpath_var=LIBPATH
24869f00f3a1Smrg  fi
24879f00f3a1Smrg  ;;
24889f00f3a1Smrg
24899f00f3a1Smrgamigaos*)
24909f00f3a1Smrg  case $host_cpu in
24919f00f3a1Smrg  powerpc)
24929f00f3a1Smrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
24939f00f3a1Smrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2494edce3322Smrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
24959f00f3a1Smrg    ;;
24969f00f3a1Smrg  m68k)
24979f00f3a1Smrg    library_names_spec='$libname.ixlibrary $libname.a'
24989f00f3a1Smrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
2499edce3322Smrg    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
25009f00f3a1Smrg    ;;
25019f00f3a1Smrg  esac
25029f00f3a1Smrg  ;;
25039f00f3a1Smrg
25049f00f3a1Smrgbeos*)
2505edce3322Smrg  library_names_spec='$libname$shared_ext'
25069f00f3a1Smrg  dynamic_linker="$host_os ld.so"
25079f00f3a1Smrg  shlibpath_var=LIBRARY_PATH
25089f00f3a1Smrg  ;;
25099f00f3a1Smrg
25109f00f3a1Smrgbsdi[[45]]*)
25119f00f3a1Smrg  version_type=linux # correct to gnu/linux during the next big refactor
25129f00f3a1Smrg  need_version=no
2513edce3322Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2514edce3322Smrg  soname_spec='$libname$release$shared_ext$major'
25159f00f3a1Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
25169f00f3a1Smrg  shlibpath_var=LD_LIBRARY_PATH
25179f00f3a1Smrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
25189f00f3a1Smrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
25199f00f3a1Smrg  # the default ld.so.conf also contains /usr/contrib/lib and
25209f00f3a1Smrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
25219f00f3a1Smrg  # libtool to hard-code these into programs
25229f00f3a1Smrg  ;;
25239f00f3a1Smrg
25249f00f3a1Smrgcygwin* | mingw* | pw32* | cegcc*)
25259f00f3a1Smrg  version_type=windows
2526edce3322Smrg  shrext_cmds=.dll
25279f00f3a1Smrg  need_version=no
25289f00f3a1Smrg  need_lib_prefix=no
25299f00f3a1Smrg
25309f00f3a1Smrg  case $GCC,$cc_basename in
25319f00f3a1Smrg  yes,*)
25329f00f3a1Smrg    # gcc
25339f00f3a1Smrg    library_names_spec='$libname.dll.a'
25349f00f3a1Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2535edce3322Smrg    postinstall_cmds='base_file=`basename \$file`~
2536edce3322Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
25379f00f3a1Smrg      dldir=$destdir/`dirname \$dlpath`~
25389f00f3a1Smrg      test -d \$dldir || mkdir -p \$dldir~
25399f00f3a1Smrg      $install_prog $dir/$dlname \$dldir/$dlname~
25409f00f3a1Smrg      chmod a+x \$dldir/$dlname~
25419f00f3a1Smrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
25429f00f3a1Smrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
25439f00f3a1Smrg      fi'
25449f00f3a1Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
25459f00f3a1Smrg      dlpath=$dir/\$dldll~
25469f00f3a1Smrg       $RM \$dlpath'
25479f00f3a1Smrg    shlibpath_overrides_runpath=yes
25489f00f3a1Smrg
25499f00f3a1Smrg    case $host_os in
25509f00f3a1Smrg    cygwin*)
25519f00f3a1Smrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2552edce3322Smrg      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
25539f00f3a1Smrgm4_if([$1], [],[
25549f00f3a1Smrg      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
25559f00f3a1Smrg      ;;
25569f00f3a1Smrg    mingw* | cegcc*)
25579f00f3a1Smrg      # MinGW DLLs use traditional 'lib' prefix
2558edce3322Smrg      soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
25599f00f3a1Smrg      ;;
25609f00f3a1Smrg    pw32*)
25619f00f3a1Smrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
2562edce3322Smrg      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
25639f00f3a1Smrg      ;;
25649f00f3a1Smrg    esac
25659f00f3a1Smrg    dynamic_linker='Win32 ld.exe'
25669f00f3a1Smrg    ;;
25679f00f3a1Smrg
25689f00f3a1Smrg  *,cl*)
25699f00f3a1Smrg    # Native MSVC
25709f00f3a1Smrg    libname_spec='$name'
2571edce3322Smrg    soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2572edce3322Smrg    library_names_spec='$libname.dll.lib'
25739f00f3a1Smrg
25749f00f3a1Smrg    case $build_os in
25759f00f3a1Smrg    mingw*)
25769f00f3a1Smrg      sys_lib_search_path_spec=
25779f00f3a1Smrg      lt_save_ifs=$IFS
25789f00f3a1Smrg      IFS=';'
25799f00f3a1Smrg      for lt_path in $LIB
25809f00f3a1Smrg      do
25819f00f3a1Smrg        IFS=$lt_save_ifs
25829f00f3a1Smrg        # Let DOS variable expansion print the short 8.3 style file name.
25839f00f3a1Smrg        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
25849f00f3a1Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
25859f00f3a1Smrg      done
25869f00f3a1Smrg      IFS=$lt_save_ifs
25879f00f3a1Smrg      # Convert to MSYS style.
25889f00f3a1Smrg      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
25899f00f3a1Smrg      ;;
25909f00f3a1Smrg    cygwin*)
25919f00f3a1Smrg      # Convert to unix form, then to dos form, then back to unix form
25929f00f3a1Smrg      # but this time dos style (no spaces!) so that the unix form looks
25939f00f3a1Smrg      # like /cygdrive/c/PROGRA~1:/cygdr...
25949f00f3a1Smrg      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
25959f00f3a1Smrg      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
25969f00f3a1Smrg      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
25979f00f3a1Smrg      ;;
25989f00f3a1Smrg    *)
2599edce3322Smrg      sys_lib_search_path_spec=$LIB
26009f00f3a1Smrg      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
26019f00f3a1Smrg        # It is most probably a Windows format PATH.
26029f00f3a1Smrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
26039f00f3a1Smrg      else
26049f00f3a1Smrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
26059f00f3a1Smrg      fi
26069f00f3a1Smrg      # FIXME: find the short name or the path components, as spaces are
26079f00f3a1Smrg      # common. (e.g. "Program Files" -> "PROGRA~1")
26089f00f3a1Smrg      ;;
26099f00f3a1Smrg    esac
26109f00f3a1Smrg
26119f00f3a1Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2612edce3322Smrg    postinstall_cmds='base_file=`basename \$file`~
2613edce3322Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
26149f00f3a1Smrg      dldir=$destdir/`dirname \$dlpath`~
26159f00f3a1Smrg      test -d \$dldir || mkdir -p \$dldir~
26169f00f3a1Smrg      $install_prog $dir/$dlname \$dldir/$dlname'
26179f00f3a1Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
26189f00f3a1Smrg      dlpath=$dir/\$dldll~
26199f00f3a1Smrg       $RM \$dlpath'
26209f00f3a1Smrg    shlibpath_overrides_runpath=yes
26219f00f3a1Smrg    dynamic_linker='Win32 link.exe'
26229f00f3a1Smrg    ;;
26239f00f3a1Smrg
26249f00f3a1Smrg  *)
26259f00f3a1Smrg    # Assume MSVC wrapper
2626edce3322Smrg    library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
26279f00f3a1Smrg    dynamic_linker='Win32 ld.exe'
26289f00f3a1Smrg    ;;
26299f00f3a1Smrg  esac
26309f00f3a1Smrg  # FIXME: first we should search . and the directory the executable is in
26319f00f3a1Smrg  shlibpath_var=PATH
26329f00f3a1Smrg  ;;
26339f00f3a1Smrg
26349f00f3a1Smrgdarwin* | rhapsody*)
26359f00f3a1Smrg  dynamic_linker="$host_os dyld"
26369f00f3a1Smrg  version_type=darwin
26379f00f3a1Smrg  need_lib_prefix=no
26389f00f3a1Smrg  need_version=no
2639edce3322Smrg  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
2640edce3322Smrg  soname_spec='$libname$release$major$shared_ext'
26419f00f3a1Smrg  shlibpath_overrides_runpath=yes
26429f00f3a1Smrg  shlibpath_var=DYLD_LIBRARY_PATH
26439f00f3a1Smrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
26449f00f3a1Smrgm4_if([$1], [],[
26459f00f3a1Smrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
26469f00f3a1Smrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
26479f00f3a1Smrg  ;;
26489f00f3a1Smrg
26499f00f3a1Smrgdgux*)
26509f00f3a1Smrg  version_type=linux # correct to gnu/linux during the next big refactor
26519f00f3a1Smrg  need_lib_prefix=no
26529f00f3a1Smrg  need_version=no
2653edce3322Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2654edce3322Smrg  soname_spec='$libname$release$shared_ext$major'
26559f00f3a1Smrg  shlibpath_var=LD_LIBRARY_PATH
26569f00f3a1Smrg  ;;
26579f00f3a1Smrg
26589f00f3a1Smrgfreebsd* | dragonfly*)
26599f00f3a1Smrg  # DragonFly does not have aout.  When/if they implement a new
26609f00f3a1Smrg  # versioning mechanism, adjust this.
26619f00f3a1Smrg  if test -x /usr/bin/objformat; then
26629f00f3a1Smrg    objformat=`/usr/bin/objformat`
26639f00f3a1Smrg  else
26649f00f3a1Smrg    case $host_os in
26659f00f3a1Smrg    freebsd[[23]].*) objformat=aout ;;
26669f00f3a1Smrg    *) objformat=elf ;;
26679f00f3a1Smrg    esac
26689f00f3a1Smrg  fi
26699f00f3a1Smrg  version_type=freebsd-$objformat
26709f00f3a1Smrg  case $version_type in
26719f00f3a1Smrg    freebsd-elf*)
2672edce3322Smrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2673edce3322Smrg      soname_spec='$libname$release$shared_ext$major'
26749f00f3a1Smrg      need_version=no
26759f00f3a1Smrg      need_lib_prefix=no
26769f00f3a1Smrg      ;;
26779f00f3a1Smrg    freebsd-*)
2678edce3322Smrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
26799f00f3a1Smrg      need_version=yes
26809f00f3a1Smrg      ;;
26819f00f3a1Smrg  esac
26829f00f3a1Smrg  shlibpath_var=LD_LIBRARY_PATH
26839f00f3a1Smrg  case $host_os in
26849f00f3a1Smrg  freebsd2.*)
26859f00f3a1Smrg    shlibpath_overrides_runpath=yes
26869f00f3a1Smrg    ;;
26879f00f3a1Smrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
26889f00f3a1Smrg    shlibpath_overrides_runpath=yes
26899f00f3a1Smrg    hardcode_into_libs=yes
26909f00f3a1Smrg    ;;
26919f00f3a1Smrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
26929f00f3a1Smrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
26939f00f3a1Smrg    shlibpath_overrides_runpath=no
26949f00f3a1Smrg    hardcode_into_libs=yes
26959f00f3a1Smrg    ;;
26969f00f3a1Smrg  *) # from 4.6 on, and DragonFly
26979f00f3a1Smrg    shlibpath_overrides_runpath=yes
26989f00f3a1Smrg    hardcode_into_libs=yes
26999f00f3a1Smrg    ;;
27009f00f3a1Smrg  esac
27019f00f3a1Smrg  ;;
27029f00f3a1Smrg
27039f00f3a1Smrghaiku*)
27049f00f3a1Smrg  version_type=linux # correct to gnu/linux during the next big refactor
27059f00f3a1Smrg  need_lib_prefix=no
27069f00f3a1Smrg  need_version=no
27079f00f3a1Smrg  dynamic_linker="$host_os runtime_loader"
2708edce3322Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2709edce3322Smrg  soname_spec='$libname$release$shared_ext$major'
27109f00f3a1Smrg  shlibpath_var=LIBRARY_PATH
2711edce3322Smrg  shlibpath_overrides_runpath=no
27129f00f3a1Smrg  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
27139f00f3a1Smrg  hardcode_into_libs=yes
27149f00f3a1Smrg  ;;
27159f00f3a1Smrg
27169f00f3a1Smrghpux9* | hpux10* | hpux11*)
27179f00f3a1Smrg  # Give a soname corresponding to the major version so that dld.sl refuses to
27189f00f3a1Smrg  # link against other versions.
27199f00f3a1Smrg  version_type=sunos
27209f00f3a1Smrg  need_lib_prefix=no
27219f00f3a1Smrg  need_version=no
27229f00f3a1Smrg  case $host_cpu in
27239f00f3a1Smrg  ia64*)
27249f00f3a1Smrg    shrext_cmds='.so'
27259f00f3a1Smrg    hardcode_into_libs=yes
27269f00f3a1Smrg    dynamic_linker="$host_os dld.so"
27279f00f3a1Smrg    shlibpath_var=LD_LIBRARY_PATH
27289f00f3a1Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2729edce3322Smrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2730edce3322Smrg    soname_spec='$libname$release$shared_ext$major'
2731edce3322Smrg    if test 32 = "$HPUX_IA64_MODE"; then
27329f00f3a1Smrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2733edce3322Smrg      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
27349f00f3a1Smrg    else
27359f00f3a1Smrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2736edce3322Smrg      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
27379f00f3a1Smrg    fi
27389f00f3a1Smrg    ;;
27399f00f3a1Smrg  hppa*64*)
27409f00f3a1Smrg    shrext_cmds='.sl'
27419f00f3a1Smrg    hardcode_into_libs=yes
27429f00f3a1Smrg    dynamic_linker="$host_os dld.sl"
27439f00f3a1Smrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
27449f00f3a1Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2745edce3322Smrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2746edce3322Smrg    soname_spec='$libname$release$shared_ext$major'
27479f00f3a1Smrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
27489f00f3a1Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
27499f00f3a1Smrg    ;;
27509f00f3a1Smrg  *)
27519f00f3a1Smrg    shrext_cmds='.sl'
27529f00f3a1Smrg    dynamic_linker="$host_os dld.sl"
27539f00f3a1Smrg    shlibpath_var=SHLIB_PATH
27549f00f3a1Smrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2755edce3322Smrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2756edce3322Smrg    soname_spec='$libname$release$shared_ext$major'
27579f00f3a1Smrg    ;;
27589f00f3a1Smrg  esac
27599f00f3a1Smrg  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
27609f00f3a1Smrg  postinstall_cmds='chmod 555 $lib'
27619f00f3a1Smrg  # or fails outright, so override atomically:
27629f00f3a1Smrg  install_override_mode=555
27639f00f3a1Smrg  ;;
27649f00f3a1Smrg
27659f00f3a1Smrginterix[[3-9]]*)
27669f00f3a1Smrg  version_type=linux # correct to gnu/linux during the next big refactor
27679f00f3a1Smrg  need_lib_prefix=no
27689f00f3a1Smrg  need_version=no
2769edce3322Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2770edce3322Smrg  soname_spec='$libname$release$shared_ext$major'
27719f00f3a1Smrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
27729f00f3a1Smrg  shlibpath_var=LD_LIBRARY_PATH
27739f00f3a1Smrg  shlibpath_overrides_runpath=no
27749f00f3a1Smrg  hardcode_into_libs=yes
27759f00f3a1Smrg  ;;
27769f00f3a1Smrg
27779f00f3a1Smrgirix5* | irix6* | nonstopux*)
27789f00f3a1Smrg  case $host_os in
27799f00f3a1Smrg    nonstopux*) version_type=nonstopux ;;
27809f00f3a1Smrg    *)
2781edce3322Smrg	if test yes = "$lt_cv_prog_gnu_ld"; then
27829f00f3a1Smrg		version_type=linux # correct to gnu/linux during the next big refactor
27839f00f3a1Smrg	else
27849f00f3a1Smrg		version_type=irix
27859f00f3a1Smrg	fi ;;
27869f00f3a1Smrg  esac
27879f00f3a1Smrg  need_lib_prefix=no
27889f00f3a1Smrg  need_version=no
2789edce3322Smrg  soname_spec='$libname$release$shared_ext$major'
2790edce3322Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
27919f00f3a1Smrg  case $host_os in
27929f00f3a1Smrg  irix5* | nonstopux*)
27939f00f3a1Smrg    libsuff= shlibsuff=
27949f00f3a1Smrg    ;;
27959f00f3a1Smrg  *)
27969f00f3a1Smrg    case $LD in # libtool.m4 will add one of these switches to LD
27979f00f3a1Smrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
27989f00f3a1Smrg      libsuff= shlibsuff= libmagic=32-bit;;
27999f00f3a1Smrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
28009f00f3a1Smrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
28019f00f3a1Smrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
28029f00f3a1Smrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
28039f00f3a1Smrg    *) libsuff= shlibsuff= libmagic=never-match;;
28049f00f3a1Smrg    esac
28059f00f3a1Smrg    ;;
28069f00f3a1Smrg  esac
28079f00f3a1Smrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
28089f00f3a1Smrg  shlibpath_overrides_runpath=no
2809edce3322Smrg  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
2810edce3322Smrg  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
28119f00f3a1Smrg  hardcode_into_libs=yes
28129f00f3a1Smrg  ;;
28139f00f3a1Smrg
28149f00f3a1Smrg# No shared lib support for Linux oldld, aout, or coff.
28159f00f3a1Smrglinux*oldld* | linux*aout* | linux*coff*)
28169f00f3a1Smrg  dynamic_linker=no
28179f00f3a1Smrg  ;;
28189f00f3a1Smrg
2819edce3322Smrglinux*android*)
2820edce3322Smrg  version_type=none # Android doesn't support versioned libraries.
2821edce3322Smrg  need_lib_prefix=no
2822edce3322Smrg  need_version=no
2823edce3322Smrg  library_names_spec='$libname$release$shared_ext'
2824edce3322Smrg  soname_spec='$libname$release$shared_ext'
2825edce3322Smrg  finish_cmds=
2826edce3322Smrg  shlibpath_var=LD_LIBRARY_PATH
2827edce3322Smrg  shlibpath_overrides_runpath=yes
2828edce3322Smrg
2829edce3322Smrg  # This implies no fast_install, which is unacceptable.
2830edce3322Smrg  # Some rework will be needed to allow for fast_install
2831edce3322Smrg  # before this can be enabled.
2832edce3322Smrg  hardcode_into_libs=yes
2833edce3322Smrg
2834edce3322Smrg  dynamic_linker='Android linker'
2835edce3322Smrg  # Don't embed -rpath directories since the linker doesn't support them.
2836edce3322Smrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2837edce3322Smrg  ;;
2838edce3322Smrg
28399f00f3a1Smrg# This must be glibc/ELF.
28409f00f3a1Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
28419f00f3a1Smrg  version_type=linux # correct to gnu/linux during the next big refactor
28429f00f3a1Smrg  need_lib_prefix=no
28439f00f3a1Smrg  need_version=no
2844edce3322Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2845edce3322Smrg  soname_spec='$libname$release$shared_ext$major'
28469f00f3a1Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
28479f00f3a1Smrg  shlibpath_var=LD_LIBRARY_PATH
28489f00f3a1Smrg  shlibpath_overrides_runpath=no
28499f00f3a1Smrg
28509f00f3a1Smrg  # Some binutils ld are patched to set DT_RUNPATH
28519f00f3a1Smrg  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
28529f00f3a1Smrg    [lt_cv_shlibpath_overrides_runpath=no
28539f00f3a1Smrg    save_LDFLAGS=$LDFLAGS
28549f00f3a1Smrg    save_libdir=$libdir
28559f00f3a1Smrg    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
28569f00f3a1Smrg	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
28579f00f3a1Smrg    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
28589f00f3a1Smrg      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
28599f00f3a1Smrg	 [lt_cv_shlibpath_overrides_runpath=yes])])
28609f00f3a1Smrg    LDFLAGS=$save_LDFLAGS
28619f00f3a1Smrg    libdir=$save_libdir
28629f00f3a1Smrg    ])
28639f00f3a1Smrg  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
28649f00f3a1Smrg
28659f00f3a1Smrg  # This implies no fast_install, which is unacceptable.
28669f00f3a1Smrg  # Some rework will be needed to allow for fast_install
28679f00f3a1Smrg  # before this can be enabled.
28689f00f3a1Smrg  hardcode_into_libs=yes
28699f00f3a1Smrg
2870edce3322Smrg  # Add ABI-specific directories to the system library path.
2871edce3322Smrg  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
2872edce3322Smrg
2873edce3322Smrg  # Ideally, we could use ldconfig to report *all* directores which are
2874edce3322Smrg  # searched for libraries, however this is still not possible.  Aside from not
2875edce3322Smrg  # being certain /sbin/ldconfig is available, command
2876edce3322Smrg  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
2877edce3322Smrg  # even though it is searched at run-time.  Try to do the best guess by
2878edce3322Smrg  # appending ld.so.conf contents (and includes) to the search path.
28799f00f3a1Smrg  if test -f /etc/ld.so.conf; then
28809f00f3a1Smrg    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' ' '`
2881edce3322Smrg    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
28829f00f3a1Smrg  fi
28839f00f3a1Smrg
28849f00f3a1Smrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
28859f00f3a1Smrg  # powerpc, because MkLinux only supported shared libraries with the
28869f00f3a1Smrg  # GNU dynamic linker.  Since this was broken with cross compilers,
28879f00f3a1Smrg  # most powerpc-linux boxes support dynamic linking these days and
28889f00f3a1Smrg  # people can always --disable-shared, the test was removed, and we
28899f00f3a1Smrg  # assume the GNU/Linux dynamic linker is in use.
28909f00f3a1Smrg  dynamic_linker='GNU/Linux ld.so'
28919f00f3a1Smrg  ;;
28929f00f3a1Smrg
28939f00f3a1Smrgnetbsd*)
28949f00f3a1Smrg  version_type=sunos
28959f00f3a1Smrg  need_lib_prefix=no
28969f00f3a1Smrg  need_version=no
28979f00f3a1Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2898edce3322Smrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
28999f00f3a1Smrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
29009f00f3a1Smrg    dynamic_linker='NetBSD (a.out) ld.so'
29019f00f3a1Smrg  else
2902edce3322Smrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2903edce3322Smrg    soname_spec='$libname$release$shared_ext$major'
29049f00f3a1Smrg    dynamic_linker='NetBSD ld.elf_so'
29059f00f3a1Smrg  fi
29069f00f3a1Smrg  shlibpath_var=LD_LIBRARY_PATH
29079f00f3a1Smrg  shlibpath_overrides_runpath=yes
29089f00f3a1Smrg  hardcode_into_libs=yes
29099f00f3a1Smrg  ;;
29109f00f3a1Smrg
29119f00f3a1Smrgnewsos6)
29129f00f3a1Smrg  version_type=linux # correct to gnu/linux during the next big refactor
2913edce3322Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
29149f00f3a1Smrg  shlibpath_var=LD_LIBRARY_PATH
29159f00f3a1Smrg  shlibpath_overrides_runpath=yes
29169f00f3a1Smrg  ;;
29179f00f3a1Smrg
29189f00f3a1Smrg*nto* | *qnx*)
29199f00f3a1Smrg  version_type=qnx
29209f00f3a1Smrg  need_lib_prefix=no
29219f00f3a1Smrg  need_version=no
2922edce3322Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2923edce3322Smrg  soname_spec='$libname$release$shared_ext$major'
29249f00f3a1Smrg  shlibpath_var=LD_LIBRARY_PATH
29259f00f3a1Smrg  shlibpath_overrides_runpath=no
29269f00f3a1Smrg  hardcode_into_libs=yes
29279f00f3a1Smrg  dynamic_linker='ldqnx.so'
29289f00f3a1Smrg  ;;
29299f00f3a1Smrg
2930edce3322Smrgopenbsd* | bitrig*)
29319f00f3a1Smrg  version_type=sunos
2932edce3322Smrg  sys_lib_dlsearch_path_spec=/usr/lib
29339f00f3a1Smrg  need_lib_prefix=no
2934edce3322Smrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
2935edce3322Smrg    need_version=no
29369f00f3a1Smrg  else
2937edce3322Smrg    need_version=yes
29389f00f3a1Smrg  fi
2939edce3322Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2940edce3322Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2941edce3322Smrg  shlibpath_var=LD_LIBRARY_PATH
2942edce3322Smrg  shlibpath_overrides_runpath=yes
29439f00f3a1Smrg  ;;
29449f00f3a1Smrg
29459f00f3a1Smrgos2*)
29469f00f3a1Smrg  libname_spec='$name'
2947edce3322Smrg  version_type=windows
2948edce3322Smrg  shrext_cmds=.dll
2949edce3322Smrg  need_version=no
29509f00f3a1Smrg  need_lib_prefix=no
2951edce3322Smrg  # OS/2 can only load a DLL with a base name of 8 characters or less.
2952edce3322Smrg  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
2953edce3322Smrg    v=$($ECHO $release$versuffix | tr -d .-);
2954edce3322Smrg    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
2955edce3322Smrg    $ECHO $n$v`$shared_ext'
2956edce3322Smrg  library_names_spec='${libname}_dll.$libext'
29579f00f3a1Smrg  dynamic_linker='OS/2 ld.exe'
2958edce3322Smrg  shlibpath_var=BEGINLIBPATH
2959edce3322Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2960edce3322Smrg  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2961edce3322Smrg  postinstall_cmds='base_file=`basename \$file`~
2962edce3322Smrg    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
2963edce3322Smrg    dldir=$destdir/`dirname \$dlpath`~
2964edce3322Smrg    test -d \$dldir || mkdir -p \$dldir~
2965edce3322Smrg    $install_prog $dir/$dlname \$dldir/$dlname~
2966edce3322Smrg    chmod a+x \$dldir/$dlname~
2967edce3322Smrg    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2968edce3322Smrg      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2969edce3322Smrg    fi'
2970edce3322Smrg  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
2971edce3322Smrg    dlpath=$dir/\$dldll~
2972edce3322Smrg    $RM \$dlpath'
29739f00f3a1Smrg  ;;
29749f00f3a1Smrg
29759f00f3a1Smrgosf3* | osf4* | osf5*)
29769f00f3a1Smrg  version_type=osf
29779f00f3a1Smrg  need_lib_prefix=no
29789f00f3a1Smrg  need_version=no
2979edce3322Smrg  soname_spec='$libname$release$shared_ext$major'
2980edce3322Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
29819f00f3a1Smrg  shlibpath_var=LD_LIBRARY_PATH
29829f00f3a1Smrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2983edce3322Smrg  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
29849f00f3a1Smrg  ;;
29859f00f3a1Smrg
29869f00f3a1Smrgrdos*)
29879f00f3a1Smrg  dynamic_linker=no
29889f00f3a1Smrg  ;;
29899f00f3a1Smrg
29909f00f3a1Smrgsolaris*)
29919f00f3a1Smrg  version_type=linux # correct to gnu/linux during the next big refactor
29929f00f3a1Smrg  need_lib_prefix=no
29939f00f3a1Smrg  need_version=no
2994edce3322Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2995edce3322Smrg  soname_spec='$libname$release$shared_ext$major'
29969f00f3a1Smrg  shlibpath_var=LD_LIBRARY_PATH
29979f00f3a1Smrg  shlibpath_overrides_runpath=yes
29989f00f3a1Smrg  hardcode_into_libs=yes
29999f00f3a1Smrg  # ldd complains unless libraries are executable
30009f00f3a1Smrg  postinstall_cmds='chmod +x $lib'
30019f00f3a1Smrg  ;;
30029f00f3a1Smrg
30039f00f3a1Smrgsunos4*)
30049f00f3a1Smrg  version_type=sunos
3005edce3322Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
30069f00f3a1Smrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
30079f00f3a1Smrg  shlibpath_var=LD_LIBRARY_PATH
30089f00f3a1Smrg  shlibpath_overrides_runpath=yes
3009edce3322Smrg  if test yes = "$with_gnu_ld"; then
30109f00f3a1Smrg    need_lib_prefix=no
30119f00f3a1Smrg  fi
30129f00f3a1Smrg  need_version=yes
30139f00f3a1Smrg  ;;
30149f00f3a1Smrg
30159f00f3a1Smrgsysv4 | sysv4.3*)
30169f00f3a1Smrg  version_type=linux # correct to gnu/linux during the next big refactor
3017edce3322Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3018edce3322Smrg  soname_spec='$libname$release$shared_ext$major'
30199f00f3a1Smrg  shlibpath_var=LD_LIBRARY_PATH
30209f00f3a1Smrg  case $host_vendor in
30219f00f3a1Smrg    sni)
30229f00f3a1Smrg      shlibpath_overrides_runpath=no
30239f00f3a1Smrg      need_lib_prefix=no
30249f00f3a1Smrg      runpath_var=LD_RUN_PATH
30259f00f3a1Smrg      ;;
30269f00f3a1Smrg    siemens)
30279f00f3a1Smrg      need_lib_prefix=no
30289f00f3a1Smrg      ;;
30299f00f3a1Smrg    motorola)
30309f00f3a1Smrg      need_lib_prefix=no
30319f00f3a1Smrg      need_version=no
30329f00f3a1Smrg      shlibpath_overrides_runpath=no
30339f00f3a1Smrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
30349f00f3a1Smrg      ;;
30359f00f3a1Smrg  esac
30369f00f3a1Smrg  ;;
30379f00f3a1Smrg
30389f00f3a1Smrgsysv4*MP*)
3039edce3322Smrg  if test -d /usr/nec; then
30409f00f3a1Smrg    version_type=linux # correct to gnu/linux during the next big refactor
3041edce3322Smrg    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
3042edce3322Smrg    soname_spec='$libname$shared_ext.$major'
30439f00f3a1Smrg    shlibpath_var=LD_LIBRARY_PATH
30449f00f3a1Smrg  fi
30459f00f3a1Smrg  ;;
30469f00f3a1Smrg
30479f00f3a1Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3048edce3322Smrg  version_type=sco
30499f00f3a1Smrg  need_lib_prefix=no
30509f00f3a1Smrg  need_version=no
3051edce3322Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
3052edce3322Smrg  soname_spec='$libname$release$shared_ext$major'
30539f00f3a1Smrg  shlibpath_var=LD_LIBRARY_PATH
30549f00f3a1Smrg  shlibpath_overrides_runpath=yes
30559f00f3a1Smrg  hardcode_into_libs=yes
3056edce3322Smrg  if test yes = "$with_gnu_ld"; then
30579f00f3a1Smrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
30589f00f3a1Smrg  else
30599f00f3a1Smrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
30609f00f3a1Smrg    case $host_os in
30619f00f3a1Smrg      sco3.2v5*)
30629f00f3a1Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
30639f00f3a1Smrg	;;
30649f00f3a1Smrg    esac
30659f00f3a1Smrg  fi
30669f00f3a1Smrg  sys_lib_dlsearch_path_spec='/usr/lib'
30679f00f3a1Smrg  ;;
30689f00f3a1Smrg
30699f00f3a1Smrgtpf*)
30709f00f3a1Smrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
30719f00f3a1Smrg  version_type=linux # correct to gnu/linux during the next big refactor
30729f00f3a1Smrg  need_lib_prefix=no
30739f00f3a1Smrg  need_version=no
3074edce3322Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
30759f00f3a1Smrg  shlibpath_var=LD_LIBRARY_PATH
30769f00f3a1Smrg  shlibpath_overrides_runpath=no
30779f00f3a1Smrg  hardcode_into_libs=yes
30789f00f3a1Smrg  ;;
30799f00f3a1Smrg
30809f00f3a1Smrguts4*)
30819f00f3a1Smrg  version_type=linux # correct to gnu/linux during the next big refactor
3082edce3322Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3083edce3322Smrg  soname_spec='$libname$release$shared_ext$major'
30849f00f3a1Smrg  shlibpath_var=LD_LIBRARY_PATH
30859f00f3a1Smrg  ;;
30869f00f3a1Smrg
30879f00f3a1Smrg*)
30889f00f3a1Smrg  dynamic_linker=no
30899f00f3a1Smrg  ;;
30909f00f3a1Smrgesac
30919f00f3a1SmrgAC_MSG_RESULT([$dynamic_linker])
3092edce3322Smrgtest no = "$dynamic_linker" && can_build_shared=no
30939f00f3a1Smrg
30949f00f3a1Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3095edce3322Smrgif test yes = "$GCC"; then
30969f00f3a1Smrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
30979f00f3a1Smrgfi
30989f00f3a1Smrg
3099edce3322Smrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
3100edce3322Smrg  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
31019f00f3a1Smrgfi
3102edce3322Smrg
3103edce3322Smrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
3104edce3322Smrg  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
31059f00f3a1Smrgfi
31069f00f3a1Smrg
3107edce3322Smrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
3108edce3322Smrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
3109edce3322Smrg
3110edce3322Smrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
3111edce3322Smrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
3112edce3322Smrg
3113edce3322Smrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
3114edce3322Smrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
3115edce3322Smrg
31169f00f3a1Smrg_LT_DECL([], [variables_saved_for_relink], [1],
31179f00f3a1Smrg    [Variables whose values should be saved in libtool wrapper scripts and
31189f00f3a1Smrg    restored at link time])
31199f00f3a1Smrg_LT_DECL([], [need_lib_prefix], [0],
31209f00f3a1Smrg    [Do we need the "lib" prefix for modules?])
31219f00f3a1Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
31229f00f3a1Smrg_LT_DECL([], [version_type], [0], [Library versioning type])
31239f00f3a1Smrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
31249f00f3a1Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
31259f00f3a1Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
31269f00f3a1Smrg    [Is shlibpath searched before the hard-coded library search path?])
31279f00f3a1Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
31289f00f3a1Smrg_LT_DECL([], [library_names_spec], [1],
31299f00f3a1Smrg    [[List of archive names.  First name is the real one, the rest are links.
31309f00f3a1Smrg    The last name is the one that the linker finds with -lNAME]])
31319f00f3a1Smrg_LT_DECL([], [soname_spec], [1],
31329f00f3a1Smrg    [[The coded name of the library, if different from the real name]])
31339f00f3a1Smrg_LT_DECL([], [install_override_mode], [1],
31349f00f3a1Smrg    [Permission mode override for installation of shared libraries])
31359f00f3a1Smrg_LT_DECL([], [postinstall_cmds], [2],
31369f00f3a1Smrg    [Command to use after installation of a shared archive])
31379f00f3a1Smrg_LT_DECL([], [postuninstall_cmds], [2],
31389f00f3a1Smrg    [Command to use after uninstallation of a shared archive])
31399f00f3a1Smrg_LT_DECL([], [finish_cmds], [2],
31409f00f3a1Smrg    [Commands used to finish a libtool library installation in a directory])
31419f00f3a1Smrg_LT_DECL([], [finish_eval], [1],
31429f00f3a1Smrg    [[As "finish_cmds", except a single script fragment to be evaled but
31439f00f3a1Smrg    not shown]])
31449f00f3a1Smrg_LT_DECL([], [hardcode_into_libs], [0],
31459f00f3a1Smrg    [Whether we should hardcode library paths into libraries])
31469f00f3a1Smrg_LT_DECL([], [sys_lib_search_path_spec], [2],
31479f00f3a1Smrg    [Compile-time system search path for libraries])
3148edce3322Smrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
3149edce3322Smrg    [Detected run-time system search path for libraries])
3150edce3322Smrg_LT_DECL([], [configure_time_lt_sys_library_path], [2],
3151edce3322Smrg    [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
31529f00f3a1Smrg])# _LT_SYS_DYNAMIC_LINKER
31539f00f3a1Smrg
31549f00f3a1Smrg
31559f00f3a1Smrg# _LT_PATH_TOOL_PREFIX(TOOL)
31569f00f3a1Smrg# --------------------------
3157edce3322Smrg# find a file program that can recognize shared library
31589f00f3a1SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
31599f00f3a1Smrg[m4_require([_LT_DECL_EGREP])dnl
31609f00f3a1SmrgAC_MSG_CHECKING([for $1])
31619f00f3a1SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
31629f00f3a1Smrg[case $MAGIC_CMD in
31639f00f3a1Smrg[[\\/*] |  ?:[\\/]*])
3164edce3322Smrg  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
31659f00f3a1Smrg  ;;
31669f00f3a1Smrg*)
3167edce3322Smrg  lt_save_MAGIC_CMD=$MAGIC_CMD
3168edce3322Smrg  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
31699f00f3a1Smrgdnl $ac_dummy forces splitting on constant user-supplied paths.
31709f00f3a1Smrgdnl POSIX.2 word splitting is done only on the output of word expansions,
31719f00f3a1Smrgdnl not every word.  This closes a longstanding sh security hole.
31729f00f3a1Smrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
31739f00f3a1Smrg  for ac_dir in $ac_dummy; do
3174edce3322Smrg    IFS=$lt_save_ifs
31759f00f3a1Smrg    test -z "$ac_dir" && ac_dir=.
3176edce3322Smrg    if test -f "$ac_dir/$1"; then
3177edce3322Smrg      lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
31789f00f3a1Smrg      if test -n "$file_magic_test_file"; then
31799f00f3a1Smrg	case $deplibs_check_method in
31809f00f3a1Smrg	"file_magic "*)
31819f00f3a1Smrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3182edce3322Smrg	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
31839f00f3a1Smrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
31849f00f3a1Smrg	    $EGREP "$file_magic_regex" > /dev/null; then
31859f00f3a1Smrg	    :
31869f00f3a1Smrg	  else
31879f00f3a1Smrg	    cat <<_LT_EOF 1>&2
31889f00f3a1Smrg
31899f00f3a1Smrg*** Warning: the command libtool uses to detect shared libraries,
31909f00f3a1Smrg*** $file_magic_cmd, produces output that libtool cannot recognize.
31919f00f3a1Smrg*** The result is that libtool may fail to recognize shared libraries
31929f00f3a1Smrg*** as such.  This will affect the creation of libtool libraries that
31939f00f3a1Smrg*** depend on shared libraries, but programs linked with such libtool
31949f00f3a1Smrg*** libraries will work regardless of this problem.  Nevertheless, you
31959f00f3a1Smrg*** may want to report the problem to your system manager and/or to
31969f00f3a1Smrg*** bug-libtool@gnu.org
31979f00f3a1Smrg
31989f00f3a1Smrg_LT_EOF
31999f00f3a1Smrg	  fi ;;
32009f00f3a1Smrg	esac
32019f00f3a1Smrg      fi
32029f00f3a1Smrg      break
32039f00f3a1Smrg    fi
32049f00f3a1Smrg  done
3205edce3322Smrg  IFS=$lt_save_ifs
3206edce3322Smrg  MAGIC_CMD=$lt_save_MAGIC_CMD
32079f00f3a1Smrg  ;;
32089f00f3a1Smrgesac])
3209edce3322SmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD
32109f00f3a1Smrgif test -n "$MAGIC_CMD"; then
32119f00f3a1Smrg  AC_MSG_RESULT($MAGIC_CMD)
32129f00f3a1Smrgelse
32139f00f3a1Smrg  AC_MSG_RESULT(no)
32149f00f3a1Smrgfi
32159f00f3a1Smrg_LT_DECL([], [MAGIC_CMD], [0],
32169f00f3a1Smrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
32179f00f3a1Smrg])# _LT_PATH_TOOL_PREFIX
32189f00f3a1Smrg
32199f00f3a1Smrg# Old name:
32209f00f3a1SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
32219f00f3a1Smrgdnl aclocal-1.4 backwards compatibility:
32229f00f3a1Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
32239f00f3a1Smrg
32249f00f3a1Smrg
32259f00f3a1Smrg# _LT_PATH_MAGIC
32269f00f3a1Smrg# --------------
3227edce3322Smrg# find a file program that can recognize a shared library
32289f00f3a1Smrgm4_defun([_LT_PATH_MAGIC],
32299f00f3a1Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
32309f00f3a1Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then
32319f00f3a1Smrg  if test -n "$ac_tool_prefix"; then
32329f00f3a1Smrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
32339f00f3a1Smrg  else
32349f00f3a1Smrg    MAGIC_CMD=:
32359f00f3a1Smrg  fi
32369f00f3a1Smrgfi
32379f00f3a1Smrg])# _LT_PATH_MAGIC
32389f00f3a1Smrg
32399f00f3a1Smrg
32409f00f3a1Smrg# LT_PATH_LD
32419f00f3a1Smrg# ----------
32429f00f3a1Smrg# find the pathname to the GNU or non-GNU linker
32439f00f3a1SmrgAC_DEFUN([LT_PATH_LD],
32449f00f3a1Smrg[AC_REQUIRE([AC_PROG_CC])dnl
32459f00f3a1SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
32469f00f3a1SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
32479f00f3a1Smrgm4_require([_LT_DECL_SED])dnl
32489f00f3a1Smrgm4_require([_LT_DECL_EGREP])dnl
32499f00f3a1Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl
32509f00f3a1Smrg
32519f00f3a1SmrgAC_ARG_WITH([gnu-ld],
32529f00f3a1Smrg    [AS_HELP_STRING([--with-gnu-ld],
32539f00f3a1Smrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3254edce3322Smrg    [test no = "$withval" || with_gnu_ld=yes],
32559f00f3a1Smrg    [with_gnu_ld=no])dnl
32569f00f3a1Smrg
32579f00f3a1Smrgac_prog=ld
3258edce3322Smrgif test yes = "$GCC"; then
32599f00f3a1Smrg  # Check if gcc -print-prog-name=ld gives a path.
32609f00f3a1Smrg  AC_MSG_CHECKING([for ld used by $CC])
32619f00f3a1Smrg  case $host in
32629f00f3a1Smrg  *-*-mingw*)
3263edce3322Smrg    # gcc leaves a trailing carriage return, which upsets mingw
32649f00f3a1Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
32659f00f3a1Smrg  *)
32669f00f3a1Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
32679f00f3a1Smrg  esac
32689f00f3a1Smrg  case $ac_prog in
32699f00f3a1Smrg    # Accept absolute paths.
32709f00f3a1Smrg    [[\\/]]* | ?:[[\\/]]*)
32719f00f3a1Smrg      re_direlt='/[[^/]][[^/]]*/\.\./'
32729f00f3a1Smrg      # Canonicalize the pathname of ld
32739f00f3a1Smrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
32749f00f3a1Smrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
32759f00f3a1Smrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
32769f00f3a1Smrg      done
3277edce3322Smrg      test -z "$LD" && LD=$ac_prog
32789f00f3a1Smrg      ;;
32799f00f3a1Smrg  "")
32809f00f3a1Smrg    # If it fails, then pretend we aren't using GCC.
32819f00f3a1Smrg    ac_prog=ld
32829f00f3a1Smrg    ;;
32839f00f3a1Smrg  *)
32849f00f3a1Smrg    # If it is relative, then search for the first ld in PATH.
32859f00f3a1Smrg    with_gnu_ld=unknown
32869f00f3a1Smrg    ;;
32879f00f3a1Smrg  esac
3288edce3322Smrgelif test yes = "$with_gnu_ld"; then
32899f00f3a1Smrg  AC_MSG_CHECKING([for GNU ld])
32909f00f3a1Smrgelse
32919f00f3a1Smrg  AC_MSG_CHECKING([for non-GNU ld])
32929f00f3a1Smrgfi
32939f00f3a1SmrgAC_CACHE_VAL(lt_cv_path_LD,
32949f00f3a1Smrg[if test -z "$LD"; then
3295edce3322Smrg  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
32969f00f3a1Smrg  for ac_dir in $PATH; do
3297edce3322Smrg    IFS=$lt_save_ifs
32989f00f3a1Smrg    test -z "$ac_dir" && ac_dir=.
32999f00f3a1Smrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3300edce3322Smrg      lt_cv_path_LD=$ac_dir/$ac_prog
33019f00f3a1Smrg      # Check to see if the program is GNU ld.  I'd rather use --version,
33029f00f3a1Smrg      # but apparently some variants of GNU ld only accept -v.
33039f00f3a1Smrg      # Break only if it was the GNU/non-GNU ld that we prefer.
33049f00f3a1Smrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
33059f00f3a1Smrg      *GNU* | *'with BFD'*)
3306edce3322Smrg	test no != "$with_gnu_ld" && break
33079f00f3a1Smrg	;;
33089f00f3a1Smrg      *)
3309edce3322Smrg	test yes != "$with_gnu_ld" && break
33109f00f3a1Smrg	;;
33119f00f3a1Smrg      esac
33129f00f3a1Smrg    fi
33139f00f3a1Smrg  done
3314edce3322Smrg  IFS=$lt_save_ifs
33159f00f3a1Smrgelse
3316edce3322Smrg  lt_cv_path_LD=$LD # Let the user override the test with a path.
33179f00f3a1Smrgfi])
3318edce3322SmrgLD=$lt_cv_path_LD
33199f00f3a1Smrgif test -n "$LD"; then
33209f00f3a1Smrg  AC_MSG_RESULT($LD)
33219f00f3a1Smrgelse
33229f00f3a1Smrg  AC_MSG_RESULT(no)
33239f00f3a1Smrgfi
33249f00f3a1Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
33259f00f3a1Smrg_LT_PATH_LD_GNU
33269f00f3a1SmrgAC_SUBST([LD])
33279f00f3a1Smrg
33289f00f3a1Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
33299f00f3a1Smrg])# LT_PATH_LD
33309f00f3a1Smrg
33319f00f3a1Smrg# Old names:
33329f00f3a1SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
33339f00f3a1SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
33349f00f3a1Smrgdnl aclocal-1.4 backwards compatibility:
33359f00f3a1Smrgdnl AC_DEFUN([AM_PROG_LD], [])
33369f00f3a1Smrgdnl AC_DEFUN([AC_PROG_LD], [])
33379f00f3a1Smrg
33389f00f3a1Smrg
33399f00f3a1Smrg# _LT_PATH_LD_GNU
33409f00f3a1Smrg#- --------------
33419f00f3a1Smrgm4_defun([_LT_PATH_LD_GNU],
33429f00f3a1Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
33439f00f3a1Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
33449f00f3a1Smrgcase `$LD -v 2>&1 </dev/null` in
33459f00f3a1Smrg*GNU* | *'with BFD'*)
33469f00f3a1Smrg  lt_cv_prog_gnu_ld=yes
33479f00f3a1Smrg  ;;
33489f00f3a1Smrg*)
33499f00f3a1Smrg  lt_cv_prog_gnu_ld=no
33509f00f3a1Smrg  ;;
33519f00f3a1Smrgesac])
33529f00f3a1Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
33539f00f3a1Smrg])# _LT_PATH_LD_GNU
33549f00f3a1Smrg
33559f00f3a1Smrg
33569f00f3a1Smrg# _LT_CMD_RELOAD
33579f00f3a1Smrg# --------------
33589f00f3a1Smrg# find reload flag for linker
33599f00f3a1Smrg#   -- PORTME Some linkers may need a different reload flag.
33609f00f3a1Smrgm4_defun([_LT_CMD_RELOAD],
33619f00f3a1Smrg[AC_CACHE_CHECK([for $LD option to reload object files],
33629f00f3a1Smrg  lt_cv_ld_reload_flag,
33639f00f3a1Smrg  [lt_cv_ld_reload_flag='-r'])
33649f00f3a1Smrgreload_flag=$lt_cv_ld_reload_flag
33659f00f3a1Smrgcase $reload_flag in
33669f00f3a1Smrg"" | " "*) ;;
33679f00f3a1Smrg*) reload_flag=" $reload_flag" ;;
33689f00f3a1Smrgesac
33699f00f3a1Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
33709f00f3a1Smrgcase $host_os in
33719f00f3a1Smrg  cygwin* | mingw* | pw32* | cegcc*)
3372edce3322Smrg    if test yes != "$GCC"; then
33739f00f3a1Smrg      reload_cmds=false
33749f00f3a1Smrg    fi
33759f00f3a1Smrg    ;;
33769f00f3a1Smrg  darwin*)
3377edce3322Smrg    if test yes = "$GCC"; then
3378edce3322Smrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
33799f00f3a1Smrg    else
33809f00f3a1Smrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
33819f00f3a1Smrg    fi
33829f00f3a1Smrg    ;;
33839f00f3a1Smrgesac
33849f00f3a1Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
33859f00f3a1Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl
33869f00f3a1Smrg])# _LT_CMD_RELOAD
33879f00f3a1Smrg
33889f00f3a1Smrg
3389edce3322Smrg# _LT_PATH_DD
3390edce3322Smrg# -----------
3391edce3322Smrg# find a working dd
3392edce3322Smrgm4_defun([_LT_PATH_DD],
3393edce3322Smrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
3394edce3322Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i
3395edce3322Smrgcat conftest.i conftest.i >conftest2.i
3396edce3322Smrg: ${lt_DD:=$DD}
3397edce3322SmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
3398edce3322Smrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3399edce3322Smrg  cmp -s conftest.i conftest.out \
3400edce3322Smrg  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
3401edce3322Smrgfi])
3402edce3322Smrgrm -f conftest.i conftest2.i conftest.out])
3403edce3322Smrg])# _LT_PATH_DD
3404edce3322Smrg
3405edce3322Smrg
3406edce3322Smrg# _LT_CMD_TRUNCATE
3407edce3322Smrg# ----------------
3408edce3322Smrg# find command to truncate a binary pipe
3409edce3322Smrgm4_defun([_LT_CMD_TRUNCATE],
3410edce3322Smrg[m4_require([_LT_PATH_DD])
3411edce3322SmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
3412edce3322Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i
3413edce3322Smrgcat conftest.i conftest.i >conftest2.i
3414edce3322Smrglt_cv_truncate_bin=
3415edce3322Smrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3416edce3322Smrg  cmp -s conftest.i conftest.out \
3417edce3322Smrg  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
3418edce3322Smrgfi
3419edce3322Smrgrm -f conftest.i conftest2.i conftest.out
3420edce3322Smrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
3421edce3322Smrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
3422edce3322Smrg  [Command to truncate a binary pipe])
3423edce3322Smrg])# _LT_CMD_TRUNCATE
3424edce3322Smrg
3425edce3322Smrg
34269f00f3a1Smrg# _LT_CHECK_MAGIC_METHOD
34279f00f3a1Smrg# ----------------------
34289f00f3a1Smrg# how to check for library dependencies
34299f00f3a1Smrg#  -- PORTME fill in with the dynamic library characteristics
34309f00f3a1Smrgm4_defun([_LT_CHECK_MAGIC_METHOD],
34319f00f3a1Smrg[m4_require([_LT_DECL_EGREP])
34329f00f3a1Smrgm4_require([_LT_DECL_OBJDUMP])
34339f00f3a1SmrgAC_CACHE_CHECK([how to recognize dependent libraries],
34349f00f3a1Smrglt_cv_deplibs_check_method,
34359f00f3a1Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
34369f00f3a1Smrglt_cv_file_magic_test_file=
34379f00f3a1Smrglt_cv_deplibs_check_method='unknown'
34389f00f3a1Smrg# Need to set the preceding variable on all platforms that support
34399f00f3a1Smrg# interlibrary dependencies.
34409f00f3a1Smrg# 'none' -- dependencies not supported.
3441edce3322Smrg# 'unknown' -- same as none, but documents that we really don't know.
34429f00f3a1Smrg# 'pass_all' -- all dependencies passed with no checks.
34439f00f3a1Smrg# 'test_compile' -- check by making test program.
34449f00f3a1Smrg# 'file_magic [[regex]]' -- check by looking for files in library path
3445edce3322Smrg# that responds to the $file_magic_cmd with a given extended regex.
3446edce3322Smrg# If you have 'file' or equivalent on your system and you're not sure
3447edce3322Smrg# whether 'pass_all' will *always* work, you probably want this one.
34489f00f3a1Smrg
34499f00f3a1Smrgcase $host_os in
34509f00f3a1Smrgaix[[4-9]]*)
34519f00f3a1Smrg  lt_cv_deplibs_check_method=pass_all
34529f00f3a1Smrg  ;;
34539f00f3a1Smrg
34549f00f3a1Smrgbeos*)
34559f00f3a1Smrg  lt_cv_deplibs_check_method=pass_all
34569f00f3a1Smrg  ;;
34579f00f3a1Smrg
34589f00f3a1Smrgbsdi[[45]]*)
34599f00f3a1Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
34609f00f3a1Smrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
34619f00f3a1Smrg  lt_cv_file_magic_test_file=/shlib/libc.so
34629f00f3a1Smrg  ;;
34639f00f3a1Smrg
34649f00f3a1Smrgcygwin*)
34659f00f3a1Smrg  # func_win32_libid is a shell function defined in ltmain.sh
34669f00f3a1Smrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
34679f00f3a1Smrg  lt_cv_file_magic_cmd='func_win32_libid'
34689f00f3a1Smrg  ;;
34699f00f3a1Smrg
34709f00f3a1Smrgmingw* | pw32*)
34719f00f3a1Smrg  # Base MSYS/MinGW do not provide the 'file' command needed by
34729f00f3a1Smrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
34739f00f3a1Smrg  # unless we find 'file', for example because we are cross-compiling.
3474edce3322Smrg  if ( file / ) >/dev/null 2>&1; then
34759f00f3a1Smrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
34769f00f3a1Smrg    lt_cv_file_magic_cmd='func_win32_libid'
34779f00f3a1Smrg  else
34789f00f3a1Smrg    # Keep this pattern in sync with the one in func_win32_libid.
34799f00f3a1Smrg    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
34809f00f3a1Smrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
34819f00f3a1Smrg  fi
34829f00f3a1Smrg  ;;
34839f00f3a1Smrg
34849f00f3a1Smrgcegcc*)
34859f00f3a1Smrg  # use the weaker test based on 'objdump'. See mingw*.
34869f00f3a1Smrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
34879f00f3a1Smrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
34889f00f3a1Smrg  ;;
34899f00f3a1Smrg
34909f00f3a1Smrgdarwin* | rhapsody*)
34919f00f3a1Smrg  lt_cv_deplibs_check_method=pass_all
34929f00f3a1Smrg  ;;
34939f00f3a1Smrg
34949f00f3a1Smrgfreebsd* | dragonfly*)
34959f00f3a1Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
34969f00f3a1Smrg    case $host_cpu in
34979f00f3a1Smrg    i*86 )
34989f00f3a1Smrg      # Not sure whether the presence of OpenBSD here was a mistake.
34999f00f3a1Smrg      # Let's accept both of them until this is cleared up.
35009f00f3a1Smrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
35019f00f3a1Smrg      lt_cv_file_magic_cmd=/usr/bin/file
35029f00f3a1Smrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
35039f00f3a1Smrg      ;;
35049f00f3a1Smrg    esac
35059f00f3a1Smrg  else
35069f00f3a1Smrg    lt_cv_deplibs_check_method=pass_all
35079f00f3a1Smrg  fi
35089f00f3a1Smrg  ;;
35099f00f3a1Smrg
35109f00f3a1Smrghaiku*)
35119f00f3a1Smrg  lt_cv_deplibs_check_method=pass_all
35129f00f3a1Smrg  ;;
35139f00f3a1Smrg
35149f00f3a1Smrghpux10.20* | hpux11*)
35159f00f3a1Smrg  lt_cv_file_magic_cmd=/usr/bin/file
35169f00f3a1Smrg  case $host_cpu in
35179f00f3a1Smrg  ia64*)
35189f00f3a1Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
35199f00f3a1Smrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
35209f00f3a1Smrg    ;;
35219f00f3a1Smrg  hppa*64*)
35229f00f3a1Smrg    [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]']
35239f00f3a1Smrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
35249f00f3a1Smrg    ;;
35259f00f3a1Smrg  *)
35269f00f3a1Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
35279f00f3a1Smrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
35289f00f3a1Smrg    ;;
35299f00f3a1Smrg  esac
35309f00f3a1Smrg  ;;
35319f00f3a1Smrg
35329f00f3a1Smrginterix[[3-9]]*)
35339f00f3a1Smrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
35349f00f3a1Smrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
35359f00f3a1Smrg  ;;
35369f00f3a1Smrg
35379f00f3a1Smrgirix5* | irix6* | nonstopux*)
35389f00f3a1Smrg  case $LD in
35399f00f3a1Smrg  *-32|*"-32 ") libmagic=32-bit;;
35409f00f3a1Smrg  *-n32|*"-n32 ") libmagic=N32;;
35419f00f3a1Smrg  *-64|*"-64 ") libmagic=64-bit;;
35429f00f3a1Smrg  *) libmagic=never-match;;
35439f00f3a1Smrg  esac
35449f00f3a1Smrg  lt_cv_deplibs_check_method=pass_all
35459f00f3a1Smrg  ;;
35469f00f3a1Smrg
35479f00f3a1Smrg# This must be glibc/ELF.
35489f00f3a1Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
35499f00f3a1Smrg  lt_cv_deplibs_check_method=pass_all
35509f00f3a1Smrg  ;;
35519f00f3a1Smrg
3552edce3322Smrgnetbsd*)
35539f00f3a1Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
35549f00f3a1Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
35559f00f3a1Smrg  else
35569f00f3a1Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
35579f00f3a1Smrg  fi
35589f00f3a1Smrg  ;;
35599f00f3a1Smrg
35609f00f3a1Smrgnewos6*)
35619f00f3a1Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
35629f00f3a1Smrg  lt_cv_file_magic_cmd=/usr/bin/file
35639f00f3a1Smrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
35649f00f3a1Smrg  ;;
35659f00f3a1Smrg
35669f00f3a1Smrg*nto* | *qnx*)
35679f00f3a1Smrg  lt_cv_deplibs_check_method=pass_all
35689f00f3a1Smrg  ;;
35699f00f3a1Smrg
3570edce3322Smrgopenbsd* | bitrig*)
3571edce3322Smrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
35729f00f3a1Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
35739f00f3a1Smrg  else
35749f00f3a1Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
35759f00f3a1Smrg  fi
35769f00f3a1Smrg  ;;
35779f00f3a1Smrg
35789f00f3a1Smrgosf3* | osf4* | osf5*)
35799f00f3a1Smrg  lt_cv_deplibs_check_method=pass_all
35809f00f3a1Smrg  ;;
35819f00f3a1Smrg
35829f00f3a1Smrgrdos*)
35839f00f3a1Smrg  lt_cv_deplibs_check_method=pass_all
35849f00f3a1Smrg  ;;
35859f00f3a1Smrg
35869f00f3a1Smrgsolaris*)
35879f00f3a1Smrg  lt_cv_deplibs_check_method=pass_all
35889f00f3a1Smrg  ;;
35899f00f3a1Smrg
35909f00f3a1Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
35919f00f3a1Smrg  lt_cv_deplibs_check_method=pass_all
35929f00f3a1Smrg  ;;
35939f00f3a1Smrg
35949f00f3a1Smrgsysv4 | sysv4.3*)
35959f00f3a1Smrg  case $host_vendor in
35969f00f3a1Smrg  motorola)
35979f00f3a1Smrg    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]]'
35989f00f3a1Smrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
35999f00f3a1Smrg    ;;
36009f00f3a1Smrg  ncr)
36019f00f3a1Smrg    lt_cv_deplibs_check_method=pass_all
36029f00f3a1Smrg    ;;
36039f00f3a1Smrg  sequent)
36049f00f3a1Smrg    lt_cv_file_magic_cmd='/bin/file'
36059f00f3a1Smrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
36069f00f3a1Smrg    ;;
36079f00f3a1Smrg  sni)
36089f00f3a1Smrg    lt_cv_file_magic_cmd='/bin/file'
36099f00f3a1Smrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
36109f00f3a1Smrg    lt_cv_file_magic_test_file=/lib/libc.so
36119f00f3a1Smrg    ;;
36129f00f3a1Smrg  siemens)
36139f00f3a1Smrg    lt_cv_deplibs_check_method=pass_all
36149f00f3a1Smrg    ;;
36159f00f3a1Smrg  pc)
36169f00f3a1Smrg    lt_cv_deplibs_check_method=pass_all
36179f00f3a1Smrg    ;;
36189f00f3a1Smrg  esac
36199f00f3a1Smrg  ;;
36209f00f3a1Smrg
36219f00f3a1Smrgtpf*)
36229f00f3a1Smrg  lt_cv_deplibs_check_method=pass_all
36239f00f3a1Smrg  ;;
3624edce3322Smrgos2*)
3625edce3322Smrg  lt_cv_deplibs_check_method=pass_all
3626edce3322Smrg  ;;
36279f00f3a1Smrgesac
36289f00f3a1Smrg])
36299f00f3a1Smrg
36309f00f3a1Smrgfile_magic_glob=
36319f00f3a1Smrgwant_nocaseglob=no
36329f00f3a1Smrgif test "$build" = "$host"; then
36339f00f3a1Smrg  case $host_os in
36349f00f3a1Smrg  mingw* | pw32*)
36359f00f3a1Smrg    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
36369f00f3a1Smrg      want_nocaseglob=yes
36379f00f3a1Smrg    else
36389f00f3a1Smrg      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
36399f00f3a1Smrg    fi
36409f00f3a1Smrg    ;;
36419f00f3a1Smrg  esac
36429f00f3a1Smrgfi
36439f00f3a1Smrg
36449f00f3a1Smrgfile_magic_cmd=$lt_cv_file_magic_cmd
36459f00f3a1Smrgdeplibs_check_method=$lt_cv_deplibs_check_method
36469f00f3a1Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
36479f00f3a1Smrg
36489f00f3a1Smrg_LT_DECL([], [deplibs_check_method], [1],
36499f00f3a1Smrg    [Method to check whether dependent libraries are shared objects])
36509f00f3a1Smrg_LT_DECL([], [file_magic_cmd], [1],
36519f00f3a1Smrg    [Command to use when deplibs_check_method = "file_magic"])
36529f00f3a1Smrg_LT_DECL([], [file_magic_glob], [1],
36539f00f3a1Smrg    [How to find potential files when deplibs_check_method = "file_magic"])
36549f00f3a1Smrg_LT_DECL([], [want_nocaseglob], [1],
36559f00f3a1Smrg    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
36569f00f3a1Smrg])# _LT_CHECK_MAGIC_METHOD
36579f00f3a1Smrg
36589f00f3a1Smrg
36599f00f3a1Smrg# LT_PATH_NM
36609f00f3a1Smrg# ----------
36619f00f3a1Smrg# find the pathname to a BSD- or MS-compatible name lister
36629f00f3a1SmrgAC_DEFUN([LT_PATH_NM],
36639f00f3a1Smrg[AC_REQUIRE([AC_PROG_CC])dnl
36649f00f3a1SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
36659f00f3a1Smrg[if test -n "$NM"; then
36669f00f3a1Smrg  # Let the user override the test.
3667edce3322Smrg  lt_cv_path_NM=$NM
36689f00f3a1Smrgelse
3669edce3322Smrg  lt_nm_to_check=${ac_tool_prefix}nm
36709f00f3a1Smrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
36719f00f3a1Smrg    lt_nm_to_check="$lt_nm_to_check nm"
36729f00f3a1Smrg  fi
36739f00f3a1Smrg  for lt_tmp_nm in $lt_nm_to_check; do
3674edce3322Smrg    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
36759f00f3a1Smrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3676edce3322Smrg      IFS=$lt_save_ifs
36779f00f3a1Smrg      test -z "$ac_dir" && ac_dir=.
3678edce3322Smrg      tmp_nm=$ac_dir/$lt_tmp_nm
3679edce3322Smrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
36809f00f3a1Smrg	# Check to see if the nm accepts a BSD-compat flag.
3681edce3322Smrg	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
36829f00f3a1Smrg	#   nm: unknown option "B" ignored
36839f00f3a1Smrg	# Tru64's nm complains that /dev/null is an invalid object file
3684edce3322Smrg	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
3685edce3322Smrg	case $build_os in
3686edce3322Smrg	mingw*) lt_bad_file=conftest.nm/nofile ;;
3687edce3322Smrg	*) lt_bad_file=/dev/null ;;
3688edce3322Smrg	esac
3689edce3322Smrg	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
3690edce3322Smrg	*$lt_bad_file* | *'Invalid file or object type'*)
36919f00f3a1Smrg	  lt_cv_path_NM="$tmp_nm -B"
3692edce3322Smrg	  break 2
36939f00f3a1Smrg	  ;;
36949f00f3a1Smrg	*)
36959f00f3a1Smrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
36969f00f3a1Smrg	  */dev/null*)
36979f00f3a1Smrg	    lt_cv_path_NM="$tmp_nm -p"
3698edce3322Smrg	    break 2
36999f00f3a1Smrg	    ;;
37009f00f3a1Smrg	  *)
37019f00f3a1Smrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
37029f00f3a1Smrg	    continue # so that we can try to find one that supports BSD flags
37039f00f3a1Smrg	    ;;
37049f00f3a1Smrg	  esac
37059f00f3a1Smrg	  ;;
37069f00f3a1Smrg	esac
37079f00f3a1Smrg      fi
37089f00f3a1Smrg    done
3709edce3322Smrg    IFS=$lt_save_ifs
37109f00f3a1Smrg  done
37119f00f3a1Smrg  : ${lt_cv_path_NM=no}
37129f00f3a1Smrgfi])
3713edce3322Smrgif test no != "$lt_cv_path_NM"; then
3714edce3322Smrg  NM=$lt_cv_path_NM
37159f00f3a1Smrgelse
37169f00f3a1Smrg  # Didn't find any BSD compatible name lister, look for dumpbin.
37179f00f3a1Smrg  if test -n "$DUMPBIN"; then :
37189f00f3a1Smrg    # Let the user override the test.
37199f00f3a1Smrg  else
37209f00f3a1Smrg    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3721edce3322Smrg    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
37229f00f3a1Smrg    *COFF*)
3723edce3322Smrg      DUMPBIN="$DUMPBIN -symbols -headers"
37249f00f3a1Smrg      ;;
37259f00f3a1Smrg    *)
37269f00f3a1Smrg      DUMPBIN=:
37279f00f3a1Smrg      ;;
37289f00f3a1Smrg    esac
37299f00f3a1Smrg  fi
37309f00f3a1Smrg  AC_SUBST([DUMPBIN])
3731edce3322Smrg  if test : != "$DUMPBIN"; then
3732edce3322Smrg    NM=$DUMPBIN
37339f00f3a1Smrg  fi
37349f00f3a1Smrgfi
37359f00f3a1Smrgtest -z "$NM" && NM=nm
37369f00f3a1SmrgAC_SUBST([NM])
37379f00f3a1Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
37389f00f3a1Smrg
37399f00f3a1SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
37409f00f3a1Smrg  [lt_cv_nm_interface="BSD nm"
37419f00f3a1Smrg  echo "int some_variable = 0;" > conftest.$ac_ext
37429f00f3a1Smrg  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
37439f00f3a1Smrg  (eval "$ac_compile" 2>conftest.err)
37449f00f3a1Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
37459f00f3a1Smrg  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
37469f00f3a1Smrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
37479f00f3a1Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
37489f00f3a1Smrg  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
37499f00f3a1Smrg  cat conftest.out >&AS_MESSAGE_LOG_FD
37509f00f3a1Smrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
37519f00f3a1Smrg    lt_cv_nm_interface="MS dumpbin"
37529f00f3a1Smrg  fi
37539f00f3a1Smrg  rm -f conftest*])
37549f00f3a1Smrg])# LT_PATH_NM
37559f00f3a1Smrg
37569f00f3a1Smrg# Old names:
37579f00f3a1SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
37589f00f3a1SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
37599f00f3a1Smrgdnl aclocal-1.4 backwards compatibility:
37609f00f3a1Smrgdnl AC_DEFUN([AM_PROG_NM], [])
37619f00f3a1Smrgdnl AC_DEFUN([AC_PROG_NM], [])
37629f00f3a1Smrg
37639f00f3a1Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
37649f00f3a1Smrg# --------------------------------
37659f00f3a1Smrg# how to determine the name of the shared library
37669f00f3a1Smrg# associated with a specific link library.
37679f00f3a1Smrg#  -- PORTME fill in with the dynamic library characteristics
37689f00f3a1Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
37699f00f3a1Smrg[m4_require([_LT_DECL_EGREP])
37709f00f3a1Smrgm4_require([_LT_DECL_OBJDUMP])
37719f00f3a1Smrgm4_require([_LT_DECL_DLLTOOL])
37729f00f3a1SmrgAC_CACHE_CHECK([how to associate runtime and link libraries],
37739f00f3a1Smrglt_cv_sharedlib_from_linklib_cmd,
37749f00f3a1Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown'
37759f00f3a1Smrg
37769f00f3a1Smrgcase $host_os in
37779f00f3a1Smrgcygwin* | mingw* | pw32* | cegcc*)
3778edce3322Smrg  # two different shell functions defined in ltmain.sh;
3779edce3322Smrg  # decide which one to use based on capabilities of $DLLTOOL
37809f00f3a1Smrg  case `$DLLTOOL --help 2>&1` in
37819f00f3a1Smrg  *--identify-strict*)
37829f00f3a1Smrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
37839f00f3a1Smrg    ;;
37849f00f3a1Smrg  *)
37859f00f3a1Smrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
37869f00f3a1Smrg    ;;
37879f00f3a1Smrg  esac
37889f00f3a1Smrg  ;;
37899f00f3a1Smrg*)
37909f00f3a1Smrg  # fallback: assume linklib IS sharedlib
3791edce3322Smrg  lt_cv_sharedlib_from_linklib_cmd=$ECHO
37929f00f3a1Smrg  ;;
37939f00f3a1Smrgesac
37949f00f3a1Smrg])
37959f00f3a1Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
37969f00f3a1Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
37979f00f3a1Smrg
37989f00f3a1Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
37999f00f3a1Smrg    [Command to associate shared and link libraries])
38009f00f3a1Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
38019f00f3a1Smrg
38029f00f3a1Smrg
38039f00f3a1Smrg# _LT_PATH_MANIFEST_TOOL
38049f00f3a1Smrg# ----------------------
38059f00f3a1Smrg# locate the manifest tool
38069f00f3a1Smrgm4_defun([_LT_PATH_MANIFEST_TOOL],
38079f00f3a1Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
38089f00f3a1Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
38099f00f3a1SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
38109f00f3a1Smrg  [lt_cv_path_mainfest_tool=no
38119f00f3a1Smrg  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
38129f00f3a1Smrg  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
38139f00f3a1Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
38149f00f3a1Smrg  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
38159f00f3a1Smrg    lt_cv_path_mainfest_tool=yes
38169f00f3a1Smrg  fi
38179f00f3a1Smrg  rm -f conftest*])
3818edce3322Smrgif test yes != "$lt_cv_path_mainfest_tool"; then
38199f00f3a1Smrg  MANIFEST_TOOL=:
38209f00f3a1Smrgfi
38219f00f3a1Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
38229f00f3a1Smrg])# _LT_PATH_MANIFEST_TOOL
38239f00f3a1Smrg
38249f00f3a1Smrg
3825edce3322Smrg# _LT_DLL_DEF_P([FILE])
3826edce3322Smrg# ---------------------
3827edce3322Smrg# True iff FILE is a Windows DLL '.def' file.
3828edce3322Smrg# Keep in sync with func_dll_def_p in the libtool script
3829edce3322SmrgAC_DEFUN([_LT_DLL_DEF_P],
3830edce3322Smrg[dnl
3831edce3322Smrg  test DEF = "`$SED -n dnl
3832edce3322Smrg    -e '\''s/^[[	 ]]*//'\'' dnl Strip leading whitespace
3833edce3322Smrg    -e '\''/^\(;.*\)*$/d'\'' dnl      Delete empty lines and comments
3834edce3322Smrg    -e '\''s/^\(EXPORTS\|LIBRARY\)\([[	 ]].*\)*$/DEF/p'\'' dnl
3835edce3322Smrg    -e q dnl                          Only consider the first "real" line
3836edce3322Smrg    $1`" dnl
3837edce3322Smrg])# _LT_DLL_DEF_P
3838edce3322Smrg
3839edce3322Smrg
38409f00f3a1Smrg# LT_LIB_M
38419f00f3a1Smrg# --------
38429f00f3a1Smrg# check for math library
38439f00f3a1SmrgAC_DEFUN([LT_LIB_M],
38449f00f3a1Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
38459f00f3a1SmrgLIBM=
38469f00f3a1Smrgcase $host in
38479f00f3a1Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
38489f00f3a1Smrg  # These system don't have libm, or don't need it
38499f00f3a1Smrg  ;;
38509f00f3a1Smrg*-ncr-sysv4.3*)
3851edce3322Smrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
38529f00f3a1Smrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
38539f00f3a1Smrg  ;;
38549f00f3a1Smrg*)
3855edce3322Smrg  AC_CHECK_LIB(m, cos, LIBM=-lm)
38569f00f3a1Smrg  ;;
38579f00f3a1Smrgesac
38589f00f3a1SmrgAC_SUBST([LIBM])
38599f00f3a1Smrg])# LT_LIB_M
38609f00f3a1Smrg
38619f00f3a1Smrg# Old name:
38629f00f3a1SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
38639f00f3a1Smrgdnl aclocal-1.4 backwards compatibility:
38649f00f3a1Smrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
38659f00f3a1Smrg
38669f00f3a1Smrg
38679f00f3a1Smrg# _LT_COMPILER_NO_RTTI([TAGNAME])
38689f00f3a1Smrg# -------------------------------
38699f00f3a1Smrgm4_defun([_LT_COMPILER_NO_RTTI],
38709f00f3a1Smrg[m4_require([_LT_TAG_COMPILER])dnl
38719f00f3a1Smrg
38729f00f3a1Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
38739f00f3a1Smrg
3874edce3322Smrgif test yes = "$GCC"; then
38759f00f3a1Smrg  case $cc_basename in
38769f00f3a1Smrg  nvcc*)
38779f00f3a1Smrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
38789f00f3a1Smrg  *)
38799f00f3a1Smrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
38809f00f3a1Smrg  esac
38819f00f3a1Smrg
38829f00f3a1Smrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
38839f00f3a1Smrg    lt_cv_prog_compiler_rtti_exceptions,
38849f00f3a1Smrg    [-fno-rtti -fno-exceptions], [],
38859f00f3a1Smrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
38869f00f3a1Smrgfi
38879f00f3a1Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
38889f00f3a1Smrg	[Compiler flag to turn off builtin functions])
38899f00f3a1Smrg])# _LT_COMPILER_NO_RTTI
38909f00f3a1Smrg
38919f00f3a1Smrg
38929f00f3a1Smrg# _LT_CMD_GLOBAL_SYMBOLS
38939f00f3a1Smrg# ----------------------
38949f00f3a1Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
38959f00f3a1Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
38969f00f3a1SmrgAC_REQUIRE([AC_PROG_CC])dnl
38979f00f3a1SmrgAC_REQUIRE([AC_PROG_AWK])dnl
38989f00f3a1SmrgAC_REQUIRE([LT_PATH_NM])dnl
38999f00f3a1SmrgAC_REQUIRE([LT_PATH_LD])dnl
39009f00f3a1Smrgm4_require([_LT_DECL_SED])dnl
39019f00f3a1Smrgm4_require([_LT_DECL_EGREP])dnl
39029f00f3a1Smrgm4_require([_LT_TAG_COMPILER])dnl
39039f00f3a1Smrg
39049f00f3a1Smrg# Check for command to grab the raw symbol name followed by C symbol from nm.
39059f00f3a1SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
39069f00f3a1SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
39079f00f3a1Smrg[
39089f00f3a1Smrg# These are sane defaults that work on at least a few old systems.
39099f00f3a1Smrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
39109f00f3a1Smrg
39119f00f3a1Smrg# Character class describing NM global symbol codes.
39129f00f3a1Smrgsymcode='[[BCDEGRST]]'
39139f00f3a1Smrg
39149f00f3a1Smrg# Regexp to match symbols that can be accessed directly from C.
39159f00f3a1Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
39169f00f3a1Smrg
39179f00f3a1Smrg# Define system-specific variables.
39189f00f3a1Smrgcase $host_os in
39199f00f3a1Smrgaix*)
39209f00f3a1Smrg  symcode='[[BCDT]]'
39219f00f3a1Smrg  ;;
39229f00f3a1Smrgcygwin* | mingw* | pw32* | cegcc*)
39239f00f3a1Smrg  symcode='[[ABCDGISTW]]'
39249f00f3a1Smrg  ;;
39259f00f3a1Smrghpux*)
3926edce3322Smrg  if test ia64 = "$host_cpu"; then
39279f00f3a1Smrg    symcode='[[ABCDEGRST]]'
39289f00f3a1Smrg  fi
39299f00f3a1Smrg  ;;
39309f00f3a1Smrgirix* | nonstopux*)
39319f00f3a1Smrg  symcode='[[BCDEGRST]]'
39329f00f3a1Smrg  ;;
39339f00f3a1Smrgosf*)
39349f00f3a1Smrg  symcode='[[BCDEGQRST]]'
39359f00f3a1Smrg  ;;
39369f00f3a1Smrgsolaris*)
39379f00f3a1Smrg  symcode='[[BDRT]]'
39389f00f3a1Smrg  ;;
39399f00f3a1Smrgsco3.2v5*)
39409f00f3a1Smrg  symcode='[[DT]]'
39419f00f3a1Smrg  ;;
39429f00f3a1Smrgsysv4.2uw2*)
39439f00f3a1Smrg  symcode='[[DT]]'
39449f00f3a1Smrg  ;;
39459f00f3a1Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
39469f00f3a1Smrg  symcode='[[ABDT]]'
39479f00f3a1Smrg  ;;
39489f00f3a1Smrgsysv4)
39499f00f3a1Smrg  symcode='[[DFNSTU]]'
39509f00f3a1Smrg  ;;
39519f00f3a1Smrgesac
39529f00f3a1Smrg
39539f00f3a1Smrg# If we're using GNU nm, then use its standard symbol codes.
39549f00f3a1Smrgcase `$NM -V 2>&1` in
39559f00f3a1Smrg*GNU* | *'with BFD'*)
39569f00f3a1Smrg  symcode='[[ABCDGIRSTW]]' ;;
39579f00f3a1Smrgesac
39589f00f3a1Smrg
3959edce3322Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
3960edce3322Smrg  # Gets list of data symbols to import.
3961edce3322Smrg  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
3962edce3322Smrg  # Adjust the below global symbol transforms to fixup imported variables.
3963edce3322Smrg  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
3964edce3322Smrg  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
3965edce3322Smrg  lt_c_name_lib_hook="\
3966edce3322Smrg  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
3967edce3322Smrg  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
3968edce3322Smrgelse
3969edce3322Smrg  # Disable hooks by default.
3970edce3322Smrg  lt_cv_sys_global_symbol_to_import=
3971edce3322Smrg  lt_cdecl_hook=
3972edce3322Smrg  lt_c_name_hook=
3973edce3322Smrg  lt_c_name_lib_hook=
3974edce3322Smrgfi
3975edce3322Smrg
39769f00f3a1Smrg# Transform an extracted symbol line into a proper C declaration.
39779f00f3a1Smrg# Some systems (esp. on ia64) link data and code symbols differently,
39789f00f3a1Smrg# so use this general approach.
3979edce3322Smrglt_cv_sys_global_symbol_to_cdecl="sed -n"\
3980edce3322Smrg$lt_cdecl_hook\
3981edce3322Smrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
3982edce3322Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
39839f00f3a1Smrg
39849f00f3a1Smrg# Transform an extracted symbol line into symbol name and symbol address
3985edce3322Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n"\
3986edce3322Smrg$lt_c_name_hook\
3987edce3322Smrg" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
3988edce3322Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
3989edce3322Smrg
3990edce3322Smrg# Transform an extracted symbol line into symbol name with lib prefix and
3991edce3322Smrg# symbol address.
3992edce3322Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
3993edce3322Smrg$lt_c_name_lib_hook\
3994edce3322Smrg" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
3995edce3322Smrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
3996edce3322Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
39979f00f3a1Smrg
39989f00f3a1Smrg# Handle CRLF in mingw tool chain
39999f00f3a1Smrgopt_cr=
40009f00f3a1Smrgcase $build_os in
40019f00f3a1Smrgmingw*)
40029f00f3a1Smrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
40039f00f3a1Smrg  ;;
40049f00f3a1Smrgesac
40059f00f3a1Smrg
40069f00f3a1Smrg# Try without a prefix underscore, then with it.
40079f00f3a1Smrgfor ac_symprfx in "" "_"; do
40089f00f3a1Smrg
40099f00f3a1Smrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
40109f00f3a1Smrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
40119f00f3a1Smrg
40129f00f3a1Smrg  # Write the raw and C identifiers.
40139f00f3a1Smrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4014edce3322Smrg    # Fake it for dumpbin and say T for any non-static function,
4015edce3322Smrg    # D for any global variable and I for any imported variable.
40169f00f3a1Smrg    # Also find C++ and __fastcall symbols from MSVC++,
40179f00f3a1Smrg    # which start with @ or ?.
40189f00f3a1Smrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
40199f00f3a1Smrg"     {last_section=section; section=\$ 3};"\
40209f00f3a1Smrg"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
40219f00f3a1Smrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4022edce3322Smrg"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
4023edce3322Smrg"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
4024edce3322Smrg"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
40259f00f3a1Smrg"     \$ 0!~/External *\|/{next};"\
40269f00f3a1Smrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
40279f00f3a1Smrg"     {if(hide[section]) next};"\
4028edce3322Smrg"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
4029edce3322Smrg"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
4030edce3322Smrg"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
4031edce3322Smrg"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
40329f00f3a1Smrg"     ' prfx=^$ac_symprfx]"
40339f00f3a1Smrg  else
40349f00f3a1Smrg    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
40359f00f3a1Smrg  fi
40369f00f3a1Smrg  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
40379f00f3a1Smrg
40389f00f3a1Smrg  # Check to see that the pipe works correctly.
40399f00f3a1Smrg  pipe_works=no
40409f00f3a1Smrg
40419f00f3a1Smrg  rm -f conftest*
40429f00f3a1Smrg  cat > conftest.$ac_ext <<_LT_EOF
40439f00f3a1Smrg#ifdef __cplusplus
40449f00f3a1Smrgextern "C" {
40459f00f3a1Smrg#endif
40469f00f3a1Smrgchar nm_test_var;
40479f00f3a1Smrgvoid nm_test_func(void);
40489f00f3a1Smrgvoid nm_test_func(void){}
40499f00f3a1Smrg#ifdef __cplusplus
40509f00f3a1Smrg}
40519f00f3a1Smrg#endif
40529f00f3a1Smrgint main(){nm_test_var='a';nm_test_func();return(0);}
40539f00f3a1Smrg_LT_EOF
40549f00f3a1Smrg
40559f00f3a1Smrg  if AC_TRY_EVAL(ac_compile); then
40569f00f3a1Smrg    # Now try to grab the symbols.
40579f00f3a1Smrg    nlist=conftest.nm
40589f00f3a1Smrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
40599f00f3a1Smrg      # Try sorting and uniquifying the output.
40609f00f3a1Smrg      if sort "$nlist" | uniq > "$nlist"T; then
40619f00f3a1Smrg	mv -f "$nlist"T "$nlist"
40629f00f3a1Smrg      else
40639f00f3a1Smrg	rm -f "$nlist"T
40649f00f3a1Smrg      fi
40659f00f3a1Smrg
40669f00f3a1Smrg      # Make sure that we snagged all the symbols we need.
40679f00f3a1Smrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
40689f00f3a1Smrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
40699f00f3a1Smrg	  cat <<_LT_EOF > conftest.$ac_ext
40709f00f3a1Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
4071edce3322Smrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
4072edce3322Smrg/* DATA imports from DLLs on WIN32 can't be const, because runtime
40739f00f3a1Smrg   relocations are performed -- see ld's documentation on pseudo-relocs.  */
40749f00f3a1Smrg# define LT@&t@_DLSYM_CONST
4075edce3322Smrg#elif defined __osf__
40769f00f3a1Smrg/* This system does not cope well with relocations in const data.  */
40779f00f3a1Smrg# define LT@&t@_DLSYM_CONST
40789f00f3a1Smrg#else
40799f00f3a1Smrg# define LT@&t@_DLSYM_CONST const
40809f00f3a1Smrg#endif
40819f00f3a1Smrg
40829f00f3a1Smrg#ifdef __cplusplus
40839f00f3a1Smrgextern "C" {
40849f00f3a1Smrg#endif
40859f00f3a1Smrg
40869f00f3a1Smrg_LT_EOF
40879f00f3a1Smrg	  # Now generate the symbol file.
40889f00f3a1Smrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
40899f00f3a1Smrg
40909f00f3a1Smrg	  cat <<_LT_EOF >> conftest.$ac_ext
40919f00f3a1Smrg
40929f00f3a1Smrg/* The mapping between symbol names and symbols.  */
40939f00f3a1SmrgLT@&t@_DLSYM_CONST struct {
40949f00f3a1Smrg  const char *name;
40959f00f3a1Smrg  void       *address;
40969f00f3a1Smrg}
40979f00f3a1Smrglt__PROGRAM__LTX_preloaded_symbols[[]] =
40989f00f3a1Smrg{
40999f00f3a1Smrg  { "@PROGRAM@", (void *) 0 },
41009f00f3a1Smrg_LT_EOF
4101edce3322Smrg	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
41029f00f3a1Smrg	  cat <<\_LT_EOF >> conftest.$ac_ext
41039f00f3a1Smrg  {0, (void *) 0}
41049f00f3a1Smrg};
41059f00f3a1Smrg
41069f00f3a1Smrg/* This works around a problem in FreeBSD linker */
41079f00f3a1Smrg#ifdef FREEBSD_WORKAROUND
41089f00f3a1Smrgstatic const void *lt_preloaded_setup() {
41099f00f3a1Smrg  return lt__PROGRAM__LTX_preloaded_symbols;
41109f00f3a1Smrg}
41119f00f3a1Smrg#endif
41129f00f3a1Smrg
41139f00f3a1Smrg#ifdef __cplusplus
41149f00f3a1Smrg}
41159f00f3a1Smrg#endif
41169f00f3a1Smrg_LT_EOF
41179f00f3a1Smrg	  # Now try linking the two files.
41189f00f3a1Smrg	  mv conftest.$ac_objext conftstm.$ac_objext
41199f00f3a1Smrg	  lt_globsym_save_LIBS=$LIBS
41209f00f3a1Smrg	  lt_globsym_save_CFLAGS=$CFLAGS
4121edce3322Smrg	  LIBS=conftstm.$ac_objext
41229f00f3a1Smrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4123edce3322Smrg	  if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
41249f00f3a1Smrg	    pipe_works=yes
41259f00f3a1Smrg	  fi
41269f00f3a1Smrg	  LIBS=$lt_globsym_save_LIBS
41279f00f3a1Smrg	  CFLAGS=$lt_globsym_save_CFLAGS
41289f00f3a1Smrg	else
41299f00f3a1Smrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
41309f00f3a1Smrg	fi
41319f00f3a1Smrg      else
41329f00f3a1Smrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
41339f00f3a1Smrg      fi
41349f00f3a1Smrg    else
41359f00f3a1Smrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
41369f00f3a1Smrg    fi
41379f00f3a1Smrg  else
41389f00f3a1Smrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
41399f00f3a1Smrg    cat conftest.$ac_ext >&5
41409f00f3a1Smrg  fi
41419f00f3a1Smrg  rm -rf conftest* conftst*
41429f00f3a1Smrg
41439f00f3a1Smrg  # Do not use the global_symbol_pipe unless it works.
4144edce3322Smrg  if test yes = "$pipe_works"; then
41459f00f3a1Smrg    break
41469f00f3a1Smrg  else
41479f00f3a1Smrg    lt_cv_sys_global_symbol_pipe=
41489f00f3a1Smrg  fi
41499f00f3a1Smrgdone
41509f00f3a1Smrg])
41519f00f3a1Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
41529f00f3a1Smrg  lt_cv_sys_global_symbol_to_cdecl=
41539f00f3a1Smrgfi
41549f00f3a1Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
41559f00f3a1Smrg  AC_MSG_RESULT(failed)
41569f00f3a1Smrgelse
41579f00f3a1Smrg  AC_MSG_RESULT(ok)
41589f00f3a1Smrgfi
41599f00f3a1Smrg
41609f00f3a1Smrg# Response file support.
41619f00f3a1Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
41629f00f3a1Smrg  nm_file_list_spec='@'
41639f00f3a1Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
41649f00f3a1Smrg  nm_file_list_spec='@'
41659f00f3a1Smrgfi
41669f00f3a1Smrg
41679f00f3a1Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
41689f00f3a1Smrg    [Take the output of nm and produce a listing of raw symbols and C names])
41699f00f3a1Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
41709f00f3a1Smrg    [Transform the output of nm in a proper C declaration])
4171edce3322Smrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
4172edce3322Smrg    [Transform the output of nm into a list of symbols to manually relocate])
41739f00f3a1Smrg_LT_DECL([global_symbol_to_c_name_address],
41749f00f3a1Smrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
41759f00f3a1Smrg    [Transform the output of nm in a C name address pair])
41769f00f3a1Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
41779f00f3a1Smrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
41789f00f3a1Smrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
4179edce3322Smrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
4180edce3322Smrg    [The name lister interface])
41819f00f3a1Smrg_LT_DECL([], [nm_file_list_spec], [1],
41829f00f3a1Smrg    [Specify filename containing input files for $NM])
41839f00f3a1Smrg]) # _LT_CMD_GLOBAL_SYMBOLS
41849f00f3a1Smrg
41859f00f3a1Smrg
41869f00f3a1Smrg# _LT_COMPILER_PIC([TAGNAME])
41879f00f3a1Smrg# ---------------------------
41889f00f3a1Smrgm4_defun([_LT_COMPILER_PIC],
41899f00f3a1Smrg[m4_require([_LT_TAG_COMPILER])dnl
41909f00f3a1Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
41919f00f3a1Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
41929f00f3a1Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
41939f00f3a1Smrg
41949f00f3a1Smrgm4_if([$1], [CXX], [
41959f00f3a1Smrg  # C++ specific cases for pic, static, wl, etc.
4196edce3322Smrg  if test yes = "$GXX"; then
41979f00f3a1Smrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
41989f00f3a1Smrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
41999f00f3a1Smrg
42009f00f3a1Smrg    case $host_os in
42019f00f3a1Smrg    aix*)
42029f00f3a1Smrg      # All AIX code is PIC.
4203edce3322Smrg      if test ia64 = "$host_cpu"; then
42049f00f3a1Smrg	# AIX 5 now supports IA64 processor
42059f00f3a1Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
42069f00f3a1Smrg      fi
4207edce3322Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
42089f00f3a1Smrg      ;;
42099f00f3a1Smrg
42109f00f3a1Smrg    amigaos*)
42119f00f3a1Smrg      case $host_cpu in
42129f00f3a1Smrg      powerpc)
42139f00f3a1Smrg            # see comment about AmigaOS4 .so support
42149f00f3a1Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
42159f00f3a1Smrg        ;;
42169f00f3a1Smrg      m68k)
42179f00f3a1Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
4218edce3322Smrg            # adding the '-m68020' flag to GCC prevents building anything better,
4219edce3322Smrg            # like '-m68040'.
42209f00f3a1Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
42219f00f3a1Smrg        ;;
42229f00f3a1Smrg      esac
42239f00f3a1Smrg      ;;
42249f00f3a1Smrg
42259f00f3a1Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
42269f00f3a1Smrg      # PIC is the default for these OSes.
42279f00f3a1Smrg      ;;
42289f00f3a1Smrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
42299f00f3a1Smrg      # This hack is so that the source file can tell whether it is being
42309f00f3a1Smrg      # built for inclusion in a dll (and should export symbols for example).
42319f00f3a1Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
42329f00f3a1Smrg      # (--disable-auto-import) libraries
42339f00f3a1Smrg      m4_if([$1], [GCJ], [],
42349f00f3a1Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4235edce3322Smrg      case $host_os in
4236edce3322Smrg      os2*)
4237edce3322Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4238edce3322Smrg	;;
4239edce3322Smrg      esac
42409f00f3a1Smrg      ;;
42419f00f3a1Smrg    darwin* | rhapsody*)
42429f00f3a1Smrg      # PIC is the default on this platform
42439f00f3a1Smrg      # Common symbols not allowed in MH_DYLIB files
42449f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
42459f00f3a1Smrg      ;;
42469f00f3a1Smrg    *djgpp*)
42479f00f3a1Smrg      # DJGPP does not support shared libraries at all
42489f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
42499f00f3a1Smrg      ;;
42509f00f3a1Smrg    haiku*)
42519f00f3a1Smrg      # PIC is the default for Haiku.
42529f00f3a1Smrg      # The "-static" flag exists, but is broken.
42539f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
42549f00f3a1Smrg      ;;
42559f00f3a1Smrg    interix[[3-9]]*)
42569f00f3a1Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
42579f00f3a1Smrg      # Instead, we relocate shared libraries at runtime.
42589f00f3a1Smrg      ;;
42599f00f3a1Smrg    sysv4*MP*)
42609f00f3a1Smrg      if test -d /usr/nec; then
42619f00f3a1Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
42629f00f3a1Smrg      fi
42639f00f3a1Smrg      ;;
42649f00f3a1Smrg    hpux*)
42659f00f3a1Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
42669f00f3a1Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
42679f00f3a1Smrg      # sets the default TLS model and affects inlining.
42689f00f3a1Smrg      case $host_cpu in
42699f00f3a1Smrg      hppa*64*)
42709f00f3a1Smrg	;;
42719f00f3a1Smrg      *)
42729f00f3a1Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
42739f00f3a1Smrg	;;
42749f00f3a1Smrg      esac
42759f00f3a1Smrg      ;;
42769f00f3a1Smrg    *qnx* | *nto*)
42779f00f3a1Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
42789f00f3a1Smrg      # it will coredump.
42799f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
42809f00f3a1Smrg      ;;
42819f00f3a1Smrg    *)
42829f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
42839f00f3a1Smrg      ;;
42849f00f3a1Smrg    esac
42859f00f3a1Smrg  else
42869f00f3a1Smrg    case $host_os in
42879f00f3a1Smrg      aix[[4-9]]*)
42889f00f3a1Smrg	# All AIX code is PIC.
4289edce3322Smrg	if test ia64 = "$host_cpu"; then
42909f00f3a1Smrg	  # AIX 5 now supports IA64 processor
42919f00f3a1Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
42929f00f3a1Smrg	else
42939f00f3a1Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
42949f00f3a1Smrg	fi
42959f00f3a1Smrg	;;
42969f00f3a1Smrg      chorus*)
42979f00f3a1Smrg	case $cc_basename in
42989f00f3a1Smrg	cxch68*)
42999f00f3a1Smrg	  # Green Hills C++ Compiler
43009f00f3a1Smrg	  # _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"
43019f00f3a1Smrg	  ;;
43029f00f3a1Smrg	esac
43039f00f3a1Smrg	;;
43049f00f3a1Smrg      mingw* | cygwin* | os2* | pw32* | cegcc*)
43059f00f3a1Smrg	# This hack is so that the source file can tell whether it is being
43069f00f3a1Smrg	# built for inclusion in a dll (and should export symbols for example).
43079f00f3a1Smrg	m4_if([$1], [GCJ], [],
43089f00f3a1Smrg	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
43099f00f3a1Smrg	;;
43109f00f3a1Smrg      dgux*)
43119f00f3a1Smrg	case $cc_basename in
43129f00f3a1Smrg	  ec++*)
43139f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
43149f00f3a1Smrg	    ;;
43159f00f3a1Smrg	  ghcx*)
43169f00f3a1Smrg	    # Green Hills C++ Compiler
43179f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
43189f00f3a1Smrg	    ;;
43199f00f3a1Smrg	  *)
43209f00f3a1Smrg	    ;;
43219f00f3a1Smrg	esac
43229f00f3a1Smrg	;;
43239f00f3a1Smrg      freebsd* | dragonfly*)
43249f00f3a1Smrg	# FreeBSD uses GNU C++
43259f00f3a1Smrg	;;
43269f00f3a1Smrg      hpux9* | hpux10* | hpux11*)
43279f00f3a1Smrg	case $cc_basename in
43289f00f3a1Smrg	  CC*)
43299f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4330edce3322Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4331edce3322Smrg	    if test ia64 != "$host_cpu"; then
43329f00f3a1Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
43339f00f3a1Smrg	    fi
43349f00f3a1Smrg	    ;;
43359f00f3a1Smrg	  aCC*)
43369f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4337edce3322Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
43389f00f3a1Smrg	    case $host_cpu in
43399f00f3a1Smrg	    hppa*64*|ia64*)
43409f00f3a1Smrg	      # +Z the default
43419f00f3a1Smrg	      ;;
43429f00f3a1Smrg	    *)
43439f00f3a1Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
43449f00f3a1Smrg	      ;;
43459f00f3a1Smrg	    esac
43469f00f3a1Smrg	    ;;
43479f00f3a1Smrg	  *)
43489f00f3a1Smrg	    ;;
43499f00f3a1Smrg	esac
43509f00f3a1Smrg	;;
43519f00f3a1Smrg      interix*)
43529f00f3a1Smrg	# This is c89, which is MS Visual C++ (no shared libs)
43539f00f3a1Smrg	# Anyone wants to do a port?
43549f00f3a1Smrg	;;
43559f00f3a1Smrg      irix5* | irix6* | nonstopux*)
43569f00f3a1Smrg	case $cc_basename in
43579f00f3a1Smrg	  CC*)
43589f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43599f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
43609f00f3a1Smrg	    # CC pic flag -KPIC is the default.
43619f00f3a1Smrg	    ;;
43629f00f3a1Smrg	  *)
43639f00f3a1Smrg	    ;;
43649f00f3a1Smrg	esac
43659f00f3a1Smrg	;;
43669f00f3a1Smrg      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
43679f00f3a1Smrg	case $cc_basename in
43689f00f3a1Smrg	  KCC*)
43699f00f3a1Smrg	    # KAI C++ Compiler
43709f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
43719f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
43729f00f3a1Smrg	    ;;
43739f00f3a1Smrg	  ecpc* )
4374edce3322Smrg	    # old Intel C++ for x86_64, which still supported -KPIC.
43759f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43769f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
43779f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
43789f00f3a1Smrg	    ;;
43799f00f3a1Smrg	  icpc* )
43809f00f3a1Smrg	    # Intel C++, used to be incompatible with GCC.
43819f00f3a1Smrg	    # ICC 10 doesn't accept -KPIC any more.
43829f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43839f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
43849f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
43859f00f3a1Smrg	    ;;
43869f00f3a1Smrg	  pgCC* | pgcpp*)
43879f00f3a1Smrg	    # Portland Group C++ compiler
43889f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43899f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
43909f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
43919f00f3a1Smrg	    ;;
43929f00f3a1Smrg	  cxx*)
43939f00f3a1Smrg	    # Compaq C++
43949f00f3a1Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
43959f00f3a1Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
43969f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
43979f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
43989f00f3a1Smrg	    ;;
43999f00f3a1Smrg	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
44009f00f3a1Smrg	    # IBM XL 8.0, 9.0 on PPC and BlueGene
44019f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
44029f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
44039f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
44049f00f3a1Smrg	    ;;
44059f00f3a1Smrg	  *)
44069f00f3a1Smrg	    case `$CC -V 2>&1 | sed 5q` in
44079f00f3a1Smrg	    *Sun\ C*)
44089f00f3a1Smrg	      # Sun C++ 5.9
44099f00f3a1Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
44109f00f3a1Smrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
44119f00f3a1Smrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
44129f00f3a1Smrg	      ;;
44139f00f3a1Smrg	    esac
44149f00f3a1Smrg	    ;;
44159f00f3a1Smrg	esac
44169f00f3a1Smrg	;;
44179f00f3a1Smrg      lynxos*)
44189f00f3a1Smrg	;;
44199f00f3a1Smrg      m88k*)
44209f00f3a1Smrg	;;
44219f00f3a1Smrg      mvs*)
44229f00f3a1Smrg	case $cc_basename in
44239f00f3a1Smrg	  cxx*)
44249f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
44259f00f3a1Smrg	    ;;
44269f00f3a1Smrg	  *)
44279f00f3a1Smrg	    ;;
44289f00f3a1Smrg	esac
44299f00f3a1Smrg	;;
4430edce3322Smrg      netbsd*)
44319f00f3a1Smrg	;;
44329f00f3a1Smrg      *qnx* | *nto*)
44339f00f3a1Smrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
44349f00f3a1Smrg        # it will coredump.
44359f00f3a1Smrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
44369f00f3a1Smrg        ;;
44379f00f3a1Smrg      osf3* | osf4* | osf5*)
44389f00f3a1Smrg	case $cc_basename in
44399f00f3a1Smrg	  KCC*)
44409f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
44419f00f3a1Smrg	    ;;
44429f00f3a1Smrg	  RCC*)
44439f00f3a1Smrg	    # Rational C++ 2.4.1
44449f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
44459f00f3a1Smrg	    ;;
44469f00f3a1Smrg	  cxx*)
44479f00f3a1Smrg	    # Digital/Compaq C++
44489f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
44499f00f3a1Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
44509f00f3a1Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
44519f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
44529f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
44539f00f3a1Smrg	    ;;
44549f00f3a1Smrg	  *)
44559f00f3a1Smrg	    ;;
44569f00f3a1Smrg	esac
44579f00f3a1Smrg	;;
44589f00f3a1Smrg      psos*)
44599f00f3a1Smrg	;;
44609f00f3a1Smrg      solaris*)
44619f00f3a1Smrg	case $cc_basename in
44629f00f3a1Smrg	  CC* | sunCC*)
44639f00f3a1Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
44649f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
44659f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
44669f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
44679f00f3a1Smrg	    ;;
44689f00f3a1Smrg	  gcx*)
44699f00f3a1Smrg	    # Green Hills C++ Compiler
44709f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
44719f00f3a1Smrg	    ;;
44729f00f3a1Smrg	  *)
44739f00f3a1Smrg	    ;;
44749f00f3a1Smrg	esac
44759f00f3a1Smrg	;;
44769f00f3a1Smrg      sunos4*)
44779f00f3a1Smrg	case $cc_basename in
44789f00f3a1Smrg	  CC*)
44799f00f3a1Smrg	    # Sun C++ 4.x
44809f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
44819f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
44829f00f3a1Smrg	    ;;
44839f00f3a1Smrg	  lcc*)
44849f00f3a1Smrg	    # Lucid
44859f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
44869f00f3a1Smrg	    ;;
44879f00f3a1Smrg	  *)
44889f00f3a1Smrg	    ;;
44899f00f3a1Smrg	esac
44909f00f3a1Smrg	;;
44919f00f3a1Smrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
44929f00f3a1Smrg	case $cc_basename in
44939f00f3a1Smrg	  CC*)
44949f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
44959f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
44969f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
44979f00f3a1Smrg	    ;;
44989f00f3a1Smrg	esac
44999f00f3a1Smrg	;;
45009f00f3a1Smrg      tandem*)
45019f00f3a1Smrg	case $cc_basename in
45029f00f3a1Smrg	  NCC*)
45039f00f3a1Smrg	    # NonStop-UX NCC 3.20
45049f00f3a1Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
45059f00f3a1Smrg	    ;;
45069f00f3a1Smrg	  *)
45079f00f3a1Smrg	    ;;
45089f00f3a1Smrg	esac
45099f00f3a1Smrg	;;
45109f00f3a1Smrg      vxworks*)
45119f00f3a1Smrg	;;
45129f00f3a1Smrg      *)
45139f00f3a1Smrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
45149f00f3a1Smrg	;;
45159f00f3a1Smrg    esac
45169f00f3a1Smrg  fi
45179f00f3a1Smrg],
45189f00f3a1Smrg[
4519edce3322Smrg  if test yes = "$GCC"; then
45209f00f3a1Smrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
45219f00f3a1Smrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
45229f00f3a1Smrg
45239f00f3a1Smrg    case $host_os in
45249f00f3a1Smrg      aix*)
45259f00f3a1Smrg      # All AIX code is PIC.
4526edce3322Smrg      if test ia64 = "$host_cpu"; then
45279f00f3a1Smrg	# AIX 5 now supports IA64 processor
45289f00f3a1Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
45299f00f3a1Smrg      fi
4530edce3322Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
45319f00f3a1Smrg      ;;
45329f00f3a1Smrg
45339f00f3a1Smrg    amigaos*)
45349f00f3a1Smrg      case $host_cpu in
45359f00f3a1Smrg      powerpc)
45369f00f3a1Smrg            # see comment about AmigaOS4 .so support
45379f00f3a1Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
45389f00f3a1Smrg        ;;
45399f00f3a1Smrg      m68k)
45409f00f3a1Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
4541edce3322Smrg            # adding the '-m68020' flag to GCC prevents building anything better,
4542edce3322Smrg            # like '-m68040'.
45439f00f3a1Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
45449f00f3a1Smrg        ;;
45459f00f3a1Smrg      esac
45469f00f3a1Smrg      ;;
45479f00f3a1Smrg
45489f00f3a1Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
45499f00f3a1Smrg      # PIC is the default for these OSes.
45509f00f3a1Smrg      ;;
45519f00f3a1Smrg
45529f00f3a1Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
45539f00f3a1Smrg      # This hack is so that the source file can tell whether it is being
45549f00f3a1Smrg      # built for inclusion in a dll (and should export symbols for example).
45559f00f3a1Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
45569f00f3a1Smrg      # (--disable-auto-import) libraries
45579f00f3a1Smrg      m4_if([$1], [GCJ], [],
45589f00f3a1Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4559edce3322Smrg      case $host_os in
4560edce3322Smrg      os2*)
4561edce3322Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4562edce3322Smrg	;;
4563edce3322Smrg      esac
45649f00f3a1Smrg      ;;
45659f00f3a1Smrg
45669f00f3a1Smrg    darwin* | rhapsody*)
45679f00f3a1Smrg      # PIC is the default on this platform
45689f00f3a1Smrg      # Common symbols not allowed in MH_DYLIB files
45699f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
45709f00f3a1Smrg      ;;
45719f00f3a1Smrg
45729f00f3a1Smrg    haiku*)
45739f00f3a1Smrg      # PIC is the default for Haiku.
45749f00f3a1Smrg      # The "-static" flag exists, but is broken.
45759f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
45769f00f3a1Smrg      ;;
45779f00f3a1Smrg
45789f00f3a1Smrg    hpux*)
45799f00f3a1Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
45809f00f3a1Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
45819f00f3a1Smrg      # sets the default TLS model and affects inlining.
45829f00f3a1Smrg      case $host_cpu in
45839f00f3a1Smrg      hppa*64*)
45849f00f3a1Smrg	# +Z the default
45859f00f3a1Smrg	;;
45869f00f3a1Smrg      *)
45879f00f3a1Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
45889f00f3a1Smrg	;;
45899f00f3a1Smrg      esac
45909f00f3a1Smrg      ;;
45919f00f3a1Smrg
45929f00f3a1Smrg    interix[[3-9]]*)
45939f00f3a1Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
45949f00f3a1Smrg      # Instead, we relocate shared libraries at runtime.
45959f00f3a1Smrg      ;;
45969f00f3a1Smrg
45979f00f3a1Smrg    msdosdjgpp*)
45989f00f3a1Smrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
45999f00f3a1Smrg      # on systems that don't support them.
46009f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
46019f00f3a1Smrg      enable_shared=no
46029f00f3a1Smrg      ;;
46039f00f3a1Smrg
46049f00f3a1Smrg    *nto* | *qnx*)
46059f00f3a1Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
46069f00f3a1Smrg      # it will coredump.
46079f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
46089f00f3a1Smrg      ;;
46099f00f3a1Smrg
46109f00f3a1Smrg    sysv4*MP*)
46119f00f3a1Smrg      if test -d /usr/nec; then
46129f00f3a1Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
46139f00f3a1Smrg      fi
46149f00f3a1Smrg      ;;
46159f00f3a1Smrg
46169f00f3a1Smrg    *)
46179f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
46189f00f3a1Smrg      ;;
46199f00f3a1Smrg    esac
46209f00f3a1Smrg
46219f00f3a1Smrg    case $cc_basename in
46229f00f3a1Smrg    nvcc*) # Cuda Compiler Driver 2.2
46239f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
46249f00f3a1Smrg      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
46259f00f3a1Smrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
46269f00f3a1Smrg      fi
46279f00f3a1Smrg      ;;
46289f00f3a1Smrg    esac
46299f00f3a1Smrg  else
46309f00f3a1Smrg    # PORTME Check for flag to pass linker flags through the system compiler.
46319f00f3a1Smrg    case $host_os in
46329f00f3a1Smrg    aix*)
46339f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4634edce3322Smrg      if test ia64 = "$host_cpu"; then
46359f00f3a1Smrg	# AIX 5 now supports IA64 processor
46369f00f3a1Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
46379f00f3a1Smrg      else
46389f00f3a1Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
46399f00f3a1Smrg      fi
46409f00f3a1Smrg      ;;
46419f00f3a1Smrg
4642edce3322Smrg    darwin* | rhapsody*)
4643edce3322Smrg      # PIC is the default on this platform
4644edce3322Smrg      # Common symbols not allowed in MH_DYLIB files
4645edce3322Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4646edce3322Smrg      case $cc_basename in
4647edce3322Smrg      nagfor*)
4648edce3322Smrg        # NAG Fortran compiler
4649edce3322Smrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4650edce3322Smrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4651edce3322Smrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4652edce3322Smrg        ;;
4653edce3322Smrg      esac
4654edce3322Smrg      ;;
4655edce3322Smrg
46569f00f3a1Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
46579f00f3a1Smrg      # This hack is so that the source file can tell whether it is being
46589f00f3a1Smrg      # built for inclusion in a dll (and should export symbols for example).
46599f00f3a1Smrg      m4_if([$1], [GCJ], [],
46609f00f3a1Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4661edce3322Smrg      case $host_os in
4662edce3322Smrg      os2*)
4663edce3322Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4664edce3322Smrg	;;
4665edce3322Smrg      esac
46669f00f3a1Smrg      ;;
46679f00f3a1Smrg
46689f00f3a1Smrg    hpux9* | hpux10* | hpux11*)
46699f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
46709f00f3a1Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
46719f00f3a1Smrg      # not for PA HP-UX.
46729f00f3a1Smrg      case $host_cpu in
46739f00f3a1Smrg      hppa*64*|ia64*)
46749f00f3a1Smrg	# +Z the default
46759f00f3a1Smrg	;;
46769f00f3a1Smrg      *)
46779f00f3a1Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
46789f00f3a1Smrg	;;
46799f00f3a1Smrg      esac
46809f00f3a1Smrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
4681edce3322Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
46829f00f3a1Smrg      ;;
46839f00f3a1Smrg
46849f00f3a1Smrg    irix5* | irix6* | nonstopux*)
46859f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
46869f00f3a1Smrg      # PIC (with -KPIC) is the default.
46879f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
46889f00f3a1Smrg      ;;
46899f00f3a1Smrg
46909f00f3a1Smrg    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
46919f00f3a1Smrg      case $cc_basename in
4692edce3322Smrg      # old Intel for x86_64, which still supported -KPIC.
46939f00f3a1Smrg      ecc*)
46949f00f3a1Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
46959f00f3a1Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
46969f00f3a1Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
46979f00f3a1Smrg        ;;
46989f00f3a1Smrg      # icc used to be incompatible with GCC.
46999f00f3a1Smrg      # ICC 10 doesn't accept -KPIC any more.
47009f00f3a1Smrg      icc* | ifort*)
47019f00f3a1Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47029f00f3a1Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
47039f00f3a1Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
47049f00f3a1Smrg        ;;
47059f00f3a1Smrg      # Lahey Fortran 8.1.
47069f00f3a1Smrg      lf95*)
47079f00f3a1Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47089f00f3a1Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
47099f00f3a1Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
47109f00f3a1Smrg	;;
47119f00f3a1Smrg      nagfor*)
47129f00f3a1Smrg	# NAG Fortran compiler
47139f00f3a1Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
47149f00f3a1Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
47159f00f3a1Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47169f00f3a1Smrg	;;
4717edce3322Smrg      tcc*)
4718edce3322Smrg	# Fabrice Bellard et al's Tiny C Compiler
4719edce3322Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4720edce3322Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4721edce3322Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4722edce3322Smrg	;;
47239f00f3a1Smrg      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
47249f00f3a1Smrg        # Portland Group compilers (*not* the Pentium gcc compiler,
47259f00f3a1Smrg	# which looks to be a dead project)
47269f00f3a1Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47279f00f3a1Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
47289f00f3a1Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47299f00f3a1Smrg        ;;
47309f00f3a1Smrg      ccc*)
47319f00f3a1Smrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47329f00f3a1Smrg        # All Alpha code is PIC.
47339f00f3a1Smrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
47349f00f3a1Smrg        ;;
47359f00f3a1Smrg      xl* | bgxl* | bgf* | mpixl*)
47369f00f3a1Smrg	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
47379f00f3a1Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47389f00f3a1Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
47399f00f3a1Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
47409f00f3a1Smrg	;;
47419f00f3a1Smrg      *)
47429f00f3a1Smrg	case `$CC -V 2>&1 | sed 5q` in
47439f00f3a1Smrg	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
47449f00f3a1Smrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
47459f00f3a1Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
47469f00f3a1Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47479f00f3a1Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
47489f00f3a1Smrg	  ;;
47499f00f3a1Smrg	*Sun\ F* | *Sun*Fortran*)
47509f00f3a1Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
47519f00f3a1Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47529f00f3a1Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
47539f00f3a1Smrg	  ;;
47549f00f3a1Smrg	*Sun\ C*)
47559f00f3a1Smrg	  # Sun C 5.9
47569f00f3a1Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
47579f00f3a1Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47589f00f3a1Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47599f00f3a1Smrg	  ;;
47609f00f3a1Smrg        *Intel*\ [[CF]]*Compiler*)
47619f00f3a1Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47629f00f3a1Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
47639f00f3a1Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
47649f00f3a1Smrg	  ;;
47659f00f3a1Smrg	*Portland\ Group*)
47669f00f3a1Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47679f00f3a1Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
47689f00f3a1Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47699f00f3a1Smrg	  ;;
47709f00f3a1Smrg	esac
47719f00f3a1Smrg	;;
47729f00f3a1Smrg      esac
47739f00f3a1Smrg      ;;
47749f00f3a1Smrg
47759f00f3a1Smrg    newsos6)
47769f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
47779f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47789f00f3a1Smrg      ;;
47799f00f3a1Smrg
47809f00f3a1Smrg    *nto* | *qnx*)
47819f00f3a1Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
47829f00f3a1Smrg      # it will coredump.
47839f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
47849f00f3a1Smrg      ;;
47859f00f3a1Smrg
47869f00f3a1Smrg    osf3* | osf4* | osf5*)
47879f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47889f00f3a1Smrg      # All OSF/1 code is PIC.
47899f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
47909f00f3a1Smrg      ;;
47919f00f3a1Smrg
47929f00f3a1Smrg    rdos*)
47939f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
47949f00f3a1Smrg      ;;
47959f00f3a1Smrg
47969f00f3a1Smrg    solaris*)
47979f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
47989f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47999f00f3a1Smrg      case $cc_basename in
48009f00f3a1Smrg      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
48019f00f3a1Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
48029f00f3a1Smrg      *)
48039f00f3a1Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
48049f00f3a1Smrg      esac
48059f00f3a1Smrg      ;;
48069f00f3a1Smrg
48079f00f3a1Smrg    sunos4*)
48089f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
48099f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
48109f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48119f00f3a1Smrg      ;;
48129f00f3a1Smrg
48139f00f3a1Smrg    sysv4 | sysv4.2uw2* | sysv4.3*)
48149f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
48159f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
48169f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48179f00f3a1Smrg      ;;
48189f00f3a1Smrg
48199f00f3a1Smrg    sysv4*MP*)
4820edce3322Smrg      if test -d /usr/nec; then
48219f00f3a1Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
48229f00f3a1Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48239f00f3a1Smrg      fi
48249f00f3a1Smrg      ;;
48259f00f3a1Smrg
48269f00f3a1Smrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
48279f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
48289f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
48299f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48309f00f3a1Smrg      ;;
48319f00f3a1Smrg
48329f00f3a1Smrg    unicos*)
48339f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
48349f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
48359f00f3a1Smrg      ;;
48369f00f3a1Smrg
48379f00f3a1Smrg    uts4*)
48389f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
48399f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48409f00f3a1Smrg      ;;
48419f00f3a1Smrg
48429f00f3a1Smrg    *)
48439f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
48449f00f3a1Smrg      ;;
48459f00f3a1Smrg    esac
48469f00f3a1Smrg  fi
48479f00f3a1Smrg])
48489f00f3a1Smrgcase $host_os in
4849edce3322Smrg  # For platforms that do not support PIC, -DPIC is meaningless:
48509f00f3a1Smrg  *djgpp*)
48519f00f3a1Smrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
48529f00f3a1Smrg    ;;
48539f00f3a1Smrg  *)
48549f00f3a1Smrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
48559f00f3a1Smrg    ;;
48569f00f3a1Smrgesac
48579f00f3a1Smrg
48589f00f3a1SmrgAC_CACHE_CHECK([for $compiler option to produce PIC],
48599f00f3a1Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
48609f00f3a1Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
48619f00f3a1Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
48629f00f3a1Smrg
48639f00f3a1Smrg#
48649f00f3a1Smrg# Check to make sure the PIC flag actually works.
48659f00f3a1Smrg#
48669f00f3a1Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
48679f00f3a1Smrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
48689f00f3a1Smrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
48699f00f3a1Smrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
48709f00f3a1Smrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
48719f00f3a1Smrg     "" | " "*) ;;
48729f00f3a1Smrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
48739f00f3a1Smrg     esac],
48749f00f3a1Smrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
48759f00f3a1Smrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
48769f00f3a1Smrgfi
48779f00f3a1Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
48789f00f3a1Smrg	[Additional compiler flags for building library objects])
48799f00f3a1Smrg
48809f00f3a1Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
48819f00f3a1Smrg	[How to pass a linker flag through the compiler])
48829f00f3a1Smrg#
48839f00f3a1Smrg# Check to make sure the static flag actually works.
48849f00f3a1Smrg#
48859f00f3a1Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
48869f00f3a1Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
48879f00f3a1Smrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
48889f00f3a1Smrg  $lt_tmp_static_flag,
48899f00f3a1Smrg  [],
48909f00f3a1Smrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
48919f00f3a1Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
48929f00f3a1Smrg	[Compiler flag to prevent dynamic linking])
48939f00f3a1Smrg])# _LT_COMPILER_PIC
48949f00f3a1Smrg
48959f00f3a1Smrg
48969f00f3a1Smrg# _LT_LINKER_SHLIBS([TAGNAME])
48979f00f3a1Smrg# ----------------------------
48989f00f3a1Smrg# See if the linker supports building shared libraries.
48999f00f3a1Smrgm4_defun([_LT_LINKER_SHLIBS],
49009f00f3a1Smrg[AC_REQUIRE([LT_PATH_LD])dnl
49019f00f3a1SmrgAC_REQUIRE([LT_PATH_NM])dnl
49029f00f3a1Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
49039f00f3a1Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
49049f00f3a1Smrgm4_require([_LT_DECL_EGREP])dnl
49059f00f3a1Smrgm4_require([_LT_DECL_SED])dnl
49069f00f3a1Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
49079f00f3a1Smrgm4_require([_LT_TAG_COMPILER])dnl
49089f00f3a1SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
49099f00f3a1Smrgm4_if([$1], [CXX], [
49109f00f3a1Smrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
49119f00f3a1Smrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
49129f00f3a1Smrg  case $host_os in
49139f00f3a1Smrg  aix[[4-9]]*)
49149f00f3a1Smrg    # If we're using GNU nm, then we don't want the "-C" option.
4915edce3322Smrg    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
4916edce3322Smrg    # Without the "-l" option, or with the "-B" option, AIX nm treats
4917edce3322Smrg    # weak defined symbols like other global defined symbols, whereas
4918edce3322Smrg    # GNU nm marks them as "W".
4919edce3322Smrg    # While the 'weak' keyword is ignored in the Export File, we need
4920edce3322Smrg    # it in the Import File for the 'aix-soname' feature, so we have
4921edce3322Smrg    # to replace the "-B" option with "-P" for AIX nm.
49229f00f3a1Smrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4923edce3322Smrg      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
49249f00f3a1Smrg    else
4925edce3322Smrg      _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
49269f00f3a1Smrg    fi
49279f00f3a1Smrg    ;;
49289f00f3a1Smrg  pw32*)
4929edce3322Smrg    _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
49309f00f3a1Smrg    ;;
49319f00f3a1Smrg  cygwin* | mingw* | cegcc*)
49329f00f3a1Smrg    case $cc_basename in
49339f00f3a1Smrg    cl*)
49349f00f3a1Smrg      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
49359f00f3a1Smrg      ;;
49369f00f3a1Smrg    *)
49379f00f3a1Smrg      _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'
49389f00f3a1Smrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
49399f00f3a1Smrg      ;;
49409f00f3a1Smrg    esac
49419f00f3a1Smrg    ;;
49429f00f3a1Smrg  *)
49439f00f3a1Smrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
49449f00f3a1Smrg    ;;
49459f00f3a1Smrg  esac
49469f00f3a1Smrg], [
49479f00f3a1Smrg  runpath_var=
49489f00f3a1Smrg  _LT_TAGVAR(allow_undefined_flag, $1)=
49499f00f3a1Smrg  _LT_TAGVAR(always_export_symbols, $1)=no
49509f00f3a1Smrg  _LT_TAGVAR(archive_cmds, $1)=
49519f00f3a1Smrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
49529f00f3a1Smrg  _LT_TAGVAR(compiler_needs_object, $1)=no
49539f00f3a1Smrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
49549f00f3a1Smrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
49559f00f3a1Smrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
49569f00f3a1Smrg  _LT_TAGVAR(hardcode_automatic, $1)=no
49579f00f3a1Smrg  _LT_TAGVAR(hardcode_direct, $1)=no
49589f00f3a1Smrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
49599f00f3a1Smrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
49609f00f3a1Smrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
49619f00f3a1Smrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
49629f00f3a1Smrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
49639f00f3a1Smrg  _LT_TAGVAR(inherit_rpath, $1)=no
49649f00f3a1Smrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
49659f00f3a1Smrg  _LT_TAGVAR(module_cmds, $1)=
49669f00f3a1Smrg  _LT_TAGVAR(module_expsym_cmds, $1)=
49679f00f3a1Smrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
49689f00f3a1Smrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
49699f00f3a1Smrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
49709f00f3a1Smrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
49719f00f3a1Smrg  # include_expsyms should be a list of space-separated symbols to be *always*
49729f00f3a1Smrg  # included in the symbol list
49739f00f3a1Smrg  _LT_TAGVAR(include_expsyms, $1)=
49749f00f3a1Smrg  # exclude_expsyms can be an extended regexp of symbols to exclude
4975edce3322Smrg  # it will be wrapped by ' (' and ')$', so one must not match beginning or
4976edce3322Smrg  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
4977edce3322Smrg  # as well as any symbol that contains 'd'.
49789f00f3a1Smrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
49799f00f3a1Smrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
49809f00f3a1Smrg  # platforms (ab)use it in PIC code, but their linkers get confused if
49819f00f3a1Smrg  # the symbol is explicitly referenced.  Since portable code cannot
49829f00f3a1Smrg  # rely on this symbol name, it's probably fine to never include it in
49839f00f3a1Smrg  # preloaded symbol tables.
49849f00f3a1Smrg  # Exclude shared library initialization/finalization symbols.
49859f00f3a1Smrgdnl Note also adjust exclude_expsyms for C++ above.
49869f00f3a1Smrg  extract_expsyms_cmds=
49879f00f3a1Smrg
49889f00f3a1Smrg  case $host_os in
49899f00f3a1Smrg  cygwin* | mingw* | pw32* | cegcc*)
49909f00f3a1Smrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
49919f00f3a1Smrg    # When not using gcc, we currently assume that we are using
49929f00f3a1Smrg    # Microsoft Visual C++.
4993edce3322Smrg    if test yes != "$GCC"; then
49949f00f3a1Smrg      with_gnu_ld=no
49959f00f3a1Smrg    fi
49969f00f3a1Smrg    ;;
49979f00f3a1Smrg  interix*)
49989f00f3a1Smrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
49999f00f3a1Smrg    with_gnu_ld=yes
50009f00f3a1Smrg    ;;
5001edce3322Smrg  openbsd* | bitrig*)
50029f00f3a1Smrg    with_gnu_ld=no
50039f00f3a1Smrg    ;;
50049f00f3a1Smrg  esac
50059f00f3a1Smrg
50069f00f3a1Smrg  _LT_TAGVAR(ld_shlibs, $1)=yes
50079f00f3a1Smrg
50089f00f3a1Smrg  # On some targets, GNU ld is compatible enough with the native linker
50099f00f3a1Smrg  # that we're better off using the native interface for both.
50109f00f3a1Smrg  lt_use_gnu_ld_interface=no
5011edce3322Smrg  if test yes = "$with_gnu_ld"; then
50129f00f3a1Smrg    case $host_os in
50139f00f3a1Smrg      aix*)
50149f00f3a1Smrg	# The AIX port of GNU ld has always aspired to compatibility
50159f00f3a1Smrg	# with the native linker.  However, as the warning in the GNU ld
50169f00f3a1Smrg	# block says, versions before 2.19.5* couldn't really create working
50179f00f3a1Smrg	# shared libraries, regardless of the interface used.
50189f00f3a1Smrg	case `$LD -v 2>&1` in
50199f00f3a1Smrg	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
50209f00f3a1Smrg	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
50219f00f3a1Smrg	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
50229f00f3a1Smrg	  *)
50239f00f3a1Smrg	    lt_use_gnu_ld_interface=yes
50249f00f3a1Smrg	    ;;
50259f00f3a1Smrg	esac
50269f00f3a1Smrg	;;
50279f00f3a1Smrg      *)
50289f00f3a1Smrg	lt_use_gnu_ld_interface=yes
50299f00f3a1Smrg	;;
50309f00f3a1Smrg    esac
50319f00f3a1Smrg  fi
50329f00f3a1Smrg
5033edce3322Smrg  if test yes = "$lt_use_gnu_ld_interface"; then
50349f00f3a1Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
5035edce3322Smrg    wlarc='$wl'
50369f00f3a1Smrg
50379f00f3a1Smrg    # Set some defaults for GNU ld with shared library support. These
50389f00f3a1Smrg    # are reset later if shared libraries are not supported. Putting them
50399f00f3a1Smrg    # here allows them to be overridden if necessary.
50409f00f3a1Smrg    runpath_var=LD_RUN_PATH
5041edce3322Smrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5042edce3322Smrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
50439f00f3a1Smrg    # ancient GNU ld didn't support --whole-archive et. al.
50449f00f3a1Smrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5045edce3322Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
50469f00f3a1Smrg    else
50479f00f3a1Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
50489f00f3a1Smrg    fi
50499f00f3a1Smrg    supports_anon_versioning=no
5050edce3322Smrg    case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
50519f00f3a1Smrg      *GNU\ gold*) supports_anon_versioning=yes ;;
50529f00f3a1Smrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
50539f00f3a1Smrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
50549f00f3a1Smrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
50559f00f3a1Smrg      *\ 2.11.*) ;; # other 2.11 versions
50569f00f3a1Smrg      *) supports_anon_versioning=yes ;;
50579f00f3a1Smrg    esac
50589f00f3a1Smrg
50599f00f3a1Smrg    # See if GNU ld supports shared libraries.
50609f00f3a1Smrg    case $host_os in
50619f00f3a1Smrg    aix[[3-9]]*)
50629f00f3a1Smrg      # On AIX/PPC, the GNU linker is very broken
5063edce3322Smrg      if test ia64 != "$host_cpu"; then
50649f00f3a1Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
50659f00f3a1Smrg	cat <<_LT_EOF 1>&2
50669f00f3a1Smrg
50679f00f3a1Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported
50689f00f3a1Smrg*** to be unable to reliably create shared libraries on AIX.
50699f00f3a1Smrg*** Therefore, libtool is disabling shared libraries support.  If you
50709f00f3a1Smrg*** really care for shared libraries, you may want to install binutils
50719f00f3a1Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
50729f00f3a1Smrg*** You will then need to restart the configuration process.
50739f00f3a1Smrg
50749f00f3a1Smrg_LT_EOF
50759f00f3a1Smrg      fi
50769f00f3a1Smrg      ;;
50779f00f3a1Smrg
50789f00f3a1Smrg    amigaos*)
50799f00f3a1Smrg      case $host_cpu in
50809f00f3a1Smrg      powerpc)
50819f00f3a1Smrg            # see comment about AmigaOS4 .so support
5082edce3322Smrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
50839f00f3a1Smrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
50849f00f3a1Smrg        ;;
50859f00f3a1Smrg      m68k)
50869f00f3a1Smrg            _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)'
50879f00f3a1Smrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
50889f00f3a1Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
50899f00f3a1Smrg        ;;
50909f00f3a1Smrg      esac
50919f00f3a1Smrg      ;;
50929f00f3a1Smrg
50939f00f3a1Smrg    beos*)
50949f00f3a1Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
50959f00f3a1Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
50969f00f3a1Smrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
50979f00f3a1Smrg	# support --undefined.  This deserves some investigation.  FIXME
5098edce3322Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
50999f00f3a1Smrg      else
51009f00f3a1Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
51019f00f3a1Smrg      fi
51029f00f3a1Smrg      ;;
51039f00f3a1Smrg
51049f00f3a1Smrg    cygwin* | mingw* | pw32* | cegcc*)
51059f00f3a1Smrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
51069f00f3a1Smrg      # as there is no search path for DLLs.
51079f00f3a1Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5108edce3322Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
51099f00f3a1Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
51109f00f3a1Smrg      _LT_TAGVAR(always_export_symbols, $1)=no
51119f00f3a1Smrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
51129f00f3a1Smrg      _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'
51139f00f3a1Smrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
51149f00f3a1Smrg
51159f00f3a1Smrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5116edce3322Smrg        _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'
5117edce3322Smrg	# If the export-symbols file already is a .def file, use it as
5118edce3322Smrg	# is; otherwise, prepend EXPORTS...
5119edce3322Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5120edce3322Smrg          cp $export_symbols $output_objdir/$soname.def;
5121edce3322Smrg        else
5122edce3322Smrg          echo EXPORTS > $output_objdir/$soname.def;
5123edce3322Smrg          cat $export_symbols >> $output_objdir/$soname.def;
5124edce3322Smrg        fi~
5125edce3322Smrg        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
51269f00f3a1Smrg      else
51279f00f3a1Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
51289f00f3a1Smrg      fi
51299f00f3a1Smrg      ;;
51309f00f3a1Smrg
51319f00f3a1Smrg    haiku*)
5132edce3322Smrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
51339f00f3a1Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
51349f00f3a1Smrg      ;;
51359f00f3a1Smrg
5136edce3322Smrg    os2*)
5137edce3322Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5138edce3322Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5139edce3322Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5140edce3322Smrg      shrext_cmds=.dll
5141edce3322Smrg      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5142edce3322Smrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5143edce3322Smrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5144edce3322Smrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
5145edce3322Smrg	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5146edce3322Smrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5147edce3322Smrg	emximp -o $lib $output_objdir/$libname.def'
5148edce3322Smrg      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5149edce3322Smrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5150edce3322Smrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5151edce3322Smrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
5152edce3322Smrg	prefix_cmds="$SED"~
5153edce3322Smrg	if test EXPORTS = "`$SED 1q $export_symbols`"; then
5154edce3322Smrg	  prefix_cmds="$prefix_cmds -e 1d";
5155edce3322Smrg	fi~
5156edce3322Smrg	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5157edce3322Smrg	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5158edce3322Smrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5159edce3322Smrg	emximp -o $lib $output_objdir/$libname.def'
5160edce3322Smrg      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5161edce3322Smrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5162edce3322Smrg      ;;
5163edce3322Smrg
51649f00f3a1Smrg    interix[[3-9]]*)
51659f00f3a1Smrg      _LT_TAGVAR(hardcode_direct, $1)=no
51669f00f3a1Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5167edce3322Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5168edce3322Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
51699f00f3a1Smrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
51709f00f3a1Smrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
51719f00f3a1Smrg      # default) and relocated if they conflict, which is a slow very memory
51729f00f3a1Smrg      # consuming and fragmenting process.  To avoid this, we pick a random,
51739f00f3a1Smrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
51749f00f3a1Smrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5175edce3322Smrg      _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'
5176edce3322Smrg      _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'
51779f00f3a1Smrg      ;;
51789f00f3a1Smrg
51799f00f3a1Smrg    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
51809f00f3a1Smrg      tmp_diet=no
5181edce3322Smrg      if test linux-dietlibc = "$host_os"; then
51829f00f3a1Smrg	case $cc_basename in
51839f00f3a1Smrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
51849f00f3a1Smrg	esac
51859f00f3a1Smrg      fi
51869f00f3a1Smrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5187edce3322Smrg	 && test no = "$tmp_diet"
51889f00f3a1Smrg      then
51899f00f3a1Smrg	tmp_addflag=' $pic_flag'
51909f00f3a1Smrg	tmp_sharedflag='-shared'
51919f00f3a1Smrg	case $cc_basename,$host_cpu in
51929f00f3a1Smrg        pgcc*)				# Portland Group C compiler
5193edce3322Smrg	  _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'
51949f00f3a1Smrg	  tmp_addflag=' $pic_flag'
51959f00f3a1Smrg	  ;;
51969f00f3a1Smrg	pgf77* | pgf90* | pgf95* | pgfortran*)
51979f00f3a1Smrg					# Portland Group f77 and f90 compilers
5198edce3322Smrg	  _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'
51999f00f3a1Smrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
52009f00f3a1Smrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
52019f00f3a1Smrg	  tmp_addflag=' -i_dynamic' ;;
52029f00f3a1Smrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
52039f00f3a1Smrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
52049f00f3a1Smrg	ifc* | ifort*)			# Intel Fortran compiler
52059f00f3a1Smrg	  tmp_addflag=' -nofor_main' ;;
52069f00f3a1Smrg	lf95*)				# Lahey Fortran 8.1
52079f00f3a1Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
52089f00f3a1Smrg	  tmp_sharedflag='--shared' ;;
5209edce3322Smrg        nagfor*)                        # NAGFOR 5.3
5210edce3322Smrg          tmp_sharedflag='-Wl,-shared' ;;
52119f00f3a1Smrg	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
52129f00f3a1Smrg	  tmp_sharedflag='-qmkshrobj'
52139f00f3a1Smrg	  tmp_addflag= ;;
52149f00f3a1Smrg	nvcc*)	# Cuda Compiler Driver 2.2
5215edce3322Smrg	  _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'
52169f00f3a1Smrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
52179f00f3a1Smrg	  ;;
52189f00f3a1Smrg	esac
52199f00f3a1Smrg	case `$CC -V 2>&1 | sed 5q` in
52209f00f3a1Smrg	*Sun\ C*)			# Sun C 5.9
5221edce3322Smrg	  _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'
52229f00f3a1Smrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
52239f00f3a1Smrg	  tmp_sharedflag='-G' ;;
52249f00f3a1Smrg	*Sun\ F*)			# Sun Fortran 8.3
52259f00f3a1Smrg	  tmp_sharedflag='-G' ;;
52269f00f3a1Smrg	esac
5227edce3322Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
52289f00f3a1Smrg
5229edce3322Smrg        if test yes = "$supports_anon_versioning"; then
52309f00f3a1Smrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5231edce3322Smrg            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5232edce3322Smrg            echo "local: *; };" >> $output_objdir/$libname.ver~
5233edce3322Smrg            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
52349f00f3a1Smrg        fi
52359f00f3a1Smrg
52369f00f3a1Smrg	case $cc_basename in
5237edce3322Smrg	tcc*)
5238edce3322Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
5239edce3322Smrg	  ;;
52409f00f3a1Smrg	xlf* | bgf* | bgxlf* | mpixlf*)
52419f00f3a1Smrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
52429f00f3a1Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5243edce3322Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
52449f00f3a1Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5245edce3322Smrg	  if test yes = "$supports_anon_versioning"; then
52469f00f3a1Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5247edce3322Smrg              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5248edce3322Smrg              echo "local: *; };" >> $output_objdir/$libname.ver~
5249edce3322Smrg              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
52509f00f3a1Smrg	  fi
52519f00f3a1Smrg	  ;;
52529f00f3a1Smrg	esac
52539f00f3a1Smrg      else
52549f00f3a1Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
52559f00f3a1Smrg      fi
52569f00f3a1Smrg      ;;
52579f00f3a1Smrg
5258edce3322Smrg    netbsd*)
52599f00f3a1Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
52609f00f3a1Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
52619f00f3a1Smrg	wlarc=
52629f00f3a1Smrg      else
5263edce3322Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5264edce3322Smrg	_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'
52659f00f3a1Smrg      fi
52669f00f3a1Smrg      ;;
52679f00f3a1Smrg
52689f00f3a1Smrg    solaris*)
52699f00f3a1Smrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
52709f00f3a1Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
52719f00f3a1Smrg	cat <<_LT_EOF 1>&2
52729f00f3a1Smrg
52739f00f3a1Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
52749f00f3a1Smrg*** create shared libraries on Solaris systems.  Therefore, libtool
52759f00f3a1Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
52769f00f3a1Smrg*** binutils to release 2.9.1 or newer.  Another option is to modify
52779f00f3a1Smrg*** your PATH or compiler configuration so that the native linker is
52789f00f3a1Smrg*** used, and then restart.
52799f00f3a1Smrg
52809f00f3a1Smrg_LT_EOF
52819f00f3a1Smrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5282edce3322Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5283edce3322Smrg	_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'
52849f00f3a1Smrg      else
52859f00f3a1Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
52869f00f3a1Smrg      fi
52879f00f3a1Smrg      ;;
52889f00f3a1Smrg
52899f00f3a1Smrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
52909f00f3a1Smrg      case `$LD -v 2>&1` in
52919f00f3a1Smrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
52929f00f3a1Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
52939f00f3a1Smrg	cat <<_LT_EOF 1>&2
52949f00f3a1Smrg
5295edce3322Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
52969f00f3a1Smrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
52979f00f3a1Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
52989f00f3a1Smrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
52999f00f3a1Smrg*** your PATH or compiler configuration so that the native linker is
53009f00f3a1Smrg*** used, and then restart.
53019f00f3a1Smrg
53029f00f3a1Smrg_LT_EOF
53039f00f3a1Smrg	;;
53049f00f3a1Smrg	*)
53059f00f3a1Smrg	  # For security reasons, it is highly recommended that you always
53069f00f3a1Smrg	  # use absolute paths for naming shared libraries, and exclude the
53079f00f3a1Smrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
53089f00f3a1Smrg	  # requires that you compile everything twice, which is a pain.
53099f00f3a1Smrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5310edce3322Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5311edce3322Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5312edce3322Smrg	    _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'
53139f00f3a1Smrg	  else
53149f00f3a1Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
53159f00f3a1Smrg	  fi
53169f00f3a1Smrg	;;
53179f00f3a1Smrg      esac
53189f00f3a1Smrg      ;;
53199f00f3a1Smrg
53209f00f3a1Smrg    sunos4*)
53219f00f3a1Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
53229f00f3a1Smrg      wlarc=
53239f00f3a1Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
53249f00f3a1Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
53259f00f3a1Smrg      ;;
53269f00f3a1Smrg
53279f00f3a1Smrg    *)
53289f00f3a1Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5329edce3322Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5330edce3322Smrg	_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'
53319f00f3a1Smrg      else
53329f00f3a1Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
53339f00f3a1Smrg      fi
53349f00f3a1Smrg      ;;
53359f00f3a1Smrg    esac
53369f00f3a1Smrg
5337edce3322Smrg    if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
53389f00f3a1Smrg      runpath_var=
53399f00f3a1Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
53409f00f3a1Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
53419f00f3a1Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
53429f00f3a1Smrg    fi
53439f00f3a1Smrg  else
53449f00f3a1Smrg    # PORTME fill in a description of your system's linker (not GNU ld)
53459f00f3a1Smrg    case $host_os in
53469f00f3a1Smrg    aix3*)
53479f00f3a1Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
53489f00f3a1Smrg      _LT_TAGVAR(always_export_symbols, $1)=yes
53499f00f3a1Smrg      _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'
53509f00f3a1Smrg      # Note: this linker hardcodes the directories in LIBPATH if there
53519f00f3a1Smrg      # are no directories specified by -L.
53529f00f3a1Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5353edce3322Smrg      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
53549f00f3a1Smrg	# Neither direct hardcoding nor static linking is supported with a
53559f00f3a1Smrg	# broken collect2.
53569f00f3a1Smrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
53579f00f3a1Smrg      fi
53589f00f3a1Smrg      ;;
53599f00f3a1Smrg
53609f00f3a1Smrg    aix[[4-9]]*)
5361edce3322Smrg      if test ia64 = "$host_cpu"; then
53629f00f3a1Smrg	# On IA64, the linker does run time linking by default, so we don't
53639f00f3a1Smrg	# have to do anything special.
53649f00f3a1Smrg	aix_use_runtimelinking=no
53659f00f3a1Smrg	exp_sym_flag='-Bexport'
5366edce3322Smrg	no_entry_flag=
53679f00f3a1Smrg      else
53689f00f3a1Smrg	# If we're using GNU nm, then we don't want the "-C" option.
5369edce3322Smrg	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
5370edce3322Smrg	# Without the "-l" option, or with the "-B" option, AIX nm treats
5371edce3322Smrg	# weak defined symbols like other global defined symbols, whereas
5372edce3322Smrg	# GNU nm marks them as "W".
5373edce3322Smrg	# While the 'weak' keyword is ignored in the Export File, we need
5374edce3322Smrg	# it in the Import File for the 'aix-soname' feature, so we have
5375edce3322Smrg	# to replace the "-B" option with "-P" for AIX nm.
53769f00f3a1Smrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5377edce3322Smrg	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
53789f00f3a1Smrg	else
5379edce3322Smrg	  _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
53809f00f3a1Smrg	fi
53819f00f3a1Smrg	aix_use_runtimelinking=no
53829f00f3a1Smrg
53839f00f3a1Smrg	# Test if we are trying to use run time linking or normal
53849f00f3a1Smrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5385edce3322Smrg	# have runtime linking enabled, and use it for executables.
5386edce3322Smrg	# For shared libraries, we enable/disable runtime linking
5387edce3322Smrg	# depending on the kind of the shared library created -
5388edce3322Smrg	# when "with_aix_soname,aix_use_runtimelinking" is:
5389edce3322Smrg	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
5390edce3322Smrg	# "aix,yes"  lib.so          shared, rtl:yes, for executables
5391edce3322Smrg	#            lib.a           static archive
5392edce3322Smrg	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
5393edce3322Smrg	#            lib.a(lib.so.V) shared, rtl:no,  for executables
5394edce3322Smrg	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
5395edce3322Smrg	#            lib.a(lib.so.V) shared, rtl:no
5396edce3322Smrg	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
5397edce3322Smrg	#            lib.a           static archive
53989f00f3a1Smrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
53999f00f3a1Smrg	  for ld_flag in $LDFLAGS; do
5400edce3322Smrg	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
54019f00f3a1Smrg	    aix_use_runtimelinking=yes
54029f00f3a1Smrg	    break
54039f00f3a1Smrg	  fi
54049f00f3a1Smrg	  done
5405edce3322Smrg	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
5406edce3322Smrg	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
5407edce3322Smrg	    # so we don't have lib.a shared libs to link our executables.
5408edce3322Smrg	    # We have to force runtime linking in this case.
5409edce3322Smrg	    aix_use_runtimelinking=yes
5410edce3322Smrg	    LDFLAGS="$LDFLAGS -Wl,-brtl"
5411edce3322Smrg	  fi
54129f00f3a1Smrg	  ;;
54139f00f3a1Smrg	esac
54149f00f3a1Smrg
54159f00f3a1Smrg	exp_sym_flag='-bexport'
54169f00f3a1Smrg	no_entry_flag='-bnoentry'
54179f00f3a1Smrg      fi
54189f00f3a1Smrg
54199f00f3a1Smrg      # When large executables or shared objects are built, AIX ld can
54209f00f3a1Smrg      # have problems creating the table of contents.  If linking a library
54219f00f3a1Smrg      # or program results in "error TOC overflow" add -mminimal-toc to
54229f00f3a1Smrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
54239f00f3a1Smrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
54249f00f3a1Smrg
54259f00f3a1Smrg      _LT_TAGVAR(archive_cmds, $1)=''
54269f00f3a1Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
54279f00f3a1Smrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
54289f00f3a1Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
54299f00f3a1Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
5430edce3322Smrg      _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
5431edce3322Smrg      case $with_aix_soname,$aix_use_runtimelinking in
5432edce3322Smrg      aix,*) ;; # traditional, no import file
5433edce3322Smrg      svr4,* | *,yes) # use import file
5434edce3322Smrg	# The Import File defines what to hardcode.
5435edce3322Smrg	_LT_TAGVAR(hardcode_direct, $1)=no
5436edce3322Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=no
5437edce3322Smrg	;;
5438edce3322Smrg      esac
54399f00f3a1Smrg
5440edce3322Smrg      if test yes = "$GCC"; then
54419f00f3a1Smrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
54429f00f3a1Smrg	# We only want to do this on AIX 4.2 and lower, the check
54439f00f3a1Smrg	# below for broken collect2 doesn't work under 4.3+
5444edce3322Smrg	  collect2name=`$CC -print-prog-name=collect2`
54459f00f3a1Smrg	  if test -f "$collect2name" &&
54469f00f3a1Smrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
54479f00f3a1Smrg	  then
54489f00f3a1Smrg	  # We have reworked collect2
54499f00f3a1Smrg	  :
54509f00f3a1Smrg	  else
54519f00f3a1Smrg	  # We have old collect2
54529f00f3a1Smrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
54539f00f3a1Smrg	  # It fails to find uninstalled libraries when the uninstalled
54549f00f3a1Smrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
54559f00f3a1Smrg	  # to unsupported forces relinking
54569f00f3a1Smrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
54579f00f3a1Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
54589f00f3a1Smrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
54599f00f3a1Smrg	  fi
54609f00f3a1Smrg	  ;;
54619f00f3a1Smrg	esac
54629f00f3a1Smrg	shared_flag='-shared'
5463edce3322Smrg	if test yes = "$aix_use_runtimelinking"; then
5464edce3322Smrg	  shared_flag="$shared_flag "'$wl-G'
54659f00f3a1Smrg	fi
5466edce3322Smrg	# Need to ensure runtime linking is disabled for the traditional
5467edce3322Smrg	# shared library, or the linker may eventually find shared libraries
5468edce3322Smrg	# /with/ Import File - we do not want to mix them.
5469edce3322Smrg	shared_flag_aix='-shared'
5470edce3322Smrg	shared_flag_svr4='-shared $wl-G'
54719f00f3a1Smrg      else
54729f00f3a1Smrg	# not using gcc
5473edce3322Smrg	if test ia64 = "$host_cpu"; then
54749f00f3a1Smrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
54759f00f3a1Smrg	# chokes on -Wl,-G. The following line is correct:
54769f00f3a1Smrg	  shared_flag='-G'
54779f00f3a1Smrg	else
5478edce3322Smrg	  if test yes = "$aix_use_runtimelinking"; then
5479edce3322Smrg	    shared_flag='$wl-G'
54809f00f3a1Smrg	  else
5481edce3322Smrg	    shared_flag='$wl-bM:SRE'
54829f00f3a1Smrg	  fi
5483edce3322Smrg	  shared_flag_aix='$wl-bM:SRE'
5484edce3322Smrg	  shared_flag_svr4='$wl-G'
54859f00f3a1Smrg	fi
54869f00f3a1Smrg      fi
54879f00f3a1Smrg
5488edce3322Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
54899f00f3a1Smrg      # It seems that -bexpall does not export symbols beginning with
54909f00f3a1Smrg      # underscore (_), so it is better to generate a list of symbols to export.
54919f00f3a1Smrg      _LT_TAGVAR(always_export_symbols, $1)=yes
5492edce3322Smrg      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
54939f00f3a1Smrg	# Warning - without using the other runtime loading flags (-brtl),
54949f00f3a1Smrg	# -berok will link without error, but may produce a broken library.
54959f00f3a1Smrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
54969f00f3a1Smrg        # Determine the default libpath from the value encoded in an
54979f00f3a1Smrg        # empty executable.
54989f00f3a1Smrg        _LT_SYS_MODULE_PATH_AIX([$1])
5499edce3322Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5500edce3322Smrg        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
55019f00f3a1Smrg      else
5502edce3322Smrg	if test ia64 = "$host_cpu"; then
5503edce3322Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
55049f00f3a1Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5505edce3322Smrg	  _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"
55069f00f3a1Smrg	else
55079f00f3a1Smrg	 # Determine the default libpath from the value encoded in an
55089f00f3a1Smrg	 # empty executable.
55099f00f3a1Smrg	 _LT_SYS_MODULE_PATH_AIX([$1])
5510edce3322Smrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
55119f00f3a1Smrg	  # Warning - without using the other run time loading flags,
55129f00f3a1Smrg	  # -berok will link without error, but may produce a broken library.
5513edce3322Smrg	  _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
5514edce3322Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
5515edce3322Smrg	  if test yes = "$with_gnu_ld"; then
55169f00f3a1Smrg	    # We only use this code for GNU lds that support --whole-archive.
5517edce3322Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
55189f00f3a1Smrg	  else
55199f00f3a1Smrg	    # Exported symbols can be pulled into shared objects from archives
55209f00f3a1Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
55219f00f3a1Smrg	  fi
55229f00f3a1Smrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5523edce3322Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
5524edce3322Smrg	  # -brtl affects multiple linker settings, -berok does not and is overridden later
5525edce3322Smrg	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
5526edce3322Smrg	  if test svr4 != "$with_aix_soname"; then
5527edce3322Smrg	    # This is similar to how AIX traditionally builds its shared libraries.
5528edce3322Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
5529edce3322Smrg	  fi
5530edce3322Smrg	  if test aix != "$with_aix_soname"; then
5531edce3322Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
5532edce3322Smrg	  else
5533edce3322Smrg	    # used by -dlpreopen to get the symbols
5534edce3322Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
5535edce3322Smrg	  fi
5536edce3322Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
55379f00f3a1Smrg	fi
55389f00f3a1Smrg      fi
55399f00f3a1Smrg      ;;
55409f00f3a1Smrg
55419f00f3a1Smrg    amigaos*)
55429f00f3a1Smrg      case $host_cpu in
55439f00f3a1Smrg      powerpc)
55449f00f3a1Smrg            # see comment about AmigaOS4 .so support
5545edce3322Smrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
55469f00f3a1Smrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
55479f00f3a1Smrg        ;;
55489f00f3a1Smrg      m68k)
55499f00f3a1Smrg            _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)'
55509f00f3a1Smrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
55519f00f3a1Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
55529f00f3a1Smrg        ;;
55539f00f3a1Smrg      esac
55549f00f3a1Smrg      ;;
55559f00f3a1Smrg
55569f00f3a1Smrg    bsdi[[45]]*)
55579f00f3a1Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
55589f00f3a1Smrg      ;;
55599f00f3a1Smrg
55609f00f3a1Smrg    cygwin* | mingw* | pw32* | cegcc*)
55619f00f3a1Smrg      # When not using gcc, we currently assume that we are using
55629f00f3a1Smrg      # Microsoft Visual C++.
55639f00f3a1Smrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
55649f00f3a1Smrg      # no search path for DLLs.
55659f00f3a1Smrg      case $cc_basename in
55669f00f3a1Smrg      cl*)
55679f00f3a1Smrg	# Native MSVC
55689f00f3a1Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
55699f00f3a1Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
55709f00f3a1Smrg	_LT_TAGVAR(always_export_symbols, $1)=yes
55719f00f3a1Smrg	_LT_TAGVAR(file_list_spec, $1)='@'
55729f00f3a1Smrg	# Tell ltmain to make .lib files, not .a files.
55739f00f3a1Smrg	libext=lib
55749f00f3a1Smrg	# Tell ltmain to make .dll files, not .so files.
5575edce3322Smrg	shrext_cmds=.dll
55769f00f3a1Smrg	# FIXME: Setting linknames here is a bad hack.
5577edce3322Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
5578edce3322Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5579edce3322Smrg            cp "$export_symbols" "$output_objdir/$soname.def";
5580edce3322Smrg            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
5581edce3322Smrg          else
5582edce3322Smrg            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
5583edce3322Smrg          fi~
5584edce3322Smrg          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5585edce3322Smrg          linknames='
55869f00f3a1Smrg	# The linker will not automatically build a static lib if we build a DLL.
55879f00f3a1Smrg	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
55889f00f3a1Smrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
55899f00f3a1Smrg	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
55909f00f3a1Smrg	_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'
55919f00f3a1Smrg	# Don't use ranlib
55929f00f3a1Smrg	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
55939f00f3a1Smrg	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5594edce3322Smrg          lt_tool_outputfile="@TOOL_OUTPUT@"~
5595edce3322Smrg          case $lt_outputfile in
5596edce3322Smrg            *.exe|*.EXE) ;;
5597edce3322Smrg            *)
5598edce3322Smrg              lt_outputfile=$lt_outputfile.exe
5599edce3322Smrg              lt_tool_outputfile=$lt_tool_outputfile.exe
5600edce3322Smrg              ;;
5601edce3322Smrg          esac~
5602edce3322Smrg          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
5603edce3322Smrg            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5604edce3322Smrg            $RM "$lt_outputfile.manifest";
5605edce3322Smrg          fi'
56069f00f3a1Smrg	;;
56079f00f3a1Smrg      *)
56089f00f3a1Smrg	# Assume MSVC wrapper
56099f00f3a1Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
56109f00f3a1Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
56119f00f3a1Smrg	# Tell ltmain to make .lib files, not .a files.
56129f00f3a1Smrg	libext=lib
56139f00f3a1Smrg	# Tell ltmain to make .dll files, not .so files.
5614edce3322Smrg	shrext_cmds=.dll
56159f00f3a1Smrg	# FIXME: Setting linknames here is a bad hack.
56169f00f3a1Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
56179f00f3a1Smrg	# The linker will automatically build a .lib file if we build a DLL.
56189f00f3a1Smrg	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
56199f00f3a1Smrg	# FIXME: Should let the user specify the lib program.
56209f00f3a1Smrg	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
56219f00f3a1Smrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
56229f00f3a1Smrg	;;
56239f00f3a1Smrg      esac
56249f00f3a1Smrg      ;;
56259f00f3a1Smrg
56269f00f3a1Smrg    darwin* | rhapsody*)
56279f00f3a1Smrg      _LT_DARWIN_LINKER_FEATURES($1)
56289f00f3a1Smrg      ;;
56299f00f3a1Smrg
56309f00f3a1Smrg    dgux*)
56319f00f3a1Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
56329f00f3a1Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
56339f00f3a1Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
56349f00f3a1Smrg      ;;
56359f00f3a1Smrg
56369f00f3a1Smrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
56379f00f3a1Smrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
56389f00f3a1Smrg    # does not break anything, and helps significantly (at the cost of a little
56399f00f3a1Smrg    # extra space).
56409f00f3a1Smrg    freebsd2.2*)
56419f00f3a1Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
56429f00f3a1Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
56439f00f3a1Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
56449f00f3a1Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
56459f00f3a1Smrg      ;;
56469f00f3a1Smrg
56479f00f3a1Smrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
56489f00f3a1Smrg    freebsd2.*)
56499f00f3a1Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
56509f00f3a1Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
56519f00f3a1Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
56529f00f3a1Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
56539f00f3a1Smrg      ;;
56549f00f3a1Smrg
56559f00f3a1Smrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
56569f00f3a1Smrg    freebsd* | dragonfly*)
56579f00f3a1Smrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
56589f00f3a1Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
56599f00f3a1Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
56609f00f3a1Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
56619f00f3a1Smrg      ;;
56629f00f3a1Smrg
56639f00f3a1Smrg    hpux9*)
5664edce3322Smrg      if test yes = "$GCC"; then
5665edce3322Smrg	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
56669f00f3a1Smrg      else
5667edce3322Smrg	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
56689f00f3a1Smrg      fi
5669edce3322Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
56709f00f3a1Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
56719f00f3a1Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
56729f00f3a1Smrg
56739f00f3a1Smrg      # hardcode_minus_L: Not really in the search PATH,
56749f00f3a1Smrg      # but as the default location of the library.
56759f00f3a1Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5676edce3322Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
56779f00f3a1Smrg      ;;
56789f00f3a1Smrg
56799f00f3a1Smrg    hpux10*)
5680edce3322Smrg      if test yes,no = "$GCC,$with_gnu_ld"; then
5681edce3322Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
56829f00f3a1Smrg      else
56839f00f3a1Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
56849f00f3a1Smrg      fi
5685edce3322Smrg      if test no = "$with_gnu_ld"; then
5686edce3322Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
56879f00f3a1Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
56889f00f3a1Smrg	_LT_TAGVAR(hardcode_direct, $1)=yes
56899f00f3a1Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5690edce3322Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
56919f00f3a1Smrg	# hardcode_minus_L: Not really in the search PATH,
56929f00f3a1Smrg	# but as the default location of the library.
56939f00f3a1Smrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
56949f00f3a1Smrg      fi
56959f00f3a1Smrg      ;;
56969f00f3a1Smrg
56979f00f3a1Smrg    hpux11*)
5698edce3322Smrg      if test yes,no = "$GCC,$with_gnu_ld"; then
56999f00f3a1Smrg	case $host_cpu in
57009f00f3a1Smrg	hppa*64*)
5701edce3322Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
57029f00f3a1Smrg	  ;;
57039f00f3a1Smrg	ia64*)
5704edce3322Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
57059f00f3a1Smrg	  ;;
57069f00f3a1Smrg	*)
5707edce3322Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
57089f00f3a1Smrg	  ;;
57099f00f3a1Smrg	esac
57109f00f3a1Smrg      else
57119f00f3a1Smrg	case $host_cpu in
57129f00f3a1Smrg	hppa*64*)
5713edce3322Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
57149f00f3a1Smrg	  ;;
57159f00f3a1Smrg	ia64*)
5716edce3322Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
57179f00f3a1Smrg	  ;;
57189f00f3a1Smrg	*)
57199f00f3a1Smrg	m4_if($1, [], [
57209f00f3a1Smrg	  # Older versions of the 11.00 compiler do not understand -b yet
57219f00f3a1Smrg	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
57229f00f3a1Smrg	  _LT_LINKER_OPTION([if $CC understands -b],
57239f00f3a1Smrg	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5724edce3322Smrg	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
57259f00f3a1Smrg	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5726edce3322Smrg	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
57279f00f3a1Smrg	  ;;
57289f00f3a1Smrg	esac
57299f00f3a1Smrg      fi
5730edce3322Smrg      if test no = "$with_gnu_ld"; then
5731edce3322Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
57329f00f3a1Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
57339f00f3a1Smrg
57349f00f3a1Smrg	case $host_cpu in
57359f00f3a1Smrg	hppa*64*|ia64*)
57369f00f3a1Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no
57379f00f3a1Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
57389f00f3a1Smrg	  ;;
57399f00f3a1Smrg	*)
57409f00f3a1Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
57419f00f3a1Smrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5742edce3322Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
57439f00f3a1Smrg
57449f00f3a1Smrg	  # hardcode_minus_L: Not really in the search PATH,
57459f00f3a1Smrg	  # but as the default location of the library.
57469f00f3a1Smrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
57479f00f3a1Smrg	  ;;
57489f00f3a1Smrg	esac
57499f00f3a1Smrg      fi
57509f00f3a1Smrg      ;;
57519f00f3a1Smrg
57529f00f3a1Smrg    irix5* | irix6* | nonstopux*)
5753edce3322Smrg      if test yes = "$GCC"; then
5754edce3322Smrg	_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'
57559f00f3a1Smrg	# Try to use the -exported_symbol ld option, if it does not
57569f00f3a1Smrg	# work, assume that -exports_file does not work either and
57579f00f3a1Smrg	# implicitly export all symbols.
57589f00f3a1Smrg	# This should be the same for all languages, so no per-tag cache variable.
57599f00f3a1Smrg	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
57609f00f3a1Smrg	  [lt_cv_irix_exported_symbol],
5761edce3322Smrg	  [save_LDFLAGS=$LDFLAGS
5762edce3322Smrg	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
57639f00f3a1Smrg	   AC_LINK_IFELSE(
57649f00f3a1Smrg	     [AC_LANG_SOURCE(
57659f00f3a1Smrg	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
57669f00f3a1Smrg			      [C++], [[int foo (void) { return 0; }]],
57679f00f3a1Smrg			      [Fortran 77], [[
57689f00f3a1Smrg      subroutine foo
57699f00f3a1Smrg      end]],
57709f00f3a1Smrg			      [Fortran], [[
57719f00f3a1Smrg      subroutine foo
57729f00f3a1Smrg      end]])])],
57739f00f3a1Smrg	      [lt_cv_irix_exported_symbol=yes],
57749f00f3a1Smrg	      [lt_cv_irix_exported_symbol=no])
5775edce3322Smrg           LDFLAGS=$save_LDFLAGS])
5776edce3322Smrg	if test yes = "$lt_cv_irix_exported_symbol"; then
5777edce3322Smrg          _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'
57789f00f3a1Smrg	fi
57799f00f3a1Smrg      else
5780edce3322Smrg	_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'
5781edce3322Smrg	_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'
57829f00f3a1Smrg      fi
57839f00f3a1Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5784edce3322Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
57859f00f3a1Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
57869f00f3a1Smrg      _LT_TAGVAR(inherit_rpath, $1)=yes
57879f00f3a1Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
57889f00f3a1Smrg      ;;
57899f00f3a1Smrg
5790edce3322Smrg    linux*)
5791edce3322Smrg      case $cc_basename in
5792edce3322Smrg      tcc*)
5793edce3322Smrg	# Fabrice Bellard et al's Tiny C Compiler
5794edce3322Smrg	_LT_TAGVAR(ld_shlibs, $1)=yes
5795edce3322Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5796edce3322Smrg	;;
5797edce3322Smrg      esac
5798edce3322Smrg      ;;
5799edce3322Smrg
5800edce3322Smrg    netbsd*)
58019f00f3a1Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
58029f00f3a1Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
58039f00f3a1Smrg      else
58049f00f3a1Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
58059f00f3a1Smrg      fi
58069f00f3a1Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
58079f00f3a1Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
58089f00f3a1Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
58099f00f3a1Smrg      ;;
58109f00f3a1Smrg
58119f00f3a1Smrg    newsos6)
58129f00f3a1Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
58139f00f3a1Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
5814edce3322Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
58159f00f3a1Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
58169f00f3a1Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
58179f00f3a1Smrg      ;;
58189f00f3a1Smrg
58199f00f3a1Smrg    *nto* | *qnx*)
58209f00f3a1Smrg      ;;
58219f00f3a1Smrg
5822edce3322Smrg    openbsd* | bitrig*)
58239f00f3a1Smrg      if test -f /usr/libexec/ld.so; then
58249f00f3a1Smrg	_LT_TAGVAR(hardcode_direct, $1)=yes
58259f00f3a1Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
58269f00f3a1Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5827edce3322Smrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
58289f00f3a1Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5829edce3322Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
5830edce3322Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5831edce3322Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
58329f00f3a1Smrg	else
5833edce3322Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5834edce3322Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
58359f00f3a1Smrg	fi
58369f00f3a1Smrg      else
58379f00f3a1Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
58389f00f3a1Smrg      fi
58399f00f3a1Smrg      ;;
58409f00f3a1Smrg
58419f00f3a1Smrg    os2*)
58429f00f3a1Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
58439f00f3a1Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
58449f00f3a1Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5845edce3322Smrg      shrext_cmds=.dll
5846edce3322Smrg      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5847edce3322Smrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5848edce3322Smrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5849edce3322Smrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
5850edce3322Smrg	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5851edce3322Smrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5852edce3322Smrg	emximp -o $lib $output_objdir/$libname.def'
5853edce3322Smrg      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5854edce3322Smrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5855edce3322Smrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5856edce3322Smrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
5857edce3322Smrg	prefix_cmds="$SED"~
5858edce3322Smrg	if test EXPORTS = "`$SED 1q $export_symbols`"; then
5859edce3322Smrg	  prefix_cmds="$prefix_cmds -e 1d";
5860edce3322Smrg	fi~
5861edce3322Smrg	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5862edce3322Smrg	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5863edce3322Smrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5864edce3322Smrg	emximp -o $lib $output_objdir/$libname.def'
5865edce3322Smrg      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5866edce3322Smrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
58679f00f3a1Smrg      ;;
58689f00f3a1Smrg
58699f00f3a1Smrg    osf3*)
5870edce3322Smrg      if test yes = "$GCC"; then
5871edce3322Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
5872edce3322Smrg	_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'
58739f00f3a1Smrg      else
58749f00f3a1Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5875edce3322Smrg	_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'
58769f00f3a1Smrg      fi
58779f00f3a1Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5878edce3322Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
58799f00f3a1Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
58809f00f3a1Smrg      ;;
58819f00f3a1Smrg
58829f00f3a1Smrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
5883edce3322Smrg      if test yes = "$GCC"; then
5884edce3322Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
5885edce3322Smrg	_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'
5886edce3322Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
58879f00f3a1Smrg      else
58889f00f3a1Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5889edce3322Smrg	_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'
58909f00f3a1Smrg	_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~
5891edce3322Smrg          $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'
58929f00f3a1Smrg
58939f00f3a1Smrg	# Both c and cxx compiler support -rpath directly
58949f00f3a1Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
58959f00f3a1Smrg      fi
58969f00f3a1Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
58979f00f3a1Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
58989f00f3a1Smrg      ;;
58999f00f3a1Smrg
59009f00f3a1Smrg    solaris*)
59019f00f3a1Smrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5902edce3322Smrg      if test yes = "$GCC"; then
5903edce3322Smrg	wlarc='$wl'
5904edce3322Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
59059f00f3a1Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5906edce3322Smrg          $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'
59079f00f3a1Smrg      else
59089f00f3a1Smrg	case `$CC -V 2>&1` in
59099f00f3a1Smrg	*"Compilers 5.0"*)
59109f00f3a1Smrg	  wlarc=''
5911edce3322Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
59129f00f3a1Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5913edce3322Smrg            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
59149f00f3a1Smrg	  ;;
59159f00f3a1Smrg	*)
5916edce3322Smrg	  wlarc='$wl'
5917edce3322Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
59189f00f3a1Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5919edce3322Smrg            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
59209f00f3a1Smrg	  ;;
59219f00f3a1Smrg	esac
59229f00f3a1Smrg      fi
59239f00f3a1Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
59249f00f3a1Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
59259f00f3a1Smrg      case $host_os in
59269f00f3a1Smrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
59279f00f3a1Smrg      *)
59289f00f3a1Smrg	# The compiler driver will combine and reorder linker options,
5929edce3322Smrg	# but understands '-z linker_flag'.  GCC discards it without '$wl',
59309f00f3a1Smrg	# but is careful enough not to reorder.
59319f00f3a1Smrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
5932edce3322Smrg	if test yes = "$GCC"; then
5933edce3322Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
59349f00f3a1Smrg	else
59359f00f3a1Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
59369f00f3a1Smrg	fi
59379f00f3a1Smrg	;;
59389f00f3a1Smrg      esac
59399f00f3a1Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
59409f00f3a1Smrg      ;;
59419f00f3a1Smrg
59429f00f3a1Smrg    sunos4*)
5943edce3322Smrg      if test sequent = "$host_vendor"; then
59449f00f3a1Smrg	# Use $CC to link under sequent, because it throws in some extra .o
59459f00f3a1Smrg	# files that make .init and .fini sections work.
5946edce3322Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
59479f00f3a1Smrg      else
59489f00f3a1Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
59499f00f3a1Smrg      fi
59509f00f3a1Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
59519f00f3a1Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
59529f00f3a1Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
59539f00f3a1Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
59549f00f3a1Smrg      ;;
59559f00f3a1Smrg
59569f00f3a1Smrg    sysv4)
59579f00f3a1Smrg      case $host_vendor in
59589f00f3a1Smrg	sni)
59599f00f3a1Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
59609f00f3a1Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
59619f00f3a1Smrg	;;
59629f00f3a1Smrg	siemens)
59639f00f3a1Smrg	  ## LD is ld it makes a PLAMLIB
59649f00f3a1Smrg	  ## CC just makes a GrossModule.
59659f00f3a1Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
59669f00f3a1Smrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
59679f00f3a1Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no
59689f00f3a1Smrg        ;;
59699f00f3a1Smrg	motorola)
59709f00f3a1Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
59719f00f3a1Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
59729f00f3a1Smrg	;;
59739f00f3a1Smrg      esac
59749f00f3a1Smrg      runpath_var='LD_RUN_PATH'
59759f00f3a1Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
59769f00f3a1Smrg      ;;
59779f00f3a1Smrg
59789f00f3a1Smrg    sysv4.3*)
59799f00f3a1Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
59809f00f3a1Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
59819f00f3a1Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
59829f00f3a1Smrg      ;;
59839f00f3a1Smrg
59849f00f3a1Smrg    sysv4*MP*)
59859f00f3a1Smrg      if test -d /usr/nec; then
59869f00f3a1Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
59879f00f3a1Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
59889f00f3a1Smrg	runpath_var=LD_RUN_PATH
59899f00f3a1Smrg	hardcode_runpath_var=yes
59909f00f3a1Smrg	_LT_TAGVAR(ld_shlibs, $1)=yes
59919f00f3a1Smrg      fi
59929f00f3a1Smrg      ;;
59939f00f3a1Smrg
59949f00f3a1Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5995edce3322Smrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
59969f00f3a1Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
59979f00f3a1Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
59989f00f3a1Smrg      runpath_var='LD_RUN_PATH'
59999f00f3a1Smrg
6000edce3322Smrg      if test yes = "$GCC"; then
6001edce3322Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6002edce3322Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60039f00f3a1Smrg      else
6004edce3322Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6005edce3322Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60069f00f3a1Smrg      fi
60079f00f3a1Smrg      ;;
60089f00f3a1Smrg
60099f00f3a1Smrg    sysv5* | sco3.2v5* | sco5v6*)
6010edce3322Smrg      # Note: We CANNOT use -z defs as we might desire, because we do not
60119f00f3a1Smrg      # link with -lc, and that would cause any symbols used from libc to
60129f00f3a1Smrg      # always be unresolved, which means just about no library would
60139f00f3a1Smrg      # ever link correctly.  If we're not using GNU ld we use -z text
60149f00f3a1Smrg      # though, which does catch some bad symbols but isn't as heavy-handed
60159f00f3a1Smrg      # as -z defs.
6016edce3322Smrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6017edce3322Smrg      _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
60189f00f3a1Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
60199f00f3a1Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6020edce3322Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
60219f00f3a1Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
60229f00f3a1Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
6023edce3322Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
60249f00f3a1Smrg      runpath_var='LD_RUN_PATH'
60259f00f3a1Smrg
6026edce3322Smrg      if test yes = "$GCC"; then
6027edce3322Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6028edce3322Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60299f00f3a1Smrg      else
6030edce3322Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6031edce3322Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60329f00f3a1Smrg      fi
60339f00f3a1Smrg      ;;
60349f00f3a1Smrg
60359f00f3a1Smrg    uts4*)
60369f00f3a1Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
60379f00f3a1Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
60389f00f3a1Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60399f00f3a1Smrg      ;;
60409f00f3a1Smrg
60419f00f3a1Smrg    *)
60429f00f3a1Smrg      _LT_TAGVAR(ld_shlibs, $1)=no
60439f00f3a1Smrg      ;;
60449f00f3a1Smrg    esac
60459f00f3a1Smrg
6046edce3322Smrg    if test sni = "$host_vendor"; then
60479f00f3a1Smrg      case $host in
60489f00f3a1Smrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6049edce3322Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
60509f00f3a1Smrg	;;
60519f00f3a1Smrg      esac
60529f00f3a1Smrg    fi
60539f00f3a1Smrg  fi
60549f00f3a1Smrg])
60559f00f3a1SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6056edce3322Smrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
60579f00f3a1Smrg
60589f00f3a1Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
60599f00f3a1Smrg
60609f00f3a1Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
60619f00f3a1Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
60629f00f3a1Smrg_LT_DECL([], [extract_expsyms_cmds], [2],
60639f00f3a1Smrg    [The commands to extract the exported symbol list from a shared archive])
60649f00f3a1Smrg
60659f00f3a1Smrg#
60669f00f3a1Smrg# Do we need to explicitly link libc?
60679f00f3a1Smrg#
60689f00f3a1Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
60699f00f3a1Smrgx|xyes)
60709f00f3a1Smrg  # Assume -lc should be added
60719f00f3a1Smrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
60729f00f3a1Smrg
6073edce3322Smrg  if test yes,yes = "$GCC,$enable_shared"; then
60749f00f3a1Smrg    case $_LT_TAGVAR(archive_cmds, $1) in
60759f00f3a1Smrg    *'~'*)
60769f00f3a1Smrg      # FIXME: we may have to deal with multi-command sequences.
60779f00f3a1Smrg      ;;
60789f00f3a1Smrg    '$CC '*)
60799f00f3a1Smrg      # Test whether the compiler implicitly links with -lc since on some
60809f00f3a1Smrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
60819f00f3a1Smrg      # to ld, don't add -lc before -lgcc.
60829f00f3a1Smrg      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
60839f00f3a1Smrg	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
60849f00f3a1Smrg	[$RM conftest*
60859f00f3a1Smrg	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
60869f00f3a1Smrg
60879f00f3a1Smrg	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
60889f00f3a1Smrg	  soname=conftest
60899f00f3a1Smrg	  lib=conftest
60909f00f3a1Smrg	  libobjs=conftest.$ac_objext
60919f00f3a1Smrg	  deplibs=
60929f00f3a1Smrg	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
60939f00f3a1Smrg	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
60949f00f3a1Smrg	  compiler_flags=-v
60959f00f3a1Smrg	  linker_flags=-v
60969f00f3a1Smrg	  verstring=
60979f00f3a1Smrg	  output_objdir=.
60989f00f3a1Smrg	  libname=conftest
60999f00f3a1Smrg	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
61009f00f3a1Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=
61019f00f3a1Smrg	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
61029f00f3a1Smrg	  then
61039f00f3a1Smrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
61049f00f3a1Smrg	  else
61059f00f3a1Smrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
61069f00f3a1Smrg	  fi
61079f00f3a1Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
61089f00f3a1Smrg	else
61099f00f3a1Smrg	  cat conftest.err 1>&5
61109f00f3a1Smrg	fi
61119f00f3a1Smrg	$RM conftest*
61129f00f3a1Smrg	])
61139f00f3a1Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
61149f00f3a1Smrg      ;;
61159f00f3a1Smrg    esac
61169f00f3a1Smrg  fi
61179f00f3a1Smrg  ;;
61189f00f3a1Smrgesac
61199f00f3a1Smrg
61209f00f3a1Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
61219f00f3a1Smrg    [Whether or not to add -lc for building shared libraries])
61229f00f3a1Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
61239f00f3a1Smrg    [enable_shared_with_static_runtimes], [0],
61249f00f3a1Smrg    [Whether or not to disallow shared libs when runtime libs are static])
61259f00f3a1Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
61269f00f3a1Smrg    [Compiler flag to allow reflexive dlopens])
61279f00f3a1Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
61289f00f3a1Smrg    [Compiler flag to generate shared objects directly from archives])
61299f00f3a1Smrg_LT_TAGDECL([], [compiler_needs_object], [1],
61309f00f3a1Smrg    [Whether the compiler copes with passing no objects directly])
61319f00f3a1Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
61329f00f3a1Smrg    [Create an old-style archive from a shared archive])
61339f00f3a1Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
61349f00f3a1Smrg    [Create a temporary old-style archive to link instead of a shared archive])
61359f00f3a1Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
61369f00f3a1Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
61379f00f3a1Smrg_LT_TAGDECL([], [module_cmds], [2],
61389f00f3a1Smrg    [Commands used to build a loadable module if different from building
61399f00f3a1Smrg    a shared archive.])
61409f00f3a1Smrg_LT_TAGDECL([], [module_expsym_cmds], [2])
61419f00f3a1Smrg_LT_TAGDECL([], [with_gnu_ld], [1],
61429f00f3a1Smrg    [Whether we are building with GNU ld or not])
61439f00f3a1Smrg_LT_TAGDECL([], [allow_undefined_flag], [1],
61449f00f3a1Smrg    [Flag that allows shared libraries with undefined symbols to be built])
61459f00f3a1Smrg_LT_TAGDECL([], [no_undefined_flag], [1],
61469f00f3a1Smrg    [Flag that enforces no undefined symbols])
61479f00f3a1Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
61489f00f3a1Smrg    [Flag to hardcode $libdir into a binary during linking.
61499f00f3a1Smrg    This must work even if $libdir does not exist])
61509f00f3a1Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
61519f00f3a1Smrg    [Whether we need a single "-rpath" flag with a separated argument])
61529f00f3a1Smrg_LT_TAGDECL([], [hardcode_direct], [0],
6153edce3322Smrg    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
61549f00f3a1Smrg    DIR into the resulting binary])
61559f00f3a1Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
6156edce3322Smrg    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
61579f00f3a1Smrg    DIR into the resulting binary and the resulting library dependency is
6158edce3322Smrg    "absolute", i.e impossible to change by setting $shlibpath_var if the
61599f00f3a1Smrg    library is relocated])
61609f00f3a1Smrg_LT_TAGDECL([], [hardcode_minus_L], [0],
61619f00f3a1Smrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
61629f00f3a1Smrg    into the resulting binary])
61639f00f3a1Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
61649f00f3a1Smrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
61659f00f3a1Smrg    into the resulting binary])
61669f00f3a1Smrg_LT_TAGDECL([], [hardcode_automatic], [0],
61679f00f3a1Smrg    [Set to "yes" if building a shared library automatically hardcodes DIR
61689f00f3a1Smrg    into the library and all subsequent libraries and executables linked
61699f00f3a1Smrg    against it])
61709f00f3a1Smrg_LT_TAGDECL([], [inherit_rpath], [0],
61719f00f3a1Smrg    [Set to yes if linker adds runtime paths of dependent libraries
61729f00f3a1Smrg    to runtime path list])
61739f00f3a1Smrg_LT_TAGDECL([], [link_all_deplibs], [0],
61749f00f3a1Smrg    [Whether libtool must link a program against all its dependency libraries])
61759f00f3a1Smrg_LT_TAGDECL([], [always_export_symbols], [0],
61769f00f3a1Smrg    [Set to "yes" if exported symbols are required])
61779f00f3a1Smrg_LT_TAGDECL([], [export_symbols_cmds], [2],
61789f00f3a1Smrg    [The commands to list exported symbols])
61799f00f3a1Smrg_LT_TAGDECL([], [exclude_expsyms], [1],
61809f00f3a1Smrg    [Symbols that should not be listed in the preloaded symbols])
61819f00f3a1Smrg_LT_TAGDECL([], [include_expsyms], [1],
61829f00f3a1Smrg    [Symbols that must always be exported])
61839f00f3a1Smrg_LT_TAGDECL([], [prelink_cmds], [2],
61849f00f3a1Smrg    [Commands necessary for linking programs (against libraries) with templates])
61859f00f3a1Smrg_LT_TAGDECL([], [postlink_cmds], [2],
61869f00f3a1Smrg    [Commands necessary for finishing linking programs])
61879f00f3a1Smrg_LT_TAGDECL([], [file_list_spec], [1],
61889f00f3a1Smrg    [Specify filename containing input files])
61899f00f3a1Smrgdnl FIXME: Not yet implemented
61909f00f3a1Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
61919f00f3a1Smrgdnl    [Compiler flag to generate thread safe objects])
61929f00f3a1Smrg])# _LT_LINKER_SHLIBS
61939f00f3a1Smrg
61949f00f3a1Smrg
61959f00f3a1Smrg# _LT_LANG_C_CONFIG([TAG])
61969f00f3a1Smrg# ------------------------
61979f00f3a1Smrg# Ensure that the configuration variables for a C compiler are suitably
61989f00f3a1Smrg# defined.  These variables are subsequently used by _LT_CONFIG to write
6199edce3322Smrg# the compiler configuration to 'libtool'.
62009f00f3a1Smrgm4_defun([_LT_LANG_C_CONFIG],
62019f00f3a1Smrg[m4_require([_LT_DECL_EGREP])dnl
6202edce3322Smrglt_save_CC=$CC
62039f00f3a1SmrgAC_LANG_PUSH(C)
62049f00f3a1Smrg
62059f00f3a1Smrg# Source file extension for C test sources.
62069f00f3a1Smrgac_ext=c
62079f00f3a1Smrg
62089f00f3a1Smrg# Object file extension for compiled C test sources.
62099f00f3a1Smrgobjext=o
62109f00f3a1Smrg_LT_TAGVAR(objext, $1)=$objext
62119f00f3a1Smrg
62129f00f3a1Smrg# Code to be used in simple compile tests
62139f00f3a1Smrglt_simple_compile_test_code="int some_variable = 0;"
62149f00f3a1Smrg
62159f00f3a1Smrg# Code to be used in simple link tests
62169f00f3a1Smrglt_simple_link_test_code='int main(){return(0);}'
62179f00f3a1Smrg
62189f00f3a1Smrg_LT_TAG_COMPILER
62199f00f3a1Smrg# Save the default compiler, since it gets overwritten when the other
62209f00f3a1Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
62219f00f3a1Smrgcompiler_DEFAULT=$CC
62229f00f3a1Smrg
62239f00f3a1Smrg# save warnings/boilerplate of simple test code
62249f00f3a1Smrg_LT_COMPILER_BOILERPLATE
62259f00f3a1Smrg_LT_LINKER_BOILERPLATE
62269f00f3a1Smrg
62279f00f3a1Smrg## CAVEAT EMPTOR:
62289f00f3a1Smrg## There is no encapsulation within the following macros, do not change
62299f00f3a1Smrg## the running order or otherwise move them around unless you know exactly
62309f00f3a1Smrg## what you are doing...
62319f00f3a1Smrgif test -n "$compiler"; then
62329f00f3a1Smrg  _LT_COMPILER_NO_RTTI($1)
62339f00f3a1Smrg  _LT_COMPILER_PIC($1)
62349f00f3a1Smrg  _LT_COMPILER_C_O($1)
62359f00f3a1Smrg  _LT_COMPILER_FILE_LOCKS($1)
62369f00f3a1Smrg  _LT_LINKER_SHLIBS($1)
62379f00f3a1Smrg  _LT_SYS_DYNAMIC_LINKER($1)
62389f00f3a1Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
62399f00f3a1Smrg  LT_SYS_DLOPEN_SELF
62409f00f3a1Smrg  _LT_CMD_STRIPLIB
62419f00f3a1Smrg
6242edce3322Smrg  # Report what library types will actually be built
62439f00f3a1Smrg  AC_MSG_CHECKING([if libtool supports shared libraries])
62449f00f3a1Smrg  AC_MSG_RESULT([$can_build_shared])
62459f00f3a1Smrg
62469f00f3a1Smrg  AC_MSG_CHECKING([whether to build shared libraries])
6247edce3322Smrg  test no = "$can_build_shared" && enable_shared=no
62489f00f3a1Smrg
62499f00f3a1Smrg  # On AIX, shared libraries and static libraries use the same namespace, and
62509f00f3a1Smrg  # are all built from PIC.
62519f00f3a1Smrg  case $host_os in
62529f00f3a1Smrg  aix3*)
6253edce3322Smrg    test yes = "$enable_shared" && enable_static=no
62549f00f3a1Smrg    if test -n "$RANLIB"; then
62559f00f3a1Smrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
62569f00f3a1Smrg      postinstall_cmds='$RANLIB $lib'
62579f00f3a1Smrg    fi
62589f00f3a1Smrg    ;;
62599f00f3a1Smrg
62609f00f3a1Smrg  aix[[4-9]]*)
6261edce3322Smrg    if test ia64 != "$host_cpu"; then
6262edce3322Smrg      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
6263edce3322Smrg      yes,aix,yes) ;;			# shared object as lib.so file only
6264edce3322Smrg      yes,svr4,*) ;;			# shared object as lib.so archive member only
6265edce3322Smrg      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
6266edce3322Smrg      esac
62679f00f3a1Smrg    fi
62689f00f3a1Smrg    ;;
62699f00f3a1Smrg  esac
62709f00f3a1Smrg  AC_MSG_RESULT([$enable_shared])
62719f00f3a1Smrg
62729f00f3a1Smrg  AC_MSG_CHECKING([whether to build static libraries])
62739f00f3a1Smrg  # Make sure either enable_shared or enable_static is yes.
6274edce3322Smrg  test yes = "$enable_shared" || enable_static=yes
62759f00f3a1Smrg  AC_MSG_RESULT([$enable_static])
62769f00f3a1Smrg
62779f00f3a1Smrg  _LT_CONFIG($1)
62789f00f3a1Smrgfi
62799f00f3a1SmrgAC_LANG_POP
6280edce3322SmrgCC=$lt_save_CC
62819f00f3a1Smrg])# _LT_LANG_C_CONFIG
62829f00f3a1Smrg
62839f00f3a1Smrg
62849f00f3a1Smrg# _LT_LANG_CXX_CONFIG([TAG])
62859f00f3a1Smrg# --------------------------
62869f00f3a1Smrg# Ensure that the configuration variables for a C++ compiler are suitably
62879f00f3a1Smrg# defined.  These variables are subsequently used by _LT_CONFIG to write
6288edce3322Smrg# the compiler configuration to 'libtool'.
62899f00f3a1Smrgm4_defun([_LT_LANG_CXX_CONFIG],
62909f00f3a1Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
62919f00f3a1Smrgm4_require([_LT_DECL_EGREP])dnl
62929f00f3a1Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
6293edce3322Smrgif test -n "$CXX" && ( test no != "$CXX" &&
6294edce3322Smrg    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
6295edce3322Smrg    (test g++ != "$CXX"))); then
62969f00f3a1Smrg  AC_PROG_CXXCPP
62979f00f3a1Smrgelse
62989f00f3a1Smrg  _lt_caught_CXX_error=yes
62999f00f3a1Smrgfi
63009f00f3a1Smrg
63019f00f3a1SmrgAC_LANG_PUSH(C++)
63029f00f3a1Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
63039f00f3a1Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
63049f00f3a1Smrg_LT_TAGVAR(always_export_symbols, $1)=no
63059f00f3a1Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
63069f00f3a1Smrg_LT_TAGVAR(compiler_needs_object, $1)=no
63079f00f3a1Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
63089f00f3a1Smrg_LT_TAGVAR(hardcode_direct, $1)=no
63099f00f3a1Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
63109f00f3a1Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
63119f00f3a1Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
63129f00f3a1Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
63139f00f3a1Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
63149f00f3a1Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
63159f00f3a1Smrg_LT_TAGVAR(inherit_rpath, $1)=no
63169f00f3a1Smrg_LT_TAGVAR(module_cmds, $1)=
63179f00f3a1Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
63189f00f3a1Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
63199f00f3a1Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
63209f00f3a1Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
63219f00f3a1Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
63229f00f3a1Smrg_LT_TAGVAR(no_undefined_flag, $1)=
63239f00f3a1Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
63249f00f3a1Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
63259f00f3a1Smrg
63269f00f3a1Smrg# Source file extension for C++ test sources.
63279f00f3a1Smrgac_ext=cpp
63289f00f3a1Smrg
63299f00f3a1Smrg# Object file extension for compiled C++ test sources.
63309f00f3a1Smrgobjext=o
63319f00f3a1Smrg_LT_TAGVAR(objext, $1)=$objext
63329f00f3a1Smrg
63339f00f3a1Smrg# No sense in running all these tests if we already determined that
63349f00f3a1Smrg# the CXX compiler isn't working.  Some variables (like enable_shared)
63359f00f3a1Smrg# are currently assumed to apply to all compilers on this platform,
63369f00f3a1Smrg# and will be corrupted by setting them based on a non-working compiler.
6337edce3322Smrgif test yes != "$_lt_caught_CXX_error"; then
63389f00f3a1Smrg  # Code to be used in simple compile tests
63399f00f3a1Smrg  lt_simple_compile_test_code="int some_variable = 0;"
63409f00f3a1Smrg
63419f00f3a1Smrg  # Code to be used in simple link tests
63429f00f3a1Smrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
63439f00f3a1Smrg
63449f00f3a1Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
63459f00f3a1Smrg  _LT_TAG_COMPILER
63469f00f3a1Smrg
63479f00f3a1Smrg  # save warnings/boilerplate of simple test code
63489f00f3a1Smrg  _LT_COMPILER_BOILERPLATE
63499f00f3a1Smrg  _LT_LINKER_BOILERPLATE
63509f00f3a1Smrg
63519f00f3a1Smrg  # Allow CC to be a program name with arguments.
63529f00f3a1Smrg  lt_save_CC=$CC
63539f00f3a1Smrg  lt_save_CFLAGS=$CFLAGS
63549f00f3a1Smrg  lt_save_LD=$LD
63559f00f3a1Smrg  lt_save_GCC=$GCC
63569f00f3a1Smrg  GCC=$GXX
63579f00f3a1Smrg  lt_save_with_gnu_ld=$with_gnu_ld
63589f00f3a1Smrg  lt_save_path_LD=$lt_cv_path_LD
63599f00f3a1Smrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
63609f00f3a1Smrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
63619f00f3a1Smrg  else
63629f00f3a1Smrg    $as_unset lt_cv_prog_gnu_ld
63639f00f3a1Smrg  fi
63649f00f3a1Smrg  if test -n "${lt_cv_path_LDCXX+set}"; then
63659f00f3a1Smrg    lt_cv_path_LD=$lt_cv_path_LDCXX
63669f00f3a1Smrg  else
63679f00f3a1Smrg    $as_unset lt_cv_path_LD
63689f00f3a1Smrg  fi
63699f00f3a1Smrg  test -z "${LDCXX+set}" || LD=$LDCXX
63709f00f3a1Smrg  CC=${CXX-"c++"}
63719f00f3a1Smrg  CFLAGS=$CXXFLAGS
63729f00f3a1Smrg  compiler=$CC
63739f00f3a1Smrg  _LT_TAGVAR(compiler, $1)=$CC
63749f00f3a1Smrg  _LT_CC_BASENAME([$compiler])
63759f00f3a1Smrg
63769f00f3a1Smrg  if test -n "$compiler"; then
63779f00f3a1Smrg    # We don't want -fno-exception when compiling C++ code, so set the
63789f00f3a1Smrg    # no_builtin_flag separately
6379edce3322Smrg    if test yes = "$GXX"; then
63809f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
63819f00f3a1Smrg    else
63829f00f3a1Smrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
63839f00f3a1Smrg    fi
63849f00f3a1Smrg
6385edce3322Smrg    if test yes = "$GXX"; then
63869f00f3a1Smrg      # Set up default GNU C++ configuration
63879f00f3a1Smrg
63889f00f3a1Smrg      LT_PATH_LD
63899f00f3a1Smrg
63909f00f3a1Smrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
63919f00f3a1Smrg      # archiving commands below assume that GNU ld is being used.
6392edce3322Smrg      if test yes = "$with_gnu_ld"; then
6393edce3322Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
6394edce3322Smrg        _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'
63959f00f3a1Smrg
6396edce3322Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6397edce3322Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
63989f00f3a1Smrg
63999f00f3a1Smrg        # If archive_cmds runs LD, not CC, wlarc should be empty
64009f00f3a1Smrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
64019f00f3a1Smrg        #     investigate it a little bit more. (MM)
6402edce3322Smrg        wlarc='$wl'
64039f00f3a1Smrg
64049f00f3a1Smrg        # ancient GNU ld didn't support --whole-archive et. al.
64059f00f3a1Smrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
64069f00f3a1Smrg	  $GREP 'no-whole-archive' > /dev/null; then
6407edce3322Smrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
64089f00f3a1Smrg        else
64099f00f3a1Smrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
64109f00f3a1Smrg        fi
64119f00f3a1Smrg      else
64129f00f3a1Smrg        with_gnu_ld=no
64139f00f3a1Smrg        wlarc=
64149f00f3a1Smrg
64159f00f3a1Smrg        # A generic and very simple default shared library creation
64169f00f3a1Smrg        # command for GNU C++ for the case where it uses the native
64179f00f3a1Smrg        # linker, instead of GNU ld.  If possible, this setting should
64189f00f3a1Smrg        # overridden to take advantage of the native linker features on
64199f00f3a1Smrg        # the platform it is being used on.
64209f00f3a1Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
64219f00f3a1Smrg      fi
64229f00f3a1Smrg
64239f00f3a1Smrg      # Commands to make compiler produce verbose output that lists
64249f00f3a1Smrg      # what "hidden" libraries, object files and flags are used when
64259f00f3a1Smrg      # linking a shared library.
64269f00f3a1Smrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
64279f00f3a1Smrg
64289f00f3a1Smrg    else
64299f00f3a1Smrg      GXX=no
64309f00f3a1Smrg      with_gnu_ld=no
64319f00f3a1Smrg      wlarc=
64329f00f3a1Smrg    fi
64339f00f3a1Smrg
64349f00f3a1Smrg    # PORTME: fill in a description of your system's C++ link characteristics
64359f00f3a1Smrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
64369f00f3a1Smrg    _LT_TAGVAR(ld_shlibs, $1)=yes
64379f00f3a1Smrg    case $host_os in
64389f00f3a1Smrg      aix3*)
64399f00f3a1Smrg        # FIXME: insert proper C++ library support
64409f00f3a1Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
64419f00f3a1Smrg        ;;
64429f00f3a1Smrg      aix[[4-9]]*)
6443edce3322Smrg        if test ia64 = "$host_cpu"; then
64449f00f3a1Smrg          # On IA64, the linker does run time linking by default, so we don't
64459f00f3a1Smrg          # have to do anything special.
64469f00f3a1Smrg          aix_use_runtimelinking=no
64479f00f3a1Smrg          exp_sym_flag='-Bexport'
6448edce3322Smrg          no_entry_flag=
64499f00f3a1Smrg        else
64509f00f3a1Smrg          aix_use_runtimelinking=no
64519f00f3a1Smrg
64529f00f3a1Smrg          # Test if we are trying to use run time linking or normal
64539f00f3a1Smrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6454edce3322Smrg          # have runtime linking enabled, and use it for executables.
6455edce3322Smrg          # For shared libraries, we enable/disable runtime linking
6456edce3322Smrg          # depending on the kind of the shared library created -
6457edce3322Smrg          # when "with_aix_soname,aix_use_runtimelinking" is:
6458edce3322Smrg          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
6459edce3322Smrg          # "aix,yes"  lib.so          shared, rtl:yes, for executables
6460edce3322Smrg          #            lib.a           static archive
6461edce3322Smrg          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
6462edce3322Smrg          #            lib.a(lib.so.V) shared, rtl:no,  for executables
6463edce3322Smrg          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
6464edce3322Smrg          #            lib.a(lib.so.V) shared, rtl:no
6465edce3322Smrg          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
6466edce3322Smrg          #            lib.a           static archive
64679f00f3a1Smrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
64689f00f3a1Smrg	    for ld_flag in $LDFLAGS; do
64699f00f3a1Smrg	      case $ld_flag in
64709f00f3a1Smrg	      *-brtl*)
64719f00f3a1Smrg	        aix_use_runtimelinking=yes
64729f00f3a1Smrg	        break
64739f00f3a1Smrg	        ;;
64749f00f3a1Smrg	      esac
64759f00f3a1Smrg	    done
6476edce3322Smrg	    if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
6477edce3322Smrg	      # With aix-soname=svr4, we create the lib.so.V shared archives only,
6478edce3322Smrg	      # so we don't have lib.a shared libs to link our executables.
6479edce3322Smrg	      # We have to force runtime linking in this case.
6480edce3322Smrg	      aix_use_runtimelinking=yes
6481edce3322Smrg	      LDFLAGS="$LDFLAGS -Wl,-brtl"
6482edce3322Smrg	    fi
64839f00f3a1Smrg	    ;;
64849f00f3a1Smrg          esac
64859f00f3a1Smrg
64869f00f3a1Smrg          exp_sym_flag='-bexport'
64879f00f3a1Smrg          no_entry_flag='-bnoentry'
64889f00f3a1Smrg        fi
64899f00f3a1Smrg
64909f00f3a1Smrg        # When large executables or shared objects are built, AIX ld can
64919f00f3a1Smrg        # have problems creating the table of contents.  If linking a library
64929f00f3a1Smrg        # or program results in "error TOC overflow" add -mminimal-toc to
64939f00f3a1Smrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
64949f00f3a1Smrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
64959f00f3a1Smrg
64969f00f3a1Smrg        _LT_TAGVAR(archive_cmds, $1)=''
64979f00f3a1Smrg        _LT_TAGVAR(hardcode_direct, $1)=yes
64989f00f3a1Smrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
64999f00f3a1Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
65009f00f3a1Smrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
6501edce3322Smrg        _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
6502edce3322Smrg        case $with_aix_soname,$aix_use_runtimelinking in
6503edce3322Smrg        aix,*) ;;	# no import file
6504edce3322Smrg        svr4,* | *,yes) # use import file
6505edce3322Smrg          # The Import File defines what to hardcode.
6506edce3322Smrg          _LT_TAGVAR(hardcode_direct, $1)=no
6507edce3322Smrg          _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6508edce3322Smrg          ;;
6509edce3322Smrg        esac
65109f00f3a1Smrg
6511edce3322Smrg        if test yes = "$GXX"; then
65129f00f3a1Smrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
65139f00f3a1Smrg          # We only want to do this on AIX 4.2 and lower, the check
65149f00f3a1Smrg          # below for broken collect2 doesn't work under 4.3+
6515edce3322Smrg	  collect2name=`$CC -print-prog-name=collect2`
65169f00f3a1Smrg	  if test -f "$collect2name" &&
65179f00f3a1Smrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
65189f00f3a1Smrg	  then
65199f00f3a1Smrg	    # We have reworked collect2
65209f00f3a1Smrg	    :
65219f00f3a1Smrg	  else
65229f00f3a1Smrg	    # We have old collect2
65239f00f3a1Smrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
65249f00f3a1Smrg	    # It fails to find uninstalled libraries when the uninstalled
65259f00f3a1Smrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
65269f00f3a1Smrg	    # to unsupported forces relinking
65279f00f3a1Smrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
65289f00f3a1Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
65299f00f3a1Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
65309f00f3a1Smrg	  fi
65319f00f3a1Smrg          esac
65329f00f3a1Smrg          shared_flag='-shared'
6533edce3322Smrg	  if test yes = "$aix_use_runtimelinking"; then
6534edce3322Smrg	    shared_flag=$shared_flag' $wl-G'
65359f00f3a1Smrg	  fi
6536edce3322Smrg	  # Need to ensure runtime linking is disabled for the traditional
6537edce3322Smrg	  # shared library, or the linker may eventually find shared libraries
6538edce3322Smrg	  # /with/ Import File - we do not want to mix them.
6539edce3322Smrg	  shared_flag_aix='-shared'
6540edce3322Smrg	  shared_flag_svr4='-shared $wl-G'
65419f00f3a1Smrg        else
65429f00f3a1Smrg          # not using gcc
6543edce3322Smrg          if test ia64 = "$host_cpu"; then
65449f00f3a1Smrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
65459f00f3a1Smrg	  # chokes on -Wl,-G. The following line is correct:
65469f00f3a1Smrg	  shared_flag='-G'
65479f00f3a1Smrg          else
6548edce3322Smrg	    if test yes = "$aix_use_runtimelinking"; then
6549edce3322Smrg	      shared_flag='$wl-G'
65509f00f3a1Smrg	    else
6551edce3322Smrg	      shared_flag='$wl-bM:SRE'
65529f00f3a1Smrg	    fi
6553edce3322Smrg	    shared_flag_aix='$wl-bM:SRE'
6554edce3322Smrg	    shared_flag_svr4='$wl-G'
65559f00f3a1Smrg          fi
65569f00f3a1Smrg        fi
65579f00f3a1Smrg
6558edce3322Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
65599f00f3a1Smrg        # It seems that -bexpall does not export symbols beginning with
65609f00f3a1Smrg        # underscore (_), so it is better to generate a list of symbols to
65619f00f3a1Smrg	# export.
65629f00f3a1Smrg        _LT_TAGVAR(always_export_symbols, $1)=yes
6563edce3322Smrg	if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
65649f00f3a1Smrg          # Warning - without using the other runtime loading flags (-brtl),
65659f00f3a1Smrg          # -berok will link without error, but may produce a broken library.
6566edce3322Smrg          # The "-G" linker flag allows undefined symbols.
6567edce3322Smrg          _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
65689f00f3a1Smrg          # Determine the default libpath from the value encoded in an empty
65699f00f3a1Smrg          # executable.
65709f00f3a1Smrg          _LT_SYS_MODULE_PATH_AIX([$1])
6571edce3322Smrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
65729f00f3a1Smrg
6573edce3322Smrg          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
65749f00f3a1Smrg        else
6575edce3322Smrg          if test ia64 = "$host_cpu"; then
6576edce3322Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
65779f00f3a1Smrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6578edce3322Smrg	    _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"
65799f00f3a1Smrg          else
65809f00f3a1Smrg	    # Determine the default libpath from the value encoded in an
65819f00f3a1Smrg	    # empty executable.
65829f00f3a1Smrg	    _LT_SYS_MODULE_PATH_AIX([$1])
6583edce3322Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
65849f00f3a1Smrg	    # Warning - without using the other run time loading flags,
65859f00f3a1Smrg	    # -berok will link without error, but may produce a broken library.
6586edce3322Smrg	    _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
6587edce3322Smrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
6588edce3322Smrg	    if test yes = "$with_gnu_ld"; then
65899f00f3a1Smrg	      # We only use this code for GNU lds that support --whole-archive.
6590edce3322Smrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
65919f00f3a1Smrg	    else
65929f00f3a1Smrg	      # Exported symbols can be pulled into shared objects from archives
65939f00f3a1Smrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
65949f00f3a1Smrg	    fi
65959f00f3a1Smrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6596edce3322Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
6597edce3322Smrg	    # -brtl affects multiple linker settings, -berok does not and is overridden later
6598edce3322Smrg	    compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
6599edce3322Smrg	    if test svr4 != "$with_aix_soname"; then
6600edce3322Smrg	      # This is similar to how AIX traditionally builds its shared
6601edce3322Smrg	      # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
6602edce3322Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
6603edce3322Smrg	    fi
6604edce3322Smrg	    if test aix != "$with_aix_soname"; then
6605edce3322Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
6606edce3322Smrg	    else
6607edce3322Smrg	      # used by -dlpreopen to get the symbols
6608edce3322Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
6609edce3322Smrg	    fi
6610edce3322Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
66119f00f3a1Smrg          fi
66129f00f3a1Smrg        fi
66139f00f3a1Smrg        ;;
66149f00f3a1Smrg
66159f00f3a1Smrg      beos*)
66169f00f3a1Smrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
66179f00f3a1Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
66189f00f3a1Smrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
66199f00f3a1Smrg	  # support --undefined.  This deserves some investigation.  FIXME
6620edce3322Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
66219f00f3a1Smrg	else
66229f00f3a1Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
66239f00f3a1Smrg	fi
66249f00f3a1Smrg	;;
66259f00f3a1Smrg
66269f00f3a1Smrg      chorus*)
66279f00f3a1Smrg        case $cc_basename in
66289f00f3a1Smrg          *)
66299f00f3a1Smrg	  # FIXME: insert proper C++ library support
66309f00f3a1Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
66319f00f3a1Smrg	  ;;
66329f00f3a1Smrg        esac
66339f00f3a1Smrg        ;;
66349f00f3a1Smrg
66359f00f3a1Smrg      cygwin* | mingw* | pw32* | cegcc*)
66369f00f3a1Smrg	case $GXX,$cc_basename in
66379f00f3a1Smrg	,cl* | no,cl*)
66389f00f3a1Smrg	  # Native MSVC
66399f00f3a1Smrg	  # hardcode_libdir_flag_spec is actually meaningless, as there is
66409f00f3a1Smrg	  # no search path for DLLs.
66419f00f3a1Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
66429f00f3a1Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
66439f00f3a1Smrg	  _LT_TAGVAR(always_export_symbols, $1)=yes
66449f00f3a1Smrg	  _LT_TAGVAR(file_list_spec, $1)='@'
66459f00f3a1Smrg	  # Tell ltmain to make .lib files, not .a files.
66469f00f3a1Smrg	  libext=lib
66479f00f3a1Smrg	  # Tell ltmain to make .dll files, not .so files.
6648edce3322Smrg	  shrext_cmds=.dll
66499f00f3a1Smrg	  # FIXME: Setting linknames here is a bad hack.
6650edce3322Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
6651edce3322Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6652edce3322Smrg              cp "$export_symbols" "$output_objdir/$soname.def";
6653edce3322Smrg              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
6654edce3322Smrg            else
6655edce3322Smrg              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
6656edce3322Smrg            fi~
6657edce3322Smrg            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6658edce3322Smrg            linknames='
66599f00f3a1Smrg	  # The linker will not automatically build a static lib if we build a DLL.
66609f00f3a1Smrg	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
66619f00f3a1Smrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
66629f00f3a1Smrg	  # Don't use ranlib
66639f00f3a1Smrg	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
66649f00f3a1Smrg	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6665edce3322Smrg            lt_tool_outputfile="@TOOL_OUTPUT@"~
6666edce3322Smrg            case $lt_outputfile in
6667edce3322Smrg              *.exe|*.EXE) ;;
6668edce3322Smrg              *)
6669edce3322Smrg                lt_outputfile=$lt_outputfile.exe
6670edce3322Smrg                lt_tool_outputfile=$lt_tool_outputfile.exe
6671edce3322Smrg                ;;
6672edce3322Smrg            esac~
6673edce3322Smrg            func_to_tool_file "$lt_outputfile"~
6674edce3322Smrg            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
6675edce3322Smrg              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6676edce3322Smrg              $RM "$lt_outputfile.manifest";
6677edce3322Smrg            fi'
66789f00f3a1Smrg	  ;;
66799f00f3a1Smrg	*)
66809f00f3a1Smrg	  # g++
66819f00f3a1Smrg	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
66829f00f3a1Smrg	  # as there is no search path for DLLs.
66839f00f3a1Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6684edce3322Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
66859f00f3a1Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
66869f00f3a1Smrg	  _LT_TAGVAR(always_export_symbols, $1)=no
66879f00f3a1Smrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
66889f00f3a1Smrg
66899f00f3a1Smrg	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6690edce3322Smrg	    _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'
6691edce3322Smrg	    # If the export-symbols file already is a .def file, use it as
6692edce3322Smrg	    # is; otherwise, prepend EXPORTS...
6693edce3322Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6694edce3322Smrg              cp $export_symbols $output_objdir/$soname.def;
6695edce3322Smrg            else
6696edce3322Smrg              echo EXPORTS > $output_objdir/$soname.def;
6697edce3322Smrg              cat $export_symbols >> $output_objdir/$soname.def;
6698edce3322Smrg            fi~
6699edce3322Smrg            $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'
67009f00f3a1Smrg	  else
67019f00f3a1Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
67029f00f3a1Smrg	  fi
67039f00f3a1Smrg	  ;;
67049f00f3a1Smrg	esac
67059f00f3a1Smrg	;;
67069f00f3a1Smrg      darwin* | rhapsody*)
67079f00f3a1Smrg        _LT_DARWIN_LINKER_FEATURES($1)
67089f00f3a1Smrg	;;
67099f00f3a1Smrg
6710edce3322Smrg      os2*)
6711edce3322Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6712edce3322Smrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
6713edce3322Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6714edce3322Smrg	shrext_cmds=.dll
6715edce3322Smrg	_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6716edce3322Smrg	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6717edce3322Smrg	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6718edce3322Smrg	  $ECHO EXPORTS >> $output_objdir/$libname.def~
6719edce3322Smrg	  emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
6720edce3322Smrg	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6721edce3322Smrg	  emximp -o $lib $output_objdir/$libname.def'
6722edce3322Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6723edce3322Smrg	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6724edce3322Smrg	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6725edce3322Smrg	  $ECHO EXPORTS >> $output_objdir/$libname.def~
6726edce3322Smrg	  prefix_cmds="$SED"~
6727edce3322Smrg	  if test EXPORTS = "`$SED 1q $export_symbols`"; then
6728edce3322Smrg	    prefix_cmds="$prefix_cmds -e 1d";
6729edce3322Smrg	  fi~
6730edce3322Smrg	  prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
6731edce3322Smrg	  cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
6732edce3322Smrg	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6733edce3322Smrg	  emximp -o $lib $output_objdir/$libname.def'
6734edce3322Smrg	_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
6735edce3322Smrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6736edce3322Smrg	;;
6737edce3322Smrg
67389f00f3a1Smrg      dgux*)
67399f00f3a1Smrg        case $cc_basename in
67409f00f3a1Smrg          ec++*)
67419f00f3a1Smrg	    # FIXME: insert proper C++ library support
67429f00f3a1Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
67439f00f3a1Smrg	    ;;
67449f00f3a1Smrg          ghcx*)
67459f00f3a1Smrg	    # Green Hills C++ Compiler
67469f00f3a1Smrg	    # FIXME: insert proper C++ library support
67479f00f3a1Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
67489f00f3a1Smrg	    ;;
67499f00f3a1Smrg          *)
67509f00f3a1Smrg	    # FIXME: insert proper C++ library support
67519f00f3a1Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
67529f00f3a1Smrg	    ;;
67539f00f3a1Smrg        esac
67549f00f3a1Smrg        ;;
67559f00f3a1Smrg
67569f00f3a1Smrg      freebsd2.*)
67579f00f3a1Smrg        # C++ shared libraries reported to be fairly broken before
67589f00f3a1Smrg	# switch to ELF
67599f00f3a1Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
67609f00f3a1Smrg        ;;
67619f00f3a1Smrg
67629f00f3a1Smrg      freebsd-elf*)
67639f00f3a1Smrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
67649f00f3a1Smrg        ;;
67659f00f3a1Smrg
67669f00f3a1Smrg      freebsd* | dragonfly*)
67679f00f3a1Smrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
67689f00f3a1Smrg        # conventions
67699f00f3a1Smrg        _LT_TAGVAR(ld_shlibs, $1)=yes
67709f00f3a1Smrg        ;;
67719f00f3a1Smrg
67729f00f3a1Smrg      haiku*)
6773edce3322Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
67749f00f3a1Smrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
67759f00f3a1Smrg        ;;
67769f00f3a1Smrg
67779f00f3a1Smrg      hpux9*)
6778edce3322Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
67799f00f3a1Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6780edce3322Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
67819f00f3a1Smrg        _LT_TAGVAR(hardcode_direct, $1)=yes
67829f00f3a1Smrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
67839f00f3a1Smrg				             # but as the default
67849f00f3a1Smrg				             # location of the library.
67859f00f3a1Smrg
67869f00f3a1Smrg        case $cc_basename in
67879f00f3a1Smrg          CC*)
67889f00f3a1Smrg            # FIXME: insert proper C++ library support
67899f00f3a1Smrg            _LT_TAGVAR(ld_shlibs, $1)=no
67909f00f3a1Smrg            ;;
67919f00f3a1Smrg          aCC*)
6792edce3322Smrg            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
67939f00f3a1Smrg            # Commands to make compiler produce verbose output that lists
67949f00f3a1Smrg            # what "hidden" libraries, object files and flags are used when
67959f00f3a1Smrg            # linking a shared library.
67969f00f3a1Smrg            #
67979f00f3a1Smrg            # There doesn't appear to be a way to prevent this compiler from
67989f00f3a1Smrg            # explicitly linking system object files so we need to strip them
67999f00f3a1Smrg            # from the output so that they don't get included in the library
68009f00f3a1Smrg            # dependencies.
6801edce3322Smrg            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"'
68029f00f3a1Smrg            ;;
68039f00f3a1Smrg          *)
6804edce3322Smrg            if test yes = "$GXX"; then
6805edce3322Smrg              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
68069f00f3a1Smrg            else
68079f00f3a1Smrg              # FIXME: insert proper C++ library support
68089f00f3a1Smrg              _LT_TAGVAR(ld_shlibs, $1)=no
68099f00f3a1Smrg            fi
68109f00f3a1Smrg            ;;
68119f00f3a1Smrg        esac
68129f00f3a1Smrg        ;;
68139f00f3a1Smrg
68149f00f3a1Smrg      hpux10*|hpux11*)
6815edce3322Smrg        if test no = "$with_gnu_ld"; then
6816edce3322Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
68179f00f3a1Smrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
68189f00f3a1Smrg
68199f00f3a1Smrg          case $host_cpu in
68209f00f3a1Smrg            hppa*64*|ia64*)
68219f00f3a1Smrg              ;;
68229f00f3a1Smrg            *)
6823edce3322Smrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
68249f00f3a1Smrg              ;;
68259f00f3a1Smrg          esac
68269f00f3a1Smrg        fi
68279f00f3a1Smrg        case $host_cpu in
68289f00f3a1Smrg          hppa*64*|ia64*)
68299f00f3a1Smrg            _LT_TAGVAR(hardcode_direct, $1)=no
68309f00f3a1Smrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
68319f00f3a1Smrg            ;;
68329f00f3a1Smrg          *)
68339f00f3a1Smrg            _LT_TAGVAR(hardcode_direct, $1)=yes
68349f00f3a1Smrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
68359f00f3a1Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
68369f00f3a1Smrg					         # but as the default
68379f00f3a1Smrg					         # location of the library.
68389f00f3a1Smrg            ;;
68399f00f3a1Smrg        esac
68409f00f3a1Smrg
68419f00f3a1Smrg        case $cc_basename in
68429f00f3a1Smrg          CC*)
68439f00f3a1Smrg	    # FIXME: insert proper C++ library support
68449f00f3a1Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
68459f00f3a1Smrg	    ;;
68469f00f3a1Smrg          aCC*)
68479f00f3a1Smrg	    case $host_cpu in
68489f00f3a1Smrg	      hppa*64*)
6849edce3322Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
68509f00f3a1Smrg	        ;;
68519f00f3a1Smrg	      ia64*)
6852edce3322Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
68539f00f3a1Smrg	        ;;
68549f00f3a1Smrg	      *)
6855edce3322Smrg	        _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'
68569f00f3a1Smrg	        ;;
68579f00f3a1Smrg	    esac
68589f00f3a1Smrg	    # Commands to make compiler produce verbose output that lists
68599f00f3a1Smrg	    # what "hidden" libraries, object files and flags are used when
68609f00f3a1Smrg	    # linking a shared library.
68619f00f3a1Smrg	    #
68629f00f3a1Smrg	    # There doesn't appear to be a way to prevent this compiler from
68639f00f3a1Smrg	    # explicitly linking system object files so we need to strip them
68649f00f3a1Smrg	    # from the output so that they don't get included in the library
68659f00f3a1Smrg	    # dependencies.
6866edce3322Smrg	    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"'
68679f00f3a1Smrg	    ;;
68689f00f3a1Smrg          *)
6869edce3322Smrg	    if test yes = "$GXX"; then
6870edce3322Smrg	      if test no = "$with_gnu_ld"; then
68719f00f3a1Smrg	        case $host_cpu in
68729f00f3a1Smrg	          hppa*64*)
6873edce3322Smrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
68749f00f3a1Smrg	            ;;
68759f00f3a1Smrg	          ia64*)
6876edce3322Smrg	            _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'
68779f00f3a1Smrg	            ;;
68789f00f3a1Smrg	          *)
6879edce3322Smrg	            _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'
68809f00f3a1Smrg	            ;;
68819f00f3a1Smrg	        esac
68829f00f3a1Smrg	      fi
68839f00f3a1Smrg	    else
68849f00f3a1Smrg	      # FIXME: insert proper C++ library support
68859f00f3a1Smrg	      _LT_TAGVAR(ld_shlibs, $1)=no
68869f00f3a1Smrg	    fi
68879f00f3a1Smrg	    ;;
68889f00f3a1Smrg        esac
68899f00f3a1Smrg        ;;
68909f00f3a1Smrg
68919f00f3a1Smrg      interix[[3-9]]*)
68929f00f3a1Smrg	_LT_TAGVAR(hardcode_direct, $1)=no
68939f00f3a1Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6894edce3322Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6895edce3322Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
68969f00f3a1Smrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
68979f00f3a1Smrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
68989f00f3a1Smrg	# default) and relocated if they conflict, which is a slow very memory
68999f00f3a1Smrg	# consuming and fragmenting process.  To avoid this, we pick a random,
69009f00f3a1Smrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
69019f00f3a1Smrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6902edce3322Smrg	_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'
6903edce3322Smrg	_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'
69049f00f3a1Smrg	;;
69059f00f3a1Smrg      irix5* | irix6*)
69069f00f3a1Smrg        case $cc_basename in
69079f00f3a1Smrg          CC*)
69089f00f3a1Smrg	    # SGI C++
6909edce3322Smrg	    _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'
69109f00f3a1Smrg
69119f00f3a1Smrg	    # Archives containing C++ object files must be created using
69129f00f3a1Smrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
69139f00f3a1Smrg	    # necessary to make sure instantiated templates are included
69149f00f3a1Smrg	    # in the archive.
69159f00f3a1Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
69169f00f3a1Smrg	    ;;
69179f00f3a1Smrg          *)
6918edce3322Smrg	    if test yes = "$GXX"; then
6919edce3322Smrg	      if test no = "$with_gnu_ld"; then
6920edce3322Smrg	        _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'
69219f00f3a1Smrg	      else
6922edce3322Smrg	        _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'
69239f00f3a1Smrg	      fi
69249f00f3a1Smrg	    fi
69259f00f3a1Smrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
69269f00f3a1Smrg	    ;;
69279f00f3a1Smrg        esac
6928edce3322Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
69299f00f3a1Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
69309f00f3a1Smrg        _LT_TAGVAR(inherit_rpath, $1)=yes
69319f00f3a1Smrg        ;;
69329f00f3a1Smrg
69339f00f3a1Smrg      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
69349f00f3a1Smrg        case $cc_basename in
69359f00f3a1Smrg          KCC*)
69369f00f3a1Smrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
69379f00f3a1Smrg
69389f00f3a1Smrg	    # KCC will only create a shared library if the output file
69399f00f3a1Smrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
69409f00f3a1Smrg	    # to its proper name (with version) after linking.
6941edce3322Smrg	    _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'
6942edce3322Smrg	    _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'
69439f00f3a1Smrg	    # Commands to make compiler produce verbose output that lists
69449f00f3a1Smrg	    # what "hidden" libraries, object files and flags are used when
69459f00f3a1Smrg	    # linking a shared library.
69469f00f3a1Smrg	    #
69479f00f3a1Smrg	    # There doesn't appear to be a way to prevent this compiler from
69489f00f3a1Smrg	    # explicitly linking system object files so we need to strip them
69499f00f3a1Smrg	    # from the output so that they don't get included in the library
69509f00f3a1Smrg	    # dependencies.
6951edce3322Smrg	    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"'
69529f00f3a1Smrg
6953edce3322Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6954edce3322Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
69559f00f3a1Smrg
69569f00f3a1Smrg	    # Archives containing C++ object files must be created using
69579f00f3a1Smrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
69589f00f3a1Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
69599f00f3a1Smrg	    ;;
69609f00f3a1Smrg	  icpc* | ecpc* )
69619f00f3a1Smrg	    # Intel C++
69629f00f3a1Smrg	    with_gnu_ld=yes
69639f00f3a1Smrg	    # version 8.0 and above of icpc choke on multiply defined symbols
69649f00f3a1Smrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
69659f00f3a1Smrg	    # earlier do not add the objects themselves.
69669f00f3a1Smrg	    case `$CC -V 2>&1` in
69679f00f3a1Smrg	      *"Version 7."*)
6968edce3322Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
6969edce3322Smrg		_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'
69709f00f3a1Smrg		;;
69719f00f3a1Smrg	      *)  # Version 8.0 or newer
69729f00f3a1Smrg	        tmp_idyn=
69739f00f3a1Smrg	        case $host_cpu in
69749f00f3a1Smrg		  ia64*) tmp_idyn=' -i_dynamic';;
69759f00f3a1Smrg		esac
6976edce3322Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6977edce3322Smrg		_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'
69789f00f3a1Smrg		;;
69799f00f3a1Smrg	    esac
69809f00f3a1Smrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6981edce3322Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6982edce3322Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6983edce3322Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
69849f00f3a1Smrg	    ;;
69859f00f3a1Smrg          pgCC* | pgcpp*)
69869f00f3a1Smrg            # Portland Group C++ compiler
69879f00f3a1Smrg	    case `$CC -V` in
69889f00f3a1Smrg	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
69899f00f3a1Smrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6990edce3322Smrg               rm -rf $tpldir~
6991edce3322Smrg               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6992edce3322Smrg               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
69939f00f3a1Smrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6994edce3322Smrg                rm -rf $tpldir~
6995edce3322Smrg                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6996edce3322Smrg                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
6997edce3322Smrg                $RANLIB $oldlib'
69989f00f3a1Smrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6999edce3322Smrg                rm -rf $tpldir~
7000edce3322Smrg                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7001edce3322Smrg                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
70029f00f3a1Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7003edce3322Smrg                rm -rf $tpldir~
7004edce3322Smrg                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7005edce3322Smrg                $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'
70069f00f3a1Smrg	      ;;
70079f00f3a1Smrg	    *) # Version 6 and above use weak symbols
7008edce3322Smrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7009edce3322Smrg	      _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'
70109f00f3a1Smrg	      ;;
70119f00f3a1Smrg	    esac
70129f00f3a1Smrg
7013edce3322Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
7014edce3322Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7015edce3322Smrg	    _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'
70169f00f3a1Smrg            ;;
70179f00f3a1Smrg	  cxx*)
70189f00f3a1Smrg	    # Compaq C++
7019edce3322Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7020edce3322Smrg	    _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'
70219f00f3a1Smrg
70229f00f3a1Smrg	    runpath_var=LD_RUN_PATH
70239f00f3a1Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
70249f00f3a1Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
70259f00f3a1Smrg
70269f00f3a1Smrg	    # Commands to make compiler produce verbose output that lists
70279f00f3a1Smrg	    # what "hidden" libraries, object files and flags are used when
70289f00f3a1Smrg	    # linking a shared library.
70299f00f3a1Smrg	    #
70309f00f3a1Smrg	    # There doesn't appear to be a way to prevent this compiler from
70319f00f3a1Smrg	    # explicitly linking system object files so we need to strip them
70329f00f3a1Smrg	    # from the output so that they don't get included in the library
70339f00f3a1Smrg	    # dependencies.
7034edce3322Smrg	    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'
70359f00f3a1Smrg	    ;;
70369f00f3a1Smrg	  xl* | mpixl* | bgxl*)
70379f00f3a1Smrg	    # IBM XL 8.0 on PPC, with GNU ld
7038edce3322Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7039edce3322Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7040edce3322Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7041edce3322Smrg	    if test yes = "$supports_anon_versioning"; then
70429f00f3a1Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7043edce3322Smrg                cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7044edce3322Smrg                echo "local: *; };" >> $output_objdir/$libname.ver~
7045edce3322Smrg                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
70469f00f3a1Smrg	    fi
70479f00f3a1Smrg	    ;;
70489f00f3a1Smrg	  *)
70499f00f3a1Smrg	    case `$CC -V 2>&1 | sed 5q` in
70509f00f3a1Smrg	    *Sun\ C*)
70519f00f3a1Smrg	      # Sun C++ 5.9
70529f00f3a1Smrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7053edce3322Smrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7054edce3322Smrg	      _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'
70559f00f3a1Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7056edce3322Smrg	      _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'
70579f00f3a1Smrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
70589f00f3a1Smrg
70599f00f3a1Smrg	      # Not sure whether something based on
70609f00f3a1Smrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
70619f00f3a1Smrg	      # would be better.
70629f00f3a1Smrg	      output_verbose_link_cmd='func_echo_all'
70639f00f3a1Smrg
70649f00f3a1Smrg	      # Archives containing C++ object files must be created using
70659f00f3a1Smrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
70669f00f3a1Smrg	      # necessary to make sure instantiated templates are included
70679f00f3a1Smrg	      # in the archive.
70689f00f3a1Smrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
70699f00f3a1Smrg	      ;;
70709f00f3a1Smrg	    esac
70719f00f3a1Smrg	    ;;
70729f00f3a1Smrg	esac
70739f00f3a1Smrg	;;
70749f00f3a1Smrg
70759f00f3a1Smrg      lynxos*)
70769f00f3a1Smrg        # FIXME: insert proper C++ library support
70779f00f3a1Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
70789f00f3a1Smrg	;;
70799f00f3a1Smrg
70809f00f3a1Smrg      m88k*)
70819f00f3a1Smrg        # FIXME: insert proper C++ library support
70829f00f3a1Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
70839f00f3a1Smrg	;;
70849f00f3a1Smrg
70859f00f3a1Smrg      mvs*)
70869f00f3a1Smrg        case $cc_basename in
70879f00f3a1Smrg          cxx*)
70889f00f3a1Smrg	    # FIXME: insert proper C++ library support
70899f00f3a1Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
70909f00f3a1Smrg	    ;;
70919f00f3a1Smrg	  *)
70929f00f3a1Smrg	    # FIXME: insert proper C++ library support
70939f00f3a1Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
70949f00f3a1Smrg	    ;;
70959f00f3a1Smrg	esac
70969f00f3a1Smrg	;;
70979f00f3a1Smrg
70989f00f3a1Smrg      netbsd*)
70999f00f3a1Smrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
71009f00f3a1Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
71019f00f3a1Smrg	  wlarc=
71029f00f3a1Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
71039f00f3a1Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
71049f00f3a1Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
71059f00f3a1Smrg	fi
71069f00f3a1Smrg	# Workaround some broken pre-1.5 toolchains
71079f00f3a1Smrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
71089f00f3a1Smrg	;;
71099f00f3a1Smrg
71109f00f3a1Smrg      *nto* | *qnx*)
71119f00f3a1Smrg        _LT_TAGVAR(ld_shlibs, $1)=yes
71129f00f3a1Smrg	;;
71139f00f3a1Smrg
7114edce3322Smrg      openbsd* | bitrig*)
71159f00f3a1Smrg	if test -f /usr/libexec/ld.so; then
71169f00f3a1Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
71179f00f3a1Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
71189f00f3a1Smrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
71199f00f3a1Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7120edce3322Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7121edce3322Smrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
7122edce3322Smrg	    _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'
7123edce3322Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7124edce3322Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
71259f00f3a1Smrg	  fi
71269f00f3a1Smrg	  output_verbose_link_cmd=func_echo_all
71279f00f3a1Smrg	else
71289f00f3a1Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
71299f00f3a1Smrg	fi
71309f00f3a1Smrg	;;
71319f00f3a1Smrg
71329f00f3a1Smrg      osf3* | osf4* | osf5*)
71339f00f3a1Smrg        case $cc_basename in
71349f00f3a1Smrg          KCC*)
71359f00f3a1Smrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
71369f00f3a1Smrg
71379f00f3a1Smrg	    # KCC will only create a shared library if the output file
71389f00f3a1Smrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
71399f00f3a1Smrg	    # to its proper name (with version) after linking.
7140edce3322Smrg	    _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'
71419f00f3a1Smrg
7142edce3322Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
71439f00f3a1Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
71449f00f3a1Smrg
71459f00f3a1Smrg	    # Archives containing C++ object files must be created using
71469f00f3a1Smrg	    # the KAI C++ compiler.
71479f00f3a1Smrg	    case $host in
71489f00f3a1Smrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
71499f00f3a1Smrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
71509f00f3a1Smrg	    esac
71519f00f3a1Smrg	    ;;
71529f00f3a1Smrg          RCC*)
71539f00f3a1Smrg	    # Rational C++ 2.4.1
71549f00f3a1Smrg	    # FIXME: insert proper C++ library support
71559f00f3a1Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
71569f00f3a1Smrg	    ;;
71579f00f3a1Smrg          cxx*)
71589f00f3a1Smrg	    case $host in
71599f00f3a1Smrg	      osf3*)
7160edce3322Smrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7161edce3322Smrg	        _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'
7162edce3322Smrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
71639f00f3a1Smrg		;;
71649f00f3a1Smrg	      *)
71659f00f3a1Smrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7166edce3322Smrg	        _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'
71679f00f3a1Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7168edce3322Smrg                  echo "-hidden">> $lib.exp~
7169edce3322Smrg                  $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~
7170edce3322Smrg                  $RM $lib.exp'
71719f00f3a1Smrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
71729f00f3a1Smrg		;;
71739f00f3a1Smrg	    esac
71749f00f3a1Smrg
71759f00f3a1Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
71769f00f3a1Smrg
71779f00f3a1Smrg	    # Commands to make compiler produce verbose output that lists
71789f00f3a1Smrg	    # what "hidden" libraries, object files and flags are used when
71799f00f3a1Smrg	    # linking a shared library.
71809f00f3a1Smrg	    #
71819f00f3a1Smrg	    # There doesn't appear to be a way to prevent this compiler from
71829f00f3a1Smrg	    # explicitly linking system object files so we need to strip them
71839f00f3a1Smrg	    # from the output so that they don't get included in the library
71849f00f3a1Smrg	    # dependencies.
7185edce3322Smrg	    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"'
71869f00f3a1Smrg	    ;;
71879f00f3a1Smrg	  *)
7188edce3322Smrg	    if test yes,no = "$GXX,$with_gnu_ld"; then
7189edce3322Smrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
71909f00f3a1Smrg	      case $host in
71919f00f3a1Smrg	        osf3*)
7192edce3322Smrg	          _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'
71939f00f3a1Smrg		  ;;
71949f00f3a1Smrg	        *)
7195edce3322Smrg	          _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'
71969f00f3a1Smrg		  ;;
71979f00f3a1Smrg	      esac
71989f00f3a1Smrg
7199edce3322Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
72009f00f3a1Smrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
72019f00f3a1Smrg
72029f00f3a1Smrg	      # Commands to make compiler produce verbose output that lists
72039f00f3a1Smrg	      # what "hidden" libraries, object files and flags are used when
72049f00f3a1Smrg	      # linking a shared library.
72059f00f3a1Smrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
72069f00f3a1Smrg
72079f00f3a1Smrg	    else
72089f00f3a1Smrg	      # FIXME: insert proper C++ library support
72099f00f3a1Smrg	      _LT_TAGVAR(ld_shlibs, $1)=no
72109f00f3a1Smrg	    fi
72119f00f3a1Smrg	    ;;
72129f00f3a1Smrg        esac
72139f00f3a1Smrg        ;;
72149f00f3a1Smrg
72159f00f3a1Smrg      psos*)
72169f00f3a1Smrg        # FIXME: insert proper C++ library support
72179f00f3a1Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
72189f00f3a1Smrg        ;;
72199f00f3a1Smrg
72209f00f3a1Smrg      sunos4*)
72219f00f3a1Smrg        case $cc_basename in
72229f00f3a1Smrg          CC*)
72239f00f3a1Smrg	    # Sun C++ 4.x
72249f00f3a1Smrg	    # FIXME: insert proper C++ library support
72259f00f3a1Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
72269f00f3a1Smrg	    ;;
72279f00f3a1Smrg          lcc*)
72289f00f3a1Smrg	    # Lucid
72299f00f3a1Smrg	    # FIXME: insert proper C++ library support
72309f00f3a1Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
72319f00f3a1Smrg	    ;;
72329f00f3a1Smrg          *)
72339f00f3a1Smrg	    # FIXME: insert proper C++ library support
72349f00f3a1Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
72359f00f3a1Smrg	    ;;
72369f00f3a1Smrg        esac
72379f00f3a1Smrg        ;;
72389f00f3a1Smrg
72399f00f3a1Smrg      solaris*)
72409f00f3a1Smrg        case $cc_basename in
72419f00f3a1Smrg          CC* | sunCC*)
72429f00f3a1Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
72439f00f3a1Smrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
72449f00f3a1Smrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7245edce3322Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
72469f00f3a1Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7247edce3322Smrg              $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'
72489f00f3a1Smrg
72499f00f3a1Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
72509f00f3a1Smrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
72519f00f3a1Smrg	    case $host_os in
72529f00f3a1Smrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
72539f00f3a1Smrg	      *)
72549f00f3a1Smrg		# The compiler driver will combine and reorder linker options,
7255edce3322Smrg		# but understands '-z linker_flag'.
72569f00f3a1Smrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
72579f00f3a1Smrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
72589f00f3a1Smrg	        ;;
72599f00f3a1Smrg	    esac
72609f00f3a1Smrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
72619f00f3a1Smrg
72629f00f3a1Smrg	    output_verbose_link_cmd='func_echo_all'
72639f00f3a1Smrg
72649f00f3a1Smrg	    # Archives containing C++ object files must be created using
72659f00f3a1Smrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
72669f00f3a1Smrg	    # necessary to make sure instantiated templates are included
72679f00f3a1Smrg	    # in the archive.
72689f00f3a1Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
72699f00f3a1Smrg	    ;;
72709f00f3a1Smrg          gcx*)
72719f00f3a1Smrg	    # Green Hills C++ Compiler
7272edce3322Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
72739f00f3a1Smrg
72749f00f3a1Smrg	    # The C++ compiler must be used to create the archive.
72759f00f3a1Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
72769f00f3a1Smrg	    ;;
72779f00f3a1Smrg          *)
72789f00f3a1Smrg	    # GNU C++ compiler with Solaris linker
7279edce3322Smrg	    if test yes,no = "$GXX,$with_gnu_ld"; then
7280edce3322Smrg	      _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
72819f00f3a1Smrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7282edce3322Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
72839f00f3a1Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7284edce3322Smrg                  $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
72859f00f3a1Smrg
72869f00f3a1Smrg	        # Commands to make compiler produce verbose output that lists
72879f00f3a1Smrg	        # what "hidden" libraries, object files and flags are used when
72889f00f3a1Smrg	        # linking a shared library.
72899f00f3a1Smrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
72909f00f3a1Smrg	      else
7291edce3322Smrg	        # g++ 2.7 appears to require '-G' NOT '-shared' on this
72929f00f3a1Smrg	        # platform.
7293edce3322Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
72949f00f3a1Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7295edce3322Smrg                  $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
72969f00f3a1Smrg
72979f00f3a1Smrg	        # Commands to make compiler produce verbose output that lists
72989f00f3a1Smrg	        # what "hidden" libraries, object files and flags are used when
72999f00f3a1Smrg	        # linking a shared library.
73009f00f3a1Smrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
73019f00f3a1Smrg	      fi
73029f00f3a1Smrg
7303edce3322Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
73049f00f3a1Smrg	      case $host_os in
73059f00f3a1Smrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
73069f00f3a1Smrg		*)
7307edce3322Smrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
73089f00f3a1Smrg		  ;;
73099f00f3a1Smrg	      esac
73109f00f3a1Smrg	    fi
73119f00f3a1Smrg	    ;;
73129f00f3a1Smrg        esac
73139f00f3a1Smrg        ;;
73149f00f3a1Smrg
73159f00f3a1Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7316edce3322Smrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
73179f00f3a1Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
73189f00f3a1Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
73199f00f3a1Smrg      runpath_var='LD_RUN_PATH'
73209f00f3a1Smrg
73219f00f3a1Smrg      case $cc_basename in
73229f00f3a1Smrg        CC*)
7323edce3322Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7324edce3322Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73259f00f3a1Smrg	  ;;
73269f00f3a1Smrg	*)
7327edce3322Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7328edce3322Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73299f00f3a1Smrg	  ;;
73309f00f3a1Smrg      esac
73319f00f3a1Smrg      ;;
73329f00f3a1Smrg
73339f00f3a1Smrg      sysv5* | sco3.2v5* | sco5v6*)
7334edce3322Smrg	# Note: We CANNOT use -z defs as we might desire, because we do not
73359f00f3a1Smrg	# link with -lc, and that would cause any symbols used from libc to
73369f00f3a1Smrg	# always be unresolved, which means just about no library would
73379f00f3a1Smrg	# ever link correctly.  If we're not using GNU ld we use -z text
73389f00f3a1Smrg	# though, which does catch some bad symbols but isn't as heavy-handed
73399f00f3a1Smrg	# as -z defs.
7340edce3322Smrg	_LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7341edce3322Smrg	_LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
73429f00f3a1Smrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
73439f00f3a1Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7344edce3322Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
73459f00f3a1Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
73469f00f3a1Smrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
7347edce3322Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
73489f00f3a1Smrg	runpath_var='LD_RUN_PATH'
73499f00f3a1Smrg
73509f00f3a1Smrg	case $cc_basename in
73519f00f3a1Smrg          CC*)
7352edce3322Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7353edce3322Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73549f00f3a1Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7355edce3322Smrg              '"$_LT_TAGVAR(old_archive_cmds, $1)"
73569f00f3a1Smrg	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7357edce3322Smrg              '"$_LT_TAGVAR(reload_cmds, $1)"
73589f00f3a1Smrg	    ;;
73599f00f3a1Smrg	  *)
7360edce3322Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7361edce3322Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73629f00f3a1Smrg	    ;;
73639f00f3a1Smrg	esac
73649f00f3a1Smrg      ;;
73659f00f3a1Smrg
73669f00f3a1Smrg      tandem*)
73679f00f3a1Smrg        case $cc_basename in
73689f00f3a1Smrg          NCC*)
73699f00f3a1Smrg	    # NonStop-UX NCC 3.20
73709f00f3a1Smrg	    # FIXME: insert proper C++ library support
73719f00f3a1Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
73729f00f3a1Smrg	    ;;
73739f00f3a1Smrg          *)
73749f00f3a1Smrg	    # FIXME: insert proper C++ library support
73759f00f3a1Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
73769f00f3a1Smrg	    ;;
73779f00f3a1Smrg        esac
73789f00f3a1Smrg        ;;
73799f00f3a1Smrg
73809f00f3a1Smrg      vxworks*)
73819f00f3a1Smrg        # FIXME: insert proper C++ library support
73829f00f3a1Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
73839f00f3a1Smrg        ;;
73849f00f3a1Smrg
73859f00f3a1Smrg      *)
73869f00f3a1Smrg        # FIXME: insert proper C++ library support
73879f00f3a1Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
73889f00f3a1Smrg        ;;
73899f00f3a1Smrg    esac
73909f00f3a1Smrg
73919f00f3a1Smrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7392edce3322Smrg    test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
73939f00f3a1Smrg
7394edce3322Smrg    _LT_TAGVAR(GCC, $1)=$GXX
7395edce3322Smrg    _LT_TAGVAR(LD, $1)=$LD
73969f00f3a1Smrg
73979f00f3a1Smrg    ## CAVEAT EMPTOR:
73989f00f3a1Smrg    ## There is no encapsulation within the following macros, do not change
73999f00f3a1Smrg    ## the running order or otherwise move them around unless you know exactly
74009f00f3a1Smrg    ## what you are doing...
74019f00f3a1Smrg    _LT_SYS_HIDDEN_LIBDEPS($1)
74029f00f3a1Smrg    _LT_COMPILER_PIC($1)
74039f00f3a1Smrg    _LT_COMPILER_C_O($1)
74049f00f3a1Smrg    _LT_COMPILER_FILE_LOCKS($1)
74059f00f3a1Smrg    _LT_LINKER_SHLIBS($1)
74069f00f3a1Smrg    _LT_SYS_DYNAMIC_LINKER($1)
74079f00f3a1Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
74089f00f3a1Smrg
74099f00f3a1Smrg    _LT_CONFIG($1)
74109f00f3a1Smrg  fi # test -n "$compiler"
74119f00f3a1Smrg
74129f00f3a1Smrg  CC=$lt_save_CC
74139f00f3a1Smrg  CFLAGS=$lt_save_CFLAGS
74149f00f3a1Smrg  LDCXX=$LD
74159f00f3a1Smrg  LD=$lt_save_LD
74169f00f3a1Smrg  GCC=$lt_save_GCC
74179f00f3a1Smrg  with_gnu_ld=$lt_save_with_gnu_ld
74189f00f3a1Smrg  lt_cv_path_LDCXX=$lt_cv_path_LD
74199f00f3a1Smrg  lt_cv_path_LD=$lt_save_path_LD
74209f00f3a1Smrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
74219f00f3a1Smrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7422edce3322Smrgfi # test yes != "$_lt_caught_CXX_error"
74239f00f3a1Smrg
74249f00f3a1SmrgAC_LANG_POP
74259f00f3a1Smrg])# _LT_LANG_CXX_CONFIG
74269f00f3a1Smrg
74279f00f3a1Smrg
74289f00f3a1Smrg# _LT_FUNC_STRIPNAME_CNF
74299f00f3a1Smrg# ----------------------
74309f00f3a1Smrg# func_stripname_cnf prefix suffix name
74319f00f3a1Smrg# strip PREFIX and SUFFIX off of NAME.
74329f00f3a1Smrg# PREFIX and SUFFIX must not contain globbing or regex special
74339f00f3a1Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading
74349f00f3a1Smrg# dot (in which case that matches only a dot).
74359f00f3a1Smrg#
74369f00f3a1Smrg# This function is identical to the (non-XSI) version of func_stripname,
74379f00f3a1Smrg# except this one can be used by m4 code that may be executed by configure,
74389f00f3a1Smrg# rather than the libtool script.
74399f00f3a1Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
74409f00f3a1SmrgAC_REQUIRE([_LT_DECL_SED])
74419f00f3a1SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
74429f00f3a1Smrgfunc_stripname_cnf ()
74439f00f3a1Smrg{
7444edce3322Smrg  case @S|@2 in
7445edce3322Smrg  .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
7446edce3322Smrg  *)  func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
74479f00f3a1Smrg  esac
74489f00f3a1Smrg} # func_stripname_cnf
74499f00f3a1Smrg])# _LT_FUNC_STRIPNAME_CNF
74509f00f3a1Smrg
7451edce3322Smrg
74529f00f3a1Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
74539f00f3a1Smrg# ---------------------------------
74549f00f3a1Smrg# Figure out "hidden" library dependencies from verbose
74559f00f3a1Smrg# compiler output when linking a shared library.
74569f00f3a1Smrg# Parse the compiler output and extract the necessary
74579f00f3a1Smrg# objects, libraries and library flags.
74589f00f3a1Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
74599f00f3a1Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
74609f00f3a1SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
74619f00f3a1Smrg# Dependencies to place before and after the object being linked:
74629f00f3a1Smrg_LT_TAGVAR(predep_objects, $1)=
74639f00f3a1Smrg_LT_TAGVAR(postdep_objects, $1)=
74649f00f3a1Smrg_LT_TAGVAR(predeps, $1)=
74659f00f3a1Smrg_LT_TAGVAR(postdeps, $1)=
74669f00f3a1Smrg_LT_TAGVAR(compiler_lib_search_path, $1)=
74679f00f3a1Smrg
74689f00f3a1Smrgdnl we can't use the lt_simple_compile_test_code here,
74699f00f3a1Smrgdnl because it contains code intended for an executable,
74709f00f3a1Smrgdnl not a library.  It's possible we should let each
74719f00f3a1Smrgdnl tag define a new lt_????_link_test_code variable,
74729f00f3a1Smrgdnl but it's only used here...
74739f00f3a1Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
74749f00f3a1Smrgint a;
74759f00f3a1Smrgvoid foo (void) { a = 0; }
74769f00f3a1Smrg_LT_EOF
74779f00f3a1Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
74789f00f3a1Smrgclass Foo
74799f00f3a1Smrg{
74809f00f3a1Smrgpublic:
74819f00f3a1Smrg  Foo (void) { a = 0; }
74829f00f3a1Smrgprivate:
74839f00f3a1Smrg  int a;
74849f00f3a1Smrg};
74859f00f3a1Smrg_LT_EOF
74869f00f3a1Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
74879f00f3a1Smrg      subroutine foo
74889f00f3a1Smrg      implicit none
74899f00f3a1Smrg      integer*4 a
74909f00f3a1Smrg      a=0
74919f00f3a1Smrg      return
74929f00f3a1Smrg      end
74939f00f3a1Smrg_LT_EOF
74949f00f3a1Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
74959f00f3a1Smrg      subroutine foo
74969f00f3a1Smrg      implicit none
74979f00f3a1Smrg      integer a
74989f00f3a1Smrg      a=0
74999f00f3a1Smrg      return
75009f00f3a1Smrg      end
75019f00f3a1Smrg_LT_EOF
75029f00f3a1Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
75039f00f3a1Smrgpublic class foo {
75049f00f3a1Smrg  private int a;
75059f00f3a1Smrg  public void bar (void) {
75069f00f3a1Smrg    a = 0;
75079f00f3a1Smrg  }
75089f00f3a1Smrg};
75099f00f3a1Smrg_LT_EOF
75109f00f3a1Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
75119f00f3a1Smrgpackage foo
75129f00f3a1Smrgfunc foo() {
75139f00f3a1Smrg}
75149f00f3a1Smrg_LT_EOF
75159f00f3a1Smrg])
75169f00f3a1Smrg
75179f00f3a1Smrg_lt_libdeps_save_CFLAGS=$CFLAGS
75189f00f3a1Smrgcase "$CC $CFLAGS " in #(
75199f00f3a1Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
75209f00f3a1Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
75219f00f3a1Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
75229f00f3a1Smrgesac
75239f00f3a1Smrg
75249f00f3a1Smrgdnl Parse the compiler output and extract the necessary
75259f00f3a1Smrgdnl objects, libraries and library flags.
75269f00f3a1Smrgif AC_TRY_EVAL(ac_compile); then
75279f00f3a1Smrg  # Parse the compiler output and extract the necessary
75289f00f3a1Smrg  # objects, libraries and library flags.
75299f00f3a1Smrg
75309f00f3a1Smrg  # Sentinel used to keep track of whether or not we are before
75319f00f3a1Smrg  # the conftest object file.
75329f00f3a1Smrg  pre_test_object_deps_done=no
75339f00f3a1Smrg
75349f00f3a1Smrg  for p in `eval "$output_verbose_link_cmd"`; do
7535edce3322Smrg    case $prev$p in
75369f00f3a1Smrg
75379f00f3a1Smrg    -L* | -R* | -l*)
75389f00f3a1Smrg       # Some compilers place space between "-{L,R}" and the path.
75399f00f3a1Smrg       # Remove the space.
7540edce3322Smrg       if test x-L = "$p" ||
7541edce3322Smrg          test x-R = "$p"; then
75429f00f3a1Smrg	 prev=$p
75439f00f3a1Smrg	 continue
75449f00f3a1Smrg       fi
75459f00f3a1Smrg
75469f00f3a1Smrg       # Expand the sysroot to ease extracting the directories later.
75479f00f3a1Smrg       if test -z "$prev"; then
75489f00f3a1Smrg         case $p in
75499f00f3a1Smrg         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
75509f00f3a1Smrg         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
75519f00f3a1Smrg         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
75529f00f3a1Smrg         esac
75539f00f3a1Smrg       fi
75549f00f3a1Smrg       case $p in
75559f00f3a1Smrg       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
75569f00f3a1Smrg       esac
7557edce3322Smrg       if test no = "$pre_test_object_deps_done"; then
7558edce3322Smrg	 case $prev in
75599f00f3a1Smrg	 -L | -R)
75609f00f3a1Smrg	   # Internal compiler library paths should come after those
75619f00f3a1Smrg	   # provided the user.  The postdeps already come after the
75629f00f3a1Smrg	   # user supplied libs so there is no need to process them.
75639f00f3a1Smrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7564edce3322Smrg	     _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
75659f00f3a1Smrg	   else
7566edce3322Smrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
75679f00f3a1Smrg	   fi
75689f00f3a1Smrg	   ;;
75699f00f3a1Smrg	 # The "-l" case would never come before the object being
75709f00f3a1Smrg	 # linked, so don't bother handling this case.
75719f00f3a1Smrg	 esac
75729f00f3a1Smrg       else
75739f00f3a1Smrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7574edce3322Smrg	   _LT_TAGVAR(postdeps, $1)=$prev$p
75759f00f3a1Smrg	 else
7576edce3322Smrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
75779f00f3a1Smrg	 fi
75789f00f3a1Smrg       fi
75799f00f3a1Smrg       prev=
75809f00f3a1Smrg       ;;
75819f00f3a1Smrg
75829f00f3a1Smrg    *.lto.$objext) ;; # Ignore GCC LTO objects
75839f00f3a1Smrg    *.$objext)
75849f00f3a1Smrg       # This assumes that the test object file only shows up
75859f00f3a1Smrg       # once in the compiler output.
75869f00f3a1Smrg       if test "$p" = "conftest.$objext"; then
75879f00f3a1Smrg	 pre_test_object_deps_done=yes
75889f00f3a1Smrg	 continue
75899f00f3a1Smrg       fi
75909f00f3a1Smrg
7591edce3322Smrg       if test no = "$pre_test_object_deps_done"; then
75929f00f3a1Smrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7593edce3322Smrg	   _LT_TAGVAR(predep_objects, $1)=$p
75949f00f3a1Smrg	 else
75959f00f3a1Smrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
75969f00f3a1Smrg	 fi
75979f00f3a1Smrg       else
75989f00f3a1Smrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7599edce3322Smrg	   _LT_TAGVAR(postdep_objects, $1)=$p
76009f00f3a1Smrg	 else
76019f00f3a1Smrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
76029f00f3a1Smrg	 fi
76039f00f3a1Smrg       fi
76049f00f3a1Smrg       ;;
76059f00f3a1Smrg
76069f00f3a1Smrg    *) ;; # Ignore the rest.
76079f00f3a1Smrg
76089f00f3a1Smrg    esac
76099f00f3a1Smrg  done
76109f00f3a1Smrg
76119f00f3a1Smrg  # Clean up.
76129f00f3a1Smrg  rm -f a.out a.exe
76139f00f3a1Smrgelse
76149f00f3a1Smrg  echo "libtool.m4: error: problem compiling $1 test program"
76159f00f3a1Smrgfi
76169f00f3a1Smrg
76179f00f3a1Smrg$RM -f confest.$objext
76189f00f3a1SmrgCFLAGS=$_lt_libdeps_save_CFLAGS
76199f00f3a1Smrg
76209f00f3a1Smrg# PORTME: override above test on systems where it is broken
76219f00f3a1Smrgm4_if([$1], [CXX],
76229f00f3a1Smrg[case $host_os in
76239f00f3a1Smrginterix[[3-9]]*)
76249f00f3a1Smrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
76259f00f3a1Smrg  # hack all around it, let's just trust "g++" to DTRT.
76269f00f3a1Smrg  _LT_TAGVAR(predep_objects,$1)=
76279f00f3a1Smrg  _LT_TAGVAR(postdep_objects,$1)=
76289f00f3a1Smrg  _LT_TAGVAR(postdeps,$1)=
76299f00f3a1Smrg  ;;
76309f00f3a1Smrgesac
76319f00f3a1Smrg])
76329f00f3a1Smrg
76339f00f3a1Smrgcase " $_LT_TAGVAR(postdeps, $1) " in
76349f00f3a1Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
76359f00f3a1Smrgesac
76369f00f3a1Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
76379f00f3a1Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7638edce3322Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
76399f00f3a1Smrgfi
76409f00f3a1Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
76419f00f3a1Smrg    [The directories searched by this compiler when creating a shared library])
76429f00f3a1Smrg_LT_TAGDECL([], [predep_objects], [1],
76439f00f3a1Smrg    [Dependencies to place before and after the objects being linked to
76449f00f3a1Smrg    create a shared library])
76459f00f3a1Smrg_LT_TAGDECL([], [postdep_objects], [1])
76469f00f3a1Smrg_LT_TAGDECL([], [predeps], [1])
76479f00f3a1Smrg_LT_TAGDECL([], [postdeps], [1])
76489f00f3a1Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
76499f00f3a1Smrg    [The library search path used internally by the compiler when linking
76509f00f3a1Smrg    a shared library])
76519f00f3a1Smrg])# _LT_SYS_HIDDEN_LIBDEPS
76529f00f3a1Smrg
76539f00f3a1Smrg
76549f00f3a1Smrg# _LT_LANG_F77_CONFIG([TAG])
76559f00f3a1Smrg# --------------------------
76569f00f3a1Smrg# Ensure that the configuration variables for a Fortran 77 compiler are
76579f00f3a1Smrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
7658edce3322Smrg# to write the compiler configuration to 'libtool'.
76599f00f3a1Smrgm4_defun([_LT_LANG_F77_CONFIG],
76609f00f3a1Smrg[AC_LANG_PUSH(Fortran 77)
7661edce3322Smrgif test -z "$F77" || test no = "$F77"; then
76629f00f3a1Smrg  _lt_disable_F77=yes
76639f00f3a1Smrgfi
76649f00f3a1Smrg
76659f00f3a1Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
76669f00f3a1Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
76679f00f3a1Smrg_LT_TAGVAR(always_export_symbols, $1)=no
76689f00f3a1Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
76699f00f3a1Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
76709f00f3a1Smrg_LT_TAGVAR(hardcode_direct, $1)=no
76719f00f3a1Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
76729f00f3a1Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
76739f00f3a1Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
76749f00f3a1Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
76759f00f3a1Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
76769f00f3a1Smrg_LT_TAGVAR(inherit_rpath, $1)=no
76779f00f3a1Smrg_LT_TAGVAR(module_cmds, $1)=
76789f00f3a1Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
76799f00f3a1Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
76809f00f3a1Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
76819f00f3a1Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
76829f00f3a1Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
76839f00f3a1Smrg_LT_TAGVAR(no_undefined_flag, $1)=
76849f00f3a1Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
76859f00f3a1Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
76869f00f3a1Smrg
76879f00f3a1Smrg# Source file extension for f77 test sources.
76889f00f3a1Smrgac_ext=f
76899f00f3a1Smrg
76909f00f3a1Smrg# Object file extension for compiled f77 test sources.
76919f00f3a1Smrgobjext=o
76929f00f3a1Smrg_LT_TAGVAR(objext, $1)=$objext
76939f00f3a1Smrg
76949f00f3a1Smrg# No sense in running all these tests if we already determined that
76959f00f3a1Smrg# the F77 compiler isn't working.  Some variables (like enable_shared)
76969f00f3a1Smrg# are currently assumed to apply to all compilers on this platform,
76979f00f3a1Smrg# and will be corrupted by setting them based on a non-working compiler.
7698edce3322Smrgif test yes != "$_lt_disable_F77"; then
76999f00f3a1Smrg  # Code to be used in simple compile tests
77009f00f3a1Smrg  lt_simple_compile_test_code="\
77019f00f3a1Smrg      subroutine t
77029f00f3a1Smrg      return
77039f00f3a1Smrg      end
77049f00f3a1Smrg"
77059f00f3a1Smrg
77069f00f3a1Smrg  # Code to be used in simple link tests
77079f00f3a1Smrg  lt_simple_link_test_code="\
77089f00f3a1Smrg      program t
77099f00f3a1Smrg      end
77109f00f3a1Smrg"
77119f00f3a1Smrg
77129f00f3a1Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
77139f00f3a1Smrg  _LT_TAG_COMPILER
77149f00f3a1Smrg
77159f00f3a1Smrg  # save warnings/boilerplate of simple test code
77169f00f3a1Smrg  _LT_COMPILER_BOILERPLATE
77179f00f3a1Smrg  _LT_LINKER_BOILERPLATE
77189f00f3a1Smrg
77199f00f3a1Smrg  # Allow CC to be a program name with arguments.
7720edce3322Smrg  lt_save_CC=$CC
77219f00f3a1Smrg  lt_save_GCC=$GCC
77229f00f3a1Smrg  lt_save_CFLAGS=$CFLAGS
77239f00f3a1Smrg  CC=${F77-"f77"}
77249f00f3a1Smrg  CFLAGS=$FFLAGS
77259f00f3a1Smrg  compiler=$CC
77269f00f3a1Smrg  _LT_TAGVAR(compiler, $1)=$CC
77279f00f3a1Smrg  _LT_CC_BASENAME([$compiler])
77289f00f3a1Smrg  GCC=$G77
77299f00f3a1Smrg  if test -n "$compiler"; then
77309f00f3a1Smrg    AC_MSG_CHECKING([if libtool supports shared libraries])
77319f00f3a1Smrg    AC_MSG_RESULT([$can_build_shared])
77329f00f3a1Smrg
77339f00f3a1Smrg    AC_MSG_CHECKING([whether to build shared libraries])
7734edce3322Smrg    test no = "$can_build_shared" && enable_shared=no
77359f00f3a1Smrg
77369f00f3a1Smrg    # On AIX, shared libraries and static libraries use the same namespace, and
77379f00f3a1Smrg    # are all built from PIC.
77389f00f3a1Smrg    case $host_os in
77399f00f3a1Smrg      aix3*)
7740edce3322Smrg        test yes = "$enable_shared" && enable_static=no
77419f00f3a1Smrg        if test -n "$RANLIB"; then
77429f00f3a1Smrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
77439f00f3a1Smrg          postinstall_cmds='$RANLIB $lib'
77449f00f3a1Smrg        fi
77459f00f3a1Smrg        ;;
77469f00f3a1Smrg      aix[[4-9]]*)
7747edce3322Smrg	if test ia64 != "$host_cpu"; then
7748edce3322Smrg	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7749edce3322Smrg	  yes,aix,yes) ;;		# shared object as lib.so file only
7750edce3322Smrg	  yes,svr4,*) ;;		# shared object as lib.so archive member only
7751edce3322Smrg	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
7752edce3322Smrg	  esac
77539f00f3a1Smrg	fi
77549f00f3a1Smrg        ;;
77559f00f3a1Smrg    esac
77569f00f3a1Smrg    AC_MSG_RESULT([$enable_shared])
77579f00f3a1Smrg
77589f00f3a1Smrg    AC_MSG_CHECKING([whether to build static libraries])
77599f00f3a1Smrg    # Make sure either enable_shared or enable_static is yes.
7760edce3322Smrg    test yes = "$enable_shared" || enable_static=yes
77619f00f3a1Smrg    AC_MSG_RESULT([$enable_static])
77629f00f3a1Smrg
7763edce3322Smrg    _LT_TAGVAR(GCC, $1)=$G77
7764edce3322Smrg    _LT_TAGVAR(LD, $1)=$LD
77659f00f3a1Smrg
77669f00f3a1Smrg    ## CAVEAT EMPTOR:
77679f00f3a1Smrg    ## There is no encapsulation within the following macros, do not change
77689f00f3a1Smrg    ## the running order or otherwise move them around unless you know exactly
77699f00f3a1Smrg    ## what you are doing...
77709f00f3a1Smrg    _LT_COMPILER_PIC($1)
77719f00f3a1Smrg    _LT_COMPILER_C_O($1)
77729f00f3a1Smrg    _LT_COMPILER_FILE_LOCKS($1)
77739f00f3a1Smrg    _LT_LINKER_SHLIBS($1)
77749f00f3a1Smrg    _LT_SYS_DYNAMIC_LINKER($1)
77759f00f3a1Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
77769f00f3a1Smrg
77779f00f3a1Smrg    _LT_CONFIG($1)
77789f00f3a1Smrg  fi # test -n "$compiler"
77799f00f3a1Smrg
77809f00f3a1Smrg  GCC=$lt_save_GCC
7781edce3322Smrg  CC=$lt_save_CC
7782edce3322Smrg  CFLAGS=$lt_save_CFLAGS
7783edce3322Smrgfi # test yes != "$_lt_disable_F77"
77849f00f3a1Smrg
77859f00f3a1SmrgAC_LANG_POP
77869f00f3a1Smrg])# _LT_LANG_F77_CONFIG
77879f00f3a1Smrg
77889f00f3a1Smrg
77899f00f3a1Smrg# _LT_LANG_FC_CONFIG([TAG])
77909f00f3a1Smrg# -------------------------
77919f00f3a1Smrg# Ensure that the configuration variables for a Fortran compiler are
77929f00f3a1Smrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
7793edce3322Smrg# to write the compiler configuration to 'libtool'.
77949f00f3a1Smrgm4_defun([_LT_LANG_FC_CONFIG],
77959f00f3a1Smrg[AC_LANG_PUSH(Fortran)
77969f00f3a1Smrg
7797edce3322Smrgif test -z "$FC" || test no = "$FC"; then
77989f00f3a1Smrg  _lt_disable_FC=yes
77999f00f3a1Smrgfi
78009f00f3a1Smrg
78019f00f3a1Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
78029f00f3a1Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
78039f00f3a1Smrg_LT_TAGVAR(always_export_symbols, $1)=no
78049f00f3a1Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
78059f00f3a1Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
78069f00f3a1Smrg_LT_TAGVAR(hardcode_direct, $1)=no
78079f00f3a1Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
78089f00f3a1Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
78099f00f3a1Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
78109f00f3a1Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
78119f00f3a1Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
78129f00f3a1Smrg_LT_TAGVAR(inherit_rpath, $1)=no
78139f00f3a1Smrg_LT_TAGVAR(module_cmds, $1)=
78149f00f3a1Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
78159f00f3a1Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
78169f00f3a1Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
78179f00f3a1Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
78189f00f3a1Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
78199f00f3a1Smrg_LT_TAGVAR(no_undefined_flag, $1)=
78209f00f3a1Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
78219f00f3a1Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
78229f00f3a1Smrg
78239f00f3a1Smrg# Source file extension for fc test sources.
78249f00f3a1Smrgac_ext=${ac_fc_srcext-f}
78259f00f3a1Smrg
78269f00f3a1Smrg# Object file extension for compiled fc test sources.
78279f00f3a1Smrgobjext=o
78289f00f3a1Smrg_LT_TAGVAR(objext, $1)=$objext
78299f00f3a1Smrg
78309f00f3a1Smrg# No sense in running all these tests if we already determined that
78319f00f3a1Smrg# the FC compiler isn't working.  Some variables (like enable_shared)
78329f00f3a1Smrg# are currently assumed to apply to all compilers on this platform,
78339f00f3a1Smrg# and will be corrupted by setting them based on a non-working compiler.
7834edce3322Smrgif test yes != "$_lt_disable_FC"; then
78359f00f3a1Smrg  # Code to be used in simple compile tests
78369f00f3a1Smrg  lt_simple_compile_test_code="\
78379f00f3a1Smrg      subroutine t
78389f00f3a1Smrg      return
78399f00f3a1Smrg      end
78409f00f3a1Smrg"
78419f00f3a1Smrg
78429f00f3a1Smrg  # Code to be used in simple link tests
78439f00f3a1Smrg  lt_simple_link_test_code="\
78449f00f3a1Smrg      program t
78459f00f3a1Smrg      end
78469f00f3a1Smrg"
78479f00f3a1Smrg
78489f00f3a1Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
78499f00f3a1Smrg  _LT_TAG_COMPILER
78509f00f3a1Smrg
78519f00f3a1Smrg  # save warnings/boilerplate of simple test code
78529f00f3a1Smrg  _LT_COMPILER_BOILERPLATE
78539f00f3a1Smrg  _LT_LINKER_BOILERPLATE
78549f00f3a1Smrg
78559f00f3a1Smrg  # Allow CC to be a program name with arguments.
7856edce3322Smrg  lt_save_CC=$CC
78579f00f3a1Smrg  lt_save_GCC=$GCC
78589f00f3a1Smrg  lt_save_CFLAGS=$CFLAGS
78599f00f3a1Smrg  CC=${FC-"f95"}
78609f00f3a1Smrg  CFLAGS=$FCFLAGS
78619f00f3a1Smrg  compiler=$CC
78629f00f3a1Smrg  GCC=$ac_cv_fc_compiler_gnu
78639f00f3a1Smrg
78649f00f3a1Smrg  _LT_TAGVAR(compiler, $1)=$CC
78659f00f3a1Smrg  _LT_CC_BASENAME([$compiler])
78669f00f3a1Smrg
78679f00f3a1Smrg  if test -n "$compiler"; then
78689f00f3a1Smrg    AC_MSG_CHECKING([if libtool supports shared libraries])
78699f00f3a1Smrg    AC_MSG_RESULT([$can_build_shared])
78709f00f3a1Smrg
78719f00f3a1Smrg    AC_MSG_CHECKING([whether to build shared libraries])
7872edce3322Smrg    test no = "$can_build_shared" && enable_shared=no
78739f00f3a1Smrg
78749f00f3a1Smrg    # On AIX, shared libraries and static libraries use the same namespace, and
78759f00f3a1Smrg    # are all built from PIC.
78769f00f3a1Smrg    case $host_os in
78779f00f3a1Smrg      aix3*)
7878edce3322Smrg        test yes = "$enable_shared" && enable_static=no
78799f00f3a1Smrg        if test -n "$RANLIB"; then
78809f00f3a1Smrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
78819f00f3a1Smrg          postinstall_cmds='$RANLIB $lib'
78829f00f3a1Smrg        fi
78839f00f3a1Smrg        ;;
78849f00f3a1Smrg      aix[[4-9]]*)
7885edce3322Smrg	if test ia64 != "$host_cpu"; then
7886edce3322Smrg	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7887edce3322Smrg	  yes,aix,yes) ;;		# shared object as lib.so file only
7888edce3322Smrg	  yes,svr4,*) ;;		# shared object as lib.so archive member only
7889edce3322Smrg	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
7890edce3322Smrg	  esac
78919f00f3a1Smrg	fi
78929f00f3a1Smrg        ;;
78939f00f3a1Smrg    esac
78949f00f3a1Smrg    AC_MSG_RESULT([$enable_shared])
78959f00f3a1Smrg
78969f00f3a1Smrg    AC_MSG_CHECKING([whether to build static libraries])
78979f00f3a1Smrg    # Make sure either enable_shared or enable_static is yes.
7898edce3322Smrg    test yes = "$enable_shared" || enable_static=yes
78999f00f3a1Smrg    AC_MSG_RESULT([$enable_static])
79009f00f3a1Smrg
7901edce3322Smrg    _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
7902edce3322Smrg    _LT_TAGVAR(LD, $1)=$LD
79039f00f3a1Smrg
79049f00f3a1Smrg    ## CAVEAT EMPTOR:
79059f00f3a1Smrg    ## There is no encapsulation within the following macros, do not change
79069f00f3a1Smrg    ## the running order or otherwise move them around unless you know exactly
79079f00f3a1Smrg    ## what you are doing...
79089f00f3a1Smrg    _LT_SYS_HIDDEN_LIBDEPS($1)
79099f00f3a1Smrg    _LT_COMPILER_PIC($1)
79109f00f3a1Smrg    _LT_COMPILER_C_O($1)
79119f00f3a1Smrg    _LT_COMPILER_FILE_LOCKS($1)
79129f00f3a1Smrg    _LT_LINKER_SHLIBS($1)
79139f00f3a1Smrg    _LT_SYS_DYNAMIC_LINKER($1)
79149f00f3a1Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
79159f00f3a1Smrg
79169f00f3a1Smrg    _LT_CONFIG($1)
79179f00f3a1Smrg  fi # test -n "$compiler"
79189f00f3a1Smrg
79199f00f3a1Smrg  GCC=$lt_save_GCC
79209f00f3a1Smrg  CC=$lt_save_CC
79219f00f3a1Smrg  CFLAGS=$lt_save_CFLAGS
7922edce3322Smrgfi # test yes != "$_lt_disable_FC"
79239f00f3a1Smrg
79249f00f3a1SmrgAC_LANG_POP
79259f00f3a1Smrg])# _LT_LANG_FC_CONFIG
79269f00f3a1Smrg
79279f00f3a1Smrg
79289f00f3a1Smrg# _LT_LANG_GCJ_CONFIG([TAG])
79299f00f3a1Smrg# --------------------------
79309f00f3a1Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler
79319f00f3a1Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
7932edce3322Smrg# to write the compiler configuration to 'libtool'.
79339f00f3a1Smrgm4_defun([_LT_LANG_GCJ_CONFIG],
79349f00f3a1Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl
79359f00f3a1SmrgAC_LANG_SAVE
79369f00f3a1Smrg
79379f00f3a1Smrg# Source file extension for Java test sources.
79389f00f3a1Smrgac_ext=java
79399f00f3a1Smrg
79409f00f3a1Smrg# Object file extension for compiled Java test sources.
79419f00f3a1Smrgobjext=o
79429f00f3a1Smrg_LT_TAGVAR(objext, $1)=$objext
79439f00f3a1Smrg
79449f00f3a1Smrg# Code to be used in simple compile tests
79459f00f3a1Smrglt_simple_compile_test_code="class foo {}"
79469f00f3a1Smrg
79479f00f3a1Smrg# Code to be used in simple link tests
79489f00f3a1Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
79499f00f3a1Smrg
79509f00f3a1Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
79519f00f3a1Smrg_LT_TAG_COMPILER
79529f00f3a1Smrg
79539f00f3a1Smrg# save warnings/boilerplate of simple test code
79549f00f3a1Smrg_LT_COMPILER_BOILERPLATE
79559f00f3a1Smrg_LT_LINKER_BOILERPLATE
79569f00f3a1Smrg
79579f00f3a1Smrg# Allow CC to be a program name with arguments.
79589f00f3a1Smrglt_save_CC=$CC
79599f00f3a1Smrglt_save_CFLAGS=$CFLAGS
79609f00f3a1Smrglt_save_GCC=$GCC
79619f00f3a1SmrgGCC=yes
79629f00f3a1SmrgCC=${GCJ-"gcj"}
79639f00f3a1SmrgCFLAGS=$GCJFLAGS
79649f00f3a1Smrgcompiler=$CC
79659f00f3a1Smrg_LT_TAGVAR(compiler, $1)=$CC
7966edce3322Smrg_LT_TAGVAR(LD, $1)=$LD
79679f00f3a1Smrg_LT_CC_BASENAME([$compiler])
79689f00f3a1Smrg
79699f00f3a1Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
79709f00f3a1Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
79719f00f3a1Smrg
79729f00f3a1Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
79739f00f3a1Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
79749f00f3a1Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
79759f00f3a1Smrg
79769f00f3a1Smrg## CAVEAT EMPTOR:
79779f00f3a1Smrg## There is no encapsulation within the following macros, do not change
79789f00f3a1Smrg## the running order or otherwise move them around unless you know exactly
79799f00f3a1Smrg## what you are doing...
79809f00f3a1Smrgif test -n "$compiler"; then
79819f00f3a1Smrg  _LT_COMPILER_NO_RTTI($1)
79829f00f3a1Smrg  _LT_COMPILER_PIC($1)
79839f00f3a1Smrg  _LT_COMPILER_C_O($1)
79849f00f3a1Smrg  _LT_COMPILER_FILE_LOCKS($1)
79859f00f3a1Smrg  _LT_LINKER_SHLIBS($1)
79869f00f3a1Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
79879f00f3a1Smrg
79889f00f3a1Smrg  _LT_CONFIG($1)
79899f00f3a1Smrgfi
79909f00f3a1Smrg
79919f00f3a1SmrgAC_LANG_RESTORE
79929f00f3a1Smrg
79939f00f3a1SmrgGCC=$lt_save_GCC
79949f00f3a1SmrgCC=$lt_save_CC
79959f00f3a1SmrgCFLAGS=$lt_save_CFLAGS
79969f00f3a1Smrg])# _LT_LANG_GCJ_CONFIG
79979f00f3a1Smrg
79989f00f3a1Smrg
79999f00f3a1Smrg# _LT_LANG_GO_CONFIG([TAG])
80009f00f3a1Smrg# --------------------------
80019f00f3a1Smrg# Ensure that the configuration variables for the GNU Go compiler
80029f00f3a1Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8003edce3322Smrg# to write the compiler configuration to 'libtool'.
80049f00f3a1Smrgm4_defun([_LT_LANG_GO_CONFIG],
80059f00f3a1Smrg[AC_REQUIRE([LT_PROG_GO])dnl
80069f00f3a1SmrgAC_LANG_SAVE
80079f00f3a1Smrg
80089f00f3a1Smrg# Source file extension for Go test sources.
80099f00f3a1Smrgac_ext=go
80109f00f3a1Smrg
80119f00f3a1Smrg# Object file extension for compiled Go test sources.
80129f00f3a1Smrgobjext=o
80139f00f3a1Smrg_LT_TAGVAR(objext, $1)=$objext
80149f00f3a1Smrg
80159f00f3a1Smrg# Code to be used in simple compile tests
80169f00f3a1Smrglt_simple_compile_test_code="package main; func main() { }"
80179f00f3a1Smrg
80189f00f3a1Smrg# Code to be used in simple link tests
80199f00f3a1Smrglt_simple_link_test_code='package main; func main() { }'
80209f00f3a1Smrg
80219f00f3a1Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
80229f00f3a1Smrg_LT_TAG_COMPILER
80239f00f3a1Smrg
80249f00f3a1Smrg# save warnings/boilerplate of simple test code
80259f00f3a1Smrg_LT_COMPILER_BOILERPLATE
80269f00f3a1Smrg_LT_LINKER_BOILERPLATE
80279f00f3a1Smrg
80289f00f3a1Smrg# Allow CC to be a program name with arguments.
80299f00f3a1Smrglt_save_CC=$CC
80309f00f3a1Smrglt_save_CFLAGS=$CFLAGS
80319f00f3a1Smrglt_save_GCC=$GCC
80329f00f3a1SmrgGCC=yes
80339f00f3a1SmrgCC=${GOC-"gccgo"}
80349f00f3a1SmrgCFLAGS=$GOFLAGS
80359f00f3a1Smrgcompiler=$CC
80369f00f3a1Smrg_LT_TAGVAR(compiler, $1)=$CC
8037edce3322Smrg_LT_TAGVAR(LD, $1)=$LD
80389f00f3a1Smrg_LT_CC_BASENAME([$compiler])
80399f00f3a1Smrg
80409f00f3a1Smrg# Go did not exist at the time GCC didn't implicitly link libc in.
80419f00f3a1Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
80429f00f3a1Smrg
80439f00f3a1Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
80449f00f3a1Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
80459f00f3a1Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
80469f00f3a1Smrg
80479f00f3a1Smrg## CAVEAT EMPTOR:
80489f00f3a1Smrg## There is no encapsulation within the following macros, do not change
80499f00f3a1Smrg## the running order or otherwise move them around unless you know exactly
80509f00f3a1Smrg## what you are doing...
80519f00f3a1Smrgif test -n "$compiler"; then
80529f00f3a1Smrg  _LT_COMPILER_NO_RTTI($1)
80539f00f3a1Smrg  _LT_COMPILER_PIC($1)
80549f00f3a1Smrg  _LT_COMPILER_C_O($1)
80559f00f3a1Smrg  _LT_COMPILER_FILE_LOCKS($1)
80569f00f3a1Smrg  _LT_LINKER_SHLIBS($1)
80579f00f3a1Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
80589f00f3a1Smrg
80599f00f3a1Smrg  _LT_CONFIG($1)
80609f00f3a1Smrgfi
80619f00f3a1Smrg
80629f00f3a1SmrgAC_LANG_RESTORE
80639f00f3a1Smrg
80649f00f3a1SmrgGCC=$lt_save_GCC
80659f00f3a1SmrgCC=$lt_save_CC
80669f00f3a1SmrgCFLAGS=$lt_save_CFLAGS
80679f00f3a1Smrg])# _LT_LANG_GO_CONFIG
80689f00f3a1Smrg
80699f00f3a1Smrg
80709f00f3a1Smrg# _LT_LANG_RC_CONFIG([TAG])
80719f00f3a1Smrg# -------------------------
80729f00f3a1Smrg# Ensure that the configuration variables for the Windows resource compiler
80739f00f3a1Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8074edce3322Smrg# to write the compiler configuration to 'libtool'.
80759f00f3a1Smrgm4_defun([_LT_LANG_RC_CONFIG],
80769f00f3a1Smrg[AC_REQUIRE([LT_PROG_RC])dnl
80779f00f3a1SmrgAC_LANG_SAVE
80789f00f3a1Smrg
80799f00f3a1Smrg# Source file extension for RC test sources.
80809f00f3a1Smrgac_ext=rc
80819f00f3a1Smrg
80829f00f3a1Smrg# Object file extension for compiled RC test sources.
80839f00f3a1Smrgobjext=o
80849f00f3a1Smrg_LT_TAGVAR(objext, $1)=$objext
80859f00f3a1Smrg
80869f00f3a1Smrg# Code to be used in simple compile tests
80879f00f3a1Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
80889f00f3a1Smrg
80899f00f3a1Smrg# Code to be used in simple link tests
8090edce3322Smrglt_simple_link_test_code=$lt_simple_compile_test_code
80919f00f3a1Smrg
80929f00f3a1Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
80939f00f3a1Smrg_LT_TAG_COMPILER
80949f00f3a1Smrg
80959f00f3a1Smrg# save warnings/boilerplate of simple test code
80969f00f3a1Smrg_LT_COMPILER_BOILERPLATE
80979f00f3a1Smrg_LT_LINKER_BOILERPLATE
80989f00f3a1Smrg
80999f00f3a1Smrg# Allow CC to be a program name with arguments.
8100edce3322Smrglt_save_CC=$CC
81019f00f3a1Smrglt_save_CFLAGS=$CFLAGS
81029f00f3a1Smrglt_save_GCC=$GCC
81039f00f3a1SmrgGCC=
81049f00f3a1SmrgCC=${RC-"windres"}
81059f00f3a1SmrgCFLAGS=
81069f00f3a1Smrgcompiler=$CC
81079f00f3a1Smrg_LT_TAGVAR(compiler, $1)=$CC
81089f00f3a1Smrg_LT_CC_BASENAME([$compiler])
81099f00f3a1Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
81109f00f3a1Smrg
81119f00f3a1Smrgif test -n "$compiler"; then
81129f00f3a1Smrg  :
81139f00f3a1Smrg  _LT_CONFIG($1)
81149f00f3a1Smrgfi
81159f00f3a1Smrg
81169f00f3a1SmrgGCC=$lt_save_GCC
81179f00f3a1SmrgAC_LANG_RESTORE
81189f00f3a1SmrgCC=$lt_save_CC
81199f00f3a1SmrgCFLAGS=$lt_save_CFLAGS
81209f00f3a1Smrg])# _LT_LANG_RC_CONFIG
81219f00f3a1Smrg
81229f00f3a1Smrg
81239f00f3a1Smrg# LT_PROG_GCJ
81249f00f3a1Smrg# -----------
81259f00f3a1SmrgAC_DEFUN([LT_PROG_GCJ],
81269f00f3a1Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
81279f00f3a1Smrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
81289f00f3a1Smrg    [AC_CHECK_TOOL(GCJ, gcj,)
8129edce3322Smrg      test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
81309f00f3a1Smrg      AC_SUBST(GCJFLAGS)])])[]dnl
81319f00f3a1Smrg])
81329f00f3a1Smrg
81339f00f3a1Smrg# Old name:
81349f00f3a1SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
81359f00f3a1Smrgdnl aclocal-1.4 backwards compatibility:
81369f00f3a1Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
81379f00f3a1Smrg
81389f00f3a1Smrg
81399f00f3a1Smrg# LT_PROG_GO
81409f00f3a1Smrg# ----------
81419f00f3a1SmrgAC_DEFUN([LT_PROG_GO],
81429f00f3a1Smrg[AC_CHECK_TOOL(GOC, gccgo,)
81439f00f3a1Smrg])
81449f00f3a1Smrg
81459f00f3a1Smrg
81469f00f3a1Smrg# LT_PROG_RC
81479f00f3a1Smrg# ----------
81489f00f3a1SmrgAC_DEFUN([LT_PROG_RC],
81499f00f3a1Smrg[AC_CHECK_TOOL(RC, windres,)
81509f00f3a1Smrg])
81519f00f3a1Smrg
81529f00f3a1Smrg# Old name:
81539f00f3a1SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
81549f00f3a1Smrgdnl aclocal-1.4 backwards compatibility:
81559f00f3a1Smrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
81569f00f3a1Smrg
81579f00f3a1Smrg
81589f00f3a1Smrg# _LT_DECL_EGREP
81599f00f3a1Smrg# --------------
81609f00f3a1Smrg# If we don't have a new enough Autoconf to choose the best grep
81619f00f3a1Smrg# available, choose the one first in the user's PATH.
81629f00f3a1Smrgm4_defun([_LT_DECL_EGREP],
81639f00f3a1Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
81649f00f3a1SmrgAC_REQUIRE([AC_PROG_FGREP])dnl
81659f00f3a1Smrgtest -z "$GREP" && GREP=grep
81669f00f3a1Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
81679f00f3a1Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
81689f00f3a1Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
81699f00f3a1Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
81709f00f3a1SmrgAC_SUBST([GREP])
81719f00f3a1Smrg])
81729f00f3a1Smrg
81739f00f3a1Smrg
81749f00f3a1Smrg# _LT_DECL_OBJDUMP
81759f00f3a1Smrg# --------------
81769f00f3a1Smrg# If we don't have a new enough Autoconf to choose the best objdump
81779f00f3a1Smrg# available, choose the one first in the user's PATH.
81789f00f3a1Smrgm4_defun([_LT_DECL_OBJDUMP],
81799f00f3a1Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
81809f00f3a1Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
81819f00f3a1Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
81829f00f3a1SmrgAC_SUBST([OBJDUMP])
81839f00f3a1Smrg])
81849f00f3a1Smrg
81859f00f3a1Smrg# _LT_DECL_DLLTOOL
81869f00f3a1Smrg# ----------------
81879f00f3a1Smrg# Ensure DLLTOOL variable is set.
81889f00f3a1Smrgm4_defun([_LT_DECL_DLLTOOL],
81899f00f3a1Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
81909f00f3a1Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
81919f00f3a1Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
81929f00f3a1SmrgAC_SUBST([DLLTOOL])
81939f00f3a1Smrg])
81949f00f3a1Smrg
81959f00f3a1Smrg# _LT_DECL_SED
81969f00f3a1Smrg# ------------
81979f00f3a1Smrg# Check for a fully-functional sed program, that truncates
81989f00f3a1Smrg# as few characters as possible.  Prefer GNU sed if found.
81999f00f3a1Smrgm4_defun([_LT_DECL_SED],
82009f00f3a1Smrg[AC_PROG_SED
82019f00f3a1Smrgtest -z "$SED" && SED=sed
82029f00f3a1SmrgXsed="$SED -e 1s/^X//"
82039f00f3a1Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
82049f00f3a1Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
82059f00f3a1Smrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
82069f00f3a1Smrg])# _LT_DECL_SED
82079f00f3a1Smrg
82089f00f3a1Smrgm4_ifndef([AC_PROG_SED], [
82099f00f3a1Smrg############################################################
82109f00f3a1Smrg# NOTE: This macro has been submitted for inclusion into   #
82119f00f3a1Smrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
82129f00f3a1Smrg#  a released version of Autoconf we should remove this    #
82139f00f3a1Smrg#  macro and use it instead.                               #
82149f00f3a1Smrg############################################################
82159f00f3a1Smrg
82169f00f3a1Smrgm4_defun([AC_PROG_SED],
82179f00f3a1Smrg[AC_MSG_CHECKING([for a sed that does not truncate output])
82189f00f3a1SmrgAC_CACHE_VAL(lt_cv_path_SED,
82199f00f3a1Smrg[# Loop through the user's path and test for sed and gsed.
82209f00f3a1Smrg# Then use that list of sed's as ones to test for truncation.
82219f00f3a1Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
82229f00f3a1Smrgfor as_dir in $PATH
82239f00f3a1Smrgdo
82249f00f3a1Smrg  IFS=$as_save_IFS
82259f00f3a1Smrg  test -z "$as_dir" && as_dir=.
82269f00f3a1Smrg  for lt_ac_prog in sed gsed; do
82279f00f3a1Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
82289f00f3a1Smrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
82299f00f3a1Smrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
82309f00f3a1Smrg      fi
82319f00f3a1Smrg    done
82329f00f3a1Smrg  done
82339f00f3a1Smrgdone
82349f00f3a1SmrgIFS=$as_save_IFS
82359f00f3a1Smrglt_ac_max=0
82369f00f3a1Smrglt_ac_count=0
82379f00f3a1Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
82389f00f3a1Smrg# along with /bin/sed that truncates output.
82399f00f3a1Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8240edce3322Smrg  test ! -f "$lt_ac_sed" && continue
82419f00f3a1Smrg  cat /dev/null > conftest.in
82429f00f3a1Smrg  lt_ac_count=0
82439f00f3a1Smrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
82449f00f3a1Smrg  # Check for GNU sed and select it if it is found.
82459f00f3a1Smrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
82469f00f3a1Smrg    lt_cv_path_SED=$lt_ac_sed
82479f00f3a1Smrg    break
82489f00f3a1Smrg  fi
82499f00f3a1Smrg  while true; do
82509f00f3a1Smrg    cat conftest.in conftest.in >conftest.tmp
82519f00f3a1Smrg    mv conftest.tmp conftest.in
82529f00f3a1Smrg    cp conftest.in conftest.nl
82539f00f3a1Smrg    echo >>conftest.nl
82549f00f3a1Smrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
82559f00f3a1Smrg    cmp -s conftest.out conftest.nl || break
82569f00f3a1Smrg    # 10000 chars as input seems more than enough
8257edce3322Smrg    test 10 -lt "$lt_ac_count" && break
82589f00f3a1Smrg    lt_ac_count=`expr $lt_ac_count + 1`
8259edce3322Smrg    if test "$lt_ac_count" -gt "$lt_ac_max"; then
82609f00f3a1Smrg      lt_ac_max=$lt_ac_count
82619f00f3a1Smrg      lt_cv_path_SED=$lt_ac_sed
82629f00f3a1Smrg    fi
82639f00f3a1Smrg  done
82649f00f3a1Smrgdone
82659f00f3a1Smrg])
82669f00f3a1SmrgSED=$lt_cv_path_SED
82679f00f3a1SmrgAC_SUBST([SED])
82689f00f3a1SmrgAC_MSG_RESULT([$SED])
82699f00f3a1Smrg])#AC_PROG_SED
82709f00f3a1Smrg])#m4_ifndef
82719f00f3a1Smrg
82729f00f3a1Smrg# Old name:
82739f00f3a1SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
82749f00f3a1Smrgdnl aclocal-1.4 backwards compatibility:
82759f00f3a1Smrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
82769f00f3a1Smrg
82779f00f3a1Smrg
82789f00f3a1Smrg# _LT_CHECK_SHELL_FEATURES
82799f00f3a1Smrg# ------------------------
82809f00f3a1Smrg# Find out whether the shell is Bourne or XSI compatible,
82819f00f3a1Smrg# or has some other useful features.
82829f00f3a1Smrgm4_defun([_LT_CHECK_SHELL_FEATURES],
8283edce3322Smrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
82849f00f3a1Smrg  lt_unset=unset
82859f00f3a1Smrgelse
82869f00f3a1Smrg  lt_unset=false
82879f00f3a1Smrgfi
82889f00f3a1Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
82899f00f3a1Smrg
82909f00f3a1Smrg# test EBCDIC or ASCII
82919f00f3a1Smrgcase `echo X|tr X '\101'` in
82929f00f3a1Smrg A) # ASCII based system
82939f00f3a1Smrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
82949f00f3a1Smrg  lt_SP2NL='tr \040 \012'
82959f00f3a1Smrg  lt_NL2SP='tr \015\012 \040\040'
82969f00f3a1Smrg  ;;
82979f00f3a1Smrg *) # EBCDIC based system
82989f00f3a1Smrg  lt_SP2NL='tr \100 \n'
82999f00f3a1Smrg  lt_NL2SP='tr \r\n \100\100'
83009f00f3a1Smrg  ;;
83019f00f3a1Smrgesac
83029f00f3a1Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
83039f00f3a1Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
83049f00f3a1Smrg])# _LT_CHECK_SHELL_FEATURES
83059f00f3a1Smrg
83069f00f3a1Smrg
83079f00f3a1Smrg# _LT_PATH_CONVERSION_FUNCTIONS
83089f00f3a1Smrg# -----------------------------
8309edce3322Smrg# Determine what file name conversion functions should be used by
83109f00f3a1Smrg# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
83119f00f3a1Smrg# for certain cross-compile configurations and native mingw.
83129f00f3a1Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
83139f00f3a1Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
83149f00f3a1SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
83159f00f3a1SmrgAC_MSG_CHECKING([how to convert $build file names to $host format])
83169f00f3a1SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd,
83179f00f3a1Smrg[case $host in
83189f00f3a1Smrg  *-*-mingw* )
83199f00f3a1Smrg    case $build in
83209f00f3a1Smrg      *-*-mingw* ) # actually msys
83219f00f3a1Smrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
83229f00f3a1Smrg        ;;
83239f00f3a1Smrg      *-*-cygwin* )
83249f00f3a1Smrg        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
83259f00f3a1Smrg        ;;
83269f00f3a1Smrg      * ) # otherwise, assume *nix
83279f00f3a1Smrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
83289f00f3a1Smrg        ;;
83299f00f3a1Smrg    esac
83309f00f3a1Smrg    ;;
83319f00f3a1Smrg  *-*-cygwin* )
83329f00f3a1Smrg    case $build in
83339f00f3a1Smrg      *-*-mingw* ) # actually msys
83349f00f3a1Smrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
83359f00f3a1Smrg        ;;
83369f00f3a1Smrg      *-*-cygwin* )
83379f00f3a1Smrg        lt_cv_to_host_file_cmd=func_convert_file_noop
83389f00f3a1Smrg        ;;
83399f00f3a1Smrg      * ) # otherwise, assume *nix
83409f00f3a1Smrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
83419f00f3a1Smrg        ;;
83429f00f3a1Smrg    esac
83439f00f3a1Smrg    ;;
83449f00f3a1Smrg  * ) # unhandled hosts (and "normal" native builds)
83459f00f3a1Smrg    lt_cv_to_host_file_cmd=func_convert_file_noop
83469f00f3a1Smrg    ;;
83479f00f3a1Smrgesac
83489f00f3a1Smrg])
83499f00f3a1Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd
83509f00f3a1SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd])
83519f00f3a1Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
83529f00f3a1Smrg         [0], [convert $build file names to $host format])dnl
83539f00f3a1Smrg
83549f00f3a1SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format])
83559f00f3a1SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd,
83569f00f3a1Smrg[#assume ordinary cross tools, or native build.
83579f00f3a1Smrglt_cv_to_tool_file_cmd=func_convert_file_noop
83589f00f3a1Smrgcase $host in
83599f00f3a1Smrg  *-*-mingw* )
83609f00f3a1Smrg    case $build in
83619f00f3a1Smrg      *-*-mingw* ) # actually msys
83629f00f3a1Smrg        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
83639f00f3a1Smrg        ;;
83649f00f3a1Smrg    esac
83659f00f3a1Smrg    ;;
83669f00f3a1Smrgesac
83679f00f3a1Smrg])
83689f00f3a1Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd
83699f00f3a1SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
83709f00f3a1Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
83719f00f3a1Smrg         [0], [convert $build files to toolchain format])dnl
83729f00f3a1Smrg])# _LT_PATH_CONVERSION_FUNCTIONS
8373