libtool.m4 revision 8bf5c682
18bf5c682Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
28bf5c682Smrg#
38bf5c682Smrg#   Copyright (C) 1996-2001, 2003-2017 Free Software Foundation, Inc.
48bf5c682Smrg#   Written by Gordon Matzigkeit, 1996
58bf5c682Smrg#
68bf5c682Smrg# This file is free software; the Free Software Foundation gives
78bf5c682Smrg# unlimited permission to copy and/or distribute it, with or without
88bf5c682Smrg# modifications, as long as this notice is preserved.
98bf5c682Smrg
108bf5c682Smrgm4_define([_LT_COPYING], [dnl
118bf5c682Smrg# Copyright (C) 2014 Free Software Foundation, Inc.
128bf5c682Smrg# This is free software; see the source for copying conditions.  There is NO
138bf5c682Smrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
148bf5c682Smrg
158bf5c682Smrg# GNU Libtool is free software; you can redistribute it and/or modify
168bf5c682Smrg# it under the terms of the GNU General Public License as published by
178bf5c682Smrg# the Free Software Foundation; either version 2 of of the License, or
188bf5c682Smrg# (at your option) any later version.
198bf5c682Smrg#
208bf5c682Smrg# As a special exception to the GNU General Public License, if you
218bf5c682Smrg# distribute this file as part of a program or library that is built
228bf5c682Smrg# using GNU Libtool, you may include this file under the  same
238bf5c682Smrg# distribution terms that you use for the rest of that program.
248bf5c682Smrg#
258bf5c682Smrg# GNU Libtool is distributed in the hope that it will be useful, but
268bf5c682Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
278bf5c682Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
288bf5c682Smrg# GNU General Public License for more details.
298bf5c682Smrg#
308bf5c682Smrg# You should have received a copy of the GNU General Public License
318bf5c682Smrg# along with this program.  If not, see <http://www.gnu.org/licenses/>.
328bf5c682Smrg])
338bf5c682Smrg
348bf5c682Smrg# serial 58 LT_INIT
358bf5c682Smrg
368bf5c682Smrg
378bf5c682Smrg# LT_PREREQ(VERSION)
388bf5c682Smrg# ------------------
398bf5c682Smrg# Complain and exit if this libtool version is less that VERSION.
408bf5c682Smrgm4_defun([LT_PREREQ],
418bf5c682Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
428bf5c682Smrg       [m4_default([$3],
438bf5c682Smrg		   [m4_fatal([Libtool version $1 or higher is required],
448bf5c682Smrg		             63)])],
458bf5c682Smrg       [$2])])
468bf5c682Smrg
478bf5c682Smrg
488bf5c682Smrg# _LT_CHECK_BUILDDIR
498bf5c682Smrg# ------------------
508bf5c682Smrg# Complain if the absolute build directory name contains unusual characters
518bf5c682Smrgm4_defun([_LT_CHECK_BUILDDIR],
528bf5c682Smrg[case `pwd` in
538bf5c682Smrg  *\ * | *\	*)
548bf5c682Smrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
558bf5c682Smrgesac
568bf5c682Smrg])
578bf5c682Smrg
588bf5c682Smrg
598bf5c682Smrg# LT_INIT([OPTIONS])
608bf5c682Smrg# ------------------
618bf5c682SmrgAC_DEFUN([LT_INIT],
628bf5c682Smrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
638bf5c682SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
648bf5c682SmrgAC_BEFORE([$0], [LT_LANG])dnl
658bf5c682SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
668bf5c682SmrgAC_BEFORE([$0], [LTDL_INIT])dnl
678bf5c682Smrgm4_require([_LT_CHECK_BUILDDIR])dnl
688bf5c682Smrg
698bf5c682Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
708bf5c682Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
718bf5c682Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
728bf5c682Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
738bf5c682Smrgdnl unless we require an AC_DEFUNed macro:
748bf5c682SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
758bf5c682SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
768bf5c682SmrgAC_REQUIRE([LTVERSION_VERSION])dnl
778bf5c682SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
788bf5c682Smrgm4_require([_LT_PROG_LTMAIN])dnl
798bf5c682Smrg
808bf5c682Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
818bf5c682Smrg
828bf5c682Smrgdnl Parse OPTIONS
838bf5c682Smrg_LT_SET_OPTIONS([$0], [$1])
848bf5c682Smrg
858bf5c682Smrg# This can be used to rebuild libtool when needed
868bf5c682SmrgLIBTOOL_DEPS=$ltmain
878bf5c682Smrg
888bf5c682Smrg# Always use our own libtool.
898bf5c682SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
908bf5c682SmrgAC_SUBST(LIBTOOL)dnl
918bf5c682Smrg
928bf5c682Smrg_LT_SETUP
938bf5c682Smrg
948bf5c682Smrg# Only expand once:
958bf5c682Smrgm4_define([LT_INIT])
968bf5c682Smrg])# LT_INIT
978bf5c682Smrg
988bf5c682Smrg# Old names:
998bf5c682SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1008bf5c682SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1018bf5c682Smrgdnl aclocal-1.4 backwards compatibility:
1028bf5c682Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1038bf5c682Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1048bf5c682Smrg
1058bf5c682Smrg
1068bf5c682Smrg# _LT_PREPARE_CC_BASENAME
1078bf5c682Smrg# -----------------------
1088bf5c682Smrgm4_defun([_LT_PREPARE_CC_BASENAME], [
1098bf5c682Smrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1108bf5c682Smrgfunc_cc_basename ()
1118bf5c682Smrg{
1128bf5c682Smrg    for cc_temp in @S|@*""; do
1138bf5c682Smrg      case $cc_temp in
1148bf5c682Smrg        compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1158bf5c682Smrg        distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1168bf5c682Smrg        \-*) ;;
1178bf5c682Smrg        *) break;;
1188bf5c682Smrg      esac
1198bf5c682Smrg    done
1208bf5c682Smrg    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
1218bf5c682Smrg}
1228bf5c682Smrg])# _LT_PREPARE_CC_BASENAME
1238bf5c682Smrg
1248bf5c682Smrg
1258bf5c682Smrg# _LT_CC_BASENAME(CC)
1268bf5c682Smrg# -------------------
1278bf5c682Smrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
1288bf5c682Smrg# but that macro is also expanded into generated libtool script, which
1298bf5c682Smrg# arranges for $SED and $ECHO to be set by different means.
1308bf5c682Smrgm4_defun([_LT_CC_BASENAME],
1318bf5c682Smrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl
1328bf5c682SmrgAC_REQUIRE([_LT_DECL_SED])dnl
1338bf5c682SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1348bf5c682Smrgfunc_cc_basename $1
1358bf5c682Smrgcc_basename=$func_cc_basename_result
1368bf5c682Smrg])
1378bf5c682Smrg
1388bf5c682Smrg
1398bf5c682Smrg# _LT_FILEUTILS_DEFAULTS
1408bf5c682Smrg# ----------------------
1418bf5c682Smrg# It is okay to use these file commands and assume they have been set
1428bf5c682Smrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
1438bf5c682Smrgm4_defun([_LT_FILEUTILS_DEFAULTS],
1448bf5c682Smrg[: ${CP="cp -f"}
1458bf5c682Smrg: ${MV="mv -f"}
1468bf5c682Smrg: ${RM="rm -f"}
1478bf5c682Smrg])# _LT_FILEUTILS_DEFAULTS
1488bf5c682Smrg
1498bf5c682Smrg
1508bf5c682Smrg# _LT_SETUP
1518bf5c682Smrg# ---------
1528bf5c682Smrgm4_defun([_LT_SETUP],
1538bf5c682Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1548bf5c682SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
1558bf5c682SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
1568bf5c682SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1578bf5c682Smrg
1588bf5c682Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
1598bf5c682Smrgdnl
1608bf5c682Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl
1618bf5c682Smrg_LT_DECL([], [host], [0])dnl
1628bf5c682Smrg_LT_DECL([], [host_os], [0])dnl
1638bf5c682Smrgdnl
1648bf5c682Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl
1658bf5c682Smrg_LT_DECL([], [build], [0])dnl
1668bf5c682Smrg_LT_DECL([], [build_os], [0])dnl
1678bf5c682Smrgdnl
1688bf5c682SmrgAC_REQUIRE([AC_PROG_CC])dnl
1698bf5c682SmrgAC_REQUIRE([LT_PATH_LD])dnl
1708bf5c682SmrgAC_REQUIRE([LT_PATH_NM])dnl
1718bf5c682Smrgdnl
1728bf5c682SmrgAC_REQUIRE([AC_PROG_LN_S])dnl
1738bf5c682Smrgtest -z "$LN_S" && LN_S="ln -s"
1748bf5c682Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1758bf5c682Smrgdnl
1768bf5c682SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
1778bf5c682Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1788bf5c682Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1798bf5c682Smrgdnl
1808bf5c682Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
1818bf5c682Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
1828bf5c682Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
1838bf5c682Smrgm4_require([_LT_CMD_RELOAD])dnl
1848bf5c682Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
1858bf5c682Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
1868bf5c682Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
1878bf5c682Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1888bf5c682Smrgm4_require([_LT_WITH_SYSROOT])dnl
1898bf5c682Smrgm4_require([_LT_CMD_TRUNCATE])dnl
1908bf5c682Smrg
1918bf5c682Smrg_LT_CONFIG_LIBTOOL_INIT([
1928bf5c682Smrg# See if we are running on zsh, and set the options that allow our
1938bf5c682Smrg# commands through without removal of \ escapes INIT.
1948bf5c682Smrgif test -n "\${ZSH_VERSION+set}"; then
1958bf5c682Smrg   setopt NO_GLOB_SUBST
1968bf5c682Smrgfi
1978bf5c682Smrg])
1988bf5c682Smrgif test -n "${ZSH_VERSION+set}"; then
1998bf5c682Smrg   setopt NO_GLOB_SUBST
2008bf5c682Smrgfi
2018bf5c682Smrg
2028bf5c682Smrg_LT_CHECK_OBJDIR
2038bf5c682Smrg
2048bf5c682Smrgm4_require([_LT_TAG_COMPILER])dnl
2058bf5c682Smrg
2068bf5c682Smrgcase $host_os in
2078bf5c682Smrgaix3*)
2088bf5c682Smrg  # AIX sometimes has problems with the GCC collect2 program.  For some
2098bf5c682Smrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
2108bf5c682Smrg  # vanish in a puff of smoke.
2118bf5c682Smrg  if test set != "${COLLECT_NAMES+set}"; then
2128bf5c682Smrg    COLLECT_NAMES=
2138bf5c682Smrg    export COLLECT_NAMES
2148bf5c682Smrg  fi
2158bf5c682Smrg  ;;
2168bf5c682Smrgesac
2178bf5c682Smrg
2188bf5c682Smrg# Global variables:
2198bf5c682Smrgofile=libtool
2208bf5c682Smrgcan_build_shared=yes
2218bf5c682Smrg
2228bf5c682Smrg# All known linkers require a '.a' archive for static linking (except MSVC,
2238bf5c682Smrg# which needs '.lib').
2248bf5c682Smrglibext=a
2258bf5c682Smrg
2268bf5c682Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
2278bf5c682Smrg
2288bf5c682Smrgold_CC=$CC
2298bf5c682Smrgold_CFLAGS=$CFLAGS
2308bf5c682Smrg
2318bf5c682Smrg# Set sane defaults for various variables
2328bf5c682Smrgtest -z "$CC" && CC=cc
2338bf5c682Smrgtest -z "$LTCC" && LTCC=$CC
2348bf5c682Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
2358bf5c682Smrgtest -z "$LD" && LD=ld
2368bf5c682Smrgtest -z "$ac_objext" && ac_objext=o
2378bf5c682Smrg
2388bf5c682Smrg_LT_CC_BASENAME([$compiler])
2398bf5c682Smrg
2408bf5c682Smrg# Only perform the check for file, if the check method requires it
2418bf5c682Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
2428bf5c682Smrgcase $deplibs_check_method in
2438bf5c682Smrgfile_magic*)
2448bf5c682Smrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2458bf5c682Smrg    _LT_PATH_MAGIC
2468bf5c682Smrg  fi
2478bf5c682Smrg  ;;
2488bf5c682Smrgesac
2498bf5c682Smrg
2508bf5c682Smrg# Use C for the default configuration in the libtool script
2518bf5c682SmrgLT_SUPPORTED_TAG([CC])
2528bf5c682Smrg_LT_LANG_C_CONFIG
2538bf5c682Smrg_LT_LANG_DEFAULT_CONFIG
2548bf5c682Smrg_LT_CONFIG_COMMANDS
2558bf5c682Smrg])# _LT_SETUP
2568bf5c682Smrg
2578bf5c682Smrg
2588bf5c682Smrg# _LT_PREPARE_SED_QUOTE_VARS
2598bf5c682Smrg# --------------------------
2608bf5c682Smrg# Define a few sed substitution that help us do robust quoting.
2618bf5c682Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS],
2628bf5c682Smrg[# Backslashify metacharacters that are still active within
2638bf5c682Smrg# double-quoted strings.
2648bf5c682Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
2658bf5c682Smrg
2668bf5c682Smrg# Same as above, but do not quote variable references.
2678bf5c682Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
2688bf5c682Smrg
2698bf5c682Smrg# Sed substitution to delay expansion of an escaped shell variable in a
2708bf5c682Smrg# double_quote_subst'ed string.
2718bf5c682Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
2728bf5c682Smrg
2738bf5c682Smrg# Sed substitution to delay expansion of an escaped single quote.
2748bf5c682Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
2758bf5c682Smrg
2768bf5c682Smrg# Sed substitution to avoid accidental globbing in evaled expressions
2778bf5c682Smrgno_glob_subst='s/\*/\\\*/g'
2788bf5c682Smrg])
2798bf5c682Smrg
2808bf5c682Smrg# _LT_PROG_LTMAIN
2818bf5c682Smrg# ---------------
2828bf5c682Smrg# Note that this code is called both from 'configure', and 'config.status'
2838bf5c682Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
2848bf5c682Smrg# 'config.status' has no value for ac_aux_dir unless we are using Automake,
2858bf5c682Smrg# so we pass a copy along to make sure it has a sensible value anyway.
2868bf5c682Smrgm4_defun([_LT_PROG_LTMAIN],
2878bf5c682Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
2888bf5c682Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
2898bf5c682Smrgltmain=$ac_aux_dir/ltmain.sh
2908bf5c682Smrg])# _LT_PROG_LTMAIN
2918bf5c682Smrg
2928bf5c682Smrg
2938bf5c682Smrg## ------------------------------------- ##
2948bf5c682Smrg## Accumulate code for creating libtool. ##
2958bf5c682Smrg## ------------------------------------- ##
2968bf5c682Smrg
2978bf5c682Smrg# So that we can recreate a full libtool script including additional
2988bf5c682Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
2998bf5c682Smrg# in macros and then make a single call at the end using the 'libtool'
3008bf5c682Smrg# label.
3018bf5c682Smrg
3028bf5c682Smrg
3038bf5c682Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
3048bf5c682Smrg# ----------------------------------------
3058bf5c682Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
3068bf5c682Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
3078bf5c682Smrg[m4_ifval([$1],
3088bf5c682Smrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
3098bf5c682Smrg                     [$1
3108bf5c682Smrg])])])
3118bf5c682Smrg
3128bf5c682Smrg# Initialize.
3138bf5c682Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
3148bf5c682Smrg
3158bf5c682Smrg
3168bf5c682Smrg# _LT_CONFIG_LIBTOOL([COMMANDS])
3178bf5c682Smrg# ------------------------------
3188bf5c682Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
3198bf5c682Smrgm4_define([_LT_CONFIG_LIBTOOL],
3208bf5c682Smrg[m4_ifval([$1],
3218bf5c682Smrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
3228bf5c682Smrg                     [$1
3238bf5c682Smrg])])])
3248bf5c682Smrg
3258bf5c682Smrg# Initialize.
3268bf5c682Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
3278bf5c682Smrg
3288bf5c682Smrg
3298bf5c682Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
3308bf5c682Smrg# -----------------------------------------------------
3318bf5c682Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
3328bf5c682Smrg[_LT_CONFIG_LIBTOOL([$1])
3338bf5c682Smrg_LT_CONFIG_LIBTOOL_INIT([$2])
3348bf5c682Smrg])
3358bf5c682Smrg
3368bf5c682Smrg
3378bf5c682Smrg# _LT_FORMAT_COMMENT([COMMENT])
3388bf5c682Smrg# -----------------------------
3398bf5c682Smrg# Add leading comment marks to the start of each line, and a trailing
3408bf5c682Smrg# full-stop to the whole comment if one is not present already.
3418bf5c682Smrgm4_define([_LT_FORMAT_COMMENT],
3428bf5c682Smrg[m4_ifval([$1], [
3438bf5c682Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
3448bf5c682Smrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
3458bf5c682Smrg)])
3468bf5c682Smrg
3478bf5c682Smrg
3488bf5c682Smrg
3498bf5c682Smrg## ------------------------ ##
3508bf5c682Smrg## FIXME: Eliminate VARNAME ##
3518bf5c682Smrg## ------------------------ ##
3528bf5c682Smrg
3538bf5c682Smrg
3548bf5c682Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
3558bf5c682Smrg# -------------------------------------------------------------------
3568bf5c682Smrg# CONFIGNAME is the name given to the value in the libtool script.
3578bf5c682Smrg# VARNAME is the (base) name used in the configure script.
3588bf5c682Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
3598bf5c682Smrg# VARNAME.  Any other value will be used directly.
3608bf5c682Smrgm4_define([_LT_DECL],
3618bf5c682Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
3628bf5c682Smrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
3638bf5c682Smrg	[m4_ifval([$1], [$1], [$2])])
3648bf5c682Smrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
3658bf5c682Smrg    m4_ifval([$4],
3668bf5c682Smrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
3678bf5c682Smrg    lt_dict_add_subkey([lt_decl_dict], [$2],
3688bf5c682Smrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
3698bf5c682Smrg])
3708bf5c682Smrg
3718bf5c682Smrg
3728bf5c682Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
3738bf5c682Smrg# --------------------------------------------------------
3748bf5c682Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
3758bf5c682Smrg
3768bf5c682Smrg
3778bf5c682Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
3788bf5c682Smrg# ------------------------------------------------
3798bf5c682Smrgm4_define([lt_decl_tag_varnames],
3808bf5c682Smrg[_lt_decl_filter([tagged?], [yes], $@)])
3818bf5c682Smrg
3828bf5c682Smrg
3838bf5c682Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
3848bf5c682Smrg# ---------------------------------------------------------
3858bf5c682Smrgm4_define([_lt_decl_filter],
3868bf5c682Smrg[m4_case([$#],
3878bf5c682Smrg  [0], [m4_fatal([$0: too few arguments: $#])],
3888bf5c682Smrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
3898bf5c682Smrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
3908bf5c682Smrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
3918bf5c682Smrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
3928bf5c682Smrg])
3938bf5c682Smrg
3948bf5c682Smrg
3958bf5c682Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
3968bf5c682Smrg# --------------------------------------------------
3978bf5c682Smrgm4_define([lt_decl_quote_varnames],
3988bf5c682Smrg[_lt_decl_filter([value], [1], $@)])
3998bf5c682Smrg
4008bf5c682Smrg
4018bf5c682Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
4028bf5c682Smrg# ---------------------------------------------------
4038bf5c682Smrgm4_define([lt_decl_dquote_varnames],
4048bf5c682Smrg[_lt_decl_filter([value], [2], $@)])
4058bf5c682Smrg
4068bf5c682Smrg
4078bf5c682Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
4088bf5c682Smrg# ---------------------------------------------------
4098bf5c682Smrgm4_define([lt_decl_varnames_tagged],
4108bf5c682Smrg[m4_assert([$# <= 2])dnl
4118bf5c682Smrg_$0(m4_quote(m4_default([$1], [[, ]])),
4128bf5c682Smrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
4138bf5c682Smrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
4148bf5c682Smrgm4_define([_lt_decl_varnames_tagged],
4158bf5c682Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
4168bf5c682Smrg
4178bf5c682Smrg
4188bf5c682Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
4198bf5c682Smrg# ------------------------------------------------
4208bf5c682Smrgm4_define([lt_decl_all_varnames],
4218bf5c682Smrg[_$0(m4_quote(m4_default([$1], [[, ]])),
4228bf5c682Smrg     m4_if([$2], [],
4238bf5c682Smrg	   m4_quote(lt_decl_varnames),
4248bf5c682Smrg	m4_quote(m4_shift($@))))[]dnl
4258bf5c682Smrg])
4268bf5c682Smrgm4_define([_lt_decl_all_varnames],
4278bf5c682Smrg[lt_join($@, lt_decl_varnames_tagged([$1],
4288bf5c682Smrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
4298bf5c682Smrg])
4308bf5c682Smrg
4318bf5c682Smrg
4328bf5c682Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
4338bf5c682Smrg# ------------------------------------
4348bf5c682Smrg# Quote a variable value, and forward it to 'config.status' so that its
4358bf5c682Smrg# declaration there will have the same value as in 'configure'.  VARNAME
4368bf5c682Smrg# must have a single quote delimited value for this to work.
4378bf5c682Smrgm4_define([_LT_CONFIG_STATUS_DECLARE],
4388bf5c682Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
4398bf5c682Smrg
4408bf5c682Smrg
4418bf5c682Smrg# _LT_CONFIG_STATUS_DECLARATIONS
4428bf5c682Smrg# ------------------------------
4438bf5c682Smrg# We delimit libtool config variables with single quotes, so when
4448bf5c682Smrg# we write them to config.status, we have to be sure to quote all
4458bf5c682Smrg# embedded single quotes properly.  In configure, this macro expands
4468bf5c682Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
4478bf5c682Smrg#
4488bf5c682Smrg#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
4498bf5c682Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
4508bf5c682Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
4518bf5c682Smrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
4528bf5c682Smrg
4538bf5c682Smrg
4548bf5c682Smrg# _LT_LIBTOOL_TAGS
4558bf5c682Smrg# ----------------
4568bf5c682Smrg# Output comment and list of tags supported by the script
4578bf5c682Smrgm4_defun([_LT_LIBTOOL_TAGS],
4588bf5c682Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
4598bf5c682Smrgavailable_tags='_LT_TAGS'dnl
4608bf5c682Smrg])
4618bf5c682Smrg
4628bf5c682Smrg
4638bf5c682Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
4648bf5c682Smrg# -----------------------------------
4658bf5c682Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and
4668bf5c682Smrg# expand to a commented shell variable setting:
4678bf5c682Smrg#
4688bf5c682Smrg#    # Some comment about what VAR is for.
4698bf5c682Smrg#    visible_name=$lt_internal_name
4708bf5c682Smrgm4_define([_LT_LIBTOOL_DECLARE],
4718bf5c682Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
4728bf5c682Smrg					   [description])))[]dnl
4738bf5c682Smrgm4_pushdef([_libtool_name],
4748bf5c682Smrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
4758bf5c682Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
4768bf5c682Smrg    [0], [_libtool_name=[$]$1],
4778bf5c682Smrg    [1], [_libtool_name=$lt_[]$1],
4788bf5c682Smrg    [2], [_libtool_name=$lt_[]$1],
4798bf5c682Smrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
4808bf5c682Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
4818bf5c682Smrg])
4828bf5c682Smrg
4838bf5c682Smrg
4848bf5c682Smrg# _LT_LIBTOOL_CONFIG_VARS
4858bf5c682Smrg# -----------------------
4868bf5c682Smrg# Produce commented declarations of non-tagged libtool config variables
4878bf5c682Smrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
4888bf5c682Smrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
4898bf5c682Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
4908bf5c682Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
4918bf5c682Smrg[m4_foreach([_lt_var],
4928bf5c682Smrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
4938bf5c682Smrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
4948bf5c682Smrg
4958bf5c682Smrg
4968bf5c682Smrg# _LT_LIBTOOL_TAG_VARS(TAG)
4978bf5c682Smrg# -------------------------
4988bf5c682Smrgm4_define([_LT_LIBTOOL_TAG_VARS],
4998bf5c682Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
5008bf5c682Smrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
5018bf5c682Smrg
5028bf5c682Smrg
5038bf5c682Smrg# _LT_TAGVAR(VARNAME, [TAGNAME])
5048bf5c682Smrg# ------------------------------
5058bf5c682Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
5068bf5c682Smrg
5078bf5c682Smrg
5088bf5c682Smrg# _LT_CONFIG_COMMANDS
5098bf5c682Smrg# -------------------
5108bf5c682Smrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
5118bf5c682Smrg# variables for single and double quote escaping we saved from calls
5128bf5c682Smrg# to _LT_DECL, we can put quote escaped variables declarations
5138bf5c682Smrg# into 'config.status', and then the shell code to quote escape them in
5148bf5c682Smrg# for loops in 'config.status'.  Finally, any additional code accumulated
5158bf5c682Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
5168bf5c682Smrgm4_defun([_LT_CONFIG_COMMANDS],
5178bf5c682Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
5188bf5c682Smrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
5198bf5c682Smrg	dnl instead of duplicating it all over again into config.status,
5208bf5c682Smrg	dnl then we will have config.status run $CONFIG_LT later, so it
5218bf5c682Smrg	dnl needs to know what name is stored there:
5228bf5c682Smrg        [AC_CONFIG_COMMANDS([libtool],
5238bf5c682Smrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
5248bf5c682Smrg    dnl If the libtool generation code is destined for config.status,
5258bf5c682Smrg    dnl expand the accumulated commands and init code now:
5268bf5c682Smrg    [AC_CONFIG_COMMANDS([libtool],
5278bf5c682Smrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
5288bf5c682Smrg])#_LT_CONFIG_COMMANDS
5298bf5c682Smrg
5308bf5c682Smrg
5318bf5c682Smrg# Initialize.
5328bf5c682Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
5338bf5c682Smrg[
5348bf5c682Smrg
5358bf5c682Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
5368bf5c682Smrg# if CDPATH is set.
5378bf5c682Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5388bf5c682Smrg
5398bf5c682Smrgsed_quote_subst='$sed_quote_subst'
5408bf5c682Smrgdouble_quote_subst='$double_quote_subst'
5418bf5c682Smrgdelay_variable_subst='$delay_variable_subst'
5428bf5c682Smrg_LT_CONFIG_STATUS_DECLARATIONS
5438bf5c682SmrgLTCC='$LTCC'
5448bf5c682SmrgLTCFLAGS='$LTCFLAGS'
5458bf5c682Smrgcompiler='$compiler_DEFAULT'
5468bf5c682Smrg
5478bf5c682Smrg# A function that is used when there is no print builtin or printf.
5488bf5c682Smrgfunc_fallback_echo ()
5498bf5c682Smrg{
5508bf5c682Smrg  eval 'cat <<_LTECHO_EOF
5518bf5c682Smrg\$[]1
5528bf5c682Smrg_LTECHO_EOF'
5538bf5c682Smrg}
5548bf5c682Smrg
5558bf5c682Smrg# Quote evaled strings.
5568bf5c682Smrgfor var in lt_decl_all_varnames([[ \
5578bf5c682Smrg]], lt_decl_quote_varnames); do
5588bf5c682Smrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
5598bf5c682Smrg    *[[\\\\\\\`\\"\\\$]]*)
5608bf5c682Smrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
5618bf5c682Smrg      ;;
5628bf5c682Smrg    *)
5638bf5c682Smrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
5648bf5c682Smrg      ;;
5658bf5c682Smrg    esac
5668bf5c682Smrgdone
5678bf5c682Smrg
5688bf5c682Smrg# Double-quote double-evaled strings.
5698bf5c682Smrgfor var in lt_decl_all_varnames([[ \
5708bf5c682Smrg]], lt_decl_dquote_varnames); do
5718bf5c682Smrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
5728bf5c682Smrg    *[[\\\\\\\`\\"\\\$]]*)
5738bf5c682Smrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
5748bf5c682Smrg      ;;
5758bf5c682Smrg    *)
5768bf5c682Smrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
5778bf5c682Smrg      ;;
5788bf5c682Smrg    esac
5798bf5c682Smrgdone
5808bf5c682Smrg
5818bf5c682Smrg_LT_OUTPUT_LIBTOOL_INIT
5828bf5c682Smrg])
5838bf5c682Smrg
5848bf5c682Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
5858bf5c682Smrg# ------------------------------------
5868bf5c682Smrg# Generate a child script FILE with all initialization necessary to
5878bf5c682Smrg# reuse the environment learned by the parent script, and make the
5888bf5c682Smrg# file executable.  If COMMENT is supplied, it is inserted after the
5898bf5c682Smrg# '#!' sequence but before initialization text begins.  After this
5908bf5c682Smrg# macro, additional text can be appended to FILE to form the body of
5918bf5c682Smrg# the child script.  The macro ends with non-zero status if the
5928bf5c682Smrg# file could not be fully written (such as if the disk is full).
5938bf5c682Smrgm4_ifdef([AS_INIT_GENERATED],
5948bf5c682Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
5958bf5c682Smrg[m4_defun([_LT_GENERATED_FILE_INIT],
5968bf5c682Smrg[m4_require([AS_PREPARE])]dnl
5978bf5c682Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
5988bf5c682Smrg[lt_write_fail=0
5998bf5c682Smrgcat >$1 <<_ASEOF || lt_write_fail=1
6008bf5c682Smrg#! $SHELL
6018bf5c682Smrg# Generated by $as_me.
6028bf5c682Smrg$2
6038bf5c682SmrgSHELL=\${CONFIG_SHELL-$SHELL}
6048bf5c682Smrgexport SHELL
6058bf5c682Smrg_ASEOF
6068bf5c682Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1
6078bf5c682SmrgAS_SHELL_SANITIZE
6088bf5c682Smrg_AS_PREPARE
6098bf5c682Smrgexec AS_MESSAGE_FD>&1
6108bf5c682Smrg_ASEOF
6118bf5c682Smrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl
6128bf5c682Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
6138bf5c682Smrg
6148bf5c682Smrg# LT_OUTPUT
6158bf5c682Smrg# ---------
6168bf5c682Smrg# This macro allows early generation of the libtool script (before
6178bf5c682Smrg# AC_OUTPUT is called), incase it is used in configure for compilation
6188bf5c682Smrg# tests.
6198bf5c682SmrgAC_DEFUN([LT_OUTPUT],
6208bf5c682Smrg[: ${CONFIG_LT=./config.lt}
6218bf5c682SmrgAC_MSG_NOTICE([creating $CONFIG_LT])
6228bf5c682Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
6238bf5c682Smrg[# Run this file to recreate a libtool stub with the current configuration.])
6248bf5c682Smrg
6258bf5c682Smrgcat >>"$CONFIG_LT" <<\_LTEOF
6268bf5c682Smrglt_cl_silent=false
6278bf5c682Smrgexec AS_MESSAGE_LOG_FD>>config.log
6288bf5c682Smrg{
6298bf5c682Smrg  echo
6308bf5c682Smrg  AS_BOX([Running $as_me.])
6318bf5c682Smrg} >&AS_MESSAGE_LOG_FD
6328bf5c682Smrg
6338bf5c682Smrglt_cl_help="\
6348bf5c682Smrg'$as_me' creates a local libtool stub from the current configuration,
6358bf5c682Smrgfor use in further configure time tests before the real libtool is
6368bf5c682Smrggenerated.
6378bf5c682Smrg
6388bf5c682SmrgUsage: $[0] [[OPTIONS]]
6398bf5c682Smrg
6408bf5c682Smrg  -h, --help      print this help, then exit
6418bf5c682Smrg  -V, --version   print version number, then exit
6428bf5c682Smrg  -q, --quiet     do not print progress messages
6438bf5c682Smrg  -d, --debug     don't remove temporary files
6448bf5c682Smrg
6458bf5c682SmrgReport bugs to <bug-libtool@gnu.org>."
6468bf5c682Smrg
6478bf5c682Smrglt_cl_version="\
6488bf5c682Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
6498bf5c682Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
6508bf5c682Smrgconfigured by $[0], generated by m4_PACKAGE_STRING.
6518bf5c682Smrg
6528bf5c682SmrgCopyright (C) 2011 Free Software Foundation, Inc.
6538bf5c682SmrgThis config.lt script is free software; the Free Software Foundation
6548bf5c682Smrggives unlimited permision to copy, distribute and modify it."
6558bf5c682Smrg
6568bf5c682Smrgwhile test 0 != $[#]
6578bf5c682Smrgdo
6588bf5c682Smrg  case $[1] in
6598bf5c682Smrg    --version | --v* | -V )
6608bf5c682Smrg      echo "$lt_cl_version"; exit 0 ;;
6618bf5c682Smrg    --help | --h* | -h )
6628bf5c682Smrg      echo "$lt_cl_help"; exit 0 ;;
6638bf5c682Smrg    --debug | --d* | -d )
6648bf5c682Smrg      debug=: ;;
6658bf5c682Smrg    --quiet | --q* | --silent | --s* | -q )
6668bf5c682Smrg      lt_cl_silent=: ;;
6678bf5c682Smrg
6688bf5c682Smrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
6698bf5c682SmrgTry '$[0] --help' for more information.]) ;;
6708bf5c682Smrg
6718bf5c682Smrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
6728bf5c682SmrgTry '$[0] --help' for more information.]) ;;
6738bf5c682Smrg  esac
6748bf5c682Smrg  shift
6758bf5c682Smrgdone
6768bf5c682Smrg
6778bf5c682Smrgif $lt_cl_silent; then
6788bf5c682Smrg  exec AS_MESSAGE_FD>/dev/null
6798bf5c682Smrgfi
6808bf5c682Smrg_LTEOF
6818bf5c682Smrg
6828bf5c682Smrgcat >>"$CONFIG_LT" <<_LTEOF
6838bf5c682Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
6848bf5c682Smrg_LTEOF
6858bf5c682Smrg
6868bf5c682Smrgcat >>"$CONFIG_LT" <<\_LTEOF
6878bf5c682SmrgAC_MSG_NOTICE([creating $ofile])
6888bf5c682Smrg_LT_OUTPUT_LIBTOOL_COMMANDS
6898bf5c682SmrgAS_EXIT(0)
6908bf5c682Smrg_LTEOF
6918bf5c682Smrgchmod +x "$CONFIG_LT"
6928bf5c682Smrg
6938bf5c682Smrg# configure is writing to config.log, but config.lt does its own redirection,
6948bf5c682Smrg# appending to config.log, which fails on DOS, as config.log is still kept
6958bf5c682Smrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
6968bf5c682Smrg# config.log, so it can be properly (re)opened and appended to by config.lt.
6978bf5c682Smrglt_cl_success=:
6988bf5c682Smrgtest yes = "$silent" &&
6998bf5c682Smrg  lt_config_lt_args="$lt_config_lt_args --quiet"
7008bf5c682Smrgexec AS_MESSAGE_LOG_FD>/dev/null
7018bf5c682Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
7028bf5c682Smrgexec AS_MESSAGE_LOG_FD>>config.log
7038bf5c682Smrg$lt_cl_success || AS_EXIT(1)
7048bf5c682Smrg])# LT_OUTPUT
7058bf5c682Smrg
7068bf5c682Smrg
7078bf5c682Smrg# _LT_CONFIG(TAG)
7088bf5c682Smrg# ---------------
7098bf5c682Smrg# If TAG is the built-in tag, create an initial libtool script with a
7108bf5c682Smrg# default configuration from the untagged config vars.  Otherwise add code
7118bf5c682Smrg# to config.status for appending the configuration named by TAG from the
7128bf5c682Smrg# matching tagged config vars.
7138bf5c682Smrgm4_defun([_LT_CONFIG],
7148bf5c682Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7158bf5c682Smrg_LT_CONFIG_SAVE_COMMANDS([
7168bf5c682Smrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
7178bf5c682Smrg  m4_if(_LT_TAG, [C], [
7188bf5c682Smrg    # See if we are running on zsh, and set the options that allow our
7198bf5c682Smrg    # commands through without removal of \ escapes.
7208bf5c682Smrg    if test -n "${ZSH_VERSION+set}"; then
7218bf5c682Smrg      setopt NO_GLOB_SUBST
7228bf5c682Smrg    fi
7238bf5c682Smrg
7248bf5c682Smrg    cfgfile=${ofile}T
7258bf5c682Smrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
7268bf5c682Smrg    $RM "$cfgfile"
7278bf5c682Smrg
7288bf5c682Smrg    cat <<_LT_EOF >> "$cfgfile"
7298bf5c682Smrg#! $SHELL
7308bf5c682Smrg# Generated automatically by $as_me ($PACKAGE) $VERSION
7318bf5c682Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7328bf5c682Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
7338bf5c682Smrg
7348bf5c682Smrg# Provide generalized library-building support services.
7358bf5c682Smrg# Written by Gordon Matzigkeit, 1996
7368bf5c682Smrg
7378bf5c682Smrg_LT_COPYING
7388bf5c682Smrg_LT_LIBTOOL_TAGS
7398bf5c682Smrg
7408bf5c682Smrg# Configured defaults for sys_lib_dlsearch_path munging.
7418bf5c682Smrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
7428bf5c682Smrg
7438bf5c682Smrg# ### BEGIN LIBTOOL CONFIG
7448bf5c682Smrg_LT_LIBTOOL_CONFIG_VARS
7458bf5c682Smrg_LT_LIBTOOL_TAG_VARS
7468bf5c682Smrg# ### END LIBTOOL CONFIG
7478bf5c682Smrg
7488bf5c682Smrg_LT_EOF
7498bf5c682Smrg
7508bf5c682Smrg    cat <<'_LT_EOF' >> "$cfgfile"
7518bf5c682Smrg
7528bf5c682Smrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
7538bf5c682Smrg
7548bf5c682Smrg_LT_PREPARE_MUNGE_PATH_LIST
7558bf5c682Smrg_LT_PREPARE_CC_BASENAME
7568bf5c682Smrg
7578bf5c682Smrg# ### END FUNCTIONS SHARED WITH CONFIGURE
7588bf5c682Smrg
7598bf5c682Smrg_LT_EOF
7608bf5c682Smrg
7618bf5c682Smrg  case $host_os in
7628bf5c682Smrg  aix3*)
7638bf5c682Smrg    cat <<\_LT_EOF >> "$cfgfile"
7648bf5c682Smrg# AIX sometimes has problems with the GCC collect2 program.  For some
7658bf5c682Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems
7668bf5c682Smrg# vanish in a puff of smoke.
7678bf5c682Smrgif test set != "${COLLECT_NAMES+set}"; then
7688bf5c682Smrg  COLLECT_NAMES=
7698bf5c682Smrg  export COLLECT_NAMES
7708bf5c682Smrgfi
7718bf5c682Smrg_LT_EOF
7728bf5c682Smrg    ;;
7738bf5c682Smrg  esac
7748bf5c682Smrg
7758bf5c682Smrg  _LT_PROG_LTMAIN
7768bf5c682Smrg
7778bf5c682Smrg  # We use sed instead of cat because bash on DJGPP gets confused if
7788bf5c682Smrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7798bf5c682Smrg  # text mode, it properly converts lines to CR/LF.  This bash problem
7808bf5c682Smrg  # is reportedly fixed, but why not run on old versions too?
7818bf5c682Smrg  sed '$q' "$ltmain" >> "$cfgfile" \
7828bf5c682Smrg     || (rm -f "$cfgfile"; exit 1)
7838bf5c682Smrg
7848bf5c682Smrg   mv -f "$cfgfile" "$ofile" ||
7858bf5c682Smrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
7868bf5c682Smrg  chmod +x "$ofile"
7878bf5c682Smrg],
7888bf5c682Smrg[cat <<_LT_EOF >> "$ofile"
7898bf5c682Smrg
7908bf5c682Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
7918bf5c682Smrgdnl in a comment (ie after a #).
7928bf5c682Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1
7938bf5c682Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
7948bf5c682Smrg# ### END LIBTOOL TAG CONFIG: $1
7958bf5c682Smrg_LT_EOF
7968bf5c682Smrg])dnl /m4_if
7978bf5c682Smrg],
7988bf5c682Smrg[m4_if([$1], [], [
7998bf5c682Smrg    PACKAGE='$PACKAGE'
8008bf5c682Smrg    VERSION='$VERSION'
8018bf5c682Smrg    RM='$RM'
8028bf5c682Smrg    ofile='$ofile'], [])
8038bf5c682Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS
8048bf5c682Smrg])# _LT_CONFIG
8058bf5c682Smrg
8068bf5c682Smrg
8078bf5c682Smrg# LT_SUPPORTED_TAG(TAG)
8088bf5c682Smrg# ---------------------
8098bf5c682Smrg# Trace this macro to discover what tags are supported by the libtool
8108bf5c682Smrg# --tag option, using:
8118bf5c682Smrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
8128bf5c682SmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
8138bf5c682Smrg
8148bf5c682Smrg
8158bf5c682Smrg# C support is built-in for now
8168bf5c682Smrgm4_define([_LT_LANG_C_enabled], [])
8178bf5c682Smrgm4_define([_LT_TAGS], [])
8188bf5c682Smrg
8198bf5c682Smrg
8208bf5c682Smrg# LT_LANG(LANG)
8218bf5c682Smrg# -------------
8228bf5c682Smrg# Enable libtool support for the given language if not already enabled.
8238bf5c682SmrgAC_DEFUN([LT_LANG],
8248bf5c682Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
8258bf5c682Smrgm4_case([$1],
8268bf5c682Smrg  [C],			[_LT_LANG(C)],
8278bf5c682Smrg  [C++],		[_LT_LANG(CXX)],
8288bf5c682Smrg  [Go],			[_LT_LANG(GO)],
8298bf5c682Smrg  [Java],		[_LT_LANG(GCJ)],
8308bf5c682Smrg  [Fortran 77],		[_LT_LANG(F77)],
8318bf5c682Smrg  [Fortran],		[_LT_LANG(FC)],
8328bf5c682Smrg  [Windows Resource],	[_LT_LANG(RC)],
8338bf5c682Smrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
8348bf5c682Smrg    [_LT_LANG($1)],
8358bf5c682Smrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
8368bf5c682Smrg])# LT_LANG
8378bf5c682Smrg
8388bf5c682Smrg
8398bf5c682Smrg# _LT_LANG(LANGNAME)
8408bf5c682Smrg# ------------------
8418bf5c682Smrgm4_defun([_LT_LANG],
8428bf5c682Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
8438bf5c682Smrg  [LT_SUPPORTED_TAG([$1])dnl
8448bf5c682Smrg  m4_append([_LT_TAGS], [$1 ])dnl
8458bf5c682Smrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
8468bf5c682Smrg  _LT_LANG_$1_CONFIG($1)])dnl
8478bf5c682Smrg])# _LT_LANG
8488bf5c682Smrg
8498bf5c682Smrg
8508bf5c682Smrgm4_ifndef([AC_PROG_GO], [
8518bf5c682Smrg############################################################
8528bf5c682Smrg# NOTE: This macro has been submitted for inclusion into   #
8538bf5c682Smrg#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
8548bf5c682Smrg#  a released version of Autoconf we should remove this    #
8558bf5c682Smrg#  macro and use it instead.                               #
8568bf5c682Smrg############################################################
8578bf5c682Smrgm4_defun([AC_PROG_GO],
8588bf5c682Smrg[AC_LANG_PUSH(Go)dnl
8598bf5c682SmrgAC_ARG_VAR([GOC],     [Go compiler command])dnl
8608bf5c682SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
8618bf5c682Smrg_AC_ARG_VAR_LDFLAGS()dnl
8628bf5c682SmrgAC_CHECK_TOOL(GOC, gccgo)
8638bf5c682Smrgif test -z "$GOC"; then
8648bf5c682Smrg  if test -n "$ac_tool_prefix"; then
8658bf5c682Smrg    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
8668bf5c682Smrg  fi
8678bf5c682Smrgfi
8688bf5c682Smrgif test -z "$GOC"; then
8698bf5c682Smrg  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
8708bf5c682Smrgfi
8718bf5c682Smrg])#m4_defun
8728bf5c682Smrg])#m4_ifndef
8738bf5c682Smrg
8748bf5c682Smrg
8758bf5c682Smrg# _LT_LANG_DEFAULT_CONFIG
8768bf5c682Smrg# -----------------------
8778bf5c682Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
8788bf5c682Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
8798bf5c682Smrg  [LT_LANG(CXX)],
8808bf5c682Smrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
8818bf5c682Smrg
8828bf5c682SmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
8838bf5c682Smrg  [LT_LANG(F77)],
8848bf5c682Smrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
8858bf5c682Smrg
8868bf5c682SmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
8878bf5c682Smrg  [LT_LANG(FC)],
8888bf5c682Smrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
8898bf5c682Smrg
8908bf5c682Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
8918bf5c682Smrgdnl pulling things in needlessly.
8928bf5c682SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
8938bf5c682Smrg  [LT_LANG(GCJ)],
8948bf5c682Smrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
8958bf5c682Smrg    [LT_LANG(GCJ)],
8968bf5c682Smrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
8978bf5c682Smrg      [LT_LANG(GCJ)],
8988bf5c682Smrg      [m4_ifdef([AC_PROG_GCJ],
8998bf5c682Smrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
9008bf5c682Smrg       m4_ifdef([A][M_PROG_GCJ],
9018bf5c682Smrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
9028bf5c682Smrg       m4_ifdef([LT_PROG_GCJ],
9038bf5c682Smrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
9048bf5c682Smrg
9058bf5c682SmrgAC_PROVIDE_IFELSE([AC_PROG_GO],
9068bf5c682Smrg  [LT_LANG(GO)],
9078bf5c682Smrg  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
9088bf5c682Smrg
9098bf5c682SmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
9108bf5c682Smrg  [LT_LANG(RC)],
9118bf5c682Smrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
9128bf5c682Smrg])# _LT_LANG_DEFAULT_CONFIG
9138bf5c682Smrg
9148bf5c682Smrg# Obsolete macros:
9158bf5c682SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
9168bf5c682SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
9178bf5c682SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
9188bf5c682SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
9198bf5c682SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
9208bf5c682Smrgdnl aclocal-1.4 backwards compatibility:
9218bf5c682Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
9228bf5c682Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
9238bf5c682Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
9248bf5c682Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
9258bf5c682Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], [])
9268bf5c682Smrg
9278bf5c682Smrg
9288bf5c682Smrg# _LT_TAG_COMPILER
9298bf5c682Smrg# ----------------
9308bf5c682Smrgm4_defun([_LT_TAG_COMPILER],
9318bf5c682Smrg[AC_REQUIRE([AC_PROG_CC])dnl
9328bf5c682Smrg
9338bf5c682Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
9348bf5c682Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
9358bf5c682Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
9368bf5c682Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
9378bf5c682Smrg
9388bf5c682Smrg# If no C compiler was specified, use CC.
9398bf5c682SmrgLTCC=${LTCC-"$CC"}
9408bf5c682Smrg
9418bf5c682Smrg# If no C compiler flags were specified, use CFLAGS.
9428bf5c682SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
9438bf5c682Smrg
9448bf5c682Smrg# Allow CC to be a program name with arguments.
9458bf5c682Smrgcompiler=$CC
9468bf5c682Smrg])# _LT_TAG_COMPILER
9478bf5c682Smrg
9488bf5c682Smrg
9498bf5c682Smrg# _LT_COMPILER_BOILERPLATE
9508bf5c682Smrg# ------------------------
9518bf5c682Smrg# Check for compiler boilerplate output or warnings with
9528bf5c682Smrg# the simple compiler test code.
9538bf5c682Smrgm4_defun([_LT_COMPILER_BOILERPLATE],
9548bf5c682Smrg[m4_require([_LT_DECL_SED])dnl
9558bf5c682Smrgac_outfile=conftest.$ac_objext
9568bf5c682Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
9578bf5c682Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
9588bf5c682Smrg_lt_compiler_boilerplate=`cat conftest.err`
9598bf5c682Smrg$RM conftest*
9608bf5c682Smrg])# _LT_COMPILER_BOILERPLATE
9618bf5c682Smrg
9628bf5c682Smrg
9638bf5c682Smrg# _LT_LINKER_BOILERPLATE
9648bf5c682Smrg# ----------------------
9658bf5c682Smrg# Check for linker boilerplate output or warnings with
9668bf5c682Smrg# the simple link test code.
9678bf5c682Smrgm4_defun([_LT_LINKER_BOILERPLATE],
9688bf5c682Smrg[m4_require([_LT_DECL_SED])dnl
9698bf5c682Smrgac_outfile=conftest.$ac_objext
9708bf5c682Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
9718bf5c682Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
9728bf5c682Smrg_lt_linker_boilerplate=`cat conftest.err`
9738bf5c682Smrg$RM -r conftest*
9748bf5c682Smrg])# _LT_LINKER_BOILERPLATE
9758bf5c682Smrg
9768bf5c682Smrg# _LT_REQUIRED_DARWIN_CHECKS
9778bf5c682Smrg# -------------------------
9788bf5c682Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
9798bf5c682Smrg  case $host_os in
9808bf5c682Smrg    rhapsody* | darwin*)
9818bf5c682Smrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
9828bf5c682Smrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
9838bf5c682Smrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
9848bf5c682Smrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
9858bf5c682Smrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
9868bf5c682Smrg    _LT_DECL([], [DSYMUTIL], [1],
9878bf5c682Smrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
9888bf5c682Smrg    _LT_DECL([], [NMEDIT], [1],
9898bf5c682Smrg      [Tool to change global to local symbols on Mac OS X])
9908bf5c682Smrg    _LT_DECL([], [LIPO], [1],
9918bf5c682Smrg      [Tool to manipulate fat objects and archives on Mac OS X])
9928bf5c682Smrg    _LT_DECL([], [OTOOL], [1],
9938bf5c682Smrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
9948bf5c682Smrg    _LT_DECL([], [OTOOL64], [1],
9958bf5c682Smrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
9968bf5c682Smrg
9978bf5c682Smrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
9988bf5c682Smrg      [lt_cv_apple_cc_single_mod=no
9998bf5c682Smrg      if test -z "$LT_MULTI_MODULE"; then
10008bf5c682Smrg	# By default we will add the -single_module flag. You can override
10018bf5c682Smrg	# by either setting the environment variable LT_MULTI_MODULE
10028bf5c682Smrg	# non-empty at configure time, or by adding -multi_module to the
10038bf5c682Smrg	# link flags.
10048bf5c682Smrg	rm -rf libconftest.dylib*
10058bf5c682Smrg	echo "int foo(void){return 1;}" > conftest.c
10068bf5c682Smrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10078bf5c682Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
10088bf5c682Smrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10098bf5c682Smrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
10108bf5c682Smrg        _lt_result=$?
10118bf5c682Smrg	# If there is a non-empty error log, and "single_module"
10128bf5c682Smrg	# appears in it, assume the flag caused a linker warning
10138bf5c682Smrg        if test -s conftest.err && $GREP single_module conftest.err; then
10148bf5c682Smrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
10158bf5c682Smrg	# Otherwise, if the output was created with a 0 exit code from
10168bf5c682Smrg	# the compiler, it worked.
10178bf5c682Smrg	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
10188bf5c682Smrg	  lt_cv_apple_cc_single_mod=yes
10198bf5c682Smrg	else
10208bf5c682Smrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
10218bf5c682Smrg	fi
10228bf5c682Smrg	rm -rf libconftest.dylib*
10238bf5c682Smrg	rm -f conftest.*
10248bf5c682Smrg      fi])
10258bf5c682Smrg
10268bf5c682Smrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
10278bf5c682Smrg      [lt_cv_ld_exported_symbols_list],
10288bf5c682Smrg      [lt_cv_ld_exported_symbols_list=no
10298bf5c682Smrg      save_LDFLAGS=$LDFLAGS
10308bf5c682Smrg      echo "_main" > conftest.sym
10318bf5c682Smrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
10328bf5c682Smrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
10338bf5c682Smrg	[lt_cv_ld_exported_symbols_list=yes],
10348bf5c682Smrg	[lt_cv_ld_exported_symbols_list=no])
10358bf5c682Smrg	LDFLAGS=$save_LDFLAGS
10368bf5c682Smrg    ])
10378bf5c682Smrg
10388bf5c682Smrg    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
10398bf5c682Smrg      [lt_cv_ld_force_load=no
10408bf5c682Smrg      cat > conftest.c << _LT_EOF
10418bf5c682Smrgint forced_loaded() { return 2;}
10428bf5c682Smrg_LT_EOF
10438bf5c682Smrg      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
10448bf5c682Smrg      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
10458bf5c682Smrg      echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
10468bf5c682Smrg      $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
10478bf5c682Smrg      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
10488bf5c682Smrg      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
10498bf5c682Smrg      cat > conftest.c << _LT_EOF
10508bf5c682Smrgint main() { return 0;}
10518bf5c682Smrg_LT_EOF
10528bf5c682Smrg      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
10538bf5c682Smrg      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
10548bf5c682Smrg      _lt_result=$?
10558bf5c682Smrg      if test -s conftest.err && $GREP force_load conftest.err; then
10568bf5c682Smrg	cat conftest.err >&AS_MESSAGE_LOG_FD
10578bf5c682Smrg      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
10588bf5c682Smrg	lt_cv_ld_force_load=yes
10598bf5c682Smrg      else
10608bf5c682Smrg	cat conftest.err >&AS_MESSAGE_LOG_FD
10618bf5c682Smrg      fi
10628bf5c682Smrg        rm -f conftest.err libconftest.a conftest conftest.c
10638bf5c682Smrg        rm -rf conftest.dSYM
10648bf5c682Smrg    ])
10658bf5c682Smrg    case $host_os in
10668bf5c682Smrg    rhapsody* | darwin1.[[012]])
10678bf5c682Smrg      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
10688bf5c682Smrg    darwin1.*)
10698bf5c682Smrg      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10708bf5c682Smrg    darwin*) # darwin 5.x on
10718bf5c682Smrg      # if running on 10.5 or later, the deployment target defaults
10728bf5c682Smrg      # to the OS version, if on x86, and 10.4, the deployment
10738bf5c682Smrg      # target defaults to 10.4. Don't you love it?
10748bf5c682Smrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10758bf5c682Smrg	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
10768bf5c682Smrg	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10778bf5c682Smrg	10.[[012]][[,.]]*)
10788bf5c682Smrg	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10798bf5c682Smrg	10.*)
10808bf5c682Smrg	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10818bf5c682Smrg      esac
10828bf5c682Smrg    ;;
10838bf5c682Smrg  esac
10848bf5c682Smrg    if test yes = "$lt_cv_apple_cc_single_mod"; then
10858bf5c682Smrg      _lt_dar_single_mod='$single_module'
10868bf5c682Smrg    fi
10878bf5c682Smrg    if test yes = "$lt_cv_ld_exported_symbols_list"; then
10888bf5c682Smrg      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
10898bf5c682Smrg    else
10908bf5c682Smrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
10918bf5c682Smrg    fi
10928bf5c682Smrg    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
10938bf5c682Smrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
10948bf5c682Smrg    else
10958bf5c682Smrg      _lt_dsymutil=
10968bf5c682Smrg    fi
10978bf5c682Smrg    ;;
10988bf5c682Smrg  esac
10998bf5c682Smrg])
11008bf5c682Smrg
11018bf5c682Smrg
11028bf5c682Smrg# _LT_DARWIN_LINKER_FEATURES([TAG])
11038bf5c682Smrg# ---------------------------------
11048bf5c682Smrg# Checks for linker and compiler features on darwin
11058bf5c682Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
11068bf5c682Smrg[
11078bf5c682Smrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
11088bf5c682Smrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
11098bf5c682Smrg  _LT_TAGVAR(hardcode_direct, $1)=no
11108bf5c682Smrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
11118bf5c682Smrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
11128bf5c682Smrg  if test yes = "$lt_cv_ld_force_load"; then
11138bf5c682Smrg    _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\"`'
11148bf5c682Smrg    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
11158bf5c682Smrg                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
11168bf5c682Smrg  else
11178bf5c682Smrg    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
11188bf5c682Smrg  fi
11198bf5c682Smrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
11208bf5c682Smrg  _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
11218bf5c682Smrg  case $cc_basename in
11228bf5c682Smrg     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
11238bf5c682Smrg     *) _lt_dar_can_shared=$GCC ;;
11248bf5c682Smrg  esac
11258bf5c682Smrg  if test yes = "$_lt_dar_can_shared"; then
11268bf5c682Smrg    output_verbose_link_cmd=func_echo_all
11278bf5c682Smrg    _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"
11288bf5c682Smrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
11298bf5c682Smrg    _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"
11308bf5c682Smrg    _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"
11318bf5c682Smrg    m4_if([$1], [CXX],
11328bf5c682Smrg[   if test yes != "$lt_cv_apple_cc_single_mod"; then
11338bf5c682Smrg      _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"
11348bf5c682Smrg      _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"
11358bf5c682Smrg    fi
11368bf5c682Smrg],[])
11378bf5c682Smrg  else
11388bf5c682Smrg  _LT_TAGVAR(ld_shlibs, $1)=no
11398bf5c682Smrg  fi
11408bf5c682Smrg])
11418bf5c682Smrg
11428bf5c682Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
11438bf5c682Smrg# ----------------------------------
11448bf5c682Smrg# Links a minimal program and checks the executable
11458bf5c682Smrg# for the system default hardcoded library path. In most cases,
11468bf5c682Smrg# this is /usr/lib:/lib, but when the MPI compilers are used
11478bf5c682Smrg# the location of the communication and MPI libs are included too.
11488bf5c682Smrg# If we don't find anything, use the default library path according
11498bf5c682Smrg# to the aix ld manual.
11508bf5c682Smrg# Store the results from the different compilers for each TAGNAME.
11518bf5c682Smrg# Allow to override them for all tags through lt_cv_aix_libpath.
11528bf5c682Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
11538bf5c682Smrg[m4_require([_LT_DECL_SED])dnl
11548bf5c682Smrgif test set = "${lt_cv_aix_libpath+set}"; then
11558bf5c682Smrg  aix_libpath=$lt_cv_aix_libpath
11568bf5c682Smrgelse
11578bf5c682Smrg  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
11588bf5c682Smrg  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
11598bf5c682Smrg  lt_aix_libpath_sed='[
11608bf5c682Smrg      /Import File Strings/,/^$/ {
11618bf5c682Smrg	  /^0/ {
11628bf5c682Smrg	      s/^0  *\([^ ]*\) *$/\1/
11638bf5c682Smrg	      p
11648bf5c682Smrg	  }
11658bf5c682Smrg      }]'
11668bf5c682Smrg  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11678bf5c682Smrg  # Check for a 64-bit object if we didn't find anything.
11688bf5c682Smrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
11698bf5c682Smrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11708bf5c682Smrg  fi],[])
11718bf5c682Smrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
11728bf5c682Smrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
11738bf5c682Smrg  fi
11748bf5c682Smrg  ])
11758bf5c682Smrg  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
11768bf5c682Smrgfi
11778bf5c682Smrg])# _LT_SYS_MODULE_PATH_AIX
11788bf5c682Smrg
11798bf5c682Smrg
11808bf5c682Smrg# _LT_SHELL_INIT(ARG)
11818bf5c682Smrg# -------------------
11828bf5c682Smrgm4_define([_LT_SHELL_INIT],
11838bf5c682Smrg[m4_divert_text([M4SH-INIT], [$1
11848bf5c682Smrg])])# _LT_SHELL_INIT
11858bf5c682Smrg
11868bf5c682Smrg
11878bf5c682Smrg
11888bf5c682Smrg# _LT_PROG_ECHO_BACKSLASH
11898bf5c682Smrg# -----------------------
11908bf5c682Smrg# Find how we can fake an echo command that does not interpret backslash.
11918bf5c682Smrg# In particular, with Autoconf 2.60 or later we add some code to the start
11928bf5c682Smrg# of the generated configure script that will find a shell with a builtin
11938bf5c682Smrg# printf (that we can use as an echo command).
11948bf5c682Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
11958bf5c682Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
11968bf5c682SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
11978bf5c682SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
11988bf5c682Smrg
11998bf5c682SmrgAC_MSG_CHECKING([how to print strings])
12008bf5c682Smrg# Test print first, because it will be a builtin if present.
12018bf5c682Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
12028bf5c682Smrg   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
12038bf5c682Smrg  ECHO='print -r --'
12048bf5c682Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
12058bf5c682Smrg  ECHO='printf %s\n'
12068bf5c682Smrgelse
12078bf5c682Smrg  # Use this function as a fallback that always works.
12088bf5c682Smrg  func_fallback_echo ()
12098bf5c682Smrg  {
12108bf5c682Smrg    eval 'cat <<_LTECHO_EOF
12118bf5c682Smrg$[]1
12128bf5c682Smrg_LTECHO_EOF'
12138bf5c682Smrg  }
12148bf5c682Smrg  ECHO='func_fallback_echo'
12158bf5c682Smrgfi
12168bf5c682Smrg
12178bf5c682Smrg# func_echo_all arg...
12188bf5c682Smrg# Invoke $ECHO with all args, space-separated.
12198bf5c682Smrgfunc_echo_all ()
12208bf5c682Smrg{
12218bf5c682Smrg    $ECHO "$*"
12228bf5c682Smrg}
12238bf5c682Smrg
12248bf5c682Smrgcase $ECHO in
12258bf5c682Smrg  printf*) AC_MSG_RESULT([printf]) ;;
12268bf5c682Smrg  print*) AC_MSG_RESULT([print -r]) ;;
12278bf5c682Smrg  *) AC_MSG_RESULT([cat]) ;;
12288bf5c682Smrgesac
12298bf5c682Smrg
12308bf5c682Smrgm4_ifdef([_AS_DETECT_SUGGESTED],
12318bf5c682Smrg[_AS_DETECT_SUGGESTED([
12328bf5c682Smrg  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
12338bf5c682Smrg    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
12348bf5c682Smrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
12358bf5c682Smrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
12368bf5c682Smrg    PATH=/empty FPATH=/empty; export PATH FPATH
12378bf5c682Smrg    test "X`printf %s $ECHO`" = "X$ECHO" \
12388bf5c682Smrg      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
12398bf5c682Smrg
12408bf5c682Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
12418bf5c682Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
12428bf5c682Smrg])# _LT_PROG_ECHO_BACKSLASH
12438bf5c682Smrg
12448bf5c682Smrg
12458bf5c682Smrg# _LT_WITH_SYSROOT
12468bf5c682Smrg# ----------------
12478bf5c682SmrgAC_DEFUN([_LT_WITH_SYSROOT],
12488bf5c682Smrg[AC_MSG_CHECKING([for sysroot])
12498bf5c682SmrgAC_ARG_WITH([sysroot],
12508bf5c682Smrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
12518bf5c682Smrg  [Search for dependent libraries within DIR (or the compiler's sysroot
12528bf5c682Smrg   if not specified).])],
12538bf5c682Smrg[], [with_sysroot=no])
12548bf5c682Smrg
12558bf5c682Smrgdnl lt_sysroot will always be passed unquoted.  We quote it here
12568bf5c682Smrgdnl in case the user passed a directory name.
12578bf5c682Smrglt_sysroot=
12588bf5c682Smrgcase $with_sysroot in #(
12598bf5c682Smrg yes)
12608bf5c682Smrg   if test yes = "$GCC"; then
12618bf5c682Smrg     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
12628bf5c682Smrg   fi
12638bf5c682Smrg   ;; #(
12648bf5c682Smrg /*)
12658bf5c682Smrg   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
12668bf5c682Smrg   ;; #(
12678bf5c682Smrg no|'')
12688bf5c682Smrg   ;; #(
12698bf5c682Smrg *)
12708bf5c682Smrg   AC_MSG_RESULT([$with_sysroot])
12718bf5c682Smrg   AC_MSG_ERROR([The sysroot must be an absolute path.])
12728bf5c682Smrg   ;;
12738bf5c682Smrgesac
12748bf5c682Smrg
12758bf5c682Smrg AC_MSG_RESULT([${lt_sysroot:-no}])
12768bf5c682Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
12778bf5c682Smrg[dependent libraries, and where our libraries should be installed.])])
12788bf5c682Smrg
12798bf5c682Smrg# _LT_ENABLE_LOCK
12808bf5c682Smrg# ---------------
12818bf5c682Smrgm4_defun([_LT_ENABLE_LOCK],
12828bf5c682Smrg[AC_ARG_ENABLE([libtool-lock],
12838bf5c682Smrg  [AS_HELP_STRING([--disable-libtool-lock],
12848bf5c682Smrg    [avoid locking (might break parallel builds)])])
12858bf5c682Smrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes
12868bf5c682Smrg
12878bf5c682Smrg# Some flags need to be propagated to the compiler or linker for good
12888bf5c682Smrg# libtool support.
12898bf5c682Smrgcase $host in
12908bf5c682Smrgia64-*-hpux*)
12918bf5c682Smrg  # Find out what ABI is being produced by ac_compile, and set mode
12928bf5c682Smrg  # options accordingly.
12938bf5c682Smrg  echo 'int i;' > conftest.$ac_ext
12948bf5c682Smrg  if AC_TRY_EVAL(ac_compile); then
12958bf5c682Smrg    case `/usr/bin/file conftest.$ac_objext` in
12968bf5c682Smrg      *ELF-32*)
12978bf5c682Smrg	HPUX_IA64_MODE=32
12988bf5c682Smrg	;;
12998bf5c682Smrg      *ELF-64*)
13008bf5c682Smrg	HPUX_IA64_MODE=64
13018bf5c682Smrg	;;
13028bf5c682Smrg    esac
13038bf5c682Smrg  fi
13048bf5c682Smrg  rm -rf conftest*
13058bf5c682Smrg  ;;
13068bf5c682Smrg*-*-irix6*)
13078bf5c682Smrg  # Find out what ABI is being produced by ac_compile, and set linker
13088bf5c682Smrg  # options accordingly.
13098bf5c682Smrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
13108bf5c682Smrg  if AC_TRY_EVAL(ac_compile); then
13118bf5c682Smrg    if test yes = "$lt_cv_prog_gnu_ld"; then
13128bf5c682Smrg      case `/usr/bin/file conftest.$ac_objext` in
13138bf5c682Smrg	*32-bit*)
13148bf5c682Smrg	  LD="${LD-ld} -melf32bsmip"
13158bf5c682Smrg	  ;;
13168bf5c682Smrg	*N32*)
13178bf5c682Smrg	  LD="${LD-ld} -melf32bmipn32"
13188bf5c682Smrg	  ;;
13198bf5c682Smrg	*64-bit*)
13208bf5c682Smrg	  LD="${LD-ld} -melf64bmip"
13218bf5c682Smrg	;;
13228bf5c682Smrg      esac
13238bf5c682Smrg    else
13248bf5c682Smrg      case `/usr/bin/file conftest.$ac_objext` in
13258bf5c682Smrg	*32-bit*)
13268bf5c682Smrg	  LD="${LD-ld} -32"
13278bf5c682Smrg	  ;;
13288bf5c682Smrg	*N32*)
13298bf5c682Smrg	  LD="${LD-ld} -n32"
13308bf5c682Smrg	  ;;
13318bf5c682Smrg	*64-bit*)
13328bf5c682Smrg	  LD="${LD-ld} -64"
13338bf5c682Smrg	  ;;
13348bf5c682Smrg      esac
13358bf5c682Smrg    fi
13368bf5c682Smrg  fi
13378bf5c682Smrg  rm -rf conftest*
13388bf5c682Smrg  ;;
13398bf5c682Smrg
13408bf5c682Smrgmips64*-*linux*)
13418bf5c682Smrg  # Find out what ABI is being produced by ac_compile, and set linker
13428bf5c682Smrg  # options accordingly.
13438bf5c682Smrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
13448bf5c682Smrg  if AC_TRY_EVAL(ac_compile); then
13458bf5c682Smrg    emul=elf
13468bf5c682Smrg    case `/usr/bin/file conftest.$ac_objext` in
13478bf5c682Smrg      *32-bit*)
13488bf5c682Smrg	emul="${emul}32"
13498bf5c682Smrg	;;
13508bf5c682Smrg      *64-bit*)
13518bf5c682Smrg	emul="${emul}64"
13528bf5c682Smrg	;;
13538bf5c682Smrg    esac
13548bf5c682Smrg    case `/usr/bin/file conftest.$ac_objext` in
13558bf5c682Smrg      *MSB*)
13568bf5c682Smrg	emul="${emul}btsmip"
13578bf5c682Smrg	;;
13588bf5c682Smrg      *LSB*)
13598bf5c682Smrg	emul="${emul}ltsmip"
13608bf5c682Smrg	;;
13618bf5c682Smrg    esac
13628bf5c682Smrg    case `/usr/bin/file conftest.$ac_objext` in
13638bf5c682Smrg      *N32*)
13648bf5c682Smrg	emul="${emul}n32"
13658bf5c682Smrg	;;
13668bf5c682Smrg    esac
13678bf5c682Smrg    LD="${LD-ld} -m $emul"
13688bf5c682Smrg  fi
13698bf5c682Smrg  rm -rf conftest*
13708bf5c682Smrg  ;;
13718bf5c682Smrg
13728bf5c682Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
13738bf5c682Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
13748bf5c682Smrg  # Find out what ABI is being produced by ac_compile, and set linker
13758bf5c682Smrg  # options accordingly.  Note that the listed cases only cover the
13768bf5c682Smrg  # situations where additional linker options are needed (such as when
13778bf5c682Smrg  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
13788bf5c682Smrg  # vice versa); the common cases where no linker options are needed do
13798bf5c682Smrg  # not appear in the list.
13808bf5c682Smrg  echo 'int i;' > conftest.$ac_ext
13818bf5c682Smrg  if AC_TRY_EVAL(ac_compile); then
13828bf5c682Smrg    case `/usr/bin/file conftest.o` in
13838bf5c682Smrg      *32-bit*)
13848bf5c682Smrg	case $host in
13858bf5c682Smrg	  x86_64-*kfreebsd*-gnu)
13868bf5c682Smrg	    LD="${LD-ld} -m elf_i386_fbsd"
13878bf5c682Smrg	    ;;
13888bf5c682Smrg	  x86_64-*linux*)
13898bf5c682Smrg	    case `/usr/bin/file conftest.o` in
13908bf5c682Smrg	      *x86-64*)
13918bf5c682Smrg		LD="${LD-ld} -m elf32_x86_64"
13928bf5c682Smrg		;;
13938bf5c682Smrg	      *)
13948bf5c682Smrg		LD="${LD-ld} -m elf_i386"
13958bf5c682Smrg		;;
13968bf5c682Smrg	    esac
13978bf5c682Smrg	    ;;
13988bf5c682Smrg	  powerpc64le-*linux*)
13998bf5c682Smrg	    LD="${LD-ld} -m elf32lppclinux"
14008bf5c682Smrg	    ;;
14018bf5c682Smrg	  powerpc64-*linux*)
14028bf5c682Smrg	    LD="${LD-ld} -m elf32ppclinux"
14038bf5c682Smrg	    ;;
14048bf5c682Smrg	  s390x-*linux*)
14058bf5c682Smrg	    LD="${LD-ld} -m elf_s390"
14068bf5c682Smrg	    ;;
14078bf5c682Smrg	  sparc64-*linux*)
14088bf5c682Smrg	    LD="${LD-ld} -m elf32_sparc"
14098bf5c682Smrg	    ;;
14108bf5c682Smrg	esac
14118bf5c682Smrg	;;
14128bf5c682Smrg      *64-bit*)
14138bf5c682Smrg	case $host in
14148bf5c682Smrg	  x86_64-*kfreebsd*-gnu)
14158bf5c682Smrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
14168bf5c682Smrg	    ;;
14178bf5c682Smrg	  x86_64-*linux*)
14188bf5c682Smrg	    LD="${LD-ld} -m elf_x86_64"
14198bf5c682Smrg	    ;;
14208bf5c682Smrg	  powerpcle-*linux*)
14218bf5c682Smrg	    LD="${LD-ld} -m elf64lppc"
14228bf5c682Smrg	    ;;
14238bf5c682Smrg	  powerpc-*linux*)
14248bf5c682Smrg	    LD="${LD-ld} -m elf64ppc"
14258bf5c682Smrg	    ;;
14268bf5c682Smrg	  s390*-*linux*|s390*-*tpf*)
14278bf5c682Smrg	    LD="${LD-ld} -m elf64_s390"
14288bf5c682Smrg	    ;;
14298bf5c682Smrg	  sparc*-*linux*)
14308bf5c682Smrg	    LD="${LD-ld} -m elf64_sparc"
14318bf5c682Smrg	    ;;
14328bf5c682Smrg	esac
14338bf5c682Smrg	;;
14348bf5c682Smrg    esac
14358bf5c682Smrg  fi
14368bf5c682Smrg  rm -rf conftest*
14378bf5c682Smrg  ;;
14388bf5c682Smrg
14398bf5c682Smrg*-*-sco3.2v5*)
14408bf5c682Smrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
14418bf5c682Smrg  SAVE_CFLAGS=$CFLAGS
14428bf5c682Smrg  CFLAGS="$CFLAGS -belf"
14438bf5c682Smrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
14448bf5c682Smrg    [AC_LANG_PUSH(C)
14458bf5c682Smrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
14468bf5c682Smrg     AC_LANG_POP])
14478bf5c682Smrg  if test yes != "$lt_cv_cc_needs_belf"; then
14488bf5c682Smrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
14498bf5c682Smrg    CFLAGS=$SAVE_CFLAGS
14508bf5c682Smrg  fi
14518bf5c682Smrg  ;;
14528bf5c682Smrg*-*solaris*)
14538bf5c682Smrg  # Find out what ABI is being produced by ac_compile, and set linker
14548bf5c682Smrg  # options accordingly.
14558bf5c682Smrg  echo 'int i;' > conftest.$ac_ext
14568bf5c682Smrg  if AC_TRY_EVAL(ac_compile); then
14578bf5c682Smrg    case `/usr/bin/file conftest.o` in
14588bf5c682Smrg    *64-bit*)
14598bf5c682Smrg      case $lt_cv_prog_gnu_ld in
14608bf5c682Smrg      yes*)
14618bf5c682Smrg        case $host in
14628bf5c682Smrg        i?86-*-solaris*|x86_64-*-solaris*)
14638bf5c682Smrg          LD="${LD-ld} -m elf_x86_64"
14648bf5c682Smrg          ;;
14658bf5c682Smrg        sparc*-*-solaris*)
14668bf5c682Smrg          LD="${LD-ld} -m elf64_sparc"
14678bf5c682Smrg          ;;
14688bf5c682Smrg        esac
14698bf5c682Smrg        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
14708bf5c682Smrg        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
14718bf5c682Smrg          LD=${LD-ld}_sol2
14728bf5c682Smrg        fi
14738bf5c682Smrg        ;;
14748bf5c682Smrg      *)
14758bf5c682Smrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
14768bf5c682Smrg	  LD="${LD-ld} -64"
14778bf5c682Smrg	fi
14788bf5c682Smrg	;;
14798bf5c682Smrg      esac
14808bf5c682Smrg      ;;
14818bf5c682Smrg    esac
14828bf5c682Smrg  fi
14838bf5c682Smrg  rm -rf conftest*
14848bf5c682Smrg  ;;
14858bf5c682Smrgesac
14868bf5c682Smrg
14878bf5c682Smrgneed_locks=$enable_libtool_lock
14888bf5c682Smrg])# _LT_ENABLE_LOCK
14898bf5c682Smrg
14908bf5c682Smrg
14918bf5c682Smrg# _LT_PROG_AR
14928bf5c682Smrg# -----------
14938bf5c682Smrgm4_defun([_LT_PROG_AR],
14948bf5c682Smrg[AC_CHECK_TOOLS(AR, [ar], false)
14958bf5c682Smrg: ${AR=ar}
14968bf5c682Smrg_LT_DECL([], [AR], [1], [The archiver])
14978bf5c682Smrg
14988bf5c682Smrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with
14998bf5c682Smrg# Automake.  If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
15008bf5c682Smrg# higher priority because thats what people were doing historically (setting
15018bf5c682Smrg# ARFLAGS for automake and AR_FLAGS for libtool).  FIXME: Make the AR_FLAGS
15028bf5c682Smrg# variable obsoleted/removed.
15038bf5c682Smrg
15048bf5c682Smrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
15058bf5c682Smrglt_ar_flags=$AR_FLAGS
15068bf5c682Smrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])
15078bf5c682Smrg
15088bf5c682Smrg# Make AR_FLAGS overridable by 'make ARFLAGS='.  Don't try to run-time override
15098bf5c682Smrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
15108bf5c682Smrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}],
15118bf5c682Smrg         [Flags to create an archive])
15128bf5c682Smrg
15138bf5c682SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
15148bf5c682Smrg  [lt_cv_ar_at_file=no
15158bf5c682Smrg   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
15168bf5c682Smrg     [echo conftest.$ac_objext > conftest.lst
15178bf5c682Smrg      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
15188bf5c682Smrg      AC_TRY_EVAL([lt_ar_try])
15198bf5c682Smrg      if test 0 -eq "$ac_status"; then
15208bf5c682Smrg	# Ensure the archiver fails upon bogus file names.
15218bf5c682Smrg	rm -f conftest.$ac_objext libconftest.a
15228bf5c682Smrg	AC_TRY_EVAL([lt_ar_try])
15238bf5c682Smrg	if test 0 -ne "$ac_status"; then
15248bf5c682Smrg          lt_cv_ar_at_file=@
15258bf5c682Smrg        fi
15268bf5c682Smrg      fi
15278bf5c682Smrg      rm -f conftest.* libconftest.a
15288bf5c682Smrg     ])
15298bf5c682Smrg  ])
15308bf5c682Smrg
15318bf5c682Smrgif test no = "$lt_cv_ar_at_file"; then
15328bf5c682Smrg  archiver_list_spec=
15338bf5c682Smrgelse
15348bf5c682Smrg  archiver_list_spec=$lt_cv_ar_at_file
15358bf5c682Smrgfi
15368bf5c682Smrg_LT_DECL([], [archiver_list_spec], [1],
15378bf5c682Smrg  [How to feed a file listing to the archiver])
15388bf5c682Smrg])# _LT_PROG_AR
15398bf5c682Smrg
15408bf5c682Smrg
15418bf5c682Smrg# _LT_CMD_OLD_ARCHIVE
15428bf5c682Smrg# -------------------
15438bf5c682Smrgm4_defun([_LT_CMD_OLD_ARCHIVE],
15448bf5c682Smrg[_LT_PROG_AR
15458bf5c682Smrg
15468bf5c682SmrgAC_CHECK_TOOL(STRIP, strip, :)
15478bf5c682Smrgtest -z "$STRIP" && STRIP=:
15488bf5c682Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
15498bf5c682Smrg
15508bf5c682SmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
15518bf5c682Smrgtest -z "$RANLIB" && RANLIB=:
15528bf5c682Smrg_LT_DECL([], [RANLIB], [1],
15538bf5c682Smrg    [Commands used to install an old-style archive])
15548bf5c682Smrg
15558bf5c682Smrg# Determine commands to create old-style static archives.
15568bf5c682Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
15578bf5c682Smrgold_postinstall_cmds='chmod 644 $oldlib'
15588bf5c682Smrgold_postuninstall_cmds=
15598bf5c682Smrg
15608bf5c682Smrgif test -n "$RANLIB"; then
15618bf5c682Smrg  case $host_os in
15628bf5c682Smrg  bitrig* | openbsd*)
15638bf5c682Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
15648bf5c682Smrg    ;;
15658bf5c682Smrg  *)
15668bf5c682Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
15678bf5c682Smrg    ;;
15688bf5c682Smrg  esac
15698bf5c682Smrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
15708bf5c682Smrgfi
15718bf5c682Smrg
15728bf5c682Smrgcase $host_os in
15738bf5c682Smrg  darwin*)
15748bf5c682Smrg    lock_old_archive_extraction=yes ;;
15758bf5c682Smrg  *)
15768bf5c682Smrg    lock_old_archive_extraction=no ;;
15778bf5c682Smrgesac
15788bf5c682Smrg_LT_DECL([], [old_postinstall_cmds], [2])
15798bf5c682Smrg_LT_DECL([], [old_postuninstall_cmds], [2])
15808bf5c682Smrg_LT_TAGDECL([], [old_archive_cmds], [2],
15818bf5c682Smrg    [Commands used to build an old-style archive])
15828bf5c682Smrg_LT_DECL([], [lock_old_archive_extraction], [0],
15838bf5c682Smrg    [Whether to use a lock for old archive extraction])
15848bf5c682Smrg])# _LT_CMD_OLD_ARCHIVE
15858bf5c682Smrg
15868bf5c682Smrg
15878bf5c682Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
15888bf5c682Smrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
15898bf5c682Smrg# ----------------------------------------------------------------
15908bf5c682Smrg# Check whether the given compiler option works
15918bf5c682SmrgAC_DEFUN([_LT_COMPILER_OPTION],
15928bf5c682Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
15938bf5c682Smrgm4_require([_LT_DECL_SED])dnl
15948bf5c682SmrgAC_CACHE_CHECK([$1], [$2],
15958bf5c682Smrg  [$2=no
15968bf5c682Smrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
15978bf5c682Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
15988bf5c682Smrg   lt_compiler_flag="$3"  ## exclude from sc_useless_quotes_in_assignment
15998bf5c682Smrg   # Insert the option either (1) after the last *FLAGS variable, or
16008bf5c682Smrg   # (2) before a word containing "conftest.", or (3) at the end.
16018bf5c682Smrg   # Note that $ac_compile itself does not contain backslashes and begins
16028bf5c682Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
16038bf5c682Smrg   # The option is referenced via a variable to avoid confusing sed.
16048bf5c682Smrg   lt_compile=`echo "$ac_compile" | $SED \
16058bf5c682Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
16068bf5c682Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
16078bf5c682Smrg   -e 's:$: $lt_compiler_flag:'`
16088bf5c682Smrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
16098bf5c682Smrg   (eval "$lt_compile" 2>conftest.err)
16108bf5c682Smrg   ac_status=$?
16118bf5c682Smrg   cat conftest.err >&AS_MESSAGE_LOG_FD
16128bf5c682Smrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
16138bf5c682Smrg   if (exit $ac_status) && test -s "$ac_outfile"; then
16148bf5c682Smrg     # The compiler can only warn and ignore the option if not recognized
16158bf5c682Smrg     # So say no if there are warnings other than the usual output.
16168bf5c682Smrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
16178bf5c682Smrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
16188bf5c682Smrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
16198bf5c682Smrg       $2=yes
16208bf5c682Smrg     fi
16218bf5c682Smrg   fi
16228bf5c682Smrg   $RM conftest*
16238bf5c682Smrg])
16248bf5c682Smrg
16258bf5c682Smrgif test yes = "[$]$2"; then
16268bf5c682Smrg    m4_if([$5], , :, [$5])
16278bf5c682Smrgelse
16288bf5c682Smrg    m4_if([$6], , :, [$6])
16298bf5c682Smrgfi
16308bf5c682Smrg])# _LT_COMPILER_OPTION
16318bf5c682Smrg
16328bf5c682Smrg# Old name:
16338bf5c682SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
16348bf5c682Smrgdnl aclocal-1.4 backwards compatibility:
16358bf5c682Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
16368bf5c682Smrg
16378bf5c682Smrg
16388bf5c682Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
16398bf5c682Smrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
16408bf5c682Smrg# ----------------------------------------------------
16418bf5c682Smrg# Check whether the given linker option works
16428bf5c682SmrgAC_DEFUN([_LT_LINKER_OPTION],
16438bf5c682Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
16448bf5c682Smrgm4_require([_LT_DECL_SED])dnl
16458bf5c682SmrgAC_CACHE_CHECK([$1], [$2],
16468bf5c682Smrg  [$2=no
16478bf5c682Smrg   save_LDFLAGS=$LDFLAGS
16488bf5c682Smrg   LDFLAGS="$LDFLAGS $3"
16498bf5c682Smrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
16508bf5c682Smrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
16518bf5c682Smrg     # The linker can only warn and ignore the option if not recognized
16528bf5c682Smrg     # So say no if there are warnings
16538bf5c682Smrg     if test -s conftest.err; then
16548bf5c682Smrg       # Append any errors to the config.log.
16558bf5c682Smrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
16568bf5c682Smrg       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
16578bf5c682Smrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
16588bf5c682Smrg       if diff conftest.exp conftest.er2 >/dev/null; then
16598bf5c682Smrg         $2=yes
16608bf5c682Smrg       fi
16618bf5c682Smrg     else
16628bf5c682Smrg       $2=yes
16638bf5c682Smrg     fi
16648bf5c682Smrg   fi
16658bf5c682Smrg   $RM -r conftest*
16668bf5c682Smrg   LDFLAGS=$save_LDFLAGS
16678bf5c682Smrg])
16688bf5c682Smrg
16698bf5c682Smrgif test yes = "[$]$2"; then
16708bf5c682Smrg    m4_if([$4], , :, [$4])
16718bf5c682Smrgelse
16728bf5c682Smrg    m4_if([$5], , :, [$5])
16738bf5c682Smrgfi
16748bf5c682Smrg])# _LT_LINKER_OPTION
16758bf5c682Smrg
16768bf5c682Smrg# Old name:
16778bf5c682SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
16788bf5c682Smrgdnl aclocal-1.4 backwards compatibility:
16798bf5c682Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
16808bf5c682Smrg
16818bf5c682Smrg
16828bf5c682Smrg# LT_CMD_MAX_LEN
16838bf5c682Smrg#---------------
16848bf5c682SmrgAC_DEFUN([LT_CMD_MAX_LEN],
16858bf5c682Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
16868bf5c682Smrg# find the maximum length of command line arguments
16878bf5c682SmrgAC_MSG_CHECKING([the maximum length of command line arguments])
16888bf5c682SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
16898bf5c682Smrg  i=0
16908bf5c682Smrg  teststring=ABCD
16918bf5c682Smrg
16928bf5c682Smrg  case $build_os in
16938bf5c682Smrg  msdosdjgpp*)
16948bf5c682Smrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
16958bf5c682Smrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
16968bf5c682Smrg    # during glob expansion).  Even if it were fixed, the result of this
16978bf5c682Smrg    # check would be larger than it should be.
16988bf5c682Smrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
16998bf5c682Smrg    ;;
17008bf5c682Smrg
17018bf5c682Smrg  gnu*)
17028bf5c682Smrg    # Under GNU Hurd, this test is not required because there is
17038bf5c682Smrg    # no limit to the length of command line arguments.
17048bf5c682Smrg    # Libtool will interpret -1 as no limit whatsoever
17058bf5c682Smrg    lt_cv_sys_max_cmd_len=-1;
17068bf5c682Smrg    ;;
17078bf5c682Smrg
17088bf5c682Smrg  cygwin* | mingw* | cegcc*)
17098bf5c682Smrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
17108bf5c682Smrg    # about 5 minutes as the teststring grows exponentially.
17118bf5c682Smrg    # Worse, since 9x/ME are not pre-emptively multitasking,
17128bf5c682Smrg    # you end up with a "frozen" computer, even though with patience
17138bf5c682Smrg    # the test eventually succeeds (with a max line length of 256k).
17148bf5c682Smrg    # Instead, let's just punt: use the minimum linelength reported by
17158bf5c682Smrg    # all of the supported platforms: 8192 (on NT/2K/XP).
17168bf5c682Smrg    lt_cv_sys_max_cmd_len=8192;
17178bf5c682Smrg    ;;
17188bf5c682Smrg
17198bf5c682Smrg  mint*)
17208bf5c682Smrg    # On MiNT this can take a long time and run out of memory.
17218bf5c682Smrg    lt_cv_sys_max_cmd_len=8192;
17228bf5c682Smrg    ;;
17238bf5c682Smrg
17248bf5c682Smrg  amigaos*)
17258bf5c682Smrg    # On AmigaOS with pdksh, this test takes hours, literally.
17268bf5c682Smrg    # So we just punt and use a minimum line length of 8192.
17278bf5c682Smrg    lt_cv_sys_max_cmd_len=8192;
17288bf5c682Smrg    ;;
17298bf5c682Smrg
17308bf5c682Smrg  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
17318bf5c682Smrg    # This has been around since 386BSD, at least.  Likely further.
17328bf5c682Smrg    if test -x /sbin/sysctl; then
17338bf5c682Smrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
17348bf5c682Smrg    elif test -x /usr/sbin/sysctl; then
17358bf5c682Smrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
17368bf5c682Smrg    else
17378bf5c682Smrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
17388bf5c682Smrg    fi
17398bf5c682Smrg    # And add a safety zone
17408bf5c682Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
17418bf5c682Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
17428bf5c682Smrg    ;;
17438bf5c682Smrg
17448bf5c682Smrg  interix*)
17458bf5c682Smrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
17468bf5c682Smrg    lt_cv_sys_max_cmd_len=196608
17478bf5c682Smrg    ;;
17488bf5c682Smrg
17498bf5c682Smrg  os2*)
17508bf5c682Smrg    # The test takes a long time on OS/2.
17518bf5c682Smrg    lt_cv_sys_max_cmd_len=8192
17528bf5c682Smrg    ;;
17538bf5c682Smrg
17548bf5c682Smrg  osf*)
17558bf5c682Smrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
17568bf5c682Smrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
17578bf5c682Smrg    # nice to cause kernel panics so lets avoid the loop below.
17588bf5c682Smrg    # First set a reasonable default.
17598bf5c682Smrg    lt_cv_sys_max_cmd_len=16384
17608bf5c682Smrg    #
17618bf5c682Smrg    if test -x /sbin/sysconfig; then
17628bf5c682Smrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
17638bf5c682Smrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
17648bf5c682Smrg      esac
17658bf5c682Smrg    fi
17668bf5c682Smrg    ;;
17678bf5c682Smrg  sco3.2v5*)
17688bf5c682Smrg    lt_cv_sys_max_cmd_len=102400
17698bf5c682Smrg    ;;
17708bf5c682Smrg  sysv5* | sco5v6* | sysv4.2uw2*)
17718bf5c682Smrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
17728bf5c682Smrg    if test -n "$kargmax"; then
17738bf5c682Smrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
17748bf5c682Smrg    else
17758bf5c682Smrg      lt_cv_sys_max_cmd_len=32768
17768bf5c682Smrg    fi
17778bf5c682Smrg    ;;
17788bf5c682Smrg  *)
17798bf5c682Smrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
17808bf5c682Smrg    if test -n "$lt_cv_sys_max_cmd_len" && \
17818bf5c682Smrg       test undefined != "$lt_cv_sys_max_cmd_len"; then
17828bf5c682Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
17838bf5c682Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
17848bf5c682Smrg    else
17858bf5c682Smrg      # Make teststring a little bigger before we do anything with it.
17868bf5c682Smrg      # a 1K string should be a reasonable start.
17878bf5c682Smrg      for i in 1 2 3 4 5 6 7 8; do
17888bf5c682Smrg        teststring=$teststring$teststring
17898bf5c682Smrg      done
17908bf5c682Smrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
17918bf5c682Smrg      # If test is not a shell built-in, we'll probably end up computing a
17928bf5c682Smrg      # maximum length that is only half of the actual maximum length, but
17938bf5c682Smrg      # we can't tell.
17948bf5c682Smrg      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
17958bf5c682Smrg	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
17968bf5c682Smrg	      test 17 != "$i" # 1/2 MB should be enough
17978bf5c682Smrg      do
17988bf5c682Smrg        i=`expr $i + 1`
17998bf5c682Smrg        teststring=$teststring$teststring
18008bf5c682Smrg      done
18018bf5c682Smrg      # Only check the string length outside the loop.
18028bf5c682Smrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
18038bf5c682Smrg      teststring=
18048bf5c682Smrg      # Add a significant safety factor because C++ compilers can tack on
18058bf5c682Smrg      # massive amounts of additional arguments before passing them to the
18068bf5c682Smrg      # linker.  It appears as though 1/2 is a usable value.
18078bf5c682Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
18088bf5c682Smrg    fi
18098bf5c682Smrg    ;;
18108bf5c682Smrg  esac
18118bf5c682Smrg])
18128bf5c682Smrgif test -n "$lt_cv_sys_max_cmd_len"; then
18138bf5c682Smrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
18148bf5c682Smrgelse
18158bf5c682Smrg  AC_MSG_RESULT(none)
18168bf5c682Smrgfi
18178bf5c682Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len
18188bf5c682Smrg_LT_DECL([], [max_cmd_len], [0],
18198bf5c682Smrg    [What is the maximum length of a command?])
18208bf5c682Smrg])# LT_CMD_MAX_LEN
18218bf5c682Smrg
18228bf5c682Smrg# Old name:
18238bf5c682SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
18248bf5c682Smrgdnl aclocal-1.4 backwards compatibility:
18258bf5c682Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
18268bf5c682Smrg
18278bf5c682Smrg
18288bf5c682Smrg# _LT_HEADER_DLFCN
18298bf5c682Smrg# ----------------
18308bf5c682Smrgm4_defun([_LT_HEADER_DLFCN],
18318bf5c682Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
18328bf5c682Smrg])# _LT_HEADER_DLFCN
18338bf5c682Smrg
18348bf5c682Smrg
18358bf5c682Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
18368bf5c682Smrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
18378bf5c682Smrg# ----------------------------------------------------------------
18388bf5c682Smrgm4_defun([_LT_TRY_DLOPEN_SELF],
18398bf5c682Smrg[m4_require([_LT_HEADER_DLFCN])dnl
18408bf5c682Smrgif test yes = "$cross_compiling"; then :
18418bf5c682Smrg  [$4]
18428bf5c682Smrgelse
18438bf5c682Smrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
18448bf5c682Smrg  lt_status=$lt_dlunknown
18458bf5c682Smrg  cat > conftest.$ac_ext <<_LT_EOF
18468bf5c682Smrg[#line $LINENO "configure"
18478bf5c682Smrg#include "confdefs.h"
18488bf5c682Smrg
18498bf5c682Smrg#if HAVE_DLFCN_H
18508bf5c682Smrg#include <dlfcn.h>
18518bf5c682Smrg#endif
18528bf5c682Smrg
18538bf5c682Smrg#include <stdio.h>
18548bf5c682Smrg
18558bf5c682Smrg#ifdef RTLD_GLOBAL
18568bf5c682Smrg#  define LT_DLGLOBAL		RTLD_GLOBAL
18578bf5c682Smrg#else
18588bf5c682Smrg#  ifdef DL_GLOBAL
18598bf5c682Smrg#    define LT_DLGLOBAL		DL_GLOBAL
18608bf5c682Smrg#  else
18618bf5c682Smrg#    define LT_DLGLOBAL		0
18628bf5c682Smrg#  endif
18638bf5c682Smrg#endif
18648bf5c682Smrg
18658bf5c682Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
18668bf5c682Smrg   find out it does not work in some platform. */
18678bf5c682Smrg#ifndef LT_DLLAZY_OR_NOW
18688bf5c682Smrg#  ifdef RTLD_LAZY
18698bf5c682Smrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
18708bf5c682Smrg#  else
18718bf5c682Smrg#    ifdef DL_LAZY
18728bf5c682Smrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
18738bf5c682Smrg#    else
18748bf5c682Smrg#      ifdef RTLD_NOW
18758bf5c682Smrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
18768bf5c682Smrg#      else
18778bf5c682Smrg#        ifdef DL_NOW
18788bf5c682Smrg#          define LT_DLLAZY_OR_NOW	DL_NOW
18798bf5c682Smrg#        else
18808bf5c682Smrg#          define LT_DLLAZY_OR_NOW	0
18818bf5c682Smrg#        endif
18828bf5c682Smrg#      endif
18838bf5c682Smrg#    endif
18848bf5c682Smrg#  endif
18858bf5c682Smrg#endif
18868bf5c682Smrg
18878bf5c682Smrg/* When -fvisibility=hidden is used, assume the code has been annotated
18888bf5c682Smrg   correspondingly for the symbols needed.  */
18898bf5c682Smrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
18908bf5c682Smrgint fnord () __attribute__((visibility("default")));
18918bf5c682Smrg#endif
18928bf5c682Smrg
18938bf5c682Smrgint fnord () { return 42; }
18948bf5c682Smrgint main ()
18958bf5c682Smrg{
18968bf5c682Smrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
18978bf5c682Smrg  int status = $lt_dlunknown;
18988bf5c682Smrg
18998bf5c682Smrg  if (self)
19008bf5c682Smrg    {
19018bf5c682Smrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
19028bf5c682Smrg      else
19038bf5c682Smrg        {
19048bf5c682Smrg	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
19058bf5c682Smrg          else puts (dlerror ());
19068bf5c682Smrg	}
19078bf5c682Smrg      /* dlclose (self); */
19088bf5c682Smrg    }
19098bf5c682Smrg  else
19108bf5c682Smrg    puts (dlerror ());
19118bf5c682Smrg
19128bf5c682Smrg  return status;
19138bf5c682Smrg}]
19148bf5c682Smrg_LT_EOF
19158bf5c682Smrg  if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
19168bf5c682Smrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
19178bf5c682Smrg    lt_status=$?
19188bf5c682Smrg    case x$lt_status in
19198bf5c682Smrg      x$lt_dlno_uscore) $1 ;;
19208bf5c682Smrg      x$lt_dlneed_uscore) $2 ;;
19218bf5c682Smrg      x$lt_dlunknown|x*) $3 ;;
19228bf5c682Smrg    esac
19238bf5c682Smrg  else :
19248bf5c682Smrg    # compilation failed
19258bf5c682Smrg    $3
19268bf5c682Smrg  fi
19278bf5c682Smrgfi
19288bf5c682Smrgrm -fr conftest*
19298bf5c682Smrg])# _LT_TRY_DLOPEN_SELF
19308bf5c682Smrg
19318bf5c682Smrg
19328bf5c682Smrg# LT_SYS_DLOPEN_SELF
19338bf5c682Smrg# ------------------
19348bf5c682SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
19358bf5c682Smrg[m4_require([_LT_HEADER_DLFCN])dnl
19368bf5c682Smrgif test yes != "$enable_dlopen"; then
19378bf5c682Smrg  enable_dlopen=unknown
19388bf5c682Smrg  enable_dlopen_self=unknown
19398bf5c682Smrg  enable_dlopen_self_static=unknown
19408bf5c682Smrgelse
19418bf5c682Smrg  lt_cv_dlopen=no
19428bf5c682Smrg  lt_cv_dlopen_libs=
19438bf5c682Smrg
19448bf5c682Smrg  case $host_os in
19458bf5c682Smrg  beos*)
19468bf5c682Smrg    lt_cv_dlopen=load_add_on
19478bf5c682Smrg    lt_cv_dlopen_libs=
19488bf5c682Smrg    lt_cv_dlopen_self=yes
19498bf5c682Smrg    ;;
19508bf5c682Smrg
19518bf5c682Smrg  mingw* | pw32* | cegcc*)
19528bf5c682Smrg    lt_cv_dlopen=LoadLibrary
19538bf5c682Smrg    lt_cv_dlopen_libs=
19548bf5c682Smrg    ;;
19558bf5c682Smrg
19568bf5c682Smrg  cygwin*)
19578bf5c682Smrg    lt_cv_dlopen=dlopen
19588bf5c682Smrg    lt_cv_dlopen_libs=
19598bf5c682Smrg    ;;
19608bf5c682Smrg
19618bf5c682Smrg  darwin*)
19628bf5c682Smrg    # if libdl is installed we need to link against it
19638bf5c682Smrg    AC_CHECK_LIB([dl], [dlopen],
19648bf5c682Smrg		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
19658bf5c682Smrg    lt_cv_dlopen=dyld
19668bf5c682Smrg    lt_cv_dlopen_libs=
19678bf5c682Smrg    lt_cv_dlopen_self=yes
19688bf5c682Smrg    ])
19698bf5c682Smrg    ;;
19708bf5c682Smrg
19718bf5c682Smrg  tpf*)
19728bf5c682Smrg    # Don't try to run any link tests for TPF.  We know it's impossible
19738bf5c682Smrg    # because TPF is a cross-compiler, and we know how we open DSOs.
19748bf5c682Smrg    lt_cv_dlopen=dlopen
19758bf5c682Smrg    lt_cv_dlopen_libs=
19768bf5c682Smrg    lt_cv_dlopen_self=no
19778bf5c682Smrg    ;;
19788bf5c682Smrg
19798bf5c682Smrg  *)
19808bf5c682Smrg    AC_CHECK_FUNC([shl_load],
19818bf5c682Smrg	  [lt_cv_dlopen=shl_load],
19828bf5c682Smrg      [AC_CHECK_LIB([dld], [shl_load],
19838bf5c682Smrg	    [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
19848bf5c682Smrg	[AC_CHECK_FUNC([dlopen],
19858bf5c682Smrg	      [lt_cv_dlopen=dlopen],
19868bf5c682Smrg	  [AC_CHECK_LIB([dl], [dlopen],
19878bf5c682Smrg		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
19888bf5c682Smrg	    [AC_CHECK_LIB([svld], [dlopen],
19898bf5c682Smrg		  [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
19908bf5c682Smrg	      [AC_CHECK_LIB([dld], [dld_link],
19918bf5c682Smrg		    [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
19928bf5c682Smrg	      ])
19938bf5c682Smrg	    ])
19948bf5c682Smrg	  ])
19958bf5c682Smrg	])
19968bf5c682Smrg      ])
19978bf5c682Smrg    ;;
19988bf5c682Smrg  esac
19998bf5c682Smrg
20008bf5c682Smrg  if test no = "$lt_cv_dlopen"; then
20018bf5c682Smrg    enable_dlopen=no
20028bf5c682Smrg  else
20038bf5c682Smrg    enable_dlopen=yes
20048bf5c682Smrg  fi
20058bf5c682Smrg
20068bf5c682Smrg  case $lt_cv_dlopen in
20078bf5c682Smrg  dlopen)
20088bf5c682Smrg    save_CPPFLAGS=$CPPFLAGS
20098bf5c682Smrg    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
20108bf5c682Smrg
20118bf5c682Smrg    save_LDFLAGS=$LDFLAGS
20128bf5c682Smrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
20138bf5c682Smrg
20148bf5c682Smrg    save_LIBS=$LIBS
20158bf5c682Smrg    LIBS="$lt_cv_dlopen_libs $LIBS"
20168bf5c682Smrg
20178bf5c682Smrg    AC_CACHE_CHECK([whether a program can dlopen itself],
20188bf5c682Smrg	  lt_cv_dlopen_self, [dnl
20198bf5c682Smrg	  _LT_TRY_DLOPEN_SELF(
20208bf5c682Smrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
20218bf5c682Smrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
20228bf5c682Smrg    ])
20238bf5c682Smrg
20248bf5c682Smrg    if test yes = "$lt_cv_dlopen_self"; then
20258bf5c682Smrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
20268bf5c682Smrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
20278bf5c682Smrg	  lt_cv_dlopen_self_static, [dnl
20288bf5c682Smrg	  _LT_TRY_DLOPEN_SELF(
20298bf5c682Smrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
20308bf5c682Smrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
20318bf5c682Smrg      ])
20328bf5c682Smrg    fi
20338bf5c682Smrg
20348bf5c682Smrg    CPPFLAGS=$save_CPPFLAGS
20358bf5c682Smrg    LDFLAGS=$save_LDFLAGS
20368bf5c682Smrg    LIBS=$save_LIBS
20378bf5c682Smrg    ;;
20388bf5c682Smrg  esac
20398bf5c682Smrg
20408bf5c682Smrg  case $lt_cv_dlopen_self in
20418bf5c682Smrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
20428bf5c682Smrg  *) enable_dlopen_self=unknown ;;
20438bf5c682Smrg  esac
20448bf5c682Smrg
20458bf5c682Smrg  case $lt_cv_dlopen_self_static in
20468bf5c682Smrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
20478bf5c682Smrg  *) enable_dlopen_self_static=unknown ;;
20488bf5c682Smrg  esac
20498bf5c682Smrgfi
20508bf5c682Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
20518bf5c682Smrg	 [Whether dlopen is supported])
20528bf5c682Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
20538bf5c682Smrg	 [Whether dlopen of programs is supported])
20548bf5c682Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
20558bf5c682Smrg	 [Whether dlopen of statically linked programs is supported])
20568bf5c682Smrg])# LT_SYS_DLOPEN_SELF
20578bf5c682Smrg
20588bf5c682Smrg# Old name:
20598bf5c682SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
20608bf5c682Smrgdnl aclocal-1.4 backwards compatibility:
20618bf5c682Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
20628bf5c682Smrg
20638bf5c682Smrg
20648bf5c682Smrg# _LT_COMPILER_C_O([TAGNAME])
20658bf5c682Smrg# ---------------------------
20668bf5c682Smrg# Check to see if options -c and -o are simultaneously supported by compiler.
20678bf5c682Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
20688bf5c682Smrgm4_defun([_LT_COMPILER_C_O],
20698bf5c682Smrg[m4_require([_LT_DECL_SED])dnl
20708bf5c682Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
20718bf5c682Smrgm4_require([_LT_TAG_COMPILER])dnl
20728bf5c682SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
20738bf5c682Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
20748bf5c682Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
20758bf5c682Smrg   $RM -r conftest 2>/dev/null
20768bf5c682Smrg   mkdir conftest
20778bf5c682Smrg   cd conftest
20788bf5c682Smrg   mkdir out
20798bf5c682Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
20808bf5c682Smrg
20818bf5c682Smrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
20828bf5c682Smrg   # Insert the option either (1) after the last *FLAGS variable, or
20838bf5c682Smrg   # (2) before a word containing "conftest.", or (3) at the end.
20848bf5c682Smrg   # Note that $ac_compile itself does not contain backslashes and begins
20858bf5c682Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
20868bf5c682Smrg   lt_compile=`echo "$ac_compile" | $SED \
20878bf5c682Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
20888bf5c682Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
20898bf5c682Smrg   -e 's:$: $lt_compiler_flag:'`
20908bf5c682Smrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
20918bf5c682Smrg   (eval "$lt_compile" 2>out/conftest.err)
20928bf5c682Smrg   ac_status=$?
20938bf5c682Smrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
20948bf5c682Smrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
20958bf5c682Smrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
20968bf5c682Smrg   then
20978bf5c682Smrg     # The compiler can only warn and ignore the option if not recognized
20988bf5c682Smrg     # So say no if there are warnings
20998bf5c682Smrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
21008bf5c682Smrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
21018bf5c682Smrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
21028bf5c682Smrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
21038bf5c682Smrg     fi
21048bf5c682Smrg   fi
21058bf5c682Smrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
21068bf5c682Smrg   $RM conftest*
21078bf5c682Smrg   # SGI C++ compiler will create directory out/ii_files/ for
21088bf5c682Smrg   # template instantiation
21098bf5c682Smrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
21108bf5c682Smrg   $RM out/* && rmdir out
21118bf5c682Smrg   cd ..
21128bf5c682Smrg   $RM -r conftest
21138bf5c682Smrg   $RM conftest*
21148bf5c682Smrg])
21158bf5c682Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
21168bf5c682Smrg	[Does compiler simultaneously support -c and -o options?])
21178bf5c682Smrg])# _LT_COMPILER_C_O
21188bf5c682Smrg
21198bf5c682Smrg
21208bf5c682Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
21218bf5c682Smrg# ----------------------------------
21228bf5c682Smrg# Check to see if we can do hard links to lock some files if needed
21238bf5c682Smrgm4_defun([_LT_COMPILER_FILE_LOCKS],
21248bf5c682Smrg[m4_require([_LT_ENABLE_LOCK])dnl
21258bf5c682Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
21268bf5c682Smrg_LT_COMPILER_C_O([$1])
21278bf5c682Smrg
21288bf5c682Smrghard_links=nottested
21298bf5c682Smrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
21308bf5c682Smrg  # do not overwrite the value of need_locks provided by the user
21318bf5c682Smrg  AC_MSG_CHECKING([if we can lock with hard links])
21328bf5c682Smrg  hard_links=yes
21338bf5c682Smrg  $RM conftest*
21348bf5c682Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
21358bf5c682Smrg  touch conftest.a
21368bf5c682Smrg  ln conftest.a conftest.b 2>&5 || hard_links=no
21378bf5c682Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
21388bf5c682Smrg  AC_MSG_RESULT([$hard_links])
21398bf5c682Smrg  if test no = "$hard_links"; then
21408bf5c682Smrg    AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
21418bf5c682Smrg    need_locks=warn
21428bf5c682Smrg  fi
21438bf5c682Smrgelse
21448bf5c682Smrg  need_locks=no
21458bf5c682Smrgfi
21468bf5c682Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
21478bf5c682Smrg])# _LT_COMPILER_FILE_LOCKS
21488bf5c682Smrg
21498bf5c682Smrg
21508bf5c682Smrg# _LT_CHECK_OBJDIR
21518bf5c682Smrg# ----------------
21528bf5c682Smrgm4_defun([_LT_CHECK_OBJDIR],
21538bf5c682Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
21548bf5c682Smrg[rm -f .libs 2>/dev/null
21558bf5c682Smrgmkdir .libs 2>/dev/null
21568bf5c682Smrgif test -d .libs; then
21578bf5c682Smrg  lt_cv_objdir=.libs
21588bf5c682Smrgelse
21598bf5c682Smrg  # MS-DOS does not allow filenames that begin with a dot.
21608bf5c682Smrg  lt_cv_objdir=_libs
21618bf5c682Smrgfi
21628bf5c682Smrgrmdir .libs 2>/dev/null])
21638bf5c682Smrgobjdir=$lt_cv_objdir
21648bf5c682Smrg_LT_DECL([], [objdir], [0],
21658bf5c682Smrg         [The name of the directory that contains temporary libtool files])dnl
21668bf5c682Smrgm4_pattern_allow([LT_OBJDIR])dnl
21678bf5c682SmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
21688bf5c682Smrg  [Define to the sub-directory where libtool stores uninstalled libraries.])
21698bf5c682Smrg])# _LT_CHECK_OBJDIR
21708bf5c682Smrg
21718bf5c682Smrg
21728bf5c682Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
21738bf5c682Smrg# --------------------------------------
21748bf5c682Smrg# Check hardcoding attributes.
21758bf5c682Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
21768bf5c682Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
21778bf5c682Smrg_LT_TAGVAR(hardcode_action, $1)=
21788bf5c682Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
21798bf5c682Smrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
21808bf5c682Smrg   test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
21818bf5c682Smrg
21828bf5c682Smrg  # We can hardcode non-existent directories.
21838bf5c682Smrg  if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
21848bf5c682Smrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
21858bf5c682Smrg     # have to relink, otherwise we might link with an installed library
21868bf5c682Smrg     # when we should be linking with a yet-to-be-installed one
21878bf5c682Smrg     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
21888bf5c682Smrg     test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
21898bf5c682Smrg    # Linking always hardcodes the temporary library directory.
21908bf5c682Smrg    _LT_TAGVAR(hardcode_action, $1)=relink
21918bf5c682Smrg  else
21928bf5c682Smrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
21938bf5c682Smrg    _LT_TAGVAR(hardcode_action, $1)=immediate
21948bf5c682Smrg  fi
21958bf5c682Smrgelse
21968bf5c682Smrg  # We cannot hardcode anything, or else we can only hardcode existing
21978bf5c682Smrg  # directories.
21988bf5c682Smrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
21998bf5c682Smrgfi
22008bf5c682SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
22018bf5c682Smrg
22028bf5c682Smrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
22038bf5c682Smrg   test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
22048bf5c682Smrg  # Fast installation is not supported
22058bf5c682Smrg  enable_fast_install=no
22068bf5c682Smrgelif test yes = "$shlibpath_overrides_runpath" ||
22078bf5c682Smrg     test no = "$enable_shared"; then
22088bf5c682Smrg  # Fast installation is not necessary
22098bf5c682Smrg  enable_fast_install=needless
22108bf5c682Smrgfi
22118bf5c682Smrg_LT_TAGDECL([], [hardcode_action], [0],
22128bf5c682Smrg    [How to hardcode a shared library path into an executable])
22138bf5c682Smrg])# _LT_LINKER_HARDCODE_LIBPATH
22148bf5c682Smrg
22158bf5c682Smrg
22168bf5c682Smrg# _LT_CMD_STRIPLIB
22178bf5c682Smrg# ----------------
22188bf5c682Smrgm4_defun([_LT_CMD_STRIPLIB],
22198bf5c682Smrg[m4_require([_LT_DECL_EGREP])
22208bf5c682Smrgstriplib=
22218bf5c682Smrgold_striplib=
22228bf5c682SmrgAC_MSG_CHECKING([whether stripping libraries is possible])
22238bf5c682Smrgif test -z "$STRIP"; then
22248bf5c682Smrg  AC_MSG_RESULT([no])
22258bf5c682Smrgelse
22268bf5c682Smrg  if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
22278bf5c682Smrg    old_striplib="$STRIP --strip-debug"
22288bf5c682Smrg    striplib="$STRIP --strip-unneeded"
22298bf5c682Smrg    AC_MSG_RESULT([yes])
22308bf5c682Smrg  else
22318bf5c682Smrg    case $host_os in
22328bf5c682Smrg    darwin*)
22338bf5c682Smrg      # FIXME - insert some real tests, host_os isn't really good enough
22348bf5c682Smrg      striplib="$STRIP -x"
22358bf5c682Smrg      old_striplib="$STRIP -S"
22368bf5c682Smrg      AC_MSG_RESULT([yes])
22378bf5c682Smrg      ;;
22388bf5c682Smrg    freebsd*)
22398bf5c682Smrg      if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
22408bf5c682Smrg        old_striplib="$STRIP --strip-debug"
22418bf5c682Smrg        striplib="$STRIP --strip-unneeded"
22428bf5c682Smrg        AC_MSG_RESULT([yes])
22438bf5c682Smrg      else
22448bf5c682Smrg        AC_MSG_RESULT([no])
22458bf5c682Smrg      fi
22468bf5c682Smrg      ;;
22478bf5c682Smrg    *)
22488bf5c682Smrg      AC_MSG_RESULT([no])
22498bf5c682Smrg      ;;
22508bf5c682Smrg    esac
22518bf5c682Smrg  fi
22528bf5c682Smrgfi
22538bf5c682Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
22548bf5c682Smrg_LT_DECL([], [striplib], [1])
22558bf5c682Smrg])# _LT_CMD_STRIPLIB
22568bf5c682Smrg
22578bf5c682Smrg
22588bf5c682Smrg# _LT_PREPARE_MUNGE_PATH_LIST
22598bf5c682Smrg# ---------------------------
22608bf5c682Smrg# Make sure func_munge_path_list() is defined correctly.
22618bf5c682Smrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
22628bf5c682Smrg[[# func_munge_path_list VARIABLE PATH
22638bf5c682Smrg# -----------------------------------
22648bf5c682Smrg# VARIABLE is name of variable containing _space_ separated list of
22658bf5c682Smrg# directories to be munged by the contents of PATH, which is string
22668bf5c682Smrg# having a format:
22678bf5c682Smrg# "DIR[:DIR]:"
22688bf5c682Smrg#       string "DIR[ DIR]" will be prepended to VARIABLE
22698bf5c682Smrg# ":DIR[:DIR]"
22708bf5c682Smrg#       string "DIR[ DIR]" will be appended to VARIABLE
22718bf5c682Smrg# "DIRP[:DIRP]::[DIRA:]DIRA"
22728bf5c682Smrg#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
22738bf5c682Smrg#       "DIRA[ DIRA]" will be appended to VARIABLE
22748bf5c682Smrg# "DIR[:DIR]"
22758bf5c682Smrg#       VARIABLE will be replaced by "DIR[ DIR]"
22768bf5c682Smrgfunc_munge_path_list ()
22778bf5c682Smrg{
22788bf5c682Smrg    case x@S|@2 in
22798bf5c682Smrg    x)
22808bf5c682Smrg        ;;
22818bf5c682Smrg    *:)
22828bf5c682Smrg        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
22838bf5c682Smrg        ;;
22848bf5c682Smrg    x:*)
22858bf5c682Smrg        eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
22868bf5c682Smrg        ;;
22878bf5c682Smrg    *::*)
22888bf5c682Smrg        eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
22898bf5c682Smrg        eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
22908bf5c682Smrg        ;;
22918bf5c682Smrg    *)
22928bf5c682Smrg        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
22938bf5c682Smrg        ;;
22948bf5c682Smrg    esac
22958bf5c682Smrg}
22968bf5c682Smrg]])# _LT_PREPARE_PATH_LIST
22978bf5c682Smrg
22988bf5c682Smrg
22998bf5c682Smrg# _LT_SYS_DYNAMIC_LINKER([TAG])
23008bf5c682Smrg# -----------------------------
23018bf5c682Smrg# PORTME Fill in your ld.so characteristics
23028bf5c682Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
23038bf5c682Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
23048bf5c682Smrgm4_require([_LT_DECL_EGREP])dnl
23058bf5c682Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
23068bf5c682Smrgm4_require([_LT_DECL_OBJDUMP])dnl
23078bf5c682Smrgm4_require([_LT_DECL_SED])dnl
23088bf5c682Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
23098bf5c682Smrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
23108bf5c682SmrgAC_MSG_CHECKING([dynamic linker characteristics])
23118bf5c682Smrgm4_if([$1],
23128bf5c682Smrg	[], [
23138bf5c682Smrgif test yes = "$GCC"; then
23148bf5c682Smrg  case $host_os in
23158bf5c682Smrg    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
23168bf5c682Smrg    *) lt_awk_arg='/^libraries:/' ;;
23178bf5c682Smrg  esac
23188bf5c682Smrg  case $host_os in
23198bf5c682Smrg    mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
23208bf5c682Smrg    *) lt_sed_strip_eq='s|=/|/|g' ;;
23218bf5c682Smrg  esac
23228bf5c682Smrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
23238bf5c682Smrg  case $lt_search_path_spec in
23248bf5c682Smrg  *\;*)
23258bf5c682Smrg    # if the path contains ";" then we assume it to be the separator
23268bf5c682Smrg    # otherwise default to the standard path separator (i.e. ":") - it is
23278bf5c682Smrg    # assumed that no part of a normal pathname contains ";" but that should
23288bf5c682Smrg    # okay in the real world where ";" in dirpaths is itself problematic.
23298bf5c682Smrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
23308bf5c682Smrg    ;;
23318bf5c682Smrg  *)
23328bf5c682Smrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
23338bf5c682Smrg    ;;
23348bf5c682Smrg  esac
23358bf5c682Smrg  # Ok, now we have the path, separated by spaces, we can step through it
23368bf5c682Smrg  # and add multilib dir if necessary...
23378bf5c682Smrg  lt_tmp_lt_search_path_spec=
23388bf5c682Smrg  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
23398bf5c682Smrg  # ...but if some path component already ends with the multilib dir we assume
23408bf5c682Smrg  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
23418bf5c682Smrg  case "$lt_multi_os_dir; $lt_search_path_spec " in
23428bf5c682Smrg  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
23438bf5c682Smrg    lt_multi_os_dir=
23448bf5c682Smrg    ;;
23458bf5c682Smrg  esac
23468bf5c682Smrg  for lt_sys_path in $lt_search_path_spec; do
23478bf5c682Smrg    if test -d "$lt_sys_path$lt_multi_os_dir"; then
23488bf5c682Smrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
23498bf5c682Smrg    elif test -n "$lt_multi_os_dir"; then
23508bf5c682Smrg      test -d "$lt_sys_path" && \
23518bf5c682Smrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
23528bf5c682Smrg    fi
23538bf5c682Smrg  done
23548bf5c682Smrg  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
23558bf5c682SmrgBEGIN {RS = " "; FS = "/|\n";} {
23568bf5c682Smrg  lt_foo = "";
23578bf5c682Smrg  lt_count = 0;
23588bf5c682Smrg  for (lt_i = NF; lt_i > 0; lt_i--) {
23598bf5c682Smrg    if ($lt_i != "" && $lt_i != ".") {
23608bf5c682Smrg      if ($lt_i == "..") {
23618bf5c682Smrg        lt_count++;
23628bf5c682Smrg      } else {
23638bf5c682Smrg        if (lt_count == 0) {
23648bf5c682Smrg          lt_foo = "/" $lt_i lt_foo;
23658bf5c682Smrg        } else {
23668bf5c682Smrg          lt_count--;
23678bf5c682Smrg        }
23688bf5c682Smrg      }
23698bf5c682Smrg    }
23708bf5c682Smrg  }
23718bf5c682Smrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
23728bf5c682Smrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
23738bf5c682Smrg}'`
23748bf5c682Smrg  # AWK program above erroneously prepends '/' to C:/dos/paths
23758bf5c682Smrg  # for these hosts.
23768bf5c682Smrg  case $host_os in
23778bf5c682Smrg    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
23788bf5c682Smrg      $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
23798bf5c682Smrg  esac
23808bf5c682Smrg  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
23818bf5c682Smrgelse
23828bf5c682Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
23838bf5c682Smrgfi])
23848bf5c682Smrglibrary_names_spec=
23858bf5c682Smrglibname_spec='lib$name'
23868bf5c682Smrgsoname_spec=
23878bf5c682Smrgshrext_cmds=.so
23888bf5c682Smrgpostinstall_cmds=
23898bf5c682Smrgpostuninstall_cmds=
23908bf5c682Smrgfinish_cmds=
23918bf5c682Smrgfinish_eval=
23928bf5c682Smrgshlibpath_var=
23938bf5c682Smrgshlibpath_overrides_runpath=unknown
23948bf5c682Smrgversion_type=none
23958bf5c682Smrgdynamic_linker="$host_os ld.so"
23968bf5c682Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
23978bf5c682Smrgneed_lib_prefix=unknown
23988bf5c682Smrghardcode_into_libs=no
23998bf5c682Smrg
24008bf5c682Smrg# when you set need_version to no, make sure it does not cause -set_version
24018bf5c682Smrg# flags to be left without arguments
24028bf5c682Smrgneed_version=unknown
24038bf5c682Smrg
24048bf5c682SmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH],
24058bf5c682Smrg[User-defined run-time library search path.])
24068bf5c682Smrg
24078bf5c682Smrgcase $host_os in
24088bf5c682Smrgaix3*)
24098bf5c682Smrg  version_type=linux # correct to gnu/linux during the next big refactor
24108bf5c682Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
24118bf5c682Smrg  shlibpath_var=LIBPATH
24128bf5c682Smrg
24138bf5c682Smrg  # AIX 3 has no versioning support, so we append a major version to the name.
24148bf5c682Smrg  soname_spec='$libname$release$shared_ext$major'
24158bf5c682Smrg  ;;
24168bf5c682Smrg
24178bf5c682Smrgaix[[4-9]]*)
24188bf5c682Smrg  version_type=linux # correct to gnu/linux during the next big refactor
24198bf5c682Smrg  need_lib_prefix=no
24208bf5c682Smrg  need_version=no
24218bf5c682Smrg  hardcode_into_libs=yes
24228bf5c682Smrg  if test ia64 = "$host_cpu"; then
24238bf5c682Smrg    # AIX 5 supports IA64
24248bf5c682Smrg    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
24258bf5c682Smrg    shlibpath_var=LD_LIBRARY_PATH
24268bf5c682Smrg  else
24278bf5c682Smrg    # With GCC up to 2.95.x, collect2 would create an import file
24288bf5c682Smrg    # for dependence libraries.  The import file would start with
24298bf5c682Smrg    # the line '#! .'.  This would cause the generated library to
24308bf5c682Smrg    # depend on '.', always an invalid library.  This was fixed in
24318bf5c682Smrg    # development snapshots of GCC prior to 3.0.
24328bf5c682Smrg    case $host_os in
24338bf5c682Smrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
24348bf5c682Smrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
24358bf5c682Smrg	   echo ' yes '
24368bf5c682Smrg	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
24378bf5c682Smrg	:
24388bf5c682Smrg      else
24398bf5c682Smrg	can_build_shared=no
24408bf5c682Smrg      fi
24418bf5c682Smrg      ;;
24428bf5c682Smrg    esac
24438bf5c682Smrg    # Using Import Files as archive members, it is possible to support
24448bf5c682Smrg    # filename-based versioning of shared library archives on AIX. While
24458bf5c682Smrg    # this would work for both with and without runtime linking, it will
24468bf5c682Smrg    # prevent static linking of such archives. So we do filename-based
24478bf5c682Smrg    # shared library versioning with .so extension only, which is used
24488bf5c682Smrg    # when both runtime linking and shared linking is enabled.
24498bf5c682Smrg    # Unfortunately, runtime linking may impact performance, so we do
24508bf5c682Smrg    # not want this to be the default eventually. Also, we use the
24518bf5c682Smrg    # versioned .so libs for executables only if there is the -brtl
24528bf5c682Smrg    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
24538bf5c682Smrg    # To allow for filename-based versioning support, we need to create
24548bf5c682Smrg    # libNAME.so.V as an archive file, containing:
24558bf5c682Smrg    # *) an Import File, referring to the versioned filename of the
24568bf5c682Smrg    #    archive as well as the shared archive member, telling the
24578bf5c682Smrg    #    bitwidth (32 or 64) of that shared object, and providing the
24588bf5c682Smrg    #    list of exported symbols of that shared object, eventually
24598bf5c682Smrg    #    decorated with the 'weak' keyword
24608bf5c682Smrg    # *) the shared object with the F_LOADONLY flag set, to really avoid
24618bf5c682Smrg    #    it being seen by the linker.
24628bf5c682Smrg    # At run time we better use the real file rather than another symlink,
24638bf5c682Smrg    # but for link time we create the symlink libNAME.so -> libNAME.so.V
24648bf5c682Smrg
24658bf5c682Smrg    case $with_aix_soname,$aix_use_runtimelinking in
24668bf5c682Smrg    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
24678bf5c682Smrg    # soname into executable. Probably we can add versioning support to
24688bf5c682Smrg    # collect2, so additional links can be useful in future.
24698bf5c682Smrg    aix,yes) # traditional libtool
24708bf5c682Smrg      dynamic_linker='AIX unversionable lib.so'
24718bf5c682Smrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
24728bf5c682Smrg      # instead of lib<name>.a to let people know that these are not
24738bf5c682Smrg      # typical AIX shared libraries.
24748bf5c682Smrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
24758bf5c682Smrg      ;;
24768bf5c682Smrg    aix,no) # traditional AIX only
24778bf5c682Smrg      dynamic_linker='AIX lib.a[(]lib.so.V[)]'
24788bf5c682Smrg      # We preserve .a as extension for shared libraries through AIX4.2
24798bf5c682Smrg      # and later when we are not doing run time linking.
24808bf5c682Smrg      library_names_spec='$libname$release.a $libname.a'
24818bf5c682Smrg      soname_spec='$libname$release$shared_ext$major'
24828bf5c682Smrg      ;;
24838bf5c682Smrg    svr4,*) # full svr4 only
24848bf5c682Smrg      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
24858bf5c682Smrg      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
24868bf5c682Smrg      # We do not specify a path in Import Files, so LIBPATH fires.
24878bf5c682Smrg      shlibpath_overrides_runpath=yes
24888bf5c682Smrg      ;;
24898bf5c682Smrg    *,yes) # both, prefer svr4
24908bf5c682Smrg      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
24918bf5c682Smrg      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
24928bf5c682Smrg      # unpreferred sharedlib libNAME.a needs extra handling
24938bf5c682Smrg      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"'
24948bf5c682Smrg      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"'
24958bf5c682Smrg      # We do not specify a path in Import Files, so LIBPATH fires.
24968bf5c682Smrg      shlibpath_overrides_runpath=yes
24978bf5c682Smrg      ;;
24988bf5c682Smrg    *,no) # both, prefer aix
24998bf5c682Smrg      dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
25008bf5c682Smrg      library_names_spec='$libname$release.a $libname.a'
25018bf5c682Smrg      soname_spec='$libname$release$shared_ext$major'
25028bf5c682Smrg      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
25038bf5c682Smrg      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)'
25048bf5c682Smrg      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"'
25058bf5c682Smrg      ;;
25068bf5c682Smrg    esac
25078bf5c682Smrg    shlibpath_var=LIBPATH
25088bf5c682Smrg  fi
25098bf5c682Smrg  ;;
25108bf5c682Smrg
25118bf5c682Smrgamigaos*)
25128bf5c682Smrg  case $host_cpu in
25138bf5c682Smrg  powerpc)
25148bf5c682Smrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
25158bf5c682Smrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
25168bf5c682Smrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
25178bf5c682Smrg    ;;
25188bf5c682Smrg  m68k)
25198bf5c682Smrg    library_names_spec='$libname.ixlibrary $libname.a'
25208bf5c682Smrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
25218bf5c682Smrg    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'
25228bf5c682Smrg    ;;
25238bf5c682Smrg  esac
25248bf5c682Smrg  ;;
25258bf5c682Smrg
25268bf5c682Smrgbeos*)
25278bf5c682Smrg  library_names_spec='$libname$shared_ext'
25288bf5c682Smrg  dynamic_linker="$host_os ld.so"
25298bf5c682Smrg  shlibpath_var=LIBRARY_PATH
25308bf5c682Smrg  ;;
25318bf5c682Smrg
25328bf5c682Smrgbsdi[[45]]*)
25338bf5c682Smrg  version_type=linux # correct to gnu/linux during the next big refactor
25348bf5c682Smrg  need_version=no
25358bf5c682Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
25368bf5c682Smrg  soname_spec='$libname$release$shared_ext$major'
25378bf5c682Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
25388bf5c682Smrg  shlibpath_var=LD_LIBRARY_PATH
25398bf5c682Smrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
25408bf5c682Smrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
25418bf5c682Smrg  # the default ld.so.conf also contains /usr/contrib/lib and
25428bf5c682Smrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
25438bf5c682Smrg  # libtool to hard-code these into programs
25448bf5c682Smrg  ;;
25458bf5c682Smrg
25468bf5c682Smrgcygwin* | mingw* | pw32* | cegcc*)
25478bf5c682Smrg  version_type=windows
25488bf5c682Smrg  shrext_cmds=.dll
25498bf5c682Smrg  need_version=no
25508bf5c682Smrg  need_lib_prefix=no
25518bf5c682Smrg
25528bf5c682Smrg  case $GCC,$cc_basename in
25538bf5c682Smrg  yes,*)
25548bf5c682Smrg    # gcc
25558bf5c682Smrg    library_names_spec='$libname.dll.a'
25568bf5c682Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
25578bf5c682Smrg    postinstall_cmds='base_file=`basename \$file`~
25588bf5c682Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
25598bf5c682Smrg      dldir=$destdir/`dirname \$dlpath`~
25608bf5c682Smrg      test -d \$dldir || mkdir -p \$dldir~
25618bf5c682Smrg      $install_prog $dir/$dlname \$dldir/$dlname~
25628bf5c682Smrg      chmod a+x \$dldir/$dlname~
25638bf5c682Smrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
25648bf5c682Smrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
25658bf5c682Smrg      fi'
25668bf5c682Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
25678bf5c682Smrg      dlpath=$dir/\$dldll~
25688bf5c682Smrg       $RM \$dlpath'
25698bf5c682Smrg    shlibpath_overrides_runpath=yes
25708bf5c682Smrg
25718bf5c682Smrg    case $host_os in
25728bf5c682Smrg    cygwin*)
25738bf5c682Smrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
25748bf5c682Smrg      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
25758bf5c682Smrgm4_if([$1], [],[
25768bf5c682Smrg      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
25778bf5c682Smrg      ;;
25788bf5c682Smrg    mingw* | cegcc*)
25798bf5c682Smrg      # MinGW DLLs use traditional 'lib' prefix
25808bf5c682Smrg      soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
25818bf5c682Smrg      ;;
25828bf5c682Smrg    pw32*)
25838bf5c682Smrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
25848bf5c682Smrg      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
25858bf5c682Smrg      ;;
25868bf5c682Smrg    esac
25878bf5c682Smrg    dynamic_linker='Win32 ld.exe'
25888bf5c682Smrg    ;;
25898bf5c682Smrg
25908bf5c682Smrg  *,cl*)
25918bf5c682Smrg    # Native MSVC
25928bf5c682Smrg    libname_spec='$name'
25938bf5c682Smrg    soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
25948bf5c682Smrg    library_names_spec='$libname.dll.lib'
25958bf5c682Smrg
25968bf5c682Smrg    case $build_os in
25978bf5c682Smrg    mingw*)
25988bf5c682Smrg      sys_lib_search_path_spec=
25998bf5c682Smrg      lt_save_ifs=$IFS
26008bf5c682Smrg      IFS=';'
26018bf5c682Smrg      for lt_path in $LIB
26028bf5c682Smrg      do
26038bf5c682Smrg        IFS=$lt_save_ifs
26048bf5c682Smrg        # Let DOS variable expansion print the short 8.3 style file name.
26058bf5c682Smrg        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
26068bf5c682Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
26078bf5c682Smrg      done
26088bf5c682Smrg      IFS=$lt_save_ifs
26098bf5c682Smrg      # Convert to MSYS style.
26108bf5c682Smrg      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
26118bf5c682Smrg      ;;
26128bf5c682Smrg    cygwin*)
26138bf5c682Smrg      # Convert to unix form, then to dos form, then back to unix form
26148bf5c682Smrg      # but this time dos style (no spaces!) so that the unix form looks
26158bf5c682Smrg      # like /cygdrive/c/PROGRA~1:/cygdr...
26168bf5c682Smrg      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
26178bf5c682Smrg      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
26188bf5c682Smrg      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
26198bf5c682Smrg      ;;
26208bf5c682Smrg    *)
26218bf5c682Smrg      sys_lib_search_path_spec=$LIB
26228bf5c682Smrg      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
26238bf5c682Smrg        # It is most probably a Windows format PATH.
26248bf5c682Smrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
26258bf5c682Smrg      else
26268bf5c682Smrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
26278bf5c682Smrg      fi
26288bf5c682Smrg      # FIXME: find the short name or the path components, as spaces are
26298bf5c682Smrg      # common. (e.g. "Program Files" -> "PROGRA~1")
26308bf5c682Smrg      ;;
26318bf5c682Smrg    esac
26328bf5c682Smrg
26338bf5c682Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
26348bf5c682Smrg    postinstall_cmds='base_file=`basename \$file`~
26358bf5c682Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
26368bf5c682Smrg      dldir=$destdir/`dirname \$dlpath`~
26378bf5c682Smrg      test -d \$dldir || mkdir -p \$dldir~
26388bf5c682Smrg      $install_prog $dir/$dlname \$dldir/$dlname'
26398bf5c682Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
26408bf5c682Smrg      dlpath=$dir/\$dldll~
26418bf5c682Smrg       $RM \$dlpath'
26428bf5c682Smrg    shlibpath_overrides_runpath=yes
26438bf5c682Smrg    dynamic_linker='Win32 link.exe'
26448bf5c682Smrg    ;;
26458bf5c682Smrg
26468bf5c682Smrg  *)
26478bf5c682Smrg    # Assume MSVC wrapper
26488bf5c682Smrg    library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
26498bf5c682Smrg    dynamic_linker='Win32 ld.exe'
26508bf5c682Smrg    ;;
26518bf5c682Smrg  esac
26528bf5c682Smrg  # FIXME: first we should search . and the directory the executable is in
26538bf5c682Smrg  shlibpath_var=PATH
26548bf5c682Smrg  ;;
26558bf5c682Smrg
26568bf5c682Smrgdarwin* | rhapsody*)
26578bf5c682Smrg  dynamic_linker="$host_os dyld"
26588bf5c682Smrg  version_type=darwin
26598bf5c682Smrg  need_lib_prefix=no
26608bf5c682Smrg  need_version=no
26618bf5c682Smrg  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
26628bf5c682Smrg  soname_spec='$libname$release$major$shared_ext'
26638bf5c682Smrg  shlibpath_overrides_runpath=yes
26648bf5c682Smrg  shlibpath_var=DYLD_LIBRARY_PATH
26658bf5c682Smrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
26668bf5c682Smrgm4_if([$1], [],[
26678bf5c682Smrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
26688bf5c682Smrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
26698bf5c682Smrg  ;;
26708bf5c682Smrg
26718bf5c682Smrgdgux*)
26728bf5c682Smrg  version_type=linux # correct to gnu/linux during the next big refactor
26738bf5c682Smrg  need_lib_prefix=no
26748bf5c682Smrg  need_version=no
26758bf5c682Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
26768bf5c682Smrg  soname_spec='$libname$release$shared_ext$major'
26778bf5c682Smrg  shlibpath_var=LD_LIBRARY_PATH
26788bf5c682Smrg  ;;
26798bf5c682Smrg
26808bf5c682Smrgfreebsd* | dragonfly*)
26818bf5c682Smrg  # DragonFly does not have aout.  When/if they implement a new
26828bf5c682Smrg  # versioning mechanism, adjust this.
26838bf5c682Smrg  if test -x /usr/bin/objformat; then
26848bf5c682Smrg    objformat=`/usr/bin/objformat`
26858bf5c682Smrg  else
26868bf5c682Smrg    case $host_os in
26878bf5c682Smrg    freebsd[[23]].*) objformat=aout ;;
26888bf5c682Smrg    *) objformat=elf ;;
26898bf5c682Smrg    esac
26908bf5c682Smrg  fi
26918bf5c682Smrg  version_type=freebsd-$objformat
26928bf5c682Smrg  case $version_type in
26938bf5c682Smrg    freebsd-elf*)
26948bf5c682Smrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
26958bf5c682Smrg      soname_spec='$libname$release$shared_ext$major'
26968bf5c682Smrg      need_version=no
26978bf5c682Smrg      need_lib_prefix=no
26988bf5c682Smrg      ;;
26998bf5c682Smrg    freebsd-*)
27008bf5c682Smrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
27018bf5c682Smrg      need_version=yes
27028bf5c682Smrg      ;;
27038bf5c682Smrg  esac
27048bf5c682Smrg  shlibpath_var=LD_LIBRARY_PATH
27058bf5c682Smrg  case $host_os in
27068bf5c682Smrg  freebsd2.*)
27078bf5c682Smrg    shlibpath_overrides_runpath=yes
27088bf5c682Smrg    ;;
27098bf5c682Smrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
27108bf5c682Smrg    shlibpath_overrides_runpath=yes
27118bf5c682Smrg    hardcode_into_libs=yes
27128bf5c682Smrg    ;;
27138bf5c682Smrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
27148bf5c682Smrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
27158bf5c682Smrg    shlibpath_overrides_runpath=no
27168bf5c682Smrg    hardcode_into_libs=yes
27178bf5c682Smrg    ;;
27188bf5c682Smrg  *) # from 4.6 on, and DragonFly
27198bf5c682Smrg    shlibpath_overrides_runpath=yes
27208bf5c682Smrg    hardcode_into_libs=yes
27218bf5c682Smrg    ;;
27228bf5c682Smrg  esac
27238bf5c682Smrg  ;;
27248bf5c682Smrg
27258bf5c682Smrghaiku*)
27268bf5c682Smrg  version_type=linux # correct to gnu/linux during the next big refactor
27278bf5c682Smrg  need_lib_prefix=no
27288bf5c682Smrg  need_version=no
27298bf5c682Smrg  dynamic_linker="$host_os runtime_loader"
27308bf5c682Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
27318bf5c682Smrg  soname_spec='$libname$release$shared_ext$major'
27328bf5c682Smrg  shlibpath_var=LIBRARY_PATH
27338bf5c682Smrg  shlibpath_overrides_runpath=no
27348bf5c682Smrg  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
27358bf5c682Smrg  hardcode_into_libs=yes
27368bf5c682Smrg  ;;
27378bf5c682Smrg
27388bf5c682Smrghpux9* | hpux10* | hpux11*)
27398bf5c682Smrg  # Give a soname corresponding to the major version so that dld.sl refuses to
27408bf5c682Smrg  # link against other versions.
27418bf5c682Smrg  version_type=sunos
27428bf5c682Smrg  need_lib_prefix=no
27438bf5c682Smrg  need_version=no
27448bf5c682Smrg  case $host_cpu in
27458bf5c682Smrg  ia64*)
27468bf5c682Smrg    shrext_cmds='.so'
27478bf5c682Smrg    hardcode_into_libs=yes
27488bf5c682Smrg    dynamic_linker="$host_os dld.so"
27498bf5c682Smrg    shlibpath_var=LD_LIBRARY_PATH
27508bf5c682Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
27518bf5c682Smrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
27528bf5c682Smrg    soname_spec='$libname$release$shared_ext$major'
27538bf5c682Smrg    if test 32 = "$HPUX_IA64_MODE"; then
27548bf5c682Smrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
27558bf5c682Smrg      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
27568bf5c682Smrg    else
27578bf5c682Smrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
27588bf5c682Smrg      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
27598bf5c682Smrg    fi
27608bf5c682Smrg    ;;
27618bf5c682Smrg  hppa*64*)
27628bf5c682Smrg    shrext_cmds='.sl'
27638bf5c682Smrg    hardcode_into_libs=yes
27648bf5c682Smrg    dynamic_linker="$host_os dld.sl"
27658bf5c682Smrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
27668bf5c682Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
27678bf5c682Smrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
27688bf5c682Smrg    soname_spec='$libname$release$shared_ext$major'
27698bf5c682Smrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
27708bf5c682Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
27718bf5c682Smrg    ;;
27728bf5c682Smrg  *)
27738bf5c682Smrg    shrext_cmds='.sl'
27748bf5c682Smrg    dynamic_linker="$host_os dld.sl"
27758bf5c682Smrg    shlibpath_var=SHLIB_PATH
27768bf5c682Smrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
27778bf5c682Smrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
27788bf5c682Smrg    soname_spec='$libname$release$shared_ext$major'
27798bf5c682Smrg    ;;
27808bf5c682Smrg  esac
27818bf5c682Smrg  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
27828bf5c682Smrg  postinstall_cmds='chmod 555 $lib'
27838bf5c682Smrg  # or fails outright, so override atomically:
27848bf5c682Smrg  install_override_mode=555
27858bf5c682Smrg  ;;
27868bf5c682Smrg
27878bf5c682Smrginterix[[3-9]]*)
27888bf5c682Smrg  version_type=linux # correct to gnu/linux during the next big refactor
27898bf5c682Smrg  need_lib_prefix=no
27908bf5c682Smrg  need_version=no
27918bf5c682Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
27928bf5c682Smrg  soname_spec='$libname$release$shared_ext$major'
27938bf5c682Smrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
27948bf5c682Smrg  shlibpath_var=LD_LIBRARY_PATH
27958bf5c682Smrg  shlibpath_overrides_runpath=no
27968bf5c682Smrg  hardcode_into_libs=yes
27978bf5c682Smrg  ;;
27988bf5c682Smrg
27998bf5c682Smrgirix5* | irix6* | nonstopux*)
28008bf5c682Smrg  case $host_os in
28018bf5c682Smrg    nonstopux*) version_type=nonstopux ;;
28028bf5c682Smrg    *)
28038bf5c682Smrg	if test yes = "$lt_cv_prog_gnu_ld"; then
28048bf5c682Smrg		version_type=linux # correct to gnu/linux during the next big refactor
28058bf5c682Smrg	else
28068bf5c682Smrg		version_type=irix
28078bf5c682Smrg	fi ;;
28088bf5c682Smrg  esac
28098bf5c682Smrg  need_lib_prefix=no
28108bf5c682Smrg  need_version=no
28118bf5c682Smrg  soname_spec='$libname$release$shared_ext$major'
28128bf5c682Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
28138bf5c682Smrg  case $host_os in
28148bf5c682Smrg  irix5* | nonstopux*)
28158bf5c682Smrg    libsuff= shlibsuff=
28168bf5c682Smrg    ;;
28178bf5c682Smrg  *)
28188bf5c682Smrg    case $LD in # libtool.m4 will add one of these switches to LD
28198bf5c682Smrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
28208bf5c682Smrg      libsuff= shlibsuff= libmagic=32-bit;;
28218bf5c682Smrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
28228bf5c682Smrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
28238bf5c682Smrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
28248bf5c682Smrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
28258bf5c682Smrg    *) libsuff= shlibsuff= libmagic=never-match;;
28268bf5c682Smrg    esac
28278bf5c682Smrg    ;;
28288bf5c682Smrg  esac
28298bf5c682Smrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
28308bf5c682Smrg  shlibpath_overrides_runpath=no
28318bf5c682Smrg  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
28328bf5c682Smrg  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
28338bf5c682Smrg  hardcode_into_libs=yes
28348bf5c682Smrg  ;;
28358bf5c682Smrg
28368bf5c682Smrg# No shared lib support for Linux oldld, aout, or coff.
28378bf5c682Smrglinux*oldld* | linux*aout* | linux*coff*)
28388bf5c682Smrg  dynamic_linker=no
28398bf5c682Smrg  ;;
28408bf5c682Smrg
28418bf5c682Smrglinux*android*)
28428bf5c682Smrg  version_type=none # Android doesn't support versioned libraries.
28438bf5c682Smrg  need_lib_prefix=no
28448bf5c682Smrg  need_version=no
28458bf5c682Smrg  library_names_spec='$libname$release$shared_ext'
28468bf5c682Smrg  soname_spec='$libname$release$shared_ext'
28478bf5c682Smrg  finish_cmds=
28488bf5c682Smrg  shlibpath_var=LD_LIBRARY_PATH
28498bf5c682Smrg  shlibpath_overrides_runpath=yes
28508bf5c682Smrg
28518bf5c682Smrg  # This implies no fast_install, which is unacceptable.
28528bf5c682Smrg  # Some rework will be needed to allow for fast_install
28538bf5c682Smrg  # before this can be enabled.
28548bf5c682Smrg  hardcode_into_libs=yes
28558bf5c682Smrg
28568bf5c682Smrg  dynamic_linker='Android linker'
28578bf5c682Smrg  # Don't embed -rpath directories since the linker doesn't support them.
28588bf5c682Smrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
28598bf5c682Smrg  ;;
28608bf5c682Smrg
28618bf5c682Smrg# This must be glibc/ELF.
28628bf5c682Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
28638bf5c682Smrg  version_type=linux # correct to gnu/linux during the next big refactor
28648bf5c682Smrg  need_lib_prefix=no
28658bf5c682Smrg  need_version=no
28668bf5c682Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
28678bf5c682Smrg  soname_spec='$libname$release$shared_ext$major'
28688bf5c682Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
28698bf5c682Smrg  shlibpath_var=LD_LIBRARY_PATH
28708bf5c682Smrg  shlibpath_overrides_runpath=no
28718bf5c682Smrg
28728bf5c682Smrg  # Some binutils ld are patched to set DT_RUNPATH
28738bf5c682Smrg  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
28748bf5c682Smrg    [lt_cv_shlibpath_overrides_runpath=no
28758bf5c682Smrg    save_LDFLAGS=$LDFLAGS
28768bf5c682Smrg    save_libdir=$libdir
28778bf5c682Smrg    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
28788bf5c682Smrg	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
28798bf5c682Smrg    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
28808bf5c682Smrg      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
28818bf5c682Smrg	 [lt_cv_shlibpath_overrides_runpath=yes])])
28828bf5c682Smrg    LDFLAGS=$save_LDFLAGS
28838bf5c682Smrg    libdir=$save_libdir
28848bf5c682Smrg    ])
28858bf5c682Smrg  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
28868bf5c682Smrg
28878bf5c682Smrg  # This implies no fast_install, which is unacceptable.
28888bf5c682Smrg  # Some rework will be needed to allow for fast_install
28898bf5c682Smrg  # before this can be enabled.
28908bf5c682Smrg  hardcode_into_libs=yes
28918bf5c682Smrg
28928bf5c682Smrg  # Ideally, we could use ldconfig to report *all* directores which are
28938bf5c682Smrg  # searched for libraries, however this is still not possible.  Aside from not
28948bf5c682Smrg  # being certain /sbin/ldconfig is available, command
28958bf5c682Smrg  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
28968bf5c682Smrg  # even though it is searched at run-time.  Try to do the best guess by
28978bf5c682Smrg  # appending ld.so.conf contents (and includes) to the search path.
28988bf5c682Smrg  if test -f /etc/ld.so.conf; then
28998bf5c682Smrg    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' ' '`
29008bf5c682Smrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
29018bf5c682Smrg  fi
29028bf5c682Smrg
29038bf5c682Smrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
29048bf5c682Smrg  # powerpc, because MkLinux only supported shared libraries with the
29058bf5c682Smrg  # GNU dynamic linker.  Since this was broken with cross compilers,
29068bf5c682Smrg  # most powerpc-linux boxes support dynamic linking these days and
29078bf5c682Smrg  # people can always --disable-shared, the test was removed, and we
29088bf5c682Smrg  # assume the GNU/Linux dynamic linker is in use.
29098bf5c682Smrg  dynamic_linker='GNU/Linux ld.so'
29108bf5c682Smrg  ;;
29118bf5c682Smrg
29128bf5c682Smrgnetbsd*)
29138bf5c682Smrg  version_type=sunos
29148bf5c682Smrg  need_lib_prefix=no
29158bf5c682Smrg  need_version=no
29168bf5c682Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
29178bf5c682Smrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
29188bf5c682Smrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
29198bf5c682Smrg    dynamic_linker='NetBSD (a.out) ld.so'
29208bf5c682Smrg  else
29218bf5c682Smrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
29228bf5c682Smrg    soname_spec='$libname$release$shared_ext$major'
29238bf5c682Smrg    dynamic_linker='NetBSD ld.elf_so'
29248bf5c682Smrg  fi
29258bf5c682Smrg  shlibpath_var=LD_LIBRARY_PATH
29268bf5c682Smrg  shlibpath_overrides_runpath=yes
29278bf5c682Smrg  hardcode_into_libs=yes
29288bf5c682Smrg  ;;
29298bf5c682Smrg
29308bf5c682Smrgnewsos6)
29318bf5c682Smrg  version_type=linux # correct to gnu/linux during the next big refactor
29328bf5c682Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
29338bf5c682Smrg  shlibpath_var=LD_LIBRARY_PATH
29348bf5c682Smrg  shlibpath_overrides_runpath=yes
29358bf5c682Smrg  ;;
29368bf5c682Smrg
29378bf5c682Smrg*nto* | *qnx*)
29388bf5c682Smrg  version_type=qnx
29398bf5c682Smrg  need_lib_prefix=no
29408bf5c682Smrg  need_version=no
29418bf5c682Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
29428bf5c682Smrg  soname_spec='$libname$release$shared_ext$major'
29438bf5c682Smrg  shlibpath_var=LD_LIBRARY_PATH
29448bf5c682Smrg  shlibpath_overrides_runpath=no
29458bf5c682Smrg  hardcode_into_libs=yes
29468bf5c682Smrg  dynamic_linker='ldqnx.so'
29478bf5c682Smrg  ;;
29488bf5c682Smrg
29498bf5c682Smrgopenbsd* | bitrig*)
29508bf5c682Smrg  version_type=sunos
29518bf5c682Smrg  sys_lib_dlsearch_path_spec=/usr/lib
29528bf5c682Smrg  need_lib_prefix=no
29538bf5c682Smrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
29548bf5c682Smrg    need_version=no
29558bf5c682Smrg  else
29568bf5c682Smrg    need_version=yes
29578bf5c682Smrg  fi
29588bf5c682Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
29598bf5c682Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
29608bf5c682Smrg  shlibpath_var=LD_LIBRARY_PATH
29618bf5c682Smrg  shlibpath_overrides_runpath=yes
29628bf5c682Smrg  ;;
29638bf5c682Smrg
29648bf5c682Smrgos2*)
29658bf5c682Smrg  libname_spec='$name'
29668bf5c682Smrg  version_type=windows
29678bf5c682Smrg  shrext_cmds=.dll
29688bf5c682Smrg  need_version=no
29698bf5c682Smrg  need_lib_prefix=no
29708bf5c682Smrg  # OS/2 can only load a DLL with a base name of 8 characters or less.
29718bf5c682Smrg  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
29728bf5c682Smrg    v=$($ECHO $release$versuffix | tr -d .-);
29738bf5c682Smrg    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
29748bf5c682Smrg    $ECHO $n$v`$shared_ext'
29758bf5c682Smrg  library_names_spec='${libname}_dll.$libext'
29768bf5c682Smrg  dynamic_linker='OS/2 ld.exe'
29778bf5c682Smrg  shlibpath_var=BEGINLIBPATH
29788bf5c682Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
29798bf5c682Smrg  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
29808bf5c682Smrg  postinstall_cmds='base_file=`basename \$file`~
29818bf5c682Smrg    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
29828bf5c682Smrg    dldir=$destdir/`dirname \$dlpath`~
29838bf5c682Smrg    test -d \$dldir || mkdir -p \$dldir~
29848bf5c682Smrg    $install_prog $dir/$dlname \$dldir/$dlname~
29858bf5c682Smrg    chmod a+x \$dldir/$dlname~
29868bf5c682Smrg    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
29878bf5c682Smrg      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
29888bf5c682Smrg    fi'
29898bf5c682Smrg  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
29908bf5c682Smrg    dlpath=$dir/\$dldll~
29918bf5c682Smrg    $RM \$dlpath'
29928bf5c682Smrg  ;;
29938bf5c682Smrg
29948bf5c682Smrgosf3* | osf4* | osf5*)
29958bf5c682Smrg  version_type=osf
29968bf5c682Smrg  need_lib_prefix=no
29978bf5c682Smrg  need_version=no
29988bf5c682Smrg  soname_spec='$libname$release$shared_ext$major'
29998bf5c682Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
30008bf5c682Smrg  shlibpath_var=LD_LIBRARY_PATH
30018bf5c682Smrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
30028bf5c682Smrg  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
30038bf5c682Smrg  ;;
30048bf5c682Smrg
30058bf5c682Smrgrdos*)
30068bf5c682Smrg  dynamic_linker=no
30078bf5c682Smrg  ;;
30088bf5c682Smrg
30098bf5c682Smrgsolaris*)
30108bf5c682Smrg  version_type=linux # correct to gnu/linux during the next big refactor
30118bf5c682Smrg  need_lib_prefix=no
30128bf5c682Smrg  need_version=no
30138bf5c682Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
30148bf5c682Smrg  soname_spec='$libname$release$shared_ext$major'
30158bf5c682Smrg  shlibpath_var=LD_LIBRARY_PATH
30168bf5c682Smrg  shlibpath_overrides_runpath=yes
30178bf5c682Smrg  hardcode_into_libs=yes
30188bf5c682Smrg  # ldd complains unless libraries are executable
30198bf5c682Smrg  postinstall_cmds='chmod +x $lib'
30208bf5c682Smrg  ;;
30218bf5c682Smrg
30228bf5c682Smrgsunos4*)
30238bf5c682Smrg  version_type=sunos
30248bf5c682Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
30258bf5c682Smrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
30268bf5c682Smrg  shlibpath_var=LD_LIBRARY_PATH
30278bf5c682Smrg  shlibpath_overrides_runpath=yes
30288bf5c682Smrg  if test yes = "$with_gnu_ld"; then
30298bf5c682Smrg    need_lib_prefix=no
30308bf5c682Smrg  fi
30318bf5c682Smrg  need_version=yes
30328bf5c682Smrg  ;;
30338bf5c682Smrg
30348bf5c682Smrgsysv4 | sysv4.3*)
30358bf5c682Smrg  version_type=linux # correct to gnu/linux during the next big refactor
30368bf5c682Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
30378bf5c682Smrg  soname_spec='$libname$release$shared_ext$major'
30388bf5c682Smrg  shlibpath_var=LD_LIBRARY_PATH
30398bf5c682Smrg  case $host_vendor in
30408bf5c682Smrg    sni)
30418bf5c682Smrg      shlibpath_overrides_runpath=no
30428bf5c682Smrg      need_lib_prefix=no
30438bf5c682Smrg      runpath_var=LD_RUN_PATH
30448bf5c682Smrg      ;;
30458bf5c682Smrg    siemens)
30468bf5c682Smrg      need_lib_prefix=no
30478bf5c682Smrg      ;;
30488bf5c682Smrg    motorola)
30498bf5c682Smrg      need_lib_prefix=no
30508bf5c682Smrg      need_version=no
30518bf5c682Smrg      shlibpath_overrides_runpath=no
30528bf5c682Smrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
30538bf5c682Smrg      ;;
30548bf5c682Smrg  esac
30558bf5c682Smrg  ;;
30568bf5c682Smrg
30578bf5c682Smrgsysv4*MP*)
30588bf5c682Smrg  if test -d /usr/nec; then
30598bf5c682Smrg    version_type=linux # correct to gnu/linux during the next big refactor
30608bf5c682Smrg    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
30618bf5c682Smrg    soname_spec='$libname$shared_ext.$major'
30628bf5c682Smrg    shlibpath_var=LD_LIBRARY_PATH
30638bf5c682Smrg  fi
30648bf5c682Smrg  ;;
30658bf5c682Smrg
30668bf5c682Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
30678bf5c682Smrg  version_type=sco
30688bf5c682Smrg  need_lib_prefix=no
30698bf5c682Smrg  need_version=no
30708bf5c682Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
30718bf5c682Smrg  soname_spec='$libname$release$shared_ext$major'
30728bf5c682Smrg  shlibpath_var=LD_LIBRARY_PATH
30738bf5c682Smrg  shlibpath_overrides_runpath=yes
30748bf5c682Smrg  hardcode_into_libs=yes
30758bf5c682Smrg  if test yes = "$with_gnu_ld"; then
30768bf5c682Smrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
30778bf5c682Smrg  else
30788bf5c682Smrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
30798bf5c682Smrg    case $host_os in
30808bf5c682Smrg      sco3.2v5*)
30818bf5c682Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
30828bf5c682Smrg	;;
30838bf5c682Smrg    esac
30848bf5c682Smrg  fi
30858bf5c682Smrg  sys_lib_dlsearch_path_spec='/usr/lib'
30868bf5c682Smrg  ;;
30878bf5c682Smrg
30888bf5c682Smrgtpf*)
30898bf5c682Smrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
30908bf5c682Smrg  version_type=linux # correct to gnu/linux during the next big refactor
30918bf5c682Smrg  need_lib_prefix=no
30928bf5c682Smrg  need_version=no
30938bf5c682Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
30948bf5c682Smrg  shlibpath_var=LD_LIBRARY_PATH
30958bf5c682Smrg  shlibpath_overrides_runpath=no
30968bf5c682Smrg  hardcode_into_libs=yes
30978bf5c682Smrg  ;;
30988bf5c682Smrg
30998bf5c682Smrguts4*)
31008bf5c682Smrg  version_type=linux # correct to gnu/linux during the next big refactor
31018bf5c682Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
31028bf5c682Smrg  soname_spec='$libname$release$shared_ext$major'
31038bf5c682Smrg  shlibpath_var=LD_LIBRARY_PATH
31048bf5c682Smrg  ;;
31058bf5c682Smrg
31068bf5c682Smrg*)
31078bf5c682Smrg  dynamic_linker=no
31088bf5c682Smrg  ;;
31098bf5c682Smrgesac
31108bf5c682SmrgAC_MSG_RESULT([$dynamic_linker])
31118bf5c682Smrgtest no = "$dynamic_linker" && can_build_shared=no
31128bf5c682Smrg
31138bf5c682Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
31148bf5c682Smrgif test yes = "$GCC"; then
31158bf5c682Smrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
31168bf5c682Smrgfi
31178bf5c682Smrg
31188bf5c682Smrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
31198bf5c682Smrg  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
31208bf5c682Smrgfi
31218bf5c682Smrg
31228bf5c682Smrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
31238bf5c682Smrg  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
31248bf5c682Smrgfi
31258bf5c682Smrg
31268bf5c682Smrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
31278bf5c682Smrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
31288bf5c682Smrg
31298bf5c682Smrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
31308bf5c682Smrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
31318bf5c682Smrg
31328bf5c682Smrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
31338bf5c682Smrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
31348bf5c682Smrg
31358bf5c682Smrg_LT_DECL([], [variables_saved_for_relink], [1],
31368bf5c682Smrg    [Variables whose values should be saved in libtool wrapper scripts and
31378bf5c682Smrg    restored at link time])
31388bf5c682Smrg_LT_DECL([], [need_lib_prefix], [0],
31398bf5c682Smrg    [Do we need the "lib" prefix for modules?])
31408bf5c682Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
31418bf5c682Smrg_LT_DECL([], [version_type], [0], [Library versioning type])
31428bf5c682Smrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
31438bf5c682Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
31448bf5c682Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
31458bf5c682Smrg    [Is shlibpath searched before the hard-coded library search path?])
31468bf5c682Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
31478bf5c682Smrg_LT_DECL([], [library_names_spec], [1],
31488bf5c682Smrg    [[List of archive names.  First name is the real one, the rest are links.
31498bf5c682Smrg    The last name is the one that the linker finds with -lNAME]])
31508bf5c682Smrg_LT_DECL([], [soname_spec], [1],
31518bf5c682Smrg    [[The coded name of the library, if different from the real name]])
31528bf5c682Smrg_LT_DECL([], [install_override_mode], [1],
31538bf5c682Smrg    [Permission mode override for installation of shared libraries])
31548bf5c682Smrg_LT_DECL([], [postinstall_cmds], [2],
31558bf5c682Smrg    [Command to use after installation of a shared archive])
31568bf5c682Smrg_LT_DECL([], [postuninstall_cmds], [2],
31578bf5c682Smrg    [Command to use after uninstallation of a shared archive])
31588bf5c682Smrg_LT_DECL([], [finish_cmds], [2],
31598bf5c682Smrg    [Commands used to finish a libtool library installation in a directory])
31608bf5c682Smrg_LT_DECL([], [finish_eval], [1],
31618bf5c682Smrg    [[As "finish_cmds", except a single script fragment to be evaled but
31628bf5c682Smrg    not shown]])
31638bf5c682Smrg_LT_DECL([], [hardcode_into_libs], [0],
31648bf5c682Smrg    [Whether we should hardcode library paths into libraries])
31658bf5c682Smrg_LT_DECL([], [sys_lib_search_path_spec], [2],
31668bf5c682Smrg    [Compile-time system search path for libraries])
31678bf5c682Smrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
31688bf5c682Smrg    [Detected run-time system search path for libraries])
31698bf5c682Smrg_LT_DECL([], [configure_time_lt_sys_library_path], [2],
31708bf5c682Smrg    [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
31718bf5c682Smrg])# _LT_SYS_DYNAMIC_LINKER
31728bf5c682Smrg
31738bf5c682Smrg
31748bf5c682Smrg# _LT_PATH_TOOL_PREFIX(TOOL)
31758bf5c682Smrg# --------------------------
31768bf5c682Smrg# find a file program that can recognize shared library
31778bf5c682SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
31788bf5c682Smrg[m4_require([_LT_DECL_EGREP])dnl
31798bf5c682SmrgAC_MSG_CHECKING([for $1])
31808bf5c682SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
31818bf5c682Smrg[case $MAGIC_CMD in
31828bf5c682Smrg[[\\/*] |  ?:[\\/]*])
31838bf5c682Smrg  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
31848bf5c682Smrg  ;;
31858bf5c682Smrg*)
31868bf5c682Smrg  lt_save_MAGIC_CMD=$MAGIC_CMD
31878bf5c682Smrg  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
31888bf5c682Smrgdnl $ac_dummy forces splitting on constant user-supplied paths.
31898bf5c682Smrgdnl POSIX.2 word splitting is done only on the output of word expansions,
31908bf5c682Smrgdnl not every word.  This closes a longstanding sh security hole.
31918bf5c682Smrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
31928bf5c682Smrg  for ac_dir in $ac_dummy; do
31938bf5c682Smrg    IFS=$lt_save_ifs
31948bf5c682Smrg    test -z "$ac_dir" && ac_dir=.
31958bf5c682Smrg    if test -f "$ac_dir/$1"; then
31968bf5c682Smrg      lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
31978bf5c682Smrg      if test -n "$file_magic_test_file"; then
31988bf5c682Smrg	case $deplibs_check_method in
31998bf5c682Smrg	"file_magic "*)
32008bf5c682Smrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
32018bf5c682Smrg	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
32028bf5c682Smrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
32038bf5c682Smrg	    $EGREP "$file_magic_regex" > /dev/null; then
32048bf5c682Smrg	    :
32058bf5c682Smrg	  else
32068bf5c682Smrg	    cat <<_LT_EOF 1>&2
32078bf5c682Smrg
32088bf5c682Smrg*** Warning: the command libtool uses to detect shared libraries,
32098bf5c682Smrg*** $file_magic_cmd, produces output that libtool cannot recognize.
32108bf5c682Smrg*** The result is that libtool may fail to recognize shared libraries
32118bf5c682Smrg*** as such.  This will affect the creation of libtool libraries that
32128bf5c682Smrg*** depend on shared libraries, but programs linked with such libtool
32138bf5c682Smrg*** libraries will work regardless of this problem.  Nevertheless, you
32148bf5c682Smrg*** may want to report the problem to your system manager and/or to
32158bf5c682Smrg*** bug-libtool@gnu.org
32168bf5c682Smrg
32178bf5c682Smrg_LT_EOF
32188bf5c682Smrg	  fi ;;
32198bf5c682Smrg	esac
32208bf5c682Smrg      fi
32218bf5c682Smrg      break
32228bf5c682Smrg    fi
32238bf5c682Smrg  done
32248bf5c682Smrg  IFS=$lt_save_ifs
32258bf5c682Smrg  MAGIC_CMD=$lt_save_MAGIC_CMD
32268bf5c682Smrg  ;;
32278bf5c682Smrgesac])
32288bf5c682SmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD
32298bf5c682Smrgif test -n "$MAGIC_CMD"; then
32308bf5c682Smrg  AC_MSG_RESULT($MAGIC_CMD)
32318bf5c682Smrgelse
32328bf5c682Smrg  AC_MSG_RESULT(no)
32338bf5c682Smrgfi
32348bf5c682Smrg_LT_DECL([], [MAGIC_CMD], [0],
32358bf5c682Smrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
32368bf5c682Smrg])# _LT_PATH_TOOL_PREFIX
32378bf5c682Smrg
32388bf5c682Smrg# Old name:
32398bf5c682SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
32408bf5c682Smrgdnl aclocal-1.4 backwards compatibility:
32418bf5c682Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
32428bf5c682Smrg
32438bf5c682Smrg
32448bf5c682Smrg# _LT_PATH_MAGIC
32458bf5c682Smrg# --------------
32468bf5c682Smrg# find a file program that can recognize a shared library
32478bf5c682Smrgm4_defun([_LT_PATH_MAGIC],
32488bf5c682Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
32498bf5c682Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then
32508bf5c682Smrg  if test -n "$ac_tool_prefix"; then
32518bf5c682Smrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
32528bf5c682Smrg  else
32538bf5c682Smrg    MAGIC_CMD=:
32548bf5c682Smrg  fi
32558bf5c682Smrgfi
32568bf5c682Smrg])# _LT_PATH_MAGIC
32578bf5c682Smrg
32588bf5c682Smrg
32598bf5c682Smrg# LT_PATH_LD
32608bf5c682Smrg# ----------
32618bf5c682Smrg# find the pathname to the GNU or non-GNU linker
32628bf5c682SmrgAC_DEFUN([LT_PATH_LD],
32638bf5c682Smrg[AC_REQUIRE([AC_PROG_CC])dnl
32648bf5c682SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
32658bf5c682SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
32668bf5c682Smrgm4_require([_LT_DECL_SED])dnl
32678bf5c682Smrgm4_require([_LT_DECL_EGREP])dnl
32688bf5c682Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl
32698bf5c682Smrg
32708bf5c682SmrgAC_ARG_WITH([gnu-ld],
32718bf5c682Smrg    [AS_HELP_STRING([--with-gnu-ld],
32728bf5c682Smrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
32738bf5c682Smrg    [test no = "$withval" || with_gnu_ld=yes],
32748bf5c682Smrg    [with_gnu_ld=no])dnl
32758bf5c682Smrg
32768bf5c682Smrgac_prog=ld
32778bf5c682Smrgif test yes = "$GCC"; then
32788bf5c682Smrg  # Check if gcc -print-prog-name=ld gives a path.
32798bf5c682Smrg  AC_MSG_CHECKING([for ld used by $CC])
32808bf5c682Smrg  case $host in
32818bf5c682Smrg  *-*-mingw*)
32828bf5c682Smrg    # gcc leaves a trailing carriage return, which upsets mingw
32838bf5c682Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
32848bf5c682Smrg  *)
32858bf5c682Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
32868bf5c682Smrg  esac
32878bf5c682Smrg  case $ac_prog in
32888bf5c682Smrg    # Accept absolute paths.
32898bf5c682Smrg    [[\\/]]* | ?:[[\\/]]*)
32908bf5c682Smrg      re_direlt='/[[^/]][[^/]]*/\.\./'
32918bf5c682Smrg      # Canonicalize the pathname of ld
32928bf5c682Smrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
32938bf5c682Smrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
32948bf5c682Smrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
32958bf5c682Smrg      done
32968bf5c682Smrg      test -z "$LD" && LD=$ac_prog
32978bf5c682Smrg      ;;
32988bf5c682Smrg  "")
32998bf5c682Smrg    # If it fails, then pretend we aren't using GCC.
33008bf5c682Smrg    ac_prog=ld
33018bf5c682Smrg    ;;
33028bf5c682Smrg  *)
33038bf5c682Smrg    # If it is relative, then search for the first ld in PATH.
33048bf5c682Smrg    with_gnu_ld=unknown
33058bf5c682Smrg    ;;
33068bf5c682Smrg  esac
33078bf5c682Smrgelif test yes = "$with_gnu_ld"; then
33088bf5c682Smrg  AC_MSG_CHECKING([for GNU ld])
33098bf5c682Smrgelse
33108bf5c682Smrg  AC_MSG_CHECKING([for non-GNU ld])
33118bf5c682Smrgfi
33128bf5c682SmrgAC_CACHE_VAL(lt_cv_path_LD,
33138bf5c682Smrg[if test -z "$LD"; then
33148bf5c682Smrg  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
33158bf5c682Smrg  for ac_dir in $PATH; do
33168bf5c682Smrg    IFS=$lt_save_ifs
33178bf5c682Smrg    test -z "$ac_dir" && ac_dir=.
33188bf5c682Smrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
33198bf5c682Smrg      lt_cv_path_LD=$ac_dir/$ac_prog
33208bf5c682Smrg      # Check to see if the program is GNU ld.  I'd rather use --version,
33218bf5c682Smrg      # but apparently some variants of GNU ld only accept -v.
33228bf5c682Smrg      # Break only if it was the GNU/non-GNU ld that we prefer.
33238bf5c682Smrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
33248bf5c682Smrg      *GNU* | *'with BFD'*)
33258bf5c682Smrg	test no != "$with_gnu_ld" && break
33268bf5c682Smrg	;;
33278bf5c682Smrg      *)
33288bf5c682Smrg	test yes != "$with_gnu_ld" && break
33298bf5c682Smrg	;;
33308bf5c682Smrg      esac
33318bf5c682Smrg    fi
33328bf5c682Smrg  done
33338bf5c682Smrg  IFS=$lt_save_ifs
33348bf5c682Smrgelse
33358bf5c682Smrg  lt_cv_path_LD=$LD # Let the user override the test with a path.
33368bf5c682Smrgfi])
33378bf5c682SmrgLD=$lt_cv_path_LD
33388bf5c682Smrgif test -n "$LD"; then
33398bf5c682Smrg  AC_MSG_RESULT($LD)
33408bf5c682Smrgelse
33418bf5c682Smrg  AC_MSG_RESULT(no)
33428bf5c682Smrgfi
33438bf5c682Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
33448bf5c682Smrg_LT_PATH_LD_GNU
33458bf5c682SmrgAC_SUBST([LD])
33468bf5c682Smrg
33478bf5c682Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
33488bf5c682Smrg])# LT_PATH_LD
33498bf5c682Smrg
33508bf5c682Smrg# Old names:
33518bf5c682SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
33528bf5c682SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
33538bf5c682Smrgdnl aclocal-1.4 backwards compatibility:
33548bf5c682Smrgdnl AC_DEFUN([AM_PROG_LD], [])
33558bf5c682Smrgdnl AC_DEFUN([AC_PROG_LD], [])
33568bf5c682Smrg
33578bf5c682Smrg
33588bf5c682Smrg# _LT_PATH_LD_GNU
33598bf5c682Smrg#- --------------
33608bf5c682Smrgm4_defun([_LT_PATH_LD_GNU],
33618bf5c682Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
33628bf5c682Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
33638bf5c682Smrgcase `$LD -v 2>&1 </dev/null` in
33648bf5c682Smrg*GNU* | *'with BFD'*)
33658bf5c682Smrg  lt_cv_prog_gnu_ld=yes
33668bf5c682Smrg  ;;
33678bf5c682Smrg*)
33688bf5c682Smrg  lt_cv_prog_gnu_ld=no
33698bf5c682Smrg  ;;
33708bf5c682Smrgesac])
33718bf5c682Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
33728bf5c682Smrg])# _LT_PATH_LD_GNU
33738bf5c682Smrg
33748bf5c682Smrg
33758bf5c682Smrg# _LT_CMD_RELOAD
33768bf5c682Smrg# --------------
33778bf5c682Smrg# find reload flag for linker
33788bf5c682Smrg#   -- PORTME Some linkers may need a different reload flag.
33798bf5c682Smrgm4_defun([_LT_CMD_RELOAD],
33808bf5c682Smrg[AC_CACHE_CHECK([for $LD option to reload object files],
33818bf5c682Smrg  lt_cv_ld_reload_flag,
33828bf5c682Smrg  [lt_cv_ld_reload_flag='-r'])
33838bf5c682Smrgreload_flag=$lt_cv_ld_reload_flag
33848bf5c682Smrgcase $reload_flag in
33858bf5c682Smrg"" | " "*) ;;
33868bf5c682Smrg*) reload_flag=" $reload_flag" ;;
33878bf5c682Smrgesac
33888bf5c682Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
33898bf5c682Smrgcase $host_os in
33908bf5c682Smrg  cygwin* | mingw* | pw32* | cegcc*)
33918bf5c682Smrg    if test yes != "$GCC"; then
33928bf5c682Smrg      reload_cmds=false
33938bf5c682Smrg    fi
33948bf5c682Smrg    ;;
33958bf5c682Smrg  darwin*)
33968bf5c682Smrg    if test yes = "$GCC"; then
33978bf5c682Smrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
33988bf5c682Smrg    else
33998bf5c682Smrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
34008bf5c682Smrg    fi
34018bf5c682Smrg    ;;
34028bf5c682Smrgesac
34038bf5c682Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
34048bf5c682Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl
34058bf5c682Smrg])# _LT_CMD_RELOAD
34068bf5c682Smrg
34078bf5c682Smrg
34088bf5c682Smrg# _LT_PATH_DD
34098bf5c682Smrg# -----------
34108bf5c682Smrg# find a working dd
34118bf5c682Smrgm4_defun([_LT_PATH_DD],
34128bf5c682Smrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
34138bf5c682Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i
34148bf5c682Smrgcat conftest.i conftest.i >conftest2.i
34158bf5c682Smrg: ${lt_DD:=$DD}
34168bf5c682SmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
34178bf5c682Smrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
34188bf5c682Smrg  cmp -s conftest.i conftest.out \
34198bf5c682Smrg  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
34208bf5c682Smrgfi])
34218bf5c682Smrgrm -f conftest.i conftest2.i conftest.out])
34228bf5c682Smrg])# _LT_PATH_DD
34238bf5c682Smrg
34248bf5c682Smrg
34258bf5c682Smrg# _LT_CMD_TRUNCATE
34268bf5c682Smrg# ----------------
34278bf5c682Smrg# find command to truncate a binary pipe
34288bf5c682Smrgm4_defun([_LT_CMD_TRUNCATE],
34298bf5c682Smrg[m4_require([_LT_PATH_DD])
34308bf5c682SmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
34318bf5c682Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i
34328bf5c682Smrgcat conftest.i conftest.i >conftest2.i
34338bf5c682Smrglt_cv_truncate_bin=
34348bf5c682Smrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
34358bf5c682Smrg  cmp -s conftest.i conftest.out \
34368bf5c682Smrg  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
34378bf5c682Smrgfi
34388bf5c682Smrgrm -f conftest.i conftest2.i conftest.out
34398bf5c682Smrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
34408bf5c682Smrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
34418bf5c682Smrg  [Command to truncate a binary pipe])
34428bf5c682Smrg])# _LT_CMD_TRUNCATE
34438bf5c682Smrg
34448bf5c682Smrg
34458bf5c682Smrg# _LT_CHECK_MAGIC_METHOD
34468bf5c682Smrg# ----------------------
34478bf5c682Smrg# how to check for library dependencies
34488bf5c682Smrg#  -- PORTME fill in with the dynamic library characteristics
34498bf5c682Smrgm4_defun([_LT_CHECK_MAGIC_METHOD],
34508bf5c682Smrg[m4_require([_LT_DECL_EGREP])
34518bf5c682Smrgm4_require([_LT_DECL_OBJDUMP])
34528bf5c682SmrgAC_CACHE_CHECK([how to recognize dependent libraries],
34538bf5c682Smrglt_cv_deplibs_check_method,
34548bf5c682Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
34558bf5c682Smrglt_cv_file_magic_test_file=
34568bf5c682Smrglt_cv_deplibs_check_method='unknown'
34578bf5c682Smrg# Need to set the preceding variable on all platforms that support
34588bf5c682Smrg# interlibrary dependencies.
34598bf5c682Smrg# 'none' -- dependencies not supported.
34608bf5c682Smrg# 'unknown' -- same as none, but documents that we really don't know.
34618bf5c682Smrg# 'pass_all' -- all dependencies passed with no checks.
34628bf5c682Smrg# 'test_compile' -- check by making test program.
34638bf5c682Smrg# 'file_magic [[regex]]' -- check by looking for files in library path
34648bf5c682Smrg# that responds to the $file_magic_cmd with a given extended regex.
34658bf5c682Smrg# If you have 'file' or equivalent on your system and you're not sure
34668bf5c682Smrg# whether 'pass_all' will *always* work, you probably want this one.
34678bf5c682Smrg
34688bf5c682Smrgcase $host_os in
34698bf5c682Smrgaix[[4-9]]*)
34708bf5c682Smrg  lt_cv_deplibs_check_method=pass_all
34718bf5c682Smrg  ;;
34728bf5c682Smrg
34738bf5c682Smrgbeos*)
34748bf5c682Smrg  lt_cv_deplibs_check_method=pass_all
34758bf5c682Smrg  ;;
34768bf5c682Smrg
34778bf5c682Smrgbsdi[[45]]*)
34788bf5c682Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
34798bf5c682Smrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
34808bf5c682Smrg  lt_cv_file_magic_test_file=/shlib/libc.so
34818bf5c682Smrg  ;;
34828bf5c682Smrg
34838bf5c682Smrgcygwin*)
34848bf5c682Smrg  # func_win32_libid is a shell function defined in ltmain.sh
34858bf5c682Smrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
34868bf5c682Smrg  lt_cv_file_magic_cmd='func_win32_libid'
34878bf5c682Smrg  ;;
34888bf5c682Smrg
34898bf5c682Smrgmingw* | pw32*)
34908bf5c682Smrg  # Base MSYS/MinGW do not provide the 'file' command needed by
34918bf5c682Smrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
34928bf5c682Smrg  # unless we find 'file', for example because we are cross-compiling.
34938bf5c682Smrg  if ( file / ) >/dev/null 2>&1; then
34948bf5c682Smrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
34958bf5c682Smrg    lt_cv_file_magic_cmd='func_win32_libid'
34968bf5c682Smrg  else
34978bf5c682Smrg    # Keep this pattern in sync with the one in func_win32_libid.
34988bf5c682Smrg    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
34998bf5c682Smrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
35008bf5c682Smrg  fi
35018bf5c682Smrg  ;;
35028bf5c682Smrg
35038bf5c682Smrgcegcc*)
35048bf5c682Smrg  # use the weaker test based on 'objdump'. See mingw*.
35058bf5c682Smrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
35068bf5c682Smrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
35078bf5c682Smrg  ;;
35088bf5c682Smrg
35098bf5c682Smrgdarwin* | rhapsody*)
35108bf5c682Smrg  lt_cv_deplibs_check_method=pass_all
35118bf5c682Smrg  ;;
35128bf5c682Smrg
35138bf5c682Smrgfreebsd* | dragonfly*)
35148bf5c682Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
35158bf5c682Smrg    case $host_cpu in
35168bf5c682Smrg    i*86 )
35178bf5c682Smrg      # Not sure whether the presence of OpenBSD here was a mistake.
35188bf5c682Smrg      # Let's accept both of them until this is cleared up.
35198bf5c682Smrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
35208bf5c682Smrg      lt_cv_file_magic_cmd=/usr/bin/file
35218bf5c682Smrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
35228bf5c682Smrg      ;;
35238bf5c682Smrg    esac
35248bf5c682Smrg  else
35258bf5c682Smrg    lt_cv_deplibs_check_method=pass_all
35268bf5c682Smrg  fi
35278bf5c682Smrg  ;;
35288bf5c682Smrg
35298bf5c682Smrghaiku*)
35308bf5c682Smrg  lt_cv_deplibs_check_method=pass_all
35318bf5c682Smrg  ;;
35328bf5c682Smrg
35338bf5c682Smrghpux10.20* | hpux11*)
35348bf5c682Smrg  lt_cv_file_magic_cmd=/usr/bin/file
35358bf5c682Smrg  case $host_cpu in
35368bf5c682Smrg  ia64*)
35378bf5c682Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
35388bf5c682Smrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
35398bf5c682Smrg    ;;
35408bf5c682Smrg  hppa*64*)
35418bf5c682Smrg    [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]']
35428bf5c682Smrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
35438bf5c682Smrg    ;;
35448bf5c682Smrg  *)
35458bf5c682Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
35468bf5c682Smrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
35478bf5c682Smrg    ;;
35488bf5c682Smrg  esac
35498bf5c682Smrg  ;;
35508bf5c682Smrg
35518bf5c682Smrginterix[[3-9]]*)
35528bf5c682Smrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
35538bf5c682Smrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
35548bf5c682Smrg  ;;
35558bf5c682Smrg
35568bf5c682Smrgirix5* | irix6* | nonstopux*)
35578bf5c682Smrg  case $LD in
35588bf5c682Smrg  *-32|*"-32 ") libmagic=32-bit;;
35598bf5c682Smrg  *-n32|*"-n32 ") libmagic=N32;;
35608bf5c682Smrg  *-64|*"-64 ") libmagic=64-bit;;
35618bf5c682Smrg  *) libmagic=never-match;;
35628bf5c682Smrg  esac
35638bf5c682Smrg  lt_cv_deplibs_check_method=pass_all
35648bf5c682Smrg  ;;
35658bf5c682Smrg
35668bf5c682Smrg# This must be glibc/ELF.
35678bf5c682Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
35688bf5c682Smrg  lt_cv_deplibs_check_method=pass_all
35698bf5c682Smrg  ;;
35708bf5c682Smrg
35718bf5c682Smrgnetbsd*)
35728bf5c682Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
35738bf5c682Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
35748bf5c682Smrg  else
35758bf5c682Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
35768bf5c682Smrg  fi
35778bf5c682Smrg  ;;
35788bf5c682Smrg
35798bf5c682Smrgnewos6*)
35808bf5c682Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
35818bf5c682Smrg  lt_cv_file_magic_cmd=/usr/bin/file
35828bf5c682Smrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
35838bf5c682Smrg  ;;
35848bf5c682Smrg
35858bf5c682Smrg*nto* | *qnx*)
35868bf5c682Smrg  lt_cv_deplibs_check_method=pass_all
35878bf5c682Smrg  ;;
35888bf5c682Smrg
35898bf5c682Smrgopenbsd* | bitrig*)
35908bf5c682Smrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
35918bf5c682Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
35928bf5c682Smrg  else
35938bf5c682Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
35948bf5c682Smrg  fi
35958bf5c682Smrg  ;;
35968bf5c682Smrg
35978bf5c682Smrgosf3* | osf4* | osf5*)
35988bf5c682Smrg  lt_cv_deplibs_check_method=pass_all
35998bf5c682Smrg  ;;
36008bf5c682Smrg
36018bf5c682Smrgrdos*)
36028bf5c682Smrg  lt_cv_deplibs_check_method=pass_all
36038bf5c682Smrg  ;;
36048bf5c682Smrg
36058bf5c682Smrgsolaris*)
36068bf5c682Smrg  lt_cv_deplibs_check_method=pass_all
36078bf5c682Smrg  ;;
36088bf5c682Smrg
36098bf5c682Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
36108bf5c682Smrg  lt_cv_deplibs_check_method=pass_all
36118bf5c682Smrg  ;;
36128bf5c682Smrg
36138bf5c682Smrgsysv4 | sysv4.3*)
36148bf5c682Smrg  case $host_vendor in
36158bf5c682Smrg  motorola)
36168bf5c682Smrg    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]]'
36178bf5c682Smrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
36188bf5c682Smrg    ;;
36198bf5c682Smrg  ncr)
36208bf5c682Smrg    lt_cv_deplibs_check_method=pass_all
36218bf5c682Smrg    ;;
36228bf5c682Smrg  sequent)
36238bf5c682Smrg    lt_cv_file_magic_cmd='/bin/file'
36248bf5c682Smrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
36258bf5c682Smrg    ;;
36268bf5c682Smrg  sni)
36278bf5c682Smrg    lt_cv_file_magic_cmd='/bin/file'
36288bf5c682Smrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
36298bf5c682Smrg    lt_cv_file_magic_test_file=/lib/libc.so
36308bf5c682Smrg    ;;
36318bf5c682Smrg  siemens)
36328bf5c682Smrg    lt_cv_deplibs_check_method=pass_all
36338bf5c682Smrg    ;;
36348bf5c682Smrg  pc)
36358bf5c682Smrg    lt_cv_deplibs_check_method=pass_all
36368bf5c682Smrg    ;;
36378bf5c682Smrg  esac
36388bf5c682Smrg  ;;
36398bf5c682Smrg
36408bf5c682Smrgtpf*)
36418bf5c682Smrg  lt_cv_deplibs_check_method=pass_all
36428bf5c682Smrg  ;;
36438bf5c682Smrgos2*)
36448bf5c682Smrg  lt_cv_deplibs_check_method=pass_all
36458bf5c682Smrg  ;;
36468bf5c682Smrgesac
36478bf5c682Smrg])
36488bf5c682Smrg
36498bf5c682Smrgfile_magic_glob=
36508bf5c682Smrgwant_nocaseglob=no
36518bf5c682Smrgif test "$build" = "$host"; then
36528bf5c682Smrg  case $host_os in
36538bf5c682Smrg  mingw* | pw32*)
36548bf5c682Smrg    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
36558bf5c682Smrg      want_nocaseglob=yes
36568bf5c682Smrg    else
36578bf5c682Smrg      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
36588bf5c682Smrg    fi
36598bf5c682Smrg    ;;
36608bf5c682Smrg  esac
36618bf5c682Smrgfi
36628bf5c682Smrg
36638bf5c682Smrgfile_magic_cmd=$lt_cv_file_magic_cmd
36648bf5c682Smrgdeplibs_check_method=$lt_cv_deplibs_check_method
36658bf5c682Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
36668bf5c682Smrg
36678bf5c682Smrg_LT_DECL([], [deplibs_check_method], [1],
36688bf5c682Smrg    [Method to check whether dependent libraries are shared objects])
36698bf5c682Smrg_LT_DECL([], [file_magic_cmd], [1],
36708bf5c682Smrg    [Command to use when deplibs_check_method = "file_magic"])
36718bf5c682Smrg_LT_DECL([], [file_magic_glob], [1],
36728bf5c682Smrg    [How to find potential files when deplibs_check_method = "file_magic"])
36738bf5c682Smrg_LT_DECL([], [want_nocaseglob], [1],
36748bf5c682Smrg    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
36758bf5c682Smrg])# _LT_CHECK_MAGIC_METHOD
36768bf5c682Smrg
36778bf5c682Smrg
36788bf5c682Smrg# LT_PATH_NM
36798bf5c682Smrg# ----------
36808bf5c682Smrg# find the pathname to a BSD- or MS-compatible name lister
36818bf5c682SmrgAC_DEFUN([LT_PATH_NM],
36828bf5c682Smrg[AC_REQUIRE([AC_PROG_CC])dnl
36838bf5c682SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
36848bf5c682Smrg[if test -n "$NM"; then
36858bf5c682Smrg  # Let the user override the test.
36868bf5c682Smrg  lt_cv_path_NM=$NM
36878bf5c682Smrgelse
36888bf5c682Smrg  lt_nm_to_check=${ac_tool_prefix}nm
36898bf5c682Smrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
36908bf5c682Smrg    lt_nm_to_check="$lt_nm_to_check nm"
36918bf5c682Smrg  fi
36928bf5c682Smrg  for lt_tmp_nm in $lt_nm_to_check; do
36938bf5c682Smrg    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
36948bf5c682Smrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
36958bf5c682Smrg      IFS=$lt_save_ifs
36968bf5c682Smrg      test -z "$ac_dir" && ac_dir=.
36978bf5c682Smrg      tmp_nm=$ac_dir/$lt_tmp_nm
36988bf5c682Smrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
36998bf5c682Smrg	# Check to see if the nm accepts a BSD-compat flag.
37008bf5c682Smrg	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
37018bf5c682Smrg	#   nm: unknown option "B" ignored
37028bf5c682Smrg	# Tru64's nm complains that /dev/null is an invalid object file
37038bf5c682Smrg	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
37048bf5c682Smrg	case $build_os in
37058bf5c682Smrg	mingw*) lt_bad_file=conftest.nm/nofile ;;
37068bf5c682Smrg	*) lt_bad_file=/dev/null ;;
37078bf5c682Smrg	esac
37088bf5c682Smrg	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
37098bf5c682Smrg	*$lt_bad_file* | *'Invalid file or object type'*)
37108bf5c682Smrg	  lt_cv_path_NM="$tmp_nm -B"
37118bf5c682Smrg	  break 2
37128bf5c682Smrg	  ;;
37138bf5c682Smrg	*)
37148bf5c682Smrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
37158bf5c682Smrg	  */dev/null*)
37168bf5c682Smrg	    lt_cv_path_NM="$tmp_nm -p"
37178bf5c682Smrg	    break 2
37188bf5c682Smrg	    ;;
37198bf5c682Smrg	  *)
37208bf5c682Smrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
37218bf5c682Smrg	    continue # so that we can try to find one that supports BSD flags
37228bf5c682Smrg	    ;;
37238bf5c682Smrg	  esac
37248bf5c682Smrg	  ;;
37258bf5c682Smrg	esac
37268bf5c682Smrg      fi
37278bf5c682Smrg    done
37288bf5c682Smrg    IFS=$lt_save_ifs
37298bf5c682Smrg  done
37308bf5c682Smrg  : ${lt_cv_path_NM=no}
37318bf5c682Smrgfi])
37328bf5c682Smrgif test no != "$lt_cv_path_NM"; then
37338bf5c682Smrg  NM=$lt_cv_path_NM
37348bf5c682Smrgelse
37358bf5c682Smrg  # Didn't find any BSD compatible name lister, look for dumpbin.
37368bf5c682Smrg  if test -n "$DUMPBIN"; then :
37378bf5c682Smrg    # Let the user override the test.
37388bf5c682Smrg  else
37398bf5c682Smrg    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
37408bf5c682Smrg    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
37418bf5c682Smrg    *COFF*)
37428bf5c682Smrg      DUMPBIN="$DUMPBIN -symbols -headers"
37438bf5c682Smrg      ;;
37448bf5c682Smrg    *)
37458bf5c682Smrg      DUMPBIN=:
37468bf5c682Smrg      ;;
37478bf5c682Smrg    esac
37488bf5c682Smrg  fi
37498bf5c682Smrg  AC_SUBST([DUMPBIN])
37508bf5c682Smrg  if test : != "$DUMPBIN"; then
37518bf5c682Smrg    NM=$DUMPBIN
37528bf5c682Smrg  fi
37538bf5c682Smrgfi
37548bf5c682Smrgtest -z "$NM" && NM=nm
37558bf5c682SmrgAC_SUBST([NM])
37568bf5c682Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
37578bf5c682Smrg
37588bf5c682SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
37598bf5c682Smrg  [lt_cv_nm_interface="BSD nm"
37608bf5c682Smrg  echo "int some_variable = 0;" > conftest.$ac_ext
37618bf5c682Smrg  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
37628bf5c682Smrg  (eval "$ac_compile" 2>conftest.err)
37638bf5c682Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
37648bf5c682Smrg  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
37658bf5c682Smrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
37668bf5c682Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
37678bf5c682Smrg  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
37688bf5c682Smrg  cat conftest.out >&AS_MESSAGE_LOG_FD
37698bf5c682Smrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
37708bf5c682Smrg    lt_cv_nm_interface="MS dumpbin"
37718bf5c682Smrg  fi
37728bf5c682Smrg  rm -f conftest*])
37738bf5c682Smrg])# LT_PATH_NM
37748bf5c682Smrg
37758bf5c682Smrg# Old names:
37768bf5c682SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
37778bf5c682SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
37788bf5c682Smrgdnl aclocal-1.4 backwards compatibility:
37798bf5c682Smrgdnl AC_DEFUN([AM_PROG_NM], [])
37808bf5c682Smrgdnl AC_DEFUN([AC_PROG_NM], [])
37818bf5c682Smrg
37828bf5c682Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
37838bf5c682Smrg# --------------------------------
37848bf5c682Smrg# how to determine the name of the shared library
37858bf5c682Smrg# associated with a specific link library.
37868bf5c682Smrg#  -- PORTME fill in with the dynamic library characteristics
37878bf5c682Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
37888bf5c682Smrg[m4_require([_LT_DECL_EGREP])
37898bf5c682Smrgm4_require([_LT_DECL_OBJDUMP])
37908bf5c682Smrgm4_require([_LT_DECL_DLLTOOL])
37918bf5c682SmrgAC_CACHE_CHECK([how to associate runtime and link libraries],
37928bf5c682Smrglt_cv_sharedlib_from_linklib_cmd,
37938bf5c682Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown'
37948bf5c682Smrg
37958bf5c682Smrgcase $host_os in
37968bf5c682Smrgcygwin* | mingw* | pw32* | cegcc*)
37978bf5c682Smrg  # two different shell functions defined in ltmain.sh;
37988bf5c682Smrg  # decide which one to use based on capabilities of $DLLTOOL
37998bf5c682Smrg  case `$DLLTOOL --help 2>&1` in
38008bf5c682Smrg  *--identify-strict*)
38018bf5c682Smrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
38028bf5c682Smrg    ;;
38038bf5c682Smrg  *)
38048bf5c682Smrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
38058bf5c682Smrg    ;;
38068bf5c682Smrg  esac
38078bf5c682Smrg  ;;
38088bf5c682Smrg*)
38098bf5c682Smrg  # fallback: assume linklib IS sharedlib
38108bf5c682Smrg  lt_cv_sharedlib_from_linklib_cmd=$ECHO
38118bf5c682Smrg  ;;
38128bf5c682Smrgesac
38138bf5c682Smrg])
38148bf5c682Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
38158bf5c682Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
38168bf5c682Smrg
38178bf5c682Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
38188bf5c682Smrg    [Command to associate shared and link libraries])
38198bf5c682Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
38208bf5c682Smrg
38218bf5c682Smrg
38228bf5c682Smrg# _LT_PATH_MANIFEST_TOOL
38238bf5c682Smrg# ----------------------
38248bf5c682Smrg# locate the manifest tool
38258bf5c682Smrgm4_defun([_LT_PATH_MANIFEST_TOOL],
38268bf5c682Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
38278bf5c682Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
38288bf5c682SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
38298bf5c682Smrg  [lt_cv_path_mainfest_tool=no
38308bf5c682Smrg  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
38318bf5c682Smrg  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
38328bf5c682Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
38338bf5c682Smrg  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
38348bf5c682Smrg    lt_cv_path_mainfest_tool=yes
38358bf5c682Smrg  fi
38368bf5c682Smrg  rm -f conftest*])
38378bf5c682Smrgif test yes != "$lt_cv_path_mainfest_tool"; then
38388bf5c682Smrg  MANIFEST_TOOL=:
38398bf5c682Smrgfi
38408bf5c682Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
38418bf5c682Smrg])# _LT_PATH_MANIFEST_TOOL
38428bf5c682Smrg
38438bf5c682Smrg
38448bf5c682Smrg# _LT_DLL_DEF_P([FILE])
38458bf5c682Smrg# ---------------------
38468bf5c682Smrg# True iff FILE is a Windows DLL '.def' file.
38478bf5c682Smrg# Keep in sync with func_dll_def_p in the libtool script
38488bf5c682SmrgAC_DEFUN([_LT_DLL_DEF_P],
38498bf5c682Smrg[dnl
38508bf5c682Smrg  test DEF = "`$SED -n dnl
38518bf5c682Smrg    -e '\''s/^[[	 ]]*//'\'' dnl Strip leading whitespace
38528bf5c682Smrg    -e '\''/^\(;.*\)*$/d'\'' dnl      Delete empty lines and comments
38538bf5c682Smrg    -e '\''s/^\(EXPORTS\|LIBRARY\)\([[	 ]].*\)*$/DEF/p'\'' dnl
38548bf5c682Smrg    -e q dnl                          Only consider the first "real" line
38558bf5c682Smrg    $1`" dnl
38568bf5c682Smrg])# _LT_DLL_DEF_P
38578bf5c682Smrg
38588bf5c682Smrg
38598bf5c682Smrg# LT_LIB_M
38608bf5c682Smrg# --------
38618bf5c682Smrg# check for math library
38628bf5c682SmrgAC_DEFUN([LT_LIB_M],
38638bf5c682Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
38648bf5c682SmrgLIBM=
38658bf5c682Smrgcase $host in
38668bf5c682Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
38678bf5c682Smrg  # These system don't have libm, or don't need it
38688bf5c682Smrg  ;;
38698bf5c682Smrg*-ncr-sysv4.3*)
38708bf5c682Smrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
38718bf5c682Smrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
38728bf5c682Smrg  ;;
38738bf5c682Smrg*)
38748bf5c682Smrg  AC_CHECK_LIB(m, cos, LIBM=-lm)
38758bf5c682Smrg  ;;
38768bf5c682Smrgesac
38778bf5c682SmrgAC_SUBST([LIBM])
38788bf5c682Smrg])# LT_LIB_M
38798bf5c682Smrg
38808bf5c682Smrg# Old name:
38818bf5c682SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
38828bf5c682Smrgdnl aclocal-1.4 backwards compatibility:
38838bf5c682Smrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
38848bf5c682Smrg
38858bf5c682Smrg
38868bf5c682Smrg# _LT_COMPILER_NO_RTTI([TAGNAME])
38878bf5c682Smrg# -------------------------------
38888bf5c682Smrgm4_defun([_LT_COMPILER_NO_RTTI],
38898bf5c682Smrg[m4_require([_LT_TAG_COMPILER])dnl
38908bf5c682Smrg
38918bf5c682Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
38928bf5c682Smrg
38938bf5c682Smrgif test yes = "$GCC"; then
38948bf5c682Smrg  case $cc_basename in
38958bf5c682Smrg  nvcc*)
38968bf5c682Smrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
38978bf5c682Smrg  *)
38988bf5c682Smrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
38998bf5c682Smrg  esac
39008bf5c682Smrg
39018bf5c682Smrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
39028bf5c682Smrg    lt_cv_prog_compiler_rtti_exceptions,
39038bf5c682Smrg    [-fno-rtti -fno-exceptions], [],
39048bf5c682Smrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
39058bf5c682Smrgfi
39068bf5c682Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
39078bf5c682Smrg	[Compiler flag to turn off builtin functions])
39088bf5c682Smrg])# _LT_COMPILER_NO_RTTI
39098bf5c682Smrg
39108bf5c682Smrg
39118bf5c682Smrg# _LT_CMD_GLOBAL_SYMBOLS
39128bf5c682Smrg# ----------------------
39138bf5c682Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
39148bf5c682Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
39158bf5c682SmrgAC_REQUIRE([AC_PROG_CC])dnl
39168bf5c682SmrgAC_REQUIRE([AC_PROG_AWK])dnl
39178bf5c682SmrgAC_REQUIRE([LT_PATH_NM])dnl
39188bf5c682SmrgAC_REQUIRE([LT_PATH_LD])dnl
39198bf5c682Smrgm4_require([_LT_DECL_SED])dnl
39208bf5c682Smrgm4_require([_LT_DECL_EGREP])dnl
39218bf5c682Smrgm4_require([_LT_TAG_COMPILER])dnl
39228bf5c682Smrg
39238bf5c682Smrg# Check for command to grab the raw symbol name followed by C symbol from nm.
39248bf5c682SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
39258bf5c682SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
39268bf5c682Smrg[
39278bf5c682Smrg# These are sane defaults that work on at least a few old systems.
39288bf5c682Smrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
39298bf5c682Smrg
39308bf5c682Smrg# Character class describing NM global symbol codes.
39318bf5c682Smrgsymcode='[[BCDEGRST]]'
39328bf5c682Smrg
39338bf5c682Smrg# Regexp to match symbols that can be accessed directly from C.
39348bf5c682Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
39358bf5c682Smrg
39368bf5c682Smrg# Define system-specific variables.
39378bf5c682Smrgcase $host_os in
39388bf5c682Smrgaix*)
39398bf5c682Smrg  symcode='[[BCDT]]'
39408bf5c682Smrg  ;;
39418bf5c682Smrgcygwin* | mingw* | pw32* | cegcc*)
39428bf5c682Smrg  symcode='[[ABCDGISTW]]'
39438bf5c682Smrg  ;;
39448bf5c682Smrghpux*)
39458bf5c682Smrg  if test ia64 = "$host_cpu"; then
39468bf5c682Smrg    symcode='[[ABCDEGRST]]'
39478bf5c682Smrg  fi
39488bf5c682Smrg  ;;
39498bf5c682Smrgirix* | nonstopux*)
39508bf5c682Smrg  symcode='[[BCDEGRST]]'
39518bf5c682Smrg  ;;
39528bf5c682Smrgosf*)
39538bf5c682Smrg  symcode='[[BCDEGQRST]]'
39548bf5c682Smrg  ;;
39558bf5c682Smrgsolaris*)
39568bf5c682Smrg  symcode='[[BDRT]]'
39578bf5c682Smrg  ;;
39588bf5c682Smrgsco3.2v5*)
39598bf5c682Smrg  symcode='[[DT]]'
39608bf5c682Smrg  ;;
39618bf5c682Smrgsysv4.2uw2*)
39628bf5c682Smrg  symcode='[[DT]]'
39638bf5c682Smrg  ;;
39648bf5c682Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
39658bf5c682Smrg  symcode='[[ABDT]]'
39668bf5c682Smrg  ;;
39678bf5c682Smrgsysv4)
39688bf5c682Smrg  symcode='[[DFNSTU]]'
39698bf5c682Smrg  ;;
39708bf5c682Smrgesac
39718bf5c682Smrg
39728bf5c682Smrg# If we're using GNU nm, then use its standard symbol codes.
39738bf5c682Smrgcase `$NM -V 2>&1` in
39748bf5c682Smrg*GNU* | *'with BFD'*)
39758bf5c682Smrg  symcode='[[ABCDGIRSTW]]' ;;
39768bf5c682Smrgesac
39778bf5c682Smrg
39788bf5c682Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
39798bf5c682Smrg  # Gets list of data symbols to import.
39808bf5c682Smrg  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
39818bf5c682Smrg  # Adjust the below global symbol transforms to fixup imported variables.
39828bf5c682Smrg  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
39838bf5c682Smrg  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
39848bf5c682Smrg  lt_c_name_lib_hook="\
39858bf5c682Smrg  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
39868bf5c682Smrg  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
39878bf5c682Smrgelse
39888bf5c682Smrg  # Disable hooks by default.
39898bf5c682Smrg  lt_cv_sys_global_symbol_to_import=
39908bf5c682Smrg  lt_cdecl_hook=
39918bf5c682Smrg  lt_c_name_hook=
39928bf5c682Smrg  lt_c_name_lib_hook=
39938bf5c682Smrgfi
39948bf5c682Smrg
39958bf5c682Smrg# Transform an extracted symbol line into a proper C declaration.
39968bf5c682Smrg# Some systems (esp. on ia64) link data and code symbols differently,
39978bf5c682Smrg# so use this general approach.
39988bf5c682Smrglt_cv_sys_global_symbol_to_cdecl="sed -n"\
39998bf5c682Smrg$lt_cdecl_hook\
40008bf5c682Smrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
40018bf5c682Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
40028bf5c682Smrg
40038bf5c682Smrg# Transform an extracted symbol line into symbol name and symbol address
40048bf5c682Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n"\
40058bf5c682Smrg$lt_c_name_hook\
40068bf5c682Smrg" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
40078bf5c682Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
40088bf5c682Smrg
40098bf5c682Smrg# Transform an extracted symbol line into symbol name with lib prefix and
40108bf5c682Smrg# symbol address.
40118bf5c682Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
40128bf5c682Smrg$lt_c_name_lib_hook\
40138bf5c682Smrg" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
40148bf5c682Smrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
40158bf5c682Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
40168bf5c682Smrg
40178bf5c682Smrg# Handle CRLF in mingw tool chain
40188bf5c682Smrgopt_cr=
40198bf5c682Smrgcase $build_os in
40208bf5c682Smrgmingw*)
40218bf5c682Smrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
40228bf5c682Smrg  ;;
40238bf5c682Smrgesac
40248bf5c682Smrg
40258bf5c682Smrg# Try without a prefix underscore, then with it.
40268bf5c682Smrgfor ac_symprfx in "" "_"; do
40278bf5c682Smrg
40288bf5c682Smrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
40298bf5c682Smrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
40308bf5c682Smrg
40318bf5c682Smrg  # Write the raw and C identifiers.
40328bf5c682Smrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
40338bf5c682Smrg    # Fake it for dumpbin and say T for any non-static function,
40348bf5c682Smrg    # D for any global variable and I for any imported variable.
40358bf5c682Smrg    # Also find C++ and __fastcall symbols from MSVC++,
40368bf5c682Smrg    # which start with @ or ?.
40378bf5c682Smrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
40388bf5c682Smrg"     {last_section=section; section=\$ 3};"\
40398bf5c682Smrg"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
40408bf5c682Smrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
40418bf5c682Smrg"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
40428bf5c682Smrg"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
40438bf5c682Smrg"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
40448bf5c682Smrg"     \$ 0!~/External *\|/{next};"\
40458bf5c682Smrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
40468bf5c682Smrg"     {if(hide[section]) next};"\
40478bf5c682Smrg"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
40488bf5c682Smrg"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
40498bf5c682Smrg"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
40508bf5c682Smrg"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
40518bf5c682Smrg"     ' prfx=^$ac_symprfx]"
40528bf5c682Smrg  else
40538bf5c682Smrg    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
40548bf5c682Smrg  fi
40558bf5c682Smrg  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
40568bf5c682Smrg
40578bf5c682Smrg  # Check to see that the pipe works correctly.
40588bf5c682Smrg  pipe_works=no
40598bf5c682Smrg
40608bf5c682Smrg  rm -f conftest*
40618bf5c682Smrg  cat > conftest.$ac_ext <<_LT_EOF
40628bf5c682Smrg#ifdef __cplusplus
40638bf5c682Smrgextern "C" {
40648bf5c682Smrg#endif
40658bf5c682Smrgchar nm_test_var;
40668bf5c682Smrgvoid nm_test_func(void);
40678bf5c682Smrgvoid nm_test_func(void){}
40688bf5c682Smrg#ifdef __cplusplus
40698bf5c682Smrg}
40708bf5c682Smrg#endif
40718bf5c682Smrgint main(){nm_test_var='a';nm_test_func();return(0);}
40728bf5c682Smrg_LT_EOF
40738bf5c682Smrg
40748bf5c682Smrg  if AC_TRY_EVAL(ac_compile); then
40758bf5c682Smrg    # Now try to grab the symbols.
40768bf5c682Smrg    nlist=conftest.nm
40778bf5c682Smrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
40788bf5c682Smrg      # Try sorting and uniquifying the output.
40798bf5c682Smrg      if sort "$nlist" | uniq > "$nlist"T; then
40808bf5c682Smrg	mv -f "$nlist"T "$nlist"
40818bf5c682Smrg      else
40828bf5c682Smrg	rm -f "$nlist"T
40838bf5c682Smrg      fi
40848bf5c682Smrg
40858bf5c682Smrg      # Make sure that we snagged all the symbols we need.
40868bf5c682Smrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
40878bf5c682Smrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
40888bf5c682Smrg	  cat <<_LT_EOF > conftest.$ac_ext
40898bf5c682Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
40908bf5c682Smrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
40918bf5c682Smrg/* DATA imports from DLLs on WIN32 can't be const, because runtime
40928bf5c682Smrg   relocations are performed -- see ld's documentation on pseudo-relocs.  */
40938bf5c682Smrg# define LT@&t@_DLSYM_CONST
40948bf5c682Smrg#elif defined __osf__
40958bf5c682Smrg/* This system does not cope well with relocations in const data.  */
40968bf5c682Smrg# define LT@&t@_DLSYM_CONST
40978bf5c682Smrg#else
40988bf5c682Smrg# define LT@&t@_DLSYM_CONST const
40998bf5c682Smrg#endif
41008bf5c682Smrg
41018bf5c682Smrg#ifdef __cplusplus
41028bf5c682Smrgextern "C" {
41038bf5c682Smrg#endif
41048bf5c682Smrg
41058bf5c682Smrg_LT_EOF
41068bf5c682Smrg	  # Now generate the symbol file.
41078bf5c682Smrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
41088bf5c682Smrg
41098bf5c682Smrg	  cat <<_LT_EOF >> conftest.$ac_ext
41108bf5c682Smrg
41118bf5c682Smrg/* The mapping between symbol names and symbols.  */
41128bf5c682SmrgLT@&t@_DLSYM_CONST struct {
41138bf5c682Smrg  const char *name;
41148bf5c682Smrg  void       *address;
41158bf5c682Smrg}
41168bf5c682Smrglt__PROGRAM__LTX_preloaded_symbols[[]] =
41178bf5c682Smrg{
41188bf5c682Smrg  { "@PROGRAM@", (void *) 0 },
41198bf5c682Smrg_LT_EOF
41208bf5c682Smrg	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
41218bf5c682Smrg	  cat <<\_LT_EOF >> conftest.$ac_ext
41228bf5c682Smrg  {0, (void *) 0}
41238bf5c682Smrg};
41248bf5c682Smrg
41258bf5c682Smrg/* This works around a problem in FreeBSD linker */
41268bf5c682Smrg#ifdef FREEBSD_WORKAROUND
41278bf5c682Smrgstatic const void *lt_preloaded_setup() {
41288bf5c682Smrg  return lt__PROGRAM__LTX_preloaded_symbols;
41298bf5c682Smrg}
41308bf5c682Smrg#endif
41318bf5c682Smrg
41328bf5c682Smrg#ifdef __cplusplus
41338bf5c682Smrg}
41348bf5c682Smrg#endif
41358bf5c682Smrg_LT_EOF
41368bf5c682Smrg	  # Now try linking the two files.
41378bf5c682Smrg	  mv conftest.$ac_objext conftstm.$ac_objext
41388bf5c682Smrg	  lt_globsym_save_LIBS=$LIBS
41398bf5c682Smrg	  lt_globsym_save_CFLAGS=$CFLAGS
41408bf5c682Smrg	  LIBS=conftstm.$ac_objext
41418bf5c682Smrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
41428bf5c682Smrg	  if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
41438bf5c682Smrg	    pipe_works=yes
41448bf5c682Smrg	  fi
41458bf5c682Smrg	  LIBS=$lt_globsym_save_LIBS
41468bf5c682Smrg	  CFLAGS=$lt_globsym_save_CFLAGS
41478bf5c682Smrg	else
41488bf5c682Smrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
41498bf5c682Smrg	fi
41508bf5c682Smrg      else
41518bf5c682Smrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
41528bf5c682Smrg      fi
41538bf5c682Smrg    else
41548bf5c682Smrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
41558bf5c682Smrg    fi
41568bf5c682Smrg  else
41578bf5c682Smrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
41588bf5c682Smrg    cat conftest.$ac_ext >&5
41598bf5c682Smrg  fi
41608bf5c682Smrg  rm -rf conftest* conftst*
41618bf5c682Smrg
41628bf5c682Smrg  # Do not use the global_symbol_pipe unless it works.
41638bf5c682Smrg  if test yes = "$pipe_works"; then
41648bf5c682Smrg    break
41658bf5c682Smrg  else
41668bf5c682Smrg    lt_cv_sys_global_symbol_pipe=
41678bf5c682Smrg  fi
41688bf5c682Smrgdone
41698bf5c682Smrg])
41708bf5c682Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
41718bf5c682Smrg  lt_cv_sys_global_symbol_to_cdecl=
41728bf5c682Smrgfi
41738bf5c682Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
41748bf5c682Smrg  AC_MSG_RESULT(failed)
41758bf5c682Smrgelse
41768bf5c682Smrg  AC_MSG_RESULT(ok)
41778bf5c682Smrgfi
41788bf5c682Smrg
41798bf5c682Smrg# Response file support.
41808bf5c682Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
41818bf5c682Smrg  nm_file_list_spec='@'
41828bf5c682Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
41838bf5c682Smrg  nm_file_list_spec='@'
41848bf5c682Smrgfi
41858bf5c682Smrg
41868bf5c682Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
41878bf5c682Smrg    [Take the output of nm and produce a listing of raw symbols and C names])
41888bf5c682Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
41898bf5c682Smrg    [Transform the output of nm in a proper C declaration])
41908bf5c682Smrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
41918bf5c682Smrg    [Transform the output of nm into a list of symbols to manually relocate])
41928bf5c682Smrg_LT_DECL([global_symbol_to_c_name_address],
41938bf5c682Smrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
41948bf5c682Smrg    [Transform the output of nm in a C name address pair])
41958bf5c682Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
41968bf5c682Smrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
41978bf5c682Smrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
41988bf5c682Smrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
41998bf5c682Smrg    [The name lister interface])
42008bf5c682Smrg_LT_DECL([], [nm_file_list_spec], [1],
42018bf5c682Smrg    [Specify filename containing input files for $NM])
42028bf5c682Smrg]) # _LT_CMD_GLOBAL_SYMBOLS
42038bf5c682Smrg
42048bf5c682Smrg
42058bf5c682Smrg# _LT_COMPILER_PIC([TAGNAME])
42068bf5c682Smrg# ---------------------------
42078bf5c682Smrgm4_defun([_LT_COMPILER_PIC],
42088bf5c682Smrg[m4_require([_LT_TAG_COMPILER])dnl
42098bf5c682Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
42108bf5c682Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
42118bf5c682Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
42128bf5c682Smrg
42138bf5c682Smrgm4_if([$1], [CXX], [
42148bf5c682Smrg  # C++ specific cases for pic, static, wl, etc.
42158bf5c682Smrg  if test yes = "$GXX"; then
42168bf5c682Smrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
42178bf5c682Smrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
42188bf5c682Smrg
42198bf5c682Smrg    case $host_os in
42208bf5c682Smrg    aix*)
42218bf5c682Smrg      # All AIX code is PIC.
42228bf5c682Smrg      if test ia64 = "$host_cpu"; then
42238bf5c682Smrg	# AIX 5 now supports IA64 processor
42248bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
42258bf5c682Smrg      fi
42268bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
42278bf5c682Smrg      ;;
42288bf5c682Smrg
42298bf5c682Smrg    amigaos*)
42308bf5c682Smrg      case $host_cpu in
42318bf5c682Smrg      powerpc)
42328bf5c682Smrg            # see comment about AmigaOS4 .so support
42338bf5c682Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
42348bf5c682Smrg        ;;
42358bf5c682Smrg      m68k)
42368bf5c682Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
42378bf5c682Smrg            # adding the '-m68020' flag to GCC prevents building anything better,
42388bf5c682Smrg            # like '-m68040'.
42398bf5c682Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
42408bf5c682Smrg        ;;
42418bf5c682Smrg      esac
42428bf5c682Smrg      ;;
42438bf5c682Smrg
42448bf5c682Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
42458bf5c682Smrg      # PIC is the default for these OSes.
42468bf5c682Smrg      ;;
42478bf5c682Smrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
42488bf5c682Smrg      # This hack is so that the source file can tell whether it is being
42498bf5c682Smrg      # built for inclusion in a dll (and should export symbols for example).
42508bf5c682Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
42518bf5c682Smrg      # (--disable-auto-import) libraries
42528bf5c682Smrg      m4_if([$1], [GCJ], [],
42538bf5c682Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
42548bf5c682Smrg      case $host_os in
42558bf5c682Smrg      os2*)
42568bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
42578bf5c682Smrg	;;
42588bf5c682Smrg      esac
42598bf5c682Smrg      ;;
42608bf5c682Smrg    darwin* | rhapsody*)
42618bf5c682Smrg      # PIC is the default on this platform
42628bf5c682Smrg      # Common symbols not allowed in MH_DYLIB files
42638bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
42648bf5c682Smrg      ;;
42658bf5c682Smrg    *djgpp*)
42668bf5c682Smrg      # DJGPP does not support shared libraries at all
42678bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
42688bf5c682Smrg      ;;
42698bf5c682Smrg    haiku*)
42708bf5c682Smrg      # PIC is the default for Haiku.
42718bf5c682Smrg      # The "-static" flag exists, but is broken.
42728bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
42738bf5c682Smrg      ;;
42748bf5c682Smrg    interix[[3-9]]*)
42758bf5c682Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
42768bf5c682Smrg      # Instead, we relocate shared libraries at runtime.
42778bf5c682Smrg      ;;
42788bf5c682Smrg    sysv4*MP*)
42798bf5c682Smrg      if test -d /usr/nec; then
42808bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
42818bf5c682Smrg      fi
42828bf5c682Smrg      ;;
42838bf5c682Smrg    hpux*)
42848bf5c682Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
42858bf5c682Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
42868bf5c682Smrg      # sets the default TLS model and affects inlining.
42878bf5c682Smrg      case $host_cpu in
42888bf5c682Smrg      hppa*64*)
42898bf5c682Smrg	;;
42908bf5c682Smrg      *)
42918bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
42928bf5c682Smrg	;;
42938bf5c682Smrg      esac
42948bf5c682Smrg      ;;
42958bf5c682Smrg    *qnx* | *nto*)
42968bf5c682Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
42978bf5c682Smrg      # it will coredump.
42988bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
42998bf5c682Smrg      ;;
43008bf5c682Smrg    *)
43018bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
43028bf5c682Smrg      ;;
43038bf5c682Smrg    esac
43048bf5c682Smrg  else
43058bf5c682Smrg    case $host_os in
43068bf5c682Smrg      aix[[4-9]]*)
43078bf5c682Smrg	# All AIX code is PIC.
43088bf5c682Smrg	if test ia64 = "$host_cpu"; then
43098bf5c682Smrg	  # AIX 5 now supports IA64 processor
43108bf5c682Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
43118bf5c682Smrg	else
43128bf5c682Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
43138bf5c682Smrg	fi
43148bf5c682Smrg	;;
43158bf5c682Smrg      chorus*)
43168bf5c682Smrg	case $cc_basename in
43178bf5c682Smrg	cxch68*)
43188bf5c682Smrg	  # Green Hills C++ Compiler
43198bf5c682Smrg	  # _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"
43208bf5c682Smrg	  ;;
43218bf5c682Smrg	esac
43228bf5c682Smrg	;;
43238bf5c682Smrg      mingw* | cygwin* | os2* | pw32* | cegcc*)
43248bf5c682Smrg	# This hack is so that the source file can tell whether it is being
43258bf5c682Smrg	# built for inclusion in a dll (and should export symbols for example).
43268bf5c682Smrg	m4_if([$1], [GCJ], [],
43278bf5c682Smrg	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
43288bf5c682Smrg	;;
43298bf5c682Smrg      dgux*)
43308bf5c682Smrg	case $cc_basename in
43318bf5c682Smrg	  ec++*)
43328bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
43338bf5c682Smrg	    ;;
43348bf5c682Smrg	  ghcx*)
43358bf5c682Smrg	    # Green Hills C++ Compiler
43368bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
43378bf5c682Smrg	    ;;
43388bf5c682Smrg	  *)
43398bf5c682Smrg	    ;;
43408bf5c682Smrg	esac
43418bf5c682Smrg	;;
43428bf5c682Smrg      freebsd* | dragonfly*)
43438bf5c682Smrg	# FreeBSD uses GNU C++
43448bf5c682Smrg	;;
43458bf5c682Smrg      hpux9* | hpux10* | hpux11*)
43468bf5c682Smrg	case $cc_basename in
43478bf5c682Smrg	  CC*)
43488bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43498bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
43508bf5c682Smrg	    if test ia64 != "$host_cpu"; then
43518bf5c682Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
43528bf5c682Smrg	    fi
43538bf5c682Smrg	    ;;
43548bf5c682Smrg	  aCC*)
43558bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43568bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
43578bf5c682Smrg	    case $host_cpu in
43588bf5c682Smrg	    hppa*64*|ia64*)
43598bf5c682Smrg	      # +Z the default
43608bf5c682Smrg	      ;;
43618bf5c682Smrg	    *)
43628bf5c682Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
43638bf5c682Smrg	      ;;
43648bf5c682Smrg	    esac
43658bf5c682Smrg	    ;;
43668bf5c682Smrg	  *)
43678bf5c682Smrg	    ;;
43688bf5c682Smrg	esac
43698bf5c682Smrg	;;
43708bf5c682Smrg      interix*)
43718bf5c682Smrg	# This is c89, which is MS Visual C++ (no shared libs)
43728bf5c682Smrg	# Anyone wants to do a port?
43738bf5c682Smrg	;;
43748bf5c682Smrg      irix5* | irix6* | nonstopux*)
43758bf5c682Smrg	case $cc_basename in
43768bf5c682Smrg	  CC*)
43778bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43788bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
43798bf5c682Smrg	    # CC pic flag -KPIC is the default.
43808bf5c682Smrg	    ;;
43818bf5c682Smrg	  *)
43828bf5c682Smrg	    ;;
43838bf5c682Smrg	esac
43848bf5c682Smrg	;;
43858bf5c682Smrg      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
43868bf5c682Smrg	case $cc_basename in
43878bf5c682Smrg	  KCC*)
43888bf5c682Smrg	    # KAI C++ Compiler
43898bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
43908bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
43918bf5c682Smrg	    ;;
43928bf5c682Smrg	  ecpc* )
43938bf5c682Smrg	    # old Intel C++ for x86_64, which still supported -KPIC.
43948bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43958bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
43968bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
43978bf5c682Smrg	    ;;
43988bf5c682Smrg	  icpc* )
43998bf5c682Smrg	    # Intel C++, used to be incompatible with GCC.
44008bf5c682Smrg	    # ICC 10 doesn't accept -KPIC any more.
44018bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
44028bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
44038bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
44048bf5c682Smrg	    ;;
44058bf5c682Smrg	  pgCC* | pgcpp*)
44068bf5c682Smrg	    # Portland Group C++ compiler
44078bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
44088bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
44098bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
44108bf5c682Smrg	    ;;
44118bf5c682Smrg	  cxx*)
44128bf5c682Smrg	    # Compaq C++
44138bf5c682Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
44148bf5c682Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
44158bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
44168bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
44178bf5c682Smrg	    ;;
44188bf5c682Smrg	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
44198bf5c682Smrg	    # IBM XL 8.0, 9.0 on PPC and BlueGene
44208bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
44218bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
44228bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
44238bf5c682Smrg	    ;;
44248bf5c682Smrg	  *)
44258bf5c682Smrg	    case `$CC -V 2>&1 | sed 5q` in
44268bf5c682Smrg	    *Sun\ C*)
44278bf5c682Smrg	      # Sun C++ 5.9
44288bf5c682Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
44298bf5c682Smrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
44308bf5c682Smrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
44318bf5c682Smrg	      ;;
44328bf5c682Smrg	    esac
44338bf5c682Smrg	    ;;
44348bf5c682Smrg	esac
44358bf5c682Smrg	;;
44368bf5c682Smrg      lynxos*)
44378bf5c682Smrg	;;
44388bf5c682Smrg      m88k*)
44398bf5c682Smrg	;;
44408bf5c682Smrg      mvs*)
44418bf5c682Smrg	case $cc_basename in
44428bf5c682Smrg	  cxx*)
44438bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
44448bf5c682Smrg	    ;;
44458bf5c682Smrg	  *)
44468bf5c682Smrg	    ;;
44478bf5c682Smrg	esac
44488bf5c682Smrg	;;
44498bf5c682Smrg      netbsd*)
44508bf5c682Smrg	;;
44518bf5c682Smrg      *qnx* | *nto*)
44528bf5c682Smrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
44538bf5c682Smrg        # it will coredump.
44548bf5c682Smrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
44558bf5c682Smrg        ;;
44568bf5c682Smrg      osf3* | osf4* | osf5*)
44578bf5c682Smrg	case $cc_basename in
44588bf5c682Smrg	  KCC*)
44598bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
44608bf5c682Smrg	    ;;
44618bf5c682Smrg	  RCC*)
44628bf5c682Smrg	    # Rational C++ 2.4.1
44638bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
44648bf5c682Smrg	    ;;
44658bf5c682Smrg	  cxx*)
44668bf5c682Smrg	    # Digital/Compaq C++
44678bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
44688bf5c682Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
44698bf5c682Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
44708bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
44718bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
44728bf5c682Smrg	    ;;
44738bf5c682Smrg	  *)
44748bf5c682Smrg	    ;;
44758bf5c682Smrg	esac
44768bf5c682Smrg	;;
44778bf5c682Smrg      psos*)
44788bf5c682Smrg	;;
44798bf5c682Smrg      solaris*)
44808bf5c682Smrg	case $cc_basename in
44818bf5c682Smrg	  CC* | sunCC*)
44828bf5c682Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
44838bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
44848bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
44858bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
44868bf5c682Smrg	    ;;
44878bf5c682Smrg	  gcx*)
44888bf5c682Smrg	    # Green Hills C++ Compiler
44898bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
44908bf5c682Smrg	    ;;
44918bf5c682Smrg	  *)
44928bf5c682Smrg	    ;;
44938bf5c682Smrg	esac
44948bf5c682Smrg	;;
44958bf5c682Smrg      sunos4*)
44968bf5c682Smrg	case $cc_basename in
44978bf5c682Smrg	  CC*)
44988bf5c682Smrg	    # Sun C++ 4.x
44998bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
45008bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
45018bf5c682Smrg	    ;;
45028bf5c682Smrg	  lcc*)
45038bf5c682Smrg	    # Lucid
45048bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
45058bf5c682Smrg	    ;;
45068bf5c682Smrg	  *)
45078bf5c682Smrg	    ;;
45088bf5c682Smrg	esac
45098bf5c682Smrg	;;
45108bf5c682Smrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
45118bf5c682Smrg	case $cc_basename in
45128bf5c682Smrg	  CC*)
45138bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
45148bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
45158bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
45168bf5c682Smrg	    ;;
45178bf5c682Smrg	esac
45188bf5c682Smrg	;;
45198bf5c682Smrg      tandem*)
45208bf5c682Smrg	case $cc_basename in
45218bf5c682Smrg	  NCC*)
45228bf5c682Smrg	    # NonStop-UX NCC 3.20
45238bf5c682Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
45248bf5c682Smrg	    ;;
45258bf5c682Smrg	  *)
45268bf5c682Smrg	    ;;
45278bf5c682Smrg	esac
45288bf5c682Smrg	;;
45298bf5c682Smrg      vxworks*)
45308bf5c682Smrg	;;
45318bf5c682Smrg      *)
45328bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
45338bf5c682Smrg	;;
45348bf5c682Smrg    esac
45358bf5c682Smrg  fi
45368bf5c682Smrg],
45378bf5c682Smrg[
45388bf5c682Smrg  if test yes = "$GCC"; then
45398bf5c682Smrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
45408bf5c682Smrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
45418bf5c682Smrg
45428bf5c682Smrg    case $host_os in
45438bf5c682Smrg      aix*)
45448bf5c682Smrg      # All AIX code is PIC.
45458bf5c682Smrg      if test ia64 = "$host_cpu"; then
45468bf5c682Smrg	# AIX 5 now supports IA64 processor
45478bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
45488bf5c682Smrg      fi
45498bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
45508bf5c682Smrg      ;;
45518bf5c682Smrg
45528bf5c682Smrg    amigaos*)
45538bf5c682Smrg      case $host_cpu in
45548bf5c682Smrg      powerpc)
45558bf5c682Smrg            # see comment about AmigaOS4 .so support
45568bf5c682Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
45578bf5c682Smrg        ;;
45588bf5c682Smrg      m68k)
45598bf5c682Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
45608bf5c682Smrg            # adding the '-m68020' flag to GCC prevents building anything better,
45618bf5c682Smrg            # like '-m68040'.
45628bf5c682Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
45638bf5c682Smrg        ;;
45648bf5c682Smrg      esac
45658bf5c682Smrg      ;;
45668bf5c682Smrg
45678bf5c682Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
45688bf5c682Smrg      # PIC is the default for these OSes.
45698bf5c682Smrg      ;;
45708bf5c682Smrg
45718bf5c682Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
45728bf5c682Smrg      # This hack is so that the source file can tell whether it is being
45738bf5c682Smrg      # built for inclusion in a dll (and should export symbols for example).
45748bf5c682Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
45758bf5c682Smrg      # (--disable-auto-import) libraries
45768bf5c682Smrg      m4_if([$1], [GCJ], [],
45778bf5c682Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
45788bf5c682Smrg      case $host_os in
45798bf5c682Smrg      os2*)
45808bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
45818bf5c682Smrg	;;
45828bf5c682Smrg      esac
45838bf5c682Smrg      ;;
45848bf5c682Smrg
45858bf5c682Smrg    darwin* | rhapsody*)
45868bf5c682Smrg      # PIC is the default on this platform
45878bf5c682Smrg      # Common symbols not allowed in MH_DYLIB files
45888bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
45898bf5c682Smrg      ;;
45908bf5c682Smrg
45918bf5c682Smrg    haiku*)
45928bf5c682Smrg      # PIC is the default for Haiku.
45938bf5c682Smrg      # The "-static" flag exists, but is broken.
45948bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
45958bf5c682Smrg      ;;
45968bf5c682Smrg
45978bf5c682Smrg    hpux*)
45988bf5c682Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
45998bf5c682Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
46008bf5c682Smrg      # sets the default TLS model and affects inlining.
46018bf5c682Smrg      case $host_cpu in
46028bf5c682Smrg      hppa*64*)
46038bf5c682Smrg	# +Z the default
46048bf5c682Smrg	;;
46058bf5c682Smrg      *)
46068bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
46078bf5c682Smrg	;;
46088bf5c682Smrg      esac
46098bf5c682Smrg      ;;
46108bf5c682Smrg
46118bf5c682Smrg    interix[[3-9]]*)
46128bf5c682Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
46138bf5c682Smrg      # Instead, we relocate shared libraries at runtime.
46148bf5c682Smrg      ;;
46158bf5c682Smrg
46168bf5c682Smrg    msdosdjgpp*)
46178bf5c682Smrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
46188bf5c682Smrg      # on systems that don't support them.
46198bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
46208bf5c682Smrg      enable_shared=no
46218bf5c682Smrg      ;;
46228bf5c682Smrg
46238bf5c682Smrg    *nto* | *qnx*)
46248bf5c682Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
46258bf5c682Smrg      # it will coredump.
46268bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
46278bf5c682Smrg      ;;
46288bf5c682Smrg
46298bf5c682Smrg    sysv4*MP*)
46308bf5c682Smrg      if test -d /usr/nec; then
46318bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
46328bf5c682Smrg      fi
46338bf5c682Smrg      ;;
46348bf5c682Smrg
46358bf5c682Smrg    *)
46368bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
46378bf5c682Smrg      ;;
46388bf5c682Smrg    esac
46398bf5c682Smrg
46408bf5c682Smrg    case $cc_basename in
46418bf5c682Smrg    nvcc*) # Cuda Compiler Driver 2.2
46428bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
46438bf5c682Smrg      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
46448bf5c682Smrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
46458bf5c682Smrg      fi
46468bf5c682Smrg      ;;
46478bf5c682Smrg    esac
46488bf5c682Smrg  else
46498bf5c682Smrg    # PORTME Check for flag to pass linker flags through the system compiler.
46508bf5c682Smrg    case $host_os in
46518bf5c682Smrg    aix*)
46528bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
46538bf5c682Smrg      if test ia64 = "$host_cpu"; then
46548bf5c682Smrg	# AIX 5 now supports IA64 processor
46558bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
46568bf5c682Smrg      else
46578bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
46588bf5c682Smrg      fi
46598bf5c682Smrg      ;;
46608bf5c682Smrg
46618bf5c682Smrg    darwin* | rhapsody*)
46628bf5c682Smrg      # PIC is the default on this platform
46638bf5c682Smrg      # Common symbols not allowed in MH_DYLIB files
46648bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
46658bf5c682Smrg      case $cc_basename in
46668bf5c682Smrg      nagfor*)
46678bf5c682Smrg        # NAG Fortran compiler
46688bf5c682Smrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
46698bf5c682Smrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
46708bf5c682Smrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
46718bf5c682Smrg        ;;
46728bf5c682Smrg      esac
46738bf5c682Smrg      ;;
46748bf5c682Smrg
46758bf5c682Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
46768bf5c682Smrg      # This hack is so that the source file can tell whether it is being
46778bf5c682Smrg      # built for inclusion in a dll (and should export symbols for example).
46788bf5c682Smrg      m4_if([$1], [GCJ], [],
46798bf5c682Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
46808bf5c682Smrg      case $host_os in
46818bf5c682Smrg      os2*)
46828bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
46838bf5c682Smrg	;;
46848bf5c682Smrg      esac
46858bf5c682Smrg      ;;
46868bf5c682Smrg
46878bf5c682Smrg    hpux9* | hpux10* | hpux11*)
46888bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
46898bf5c682Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
46908bf5c682Smrg      # not for PA HP-UX.
46918bf5c682Smrg      case $host_cpu in
46928bf5c682Smrg      hppa*64*|ia64*)
46938bf5c682Smrg	# +Z the default
46948bf5c682Smrg	;;
46958bf5c682Smrg      *)
46968bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
46978bf5c682Smrg	;;
46988bf5c682Smrg      esac
46998bf5c682Smrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
47008bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
47018bf5c682Smrg      ;;
47028bf5c682Smrg
47038bf5c682Smrg    irix5* | irix6* | nonstopux*)
47048bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47058bf5c682Smrg      # PIC (with -KPIC) is the default.
47068bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
47078bf5c682Smrg      ;;
47088bf5c682Smrg
47098bf5c682Smrg    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
47108bf5c682Smrg      case $cc_basename in
47118bf5c682Smrg      # old Intel for x86_64, which still supported -KPIC.
47128bf5c682Smrg      ecc*)
47138bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47148bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
47158bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
47168bf5c682Smrg        ;;
47178bf5c682Smrg      # icc used to be incompatible with GCC.
47188bf5c682Smrg      # ICC 10 doesn't accept -KPIC any more.
47198bf5c682Smrg      icc* | ifort*)
47208bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47218bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
47228bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
47238bf5c682Smrg        ;;
47248bf5c682Smrg      # Lahey Fortran 8.1.
47258bf5c682Smrg      lf95*)
47268bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47278bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
47288bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
47298bf5c682Smrg	;;
47308bf5c682Smrg      nagfor*)
47318bf5c682Smrg	# NAG Fortran compiler
47328bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
47338bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
47348bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47358bf5c682Smrg	;;
47368bf5c682Smrg      tcc*)
47378bf5c682Smrg	# Fabrice Bellard et al's Tiny C Compiler
47388bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47398bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
47408bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
47418bf5c682Smrg	;;
47428bf5c682Smrg      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
47438bf5c682Smrg        # Portland Group compilers (*not* the Pentium gcc compiler,
47448bf5c682Smrg	# which looks to be a dead project)
47458bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47468bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
47478bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47488bf5c682Smrg        ;;
47498bf5c682Smrg      ccc*)
47508bf5c682Smrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47518bf5c682Smrg        # All Alpha code is PIC.
47528bf5c682Smrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
47538bf5c682Smrg        ;;
47548bf5c682Smrg      xl* | bgxl* | bgf* | mpixl*)
47558bf5c682Smrg	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
47568bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47578bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
47588bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
47598bf5c682Smrg	;;
47608bf5c682Smrg      *)
47618bf5c682Smrg	case `$CC -V 2>&1 | sed 5q` in
47628bf5c682Smrg	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
47638bf5c682Smrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
47648bf5c682Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
47658bf5c682Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47668bf5c682Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
47678bf5c682Smrg	  ;;
47688bf5c682Smrg	*Sun\ F* | *Sun*Fortran*)
47698bf5c682Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
47708bf5c682Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47718bf5c682Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
47728bf5c682Smrg	  ;;
47738bf5c682Smrg	*Sun\ C*)
47748bf5c682Smrg	  # Sun C 5.9
47758bf5c682Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
47768bf5c682Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47778bf5c682Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47788bf5c682Smrg	  ;;
47798bf5c682Smrg        *Intel*\ [[CF]]*Compiler*)
47808bf5c682Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47818bf5c682Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
47828bf5c682Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
47838bf5c682Smrg	  ;;
47848bf5c682Smrg	*Portland\ Group*)
47858bf5c682Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47868bf5c682Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
47878bf5c682Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47888bf5c682Smrg	  ;;
47898bf5c682Smrg	esac
47908bf5c682Smrg	;;
47918bf5c682Smrg      esac
47928bf5c682Smrg      ;;
47938bf5c682Smrg
47948bf5c682Smrg    newsos6)
47958bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
47968bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47978bf5c682Smrg      ;;
47988bf5c682Smrg
47998bf5c682Smrg    *nto* | *qnx*)
48008bf5c682Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
48018bf5c682Smrg      # it will coredump.
48028bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
48038bf5c682Smrg      ;;
48048bf5c682Smrg
48058bf5c682Smrg    osf3* | osf4* | osf5*)
48068bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
48078bf5c682Smrg      # All OSF/1 code is PIC.
48088bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
48098bf5c682Smrg      ;;
48108bf5c682Smrg
48118bf5c682Smrg    rdos*)
48128bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
48138bf5c682Smrg      ;;
48148bf5c682Smrg
48158bf5c682Smrg    solaris*)
48168bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
48178bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48188bf5c682Smrg      case $cc_basename in
48198bf5c682Smrg      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
48208bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
48218bf5c682Smrg      *)
48228bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
48238bf5c682Smrg      esac
48248bf5c682Smrg      ;;
48258bf5c682Smrg
48268bf5c682Smrg    sunos4*)
48278bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
48288bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
48298bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48308bf5c682Smrg      ;;
48318bf5c682Smrg
48328bf5c682Smrg    sysv4 | sysv4.2uw2* | sysv4.3*)
48338bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
48348bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
48358bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48368bf5c682Smrg      ;;
48378bf5c682Smrg
48388bf5c682Smrg    sysv4*MP*)
48398bf5c682Smrg      if test -d /usr/nec; then
48408bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
48418bf5c682Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48428bf5c682Smrg      fi
48438bf5c682Smrg      ;;
48448bf5c682Smrg
48458bf5c682Smrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
48468bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
48478bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
48488bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48498bf5c682Smrg      ;;
48508bf5c682Smrg
48518bf5c682Smrg    unicos*)
48528bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
48538bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
48548bf5c682Smrg      ;;
48558bf5c682Smrg
48568bf5c682Smrg    uts4*)
48578bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
48588bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48598bf5c682Smrg      ;;
48608bf5c682Smrg
48618bf5c682Smrg    *)
48628bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
48638bf5c682Smrg      ;;
48648bf5c682Smrg    esac
48658bf5c682Smrg  fi
48668bf5c682Smrg])
48678bf5c682Smrgcase $host_os in
48688bf5c682Smrg  # For platforms that do not support PIC, -DPIC is meaningless:
48698bf5c682Smrg  *djgpp*)
48708bf5c682Smrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
48718bf5c682Smrg    ;;
48728bf5c682Smrg  *)
48738bf5c682Smrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
48748bf5c682Smrg    ;;
48758bf5c682Smrgesac
48768bf5c682Smrg
48778bf5c682SmrgAC_CACHE_CHECK([for $compiler option to produce PIC],
48788bf5c682Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
48798bf5c682Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
48808bf5c682Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
48818bf5c682Smrg
48828bf5c682Smrg#
48838bf5c682Smrg# Check to make sure the PIC flag actually works.
48848bf5c682Smrg#
48858bf5c682Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
48868bf5c682Smrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
48878bf5c682Smrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
48888bf5c682Smrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
48898bf5c682Smrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
48908bf5c682Smrg     "" | " "*) ;;
48918bf5c682Smrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
48928bf5c682Smrg     esac],
48938bf5c682Smrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
48948bf5c682Smrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
48958bf5c682Smrgfi
48968bf5c682Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
48978bf5c682Smrg	[Additional compiler flags for building library objects])
48988bf5c682Smrg
48998bf5c682Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
49008bf5c682Smrg	[How to pass a linker flag through the compiler])
49018bf5c682Smrg#
49028bf5c682Smrg# Check to make sure the static flag actually works.
49038bf5c682Smrg#
49048bf5c682Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
49058bf5c682Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
49068bf5c682Smrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
49078bf5c682Smrg  $lt_tmp_static_flag,
49088bf5c682Smrg  [],
49098bf5c682Smrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
49108bf5c682Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
49118bf5c682Smrg	[Compiler flag to prevent dynamic linking])
49128bf5c682Smrg])# _LT_COMPILER_PIC
49138bf5c682Smrg
49148bf5c682Smrg
49158bf5c682Smrg# _LT_LINKER_SHLIBS([TAGNAME])
49168bf5c682Smrg# ----------------------------
49178bf5c682Smrg# See if the linker supports building shared libraries.
49188bf5c682Smrgm4_defun([_LT_LINKER_SHLIBS],
49198bf5c682Smrg[AC_REQUIRE([LT_PATH_LD])dnl
49208bf5c682SmrgAC_REQUIRE([LT_PATH_NM])dnl
49218bf5c682Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
49228bf5c682Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
49238bf5c682Smrgm4_require([_LT_DECL_EGREP])dnl
49248bf5c682Smrgm4_require([_LT_DECL_SED])dnl
49258bf5c682Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
49268bf5c682Smrgm4_require([_LT_TAG_COMPILER])dnl
49278bf5c682SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
49288bf5c682Smrgm4_if([$1], [CXX], [
49298bf5c682Smrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
49308bf5c682Smrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
49318bf5c682Smrg  case $host_os in
49328bf5c682Smrg  aix[[4-9]]*)
49338bf5c682Smrg    # If we're using GNU nm, then we don't want the "-C" option.
49348bf5c682Smrg    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
49358bf5c682Smrg    # Without the "-l" option, or with the "-B" option, AIX nm treats
49368bf5c682Smrg    # weak defined symbols like other global defined symbols, whereas
49378bf5c682Smrg    # GNU nm marks them as "W".
49388bf5c682Smrg    # While the 'weak' keyword is ignored in the Export File, we need
49398bf5c682Smrg    # it in the Import File for the 'aix-soname' feature, so we have
49408bf5c682Smrg    # to replace the "-B" option with "-P" for AIX nm.
49418bf5c682Smrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
49428bf5c682Smrg      _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'
49438bf5c682Smrg    else
49448bf5c682Smrg      _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'
49458bf5c682Smrg    fi
49468bf5c682Smrg    ;;
49478bf5c682Smrg  pw32*)
49488bf5c682Smrg    _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
49498bf5c682Smrg    ;;
49508bf5c682Smrg  cygwin* | mingw* | cegcc*)
49518bf5c682Smrg    case $cc_basename in
49528bf5c682Smrg    cl*)
49538bf5c682Smrg      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
49548bf5c682Smrg      ;;
49558bf5c682Smrg    *)
49568bf5c682Smrg      _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'
49578bf5c682Smrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
49588bf5c682Smrg      ;;
49598bf5c682Smrg    esac
49608bf5c682Smrg    ;;
49618bf5c682Smrg  *)
49628bf5c682Smrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
49638bf5c682Smrg    ;;
49648bf5c682Smrg  esac
49658bf5c682Smrg], [
49668bf5c682Smrg  runpath_var=
49678bf5c682Smrg  _LT_TAGVAR(allow_undefined_flag, $1)=
49688bf5c682Smrg  _LT_TAGVAR(always_export_symbols, $1)=no
49698bf5c682Smrg  _LT_TAGVAR(archive_cmds, $1)=
49708bf5c682Smrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
49718bf5c682Smrg  _LT_TAGVAR(compiler_needs_object, $1)=no
49728bf5c682Smrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
49738bf5c682Smrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
49748bf5c682Smrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
49758bf5c682Smrg  _LT_TAGVAR(hardcode_automatic, $1)=no
49768bf5c682Smrg  _LT_TAGVAR(hardcode_direct, $1)=no
49778bf5c682Smrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
49788bf5c682Smrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
49798bf5c682Smrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
49808bf5c682Smrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
49818bf5c682Smrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
49828bf5c682Smrg  _LT_TAGVAR(inherit_rpath, $1)=no
49838bf5c682Smrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
49848bf5c682Smrg  _LT_TAGVAR(module_cmds, $1)=
49858bf5c682Smrg  _LT_TAGVAR(module_expsym_cmds, $1)=
49868bf5c682Smrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
49878bf5c682Smrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
49888bf5c682Smrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
49898bf5c682Smrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
49908bf5c682Smrg  # include_expsyms should be a list of space-separated symbols to be *always*
49918bf5c682Smrg  # included in the symbol list
49928bf5c682Smrg  _LT_TAGVAR(include_expsyms, $1)=
49938bf5c682Smrg  # exclude_expsyms can be an extended regexp of symbols to exclude
49948bf5c682Smrg  # it will be wrapped by ' (' and ')$', so one must not match beginning or
49958bf5c682Smrg  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
49968bf5c682Smrg  # as well as any symbol that contains 'd'.
49978bf5c682Smrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
49988bf5c682Smrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
49998bf5c682Smrg  # platforms (ab)use it in PIC code, but their linkers get confused if
50008bf5c682Smrg  # the symbol is explicitly referenced.  Since portable code cannot
50018bf5c682Smrg  # rely on this symbol name, it's probably fine to never include it in
50028bf5c682Smrg  # preloaded symbol tables.
50038bf5c682Smrg  # Exclude shared library initialization/finalization symbols.
50048bf5c682Smrgdnl Note also adjust exclude_expsyms for C++ above.
50058bf5c682Smrg  extract_expsyms_cmds=
50068bf5c682Smrg
50078bf5c682Smrg  case $host_os in
50088bf5c682Smrg  cygwin* | mingw* | pw32* | cegcc*)
50098bf5c682Smrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
50108bf5c682Smrg    # When not using gcc, we currently assume that we are using
50118bf5c682Smrg    # Microsoft Visual C++.
50128bf5c682Smrg    if test yes != "$GCC"; then
50138bf5c682Smrg      with_gnu_ld=no
50148bf5c682Smrg    fi
50158bf5c682Smrg    ;;
50168bf5c682Smrg  interix*)
50178bf5c682Smrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
50188bf5c682Smrg    with_gnu_ld=yes
50198bf5c682Smrg    ;;
50208bf5c682Smrg  openbsd* | bitrig*)
50218bf5c682Smrg    with_gnu_ld=no
50228bf5c682Smrg    ;;
50238bf5c682Smrg  esac
50248bf5c682Smrg
50258bf5c682Smrg  _LT_TAGVAR(ld_shlibs, $1)=yes
50268bf5c682Smrg
50278bf5c682Smrg  # On some targets, GNU ld is compatible enough with the native linker
50288bf5c682Smrg  # that we're better off using the native interface for both.
50298bf5c682Smrg  lt_use_gnu_ld_interface=no
50308bf5c682Smrg  if test yes = "$with_gnu_ld"; then
50318bf5c682Smrg    case $host_os in
50328bf5c682Smrg      aix*)
50338bf5c682Smrg	# The AIX port of GNU ld has always aspired to compatibility
50348bf5c682Smrg	# with the native linker.  However, as the warning in the GNU ld
50358bf5c682Smrg	# block says, versions before 2.19.5* couldn't really create working
50368bf5c682Smrg	# shared libraries, regardless of the interface used.
50378bf5c682Smrg	case `$LD -v 2>&1` in
50388bf5c682Smrg	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
50398bf5c682Smrg	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
50408bf5c682Smrg	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
50418bf5c682Smrg	  *)
50428bf5c682Smrg	    lt_use_gnu_ld_interface=yes
50438bf5c682Smrg	    ;;
50448bf5c682Smrg	esac
50458bf5c682Smrg	;;
50468bf5c682Smrg      *)
50478bf5c682Smrg	lt_use_gnu_ld_interface=yes
50488bf5c682Smrg	;;
50498bf5c682Smrg    esac
50508bf5c682Smrg  fi
50518bf5c682Smrg
50528bf5c682Smrg  if test yes = "$lt_use_gnu_ld_interface"; then
50538bf5c682Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
50548bf5c682Smrg    wlarc='$wl'
50558bf5c682Smrg
50568bf5c682Smrg    # Set some defaults for GNU ld with shared library support. These
50578bf5c682Smrg    # are reset later if shared libraries are not supported. Putting them
50588bf5c682Smrg    # here allows them to be overridden if necessary.
50598bf5c682Smrg    runpath_var=LD_RUN_PATH
50608bf5c682Smrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
50618bf5c682Smrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
50628bf5c682Smrg    # ancient GNU ld didn't support --whole-archive et. al.
50638bf5c682Smrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
50648bf5c682Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
50658bf5c682Smrg    else
50668bf5c682Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
50678bf5c682Smrg    fi
50688bf5c682Smrg    supports_anon_versioning=no
50698bf5c682Smrg    case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
50708bf5c682Smrg      *GNU\ gold*) supports_anon_versioning=yes ;;
50718bf5c682Smrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
50728bf5c682Smrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
50738bf5c682Smrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
50748bf5c682Smrg      *\ 2.11.*) ;; # other 2.11 versions
50758bf5c682Smrg      *) supports_anon_versioning=yes ;;
50768bf5c682Smrg    esac
50778bf5c682Smrg
50788bf5c682Smrg    # See if GNU ld supports shared libraries.
50798bf5c682Smrg    case $host_os in
50808bf5c682Smrg    aix[[3-9]]*)
50818bf5c682Smrg      # On AIX/PPC, the GNU linker is very broken
50828bf5c682Smrg      if test ia64 != "$host_cpu"; then
50838bf5c682Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
50848bf5c682Smrg	cat <<_LT_EOF 1>&2
50858bf5c682Smrg
50868bf5c682Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported
50878bf5c682Smrg*** to be unable to reliably create shared libraries on AIX.
50888bf5c682Smrg*** Therefore, libtool is disabling shared libraries support.  If you
50898bf5c682Smrg*** really care for shared libraries, you may want to install binutils
50908bf5c682Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
50918bf5c682Smrg*** You will then need to restart the configuration process.
50928bf5c682Smrg
50938bf5c682Smrg_LT_EOF
50948bf5c682Smrg      fi
50958bf5c682Smrg      ;;
50968bf5c682Smrg
50978bf5c682Smrg    amigaos*)
50988bf5c682Smrg      case $host_cpu in
50998bf5c682Smrg      powerpc)
51008bf5c682Smrg            # see comment about AmigaOS4 .so support
51018bf5c682Smrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
51028bf5c682Smrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
51038bf5c682Smrg        ;;
51048bf5c682Smrg      m68k)
51058bf5c682Smrg            _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)'
51068bf5c682Smrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
51078bf5c682Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
51088bf5c682Smrg        ;;
51098bf5c682Smrg      esac
51108bf5c682Smrg      ;;
51118bf5c682Smrg
51128bf5c682Smrg    beos*)
51138bf5c682Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
51148bf5c682Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
51158bf5c682Smrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
51168bf5c682Smrg	# support --undefined.  This deserves some investigation.  FIXME
51178bf5c682Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
51188bf5c682Smrg      else
51198bf5c682Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
51208bf5c682Smrg      fi
51218bf5c682Smrg      ;;
51228bf5c682Smrg
51238bf5c682Smrg    cygwin* | mingw* | pw32* | cegcc*)
51248bf5c682Smrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
51258bf5c682Smrg      # as there is no search path for DLLs.
51268bf5c682Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
51278bf5c682Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
51288bf5c682Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
51298bf5c682Smrg      _LT_TAGVAR(always_export_symbols, $1)=no
51308bf5c682Smrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
51318bf5c682Smrg      _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'
51328bf5c682Smrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
51338bf5c682Smrg
51348bf5c682Smrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
51358bf5c682Smrg        _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'
51368bf5c682Smrg	# If the export-symbols file already is a .def file, use it as
51378bf5c682Smrg	# is; otherwise, prepend EXPORTS...
51388bf5c682Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
51398bf5c682Smrg          cp $export_symbols $output_objdir/$soname.def;
51408bf5c682Smrg        else
51418bf5c682Smrg          echo EXPORTS > $output_objdir/$soname.def;
51428bf5c682Smrg          cat $export_symbols >> $output_objdir/$soname.def;
51438bf5c682Smrg        fi~
51448bf5c682Smrg        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
51458bf5c682Smrg      else
51468bf5c682Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
51478bf5c682Smrg      fi
51488bf5c682Smrg      ;;
51498bf5c682Smrg
51508bf5c682Smrg    haiku*)
51518bf5c682Smrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
51528bf5c682Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
51538bf5c682Smrg      ;;
51548bf5c682Smrg
51558bf5c682Smrg    os2*)
51568bf5c682Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
51578bf5c682Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
51588bf5c682Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
51598bf5c682Smrg      shrext_cmds=.dll
51608bf5c682Smrg      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
51618bf5c682Smrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
51628bf5c682Smrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
51638bf5c682Smrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
51648bf5c682Smrg	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
51658bf5c682Smrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
51668bf5c682Smrg	emximp -o $lib $output_objdir/$libname.def'
51678bf5c682Smrg      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
51688bf5c682Smrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
51698bf5c682Smrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
51708bf5c682Smrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
51718bf5c682Smrg	prefix_cmds="$SED"~
51728bf5c682Smrg	if test EXPORTS = "`$SED 1q $export_symbols`"; then
51738bf5c682Smrg	  prefix_cmds="$prefix_cmds -e 1d";
51748bf5c682Smrg	fi~
51758bf5c682Smrg	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
51768bf5c682Smrg	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
51778bf5c682Smrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
51788bf5c682Smrg	emximp -o $lib $output_objdir/$libname.def'
51798bf5c682Smrg      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
51808bf5c682Smrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
51818bf5c682Smrg      _LT_TAGVAR(file_list_spec, $1)='@'
51828bf5c682Smrg      ;;
51838bf5c682Smrg
51848bf5c682Smrg    interix[[3-9]]*)
51858bf5c682Smrg      _LT_TAGVAR(hardcode_direct, $1)=no
51868bf5c682Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
51878bf5c682Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
51888bf5c682Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
51898bf5c682Smrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
51908bf5c682Smrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
51918bf5c682Smrg      # default) and relocated if they conflict, which is a slow very memory
51928bf5c682Smrg      # consuming and fragmenting process.  To avoid this, we pick a random,
51938bf5c682Smrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
51948bf5c682Smrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
51958bf5c682Smrg      _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'
51968bf5c682Smrg      _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'
51978bf5c682Smrg      ;;
51988bf5c682Smrg
51998bf5c682Smrg    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
52008bf5c682Smrg      tmp_diet=no
52018bf5c682Smrg      if test linux-dietlibc = "$host_os"; then
52028bf5c682Smrg	case $cc_basename in
52038bf5c682Smrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
52048bf5c682Smrg	esac
52058bf5c682Smrg      fi
52068bf5c682Smrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
52078bf5c682Smrg	 && test no = "$tmp_diet"
52088bf5c682Smrg      then
52098bf5c682Smrg	tmp_addflag=' $pic_flag'
52108bf5c682Smrg	tmp_sharedflag='-shared'
52118bf5c682Smrg	case $cc_basename,$host_cpu in
52128bf5c682Smrg        pgcc*)				# Portland Group C compiler
52138bf5c682Smrg	  _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'
52148bf5c682Smrg	  tmp_addflag=' $pic_flag'
52158bf5c682Smrg	  ;;
52168bf5c682Smrg	pgf77* | pgf90* | pgf95* | pgfortran*)
52178bf5c682Smrg					# Portland Group f77 and f90 compilers
52188bf5c682Smrg	  _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'
52198bf5c682Smrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
52208bf5c682Smrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
52218bf5c682Smrg	  tmp_addflag=' -i_dynamic' ;;
52228bf5c682Smrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
52238bf5c682Smrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
52248bf5c682Smrg	ifc* | ifort*)			# Intel Fortran compiler
52258bf5c682Smrg	  tmp_addflag=' -nofor_main' ;;
52268bf5c682Smrg	lf95*)				# Lahey Fortran 8.1
52278bf5c682Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
52288bf5c682Smrg	  tmp_sharedflag='--shared' ;;
52298bf5c682Smrg        nagfor*)                        # NAGFOR 5.3
52308bf5c682Smrg          tmp_sharedflag='-Wl,-shared' ;;
52318bf5c682Smrg	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
52328bf5c682Smrg	  tmp_sharedflag='-qmkshrobj'
52338bf5c682Smrg	  tmp_addflag= ;;
52348bf5c682Smrg	nvcc*)	# Cuda Compiler Driver 2.2
52358bf5c682Smrg	  _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'
52368bf5c682Smrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
52378bf5c682Smrg	  ;;
52388bf5c682Smrg	esac
52398bf5c682Smrg	case `$CC -V 2>&1 | sed 5q` in
52408bf5c682Smrg	*Sun\ C*)			# Sun C 5.9
52418bf5c682Smrg	  _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'
52428bf5c682Smrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
52438bf5c682Smrg	  tmp_sharedflag='-G' ;;
52448bf5c682Smrg	*Sun\ F*)			# Sun Fortran 8.3
52458bf5c682Smrg	  tmp_sharedflag='-G' ;;
52468bf5c682Smrg	esac
52478bf5c682Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
52488bf5c682Smrg
52498bf5c682Smrg        if test yes = "$supports_anon_versioning"; then
52508bf5c682Smrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
52518bf5c682Smrg            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
52528bf5c682Smrg            echo "local: *; };" >> $output_objdir/$libname.ver~
52538bf5c682Smrg            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
52548bf5c682Smrg        fi
52558bf5c682Smrg
52568bf5c682Smrg	case $cc_basename in
52578bf5c682Smrg	tcc*)
52588bf5c682Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
52598bf5c682Smrg	  ;;
52608bf5c682Smrg	xlf* | bgf* | bgxlf* | mpixlf*)
52618bf5c682Smrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
52628bf5c682Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
52638bf5c682Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
52648bf5c682Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
52658bf5c682Smrg	  if test yes = "$supports_anon_versioning"; then
52668bf5c682Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
52678bf5c682Smrg              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
52688bf5c682Smrg              echo "local: *; };" >> $output_objdir/$libname.ver~
52698bf5c682Smrg              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
52708bf5c682Smrg	  fi
52718bf5c682Smrg	  ;;
52728bf5c682Smrg	esac
52738bf5c682Smrg      else
52748bf5c682Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
52758bf5c682Smrg      fi
52768bf5c682Smrg      ;;
52778bf5c682Smrg
52788bf5c682Smrg    netbsd*)
52798bf5c682Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
52808bf5c682Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
52818bf5c682Smrg	wlarc=
52828bf5c682Smrg      else
52838bf5c682Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
52848bf5c682Smrg	_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'
52858bf5c682Smrg      fi
52868bf5c682Smrg      ;;
52878bf5c682Smrg
52888bf5c682Smrg    solaris*)
52898bf5c682Smrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
52908bf5c682Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
52918bf5c682Smrg	cat <<_LT_EOF 1>&2
52928bf5c682Smrg
52938bf5c682Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
52948bf5c682Smrg*** create shared libraries on Solaris systems.  Therefore, libtool
52958bf5c682Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
52968bf5c682Smrg*** binutils to release 2.9.1 or newer.  Another option is to modify
52978bf5c682Smrg*** your PATH or compiler configuration so that the native linker is
52988bf5c682Smrg*** used, and then restart.
52998bf5c682Smrg
53008bf5c682Smrg_LT_EOF
53018bf5c682Smrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
53028bf5c682Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
53038bf5c682Smrg	_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'
53048bf5c682Smrg      else
53058bf5c682Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
53068bf5c682Smrg      fi
53078bf5c682Smrg      ;;
53088bf5c682Smrg
53098bf5c682Smrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
53108bf5c682Smrg      case `$LD -v 2>&1` in
53118bf5c682Smrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
53128bf5c682Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
53138bf5c682Smrg	cat <<_LT_EOF 1>&2
53148bf5c682Smrg
53158bf5c682Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
53168bf5c682Smrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
53178bf5c682Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
53188bf5c682Smrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
53198bf5c682Smrg*** your PATH or compiler configuration so that the native linker is
53208bf5c682Smrg*** used, and then restart.
53218bf5c682Smrg
53228bf5c682Smrg_LT_EOF
53238bf5c682Smrg	;;
53248bf5c682Smrg	*)
53258bf5c682Smrg	  # For security reasons, it is highly recommended that you always
53268bf5c682Smrg	  # use absolute paths for naming shared libraries, and exclude the
53278bf5c682Smrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
53288bf5c682Smrg	  # requires that you compile everything twice, which is a pain.
53298bf5c682Smrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
53308bf5c682Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
53318bf5c682Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
53328bf5c682Smrg	    _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'
53338bf5c682Smrg	  else
53348bf5c682Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
53358bf5c682Smrg	  fi
53368bf5c682Smrg	;;
53378bf5c682Smrg      esac
53388bf5c682Smrg      ;;
53398bf5c682Smrg
53408bf5c682Smrg    sunos4*)
53418bf5c682Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
53428bf5c682Smrg      wlarc=
53438bf5c682Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
53448bf5c682Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
53458bf5c682Smrg      ;;
53468bf5c682Smrg
53478bf5c682Smrg    *)
53488bf5c682Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
53498bf5c682Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
53508bf5c682Smrg	_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'
53518bf5c682Smrg      else
53528bf5c682Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
53538bf5c682Smrg      fi
53548bf5c682Smrg      ;;
53558bf5c682Smrg    esac
53568bf5c682Smrg
53578bf5c682Smrg    if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
53588bf5c682Smrg      runpath_var=
53598bf5c682Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
53608bf5c682Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
53618bf5c682Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
53628bf5c682Smrg    fi
53638bf5c682Smrg  else
53648bf5c682Smrg    # PORTME fill in a description of your system's linker (not GNU ld)
53658bf5c682Smrg    case $host_os in
53668bf5c682Smrg    aix3*)
53678bf5c682Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
53688bf5c682Smrg      _LT_TAGVAR(always_export_symbols, $1)=yes
53698bf5c682Smrg      _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'
53708bf5c682Smrg      # Note: this linker hardcodes the directories in LIBPATH if there
53718bf5c682Smrg      # are no directories specified by -L.
53728bf5c682Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
53738bf5c682Smrg      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
53748bf5c682Smrg	# Neither direct hardcoding nor static linking is supported with a
53758bf5c682Smrg	# broken collect2.
53768bf5c682Smrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
53778bf5c682Smrg      fi
53788bf5c682Smrg      ;;
53798bf5c682Smrg
53808bf5c682Smrg    aix[[4-9]]*)
53818bf5c682Smrg      if test ia64 = "$host_cpu"; then
53828bf5c682Smrg	# On IA64, the linker does run time linking by default, so we don't
53838bf5c682Smrg	# have to do anything special.
53848bf5c682Smrg	aix_use_runtimelinking=no
53858bf5c682Smrg	exp_sym_flag='-Bexport'
53868bf5c682Smrg	no_entry_flag=
53878bf5c682Smrg      else
53888bf5c682Smrg	# If we're using GNU nm, then we don't want the "-C" option.
53898bf5c682Smrg	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
53908bf5c682Smrg	# Without the "-l" option, or with the "-B" option, AIX nm treats
53918bf5c682Smrg	# weak defined symbols like other global defined symbols, whereas
53928bf5c682Smrg	# GNU nm marks them as "W".
53938bf5c682Smrg	# While the 'weak' keyword is ignored in the Export File, we need
53948bf5c682Smrg	# it in the Import File for the 'aix-soname' feature, so we have
53958bf5c682Smrg	# to replace the "-B" option with "-P" for AIX nm.
53968bf5c682Smrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
53978bf5c682Smrg	  _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'
53988bf5c682Smrg	else
53998bf5c682Smrg	  _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'
54008bf5c682Smrg	fi
54018bf5c682Smrg	aix_use_runtimelinking=no
54028bf5c682Smrg
54038bf5c682Smrg	# Test if we are trying to use run time linking or normal
54048bf5c682Smrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
54058bf5c682Smrg	# have runtime linking enabled, and use it for executables.
54068bf5c682Smrg	# For shared libraries, we enable/disable runtime linking
54078bf5c682Smrg	# depending on the kind of the shared library created -
54088bf5c682Smrg	# when "with_aix_soname,aix_use_runtimelinking" is:
54098bf5c682Smrg	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
54108bf5c682Smrg	# "aix,yes"  lib.so          shared, rtl:yes, for executables
54118bf5c682Smrg	#            lib.a           static archive
54128bf5c682Smrg	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
54138bf5c682Smrg	#            lib.a(lib.so.V) shared, rtl:no,  for executables
54148bf5c682Smrg	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
54158bf5c682Smrg	#            lib.a(lib.so.V) shared, rtl:no
54168bf5c682Smrg	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
54178bf5c682Smrg	#            lib.a           static archive
54188bf5c682Smrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
54198bf5c682Smrg	  for ld_flag in $LDFLAGS; do
54208bf5c682Smrg	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
54218bf5c682Smrg	    aix_use_runtimelinking=yes
54228bf5c682Smrg	    break
54238bf5c682Smrg	  fi
54248bf5c682Smrg	  done
54258bf5c682Smrg	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
54268bf5c682Smrg	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
54278bf5c682Smrg	    # so we don't have lib.a shared libs to link our executables.
54288bf5c682Smrg	    # We have to force runtime linking in this case.
54298bf5c682Smrg	    aix_use_runtimelinking=yes
54308bf5c682Smrg	    LDFLAGS="$LDFLAGS -Wl,-brtl"
54318bf5c682Smrg	  fi
54328bf5c682Smrg	  ;;
54338bf5c682Smrg	esac
54348bf5c682Smrg
54358bf5c682Smrg	exp_sym_flag='-bexport'
54368bf5c682Smrg	no_entry_flag='-bnoentry'
54378bf5c682Smrg      fi
54388bf5c682Smrg
54398bf5c682Smrg      # When large executables or shared objects are built, AIX ld can
54408bf5c682Smrg      # have problems creating the table of contents.  If linking a library
54418bf5c682Smrg      # or program results in "error TOC overflow" add -mminimal-toc to
54428bf5c682Smrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
54438bf5c682Smrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
54448bf5c682Smrg
54458bf5c682Smrg      _LT_TAGVAR(archive_cmds, $1)=''
54468bf5c682Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
54478bf5c682Smrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
54488bf5c682Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
54498bf5c682Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
54508bf5c682Smrg      _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
54518bf5c682Smrg      case $with_aix_soname,$aix_use_runtimelinking in
54528bf5c682Smrg      aix,*) ;; # traditional, no import file
54538bf5c682Smrg      svr4,* | *,yes) # use import file
54548bf5c682Smrg	# The Import File defines what to hardcode.
54558bf5c682Smrg	_LT_TAGVAR(hardcode_direct, $1)=no
54568bf5c682Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=no
54578bf5c682Smrg	;;
54588bf5c682Smrg      esac
54598bf5c682Smrg
54608bf5c682Smrg      if test yes = "$GCC"; then
54618bf5c682Smrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
54628bf5c682Smrg	# We only want to do this on AIX 4.2 and lower, the check
54638bf5c682Smrg	# below for broken collect2 doesn't work under 4.3+
54648bf5c682Smrg	  collect2name=`$CC -print-prog-name=collect2`
54658bf5c682Smrg	  if test -f "$collect2name" &&
54668bf5c682Smrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
54678bf5c682Smrg	  then
54688bf5c682Smrg	  # We have reworked collect2
54698bf5c682Smrg	  :
54708bf5c682Smrg	  else
54718bf5c682Smrg	  # We have old collect2
54728bf5c682Smrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
54738bf5c682Smrg	  # It fails to find uninstalled libraries when the uninstalled
54748bf5c682Smrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
54758bf5c682Smrg	  # to unsupported forces relinking
54768bf5c682Smrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
54778bf5c682Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
54788bf5c682Smrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
54798bf5c682Smrg	  fi
54808bf5c682Smrg	  ;;
54818bf5c682Smrg	esac
54828bf5c682Smrg	shared_flag='-shared'
54838bf5c682Smrg	if test yes = "$aix_use_runtimelinking"; then
54848bf5c682Smrg	  shared_flag="$shared_flag "'$wl-G'
54858bf5c682Smrg	fi
54868bf5c682Smrg	# Need to ensure runtime linking is disabled for the traditional
54878bf5c682Smrg	# shared library, or the linker may eventually find shared libraries
54888bf5c682Smrg	# /with/ Import File - we do not want to mix them.
54898bf5c682Smrg	shared_flag_aix='-shared'
54908bf5c682Smrg	shared_flag_svr4='-shared $wl-G'
54918bf5c682Smrg      else
54928bf5c682Smrg	# not using gcc
54938bf5c682Smrg	if test ia64 = "$host_cpu"; then
54948bf5c682Smrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
54958bf5c682Smrg	# chokes on -Wl,-G. The following line is correct:
54968bf5c682Smrg	  shared_flag='-G'
54978bf5c682Smrg	else
54988bf5c682Smrg	  if test yes = "$aix_use_runtimelinking"; then
54998bf5c682Smrg	    shared_flag='$wl-G'
55008bf5c682Smrg	  else
55018bf5c682Smrg	    shared_flag='$wl-bM:SRE'
55028bf5c682Smrg	  fi
55038bf5c682Smrg	  shared_flag_aix='$wl-bM:SRE'
55048bf5c682Smrg	  shared_flag_svr4='$wl-G'
55058bf5c682Smrg	fi
55068bf5c682Smrg      fi
55078bf5c682Smrg
55088bf5c682Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
55098bf5c682Smrg      # It seems that -bexpall does not export symbols beginning with
55108bf5c682Smrg      # underscore (_), so it is better to generate a list of symbols to export.
55118bf5c682Smrg      _LT_TAGVAR(always_export_symbols, $1)=yes
55128bf5c682Smrg      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
55138bf5c682Smrg	# Warning - without using the other runtime loading flags (-brtl),
55148bf5c682Smrg	# -berok will link without error, but may produce a broken library.
55158bf5c682Smrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
55168bf5c682Smrg        # Determine the default libpath from the value encoded in an
55178bf5c682Smrg        # empty executable.
55188bf5c682Smrg        _LT_SYS_MODULE_PATH_AIX([$1])
55198bf5c682Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
55208bf5c682Smrg        _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
55218bf5c682Smrg      else
55228bf5c682Smrg	if test ia64 = "$host_cpu"; then
55238bf5c682Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
55248bf5c682Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
55258bf5c682Smrg	  _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"
55268bf5c682Smrg	else
55278bf5c682Smrg	 # Determine the default libpath from the value encoded in an
55288bf5c682Smrg	 # empty executable.
55298bf5c682Smrg	 _LT_SYS_MODULE_PATH_AIX([$1])
55308bf5c682Smrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
55318bf5c682Smrg	  # Warning - without using the other run time loading flags,
55328bf5c682Smrg	  # -berok will link without error, but may produce a broken library.
55338bf5c682Smrg	  _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
55348bf5c682Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
55358bf5c682Smrg	  if test yes = "$with_gnu_ld"; then
55368bf5c682Smrg	    # We only use this code for GNU lds that support --whole-archive.
55378bf5c682Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
55388bf5c682Smrg	  else
55398bf5c682Smrg	    # Exported symbols can be pulled into shared objects from archives
55408bf5c682Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
55418bf5c682Smrg	  fi
55428bf5c682Smrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
55438bf5c682Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
55448bf5c682Smrg	  # -brtl affects multiple linker settings, -berok does not and is overridden later
55458bf5c682Smrg	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
55468bf5c682Smrg	  if test svr4 != "$with_aix_soname"; then
55478bf5c682Smrg	    # This is similar to how AIX traditionally builds its shared libraries.
55488bf5c682Smrg	    _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'
55498bf5c682Smrg	  fi
55508bf5c682Smrg	  if test aix != "$with_aix_soname"; then
55518bf5c682Smrg	    _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'
55528bf5c682Smrg	  else
55538bf5c682Smrg	    # used by -dlpreopen to get the symbols
55548bf5c682Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
55558bf5c682Smrg	  fi
55568bf5c682Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
55578bf5c682Smrg	fi
55588bf5c682Smrg      fi
55598bf5c682Smrg      ;;
55608bf5c682Smrg
55618bf5c682Smrg    amigaos*)
55628bf5c682Smrg      case $host_cpu in
55638bf5c682Smrg      powerpc)
55648bf5c682Smrg            # see comment about AmigaOS4 .so support
55658bf5c682Smrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
55668bf5c682Smrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
55678bf5c682Smrg        ;;
55688bf5c682Smrg      m68k)
55698bf5c682Smrg            _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)'
55708bf5c682Smrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
55718bf5c682Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
55728bf5c682Smrg        ;;
55738bf5c682Smrg      esac
55748bf5c682Smrg      ;;
55758bf5c682Smrg
55768bf5c682Smrg    bsdi[[45]]*)
55778bf5c682Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
55788bf5c682Smrg      ;;
55798bf5c682Smrg
55808bf5c682Smrg    cygwin* | mingw* | pw32* | cegcc*)
55818bf5c682Smrg      # When not using gcc, we currently assume that we are using
55828bf5c682Smrg      # Microsoft Visual C++.
55838bf5c682Smrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
55848bf5c682Smrg      # no search path for DLLs.
55858bf5c682Smrg      case $cc_basename in
55868bf5c682Smrg      cl*)
55878bf5c682Smrg	# Native MSVC
55888bf5c682Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
55898bf5c682Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
55908bf5c682Smrg	_LT_TAGVAR(always_export_symbols, $1)=yes
55918bf5c682Smrg	_LT_TAGVAR(file_list_spec, $1)='@'
55928bf5c682Smrg	# Tell ltmain to make .lib files, not .a files.
55938bf5c682Smrg	libext=lib
55948bf5c682Smrg	# Tell ltmain to make .dll files, not .so files.
55958bf5c682Smrg	shrext_cmds=.dll
55968bf5c682Smrg	# FIXME: Setting linknames here is a bad hack.
55978bf5c682Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
55988bf5c682Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
55998bf5c682Smrg            cp "$export_symbols" "$output_objdir/$soname.def";
56008bf5c682Smrg            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
56018bf5c682Smrg          else
56028bf5c682Smrg            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
56038bf5c682Smrg          fi~
56048bf5c682Smrg          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
56058bf5c682Smrg          linknames='
56068bf5c682Smrg	# The linker will not automatically build a static lib if we build a DLL.
56078bf5c682Smrg	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
56088bf5c682Smrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
56098bf5c682Smrg	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
56108bf5c682Smrg	_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'
56118bf5c682Smrg	# Don't use ranlib
56128bf5c682Smrg	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
56138bf5c682Smrg	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
56148bf5c682Smrg          lt_tool_outputfile="@TOOL_OUTPUT@"~
56158bf5c682Smrg          case $lt_outputfile in
56168bf5c682Smrg            *.exe|*.EXE) ;;
56178bf5c682Smrg            *)
56188bf5c682Smrg              lt_outputfile=$lt_outputfile.exe
56198bf5c682Smrg              lt_tool_outputfile=$lt_tool_outputfile.exe
56208bf5c682Smrg              ;;
56218bf5c682Smrg          esac~
56228bf5c682Smrg          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
56238bf5c682Smrg            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
56248bf5c682Smrg            $RM "$lt_outputfile.manifest";
56258bf5c682Smrg          fi'
56268bf5c682Smrg	;;
56278bf5c682Smrg      *)
56288bf5c682Smrg	# Assume MSVC wrapper
56298bf5c682Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
56308bf5c682Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
56318bf5c682Smrg	# Tell ltmain to make .lib files, not .a files.
56328bf5c682Smrg	libext=lib
56338bf5c682Smrg	# Tell ltmain to make .dll files, not .so files.
56348bf5c682Smrg	shrext_cmds=.dll
56358bf5c682Smrg	# FIXME: Setting linknames here is a bad hack.
56368bf5c682Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
56378bf5c682Smrg	# The linker will automatically build a .lib file if we build a DLL.
56388bf5c682Smrg	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
56398bf5c682Smrg	# FIXME: Should let the user specify the lib program.
56408bf5c682Smrg	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
56418bf5c682Smrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
56428bf5c682Smrg	;;
56438bf5c682Smrg      esac
56448bf5c682Smrg      ;;
56458bf5c682Smrg
56468bf5c682Smrg    darwin* | rhapsody*)
56478bf5c682Smrg      _LT_DARWIN_LINKER_FEATURES($1)
56488bf5c682Smrg      ;;
56498bf5c682Smrg
56508bf5c682Smrg    dgux*)
56518bf5c682Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
56528bf5c682Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
56538bf5c682Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
56548bf5c682Smrg      ;;
56558bf5c682Smrg
56568bf5c682Smrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
56578bf5c682Smrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
56588bf5c682Smrg    # does not break anything, and helps significantly (at the cost of a little
56598bf5c682Smrg    # extra space).
56608bf5c682Smrg    freebsd2.2*)
56618bf5c682Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
56628bf5c682Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
56638bf5c682Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
56648bf5c682Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
56658bf5c682Smrg      ;;
56668bf5c682Smrg
56678bf5c682Smrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
56688bf5c682Smrg    freebsd2.*)
56698bf5c682Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
56708bf5c682Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
56718bf5c682Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
56728bf5c682Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
56738bf5c682Smrg      ;;
56748bf5c682Smrg
56758bf5c682Smrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
56768bf5c682Smrg    freebsd* | dragonfly*)
56778bf5c682Smrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
56788bf5c682Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
56798bf5c682Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
56808bf5c682Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
56818bf5c682Smrg      ;;
56828bf5c682Smrg
56838bf5c682Smrg    hpux9*)
56848bf5c682Smrg      if test yes = "$GCC"; then
56858bf5c682Smrg	_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'
56868bf5c682Smrg      else
56878bf5c682Smrg	_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'
56888bf5c682Smrg      fi
56898bf5c682Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
56908bf5c682Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
56918bf5c682Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
56928bf5c682Smrg
56938bf5c682Smrg      # hardcode_minus_L: Not really in the search PATH,
56948bf5c682Smrg      # but as the default location of the library.
56958bf5c682Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
56968bf5c682Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
56978bf5c682Smrg      ;;
56988bf5c682Smrg
56998bf5c682Smrg    hpux10*)
57008bf5c682Smrg      if test yes,no = "$GCC,$with_gnu_ld"; then
57018bf5c682Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
57028bf5c682Smrg      else
57038bf5c682Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
57048bf5c682Smrg      fi
57058bf5c682Smrg      if test no = "$with_gnu_ld"; then
57068bf5c682Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
57078bf5c682Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
57088bf5c682Smrg	_LT_TAGVAR(hardcode_direct, $1)=yes
57098bf5c682Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
57108bf5c682Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
57118bf5c682Smrg	# hardcode_minus_L: Not really in the search PATH,
57128bf5c682Smrg	# but as the default location of the library.
57138bf5c682Smrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
57148bf5c682Smrg      fi
57158bf5c682Smrg      ;;
57168bf5c682Smrg
57178bf5c682Smrg    hpux11*)
57188bf5c682Smrg      if test yes,no = "$GCC,$with_gnu_ld"; then
57198bf5c682Smrg	case $host_cpu in
57208bf5c682Smrg	hppa*64*)
57218bf5c682Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
57228bf5c682Smrg	  ;;
57238bf5c682Smrg	ia64*)
57248bf5c682Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
57258bf5c682Smrg	  ;;
57268bf5c682Smrg	*)
57278bf5c682Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
57288bf5c682Smrg	  ;;
57298bf5c682Smrg	esac
57308bf5c682Smrg      else
57318bf5c682Smrg	case $host_cpu in
57328bf5c682Smrg	hppa*64*)
57338bf5c682Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
57348bf5c682Smrg	  ;;
57358bf5c682Smrg	ia64*)
57368bf5c682Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
57378bf5c682Smrg	  ;;
57388bf5c682Smrg	*)
57398bf5c682Smrg	m4_if($1, [], [
57408bf5c682Smrg	  # Older versions of the 11.00 compiler do not understand -b yet
57418bf5c682Smrg	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
57428bf5c682Smrg	  _LT_LINKER_OPTION([if $CC understands -b],
57438bf5c682Smrg	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
57448bf5c682Smrg	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
57458bf5c682Smrg	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
57468bf5c682Smrg	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
57478bf5c682Smrg	  ;;
57488bf5c682Smrg	esac
57498bf5c682Smrg      fi
57508bf5c682Smrg      if test no = "$with_gnu_ld"; then
57518bf5c682Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
57528bf5c682Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
57538bf5c682Smrg
57548bf5c682Smrg	case $host_cpu in
57558bf5c682Smrg	hppa*64*|ia64*)
57568bf5c682Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no
57578bf5c682Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
57588bf5c682Smrg	  ;;
57598bf5c682Smrg	*)
57608bf5c682Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
57618bf5c682Smrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
57628bf5c682Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
57638bf5c682Smrg
57648bf5c682Smrg	  # hardcode_minus_L: Not really in the search PATH,
57658bf5c682Smrg	  # but as the default location of the library.
57668bf5c682Smrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
57678bf5c682Smrg	  ;;
57688bf5c682Smrg	esac
57698bf5c682Smrg      fi
57708bf5c682Smrg      ;;
57718bf5c682Smrg
57728bf5c682Smrg    irix5* | irix6* | nonstopux*)
57738bf5c682Smrg      if test yes = "$GCC"; then
57748bf5c682Smrg	_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'
57758bf5c682Smrg	# Try to use the -exported_symbol ld option, if it does not
57768bf5c682Smrg	# work, assume that -exports_file does not work either and
57778bf5c682Smrg	# implicitly export all symbols.
57788bf5c682Smrg	# This should be the same for all languages, so no per-tag cache variable.
57798bf5c682Smrg	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
57808bf5c682Smrg	  [lt_cv_irix_exported_symbol],
57818bf5c682Smrg	  [save_LDFLAGS=$LDFLAGS
57828bf5c682Smrg	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
57838bf5c682Smrg	   AC_LINK_IFELSE(
57848bf5c682Smrg	     [AC_LANG_SOURCE(
57858bf5c682Smrg	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
57868bf5c682Smrg			      [C++], [[int foo (void) { return 0; }]],
57878bf5c682Smrg			      [Fortran 77], [[
57888bf5c682Smrg      subroutine foo
57898bf5c682Smrg      end]],
57908bf5c682Smrg			      [Fortran], [[
57918bf5c682Smrg      subroutine foo
57928bf5c682Smrg      end]])])],
57938bf5c682Smrg	      [lt_cv_irix_exported_symbol=yes],
57948bf5c682Smrg	      [lt_cv_irix_exported_symbol=no])
57958bf5c682Smrg           LDFLAGS=$save_LDFLAGS])
57968bf5c682Smrg	if test yes = "$lt_cv_irix_exported_symbol"; then
57978bf5c682Smrg          _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'
57988bf5c682Smrg	fi
57998bf5c682Smrg      else
58008bf5c682Smrg	_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'
58018bf5c682Smrg	_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'
58028bf5c682Smrg      fi
58038bf5c682Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
58048bf5c682Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
58058bf5c682Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
58068bf5c682Smrg      _LT_TAGVAR(inherit_rpath, $1)=yes
58078bf5c682Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
58088bf5c682Smrg      ;;
58098bf5c682Smrg
58108bf5c682Smrg    linux*)
58118bf5c682Smrg      case $cc_basename in
58128bf5c682Smrg      tcc*)
58138bf5c682Smrg	# Fabrice Bellard et al's Tiny C Compiler
58148bf5c682Smrg	_LT_TAGVAR(ld_shlibs, $1)=yes
58158bf5c682Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
58168bf5c682Smrg	;;
58178bf5c682Smrg      esac
58188bf5c682Smrg      ;;
58198bf5c682Smrg
58208bf5c682Smrg    netbsd*)
58218bf5c682Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
58228bf5c682Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
58238bf5c682Smrg      else
58248bf5c682Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
58258bf5c682Smrg      fi
58268bf5c682Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
58278bf5c682Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
58288bf5c682Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
58298bf5c682Smrg      ;;
58308bf5c682Smrg
58318bf5c682Smrg    newsos6)
58328bf5c682Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
58338bf5c682Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
58348bf5c682Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
58358bf5c682Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
58368bf5c682Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
58378bf5c682Smrg      ;;
58388bf5c682Smrg
58398bf5c682Smrg    *nto* | *qnx*)
58408bf5c682Smrg      ;;
58418bf5c682Smrg
58428bf5c682Smrg    openbsd* | bitrig*)
58438bf5c682Smrg      if test -f /usr/libexec/ld.so; then
58448bf5c682Smrg	_LT_TAGVAR(hardcode_direct, $1)=yes
58458bf5c682Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
58468bf5c682Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
58478bf5c682Smrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
58488bf5c682Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
58498bf5c682Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
58508bf5c682Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
58518bf5c682Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
58528bf5c682Smrg	else
58538bf5c682Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
58548bf5c682Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
58558bf5c682Smrg	fi
58568bf5c682Smrg      else
58578bf5c682Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
58588bf5c682Smrg      fi
58598bf5c682Smrg      ;;
58608bf5c682Smrg
58618bf5c682Smrg    os2*)
58628bf5c682Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
58638bf5c682Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
58648bf5c682Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
58658bf5c682Smrg      shrext_cmds=.dll
58668bf5c682Smrg      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
58678bf5c682Smrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
58688bf5c682Smrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
58698bf5c682Smrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
58708bf5c682Smrg	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
58718bf5c682Smrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
58728bf5c682Smrg	emximp -o $lib $output_objdir/$libname.def'
58738bf5c682Smrg      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
58748bf5c682Smrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
58758bf5c682Smrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
58768bf5c682Smrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
58778bf5c682Smrg	prefix_cmds="$SED"~
58788bf5c682Smrg	if test EXPORTS = "`$SED 1q $export_symbols`"; then
58798bf5c682Smrg	  prefix_cmds="$prefix_cmds -e 1d";
58808bf5c682Smrg	fi~
58818bf5c682Smrg	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
58828bf5c682Smrg	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
58838bf5c682Smrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
58848bf5c682Smrg	emximp -o $lib $output_objdir/$libname.def'
58858bf5c682Smrg      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
58868bf5c682Smrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
58878bf5c682Smrg      _LT_TAGVAR(file_list_spec, $1)='@'
58888bf5c682Smrg      ;;
58898bf5c682Smrg
58908bf5c682Smrg    osf3*)
58918bf5c682Smrg      if test yes = "$GCC"; then
58928bf5c682Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
58938bf5c682Smrg	_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'
58948bf5c682Smrg      else
58958bf5c682Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
58968bf5c682Smrg	_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'
58978bf5c682Smrg      fi
58988bf5c682Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
58998bf5c682Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
59008bf5c682Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
59018bf5c682Smrg      ;;
59028bf5c682Smrg
59038bf5c682Smrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
59048bf5c682Smrg      if test yes = "$GCC"; then
59058bf5c682Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
59068bf5c682Smrg	_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'
59078bf5c682Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
59088bf5c682Smrg      else
59098bf5c682Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
59108bf5c682Smrg	_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'
59118bf5c682Smrg	_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~
59128bf5c682Smrg          $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'
59138bf5c682Smrg
59148bf5c682Smrg	# Both c and cxx compiler support -rpath directly
59158bf5c682Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
59168bf5c682Smrg      fi
59178bf5c682Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
59188bf5c682Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
59198bf5c682Smrg      ;;
59208bf5c682Smrg
59218bf5c682Smrg    solaris*)
59228bf5c682Smrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
59238bf5c682Smrg      if test yes = "$GCC"; then
59248bf5c682Smrg	wlarc='$wl'
59258bf5c682Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
59268bf5c682Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
59278bf5c682Smrg          $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'
59288bf5c682Smrg      else
59298bf5c682Smrg	case `$CC -V 2>&1` in
59308bf5c682Smrg	*"Compilers 5.0"*)
59318bf5c682Smrg	  wlarc=''
59328bf5c682Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
59338bf5c682Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
59348bf5c682Smrg            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
59358bf5c682Smrg	  ;;
59368bf5c682Smrg	*)
59378bf5c682Smrg	  wlarc='$wl'
59388bf5c682Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
59398bf5c682Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
59408bf5c682Smrg            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
59418bf5c682Smrg	  ;;
59428bf5c682Smrg	esac
59438bf5c682Smrg      fi
59448bf5c682Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
59458bf5c682Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
59468bf5c682Smrg      case $host_os in
59478bf5c682Smrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
59488bf5c682Smrg      *)
59498bf5c682Smrg	# The compiler driver will combine and reorder linker options,
59508bf5c682Smrg	# but understands '-z linker_flag'.  GCC discards it without '$wl',
59518bf5c682Smrg	# but is careful enough not to reorder.
59528bf5c682Smrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
59538bf5c682Smrg	if test yes = "$GCC"; then
59548bf5c682Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
59558bf5c682Smrg	else
59568bf5c682Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
59578bf5c682Smrg	fi
59588bf5c682Smrg	;;
59598bf5c682Smrg      esac
59608bf5c682Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
59618bf5c682Smrg      ;;
59628bf5c682Smrg
59638bf5c682Smrg    sunos4*)
59648bf5c682Smrg      if test sequent = "$host_vendor"; then
59658bf5c682Smrg	# Use $CC to link under sequent, because it throws in some extra .o
59668bf5c682Smrg	# files that make .init and .fini sections work.
59678bf5c682Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
59688bf5c682Smrg      else
59698bf5c682Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
59708bf5c682Smrg      fi
59718bf5c682Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
59728bf5c682Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
59738bf5c682Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
59748bf5c682Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
59758bf5c682Smrg      ;;
59768bf5c682Smrg
59778bf5c682Smrg    sysv4)
59788bf5c682Smrg      case $host_vendor in
59798bf5c682Smrg	sni)
59808bf5c682Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
59818bf5c682Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
59828bf5c682Smrg	;;
59838bf5c682Smrg	siemens)
59848bf5c682Smrg	  ## LD is ld it makes a PLAMLIB
59858bf5c682Smrg	  ## CC just makes a GrossModule.
59868bf5c682Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
59878bf5c682Smrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
59888bf5c682Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no
59898bf5c682Smrg        ;;
59908bf5c682Smrg	motorola)
59918bf5c682Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
59928bf5c682Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
59938bf5c682Smrg	;;
59948bf5c682Smrg      esac
59958bf5c682Smrg      runpath_var='LD_RUN_PATH'
59968bf5c682Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
59978bf5c682Smrg      ;;
59988bf5c682Smrg
59998bf5c682Smrg    sysv4.3*)
60008bf5c682Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
60018bf5c682Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60028bf5c682Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
60038bf5c682Smrg      ;;
60048bf5c682Smrg
60058bf5c682Smrg    sysv4*MP*)
60068bf5c682Smrg      if test -d /usr/nec; then
60078bf5c682Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
60088bf5c682Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60098bf5c682Smrg	runpath_var=LD_RUN_PATH
60108bf5c682Smrg	hardcode_runpath_var=yes
60118bf5c682Smrg	_LT_TAGVAR(ld_shlibs, $1)=yes
60128bf5c682Smrg      fi
60138bf5c682Smrg      ;;
60148bf5c682Smrg
60158bf5c682Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
60168bf5c682Smrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
60178bf5c682Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
60188bf5c682Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60198bf5c682Smrg      runpath_var='LD_RUN_PATH'
60208bf5c682Smrg
60218bf5c682Smrg      if test yes = "$GCC"; then
60228bf5c682Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60238bf5c682Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60248bf5c682Smrg      else
60258bf5c682Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60268bf5c682Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60278bf5c682Smrg      fi
60288bf5c682Smrg      ;;
60298bf5c682Smrg
60308bf5c682Smrg    sysv5* | sco3.2v5* | sco5v6*)
60318bf5c682Smrg      # Note: We CANNOT use -z defs as we might desire, because we do not
60328bf5c682Smrg      # link with -lc, and that would cause any symbols used from libc to
60338bf5c682Smrg      # always be unresolved, which means just about no library would
60348bf5c682Smrg      # ever link correctly.  If we're not using GNU ld we use -z text
60358bf5c682Smrg      # though, which does catch some bad symbols but isn't as heavy-handed
60368bf5c682Smrg      # as -z defs.
60378bf5c682Smrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
60388bf5c682Smrg      _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
60398bf5c682Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
60408bf5c682Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60418bf5c682Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
60428bf5c682Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
60438bf5c682Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
60448bf5c682Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
60458bf5c682Smrg      runpath_var='LD_RUN_PATH'
60468bf5c682Smrg
60478bf5c682Smrg      if test yes = "$GCC"; then
60488bf5c682Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60498bf5c682Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60508bf5c682Smrg      else
60518bf5c682Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60528bf5c682Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60538bf5c682Smrg      fi
60548bf5c682Smrg      ;;
60558bf5c682Smrg
60568bf5c682Smrg    uts4*)
60578bf5c682Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
60588bf5c682Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
60598bf5c682Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60608bf5c682Smrg      ;;
60618bf5c682Smrg
60628bf5c682Smrg    *)
60638bf5c682Smrg      _LT_TAGVAR(ld_shlibs, $1)=no
60648bf5c682Smrg      ;;
60658bf5c682Smrg    esac
60668bf5c682Smrg
60678bf5c682Smrg    if test sni = "$host_vendor"; then
60688bf5c682Smrg      case $host in
60698bf5c682Smrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
60708bf5c682Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
60718bf5c682Smrg	;;
60728bf5c682Smrg      esac
60738bf5c682Smrg    fi
60748bf5c682Smrg  fi
60758bf5c682Smrg])
60768bf5c682SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
60778bf5c682Smrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
60788bf5c682Smrg
60798bf5c682Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
60808bf5c682Smrg
60818bf5c682Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
60828bf5c682Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
60838bf5c682Smrg_LT_DECL([], [extract_expsyms_cmds], [2],
60848bf5c682Smrg    [The commands to extract the exported symbol list from a shared archive])
60858bf5c682Smrg
60868bf5c682Smrg#
60878bf5c682Smrg# Do we need to explicitly link libc?
60888bf5c682Smrg#
60898bf5c682Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
60908bf5c682Smrgx|xyes)
60918bf5c682Smrg  # Assume -lc should be added
60928bf5c682Smrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
60938bf5c682Smrg
60948bf5c682Smrg  if test yes,yes = "$GCC,$enable_shared"; then
60958bf5c682Smrg    case $_LT_TAGVAR(archive_cmds, $1) in
60968bf5c682Smrg    *'~'*)
60978bf5c682Smrg      # FIXME: we may have to deal with multi-command sequences.
60988bf5c682Smrg      ;;
60998bf5c682Smrg    '$CC '*)
61008bf5c682Smrg      # Test whether the compiler implicitly links with -lc since on some
61018bf5c682Smrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
61028bf5c682Smrg      # to ld, don't add -lc before -lgcc.
61038bf5c682Smrg      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
61048bf5c682Smrg	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
61058bf5c682Smrg	[$RM conftest*
61068bf5c682Smrg	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
61078bf5c682Smrg
61088bf5c682Smrg	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
61098bf5c682Smrg	  soname=conftest
61108bf5c682Smrg	  lib=conftest
61118bf5c682Smrg	  libobjs=conftest.$ac_objext
61128bf5c682Smrg	  deplibs=
61138bf5c682Smrg	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
61148bf5c682Smrg	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
61158bf5c682Smrg	  compiler_flags=-v
61168bf5c682Smrg	  linker_flags=-v
61178bf5c682Smrg	  verstring=
61188bf5c682Smrg	  output_objdir=.
61198bf5c682Smrg	  libname=conftest
61208bf5c682Smrg	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
61218bf5c682Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=
61228bf5c682Smrg	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
61238bf5c682Smrg	  then
61248bf5c682Smrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
61258bf5c682Smrg	  else
61268bf5c682Smrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
61278bf5c682Smrg	  fi
61288bf5c682Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
61298bf5c682Smrg	else
61308bf5c682Smrg	  cat conftest.err 1>&5
61318bf5c682Smrg	fi
61328bf5c682Smrg	$RM conftest*
61338bf5c682Smrg	])
61348bf5c682Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
61358bf5c682Smrg      ;;
61368bf5c682Smrg    esac
61378bf5c682Smrg  fi
61388bf5c682Smrg  ;;
61398bf5c682Smrgesac
61408bf5c682Smrg
61418bf5c682Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
61428bf5c682Smrg    [Whether or not to add -lc for building shared libraries])
61438bf5c682Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
61448bf5c682Smrg    [enable_shared_with_static_runtimes], [0],
61458bf5c682Smrg    [Whether or not to disallow shared libs when runtime libs are static])
61468bf5c682Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
61478bf5c682Smrg    [Compiler flag to allow reflexive dlopens])
61488bf5c682Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
61498bf5c682Smrg    [Compiler flag to generate shared objects directly from archives])
61508bf5c682Smrg_LT_TAGDECL([], [compiler_needs_object], [1],
61518bf5c682Smrg    [Whether the compiler copes with passing no objects directly])
61528bf5c682Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
61538bf5c682Smrg    [Create an old-style archive from a shared archive])
61548bf5c682Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
61558bf5c682Smrg    [Create a temporary old-style archive to link instead of a shared archive])
61568bf5c682Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
61578bf5c682Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
61588bf5c682Smrg_LT_TAGDECL([], [module_cmds], [2],
61598bf5c682Smrg    [Commands used to build a loadable module if different from building
61608bf5c682Smrg    a shared archive.])
61618bf5c682Smrg_LT_TAGDECL([], [module_expsym_cmds], [2])
61628bf5c682Smrg_LT_TAGDECL([], [with_gnu_ld], [1],
61638bf5c682Smrg    [Whether we are building with GNU ld or not])
61648bf5c682Smrg_LT_TAGDECL([], [allow_undefined_flag], [1],
61658bf5c682Smrg    [Flag that allows shared libraries with undefined symbols to be built])
61668bf5c682Smrg_LT_TAGDECL([], [no_undefined_flag], [1],
61678bf5c682Smrg    [Flag that enforces no undefined symbols])
61688bf5c682Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
61698bf5c682Smrg    [Flag to hardcode $libdir into a binary during linking.
61708bf5c682Smrg    This must work even if $libdir does not exist])
61718bf5c682Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
61728bf5c682Smrg    [Whether we need a single "-rpath" flag with a separated argument])
61738bf5c682Smrg_LT_TAGDECL([], [hardcode_direct], [0],
61748bf5c682Smrg    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
61758bf5c682Smrg    DIR into the resulting binary])
61768bf5c682Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
61778bf5c682Smrg    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
61788bf5c682Smrg    DIR into the resulting binary and the resulting library dependency is
61798bf5c682Smrg    "absolute", i.e impossible to change by setting $shlibpath_var if the
61808bf5c682Smrg    library is relocated])
61818bf5c682Smrg_LT_TAGDECL([], [hardcode_minus_L], [0],
61828bf5c682Smrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
61838bf5c682Smrg    into the resulting binary])
61848bf5c682Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
61858bf5c682Smrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
61868bf5c682Smrg    into the resulting binary])
61878bf5c682Smrg_LT_TAGDECL([], [hardcode_automatic], [0],
61888bf5c682Smrg    [Set to "yes" if building a shared library automatically hardcodes DIR
61898bf5c682Smrg    into the library and all subsequent libraries and executables linked
61908bf5c682Smrg    against it])
61918bf5c682Smrg_LT_TAGDECL([], [inherit_rpath], [0],
61928bf5c682Smrg    [Set to yes if linker adds runtime paths of dependent libraries
61938bf5c682Smrg    to runtime path list])
61948bf5c682Smrg_LT_TAGDECL([], [link_all_deplibs], [0],
61958bf5c682Smrg    [Whether libtool must link a program against all its dependency libraries])
61968bf5c682Smrg_LT_TAGDECL([], [always_export_symbols], [0],
61978bf5c682Smrg    [Set to "yes" if exported symbols are required])
61988bf5c682Smrg_LT_TAGDECL([], [export_symbols_cmds], [2],
61998bf5c682Smrg    [The commands to list exported symbols])
62008bf5c682Smrg_LT_TAGDECL([], [exclude_expsyms], [1],
62018bf5c682Smrg    [Symbols that should not be listed in the preloaded symbols])
62028bf5c682Smrg_LT_TAGDECL([], [include_expsyms], [1],
62038bf5c682Smrg    [Symbols that must always be exported])
62048bf5c682Smrg_LT_TAGDECL([], [prelink_cmds], [2],
62058bf5c682Smrg    [Commands necessary for linking programs (against libraries) with templates])
62068bf5c682Smrg_LT_TAGDECL([], [postlink_cmds], [2],
62078bf5c682Smrg    [Commands necessary for finishing linking programs])
62088bf5c682Smrg_LT_TAGDECL([], [file_list_spec], [1],
62098bf5c682Smrg    [Specify filename containing input files])
62108bf5c682Smrgdnl FIXME: Not yet implemented
62118bf5c682Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
62128bf5c682Smrgdnl    [Compiler flag to generate thread safe objects])
62138bf5c682Smrg])# _LT_LINKER_SHLIBS
62148bf5c682Smrg
62158bf5c682Smrg
62168bf5c682Smrg# _LT_LANG_C_CONFIG([TAG])
62178bf5c682Smrg# ------------------------
62188bf5c682Smrg# Ensure that the configuration variables for a C compiler are suitably
62198bf5c682Smrg# defined.  These variables are subsequently used by _LT_CONFIG to write
62208bf5c682Smrg# the compiler configuration to 'libtool'.
62218bf5c682Smrgm4_defun([_LT_LANG_C_CONFIG],
62228bf5c682Smrg[m4_require([_LT_DECL_EGREP])dnl
62238bf5c682Smrglt_save_CC=$CC
62248bf5c682SmrgAC_LANG_PUSH(C)
62258bf5c682Smrg
62268bf5c682Smrg# Source file extension for C test sources.
62278bf5c682Smrgac_ext=c
62288bf5c682Smrg
62298bf5c682Smrg# Object file extension for compiled C test sources.
62308bf5c682Smrgobjext=o
62318bf5c682Smrg_LT_TAGVAR(objext, $1)=$objext
62328bf5c682Smrg
62338bf5c682Smrg# Code to be used in simple compile tests
62348bf5c682Smrglt_simple_compile_test_code="int some_variable = 0;"
62358bf5c682Smrg
62368bf5c682Smrg# Code to be used in simple link tests
62378bf5c682Smrglt_simple_link_test_code='int main(){return(0);}'
62388bf5c682Smrg
62398bf5c682Smrg_LT_TAG_COMPILER
62408bf5c682Smrg# Save the default compiler, since it gets overwritten when the other
62418bf5c682Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
62428bf5c682Smrgcompiler_DEFAULT=$CC
62438bf5c682Smrg
62448bf5c682Smrg# save warnings/boilerplate of simple test code
62458bf5c682Smrg_LT_COMPILER_BOILERPLATE
62468bf5c682Smrg_LT_LINKER_BOILERPLATE
62478bf5c682Smrg
62488bf5c682Smrg## CAVEAT EMPTOR:
62498bf5c682Smrg## There is no encapsulation within the following macros, do not change
62508bf5c682Smrg## the running order or otherwise move them around unless you know exactly
62518bf5c682Smrg## what you are doing...
62528bf5c682Smrgif test -n "$compiler"; then
62538bf5c682Smrg  _LT_COMPILER_NO_RTTI($1)
62548bf5c682Smrg  _LT_COMPILER_PIC($1)
62558bf5c682Smrg  _LT_COMPILER_C_O($1)
62568bf5c682Smrg  _LT_COMPILER_FILE_LOCKS($1)
62578bf5c682Smrg  _LT_LINKER_SHLIBS($1)
62588bf5c682Smrg  _LT_SYS_DYNAMIC_LINKER($1)
62598bf5c682Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
62608bf5c682Smrg  LT_SYS_DLOPEN_SELF
62618bf5c682Smrg  _LT_CMD_STRIPLIB
62628bf5c682Smrg
62638bf5c682Smrg  # Report what library types will actually be built
62648bf5c682Smrg  AC_MSG_CHECKING([if libtool supports shared libraries])
62658bf5c682Smrg  AC_MSG_RESULT([$can_build_shared])
62668bf5c682Smrg
62678bf5c682Smrg  AC_MSG_CHECKING([whether to build shared libraries])
62688bf5c682Smrg  test no = "$can_build_shared" && enable_shared=no
62698bf5c682Smrg
62708bf5c682Smrg  # On AIX, shared libraries and static libraries use the same namespace, and
62718bf5c682Smrg  # are all built from PIC.
62728bf5c682Smrg  case $host_os in
62738bf5c682Smrg  aix3*)
62748bf5c682Smrg    test yes = "$enable_shared" && enable_static=no
62758bf5c682Smrg    if test -n "$RANLIB"; then
62768bf5c682Smrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
62778bf5c682Smrg      postinstall_cmds='$RANLIB $lib'
62788bf5c682Smrg    fi
62798bf5c682Smrg    ;;
62808bf5c682Smrg
62818bf5c682Smrg  aix[[4-9]]*)
62828bf5c682Smrg    if test ia64 != "$host_cpu"; then
62838bf5c682Smrg      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
62848bf5c682Smrg      yes,aix,yes) ;;			# shared object as lib.so file only
62858bf5c682Smrg      yes,svr4,*) ;;			# shared object as lib.so archive member only
62868bf5c682Smrg      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
62878bf5c682Smrg      esac
62888bf5c682Smrg    fi
62898bf5c682Smrg    ;;
62908bf5c682Smrg  esac
62918bf5c682Smrg  AC_MSG_RESULT([$enable_shared])
62928bf5c682Smrg
62938bf5c682Smrg  AC_MSG_CHECKING([whether to build static libraries])
62948bf5c682Smrg  # Make sure either enable_shared or enable_static is yes.
62958bf5c682Smrg  test yes = "$enable_shared" || enable_static=yes
62968bf5c682Smrg  AC_MSG_RESULT([$enable_static])
62978bf5c682Smrg
62988bf5c682Smrg  _LT_CONFIG($1)
62998bf5c682Smrgfi
63008bf5c682SmrgAC_LANG_POP
63018bf5c682SmrgCC=$lt_save_CC
63028bf5c682Smrg])# _LT_LANG_C_CONFIG
63038bf5c682Smrg
63048bf5c682Smrg
63058bf5c682Smrg# _LT_LANG_CXX_CONFIG([TAG])
63068bf5c682Smrg# --------------------------
63078bf5c682Smrg# Ensure that the configuration variables for a C++ compiler are suitably
63088bf5c682Smrg# defined.  These variables are subsequently used by _LT_CONFIG to write
63098bf5c682Smrg# the compiler configuration to 'libtool'.
63108bf5c682Smrgm4_defun([_LT_LANG_CXX_CONFIG],
63118bf5c682Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
63128bf5c682Smrgm4_require([_LT_DECL_EGREP])dnl
63138bf5c682Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
63148bf5c682Smrgif test -n "$CXX" && ( test no != "$CXX" &&
63158bf5c682Smrg    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
63168bf5c682Smrg    (test g++ != "$CXX"))); then
63178bf5c682Smrg  AC_PROG_CXXCPP
63188bf5c682Smrgelse
63198bf5c682Smrg  _lt_caught_CXX_error=yes
63208bf5c682Smrgfi
63218bf5c682Smrg
63228bf5c682SmrgAC_LANG_PUSH(C++)
63238bf5c682Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
63248bf5c682Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
63258bf5c682Smrg_LT_TAGVAR(always_export_symbols, $1)=no
63268bf5c682Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
63278bf5c682Smrg_LT_TAGVAR(compiler_needs_object, $1)=no
63288bf5c682Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
63298bf5c682Smrg_LT_TAGVAR(hardcode_direct, $1)=no
63308bf5c682Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
63318bf5c682Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
63328bf5c682Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
63338bf5c682Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
63348bf5c682Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
63358bf5c682Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
63368bf5c682Smrg_LT_TAGVAR(inherit_rpath, $1)=no
63378bf5c682Smrg_LT_TAGVAR(module_cmds, $1)=
63388bf5c682Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
63398bf5c682Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
63408bf5c682Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
63418bf5c682Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
63428bf5c682Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
63438bf5c682Smrg_LT_TAGVAR(no_undefined_flag, $1)=
63448bf5c682Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
63458bf5c682Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
63468bf5c682Smrg
63478bf5c682Smrg# Source file extension for C++ test sources.
63488bf5c682Smrgac_ext=cpp
63498bf5c682Smrg
63508bf5c682Smrg# Object file extension for compiled C++ test sources.
63518bf5c682Smrgobjext=o
63528bf5c682Smrg_LT_TAGVAR(objext, $1)=$objext
63538bf5c682Smrg
63548bf5c682Smrg# No sense in running all these tests if we already determined that
63558bf5c682Smrg# the CXX compiler isn't working.  Some variables (like enable_shared)
63568bf5c682Smrg# are currently assumed to apply to all compilers on this platform,
63578bf5c682Smrg# and will be corrupted by setting them based on a non-working compiler.
63588bf5c682Smrgif test yes != "$_lt_caught_CXX_error"; then
63598bf5c682Smrg  # Code to be used in simple compile tests
63608bf5c682Smrg  lt_simple_compile_test_code="int some_variable = 0;"
63618bf5c682Smrg
63628bf5c682Smrg  # Code to be used in simple link tests
63638bf5c682Smrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
63648bf5c682Smrg
63658bf5c682Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
63668bf5c682Smrg  _LT_TAG_COMPILER
63678bf5c682Smrg
63688bf5c682Smrg  # save warnings/boilerplate of simple test code
63698bf5c682Smrg  _LT_COMPILER_BOILERPLATE
63708bf5c682Smrg  _LT_LINKER_BOILERPLATE
63718bf5c682Smrg
63728bf5c682Smrg  # Allow CC to be a program name with arguments.
63738bf5c682Smrg  lt_save_CC=$CC
63748bf5c682Smrg  lt_save_CFLAGS=$CFLAGS
63758bf5c682Smrg  lt_save_LD=$LD
63768bf5c682Smrg  lt_save_GCC=$GCC
63778bf5c682Smrg  GCC=$GXX
63788bf5c682Smrg  lt_save_with_gnu_ld=$with_gnu_ld
63798bf5c682Smrg  lt_save_path_LD=$lt_cv_path_LD
63808bf5c682Smrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
63818bf5c682Smrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
63828bf5c682Smrg  else
63838bf5c682Smrg    $as_unset lt_cv_prog_gnu_ld
63848bf5c682Smrg  fi
63858bf5c682Smrg  if test -n "${lt_cv_path_LDCXX+set}"; then
63868bf5c682Smrg    lt_cv_path_LD=$lt_cv_path_LDCXX
63878bf5c682Smrg  else
63888bf5c682Smrg    $as_unset lt_cv_path_LD
63898bf5c682Smrg  fi
63908bf5c682Smrg  test -z "${LDCXX+set}" || LD=$LDCXX
63918bf5c682Smrg  CC=${CXX-"c++"}
63928bf5c682Smrg  CFLAGS=$CXXFLAGS
63938bf5c682Smrg  compiler=$CC
63948bf5c682Smrg  _LT_TAGVAR(compiler, $1)=$CC
63958bf5c682Smrg  _LT_CC_BASENAME([$compiler])
63968bf5c682Smrg
63978bf5c682Smrg  if test -n "$compiler"; then
63988bf5c682Smrg    # We don't want -fno-exception when compiling C++ code, so set the
63998bf5c682Smrg    # no_builtin_flag separately
64008bf5c682Smrg    if test yes = "$GXX"; then
64018bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
64028bf5c682Smrg    else
64038bf5c682Smrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
64048bf5c682Smrg    fi
64058bf5c682Smrg
64068bf5c682Smrg    if test yes = "$GXX"; then
64078bf5c682Smrg      # Set up default GNU C++ configuration
64088bf5c682Smrg
64098bf5c682Smrg      LT_PATH_LD
64108bf5c682Smrg
64118bf5c682Smrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
64128bf5c682Smrg      # archiving commands below assume that GNU ld is being used.
64138bf5c682Smrg      if test yes = "$with_gnu_ld"; then
64148bf5c682Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
64158bf5c682Smrg        _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'
64168bf5c682Smrg
64178bf5c682Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
64188bf5c682Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
64198bf5c682Smrg
64208bf5c682Smrg        # If archive_cmds runs LD, not CC, wlarc should be empty
64218bf5c682Smrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
64228bf5c682Smrg        #     investigate it a little bit more. (MM)
64238bf5c682Smrg        wlarc='$wl'
64248bf5c682Smrg
64258bf5c682Smrg        # ancient GNU ld didn't support --whole-archive et. al.
64268bf5c682Smrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
64278bf5c682Smrg	  $GREP 'no-whole-archive' > /dev/null; then
64288bf5c682Smrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
64298bf5c682Smrg        else
64308bf5c682Smrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
64318bf5c682Smrg        fi
64328bf5c682Smrg      else
64338bf5c682Smrg        with_gnu_ld=no
64348bf5c682Smrg        wlarc=
64358bf5c682Smrg
64368bf5c682Smrg        # A generic and very simple default shared library creation
64378bf5c682Smrg        # command for GNU C++ for the case where it uses the native
64388bf5c682Smrg        # linker, instead of GNU ld.  If possible, this setting should
64398bf5c682Smrg        # overridden to take advantage of the native linker features on
64408bf5c682Smrg        # the platform it is being used on.
64418bf5c682Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
64428bf5c682Smrg      fi
64438bf5c682Smrg
64448bf5c682Smrg      # Commands to make compiler produce verbose output that lists
64458bf5c682Smrg      # what "hidden" libraries, object files and flags are used when
64468bf5c682Smrg      # linking a shared library.
64478bf5c682Smrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
64488bf5c682Smrg
64498bf5c682Smrg    else
64508bf5c682Smrg      GXX=no
64518bf5c682Smrg      with_gnu_ld=no
64528bf5c682Smrg      wlarc=
64538bf5c682Smrg    fi
64548bf5c682Smrg
64558bf5c682Smrg    # PORTME: fill in a description of your system's C++ link characteristics
64568bf5c682Smrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
64578bf5c682Smrg    _LT_TAGVAR(ld_shlibs, $1)=yes
64588bf5c682Smrg    case $host_os in
64598bf5c682Smrg      aix3*)
64608bf5c682Smrg        # FIXME: insert proper C++ library support
64618bf5c682Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
64628bf5c682Smrg        ;;
64638bf5c682Smrg      aix[[4-9]]*)
64648bf5c682Smrg        if test ia64 = "$host_cpu"; then
64658bf5c682Smrg          # On IA64, the linker does run time linking by default, so we don't
64668bf5c682Smrg          # have to do anything special.
64678bf5c682Smrg          aix_use_runtimelinking=no
64688bf5c682Smrg          exp_sym_flag='-Bexport'
64698bf5c682Smrg          no_entry_flag=
64708bf5c682Smrg        else
64718bf5c682Smrg          aix_use_runtimelinking=no
64728bf5c682Smrg
64738bf5c682Smrg          # Test if we are trying to use run time linking or normal
64748bf5c682Smrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
64758bf5c682Smrg          # have runtime linking enabled, and use it for executables.
64768bf5c682Smrg          # For shared libraries, we enable/disable runtime linking
64778bf5c682Smrg          # depending on the kind of the shared library created -
64788bf5c682Smrg          # when "with_aix_soname,aix_use_runtimelinking" is:
64798bf5c682Smrg          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
64808bf5c682Smrg          # "aix,yes"  lib.so          shared, rtl:yes, for executables
64818bf5c682Smrg          #            lib.a           static archive
64828bf5c682Smrg          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
64838bf5c682Smrg          #            lib.a(lib.so.V) shared, rtl:no,  for executables
64848bf5c682Smrg          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
64858bf5c682Smrg          #            lib.a(lib.so.V) shared, rtl:no
64868bf5c682Smrg          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
64878bf5c682Smrg          #            lib.a           static archive
64888bf5c682Smrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
64898bf5c682Smrg	    for ld_flag in $LDFLAGS; do
64908bf5c682Smrg	      case $ld_flag in
64918bf5c682Smrg	      *-brtl*)
64928bf5c682Smrg	        aix_use_runtimelinking=yes
64938bf5c682Smrg	        break
64948bf5c682Smrg	        ;;
64958bf5c682Smrg	      esac
64968bf5c682Smrg	    done
64978bf5c682Smrg	    if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
64988bf5c682Smrg	      # With aix-soname=svr4, we create the lib.so.V shared archives only,
64998bf5c682Smrg	      # so we don't have lib.a shared libs to link our executables.
65008bf5c682Smrg	      # We have to force runtime linking in this case.
65018bf5c682Smrg	      aix_use_runtimelinking=yes
65028bf5c682Smrg	      LDFLAGS="$LDFLAGS -Wl,-brtl"
65038bf5c682Smrg	    fi
65048bf5c682Smrg	    ;;
65058bf5c682Smrg          esac
65068bf5c682Smrg
65078bf5c682Smrg          exp_sym_flag='-bexport'
65088bf5c682Smrg          no_entry_flag='-bnoentry'
65098bf5c682Smrg        fi
65108bf5c682Smrg
65118bf5c682Smrg        # When large executables or shared objects are built, AIX ld can
65128bf5c682Smrg        # have problems creating the table of contents.  If linking a library
65138bf5c682Smrg        # or program results in "error TOC overflow" add -mminimal-toc to
65148bf5c682Smrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
65158bf5c682Smrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
65168bf5c682Smrg
65178bf5c682Smrg        _LT_TAGVAR(archive_cmds, $1)=''
65188bf5c682Smrg        _LT_TAGVAR(hardcode_direct, $1)=yes
65198bf5c682Smrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
65208bf5c682Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
65218bf5c682Smrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
65228bf5c682Smrg        _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
65238bf5c682Smrg        case $with_aix_soname,$aix_use_runtimelinking in
65248bf5c682Smrg        aix,*) ;;	# no import file
65258bf5c682Smrg        svr4,* | *,yes) # use import file
65268bf5c682Smrg          # The Import File defines what to hardcode.
65278bf5c682Smrg          _LT_TAGVAR(hardcode_direct, $1)=no
65288bf5c682Smrg          _LT_TAGVAR(hardcode_direct_absolute, $1)=no
65298bf5c682Smrg          ;;
65308bf5c682Smrg        esac
65318bf5c682Smrg
65328bf5c682Smrg        if test yes = "$GXX"; then
65338bf5c682Smrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
65348bf5c682Smrg          # We only want to do this on AIX 4.2 and lower, the check
65358bf5c682Smrg          # below for broken collect2 doesn't work under 4.3+
65368bf5c682Smrg	  collect2name=`$CC -print-prog-name=collect2`
65378bf5c682Smrg	  if test -f "$collect2name" &&
65388bf5c682Smrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
65398bf5c682Smrg	  then
65408bf5c682Smrg	    # We have reworked collect2
65418bf5c682Smrg	    :
65428bf5c682Smrg	  else
65438bf5c682Smrg	    # We have old collect2
65448bf5c682Smrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
65458bf5c682Smrg	    # It fails to find uninstalled libraries when the uninstalled
65468bf5c682Smrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
65478bf5c682Smrg	    # to unsupported forces relinking
65488bf5c682Smrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
65498bf5c682Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
65508bf5c682Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
65518bf5c682Smrg	  fi
65528bf5c682Smrg          esac
65538bf5c682Smrg          shared_flag='-shared'
65548bf5c682Smrg	  if test yes = "$aix_use_runtimelinking"; then
65558bf5c682Smrg	    shared_flag=$shared_flag' $wl-G'
65568bf5c682Smrg	  fi
65578bf5c682Smrg	  # Need to ensure runtime linking is disabled for the traditional
65588bf5c682Smrg	  # shared library, or the linker may eventually find shared libraries
65598bf5c682Smrg	  # /with/ Import File - we do not want to mix them.
65608bf5c682Smrg	  shared_flag_aix='-shared'
65618bf5c682Smrg	  shared_flag_svr4='-shared $wl-G'
65628bf5c682Smrg        else
65638bf5c682Smrg          # not using gcc
65648bf5c682Smrg          if test ia64 = "$host_cpu"; then
65658bf5c682Smrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
65668bf5c682Smrg	  # chokes on -Wl,-G. The following line is correct:
65678bf5c682Smrg	  shared_flag='-G'
65688bf5c682Smrg          else
65698bf5c682Smrg	    if test yes = "$aix_use_runtimelinking"; then
65708bf5c682Smrg	      shared_flag='$wl-G'
65718bf5c682Smrg	    else
65728bf5c682Smrg	      shared_flag='$wl-bM:SRE'
65738bf5c682Smrg	    fi
65748bf5c682Smrg	    shared_flag_aix='$wl-bM:SRE'
65758bf5c682Smrg	    shared_flag_svr4='$wl-G'
65768bf5c682Smrg          fi
65778bf5c682Smrg        fi
65788bf5c682Smrg
65798bf5c682Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
65808bf5c682Smrg        # It seems that -bexpall does not export symbols beginning with
65818bf5c682Smrg        # underscore (_), so it is better to generate a list of symbols to
65828bf5c682Smrg	# export.
65838bf5c682Smrg        _LT_TAGVAR(always_export_symbols, $1)=yes
65848bf5c682Smrg	if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
65858bf5c682Smrg          # Warning - without using the other runtime loading flags (-brtl),
65868bf5c682Smrg          # -berok will link without error, but may produce a broken library.
65878bf5c682Smrg          # The "-G" linker flag allows undefined symbols.
65888bf5c682Smrg          _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
65898bf5c682Smrg          # Determine the default libpath from the value encoded in an empty
65908bf5c682Smrg          # executable.
65918bf5c682Smrg          _LT_SYS_MODULE_PATH_AIX([$1])
65928bf5c682Smrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
65938bf5c682Smrg
65948bf5c682Smrg          _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
65958bf5c682Smrg        else
65968bf5c682Smrg          if test ia64 = "$host_cpu"; then
65978bf5c682Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
65988bf5c682Smrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
65998bf5c682Smrg	    _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"
66008bf5c682Smrg          else
66018bf5c682Smrg	    # Determine the default libpath from the value encoded in an
66028bf5c682Smrg	    # empty executable.
66038bf5c682Smrg	    _LT_SYS_MODULE_PATH_AIX([$1])
66048bf5c682Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
66058bf5c682Smrg	    # Warning - without using the other run time loading flags,
66068bf5c682Smrg	    # -berok will link without error, but may produce a broken library.
66078bf5c682Smrg	    _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
66088bf5c682Smrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
66098bf5c682Smrg	    if test yes = "$with_gnu_ld"; then
66108bf5c682Smrg	      # We only use this code for GNU lds that support --whole-archive.
66118bf5c682Smrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
66128bf5c682Smrg	    else
66138bf5c682Smrg	      # Exported symbols can be pulled into shared objects from archives
66148bf5c682Smrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
66158bf5c682Smrg	    fi
66168bf5c682Smrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
66178bf5c682Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
66188bf5c682Smrg	    # -brtl affects multiple linker settings, -berok does not and is overridden later
66198bf5c682Smrg	    compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
66208bf5c682Smrg	    if test svr4 != "$with_aix_soname"; then
66218bf5c682Smrg	      # This is similar to how AIX traditionally builds its shared
66228bf5c682Smrg	      # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
66238bf5c682Smrg	      _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'
66248bf5c682Smrg	    fi
66258bf5c682Smrg	    if test aix != "$with_aix_soname"; then
66268bf5c682Smrg	      _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'
66278bf5c682Smrg	    else
66288bf5c682Smrg	      # used by -dlpreopen to get the symbols
66298bf5c682Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
66308bf5c682Smrg	    fi
66318bf5c682Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
66328bf5c682Smrg          fi
66338bf5c682Smrg        fi
66348bf5c682Smrg        ;;
66358bf5c682Smrg
66368bf5c682Smrg      beos*)
66378bf5c682Smrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
66388bf5c682Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
66398bf5c682Smrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
66408bf5c682Smrg	  # support --undefined.  This deserves some investigation.  FIXME
66418bf5c682Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
66428bf5c682Smrg	else
66438bf5c682Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
66448bf5c682Smrg	fi
66458bf5c682Smrg	;;
66468bf5c682Smrg
66478bf5c682Smrg      chorus*)
66488bf5c682Smrg        case $cc_basename in
66498bf5c682Smrg          *)
66508bf5c682Smrg	  # FIXME: insert proper C++ library support
66518bf5c682Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
66528bf5c682Smrg	  ;;
66538bf5c682Smrg        esac
66548bf5c682Smrg        ;;
66558bf5c682Smrg
66568bf5c682Smrg      cygwin* | mingw* | pw32* | cegcc*)
66578bf5c682Smrg	case $GXX,$cc_basename in
66588bf5c682Smrg	,cl* | no,cl*)
66598bf5c682Smrg	  # Native MSVC
66608bf5c682Smrg	  # hardcode_libdir_flag_spec is actually meaningless, as there is
66618bf5c682Smrg	  # no search path for DLLs.
66628bf5c682Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
66638bf5c682Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
66648bf5c682Smrg	  _LT_TAGVAR(always_export_symbols, $1)=yes
66658bf5c682Smrg	  _LT_TAGVAR(file_list_spec, $1)='@'
66668bf5c682Smrg	  # Tell ltmain to make .lib files, not .a files.
66678bf5c682Smrg	  libext=lib
66688bf5c682Smrg	  # Tell ltmain to make .dll files, not .so files.
66698bf5c682Smrg	  shrext_cmds=.dll
66708bf5c682Smrg	  # FIXME: Setting linknames here is a bad hack.
66718bf5c682Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
66728bf5c682Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
66738bf5c682Smrg              cp "$export_symbols" "$output_objdir/$soname.def";
66748bf5c682Smrg              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
66758bf5c682Smrg            else
66768bf5c682Smrg              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
66778bf5c682Smrg            fi~
66788bf5c682Smrg            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
66798bf5c682Smrg            linknames='
66808bf5c682Smrg	  # The linker will not automatically build a static lib if we build a DLL.
66818bf5c682Smrg	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
66828bf5c682Smrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
66838bf5c682Smrg	  # Don't use ranlib
66848bf5c682Smrg	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
66858bf5c682Smrg	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
66868bf5c682Smrg            lt_tool_outputfile="@TOOL_OUTPUT@"~
66878bf5c682Smrg            case $lt_outputfile in
66888bf5c682Smrg              *.exe|*.EXE) ;;
66898bf5c682Smrg              *)
66908bf5c682Smrg                lt_outputfile=$lt_outputfile.exe
66918bf5c682Smrg                lt_tool_outputfile=$lt_tool_outputfile.exe
66928bf5c682Smrg                ;;
66938bf5c682Smrg            esac~
66948bf5c682Smrg            func_to_tool_file "$lt_outputfile"~
66958bf5c682Smrg            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
66968bf5c682Smrg              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
66978bf5c682Smrg              $RM "$lt_outputfile.manifest";
66988bf5c682Smrg            fi'
66998bf5c682Smrg	  ;;
67008bf5c682Smrg	*)
67018bf5c682Smrg	  # g++
67028bf5c682Smrg	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
67038bf5c682Smrg	  # as there is no search path for DLLs.
67048bf5c682Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
67058bf5c682Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
67068bf5c682Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
67078bf5c682Smrg	  _LT_TAGVAR(always_export_symbols, $1)=no
67088bf5c682Smrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
67098bf5c682Smrg
67108bf5c682Smrg	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
67118bf5c682Smrg	    _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'
67128bf5c682Smrg	    # If the export-symbols file already is a .def file, use it as
67138bf5c682Smrg	    # is; otherwise, prepend EXPORTS...
67148bf5c682Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
67158bf5c682Smrg              cp $export_symbols $output_objdir/$soname.def;
67168bf5c682Smrg            else
67178bf5c682Smrg              echo EXPORTS > $output_objdir/$soname.def;
67188bf5c682Smrg              cat $export_symbols >> $output_objdir/$soname.def;
67198bf5c682Smrg            fi~
67208bf5c682Smrg            $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'
67218bf5c682Smrg	  else
67228bf5c682Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
67238bf5c682Smrg	  fi
67248bf5c682Smrg	  ;;
67258bf5c682Smrg	esac
67268bf5c682Smrg	;;
67278bf5c682Smrg      darwin* | rhapsody*)
67288bf5c682Smrg        _LT_DARWIN_LINKER_FEATURES($1)
67298bf5c682Smrg	;;
67308bf5c682Smrg
67318bf5c682Smrg      os2*)
67328bf5c682Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
67338bf5c682Smrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
67348bf5c682Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
67358bf5c682Smrg	shrext_cmds=.dll
67368bf5c682Smrg	_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
67378bf5c682Smrg	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
67388bf5c682Smrg	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
67398bf5c682Smrg	  $ECHO EXPORTS >> $output_objdir/$libname.def~
67408bf5c682Smrg	  emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
67418bf5c682Smrg	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
67428bf5c682Smrg	  emximp -o $lib $output_objdir/$libname.def'
67438bf5c682Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
67448bf5c682Smrg	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
67458bf5c682Smrg	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
67468bf5c682Smrg	  $ECHO EXPORTS >> $output_objdir/$libname.def~
67478bf5c682Smrg	  prefix_cmds="$SED"~
67488bf5c682Smrg	  if test EXPORTS = "`$SED 1q $export_symbols`"; then
67498bf5c682Smrg	    prefix_cmds="$prefix_cmds -e 1d";
67508bf5c682Smrg	  fi~
67518bf5c682Smrg	  prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
67528bf5c682Smrg	  cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
67538bf5c682Smrg	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
67548bf5c682Smrg	  emximp -o $lib $output_objdir/$libname.def'
67558bf5c682Smrg	_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
67568bf5c682Smrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
67578bf5c682Smrg	_LT_TAGVAR(file_list_spec, $1)='@'
67588bf5c682Smrg	;;
67598bf5c682Smrg
67608bf5c682Smrg      dgux*)
67618bf5c682Smrg        case $cc_basename in
67628bf5c682Smrg          ec++*)
67638bf5c682Smrg	    # FIXME: insert proper C++ library support
67648bf5c682Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
67658bf5c682Smrg	    ;;
67668bf5c682Smrg          ghcx*)
67678bf5c682Smrg	    # Green Hills C++ Compiler
67688bf5c682Smrg	    # FIXME: insert proper C++ library support
67698bf5c682Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
67708bf5c682Smrg	    ;;
67718bf5c682Smrg          *)
67728bf5c682Smrg	    # FIXME: insert proper C++ library support
67738bf5c682Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
67748bf5c682Smrg	    ;;
67758bf5c682Smrg        esac
67768bf5c682Smrg        ;;
67778bf5c682Smrg
67788bf5c682Smrg      freebsd2.*)
67798bf5c682Smrg        # C++ shared libraries reported to be fairly broken before
67808bf5c682Smrg	# switch to ELF
67818bf5c682Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
67828bf5c682Smrg        ;;
67838bf5c682Smrg
67848bf5c682Smrg      freebsd-elf*)
67858bf5c682Smrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
67868bf5c682Smrg        ;;
67878bf5c682Smrg
67888bf5c682Smrg      freebsd* | dragonfly*)
67898bf5c682Smrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
67908bf5c682Smrg        # conventions
67918bf5c682Smrg        _LT_TAGVAR(ld_shlibs, $1)=yes
67928bf5c682Smrg        ;;
67938bf5c682Smrg
67948bf5c682Smrg      haiku*)
67958bf5c682Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
67968bf5c682Smrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
67978bf5c682Smrg        ;;
67988bf5c682Smrg
67998bf5c682Smrg      hpux9*)
68008bf5c682Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
68018bf5c682Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
68028bf5c682Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
68038bf5c682Smrg        _LT_TAGVAR(hardcode_direct, $1)=yes
68048bf5c682Smrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
68058bf5c682Smrg				             # but as the default
68068bf5c682Smrg				             # location of the library.
68078bf5c682Smrg
68088bf5c682Smrg        case $cc_basename in
68098bf5c682Smrg          CC*)
68108bf5c682Smrg            # FIXME: insert proper C++ library support
68118bf5c682Smrg            _LT_TAGVAR(ld_shlibs, $1)=no
68128bf5c682Smrg            ;;
68138bf5c682Smrg          aCC*)
68148bf5c682Smrg            _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'
68158bf5c682Smrg            # Commands to make compiler produce verbose output that lists
68168bf5c682Smrg            # what "hidden" libraries, object files and flags are used when
68178bf5c682Smrg            # linking a shared library.
68188bf5c682Smrg            #
68198bf5c682Smrg            # There doesn't appear to be a way to prevent this compiler from
68208bf5c682Smrg            # explicitly linking system object files so we need to strip them
68218bf5c682Smrg            # from the output so that they don't get included in the library
68228bf5c682Smrg            # dependencies.
68238bf5c682Smrg            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"'
68248bf5c682Smrg            ;;
68258bf5c682Smrg          *)
68268bf5c682Smrg            if test yes = "$GXX"; then
68278bf5c682Smrg              _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'
68288bf5c682Smrg            else
68298bf5c682Smrg              # FIXME: insert proper C++ library support
68308bf5c682Smrg              _LT_TAGVAR(ld_shlibs, $1)=no
68318bf5c682Smrg            fi
68328bf5c682Smrg            ;;
68338bf5c682Smrg        esac
68348bf5c682Smrg        ;;
68358bf5c682Smrg
68368bf5c682Smrg      hpux10*|hpux11*)
68378bf5c682Smrg        if test no = "$with_gnu_ld"; then
68388bf5c682Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
68398bf5c682Smrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
68408bf5c682Smrg
68418bf5c682Smrg          case $host_cpu in
68428bf5c682Smrg            hppa*64*|ia64*)
68438bf5c682Smrg              ;;
68448bf5c682Smrg            *)
68458bf5c682Smrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
68468bf5c682Smrg              ;;
68478bf5c682Smrg          esac
68488bf5c682Smrg        fi
68498bf5c682Smrg        case $host_cpu in
68508bf5c682Smrg          hppa*64*|ia64*)
68518bf5c682Smrg            _LT_TAGVAR(hardcode_direct, $1)=no
68528bf5c682Smrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
68538bf5c682Smrg            ;;
68548bf5c682Smrg          *)
68558bf5c682Smrg            _LT_TAGVAR(hardcode_direct, $1)=yes
68568bf5c682Smrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
68578bf5c682Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
68588bf5c682Smrg					         # but as the default
68598bf5c682Smrg					         # location of the library.
68608bf5c682Smrg            ;;
68618bf5c682Smrg        esac
68628bf5c682Smrg
68638bf5c682Smrg        case $cc_basename in
68648bf5c682Smrg          CC*)
68658bf5c682Smrg	    # FIXME: insert proper C++ library support
68668bf5c682Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
68678bf5c682Smrg	    ;;
68688bf5c682Smrg          aCC*)
68698bf5c682Smrg	    case $host_cpu in
68708bf5c682Smrg	      hppa*64*)
68718bf5c682Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
68728bf5c682Smrg	        ;;
68738bf5c682Smrg	      ia64*)
68748bf5c682Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
68758bf5c682Smrg	        ;;
68768bf5c682Smrg	      *)
68778bf5c682Smrg	        _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'
68788bf5c682Smrg	        ;;
68798bf5c682Smrg	    esac
68808bf5c682Smrg	    # Commands to make compiler produce verbose output that lists
68818bf5c682Smrg	    # what "hidden" libraries, object files and flags are used when
68828bf5c682Smrg	    # linking a shared library.
68838bf5c682Smrg	    #
68848bf5c682Smrg	    # There doesn't appear to be a way to prevent this compiler from
68858bf5c682Smrg	    # explicitly linking system object files so we need to strip them
68868bf5c682Smrg	    # from the output so that they don't get included in the library
68878bf5c682Smrg	    # dependencies.
68888bf5c682Smrg	    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"'
68898bf5c682Smrg	    ;;
68908bf5c682Smrg          *)
68918bf5c682Smrg	    if test yes = "$GXX"; then
68928bf5c682Smrg	      if test no = "$with_gnu_ld"; then
68938bf5c682Smrg	        case $host_cpu in
68948bf5c682Smrg	          hppa*64*)
68958bf5c682Smrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
68968bf5c682Smrg	            ;;
68978bf5c682Smrg	          ia64*)
68988bf5c682Smrg	            _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'
68998bf5c682Smrg	            ;;
69008bf5c682Smrg	          *)
69018bf5c682Smrg	            _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'
69028bf5c682Smrg	            ;;
69038bf5c682Smrg	        esac
69048bf5c682Smrg	      fi
69058bf5c682Smrg	    else
69068bf5c682Smrg	      # FIXME: insert proper C++ library support
69078bf5c682Smrg	      _LT_TAGVAR(ld_shlibs, $1)=no
69088bf5c682Smrg	    fi
69098bf5c682Smrg	    ;;
69108bf5c682Smrg        esac
69118bf5c682Smrg        ;;
69128bf5c682Smrg
69138bf5c682Smrg      interix[[3-9]]*)
69148bf5c682Smrg	_LT_TAGVAR(hardcode_direct, $1)=no
69158bf5c682Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
69168bf5c682Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
69178bf5c682Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
69188bf5c682Smrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
69198bf5c682Smrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
69208bf5c682Smrg	# default) and relocated if they conflict, which is a slow very memory
69218bf5c682Smrg	# consuming and fragmenting process.  To avoid this, we pick a random,
69228bf5c682Smrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
69238bf5c682Smrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
69248bf5c682Smrg	_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'
69258bf5c682Smrg	_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'
69268bf5c682Smrg	;;
69278bf5c682Smrg      irix5* | irix6*)
69288bf5c682Smrg        case $cc_basename in
69298bf5c682Smrg          CC*)
69308bf5c682Smrg	    # SGI C++
69318bf5c682Smrg	    _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'
69328bf5c682Smrg
69338bf5c682Smrg	    # Archives containing C++ object files must be created using
69348bf5c682Smrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
69358bf5c682Smrg	    # necessary to make sure instantiated templates are included
69368bf5c682Smrg	    # in the archive.
69378bf5c682Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
69388bf5c682Smrg	    ;;
69398bf5c682Smrg          *)
69408bf5c682Smrg	    if test yes = "$GXX"; then
69418bf5c682Smrg	      if test no = "$with_gnu_ld"; then
69428bf5c682Smrg	        _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'
69438bf5c682Smrg	      else
69448bf5c682Smrg	        _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'
69458bf5c682Smrg	      fi
69468bf5c682Smrg	    fi
69478bf5c682Smrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
69488bf5c682Smrg	    ;;
69498bf5c682Smrg        esac
69508bf5c682Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
69518bf5c682Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
69528bf5c682Smrg        _LT_TAGVAR(inherit_rpath, $1)=yes
69538bf5c682Smrg        ;;
69548bf5c682Smrg
69558bf5c682Smrg      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
69568bf5c682Smrg        case $cc_basename in
69578bf5c682Smrg          KCC*)
69588bf5c682Smrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
69598bf5c682Smrg
69608bf5c682Smrg	    # KCC will only create a shared library if the output file
69618bf5c682Smrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
69628bf5c682Smrg	    # to its proper name (with version) after linking.
69638bf5c682Smrg	    _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'
69648bf5c682Smrg	    _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'
69658bf5c682Smrg	    # Commands to make compiler produce verbose output that lists
69668bf5c682Smrg	    # what "hidden" libraries, object files and flags are used when
69678bf5c682Smrg	    # linking a shared library.
69688bf5c682Smrg	    #
69698bf5c682Smrg	    # There doesn't appear to be a way to prevent this compiler from
69708bf5c682Smrg	    # explicitly linking system object files so we need to strip them
69718bf5c682Smrg	    # from the output so that they don't get included in the library
69728bf5c682Smrg	    # dependencies.
69738bf5c682Smrg	    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"'
69748bf5c682Smrg
69758bf5c682Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
69768bf5c682Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
69778bf5c682Smrg
69788bf5c682Smrg	    # Archives containing C++ object files must be created using
69798bf5c682Smrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
69808bf5c682Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
69818bf5c682Smrg	    ;;
69828bf5c682Smrg	  icpc* | ecpc* )
69838bf5c682Smrg	    # Intel C++
69848bf5c682Smrg	    with_gnu_ld=yes
69858bf5c682Smrg	    # version 8.0 and above of icpc choke on multiply defined symbols
69868bf5c682Smrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
69878bf5c682Smrg	    # earlier do not add the objects themselves.
69888bf5c682Smrg	    case `$CC -V 2>&1` in
69898bf5c682Smrg	      *"Version 7."*)
69908bf5c682Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
69918bf5c682Smrg		_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'
69928bf5c682Smrg		;;
69938bf5c682Smrg	      *)  # Version 8.0 or newer
69948bf5c682Smrg	        tmp_idyn=
69958bf5c682Smrg	        case $host_cpu in
69968bf5c682Smrg		  ia64*) tmp_idyn=' -i_dynamic';;
69978bf5c682Smrg		esac
69988bf5c682Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
69998bf5c682Smrg		_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'
70008bf5c682Smrg		;;
70018bf5c682Smrg	    esac
70028bf5c682Smrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
70038bf5c682Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
70048bf5c682Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
70058bf5c682Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
70068bf5c682Smrg	    ;;
70078bf5c682Smrg          pgCC* | pgcpp*)
70088bf5c682Smrg            # Portland Group C++ compiler
70098bf5c682Smrg	    case `$CC -V` in
70108bf5c682Smrg	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
70118bf5c682Smrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
70128bf5c682Smrg               rm -rf $tpldir~
70138bf5c682Smrg               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
70148bf5c682Smrg               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
70158bf5c682Smrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
70168bf5c682Smrg                rm -rf $tpldir~
70178bf5c682Smrg                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
70188bf5c682Smrg                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
70198bf5c682Smrg                $RANLIB $oldlib'
70208bf5c682Smrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
70218bf5c682Smrg                rm -rf $tpldir~
70228bf5c682Smrg                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
70238bf5c682Smrg                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
70248bf5c682Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
70258bf5c682Smrg                rm -rf $tpldir~
70268bf5c682Smrg                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
70278bf5c682Smrg                $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'
70288bf5c682Smrg	      ;;
70298bf5c682Smrg	    *) # Version 6 and above use weak symbols
70308bf5c682Smrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
70318bf5c682Smrg	      _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'
70328bf5c682Smrg	      ;;
70338bf5c682Smrg	    esac
70348bf5c682Smrg
70358bf5c682Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
70368bf5c682Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
70378bf5c682Smrg	    _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'
70388bf5c682Smrg            ;;
70398bf5c682Smrg	  cxx*)
70408bf5c682Smrg	    # Compaq C++
70418bf5c682Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
70428bf5c682Smrg	    _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'
70438bf5c682Smrg
70448bf5c682Smrg	    runpath_var=LD_RUN_PATH
70458bf5c682Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
70468bf5c682Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
70478bf5c682Smrg
70488bf5c682Smrg	    # Commands to make compiler produce verbose output that lists
70498bf5c682Smrg	    # what "hidden" libraries, object files and flags are used when
70508bf5c682Smrg	    # linking a shared library.
70518bf5c682Smrg	    #
70528bf5c682Smrg	    # There doesn't appear to be a way to prevent this compiler from
70538bf5c682Smrg	    # explicitly linking system object files so we need to strip them
70548bf5c682Smrg	    # from the output so that they don't get included in the library
70558bf5c682Smrg	    # dependencies.
70568bf5c682Smrg	    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'
70578bf5c682Smrg	    ;;
70588bf5c682Smrg	  xl* | mpixl* | bgxl*)
70598bf5c682Smrg	    # IBM XL 8.0 on PPC, with GNU ld
70608bf5c682Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
70618bf5c682Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
70628bf5c682Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
70638bf5c682Smrg	    if test yes = "$supports_anon_versioning"; then
70648bf5c682Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
70658bf5c682Smrg                cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
70668bf5c682Smrg                echo "local: *; };" >> $output_objdir/$libname.ver~
70678bf5c682Smrg                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
70688bf5c682Smrg	    fi
70698bf5c682Smrg	    ;;
70708bf5c682Smrg	  *)
70718bf5c682Smrg	    case `$CC -V 2>&1 | sed 5q` in
70728bf5c682Smrg	    *Sun\ C*)
70738bf5c682Smrg	      # Sun C++ 5.9
70748bf5c682Smrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
70758bf5c682Smrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
70768bf5c682Smrg	      _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'
70778bf5c682Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
70788bf5c682Smrg	      _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'
70798bf5c682Smrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
70808bf5c682Smrg
70818bf5c682Smrg	      # Not sure whether something based on
70828bf5c682Smrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
70838bf5c682Smrg	      # would be better.
70848bf5c682Smrg	      output_verbose_link_cmd='func_echo_all'
70858bf5c682Smrg
70868bf5c682Smrg	      # Archives containing C++ object files must be created using
70878bf5c682Smrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
70888bf5c682Smrg	      # necessary to make sure instantiated templates are included
70898bf5c682Smrg	      # in the archive.
70908bf5c682Smrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
70918bf5c682Smrg	      ;;
70928bf5c682Smrg	    esac
70938bf5c682Smrg	    ;;
70948bf5c682Smrg	esac
70958bf5c682Smrg	;;
70968bf5c682Smrg
70978bf5c682Smrg      lynxos*)
70988bf5c682Smrg        # FIXME: insert proper C++ library support
70998bf5c682Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
71008bf5c682Smrg	;;
71018bf5c682Smrg
71028bf5c682Smrg      m88k*)
71038bf5c682Smrg        # FIXME: insert proper C++ library support
71048bf5c682Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
71058bf5c682Smrg	;;
71068bf5c682Smrg
71078bf5c682Smrg      mvs*)
71088bf5c682Smrg        case $cc_basename in
71098bf5c682Smrg          cxx*)
71108bf5c682Smrg	    # FIXME: insert proper C++ library support
71118bf5c682Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
71128bf5c682Smrg	    ;;
71138bf5c682Smrg	  *)
71148bf5c682Smrg	    # FIXME: insert proper C++ library support
71158bf5c682Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
71168bf5c682Smrg	    ;;
71178bf5c682Smrg	esac
71188bf5c682Smrg	;;
71198bf5c682Smrg
71208bf5c682Smrg      netbsd*)
71218bf5c682Smrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
71228bf5c682Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
71238bf5c682Smrg	  wlarc=
71248bf5c682Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
71258bf5c682Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
71268bf5c682Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
71278bf5c682Smrg	fi
71288bf5c682Smrg	# Workaround some broken pre-1.5 toolchains
71298bf5c682Smrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
71308bf5c682Smrg	;;
71318bf5c682Smrg
71328bf5c682Smrg      *nto* | *qnx*)
71338bf5c682Smrg        _LT_TAGVAR(ld_shlibs, $1)=yes
71348bf5c682Smrg	;;
71358bf5c682Smrg
71368bf5c682Smrg      openbsd* | bitrig*)
71378bf5c682Smrg	if test -f /usr/libexec/ld.so; then
71388bf5c682Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
71398bf5c682Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
71408bf5c682Smrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
71418bf5c682Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
71428bf5c682Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
71438bf5c682Smrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
71448bf5c682Smrg	    _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'
71458bf5c682Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
71468bf5c682Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
71478bf5c682Smrg	  fi
71488bf5c682Smrg	  output_verbose_link_cmd=func_echo_all
71498bf5c682Smrg	else
71508bf5c682Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
71518bf5c682Smrg	fi
71528bf5c682Smrg	;;
71538bf5c682Smrg
71548bf5c682Smrg      osf3* | osf4* | osf5*)
71558bf5c682Smrg        case $cc_basename in
71568bf5c682Smrg          KCC*)
71578bf5c682Smrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
71588bf5c682Smrg
71598bf5c682Smrg	    # KCC will only create a shared library if the output file
71608bf5c682Smrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
71618bf5c682Smrg	    # to its proper name (with version) after linking.
71628bf5c682Smrg	    _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'
71638bf5c682Smrg
71648bf5c682Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
71658bf5c682Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
71668bf5c682Smrg
71678bf5c682Smrg	    # Archives containing C++ object files must be created using
71688bf5c682Smrg	    # the KAI C++ compiler.
71698bf5c682Smrg	    case $host in
71708bf5c682Smrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
71718bf5c682Smrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
71728bf5c682Smrg	    esac
71738bf5c682Smrg	    ;;
71748bf5c682Smrg          RCC*)
71758bf5c682Smrg	    # Rational C++ 2.4.1
71768bf5c682Smrg	    # FIXME: insert proper C++ library support
71778bf5c682Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
71788bf5c682Smrg	    ;;
71798bf5c682Smrg          cxx*)
71808bf5c682Smrg	    case $host in
71818bf5c682Smrg	      osf3*)
71828bf5c682Smrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
71838bf5c682Smrg	        _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'
71848bf5c682Smrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
71858bf5c682Smrg		;;
71868bf5c682Smrg	      *)
71878bf5c682Smrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
71888bf5c682Smrg	        _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'
71898bf5c682Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
71908bf5c682Smrg                  echo "-hidden">> $lib.exp~
71918bf5c682Smrg                  $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~
71928bf5c682Smrg                  $RM $lib.exp'
71938bf5c682Smrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
71948bf5c682Smrg		;;
71958bf5c682Smrg	    esac
71968bf5c682Smrg
71978bf5c682Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
71988bf5c682Smrg
71998bf5c682Smrg	    # Commands to make compiler produce verbose output that lists
72008bf5c682Smrg	    # what "hidden" libraries, object files and flags are used when
72018bf5c682Smrg	    # linking a shared library.
72028bf5c682Smrg	    #
72038bf5c682Smrg	    # There doesn't appear to be a way to prevent this compiler from
72048bf5c682Smrg	    # explicitly linking system object files so we need to strip them
72058bf5c682Smrg	    # from the output so that they don't get included in the library
72068bf5c682Smrg	    # dependencies.
72078bf5c682Smrg	    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"'
72088bf5c682Smrg	    ;;
72098bf5c682Smrg	  *)
72108bf5c682Smrg	    if test yes,no = "$GXX,$with_gnu_ld"; then
72118bf5c682Smrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
72128bf5c682Smrg	      case $host in
72138bf5c682Smrg	        osf3*)
72148bf5c682Smrg	          _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'
72158bf5c682Smrg		  ;;
72168bf5c682Smrg	        *)
72178bf5c682Smrg	          _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'
72188bf5c682Smrg		  ;;
72198bf5c682Smrg	      esac
72208bf5c682Smrg
72218bf5c682Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
72228bf5c682Smrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
72238bf5c682Smrg
72248bf5c682Smrg	      # Commands to make compiler produce verbose output that lists
72258bf5c682Smrg	      # what "hidden" libraries, object files and flags are used when
72268bf5c682Smrg	      # linking a shared library.
72278bf5c682Smrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
72288bf5c682Smrg
72298bf5c682Smrg	    else
72308bf5c682Smrg	      # FIXME: insert proper C++ library support
72318bf5c682Smrg	      _LT_TAGVAR(ld_shlibs, $1)=no
72328bf5c682Smrg	    fi
72338bf5c682Smrg	    ;;
72348bf5c682Smrg        esac
72358bf5c682Smrg        ;;
72368bf5c682Smrg
72378bf5c682Smrg      psos*)
72388bf5c682Smrg        # FIXME: insert proper C++ library support
72398bf5c682Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
72408bf5c682Smrg        ;;
72418bf5c682Smrg
72428bf5c682Smrg      sunos4*)
72438bf5c682Smrg        case $cc_basename in
72448bf5c682Smrg          CC*)
72458bf5c682Smrg	    # Sun C++ 4.x
72468bf5c682Smrg	    # FIXME: insert proper C++ library support
72478bf5c682Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
72488bf5c682Smrg	    ;;
72498bf5c682Smrg          lcc*)
72508bf5c682Smrg	    # Lucid
72518bf5c682Smrg	    # FIXME: insert proper C++ library support
72528bf5c682Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
72538bf5c682Smrg	    ;;
72548bf5c682Smrg          *)
72558bf5c682Smrg	    # FIXME: insert proper C++ library support
72568bf5c682Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
72578bf5c682Smrg	    ;;
72588bf5c682Smrg        esac
72598bf5c682Smrg        ;;
72608bf5c682Smrg
72618bf5c682Smrg      solaris*)
72628bf5c682Smrg        case $cc_basename in
72638bf5c682Smrg          CC* | sunCC*)
72648bf5c682Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
72658bf5c682Smrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
72668bf5c682Smrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
72678bf5c682Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
72688bf5c682Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
72698bf5c682Smrg              $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'
72708bf5c682Smrg
72718bf5c682Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
72728bf5c682Smrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
72738bf5c682Smrg	    case $host_os in
72748bf5c682Smrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
72758bf5c682Smrg	      *)
72768bf5c682Smrg		# The compiler driver will combine and reorder linker options,
72778bf5c682Smrg		# but understands '-z linker_flag'.
72788bf5c682Smrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
72798bf5c682Smrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
72808bf5c682Smrg	        ;;
72818bf5c682Smrg	    esac
72828bf5c682Smrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
72838bf5c682Smrg
72848bf5c682Smrg	    output_verbose_link_cmd='func_echo_all'
72858bf5c682Smrg
72868bf5c682Smrg	    # Archives containing C++ object files must be created using
72878bf5c682Smrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
72888bf5c682Smrg	    # necessary to make sure instantiated templates are included
72898bf5c682Smrg	    # in the archive.
72908bf5c682Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
72918bf5c682Smrg	    ;;
72928bf5c682Smrg          gcx*)
72938bf5c682Smrg	    # Green Hills C++ Compiler
72948bf5c682Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
72958bf5c682Smrg
72968bf5c682Smrg	    # The C++ compiler must be used to create the archive.
72978bf5c682Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
72988bf5c682Smrg	    ;;
72998bf5c682Smrg          *)
73008bf5c682Smrg	    # GNU C++ compiler with Solaris linker
73018bf5c682Smrg	    if test yes,no = "$GXX,$with_gnu_ld"; then
73028bf5c682Smrg	      _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
73038bf5c682Smrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
73048bf5c682Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
73058bf5c682Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
73068bf5c682Smrg                  $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'
73078bf5c682Smrg
73088bf5c682Smrg	        # Commands to make compiler produce verbose output that lists
73098bf5c682Smrg	        # what "hidden" libraries, object files and flags are used when
73108bf5c682Smrg	        # linking a shared library.
73118bf5c682Smrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
73128bf5c682Smrg	      else
73138bf5c682Smrg	        # g++ 2.7 appears to require '-G' NOT '-shared' on this
73148bf5c682Smrg	        # platform.
73158bf5c682Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
73168bf5c682Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
73178bf5c682Smrg                  $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'
73188bf5c682Smrg
73198bf5c682Smrg	        # Commands to make compiler produce verbose output that lists
73208bf5c682Smrg	        # what "hidden" libraries, object files and flags are used when
73218bf5c682Smrg	        # linking a shared library.
73228bf5c682Smrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
73238bf5c682Smrg	      fi
73248bf5c682Smrg
73258bf5c682Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
73268bf5c682Smrg	      case $host_os in
73278bf5c682Smrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
73288bf5c682Smrg		*)
73298bf5c682Smrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
73308bf5c682Smrg		  ;;
73318bf5c682Smrg	      esac
73328bf5c682Smrg	    fi
73338bf5c682Smrg	    ;;
73348bf5c682Smrg        esac
73358bf5c682Smrg        ;;
73368bf5c682Smrg
73378bf5c682Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
73388bf5c682Smrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
73398bf5c682Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
73408bf5c682Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
73418bf5c682Smrg      runpath_var='LD_RUN_PATH'
73428bf5c682Smrg
73438bf5c682Smrg      case $cc_basename in
73448bf5c682Smrg        CC*)
73458bf5c682Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73468bf5c682Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73478bf5c682Smrg	  ;;
73488bf5c682Smrg	*)
73498bf5c682Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73508bf5c682Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73518bf5c682Smrg	  ;;
73528bf5c682Smrg      esac
73538bf5c682Smrg      ;;
73548bf5c682Smrg
73558bf5c682Smrg      sysv5* | sco3.2v5* | sco5v6*)
73568bf5c682Smrg	# Note: We CANNOT use -z defs as we might desire, because we do not
73578bf5c682Smrg	# link with -lc, and that would cause any symbols used from libc to
73588bf5c682Smrg	# always be unresolved, which means just about no library would
73598bf5c682Smrg	# ever link correctly.  If we're not using GNU ld we use -z text
73608bf5c682Smrg	# though, which does catch some bad symbols but isn't as heavy-handed
73618bf5c682Smrg	# as -z defs.
73628bf5c682Smrg	_LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
73638bf5c682Smrg	_LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
73648bf5c682Smrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
73658bf5c682Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
73668bf5c682Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
73678bf5c682Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
73688bf5c682Smrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
73698bf5c682Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
73708bf5c682Smrg	runpath_var='LD_RUN_PATH'
73718bf5c682Smrg
73728bf5c682Smrg	case $cc_basename in
73738bf5c682Smrg          CC*)
73748bf5c682Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73758bf5c682Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73768bf5c682Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
73778bf5c682Smrg              '"$_LT_TAGVAR(old_archive_cmds, $1)"
73788bf5c682Smrg	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
73798bf5c682Smrg              '"$_LT_TAGVAR(reload_cmds, $1)"
73808bf5c682Smrg	    ;;
73818bf5c682Smrg	  *)
73828bf5c682Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73838bf5c682Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73848bf5c682Smrg	    ;;
73858bf5c682Smrg	esac
73868bf5c682Smrg      ;;
73878bf5c682Smrg
73888bf5c682Smrg      tandem*)
73898bf5c682Smrg        case $cc_basename in
73908bf5c682Smrg          NCC*)
73918bf5c682Smrg	    # NonStop-UX NCC 3.20
73928bf5c682Smrg	    # FIXME: insert proper C++ library support
73938bf5c682Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
73948bf5c682Smrg	    ;;
73958bf5c682Smrg          *)
73968bf5c682Smrg	    # FIXME: insert proper C++ library support
73978bf5c682Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
73988bf5c682Smrg	    ;;
73998bf5c682Smrg        esac
74008bf5c682Smrg        ;;
74018bf5c682Smrg
74028bf5c682Smrg      vxworks*)
74038bf5c682Smrg        # FIXME: insert proper C++ library support
74048bf5c682Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
74058bf5c682Smrg        ;;
74068bf5c682Smrg
74078bf5c682Smrg      *)
74088bf5c682Smrg        # FIXME: insert proper C++ library support
74098bf5c682Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
74108bf5c682Smrg        ;;
74118bf5c682Smrg    esac
74128bf5c682Smrg
74138bf5c682Smrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
74148bf5c682Smrg    test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
74158bf5c682Smrg
74168bf5c682Smrg    _LT_TAGVAR(GCC, $1)=$GXX
74178bf5c682Smrg    _LT_TAGVAR(LD, $1)=$LD
74188bf5c682Smrg
74198bf5c682Smrg    ## CAVEAT EMPTOR:
74208bf5c682Smrg    ## There is no encapsulation within the following macros, do not change
74218bf5c682Smrg    ## the running order or otherwise move them around unless you know exactly
74228bf5c682Smrg    ## what you are doing...
74238bf5c682Smrg    _LT_SYS_HIDDEN_LIBDEPS($1)
74248bf5c682Smrg    _LT_COMPILER_PIC($1)
74258bf5c682Smrg    _LT_COMPILER_C_O($1)
74268bf5c682Smrg    _LT_COMPILER_FILE_LOCKS($1)
74278bf5c682Smrg    _LT_LINKER_SHLIBS($1)
74288bf5c682Smrg    _LT_SYS_DYNAMIC_LINKER($1)
74298bf5c682Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
74308bf5c682Smrg
74318bf5c682Smrg    _LT_CONFIG($1)
74328bf5c682Smrg  fi # test -n "$compiler"
74338bf5c682Smrg
74348bf5c682Smrg  CC=$lt_save_CC
74358bf5c682Smrg  CFLAGS=$lt_save_CFLAGS
74368bf5c682Smrg  LDCXX=$LD
74378bf5c682Smrg  LD=$lt_save_LD
74388bf5c682Smrg  GCC=$lt_save_GCC
74398bf5c682Smrg  with_gnu_ld=$lt_save_with_gnu_ld
74408bf5c682Smrg  lt_cv_path_LDCXX=$lt_cv_path_LD
74418bf5c682Smrg  lt_cv_path_LD=$lt_save_path_LD
74428bf5c682Smrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
74438bf5c682Smrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
74448bf5c682Smrgfi # test yes != "$_lt_caught_CXX_error"
74458bf5c682Smrg
74468bf5c682SmrgAC_LANG_POP
74478bf5c682Smrg])# _LT_LANG_CXX_CONFIG
74488bf5c682Smrg
74498bf5c682Smrg
74508bf5c682Smrg# _LT_FUNC_STRIPNAME_CNF
74518bf5c682Smrg# ----------------------
74528bf5c682Smrg# func_stripname_cnf prefix suffix name
74538bf5c682Smrg# strip PREFIX and SUFFIX off of NAME.
74548bf5c682Smrg# PREFIX and SUFFIX must not contain globbing or regex special
74558bf5c682Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading
74568bf5c682Smrg# dot (in which case that matches only a dot).
74578bf5c682Smrg#
74588bf5c682Smrg# This function is identical to the (non-XSI) version of func_stripname,
74598bf5c682Smrg# except this one can be used by m4 code that may be executed by configure,
74608bf5c682Smrg# rather than the libtool script.
74618bf5c682Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
74628bf5c682SmrgAC_REQUIRE([_LT_DECL_SED])
74638bf5c682SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
74648bf5c682Smrgfunc_stripname_cnf ()
74658bf5c682Smrg{
74668bf5c682Smrg  case @S|@2 in
74678bf5c682Smrg  .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
74688bf5c682Smrg  *)  func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
74698bf5c682Smrg  esac
74708bf5c682Smrg} # func_stripname_cnf
74718bf5c682Smrg])# _LT_FUNC_STRIPNAME_CNF
74728bf5c682Smrg
74738bf5c682Smrg
74748bf5c682Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
74758bf5c682Smrg# ---------------------------------
74768bf5c682Smrg# Figure out "hidden" library dependencies from verbose
74778bf5c682Smrg# compiler output when linking a shared library.
74788bf5c682Smrg# Parse the compiler output and extract the necessary
74798bf5c682Smrg# objects, libraries and library flags.
74808bf5c682Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
74818bf5c682Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
74828bf5c682SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
74838bf5c682Smrg# Dependencies to place before and after the object being linked:
74848bf5c682Smrg_LT_TAGVAR(predep_objects, $1)=
74858bf5c682Smrg_LT_TAGVAR(postdep_objects, $1)=
74868bf5c682Smrg_LT_TAGVAR(predeps, $1)=
74878bf5c682Smrg_LT_TAGVAR(postdeps, $1)=
74888bf5c682Smrg_LT_TAGVAR(compiler_lib_search_path, $1)=
74898bf5c682Smrg
74908bf5c682Smrgdnl we can't use the lt_simple_compile_test_code here,
74918bf5c682Smrgdnl because it contains code intended for an executable,
74928bf5c682Smrgdnl not a library.  It's possible we should let each
74938bf5c682Smrgdnl tag define a new lt_????_link_test_code variable,
74948bf5c682Smrgdnl but it's only used here...
74958bf5c682Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
74968bf5c682Smrgint a;
74978bf5c682Smrgvoid foo (void) { a = 0; }
74988bf5c682Smrg_LT_EOF
74998bf5c682Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
75008bf5c682Smrgclass Foo
75018bf5c682Smrg{
75028bf5c682Smrgpublic:
75038bf5c682Smrg  Foo (void) { a = 0; }
75048bf5c682Smrgprivate:
75058bf5c682Smrg  int a;
75068bf5c682Smrg};
75078bf5c682Smrg_LT_EOF
75088bf5c682Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
75098bf5c682Smrg      subroutine foo
75108bf5c682Smrg      implicit none
75118bf5c682Smrg      integer*4 a
75128bf5c682Smrg      a=0
75138bf5c682Smrg      return
75148bf5c682Smrg      end
75158bf5c682Smrg_LT_EOF
75168bf5c682Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
75178bf5c682Smrg      subroutine foo
75188bf5c682Smrg      implicit none
75198bf5c682Smrg      integer a
75208bf5c682Smrg      a=0
75218bf5c682Smrg      return
75228bf5c682Smrg      end
75238bf5c682Smrg_LT_EOF
75248bf5c682Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
75258bf5c682Smrgpublic class foo {
75268bf5c682Smrg  private int a;
75278bf5c682Smrg  public void bar (void) {
75288bf5c682Smrg    a = 0;
75298bf5c682Smrg  }
75308bf5c682Smrg};
75318bf5c682Smrg_LT_EOF
75328bf5c682Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
75338bf5c682Smrgpackage foo
75348bf5c682Smrgfunc foo() {
75358bf5c682Smrg}
75368bf5c682Smrg_LT_EOF
75378bf5c682Smrg])
75388bf5c682Smrg
75398bf5c682Smrg_lt_libdeps_save_CFLAGS=$CFLAGS
75408bf5c682Smrgcase "$CC $CFLAGS " in #(
75418bf5c682Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
75428bf5c682Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
75438bf5c682Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
75448bf5c682Smrgesac
75458bf5c682Smrg
75468bf5c682Smrgdnl Parse the compiler output and extract the necessary
75478bf5c682Smrgdnl objects, libraries and library flags.
75488bf5c682Smrgif AC_TRY_EVAL(ac_compile); then
75498bf5c682Smrg  # Parse the compiler output and extract the necessary
75508bf5c682Smrg  # objects, libraries and library flags.
75518bf5c682Smrg
75528bf5c682Smrg  # Sentinel used to keep track of whether or not we are before
75538bf5c682Smrg  # the conftest object file.
75548bf5c682Smrg  pre_test_object_deps_done=no
75558bf5c682Smrg
75568bf5c682Smrg  for p in `eval "$output_verbose_link_cmd"`; do
75578bf5c682Smrg    case $prev$p in
75588bf5c682Smrg
75598bf5c682Smrg    -L* | -R* | -l*)
75608bf5c682Smrg       # Some compilers place space between "-{L,R}" and the path.
75618bf5c682Smrg       # Remove the space.
75628bf5c682Smrg       if test x-L = "$p" ||
75638bf5c682Smrg          test x-R = "$p"; then
75648bf5c682Smrg	 prev=$p
75658bf5c682Smrg	 continue
75668bf5c682Smrg       fi
75678bf5c682Smrg
75688bf5c682Smrg       # Expand the sysroot to ease extracting the directories later.
75698bf5c682Smrg       if test -z "$prev"; then
75708bf5c682Smrg         case $p in
75718bf5c682Smrg         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
75728bf5c682Smrg         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
75738bf5c682Smrg         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
75748bf5c682Smrg         esac
75758bf5c682Smrg       fi
75768bf5c682Smrg       case $p in
75778bf5c682Smrg       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
75788bf5c682Smrg       esac
75798bf5c682Smrg       if test no = "$pre_test_object_deps_done"; then
75808bf5c682Smrg	 case $prev in
75818bf5c682Smrg	 -L | -R)
75828bf5c682Smrg	   # Internal compiler library paths should come after those
75838bf5c682Smrg	   # provided the user.  The postdeps already come after the
75848bf5c682Smrg	   # user supplied libs so there is no need to process them.
75858bf5c682Smrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
75868bf5c682Smrg	     _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
75878bf5c682Smrg	   else
75888bf5c682Smrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
75898bf5c682Smrg	   fi
75908bf5c682Smrg	   ;;
75918bf5c682Smrg	 # The "-l" case would never come before the object being
75928bf5c682Smrg	 # linked, so don't bother handling this case.
75938bf5c682Smrg	 esac
75948bf5c682Smrg       else
75958bf5c682Smrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
75968bf5c682Smrg	   _LT_TAGVAR(postdeps, $1)=$prev$p
75978bf5c682Smrg	 else
75988bf5c682Smrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
75998bf5c682Smrg	 fi
76008bf5c682Smrg       fi
76018bf5c682Smrg       prev=
76028bf5c682Smrg       ;;
76038bf5c682Smrg
76048bf5c682Smrg    *.lto.$objext) ;; # Ignore GCC LTO objects
76058bf5c682Smrg    *.$objext)
76068bf5c682Smrg       # This assumes that the test object file only shows up
76078bf5c682Smrg       # once in the compiler output.
76088bf5c682Smrg       if test "$p" = "conftest.$objext"; then
76098bf5c682Smrg	 pre_test_object_deps_done=yes
76108bf5c682Smrg	 continue
76118bf5c682Smrg       fi
76128bf5c682Smrg
76138bf5c682Smrg       if test no = "$pre_test_object_deps_done"; then
76148bf5c682Smrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
76158bf5c682Smrg	   _LT_TAGVAR(predep_objects, $1)=$p
76168bf5c682Smrg	 else
76178bf5c682Smrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
76188bf5c682Smrg	 fi
76198bf5c682Smrg       else
76208bf5c682Smrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
76218bf5c682Smrg	   _LT_TAGVAR(postdep_objects, $1)=$p
76228bf5c682Smrg	 else
76238bf5c682Smrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
76248bf5c682Smrg	 fi
76258bf5c682Smrg       fi
76268bf5c682Smrg       ;;
76278bf5c682Smrg
76288bf5c682Smrg    *) ;; # Ignore the rest.
76298bf5c682Smrg
76308bf5c682Smrg    esac
76318bf5c682Smrg  done
76328bf5c682Smrg
76338bf5c682Smrg  # Clean up.
76348bf5c682Smrg  rm -f a.out a.exe
76358bf5c682Smrgelse
76368bf5c682Smrg  echo "libtool.m4: error: problem compiling $1 test program"
76378bf5c682Smrgfi
76388bf5c682Smrg
76398bf5c682Smrg$RM -f confest.$objext
76408bf5c682SmrgCFLAGS=$_lt_libdeps_save_CFLAGS
76418bf5c682Smrg
76428bf5c682Smrg# PORTME: override above test on systems where it is broken
76438bf5c682Smrgm4_if([$1], [CXX],
76448bf5c682Smrg[case $host_os in
76458bf5c682Smrginterix[[3-9]]*)
76468bf5c682Smrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
76478bf5c682Smrg  # hack all around it, let's just trust "g++" to DTRT.
76488bf5c682Smrg  _LT_TAGVAR(predep_objects,$1)=
76498bf5c682Smrg  _LT_TAGVAR(postdep_objects,$1)=
76508bf5c682Smrg  _LT_TAGVAR(postdeps,$1)=
76518bf5c682Smrg  ;;
76528bf5c682Smrgesac
76538bf5c682Smrg])
76548bf5c682Smrg
76558bf5c682Smrgcase " $_LT_TAGVAR(postdeps, $1) " in
76568bf5c682Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
76578bf5c682Smrgesac
76588bf5c682Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
76598bf5c682Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
76608bf5c682Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
76618bf5c682Smrgfi
76628bf5c682Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
76638bf5c682Smrg    [The directories searched by this compiler when creating a shared library])
76648bf5c682Smrg_LT_TAGDECL([], [predep_objects], [1],
76658bf5c682Smrg    [Dependencies to place before and after the objects being linked to
76668bf5c682Smrg    create a shared library])
76678bf5c682Smrg_LT_TAGDECL([], [postdep_objects], [1])
76688bf5c682Smrg_LT_TAGDECL([], [predeps], [1])
76698bf5c682Smrg_LT_TAGDECL([], [postdeps], [1])
76708bf5c682Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
76718bf5c682Smrg    [The library search path used internally by the compiler when linking
76728bf5c682Smrg    a shared library])
76738bf5c682Smrg])# _LT_SYS_HIDDEN_LIBDEPS
76748bf5c682Smrg
76758bf5c682Smrg
76768bf5c682Smrg# _LT_LANG_F77_CONFIG([TAG])
76778bf5c682Smrg# --------------------------
76788bf5c682Smrg# Ensure that the configuration variables for a Fortran 77 compiler are
76798bf5c682Smrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
76808bf5c682Smrg# to write the compiler configuration to 'libtool'.
76818bf5c682Smrgm4_defun([_LT_LANG_F77_CONFIG],
76828bf5c682Smrg[AC_LANG_PUSH(Fortran 77)
76838bf5c682Smrgif test -z "$F77" || test no = "$F77"; then
76848bf5c682Smrg  _lt_disable_F77=yes
76858bf5c682Smrgfi
76868bf5c682Smrg
76878bf5c682Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
76888bf5c682Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
76898bf5c682Smrg_LT_TAGVAR(always_export_symbols, $1)=no
76908bf5c682Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
76918bf5c682Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
76928bf5c682Smrg_LT_TAGVAR(hardcode_direct, $1)=no
76938bf5c682Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
76948bf5c682Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
76958bf5c682Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
76968bf5c682Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
76978bf5c682Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
76988bf5c682Smrg_LT_TAGVAR(inherit_rpath, $1)=no
76998bf5c682Smrg_LT_TAGVAR(module_cmds, $1)=
77008bf5c682Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
77018bf5c682Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
77028bf5c682Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
77038bf5c682Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
77048bf5c682Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
77058bf5c682Smrg_LT_TAGVAR(no_undefined_flag, $1)=
77068bf5c682Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
77078bf5c682Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
77088bf5c682Smrg
77098bf5c682Smrg# Source file extension for f77 test sources.
77108bf5c682Smrgac_ext=f
77118bf5c682Smrg
77128bf5c682Smrg# Object file extension for compiled f77 test sources.
77138bf5c682Smrgobjext=o
77148bf5c682Smrg_LT_TAGVAR(objext, $1)=$objext
77158bf5c682Smrg
77168bf5c682Smrg# No sense in running all these tests if we already determined that
77178bf5c682Smrg# the F77 compiler isn't working.  Some variables (like enable_shared)
77188bf5c682Smrg# are currently assumed to apply to all compilers on this platform,
77198bf5c682Smrg# and will be corrupted by setting them based on a non-working compiler.
77208bf5c682Smrgif test yes != "$_lt_disable_F77"; then
77218bf5c682Smrg  # Code to be used in simple compile tests
77228bf5c682Smrg  lt_simple_compile_test_code="\
77238bf5c682Smrg      subroutine t
77248bf5c682Smrg      return
77258bf5c682Smrg      end
77268bf5c682Smrg"
77278bf5c682Smrg
77288bf5c682Smrg  # Code to be used in simple link tests
77298bf5c682Smrg  lt_simple_link_test_code="\
77308bf5c682Smrg      program t
77318bf5c682Smrg      end
77328bf5c682Smrg"
77338bf5c682Smrg
77348bf5c682Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
77358bf5c682Smrg  _LT_TAG_COMPILER
77368bf5c682Smrg
77378bf5c682Smrg  # save warnings/boilerplate of simple test code
77388bf5c682Smrg  _LT_COMPILER_BOILERPLATE
77398bf5c682Smrg  _LT_LINKER_BOILERPLATE
77408bf5c682Smrg
77418bf5c682Smrg  # Allow CC to be a program name with arguments.
77428bf5c682Smrg  lt_save_CC=$CC
77438bf5c682Smrg  lt_save_GCC=$GCC
77448bf5c682Smrg  lt_save_CFLAGS=$CFLAGS
77458bf5c682Smrg  CC=${F77-"f77"}
77468bf5c682Smrg  CFLAGS=$FFLAGS
77478bf5c682Smrg  compiler=$CC
77488bf5c682Smrg  _LT_TAGVAR(compiler, $1)=$CC
77498bf5c682Smrg  _LT_CC_BASENAME([$compiler])
77508bf5c682Smrg  GCC=$G77
77518bf5c682Smrg  if test -n "$compiler"; then
77528bf5c682Smrg    AC_MSG_CHECKING([if libtool supports shared libraries])
77538bf5c682Smrg    AC_MSG_RESULT([$can_build_shared])
77548bf5c682Smrg
77558bf5c682Smrg    AC_MSG_CHECKING([whether to build shared libraries])
77568bf5c682Smrg    test no = "$can_build_shared" && enable_shared=no
77578bf5c682Smrg
77588bf5c682Smrg    # On AIX, shared libraries and static libraries use the same namespace, and
77598bf5c682Smrg    # are all built from PIC.
77608bf5c682Smrg    case $host_os in
77618bf5c682Smrg      aix3*)
77628bf5c682Smrg        test yes = "$enable_shared" && enable_static=no
77638bf5c682Smrg        if test -n "$RANLIB"; then
77648bf5c682Smrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
77658bf5c682Smrg          postinstall_cmds='$RANLIB $lib'
77668bf5c682Smrg        fi
77678bf5c682Smrg        ;;
77688bf5c682Smrg      aix[[4-9]]*)
77698bf5c682Smrg	if test ia64 != "$host_cpu"; then
77708bf5c682Smrg	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
77718bf5c682Smrg	  yes,aix,yes) ;;		# shared object as lib.so file only
77728bf5c682Smrg	  yes,svr4,*) ;;		# shared object as lib.so archive member only
77738bf5c682Smrg	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
77748bf5c682Smrg	  esac
77758bf5c682Smrg	fi
77768bf5c682Smrg        ;;
77778bf5c682Smrg    esac
77788bf5c682Smrg    AC_MSG_RESULT([$enable_shared])
77798bf5c682Smrg
77808bf5c682Smrg    AC_MSG_CHECKING([whether to build static libraries])
77818bf5c682Smrg    # Make sure either enable_shared or enable_static is yes.
77828bf5c682Smrg    test yes = "$enable_shared" || enable_static=yes
77838bf5c682Smrg    AC_MSG_RESULT([$enable_static])
77848bf5c682Smrg
77858bf5c682Smrg    _LT_TAGVAR(GCC, $1)=$G77
77868bf5c682Smrg    _LT_TAGVAR(LD, $1)=$LD
77878bf5c682Smrg
77888bf5c682Smrg    ## CAVEAT EMPTOR:
77898bf5c682Smrg    ## There is no encapsulation within the following macros, do not change
77908bf5c682Smrg    ## the running order or otherwise move them around unless you know exactly
77918bf5c682Smrg    ## what you are doing...
77928bf5c682Smrg    _LT_COMPILER_PIC($1)
77938bf5c682Smrg    _LT_COMPILER_C_O($1)
77948bf5c682Smrg    _LT_COMPILER_FILE_LOCKS($1)
77958bf5c682Smrg    _LT_LINKER_SHLIBS($1)
77968bf5c682Smrg    _LT_SYS_DYNAMIC_LINKER($1)
77978bf5c682Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
77988bf5c682Smrg
77998bf5c682Smrg    _LT_CONFIG($1)
78008bf5c682Smrg  fi # test -n "$compiler"
78018bf5c682Smrg
78028bf5c682Smrg  GCC=$lt_save_GCC
78038bf5c682Smrg  CC=$lt_save_CC
78048bf5c682Smrg  CFLAGS=$lt_save_CFLAGS
78058bf5c682Smrgfi # test yes != "$_lt_disable_F77"
78068bf5c682Smrg
78078bf5c682SmrgAC_LANG_POP
78088bf5c682Smrg])# _LT_LANG_F77_CONFIG
78098bf5c682Smrg
78108bf5c682Smrg
78118bf5c682Smrg# _LT_LANG_FC_CONFIG([TAG])
78128bf5c682Smrg# -------------------------
78138bf5c682Smrg# Ensure that the configuration variables for a Fortran compiler are
78148bf5c682Smrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
78158bf5c682Smrg# to write the compiler configuration to 'libtool'.
78168bf5c682Smrgm4_defun([_LT_LANG_FC_CONFIG],
78178bf5c682Smrg[AC_LANG_PUSH(Fortran)
78188bf5c682Smrg
78198bf5c682Smrgif test -z "$FC" || test no = "$FC"; then
78208bf5c682Smrg  _lt_disable_FC=yes
78218bf5c682Smrgfi
78228bf5c682Smrg
78238bf5c682Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
78248bf5c682Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
78258bf5c682Smrg_LT_TAGVAR(always_export_symbols, $1)=no
78268bf5c682Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
78278bf5c682Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
78288bf5c682Smrg_LT_TAGVAR(hardcode_direct, $1)=no
78298bf5c682Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
78308bf5c682Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
78318bf5c682Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
78328bf5c682Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
78338bf5c682Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
78348bf5c682Smrg_LT_TAGVAR(inherit_rpath, $1)=no
78358bf5c682Smrg_LT_TAGVAR(module_cmds, $1)=
78368bf5c682Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
78378bf5c682Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
78388bf5c682Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
78398bf5c682Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
78408bf5c682Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
78418bf5c682Smrg_LT_TAGVAR(no_undefined_flag, $1)=
78428bf5c682Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
78438bf5c682Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
78448bf5c682Smrg
78458bf5c682Smrg# Source file extension for fc test sources.
78468bf5c682Smrgac_ext=${ac_fc_srcext-f}
78478bf5c682Smrg
78488bf5c682Smrg# Object file extension for compiled fc test sources.
78498bf5c682Smrgobjext=o
78508bf5c682Smrg_LT_TAGVAR(objext, $1)=$objext
78518bf5c682Smrg
78528bf5c682Smrg# No sense in running all these tests if we already determined that
78538bf5c682Smrg# the FC compiler isn't working.  Some variables (like enable_shared)
78548bf5c682Smrg# are currently assumed to apply to all compilers on this platform,
78558bf5c682Smrg# and will be corrupted by setting them based on a non-working compiler.
78568bf5c682Smrgif test yes != "$_lt_disable_FC"; then
78578bf5c682Smrg  # Code to be used in simple compile tests
78588bf5c682Smrg  lt_simple_compile_test_code="\
78598bf5c682Smrg      subroutine t
78608bf5c682Smrg      return
78618bf5c682Smrg      end
78628bf5c682Smrg"
78638bf5c682Smrg
78648bf5c682Smrg  # Code to be used in simple link tests
78658bf5c682Smrg  lt_simple_link_test_code="\
78668bf5c682Smrg      program t
78678bf5c682Smrg      end
78688bf5c682Smrg"
78698bf5c682Smrg
78708bf5c682Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
78718bf5c682Smrg  _LT_TAG_COMPILER
78728bf5c682Smrg
78738bf5c682Smrg  # save warnings/boilerplate of simple test code
78748bf5c682Smrg  _LT_COMPILER_BOILERPLATE
78758bf5c682Smrg  _LT_LINKER_BOILERPLATE
78768bf5c682Smrg
78778bf5c682Smrg  # Allow CC to be a program name with arguments.
78788bf5c682Smrg  lt_save_CC=$CC
78798bf5c682Smrg  lt_save_GCC=$GCC
78808bf5c682Smrg  lt_save_CFLAGS=$CFLAGS
78818bf5c682Smrg  CC=${FC-"f95"}
78828bf5c682Smrg  CFLAGS=$FCFLAGS
78838bf5c682Smrg  compiler=$CC
78848bf5c682Smrg  GCC=$ac_cv_fc_compiler_gnu
78858bf5c682Smrg
78868bf5c682Smrg  _LT_TAGVAR(compiler, $1)=$CC
78878bf5c682Smrg  _LT_CC_BASENAME([$compiler])
78888bf5c682Smrg
78898bf5c682Smrg  if test -n "$compiler"; then
78908bf5c682Smrg    AC_MSG_CHECKING([if libtool supports shared libraries])
78918bf5c682Smrg    AC_MSG_RESULT([$can_build_shared])
78928bf5c682Smrg
78938bf5c682Smrg    AC_MSG_CHECKING([whether to build shared libraries])
78948bf5c682Smrg    test no = "$can_build_shared" && enable_shared=no
78958bf5c682Smrg
78968bf5c682Smrg    # On AIX, shared libraries and static libraries use the same namespace, and
78978bf5c682Smrg    # are all built from PIC.
78988bf5c682Smrg    case $host_os in
78998bf5c682Smrg      aix3*)
79008bf5c682Smrg        test yes = "$enable_shared" && enable_static=no
79018bf5c682Smrg        if test -n "$RANLIB"; then
79028bf5c682Smrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
79038bf5c682Smrg          postinstall_cmds='$RANLIB $lib'
79048bf5c682Smrg        fi
79058bf5c682Smrg        ;;
79068bf5c682Smrg      aix[[4-9]]*)
79078bf5c682Smrg	if test ia64 != "$host_cpu"; then
79088bf5c682Smrg	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
79098bf5c682Smrg	  yes,aix,yes) ;;		# shared object as lib.so file only
79108bf5c682Smrg	  yes,svr4,*) ;;		# shared object as lib.so archive member only
79118bf5c682Smrg	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
79128bf5c682Smrg	  esac
79138bf5c682Smrg	fi
79148bf5c682Smrg        ;;
79158bf5c682Smrg    esac
79168bf5c682Smrg    AC_MSG_RESULT([$enable_shared])
79178bf5c682Smrg
79188bf5c682Smrg    AC_MSG_CHECKING([whether to build static libraries])
79198bf5c682Smrg    # Make sure either enable_shared or enable_static is yes.
79208bf5c682Smrg    test yes = "$enable_shared" || enable_static=yes
79218bf5c682Smrg    AC_MSG_RESULT([$enable_static])
79228bf5c682Smrg
79238bf5c682Smrg    _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
79248bf5c682Smrg    _LT_TAGVAR(LD, $1)=$LD
79258bf5c682Smrg
79268bf5c682Smrg    ## CAVEAT EMPTOR:
79278bf5c682Smrg    ## There is no encapsulation within the following macros, do not change
79288bf5c682Smrg    ## the running order or otherwise move them around unless you know exactly
79298bf5c682Smrg    ## what you are doing...
79308bf5c682Smrg    _LT_SYS_HIDDEN_LIBDEPS($1)
79318bf5c682Smrg    _LT_COMPILER_PIC($1)
79328bf5c682Smrg    _LT_COMPILER_C_O($1)
79338bf5c682Smrg    _LT_COMPILER_FILE_LOCKS($1)
79348bf5c682Smrg    _LT_LINKER_SHLIBS($1)
79358bf5c682Smrg    _LT_SYS_DYNAMIC_LINKER($1)
79368bf5c682Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
79378bf5c682Smrg
79388bf5c682Smrg    _LT_CONFIG($1)
79398bf5c682Smrg  fi # test -n "$compiler"
79408bf5c682Smrg
79418bf5c682Smrg  GCC=$lt_save_GCC
79428bf5c682Smrg  CC=$lt_save_CC
79438bf5c682Smrg  CFLAGS=$lt_save_CFLAGS
79448bf5c682Smrgfi # test yes != "$_lt_disable_FC"
79458bf5c682Smrg
79468bf5c682SmrgAC_LANG_POP
79478bf5c682Smrg])# _LT_LANG_FC_CONFIG
79488bf5c682Smrg
79498bf5c682Smrg
79508bf5c682Smrg# _LT_LANG_GCJ_CONFIG([TAG])
79518bf5c682Smrg# --------------------------
79528bf5c682Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler
79538bf5c682Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
79548bf5c682Smrg# to write the compiler configuration to 'libtool'.
79558bf5c682Smrgm4_defun([_LT_LANG_GCJ_CONFIG],
79568bf5c682Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl
79578bf5c682SmrgAC_LANG_SAVE
79588bf5c682Smrg
79598bf5c682Smrg# Source file extension for Java test sources.
79608bf5c682Smrgac_ext=java
79618bf5c682Smrg
79628bf5c682Smrg# Object file extension for compiled Java test sources.
79638bf5c682Smrgobjext=o
79648bf5c682Smrg_LT_TAGVAR(objext, $1)=$objext
79658bf5c682Smrg
79668bf5c682Smrg# Code to be used in simple compile tests
79678bf5c682Smrglt_simple_compile_test_code="class foo {}"
79688bf5c682Smrg
79698bf5c682Smrg# Code to be used in simple link tests
79708bf5c682Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
79718bf5c682Smrg
79728bf5c682Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
79738bf5c682Smrg_LT_TAG_COMPILER
79748bf5c682Smrg
79758bf5c682Smrg# save warnings/boilerplate of simple test code
79768bf5c682Smrg_LT_COMPILER_BOILERPLATE
79778bf5c682Smrg_LT_LINKER_BOILERPLATE
79788bf5c682Smrg
79798bf5c682Smrg# Allow CC to be a program name with arguments.
79808bf5c682Smrglt_save_CC=$CC
79818bf5c682Smrglt_save_CFLAGS=$CFLAGS
79828bf5c682Smrglt_save_GCC=$GCC
79838bf5c682SmrgGCC=yes
79848bf5c682SmrgCC=${GCJ-"gcj"}
79858bf5c682SmrgCFLAGS=$GCJFLAGS
79868bf5c682Smrgcompiler=$CC
79878bf5c682Smrg_LT_TAGVAR(compiler, $1)=$CC
79888bf5c682Smrg_LT_TAGVAR(LD, $1)=$LD
79898bf5c682Smrg_LT_CC_BASENAME([$compiler])
79908bf5c682Smrg
79918bf5c682Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
79928bf5c682Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
79938bf5c682Smrg
79948bf5c682Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
79958bf5c682Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
79968bf5c682Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
79978bf5c682Smrg
79988bf5c682Smrg## CAVEAT EMPTOR:
79998bf5c682Smrg## There is no encapsulation within the following macros, do not change
80008bf5c682Smrg## the running order or otherwise move them around unless you know exactly
80018bf5c682Smrg## what you are doing...
80028bf5c682Smrgif test -n "$compiler"; then
80038bf5c682Smrg  _LT_COMPILER_NO_RTTI($1)
80048bf5c682Smrg  _LT_COMPILER_PIC($1)
80058bf5c682Smrg  _LT_COMPILER_C_O($1)
80068bf5c682Smrg  _LT_COMPILER_FILE_LOCKS($1)
80078bf5c682Smrg  _LT_LINKER_SHLIBS($1)
80088bf5c682Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
80098bf5c682Smrg
80108bf5c682Smrg  _LT_CONFIG($1)
80118bf5c682Smrgfi
80128bf5c682Smrg
80138bf5c682SmrgAC_LANG_RESTORE
80148bf5c682Smrg
80158bf5c682SmrgGCC=$lt_save_GCC
80168bf5c682SmrgCC=$lt_save_CC
80178bf5c682SmrgCFLAGS=$lt_save_CFLAGS
80188bf5c682Smrg])# _LT_LANG_GCJ_CONFIG
80198bf5c682Smrg
80208bf5c682Smrg
80218bf5c682Smrg# _LT_LANG_GO_CONFIG([TAG])
80228bf5c682Smrg# --------------------------
80238bf5c682Smrg# Ensure that the configuration variables for the GNU Go compiler
80248bf5c682Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
80258bf5c682Smrg# to write the compiler configuration to 'libtool'.
80268bf5c682Smrgm4_defun([_LT_LANG_GO_CONFIG],
80278bf5c682Smrg[AC_REQUIRE([LT_PROG_GO])dnl
80288bf5c682SmrgAC_LANG_SAVE
80298bf5c682Smrg
80308bf5c682Smrg# Source file extension for Go test sources.
80318bf5c682Smrgac_ext=go
80328bf5c682Smrg
80338bf5c682Smrg# Object file extension for compiled Go test sources.
80348bf5c682Smrgobjext=o
80358bf5c682Smrg_LT_TAGVAR(objext, $1)=$objext
80368bf5c682Smrg
80378bf5c682Smrg# Code to be used in simple compile tests
80388bf5c682Smrglt_simple_compile_test_code="package main; func main() { }"
80398bf5c682Smrg
80408bf5c682Smrg# Code to be used in simple link tests
80418bf5c682Smrglt_simple_link_test_code='package main; func main() { }'
80428bf5c682Smrg
80438bf5c682Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
80448bf5c682Smrg_LT_TAG_COMPILER
80458bf5c682Smrg
80468bf5c682Smrg# save warnings/boilerplate of simple test code
80478bf5c682Smrg_LT_COMPILER_BOILERPLATE
80488bf5c682Smrg_LT_LINKER_BOILERPLATE
80498bf5c682Smrg
80508bf5c682Smrg# Allow CC to be a program name with arguments.
80518bf5c682Smrglt_save_CC=$CC
80528bf5c682Smrglt_save_CFLAGS=$CFLAGS
80538bf5c682Smrglt_save_GCC=$GCC
80548bf5c682SmrgGCC=yes
80558bf5c682SmrgCC=${GOC-"gccgo"}
80568bf5c682SmrgCFLAGS=$GOFLAGS
80578bf5c682Smrgcompiler=$CC
80588bf5c682Smrg_LT_TAGVAR(compiler, $1)=$CC
80598bf5c682Smrg_LT_TAGVAR(LD, $1)=$LD
80608bf5c682Smrg_LT_CC_BASENAME([$compiler])
80618bf5c682Smrg
80628bf5c682Smrg# Go did not exist at the time GCC didn't implicitly link libc in.
80638bf5c682Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
80648bf5c682Smrg
80658bf5c682Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
80668bf5c682Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
80678bf5c682Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
80688bf5c682Smrg
80698bf5c682Smrg## CAVEAT EMPTOR:
80708bf5c682Smrg## There is no encapsulation within the following macros, do not change
80718bf5c682Smrg## the running order or otherwise move them around unless you know exactly
80728bf5c682Smrg## what you are doing...
80738bf5c682Smrgif test -n "$compiler"; then
80748bf5c682Smrg  _LT_COMPILER_NO_RTTI($1)
80758bf5c682Smrg  _LT_COMPILER_PIC($1)
80768bf5c682Smrg  _LT_COMPILER_C_O($1)
80778bf5c682Smrg  _LT_COMPILER_FILE_LOCKS($1)
80788bf5c682Smrg  _LT_LINKER_SHLIBS($1)
80798bf5c682Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
80808bf5c682Smrg
80818bf5c682Smrg  _LT_CONFIG($1)
80828bf5c682Smrgfi
80838bf5c682Smrg
80848bf5c682SmrgAC_LANG_RESTORE
80858bf5c682Smrg
80868bf5c682SmrgGCC=$lt_save_GCC
80878bf5c682SmrgCC=$lt_save_CC
80888bf5c682SmrgCFLAGS=$lt_save_CFLAGS
80898bf5c682Smrg])# _LT_LANG_GO_CONFIG
80908bf5c682Smrg
80918bf5c682Smrg
80928bf5c682Smrg# _LT_LANG_RC_CONFIG([TAG])
80938bf5c682Smrg# -------------------------
80948bf5c682Smrg# Ensure that the configuration variables for the Windows resource compiler
80958bf5c682Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
80968bf5c682Smrg# to write the compiler configuration to 'libtool'.
80978bf5c682Smrgm4_defun([_LT_LANG_RC_CONFIG],
80988bf5c682Smrg[AC_REQUIRE([LT_PROG_RC])dnl
80998bf5c682SmrgAC_LANG_SAVE
81008bf5c682Smrg
81018bf5c682Smrg# Source file extension for RC test sources.
81028bf5c682Smrgac_ext=rc
81038bf5c682Smrg
81048bf5c682Smrg# Object file extension for compiled RC test sources.
81058bf5c682Smrgobjext=o
81068bf5c682Smrg_LT_TAGVAR(objext, $1)=$objext
81078bf5c682Smrg
81088bf5c682Smrg# Code to be used in simple compile tests
81098bf5c682Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
81108bf5c682Smrg
81118bf5c682Smrg# Code to be used in simple link tests
81128bf5c682Smrglt_simple_link_test_code=$lt_simple_compile_test_code
81138bf5c682Smrg
81148bf5c682Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
81158bf5c682Smrg_LT_TAG_COMPILER
81168bf5c682Smrg
81178bf5c682Smrg# save warnings/boilerplate of simple test code
81188bf5c682Smrg_LT_COMPILER_BOILERPLATE
81198bf5c682Smrg_LT_LINKER_BOILERPLATE
81208bf5c682Smrg
81218bf5c682Smrg# Allow CC to be a program name with arguments.
81228bf5c682Smrglt_save_CC=$CC
81238bf5c682Smrglt_save_CFLAGS=$CFLAGS
81248bf5c682Smrglt_save_GCC=$GCC
81258bf5c682SmrgGCC=
81268bf5c682SmrgCC=${RC-"windres"}
81278bf5c682SmrgCFLAGS=
81288bf5c682Smrgcompiler=$CC
81298bf5c682Smrg_LT_TAGVAR(compiler, $1)=$CC
81308bf5c682Smrg_LT_CC_BASENAME([$compiler])
81318bf5c682Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
81328bf5c682Smrg
81338bf5c682Smrgif test -n "$compiler"; then
81348bf5c682Smrg  :
81358bf5c682Smrg  _LT_CONFIG($1)
81368bf5c682Smrgfi
81378bf5c682Smrg
81388bf5c682SmrgGCC=$lt_save_GCC
81398bf5c682SmrgAC_LANG_RESTORE
81408bf5c682SmrgCC=$lt_save_CC
81418bf5c682SmrgCFLAGS=$lt_save_CFLAGS
81428bf5c682Smrg])# _LT_LANG_RC_CONFIG
81438bf5c682Smrg
81448bf5c682Smrg
81458bf5c682Smrg# LT_PROG_GCJ
81468bf5c682Smrg# -----------
81478bf5c682SmrgAC_DEFUN([LT_PROG_GCJ],
81488bf5c682Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
81498bf5c682Smrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
81508bf5c682Smrg    [AC_CHECK_TOOL(GCJ, gcj,)
81518bf5c682Smrg      test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
81528bf5c682Smrg      AC_SUBST(GCJFLAGS)])])[]dnl
81538bf5c682Smrg])
81548bf5c682Smrg
81558bf5c682Smrg# Old name:
81568bf5c682SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
81578bf5c682Smrgdnl aclocal-1.4 backwards compatibility:
81588bf5c682Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
81598bf5c682Smrg
81608bf5c682Smrg
81618bf5c682Smrg# LT_PROG_GO
81628bf5c682Smrg# ----------
81638bf5c682SmrgAC_DEFUN([LT_PROG_GO],
81648bf5c682Smrg[AC_CHECK_TOOL(GOC, gccgo,)
81658bf5c682Smrg])
81668bf5c682Smrg
81678bf5c682Smrg
81688bf5c682Smrg# LT_PROG_RC
81698bf5c682Smrg# ----------
81708bf5c682SmrgAC_DEFUN([LT_PROG_RC],
81718bf5c682Smrg[AC_CHECK_TOOL(RC, windres,)
81728bf5c682Smrg])
81738bf5c682Smrg
81748bf5c682Smrg# Old name:
81758bf5c682SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
81768bf5c682Smrgdnl aclocal-1.4 backwards compatibility:
81778bf5c682Smrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
81788bf5c682Smrg
81798bf5c682Smrg
81808bf5c682Smrg# _LT_DECL_EGREP
81818bf5c682Smrg# --------------
81828bf5c682Smrg# If we don't have a new enough Autoconf to choose the best grep
81838bf5c682Smrg# available, choose the one first in the user's PATH.
81848bf5c682Smrgm4_defun([_LT_DECL_EGREP],
81858bf5c682Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
81868bf5c682SmrgAC_REQUIRE([AC_PROG_FGREP])dnl
81878bf5c682Smrgtest -z "$GREP" && GREP=grep
81888bf5c682Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
81898bf5c682Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
81908bf5c682Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
81918bf5c682Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
81928bf5c682SmrgAC_SUBST([GREP])
81938bf5c682Smrg])
81948bf5c682Smrg
81958bf5c682Smrg
81968bf5c682Smrg# _LT_DECL_OBJDUMP
81978bf5c682Smrg# --------------
81988bf5c682Smrg# If we don't have a new enough Autoconf to choose the best objdump
81998bf5c682Smrg# available, choose the one first in the user's PATH.
82008bf5c682Smrgm4_defun([_LT_DECL_OBJDUMP],
82018bf5c682Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
82028bf5c682Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
82038bf5c682Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
82048bf5c682SmrgAC_SUBST([OBJDUMP])
82058bf5c682Smrg])
82068bf5c682Smrg
82078bf5c682Smrg# _LT_DECL_DLLTOOL
82088bf5c682Smrg# ----------------
82098bf5c682Smrg# Ensure DLLTOOL variable is set.
82108bf5c682Smrgm4_defun([_LT_DECL_DLLTOOL],
82118bf5c682Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
82128bf5c682Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
82138bf5c682Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
82148bf5c682SmrgAC_SUBST([DLLTOOL])
82158bf5c682Smrg])
82168bf5c682Smrg
82178bf5c682Smrg# _LT_DECL_SED
82188bf5c682Smrg# ------------
82198bf5c682Smrg# Check for a fully-functional sed program, that truncates
82208bf5c682Smrg# as few characters as possible.  Prefer GNU sed if found.
82218bf5c682Smrgm4_defun([_LT_DECL_SED],
82228bf5c682Smrg[AC_PROG_SED
82238bf5c682Smrgtest -z "$SED" && SED=sed
82248bf5c682SmrgXsed="$SED -e 1s/^X//"
82258bf5c682Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
82268bf5c682Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
82278bf5c682Smrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
82288bf5c682Smrg])# _LT_DECL_SED
82298bf5c682Smrg
82308bf5c682Smrgm4_ifndef([AC_PROG_SED], [
82318bf5c682Smrg############################################################
82328bf5c682Smrg# NOTE: This macro has been submitted for inclusion into   #
82338bf5c682Smrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
82348bf5c682Smrg#  a released version of Autoconf we should remove this    #
82358bf5c682Smrg#  macro and use it instead.                               #
82368bf5c682Smrg############################################################
82378bf5c682Smrg
82388bf5c682Smrgm4_defun([AC_PROG_SED],
82398bf5c682Smrg[AC_MSG_CHECKING([for a sed that does not truncate output])
82408bf5c682SmrgAC_CACHE_VAL(lt_cv_path_SED,
82418bf5c682Smrg[# Loop through the user's path and test for sed and gsed.
82428bf5c682Smrg# Then use that list of sed's as ones to test for truncation.
82438bf5c682Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
82448bf5c682Smrgfor as_dir in $PATH
82458bf5c682Smrgdo
82468bf5c682Smrg  IFS=$as_save_IFS
82478bf5c682Smrg  test -z "$as_dir" && as_dir=.
82488bf5c682Smrg  for lt_ac_prog in sed gsed; do
82498bf5c682Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
82508bf5c682Smrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
82518bf5c682Smrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
82528bf5c682Smrg      fi
82538bf5c682Smrg    done
82548bf5c682Smrg  done
82558bf5c682Smrgdone
82568bf5c682SmrgIFS=$as_save_IFS
82578bf5c682Smrglt_ac_max=0
82588bf5c682Smrglt_ac_count=0
82598bf5c682Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
82608bf5c682Smrg# along with /bin/sed that truncates output.
82618bf5c682Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
82628bf5c682Smrg  test ! -f "$lt_ac_sed" && continue
82638bf5c682Smrg  cat /dev/null > conftest.in
82648bf5c682Smrg  lt_ac_count=0
82658bf5c682Smrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
82668bf5c682Smrg  # Check for GNU sed and select it if it is found.
82678bf5c682Smrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
82688bf5c682Smrg    lt_cv_path_SED=$lt_ac_sed
82698bf5c682Smrg    break
82708bf5c682Smrg  fi
82718bf5c682Smrg  while true; do
82728bf5c682Smrg    cat conftest.in conftest.in >conftest.tmp
82738bf5c682Smrg    mv conftest.tmp conftest.in
82748bf5c682Smrg    cp conftest.in conftest.nl
82758bf5c682Smrg    echo >>conftest.nl
82768bf5c682Smrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
82778bf5c682Smrg    cmp -s conftest.out conftest.nl || break
82788bf5c682Smrg    # 10000 chars as input seems more than enough
82798bf5c682Smrg    test 10 -lt "$lt_ac_count" && break
82808bf5c682Smrg    lt_ac_count=`expr $lt_ac_count + 1`
82818bf5c682Smrg    if test "$lt_ac_count" -gt "$lt_ac_max"; then
82828bf5c682Smrg      lt_ac_max=$lt_ac_count
82838bf5c682Smrg      lt_cv_path_SED=$lt_ac_sed
82848bf5c682Smrg    fi
82858bf5c682Smrg  done
82868bf5c682Smrgdone
82878bf5c682Smrg])
82888bf5c682SmrgSED=$lt_cv_path_SED
82898bf5c682SmrgAC_SUBST([SED])
82908bf5c682SmrgAC_MSG_RESULT([$SED])
82918bf5c682Smrg])#AC_PROG_SED
82928bf5c682Smrg])#m4_ifndef
82938bf5c682Smrg
82948bf5c682Smrg# Old name:
82958bf5c682SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
82968bf5c682Smrgdnl aclocal-1.4 backwards compatibility:
82978bf5c682Smrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
82988bf5c682Smrg
82998bf5c682Smrg
83008bf5c682Smrg# _LT_CHECK_SHELL_FEATURES
83018bf5c682Smrg# ------------------------
83028bf5c682Smrg# Find out whether the shell is Bourne or XSI compatible,
83038bf5c682Smrg# or has some other useful features.
83048bf5c682Smrgm4_defun([_LT_CHECK_SHELL_FEATURES],
83058bf5c682Smrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
83068bf5c682Smrg  lt_unset=unset
83078bf5c682Smrgelse
83088bf5c682Smrg  lt_unset=false
83098bf5c682Smrgfi
83108bf5c682Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
83118bf5c682Smrg
83128bf5c682Smrg# test EBCDIC or ASCII
83138bf5c682Smrgcase `echo X|tr X '\101'` in
83148bf5c682Smrg A) # ASCII based system
83158bf5c682Smrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
83168bf5c682Smrg  lt_SP2NL='tr \040 \012'
83178bf5c682Smrg  lt_NL2SP='tr \015\012 \040\040'
83188bf5c682Smrg  ;;
83198bf5c682Smrg *) # EBCDIC based system
83208bf5c682Smrg  lt_SP2NL='tr \100 \n'
83218bf5c682Smrg  lt_NL2SP='tr \r\n \100\100'
83228bf5c682Smrg  ;;
83238bf5c682Smrgesac
83248bf5c682Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
83258bf5c682Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
83268bf5c682Smrg])# _LT_CHECK_SHELL_FEATURES
83278bf5c682Smrg
83288bf5c682Smrg
83298bf5c682Smrg# _LT_PATH_CONVERSION_FUNCTIONS
83308bf5c682Smrg# -----------------------------
83318bf5c682Smrg# Determine what file name conversion functions should be used by
83328bf5c682Smrg# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
83338bf5c682Smrg# for certain cross-compile configurations and native mingw.
83348bf5c682Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
83358bf5c682Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
83368bf5c682SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
83378bf5c682SmrgAC_MSG_CHECKING([how to convert $build file names to $host format])
83388bf5c682SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd,
83398bf5c682Smrg[case $host in
83408bf5c682Smrg  *-*-mingw* )
83418bf5c682Smrg    case $build in
83428bf5c682Smrg      *-*-mingw* ) # actually msys
83438bf5c682Smrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
83448bf5c682Smrg        ;;
83458bf5c682Smrg      *-*-cygwin* )
83468bf5c682Smrg        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
83478bf5c682Smrg        ;;
83488bf5c682Smrg      * ) # otherwise, assume *nix
83498bf5c682Smrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
83508bf5c682Smrg        ;;
83518bf5c682Smrg    esac
83528bf5c682Smrg    ;;
83538bf5c682Smrg  *-*-cygwin* )
83548bf5c682Smrg    case $build in
83558bf5c682Smrg      *-*-mingw* ) # actually msys
83568bf5c682Smrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
83578bf5c682Smrg        ;;
83588bf5c682Smrg      *-*-cygwin* )
83598bf5c682Smrg        lt_cv_to_host_file_cmd=func_convert_file_noop
83608bf5c682Smrg        ;;
83618bf5c682Smrg      * ) # otherwise, assume *nix
83628bf5c682Smrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
83638bf5c682Smrg        ;;
83648bf5c682Smrg    esac
83658bf5c682Smrg    ;;
83668bf5c682Smrg  * ) # unhandled hosts (and "normal" native builds)
83678bf5c682Smrg    lt_cv_to_host_file_cmd=func_convert_file_noop
83688bf5c682Smrg    ;;
83698bf5c682Smrgesac
83708bf5c682Smrg])
83718bf5c682Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd
83728bf5c682SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd])
83738bf5c682Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
83748bf5c682Smrg         [0], [convert $build file names to $host format])dnl
83758bf5c682Smrg
83768bf5c682SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format])
83778bf5c682SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd,
83788bf5c682Smrg[#assume ordinary cross tools, or native build.
83798bf5c682Smrglt_cv_to_tool_file_cmd=func_convert_file_noop
83808bf5c682Smrgcase $host in
83818bf5c682Smrg  *-*-mingw* )
83828bf5c682Smrg    case $build in
83838bf5c682Smrg      *-*-mingw* ) # actually msys
83848bf5c682Smrg        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
83858bf5c682Smrg        ;;
83868bf5c682Smrg    esac
83878bf5c682Smrg    ;;
83888bf5c682Smrgesac
83898bf5c682Smrg])
83908bf5c682Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd
83918bf5c682SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
83928bf5c682Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
83938bf5c682Smrg         [0], [convert $build files to toolchain format])dnl
83948bf5c682Smrg])# _LT_PATH_CONVERSION_FUNCTIONS
8395