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