libtool.m4 revision 2d19872a
12d19872aSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
22d19872aSmrg#
32d19872aSmrg#   Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software
42d19872aSmrg#   Foundation, Inc.
52d19872aSmrg#   Written by Gordon Matzigkeit, 1996
62d19872aSmrg#
72d19872aSmrg# This file is free software; the Free Software Foundation gives
82d19872aSmrg# unlimited permission to copy and/or distribute it, with or without
92d19872aSmrg# modifications, as long as this notice is preserved.
102d19872aSmrg
112d19872aSmrgm4_define([_LT_COPYING], [dnl
122d19872aSmrg# Copyright (C) 2014 Free Software Foundation, Inc.
132d19872aSmrg# This is free software; see the source for copying conditions.  There is NO
142d19872aSmrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
152d19872aSmrg
162d19872aSmrg# GNU Libtool is free software; you can redistribute it and/or modify
172d19872aSmrg# it under the terms of the GNU General Public License as published by
182d19872aSmrg# the Free Software Foundation; either version 2 of of the License, or
192d19872aSmrg# (at your option) any later version.
202d19872aSmrg#
212d19872aSmrg# As a special exception to the GNU General Public License, if you
222d19872aSmrg# distribute this file as part of a program or library that is built
232d19872aSmrg# using GNU Libtool, you may include this file under the  same
242d19872aSmrg# distribution terms that you use for the rest of that program.
252d19872aSmrg#
262d19872aSmrg# GNU Libtool is distributed in the hope that it will be useful, but
272d19872aSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
282d19872aSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
292d19872aSmrg# GNU General Public License for more details.
302d19872aSmrg#
312d19872aSmrg# You should have received a copy of the GNU General Public License
322d19872aSmrg# along with this program.  If not, see <http://www.gnu.org/licenses/>.
332d19872aSmrg])
342d19872aSmrg
352d19872aSmrg# serial 59 LT_INIT
362d19872aSmrg
372d19872aSmrg
382d19872aSmrg# LT_PREREQ(VERSION)
392d19872aSmrg# ------------------
402d19872aSmrg# Complain and exit if this libtool version is less that VERSION.
412d19872aSmrgm4_defun([LT_PREREQ],
422d19872aSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
432d19872aSmrg       [m4_default([$3],
442d19872aSmrg		   [m4_fatal([Libtool version $1 or higher is required],
452d19872aSmrg		             63)])],
462d19872aSmrg       [$2])])
472d19872aSmrg
482d19872aSmrg
492d19872aSmrg# _LT_CHECK_BUILDDIR
502d19872aSmrg# ------------------
512d19872aSmrg# Complain if the absolute build directory name contains unusual characters
522d19872aSmrgm4_defun([_LT_CHECK_BUILDDIR],
532d19872aSmrg[case `pwd` in
542d19872aSmrg  *\ * | *\	*)
552d19872aSmrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
562d19872aSmrgesac
572d19872aSmrg])
582d19872aSmrg
592d19872aSmrg
602d19872aSmrg# LT_INIT([OPTIONS])
612d19872aSmrg# ------------------
622d19872aSmrgAC_DEFUN([LT_INIT],
632d19872aSmrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
642d19872aSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
652d19872aSmrgAC_BEFORE([$0], [LT_LANG])dnl
662d19872aSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
672d19872aSmrgAC_BEFORE([$0], [LTDL_INIT])dnl
682d19872aSmrgm4_require([_LT_CHECK_BUILDDIR])dnl
692d19872aSmrg
702d19872aSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
712d19872aSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
722d19872aSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
732d19872aSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
742d19872aSmrgdnl unless we require an AC_DEFUNed macro:
752d19872aSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
762d19872aSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
772d19872aSmrgAC_REQUIRE([LTVERSION_VERSION])dnl
782d19872aSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
792d19872aSmrgm4_require([_LT_PROG_LTMAIN])dnl
802d19872aSmrg
812d19872aSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
822d19872aSmrg
832d19872aSmrgdnl Parse OPTIONS
842d19872aSmrg_LT_SET_OPTIONS([$0], [$1])
852d19872aSmrg
862d19872aSmrg# This can be used to rebuild libtool when needed
872d19872aSmrgLIBTOOL_DEPS=$ltmain
882d19872aSmrg
892d19872aSmrg# Always use our own libtool.
902d19872aSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
912d19872aSmrgAC_SUBST(LIBTOOL)dnl
922d19872aSmrg
932d19872aSmrg_LT_SETUP
942d19872aSmrg
952d19872aSmrg# Only expand once:
962d19872aSmrgm4_define([LT_INIT])
972d19872aSmrg])# LT_INIT
982d19872aSmrg
992d19872aSmrg# Old names:
1002d19872aSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1012d19872aSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1022d19872aSmrgdnl aclocal-1.4 backwards compatibility:
1032d19872aSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1042d19872aSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1052d19872aSmrg
1062d19872aSmrg
1072d19872aSmrg# _LT_PREPARE_CC_BASENAME
1082d19872aSmrg# -----------------------
1092d19872aSmrgm4_defun([_LT_PREPARE_CC_BASENAME], [
1102d19872aSmrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1112d19872aSmrgfunc_cc_basename ()
1122d19872aSmrg{
1132d19872aSmrg    for cc_temp in @S|@*""; do
1142d19872aSmrg      case $cc_temp in
1152d19872aSmrg        compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1162d19872aSmrg        distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1172d19872aSmrg        \-*) ;;
1182d19872aSmrg        *) break;;
1192d19872aSmrg      esac
1202d19872aSmrg    done
1212d19872aSmrg    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
1222d19872aSmrg}
1232d19872aSmrg])# _LT_PREPARE_CC_BASENAME
1242d19872aSmrg
1252d19872aSmrg
1262d19872aSmrg# _LT_CC_BASENAME(CC)
1272d19872aSmrg# -------------------
1282d19872aSmrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
1292d19872aSmrg# but that macro is also expanded into generated libtool script, which
1302d19872aSmrg# arranges for $SED and $ECHO to be set by different means.
1312d19872aSmrgm4_defun([_LT_CC_BASENAME],
1322d19872aSmrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl
1332d19872aSmrgAC_REQUIRE([_LT_DECL_SED])dnl
1342d19872aSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1352d19872aSmrgfunc_cc_basename $1
1362d19872aSmrgcc_basename=$func_cc_basename_result
1372d19872aSmrg])
1382d19872aSmrg
1392d19872aSmrg
1402d19872aSmrg# _LT_FILEUTILS_DEFAULTS
1412d19872aSmrg# ----------------------
1422d19872aSmrg# It is okay to use these file commands and assume they have been set
1432d19872aSmrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
1442d19872aSmrgm4_defun([_LT_FILEUTILS_DEFAULTS],
1452d19872aSmrg[: ${CP="cp -f"}
1462d19872aSmrg: ${MV="mv -f"}
1472d19872aSmrg: ${RM="rm -f"}
1482d19872aSmrg])# _LT_FILEUTILS_DEFAULTS
1492d19872aSmrg
1502d19872aSmrg
1512d19872aSmrg# _LT_SETUP
1522d19872aSmrg# ---------
1532d19872aSmrgm4_defun([_LT_SETUP],
1542d19872aSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1552d19872aSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
1562d19872aSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
1572d19872aSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1582d19872aSmrg
1592d19872aSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
1602d19872aSmrgdnl
1612d19872aSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl
1622d19872aSmrg_LT_DECL([], [host], [0])dnl
1632d19872aSmrg_LT_DECL([], [host_os], [0])dnl
1642d19872aSmrgdnl
1652d19872aSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl
1662d19872aSmrg_LT_DECL([], [build], [0])dnl
1672d19872aSmrg_LT_DECL([], [build_os], [0])dnl
1682d19872aSmrgdnl
1692d19872aSmrgAC_REQUIRE([AC_PROG_CC])dnl
1702d19872aSmrgAC_REQUIRE([LT_PATH_LD])dnl
1712d19872aSmrgAC_REQUIRE([LT_PATH_NM])dnl
1722d19872aSmrgdnl
1732d19872aSmrgAC_REQUIRE([AC_PROG_LN_S])dnl
1742d19872aSmrgtest -z "$LN_S" && LN_S="ln -s"
1752d19872aSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1762d19872aSmrgdnl
1772d19872aSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
1782d19872aSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1792d19872aSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1802d19872aSmrgdnl
1812d19872aSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
1822d19872aSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
1832d19872aSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
1842d19872aSmrgm4_require([_LT_CMD_RELOAD])dnl
1852d19872aSmrgm4_require([_LT_DECL_FILECMD])dnl
1862d19872aSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
1872d19872aSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
1882d19872aSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
1892d19872aSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1902d19872aSmrgm4_require([_LT_WITH_SYSROOT])dnl
1912d19872aSmrgm4_require([_LT_CMD_TRUNCATE])dnl
1922d19872aSmrg
1932d19872aSmrg_LT_CONFIG_LIBTOOL_INIT([
1942d19872aSmrg# See if we are running on zsh, and set the options that allow our
1952d19872aSmrg# commands through without removal of \ escapes INIT.
1962d19872aSmrgif test -n "\${ZSH_VERSION+set}"; then
1972d19872aSmrg   setopt NO_GLOB_SUBST
1982d19872aSmrgfi
1992d19872aSmrg])
2002d19872aSmrgif test -n "${ZSH_VERSION+set}"; then
2012d19872aSmrg   setopt NO_GLOB_SUBST
2022d19872aSmrgfi
2032d19872aSmrg
2042d19872aSmrg_LT_CHECK_OBJDIR
2052d19872aSmrg
2062d19872aSmrgm4_require([_LT_TAG_COMPILER])dnl
2072d19872aSmrg
2082d19872aSmrgcase $host_os in
2092d19872aSmrgaix3*)
2102d19872aSmrg  # AIX sometimes has problems with the GCC collect2 program.  For some
2112d19872aSmrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
2122d19872aSmrg  # vanish in a puff of smoke.
2132d19872aSmrg  if test set != "${COLLECT_NAMES+set}"; then
2142d19872aSmrg    COLLECT_NAMES=
2152d19872aSmrg    export COLLECT_NAMES
2162d19872aSmrg  fi
2172d19872aSmrg  ;;
2182d19872aSmrgesac
2192d19872aSmrg
2202d19872aSmrg# Global variables:
2212d19872aSmrgofile=libtool
2222d19872aSmrgcan_build_shared=yes
2232d19872aSmrg
2242d19872aSmrg# All known linkers require a '.a' archive for static linking (except MSVC and
2252d19872aSmrg# ICC, which need '.lib').
2262d19872aSmrglibext=a
2272d19872aSmrg
2282d19872aSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
2292d19872aSmrg
2302d19872aSmrgold_CC=$CC
2312d19872aSmrgold_CFLAGS=$CFLAGS
2322d19872aSmrg
2332d19872aSmrg# Set sane defaults for various variables
2342d19872aSmrgtest -z "$CC" && CC=cc
2352d19872aSmrgtest -z "$LTCC" && LTCC=$CC
2362d19872aSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
2372d19872aSmrgtest -z "$LD" && LD=ld
2382d19872aSmrgtest -z "$ac_objext" && ac_objext=o
2392d19872aSmrg
2402d19872aSmrg_LT_CC_BASENAME([$compiler])
2412d19872aSmrg
2422d19872aSmrg# Only perform the check for file, if the check method requires it
2432d19872aSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
2442d19872aSmrgcase $deplibs_check_method in
2452d19872aSmrgfile_magic*)
2462d19872aSmrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2472d19872aSmrg    _LT_PATH_MAGIC
2482d19872aSmrg  fi
2492d19872aSmrg  ;;
2502d19872aSmrgesac
2512d19872aSmrg
2522d19872aSmrg# Use C for the default configuration in the libtool script
2532d19872aSmrgLT_SUPPORTED_TAG([CC])
2542d19872aSmrg_LT_LANG_C_CONFIG
2552d19872aSmrg_LT_LANG_DEFAULT_CONFIG
2562d19872aSmrg_LT_CONFIG_COMMANDS
2572d19872aSmrg])# _LT_SETUP
2582d19872aSmrg
2592d19872aSmrg
2602d19872aSmrg# _LT_PREPARE_SED_QUOTE_VARS
2612d19872aSmrg# --------------------------
2622d19872aSmrg# Define a few sed substitution that help us do robust quoting.
2632d19872aSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS],
2642d19872aSmrg[# Backslashify metacharacters that are still active within
2652d19872aSmrg# double-quoted strings.
2662d19872aSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
2672d19872aSmrg
2682d19872aSmrg# Same as above, but do not quote variable references.
2692d19872aSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
2702d19872aSmrg
2712d19872aSmrg# Sed substitution to delay expansion of an escaped shell variable in a
2722d19872aSmrg# double_quote_subst'ed string.
2732d19872aSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
2742d19872aSmrg
2752d19872aSmrg# Sed substitution to delay expansion of an escaped single quote.
2762d19872aSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
2772d19872aSmrg
2782d19872aSmrg# Sed substitution to avoid accidental globbing in evaled expressions
2792d19872aSmrgno_glob_subst='s/\*/\\\*/g'
2802d19872aSmrg])
2812d19872aSmrg
2822d19872aSmrg# _LT_PROG_LTMAIN
2832d19872aSmrg# ---------------
2842d19872aSmrg# Note that this code is called both from 'configure', and 'config.status'
2852d19872aSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
2862d19872aSmrg# 'config.status' has no value for ac_aux_dir unless we are using Automake,
2872d19872aSmrg# so we pass a copy along to make sure it has a sensible value anyway.
2882d19872aSmrgm4_defun([_LT_PROG_LTMAIN],
2892d19872aSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
2902d19872aSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
2912d19872aSmrgltmain=$ac_aux_dir/ltmain.sh
2922d19872aSmrg])# _LT_PROG_LTMAIN
2932d19872aSmrg
2942d19872aSmrg
2952d19872aSmrg## ------------------------------------- ##
2962d19872aSmrg## Accumulate code for creating libtool. ##
2972d19872aSmrg## ------------------------------------- ##
2982d19872aSmrg
2992d19872aSmrg# So that we can recreate a full libtool script including additional
3002d19872aSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
3012d19872aSmrg# in macros and then make a single call at the end using the 'libtool'
3022d19872aSmrg# label.
3032d19872aSmrg
3042d19872aSmrg
3052d19872aSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
3062d19872aSmrg# ----------------------------------------
3072d19872aSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
3082d19872aSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
3092d19872aSmrg[m4_ifval([$1],
3102d19872aSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
3112d19872aSmrg                     [$1
3122d19872aSmrg])])])
3132d19872aSmrg
3142d19872aSmrg# Initialize.
3152d19872aSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
3162d19872aSmrg
3172d19872aSmrg
3182d19872aSmrg# _LT_CONFIG_LIBTOOL([COMMANDS])
3192d19872aSmrg# ------------------------------
3202d19872aSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
3212d19872aSmrgm4_define([_LT_CONFIG_LIBTOOL],
3222d19872aSmrg[m4_ifval([$1],
3232d19872aSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
3242d19872aSmrg                     [$1
3252d19872aSmrg])])])
3262d19872aSmrg
3272d19872aSmrg# Initialize.
3282d19872aSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
3292d19872aSmrg
3302d19872aSmrg
3312d19872aSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
3322d19872aSmrg# -----------------------------------------------------
3332d19872aSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
3342d19872aSmrg[_LT_CONFIG_LIBTOOL([$1])
3352d19872aSmrg_LT_CONFIG_LIBTOOL_INIT([$2])
3362d19872aSmrg])
3372d19872aSmrg
3382d19872aSmrg
3392d19872aSmrg# _LT_FORMAT_COMMENT([COMMENT])
3402d19872aSmrg# -----------------------------
3412d19872aSmrg# Add leading comment marks to the start of each line, and a trailing
3422d19872aSmrg# full-stop to the whole comment if one is not present already.
3432d19872aSmrgm4_define([_LT_FORMAT_COMMENT],
3442d19872aSmrg[m4_ifval([$1], [
3452d19872aSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
3462d19872aSmrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
3472d19872aSmrg)])
3482d19872aSmrg
3492d19872aSmrg
3502d19872aSmrg
3512d19872aSmrg## ------------------------ ##
3522d19872aSmrg## FIXME: Eliminate VARNAME ##
3532d19872aSmrg## ------------------------ ##
3542d19872aSmrg
3552d19872aSmrg
3562d19872aSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
3572d19872aSmrg# -------------------------------------------------------------------
3582d19872aSmrg# CONFIGNAME is the name given to the value in the libtool script.
3592d19872aSmrg# VARNAME is the (base) name used in the configure script.
3602d19872aSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
3612d19872aSmrg# VARNAME.  Any other value will be used directly.
3622d19872aSmrgm4_define([_LT_DECL],
3632d19872aSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
3642d19872aSmrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
3652d19872aSmrg	[m4_ifval([$1], [$1], [$2])])
3662d19872aSmrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
3672d19872aSmrg    m4_ifval([$4],
3682d19872aSmrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
3692d19872aSmrg    lt_dict_add_subkey([lt_decl_dict], [$2],
3702d19872aSmrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
3712d19872aSmrg])
3722d19872aSmrg
3732d19872aSmrg
3742d19872aSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
3752d19872aSmrg# --------------------------------------------------------
3762d19872aSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
3772d19872aSmrg
3782d19872aSmrg
3792d19872aSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
3802d19872aSmrg# ------------------------------------------------
3812d19872aSmrgm4_define([lt_decl_tag_varnames],
3822d19872aSmrg[_lt_decl_filter([tagged?], [yes], $@)])
3832d19872aSmrg
3842d19872aSmrg
3852d19872aSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
3862d19872aSmrg# ---------------------------------------------------------
3872d19872aSmrgm4_define([_lt_decl_filter],
3882d19872aSmrg[m4_case([$#],
3892d19872aSmrg  [0], [m4_fatal([$0: too few arguments: $#])],
3902d19872aSmrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
3912d19872aSmrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
3922d19872aSmrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
3932d19872aSmrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
3942d19872aSmrg])
3952d19872aSmrg
3962d19872aSmrg
3972d19872aSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
3982d19872aSmrg# --------------------------------------------------
3992d19872aSmrgm4_define([lt_decl_quote_varnames],
4002d19872aSmrg[_lt_decl_filter([value], [1], $@)])
4012d19872aSmrg
4022d19872aSmrg
4032d19872aSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
4042d19872aSmrg# ---------------------------------------------------
4052d19872aSmrgm4_define([lt_decl_dquote_varnames],
4062d19872aSmrg[_lt_decl_filter([value], [2], $@)])
4072d19872aSmrg
4082d19872aSmrg
4092d19872aSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
4102d19872aSmrg# ---------------------------------------------------
4112d19872aSmrgm4_define([lt_decl_varnames_tagged],
4122d19872aSmrg[m4_assert([$# <= 2])dnl
4132d19872aSmrg_$0(m4_quote(m4_default([$1], [[, ]])),
4142d19872aSmrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
4152d19872aSmrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
4162d19872aSmrgm4_define([_lt_decl_varnames_tagged],
4172d19872aSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
4182d19872aSmrg
4192d19872aSmrg
4202d19872aSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
4212d19872aSmrg# ------------------------------------------------
4222d19872aSmrgm4_define([lt_decl_all_varnames],
4232d19872aSmrg[_$0(m4_quote(m4_default([$1], [[, ]])),
4242d19872aSmrg     m4_if([$2], [],
4252d19872aSmrg	   m4_quote(lt_decl_varnames),
4262d19872aSmrg	m4_quote(m4_shift($@))))[]dnl
4272d19872aSmrg])
4282d19872aSmrgm4_define([_lt_decl_all_varnames],
4292d19872aSmrg[lt_join($@, lt_decl_varnames_tagged([$1],
4302d19872aSmrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
4312d19872aSmrg])
4322d19872aSmrg
4332d19872aSmrg
4342d19872aSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
4352d19872aSmrg# ------------------------------------
4362d19872aSmrg# Quote a variable value, and forward it to 'config.status' so that its
4372d19872aSmrg# declaration there will have the same value as in 'configure'.  VARNAME
4382d19872aSmrg# must have a single quote delimited value for this to work.
4392d19872aSmrgm4_define([_LT_CONFIG_STATUS_DECLARE],
4402d19872aSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
4412d19872aSmrg
4422d19872aSmrg
4432d19872aSmrg# _LT_CONFIG_STATUS_DECLARATIONS
4442d19872aSmrg# ------------------------------
4452d19872aSmrg# We delimit libtool config variables with single quotes, so when
4462d19872aSmrg# we write them to config.status, we have to be sure to quote all
4472d19872aSmrg# embedded single quotes properly.  In configure, this macro expands
4482d19872aSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
4492d19872aSmrg#
4502d19872aSmrg#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
4512d19872aSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
4522d19872aSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
4532d19872aSmrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
4542d19872aSmrg
4552d19872aSmrg
4562d19872aSmrg# _LT_LIBTOOL_TAGS
4572d19872aSmrg# ----------------
4582d19872aSmrg# Output comment and list of tags supported by the script
4592d19872aSmrgm4_defun([_LT_LIBTOOL_TAGS],
4602d19872aSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
4612d19872aSmrgavailable_tags='_LT_TAGS'dnl
4622d19872aSmrg])
4632d19872aSmrg
4642d19872aSmrg
4652d19872aSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
4662d19872aSmrg# -----------------------------------
4672d19872aSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and
4682d19872aSmrg# expand to a commented shell variable setting:
4692d19872aSmrg#
4702d19872aSmrg#    # Some comment about what VAR is for.
4712d19872aSmrg#    visible_name=$lt_internal_name
4722d19872aSmrgm4_define([_LT_LIBTOOL_DECLARE],
4732d19872aSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
4742d19872aSmrg					   [description])))[]dnl
4752d19872aSmrgm4_pushdef([_libtool_name],
4762d19872aSmrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
4772d19872aSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
4782d19872aSmrg    [0], [_libtool_name=[$]$1],
4792d19872aSmrg    [1], [_libtool_name=$lt_[]$1],
4802d19872aSmrg    [2], [_libtool_name=$lt_[]$1],
4812d19872aSmrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
4822d19872aSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
4832d19872aSmrg])
4842d19872aSmrg
4852d19872aSmrg
4862d19872aSmrg# _LT_LIBTOOL_CONFIG_VARS
4872d19872aSmrg# -----------------------
4882d19872aSmrg# Produce commented declarations of non-tagged libtool config variables
4892d19872aSmrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
4902d19872aSmrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
4912d19872aSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
4922d19872aSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
4932d19872aSmrg[m4_foreach([_lt_var],
4942d19872aSmrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
4952d19872aSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
4962d19872aSmrg
4972d19872aSmrg
4982d19872aSmrg# _LT_LIBTOOL_TAG_VARS(TAG)
4992d19872aSmrg# -------------------------
5002d19872aSmrgm4_define([_LT_LIBTOOL_TAG_VARS],
5012d19872aSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
5022d19872aSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
5032d19872aSmrg
5042d19872aSmrg
5052d19872aSmrg# _LT_TAGVAR(VARNAME, [TAGNAME])
5062d19872aSmrg# ------------------------------
5072d19872aSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
5082d19872aSmrg
5092d19872aSmrg
5102d19872aSmrg# _LT_CONFIG_COMMANDS
5112d19872aSmrg# -------------------
5122d19872aSmrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
5132d19872aSmrg# variables for single and double quote escaping we saved from calls
5142d19872aSmrg# to _LT_DECL, we can put quote escaped variables declarations
5152d19872aSmrg# into 'config.status', and then the shell code to quote escape them in
5162d19872aSmrg# for loops in 'config.status'.  Finally, any additional code accumulated
5172d19872aSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
5182d19872aSmrgm4_defun([_LT_CONFIG_COMMANDS],
5192d19872aSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
5202d19872aSmrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
5212d19872aSmrg	dnl instead of duplicating it all over again into config.status,
5222d19872aSmrg	dnl then we will have config.status run $CONFIG_LT later, so it
5232d19872aSmrg	dnl needs to know what name is stored there:
5242d19872aSmrg        [AC_CONFIG_COMMANDS([libtool],
5252d19872aSmrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
5262d19872aSmrg    dnl If the libtool generation code is destined for config.status,
5272d19872aSmrg    dnl expand the accumulated commands and init code now:
5282d19872aSmrg    [AC_CONFIG_COMMANDS([libtool],
5292d19872aSmrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
5302d19872aSmrg])#_LT_CONFIG_COMMANDS
5312d19872aSmrg
5322d19872aSmrg
5332d19872aSmrg# Initialize.
5342d19872aSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
5352d19872aSmrg[
5362d19872aSmrg
5372d19872aSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
5382d19872aSmrg# if CDPATH is set.
5392d19872aSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5402d19872aSmrg
5412d19872aSmrgsed_quote_subst='$sed_quote_subst'
5422d19872aSmrgdouble_quote_subst='$double_quote_subst'
5432d19872aSmrgdelay_variable_subst='$delay_variable_subst'
5442d19872aSmrg_LT_CONFIG_STATUS_DECLARATIONS
5452d19872aSmrgLTCC='$LTCC'
5462d19872aSmrgLTCFLAGS='$LTCFLAGS'
5472d19872aSmrgcompiler='$compiler_DEFAULT'
5482d19872aSmrg
5492d19872aSmrg# A function that is used when there is no print builtin or printf.
5502d19872aSmrgfunc_fallback_echo ()
5512d19872aSmrg{
5522d19872aSmrg  eval 'cat <<_LTECHO_EOF
5532d19872aSmrg\$[]1
5542d19872aSmrg_LTECHO_EOF'
5552d19872aSmrg}
5562d19872aSmrg
5572d19872aSmrg# Quote evaled strings.
5582d19872aSmrgfor var in lt_decl_all_varnames([[ \
5592d19872aSmrg]], lt_decl_quote_varnames); do
5602d19872aSmrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
5612d19872aSmrg    *[[\\\\\\\`\\"\\\$]]*)
5622d19872aSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
5632d19872aSmrg      ;;
5642d19872aSmrg    *)
5652d19872aSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
5662d19872aSmrg      ;;
5672d19872aSmrg    esac
5682d19872aSmrgdone
5692d19872aSmrg
5702d19872aSmrg# Double-quote double-evaled strings.
5712d19872aSmrgfor var in lt_decl_all_varnames([[ \
5722d19872aSmrg]], lt_decl_dquote_varnames); do
5732d19872aSmrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
5742d19872aSmrg    *[[\\\\\\\`\\"\\\$]]*)
5752d19872aSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
5762d19872aSmrg      ;;
5772d19872aSmrg    *)
5782d19872aSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
5792d19872aSmrg      ;;
5802d19872aSmrg    esac
5812d19872aSmrgdone
5822d19872aSmrg
5832d19872aSmrg_LT_OUTPUT_LIBTOOL_INIT
5842d19872aSmrg])
5852d19872aSmrg
5862d19872aSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
5872d19872aSmrg# ------------------------------------
5882d19872aSmrg# Generate a child script FILE with all initialization necessary to
5892d19872aSmrg# reuse the environment learned by the parent script, and make the
5902d19872aSmrg# file executable.  If COMMENT is supplied, it is inserted after the
5912d19872aSmrg# '#!' sequence but before initialization text begins.  After this
5922d19872aSmrg# macro, additional text can be appended to FILE to form the body of
5932d19872aSmrg# the child script.  The macro ends with non-zero status if the
5942d19872aSmrg# file could not be fully written (such as if the disk is full).
5952d19872aSmrgm4_ifdef([AS_INIT_GENERATED],
5962d19872aSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
5972d19872aSmrg[m4_defun([_LT_GENERATED_FILE_INIT],
5982d19872aSmrg[m4_require([AS_PREPARE])]dnl
5992d19872aSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
6002d19872aSmrg[lt_write_fail=0
6012d19872aSmrgcat >$1 <<_ASEOF || lt_write_fail=1
6022d19872aSmrg#! $SHELL
6032d19872aSmrg# Generated by $as_me.
6042d19872aSmrg$2
6052d19872aSmrgSHELL=\${CONFIG_SHELL-$SHELL}
6062d19872aSmrgexport SHELL
6072d19872aSmrg_ASEOF
6082d19872aSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1
6092d19872aSmrgAS_SHELL_SANITIZE
6102d19872aSmrg_AS_PREPARE
6112d19872aSmrgexec AS_MESSAGE_FD>&1
6122d19872aSmrg_ASEOF
6132d19872aSmrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl
6142d19872aSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
6152d19872aSmrg
6162d19872aSmrg# LT_OUTPUT
6172d19872aSmrg# ---------
6182d19872aSmrg# This macro allows early generation of the libtool script (before
6192d19872aSmrg# AC_OUTPUT is called), incase it is used in configure for compilation
6202d19872aSmrg# tests.
6212d19872aSmrgAC_DEFUN([LT_OUTPUT],
6222d19872aSmrg[: ${CONFIG_LT=./config.lt}
6232d19872aSmrgAC_MSG_NOTICE([creating $CONFIG_LT])
6242d19872aSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
6252d19872aSmrg[# Run this file to recreate a libtool stub with the current configuration.])
6262d19872aSmrg
6272d19872aSmrgcat >>"$CONFIG_LT" <<\_LTEOF
6282d19872aSmrglt_cl_silent=false
6292d19872aSmrgexec AS_MESSAGE_LOG_FD>>config.log
6302d19872aSmrg{
6312d19872aSmrg  echo
6322d19872aSmrg  AS_BOX([Running $as_me.])
6332d19872aSmrg} >&AS_MESSAGE_LOG_FD
6342d19872aSmrg
6352d19872aSmrglt_cl_help="\
6362d19872aSmrg'$as_me' creates a local libtool stub from the current configuration,
6372d19872aSmrgfor use in further configure time tests before the real libtool is
6382d19872aSmrggenerated.
6392d19872aSmrg
6402d19872aSmrgUsage: $[0] [[OPTIONS]]
6412d19872aSmrg
6422d19872aSmrg  -h, --help      print this help, then exit
6432d19872aSmrg  -V, --version   print version number, then exit
6442d19872aSmrg  -q, --quiet     do not print progress messages
6452d19872aSmrg  -d, --debug     don't remove temporary files
6462d19872aSmrg
6472d19872aSmrgReport bugs to <bug-libtool@gnu.org>."
6482d19872aSmrg
6492d19872aSmrglt_cl_version="\
6502d19872aSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
6512d19872aSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
6522d19872aSmrgconfigured by $[0], generated by m4_PACKAGE_STRING.
6532d19872aSmrg
6542d19872aSmrgCopyright (C) 2011 Free Software Foundation, Inc.
6552d19872aSmrgThis config.lt script is free software; the Free Software Foundation
6562d19872aSmrggives unlimited permision to copy, distribute and modify it."
6572d19872aSmrg
6582d19872aSmrgwhile test 0 != $[#]
6592d19872aSmrgdo
6602d19872aSmrg  case $[1] in
6612d19872aSmrg    --version | --v* | -V )
6622d19872aSmrg      echo "$lt_cl_version"; exit 0 ;;
6632d19872aSmrg    --help | --h* | -h )
6642d19872aSmrg      echo "$lt_cl_help"; exit 0 ;;
6652d19872aSmrg    --debug | --d* | -d )
6662d19872aSmrg      debug=: ;;
6672d19872aSmrg    --quiet | --q* | --silent | --s* | -q )
6682d19872aSmrg      lt_cl_silent=: ;;
6692d19872aSmrg
6702d19872aSmrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
6712d19872aSmrgTry '$[0] --help' for more information.]) ;;
6722d19872aSmrg
6732d19872aSmrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
6742d19872aSmrgTry '$[0] --help' for more information.]) ;;
6752d19872aSmrg  esac
6762d19872aSmrg  shift
6772d19872aSmrgdone
6782d19872aSmrg
6792d19872aSmrgif $lt_cl_silent; then
6802d19872aSmrg  exec AS_MESSAGE_FD>/dev/null
6812d19872aSmrgfi
6822d19872aSmrg_LTEOF
6832d19872aSmrg
6842d19872aSmrgcat >>"$CONFIG_LT" <<_LTEOF
6852d19872aSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
6862d19872aSmrg_LTEOF
6872d19872aSmrg
6882d19872aSmrgcat >>"$CONFIG_LT" <<\_LTEOF
6892d19872aSmrgAC_MSG_NOTICE([creating $ofile])
6902d19872aSmrg_LT_OUTPUT_LIBTOOL_COMMANDS
6912d19872aSmrgAS_EXIT(0)
6922d19872aSmrg_LTEOF
6932d19872aSmrgchmod +x "$CONFIG_LT"
6942d19872aSmrg
6952d19872aSmrg# configure is writing to config.log, but config.lt does its own redirection,
6962d19872aSmrg# appending to config.log, which fails on DOS, as config.log is still kept
6972d19872aSmrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
6982d19872aSmrg# config.log, so it can be properly (re)opened and appended to by config.lt.
6992d19872aSmrglt_cl_success=:
7002d19872aSmrgtest yes = "$silent" &&
7012d19872aSmrg  lt_config_lt_args="$lt_config_lt_args --quiet"
7022d19872aSmrgexec AS_MESSAGE_LOG_FD>/dev/null
7032d19872aSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
7042d19872aSmrgexec AS_MESSAGE_LOG_FD>>config.log
7052d19872aSmrg$lt_cl_success || AS_EXIT(1)
7062d19872aSmrg])# LT_OUTPUT
7072d19872aSmrg
7082d19872aSmrg
7092d19872aSmrg# _LT_CONFIG(TAG)
7102d19872aSmrg# ---------------
7112d19872aSmrg# If TAG is the built-in tag, create an initial libtool script with a
7122d19872aSmrg# default configuration from the untagged config vars.  Otherwise add code
7132d19872aSmrg# to config.status for appending the configuration named by TAG from the
7142d19872aSmrg# matching tagged config vars.
7152d19872aSmrgm4_defun([_LT_CONFIG],
7162d19872aSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7172d19872aSmrg_LT_CONFIG_SAVE_COMMANDS([
7182d19872aSmrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
7192d19872aSmrg  m4_if(_LT_TAG, [C], [
7202d19872aSmrg    # See if we are running on zsh, and set the options that allow our
7212d19872aSmrg    # commands through without removal of \ escapes.
7222d19872aSmrg    if test -n "${ZSH_VERSION+set}"; then
7232d19872aSmrg      setopt NO_GLOB_SUBST
7242d19872aSmrg    fi
7252d19872aSmrg
7262d19872aSmrg    cfgfile=${ofile}T
7272d19872aSmrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
7282d19872aSmrg    $RM "$cfgfile"
7292d19872aSmrg
7302d19872aSmrg    cat <<_LT_EOF >> "$cfgfile"
7312d19872aSmrg#! $SHELL
7322d19872aSmrg# Generated automatically by $as_me ($PACKAGE) $VERSION
7332d19872aSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7342d19872aSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
7352d19872aSmrg
7362d19872aSmrg# Provide generalized library-building support services.
7372d19872aSmrg# Written by Gordon Matzigkeit, 1996
7382d19872aSmrg
7392d19872aSmrg_LT_COPYING
7402d19872aSmrg_LT_LIBTOOL_TAGS
7412d19872aSmrg
7422d19872aSmrg# Configured defaults for sys_lib_dlsearch_path munging.
7432d19872aSmrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
7442d19872aSmrg
7452d19872aSmrg# ### BEGIN LIBTOOL CONFIG
7462d19872aSmrg_LT_LIBTOOL_CONFIG_VARS
7472d19872aSmrg_LT_LIBTOOL_TAG_VARS
7482d19872aSmrg# ### END LIBTOOL CONFIG
7492d19872aSmrg
7502d19872aSmrg_LT_EOF
7512d19872aSmrg
7522d19872aSmrg    cat <<'_LT_EOF' >> "$cfgfile"
7532d19872aSmrg
7542d19872aSmrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
7552d19872aSmrg
7562d19872aSmrg_LT_PREPARE_MUNGE_PATH_LIST
7572d19872aSmrg_LT_PREPARE_CC_BASENAME
7582d19872aSmrg
7592d19872aSmrg# ### END FUNCTIONS SHARED WITH CONFIGURE
7602d19872aSmrg
7612d19872aSmrg_LT_EOF
7622d19872aSmrg
7632d19872aSmrg  case $host_os in
7642d19872aSmrg  aix3*)
7652d19872aSmrg    cat <<\_LT_EOF >> "$cfgfile"
7662d19872aSmrg# AIX sometimes has problems with the GCC collect2 program.  For some
7672d19872aSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems
7682d19872aSmrg# vanish in a puff of smoke.
7692d19872aSmrgif test set != "${COLLECT_NAMES+set}"; then
7702d19872aSmrg  COLLECT_NAMES=
7712d19872aSmrg  export COLLECT_NAMES
7722d19872aSmrgfi
7732d19872aSmrg_LT_EOF
7742d19872aSmrg    ;;
7752d19872aSmrg  esac
7762d19872aSmrg
7772d19872aSmrg  _LT_PROG_LTMAIN
7782d19872aSmrg
7792d19872aSmrg  # We use sed instead of cat because bash on DJGPP gets confused if
7802d19872aSmrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7812d19872aSmrg  # text mode, it properly converts lines to CR/LF.  This bash problem
7822d19872aSmrg  # is reportedly fixed, but why not run on old versions too?
7832d19872aSmrg  $SED '$q' "$ltmain" >> "$cfgfile" \
7842d19872aSmrg     || (rm -f "$cfgfile"; exit 1)
7852d19872aSmrg
7862d19872aSmrg   mv -f "$cfgfile" "$ofile" ||
7872d19872aSmrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
7882d19872aSmrg  chmod +x "$ofile"
7892d19872aSmrg],
7902d19872aSmrg[cat <<_LT_EOF >> "$ofile"
7912d19872aSmrg
7922d19872aSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
7932d19872aSmrgdnl in a comment (ie after a #).
7942d19872aSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1
7952d19872aSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
7962d19872aSmrg# ### END LIBTOOL TAG CONFIG: $1
7972d19872aSmrg_LT_EOF
7982d19872aSmrg])dnl /m4_if
7992d19872aSmrg],
8002d19872aSmrg[m4_if([$1], [], [
8012d19872aSmrg    PACKAGE='$PACKAGE'
8022d19872aSmrg    VERSION='$VERSION'
8032d19872aSmrg    RM='$RM'
8042d19872aSmrg    ofile='$ofile'], [])
8052d19872aSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS
8062d19872aSmrg])# _LT_CONFIG
8072d19872aSmrg
8082d19872aSmrg
8092d19872aSmrg# LT_SUPPORTED_TAG(TAG)
8102d19872aSmrg# ---------------------
8112d19872aSmrg# Trace this macro to discover what tags are supported by the libtool
8122d19872aSmrg# --tag option, using:
8132d19872aSmrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
8142d19872aSmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
8152d19872aSmrg
8162d19872aSmrg
8172d19872aSmrg# C support is built-in for now
8182d19872aSmrgm4_define([_LT_LANG_C_enabled], [])
8192d19872aSmrgm4_define([_LT_TAGS], [])
8202d19872aSmrg
8212d19872aSmrg
8222d19872aSmrg# LT_LANG(LANG)
8232d19872aSmrg# -------------
8242d19872aSmrg# Enable libtool support for the given language if not already enabled.
8252d19872aSmrgAC_DEFUN([LT_LANG],
8262d19872aSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
8272d19872aSmrgm4_case([$1],
8282d19872aSmrg  [C],			[_LT_LANG(C)],
8292d19872aSmrg  [C++],		[_LT_LANG(CXX)],
8302d19872aSmrg  [Go],			[_LT_LANG(GO)],
8312d19872aSmrg  [Java],		[_LT_LANG(GCJ)],
8322d19872aSmrg  [Fortran 77],		[_LT_LANG(F77)],
8332d19872aSmrg  [Fortran],		[_LT_LANG(FC)],
8342d19872aSmrg  [Windows Resource],	[_LT_LANG(RC)],
8352d19872aSmrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
8362d19872aSmrg    [_LT_LANG($1)],
8372d19872aSmrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
8382d19872aSmrg])# LT_LANG
8392d19872aSmrg
8402d19872aSmrg
8412d19872aSmrg# _LT_LANG(LANGNAME)
8422d19872aSmrg# ------------------
8432d19872aSmrgm4_defun([_LT_LANG],
8442d19872aSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
8452d19872aSmrg  [LT_SUPPORTED_TAG([$1])dnl
8462d19872aSmrg  m4_append([_LT_TAGS], [$1 ])dnl
8472d19872aSmrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
8482d19872aSmrg  _LT_LANG_$1_CONFIG($1)])dnl
8492d19872aSmrg])# _LT_LANG
8502d19872aSmrg
8512d19872aSmrg
8522d19872aSmrgm4_ifndef([AC_PROG_GO], [
8532d19872aSmrg############################################################
8542d19872aSmrg# NOTE: This macro has been submitted for inclusion into   #
8552d19872aSmrg#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
8562d19872aSmrg#  a released version of Autoconf we should remove this    #
8572d19872aSmrg#  macro and use it instead.                               #
8582d19872aSmrg############################################################
8592d19872aSmrgm4_defun([AC_PROG_GO],
8602d19872aSmrg[AC_LANG_PUSH(Go)dnl
8612d19872aSmrgAC_ARG_VAR([GOC],     [Go compiler command])dnl
8622d19872aSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
8632d19872aSmrg_AC_ARG_VAR_LDFLAGS()dnl
8642d19872aSmrgAC_CHECK_TOOL(GOC, gccgo)
8652d19872aSmrgif test -z "$GOC"; then
8662d19872aSmrg  if test -n "$ac_tool_prefix"; then
8672d19872aSmrg    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
8682d19872aSmrg  fi
8692d19872aSmrgfi
8702d19872aSmrgif test -z "$GOC"; then
8712d19872aSmrg  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
8722d19872aSmrgfi
8732d19872aSmrg])#m4_defun
8742d19872aSmrg])#m4_ifndef
8752d19872aSmrg
8762d19872aSmrg
8772d19872aSmrg# _LT_LANG_DEFAULT_CONFIG
8782d19872aSmrg# -----------------------
8792d19872aSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
8802d19872aSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
8812d19872aSmrg  [LT_LANG(CXX)],
8822d19872aSmrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
8832d19872aSmrg
8842d19872aSmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
8852d19872aSmrg  [LT_LANG(F77)],
8862d19872aSmrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
8872d19872aSmrg
8882d19872aSmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
8892d19872aSmrg  [LT_LANG(FC)],
8902d19872aSmrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
8912d19872aSmrg
8922d19872aSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
8932d19872aSmrgdnl pulling things in needlessly.
8942d19872aSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
8952d19872aSmrg  [LT_LANG(GCJ)],
8962d19872aSmrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
8972d19872aSmrg    [LT_LANG(GCJ)],
8982d19872aSmrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
8992d19872aSmrg      [LT_LANG(GCJ)],
9002d19872aSmrg      [m4_ifdef([AC_PROG_GCJ],
9012d19872aSmrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
9022d19872aSmrg       m4_ifdef([A][M_PROG_GCJ],
9032d19872aSmrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
9042d19872aSmrg       m4_ifdef([LT_PROG_GCJ],
9052d19872aSmrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
9062d19872aSmrg
9072d19872aSmrgAC_PROVIDE_IFELSE([AC_PROG_GO],
9082d19872aSmrg  [LT_LANG(GO)],
9092d19872aSmrg  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
9102d19872aSmrg
9112d19872aSmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
9122d19872aSmrg  [LT_LANG(RC)],
9132d19872aSmrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
9142d19872aSmrg])# _LT_LANG_DEFAULT_CONFIG
9152d19872aSmrg
9162d19872aSmrg# Obsolete macros:
9172d19872aSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
9182d19872aSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
9192d19872aSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
9202d19872aSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
9212d19872aSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
9222d19872aSmrgdnl aclocal-1.4 backwards compatibility:
9232d19872aSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
9242d19872aSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
9252d19872aSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
9262d19872aSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
9272d19872aSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], [])
9282d19872aSmrg
9292d19872aSmrg
9302d19872aSmrg# _LT_TAG_COMPILER
9312d19872aSmrg# ----------------
9322d19872aSmrgm4_defun([_LT_TAG_COMPILER],
9332d19872aSmrg[AC_REQUIRE([AC_PROG_CC])dnl
9342d19872aSmrg
9352d19872aSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
9362d19872aSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
9372d19872aSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
9382d19872aSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
9392d19872aSmrg
9402d19872aSmrg# If no C compiler was specified, use CC.
9412d19872aSmrgLTCC=${LTCC-"$CC"}
9422d19872aSmrg
9432d19872aSmrg# If no C compiler flags were specified, use CFLAGS.
9442d19872aSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
9452d19872aSmrg
9462d19872aSmrg# Allow CC to be a program name with arguments.
9472d19872aSmrgcompiler=$CC
9482d19872aSmrg])# _LT_TAG_COMPILER
9492d19872aSmrg
9502d19872aSmrg
9512d19872aSmrg# _LT_COMPILER_BOILERPLATE
9522d19872aSmrg# ------------------------
9532d19872aSmrg# Check for compiler boilerplate output or warnings with
9542d19872aSmrg# the simple compiler test code.
9552d19872aSmrgm4_defun([_LT_COMPILER_BOILERPLATE],
9562d19872aSmrg[m4_require([_LT_DECL_SED])dnl
9572d19872aSmrgac_outfile=conftest.$ac_objext
9582d19872aSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
9592d19872aSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
9602d19872aSmrg_lt_compiler_boilerplate=`cat conftest.err`
9612d19872aSmrg$RM conftest*
9622d19872aSmrg])# _LT_COMPILER_BOILERPLATE
9632d19872aSmrg
9642d19872aSmrg
9652d19872aSmrg# _LT_LINKER_BOILERPLATE
9662d19872aSmrg# ----------------------
9672d19872aSmrg# Check for linker boilerplate output or warnings with
9682d19872aSmrg# the simple link test code.
9692d19872aSmrgm4_defun([_LT_LINKER_BOILERPLATE],
9702d19872aSmrg[m4_require([_LT_DECL_SED])dnl
9712d19872aSmrgac_outfile=conftest.$ac_objext
9722d19872aSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
9732d19872aSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
9742d19872aSmrg_lt_linker_boilerplate=`cat conftest.err`
9752d19872aSmrg$RM -r conftest*
9762d19872aSmrg])# _LT_LINKER_BOILERPLATE
9772d19872aSmrg
9782d19872aSmrg# _LT_REQUIRED_DARWIN_CHECKS
9792d19872aSmrg# -------------------------
9802d19872aSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
9812d19872aSmrg  case $host_os in
9822d19872aSmrg    rhapsody* | darwin*)
9832d19872aSmrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
9842d19872aSmrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
9852d19872aSmrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
9862d19872aSmrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
9872d19872aSmrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
9882d19872aSmrg    _LT_DECL([], [DSYMUTIL], [1],
9892d19872aSmrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
9902d19872aSmrg    _LT_DECL([], [NMEDIT], [1],
9912d19872aSmrg      [Tool to change global to local symbols on Mac OS X])
9922d19872aSmrg    _LT_DECL([], [LIPO], [1],
9932d19872aSmrg      [Tool to manipulate fat objects and archives on Mac OS X])
9942d19872aSmrg    _LT_DECL([], [OTOOL], [1],
9952d19872aSmrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
9962d19872aSmrg    _LT_DECL([], [OTOOL64], [1],
9972d19872aSmrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
9982d19872aSmrg
9992d19872aSmrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
10002d19872aSmrg      [lt_cv_apple_cc_single_mod=no
10012d19872aSmrg      if test -z "$LT_MULTI_MODULE"; then
10022d19872aSmrg	# By default we will add the -single_module flag. You can override
10032d19872aSmrg	# by either setting the environment variable LT_MULTI_MODULE
10042d19872aSmrg	# non-empty at configure time, or by adding -multi_module to the
10052d19872aSmrg	# link flags.
10062d19872aSmrg	rm -rf libconftest.dylib*
10072d19872aSmrg	echo "int foo(void){return 1;}" > conftest.c
10082d19872aSmrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10092d19872aSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
10102d19872aSmrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10112d19872aSmrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
10122d19872aSmrg        _lt_result=$?
10132d19872aSmrg	# If there is a non-empty error log, and "single_module"
10142d19872aSmrg	# appears in it, assume the flag caused a linker warning
10152d19872aSmrg        if test -s conftest.err && $GREP single_module conftest.err; then
10162d19872aSmrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
10172d19872aSmrg	# Otherwise, if the output was created with a 0 exit code from
10182d19872aSmrg	# the compiler, it worked.
10192d19872aSmrg	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
10202d19872aSmrg	  lt_cv_apple_cc_single_mod=yes
10212d19872aSmrg	else
10222d19872aSmrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
10232d19872aSmrg	fi
10242d19872aSmrg	rm -rf libconftest.dylib*
10252d19872aSmrg	rm -f conftest.*
10262d19872aSmrg      fi])
10272d19872aSmrg
10282d19872aSmrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
10292d19872aSmrg      [lt_cv_ld_exported_symbols_list],
10302d19872aSmrg      [lt_cv_ld_exported_symbols_list=no
10312d19872aSmrg      save_LDFLAGS=$LDFLAGS
10322d19872aSmrg      echo "_main" > conftest.sym
10332d19872aSmrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
10342d19872aSmrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
10352d19872aSmrg	[lt_cv_ld_exported_symbols_list=yes],
10362d19872aSmrg	[lt_cv_ld_exported_symbols_list=no])
10372d19872aSmrg	LDFLAGS=$save_LDFLAGS
10382d19872aSmrg    ])
10392d19872aSmrg
10402d19872aSmrg    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
10412d19872aSmrg      [lt_cv_ld_force_load=no
10422d19872aSmrg      cat > conftest.c << _LT_EOF
10432d19872aSmrgint forced_loaded() { return 2;}
10442d19872aSmrg_LT_EOF
10452d19872aSmrg      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
10462d19872aSmrg      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
10472d19872aSmrg      echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
10482d19872aSmrg      $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
10492d19872aSmrg      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
10502d19872aSmrg      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
10512d19872aSmrg      cat > conftest.c << _LT_EOF
10522d19872aSmrgint main() { return 0;}
10532d19872aSmrg_LT_EOF
10542d19872aSmrg      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
10552d19872aSmrg      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
10562d19872aSmrg      _lt_result=$?
10572d19872aSmrg      if test -s conftest.err && $GREP force_load conftest.err; then
10582d19872aSmrg	cat conftest.err >&AS_MESSAGE_LOG_FD
10592d19872aSmrg      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
10602d19872aSmrg	lt_cv_ld_force_load=yes
10612d19872aSmrg      else
10622d19872aSmrg	cat conftest.err >&AS_MESSAGE_LOG_FD
10632d19872aSmrg      fi
10642d19872aSmrg        rm -f conftest.err libconftest.a conftest conftest.c
10652d19872aSmrg        rm -rf conftest.dSYM
10662d19872aSmrg    ])
10672d19872aSmrg    case $host_os in
10682d19872aSmrg    rhapsody* | darwin1.[[012]])
10692d19872aSmrg      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
10702d19872aSmrg    darwin1.*)
10712d19872aSmrg      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10722d19872aSmrg    darwin*)
10732d19872aSmrg      case $MACOSX_DEPLOYMENT_TARGET,$host in
10742d19872aSmrg        10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
10752d19872aSmrg          _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10762d19872aSmrg        *)
10772d19872aSmrg          _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10782d19872aSmrg      esac
10792d19872aSmrg    ;;
10802d19872aSmrg  esac
10812d19872aSmrg    if test yes = "$lt_cv_apple_cc_single_mod"; then
10822d19872aSmrg      _lt_dar_single_mod='$single_module'
10832d19872aSmrg    fi
10842d19872aSmrg    if test yes = "$lt_cv_ld_exported_symbols_list"; then
10852d19872aSmrg      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
10862d19872aSmrg    else
10872d19872aSmrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
10882d19872aSmrg    fi
10892d19872aSmrg    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
10902d19872aSmrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
10912d19872aSmrg    else
10922d19872aSmrg      _lt_dsymutil=
10932d19872aSmrg    fi
10942d19872aSmrg    ;;
10952d19872aSmrg  esac
10962d19872aSmrg])
10972d19872aSmrg
10982d19872aSmrg
10992d19872aSmrg# _LT_DARWIN_LINKER_FEATURES([TAG])
11002d19872aSmrg# ---------------------------------
11012d19872aSmrg# Checks for linker and compiler features on darwin
11022d19872aSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
11032d19872aSmrg[
11042d19872aSmrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
11052d19872aSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
11062d19872aSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
11072d19872aSmrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
11082d19872aSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
11092d19872aSmrg  if test yes = "$lt_cv_ld_force_load"; then
11102d19872aSmrg    _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\"`'
11112d19872aSmrg    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
11122d19872aSmrg                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
11132d19872aSmrg  else
11142d19872aSmrg    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
11152d19872aSmrg  fi
11162d19872aSmrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
11172d19872aSmrg  _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
11182d19872aSmrg  case $cc_basename in
11192d19872aSmrg     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
11202d19872aSmrg     *) _lt_dar_can_shared=$GCC ;;
11212d19872aSmrg  esac
11222d19872aSmrg  if test yes = "$_lt_dar_can_shared"; then
11232d19872aSmrg    output_verbose_link_cmd=func_echo_all
11242d19872aSmrg    _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"
11252d19872aSmrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
11262d19872aSmrg    _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"
11272d19872aSmrg    _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"
11282d19872aSmrg    m4_if([$1], [CXX],
11292d19872aSmrg[   if test yes != "$lt_cv_apple_cc_single_mod"; then
11302d19872aSmrg      _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"
11312d19872aSmrg      _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"
11322d19872aSmrg    fi
11332d19872aSmrg],[])
11342d19872aSmrg  else
11352d19872aSmrg  _LT_TAGVAR(ld_shlibs, $1)=no
11362d19872aSmrg  fi
11372d19872aSmrg])
11382d19872aSmrg
11392d19872aSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
11402d19872aSmrg# ----------------------------------
11412d19872aSmrg# Links a minimal program and checks the executable
11422d19872aSmrg# for the system default hardcoded library path. In most cases,
11432d19872aSmrg# this is /usr/lib:/lib, but when the MPI compilers are used
11442d19872aSmrg# the location of the communication and MPI libs are included too.
11452d19872aSmrg# If we don't find anything, use the default library path according
11462d19872aSmrg# to the aix ld manual.
11472d19872aSmrg# Store the results from the different compilers for each TAGNAME.
11482d19872aSmrg# Allow to override them for all tags through lt_cv_aix_libpath.
11492d19872aSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
11502d19872aSmrg[m4_require([_LT_DECL_SED])dnl
11512d19872aSmrgif test set = "${lt_cv_aix_libpath+set}"; then
11522d19872aSmrg  aix_libpath=$lt_cv_aix_libpath
11532d19872aSmrgelse
11542d19872aSmrg  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
11552d19872aSmrg  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
11562d19872aSmrg  lt_aix_libpath_sed='[
11572d19872aSmrg      /Import File Strings/,/^$/ {
11582d19872aSmrg	  /^0/ {
11592d19872aSmrg	      s/^0  *\([^ ]*\) *$/\1/
11602d19872aSmrg	      p
11612d19872aSmrg	  }
11622d19872aSmrg      }]'
11632d19872aSmrg  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11642d19872aSmrg  # Check for a 64-bit object if we didn't find anything.
11652d19872aSmrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
11662d19872aSmrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11672d19872aSmrg  fi],[])
11682d19872aSmrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
11692d19872aSmrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
11702d19872aSmrg  fi
11712d19872aSmrg  ])
11722d19872aSmrg  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
11732d19872aSmrgfi
11742d19872aSmrg])# _LT_SYS_MODULE_PATH_AIX
11752d19872aSmrg
11762d19872aSmrg
11772d19872aSmrg# _LT_SHELL_INIT(ARG)
11782d19872aSmrg# -------------------
11792d19872aSmrgm4_define([_LT_SHELL_INIT],
11802d19872aSmrg[m4_divert_text([M4SH-INIT], [$1
11812d19872aSmrg])])# _LT_SHELL_INIT
11822d19872aSmrg
11832d19872aSmrg
11842d19872aSmrg
11852d19872aSmrg# _LT_PROG_ECHO_BACKSLASH
11862d19872aSmrg# -----------------------
11872d19872aSmrg# Find how we can fake an echo command that does not interpret backslash.
11882d19872aSmrg# In particular, with Autoconf 2.60 or later we add some code to the start
11892d19872aSmrg# of the generated configure script that will find a shell with a builtin
11902d19872aSmrg# printf (that we can use as an echo command).
11912d19872aSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
11922d19872aSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
11932d19872aSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
11942d19872aSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
11952d19872aSmrg
11962d19872aSmrgAC_MSG_CHECKING([how to print strings])
11972d19872aSmrg# Test print first, because it will be a builtin if present.
11982d19872aSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
11992d19872aSmrg   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
12002d19872aSmrg  ECHO='print -r --'
12012d19872aSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
12022d19872aSmrg  ECHO='printf %s\n'
12032d19872aSmrgelse
12042d19872aSmrg  # Use this function as a fallback that always works.
12052d19872aSmrg  func_fallback_echo ()
12062d19872aSmrg  {
12072d19872aSmrg    eval 'cat <<_LTECHO_EOF
12082d19872aSmrg$[]1
12092d19872aSmrg_LTECHO_EOF'
12102d19872aSmrg  }
12112d19872aSmrg  ECHO='func_fallback_echo'
12122d19872aSmrgfi
12132d19872aSmrg
12142d19872aSmrg# func_echo_all arg...
12152d19872aSmrg# Invoke $ECHO with all args, space-separated.
12162d19872aSmrgfunc_echo_all ()
12172d19872aSmrg{
12182d19872aSmrg    $ECHO "$*"
12192d19872aSmrg}
12202d19872aSmrg
12212d19872aSmrgcase $ECHO in
12222d19872aSmrg  printf*) AC_MSG_RESULT([printf]) ;;
12232d19872aSmrg  print*) AC_MSG_RESULT([print -r]) ;;
12242d19872aSmrg  *) AC_MSG_RESULT([cat]) ;;
12252d19872aSmrgesac
12262d19872aSmrg
12272d19872aSmrgm4_ifdef([_AS_DETECT_SUGGESTED],
12282d19872aSmrg[_AS_DETECT_SUGGESTED([
12292d19872aSmrg  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
12302d19872aSmrg    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
12312d19872aSmrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
12322d19872aSmrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
12332d19872aSmrg    PATH=/empty FPATH=/empty; export PATH FPATH
12342d19872aSmrg    test "X`printf %s $ECHO`" = "X$ECHO" \
12352d19872aSmrg      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
12362d19872aSmrg
12372d19872aSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
12382d19872aSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
12392d19872aSmrg])# _LT_PROG_ECHO_BACKSLASH
12402d19872aSmrg
12412d19872aSmrg
12422d19872aSmrg# _LT_WITH_SYSROOT
12432d19872aSmrg# ----------------
12442d19872aSmrgAC_DEFUN([_LT_WITH_SYSROOT],
12452d19872aSmrg[m4_require([_LT_DECL_SED])dnl
12462d19872aSmrgAC_MSG_CHECKING([for sysroot])
12472d19872aSmrgAC_ARG_WITH([sysroot],
12482d19872aSmrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
12492d19872aSmrg  [Search for dependent libraries within DIR (or the compiler's sysroot
12502d19872aSmrg   if not specified).])],
12512d19872aSmrg[], [with_sysroot=no])
12522d19872aSmrg
12532d19872aSmrgdnl lt_sysroot will always be passed unquoted.  We quote it here
12542d19872aSmrgdnl in case the user passed a directory name.
12552d19872aSmrglt_sysroot=
12562d19872aSmrgcase $with_sysroot in #(
12572d19872aSmrg yes)
12582d19872aSmrg   if test yes = "$GCC"; then
12592d19872aSmrg     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
12602d19872aSmrg   fi
12612d19872aSmrg   ;; #(
12622d19872aSmrg /*)
12632d19872aSmrg   lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
12642d19872aSmrg   ;; #(
12652d19872aSmrg no|'')
12662d19872aSmrg   ;; #(
12672d19872aSmrg *)
12682d19872aSmrg   AC_MSG_RESULT([$with_sysroot])
12692d19872aSmrg   AC_MSG_ERROR([The sysroot must be an absolute path.])
12702d19872aSmrg   ;;
12712d19872aSmrgesac
12722d19872aSmrg
12732d19872aSmrg AC_MSG_RESULT([${lt_sysroot:-no}])
12742d19872aSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
12752d19872aSmrg[dependent libraries, and where our libraries should be installed.])])
12762d19872aSmrg
12772d19872aSmrg# _LT_ENABLE_LOCK
12782d19872aSmrg# ---------------
12792d19872aSmrgm4_defun([_LT_ENABLE_LOCK],
12802d19872aSmrg[AC_ARG_ENABLE([libtool-lock],
12812d19872aSmrg  [AS_HELP_STRING([--disable-libtool-lock],
12822d19872aSmrg    [avoid locking (might break parallel builds)])])
12832d19872aSmrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes
12842d19872aSmrg
12852d19872aSmrg# Some flags need to be propagated to the compiler or linker for good
12862d19872aSmrg# libtool support.
12872d19872aSmrgcase $host in
12882d19872aSmrgia64-*-hpux*)
12892d19872aSmrg  # Find out what ABI is being produced by ac_compile, and set mode
12902d19872aSmrg  # options accordingly.
12912d19872aSmrg  echo 'int i;' > conftest.$ac_ext
12922d19872aSmrg  if AC_TRY_EVAL(ac_compile); then
12932d19872aSmrg    case `$FILECMD conftest.$ac_objext` in
12942d19872aSmrg      *ELF-32*)
12952d19872aSmrg	HPUX_IA64_MODE=32
12962d19872aSmrg	;;
12972d19872aSmrg      *ELF-64*)
12982d19872aSmrg	HPUX_IA64_MODE=64
12992d19872aSmrg	;;
13002d19872aSmrg    esac
13012d19872aSmrg  fi
13022d19872aSmrg  rm -rf conftest*
13032d19872aSmrg  ;;
13042d19872aSmrg*-*-irix6*)
13052d19872aSmrg  # Find out what ABI is being produced by ac_compile, and set linker
13062d19872aSmrg  # options accordingly.
13072d19872aSmrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
13082d19872aSmrg  if AC_TRY_EVAL(ac_compile); then
13092d19872aSmrg    if test yes = "$lt_cv_prog_gnu_ld"; then
13102d19872aSmrg      case `$FILECMD conftest.$ac_objext` in
13112d19872aSmrg	*32-bit*)
13122d19872aSmrg	  LD="${LD-ld} -melf32bsmip"
13132d19872aSmrg	  ;;
13142d19872aSmrg	*N32*)
13152d19872aSmrg	  LD="${LD-ld} -melf32bmipn32"
13162d19872aSmrg	  ;;
13172d19872aSmrg	*64-bit*)
13182d19872aSmrg	  LD="${LD-ld} -melf64bmip"
13192d19872aSmrg	;;
13202d19872aSmrg      esac
13212d19872aSmrg    else
13222d19872aSmrg      case `$FILECMD conftest.$ac_objext` in
13232d19872aSmrg	*32-bit*)
13242d19872aSmrg	  LD="${LD-ld} -32"
13252d19872aSmrg	  ;;
13262d19872aSmrg	*N32*)
13272d19872aSmrg	  LD="${LD-ld} -n32"
13282d19872aSmrg	  ;;
13292d19872aSmrg	*64-bit*)
13302d19872aSmrg	  LD="${LD-ld} -64"
13312d19872aSmrg	  ;;
13322d19872aSmrg      esac
13332d19872aSmrg    fi
13342d19872aSmrg  fi
13352d19872aSmrg  rm -rf conftest*
13362d19872aSmrg  ;;
13372d19872aSmrg
13382d19872aSmrgmips64*-*linux*)
13392d19872aSmrg  # Find out what ABI is being produced by ac_compile, and set linker
13402d19872aSmrg  # options accordingly.
13412d19872aSmrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
13422d19872aSmrg  if AC_TRY_EVAL(ac_compile); then
13432d19872aSmrg    emul=elf
13442d19872aSmrg    case `$FILECMD conftest.$ac_objext` in
13452d19872aSmrg      *32-bit*)
13462d19872aSmrg	emul="${emul}32"
13472d19872aSmrg	;;
13482d19872aSmrg      *64-bit*)
13492d19872aSmrg	emul="${emul}64"
13502d19872aSmrg	;;
13512d19872aSmrg    esac
13522d19872aSmrg    case `$FILECMD conftest.$ac_objext` in
13532d19872aSmrg      *MSB*)
13542d19872aSmrg	emul="${emul}btsmip"
13552d19872aSmrg	;;
13562d19872aSmrg      *LSB*)
13572d19872aSmrg	emul="${emul}ltsmip"
13582d19872aSmrg	;;
13592d19872aSmrg    esac
13602d19872aSmrg    case `$FILECMD conftest.$ac_objext` in
13612d19872aSmrg      *N32*)
13622d19872aSmrg	emul="${emul}n32"
13632d19872aSmrg	;;
13642d19872aSmrg    esac
13652d19872aSmrg    LD="${LD-ld} -m $emul"
13662d19872aSmrg  fi
13672d19872aSmrg  rm -rf conftest*
13682d19872aSmrg  ;;
13692d19872aSmrg
13702d19872aSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
13712d19872aSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
13722d19872aSmrg  # Find out what ABI is being produced by ac_compile, and set linker
13732d19872aSmrg  # options accordingly.  Note that the listed cases only cover the
13742d19872aSmrg  # situations where additional linker options are needed (such as when
13752d19872aSmrg  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
13762d19872aSmrg  # vice versa); the common cases where no linker options are needed do
13772d19872aSmrg  # not appear in the list.
13782d19872aSmrg  echo 'int i;' > conftest.$ac_ext
13792d19872aSmrg  if AC_TRY_EVAL(ac_compile); then
13802d19872aSmrg    case `$FILECMD conftest.o` in
13812d19872aSmrg      *32-bit*)
13822d19872aSmrg	case $host in
13832d19872aSmrg	  x86_64-*kfreebsd*-gnu)
13842d19872aSmrg	    LD="${LD-ld} -m elf_i386_fbsd"
13852d19872aSmrg	    ;;
13862d19872aSmrg	  x86_64-*linux*)
13872d19872aSmrg	    case `$FILECMD conftest.o` in
13882d19872aSmrg	      *x86-64*)
13892d19872aSmrg		LD="${LD-ld} -m elf32_x86_64"
13902d19872aSmrg		;;
13912d19872aSmrg	      *)
13922d19872aSmrg		LD="${LD-ld} -m elf_i386"
13932d19872aSmrg		;;
13942d19872aSmrg	    esac
13952d19872aSmrg	    ;;
13962d19872aSmrg	  powerpc64le-*linux*)
13972d19872aSmrg	    LD="${LD-ld} -m elf32lppclinux"
13982d19872aSmrg	    ;;
13992d19872aSmrg	  powerpc64-*linux*)
14002d19872aSmrg	    LD="${LD-ld} -m elf32ppclinux"
14012d19872aSmrg	    ;;
14022d19872aSmrg	  s390x-*linux*)
14032d19872aSmrg	    LD="${LD-ld} -m elf_s390"
14042d19872aSmrg	    ;;
14052d19872aSmrg	  sparc64-*linux*)
14062d19872aSmrg	    LD="${LD-ld} -m elf32_sparc"
14072d19872aSmrg	    ;;
14082d19872aSmrg	esac
14092d19872aSmrg	;;
14102d19872aSmrg      *64-bit*)
14112d19872aSmrg	case $host in
14122d19872aSmrg	  x86_64-*kfreebsd*-gnu)
14132d19872aSmrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
14142d19872aSmrg	    ;;
14152d19872aSmrg	  x86_64-*linux*)
14162d19872aSmrg	    LD="${LD-ld} -m elf_x86_64"
14172d19872aSmrg	    ;;
14182d19872aSmrg	  powerpcle-*linux*)
14192d19872aSmrg	    LD="${LD-ld} -m elf64lppc"
14202d19872aSmrg	    ;;
14212d19872aSmrg	  powerpc-*linux*)
14222d19872aSmrg	    LD="${LD-ld} -m elf64ppc"
14232d19872aSmrg	    ;;
14242d19872aSmrg	  s390*-*linux*|s390*-*tpf*)
14252d19872aSmrg	    LD="${LD-ld} -m elf64_s390"
14262d19872aSmrg	    ;;
14272d19872aSmrg	  sparc*-*linux*)
14282d19872aSmrg	    LD="${LD-ld} -m elf64_sparc"
14292d19872aSmrg	    ;;
14302d19872aSmrg	esac
14312d19872aSmrg	;;
14322d19872aSmrg    esac
14332d19872aSmrg  fi
14342d19872aSmrg  rm -rf conftest*
14352d19872aSmrg  ;;
14362d19872aSmrg
14372d19872aSmrg*-*-sco3.2v5*)
14382d19872aSmrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
14392d19872aSmrg  SAVE_CFLAGS=$CFLAGS
14402d19872aSmrg  CFLAGS="$CFLAGS -belf"
14412d19872aSmrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
14422d19872aSmrg    [AC_LANG_PUSH(C)
14432d19872aSmrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
14442d19872aSmrg     AC_LANG_POP])
14452d19872aSmrg  if test yes != "$lt_cv_cc_needs_belf"; then
14462d19872aSmrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
14472d19872aSmrg    CFLAGS=$SAVE_CFLAGS
14482d19872aSmrg  fi
14492d19872aSmrg  ;;
14502d19872aSmrg*-*solaris*)
14512d19872aSmrg  # Find out what ABI is being produced by ac_compile, and set linker
14522d19872aSmrg  # options accordingly.
14532d19872aSmrg  echo 'int i;' > conftest.$ac_ext
14542d19872aSmrg  if AC_TRY_EVAL(ac_compile); then
14552d19872aSmrg    case `$FILECMD conftest.o` in
14562d19872aSmrg    *64-bit*)
14572d19872aSmrg      case $lt_cv_prog_gnu_ld in
14582d19872aSmrg      yes*)
14592d19872aSmrg        case $host in
14602d19872aSmrg        i?86-*-solaris*|x86_64-*-solaris*)
14612d19872aSmrg          LD="${LD-ld} -m elf_x86_64"
14622d19872aSmrg          ;;
14632d19872aSmrg        sparc*-*-solaris*)
14642d19872aSmrg          LD="${LD-ld} -m elf64_sparc"
14652d19872aSmrg          ;;
14662d19872aSmrg        esac
14672d19872aSmrg        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
14682d19872aSmrg        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
14692d19872aSmrg          LD=${LD-ld}_sol2
14702d19872aSmrg        fi
14712d19872aSmrg        ;;
14722d19872aSmrg      *)
14732d19872aSmrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
14742d19872aSmrg	  LD="${LD-ld} -64"
14752d19872aSmrg	fi
14762d19872aSmrg	;;
14772d19872aSmrg      esac
14782d19872aSmrg      ;;
14792d19872aSmrg    esac
14802d19872aSmrg  fi
14812d19872aSmrg  rm -rf conftest*
14822d19872aSmrg  ;;
14832d19872aSmrgesac
14842d19872aSmrg
14852d19872aSmrgneed_locks=$enable_libtool_lock
14862d19872aSmrg])# _LT_ENABLE_LOCK
14872d19872aSmrg
14882d19872aSmrg
14892d19872aSmrg# _LT_PROG_AR
14902d19872aSmrg# -----------
14912d19872aSmrgm4_defun([_LT_PROG_AR],
14922d19872aSmrg[AC_CHECK_TOOLS(AR, [ar], false)
14932d19872aSmrg: ${AR=ar}
14942d19872aSmrg_LT_DECL([], [AR], [1], [The archiver])
14952d19872aSmrg
14962d19872aSmrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with
14972d19872aSmrg# Automake.  If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
14982d19872aSmrg# higher priority because thats what people were doing historically (setting
14992d19872aSmrg# ARFLAGS for automake and AR_FLAGS for libtool).  FIXME: Make the AR_FLAGS
15002d19872aSmrg# variable obsoleted/removed.
15012d19872aSmrg
15022d19872aSmrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
15032d19872aSmrglt_ar_flags=$AR_FLAGS
15042d19872aSmrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])
15052d19872aSmrg
15062d19872aSmrg# Make AR_FLAGS overridable by 'make ARFLAGS='.  Don't try to run-time override
15072d19872aSmrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
15082d19872aSmrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}],
15092d19872aSmrg         [Flags to create an archive])
15102d19872aSmrg
15112d19872aSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
15122d19872aSmrg  [lt_cv_ar_at_file=no
15132d19872aSmrg   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
15142d19872aSmrg     [echo conftest.$ac_objext > conftest.lst
15152d19872aSmrg      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
15162d19872aSmrg      AC_TRY_EVAL([lt_ar_try])
15172d19872aSmrg      if test 0 -eq "$ac_status"; then
15182d19872aSmrg	# Ensure the archiver fails upon bogus file names.
15192d19872aSmrg	rm -f conftest.$ac_objext libconftest.a
15202d19872aSmrg	AC_TRY_EVAL([lt_ar_try])
15212d19872aSmrg	if test 0 -ne "$ac_status"; then
15222d19872aSmrg          lt_cv_ar_at_file=@
15232d19872aSmrg        fi
15242d19872aSmrg      fi
15252d19872aSmrg      rm -f conftest.* libconftest.a
15262d19872aSmrg     ])
15272d19872aSmrg  ])
15282d19872aSmrg
15292d19872aSmrgif test no = "$lt_cv_ar_at_file"; then
15302d19872aSmrg  archiver_list_spec=
15312d19872aSmrgelse
15322d19872aSmrg  archiver_list_spec=$lt_cv_ar_at_file
15332d19872aSmrgfi
15342d19872aSmrg_LT_DECL([], [archiver_list_spec], [1],
15352d19872aSmrg  [How to feed a file listing to the archiver])
15362d19872aSmrg])# _LT_PROG_AR
15372d19872aSmrg
15382d19872aSmrg
15392d19872aSmrg# _LT_CMD_OLD_ARCHIVE
15402d19872aSmrg# -------------------
15412d19872aSmrgm4_defun([_LT_CMD_OLD_ARCHIVE],
15422d19872aSmrg[_LT_PROG_AR
15432d19872aSmrg
15442d19872aSmrgAC_CHECK_TOOL(STRIP, strip, :)
15452d19872aSmrgtest -z "$STRIP" && STRIP=:
15462d19872aSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
15472d19872aSmrg
15482d19872aSmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
15492d19872aSmrgtest -z "$RANLIB" && RANLIB=:
15502d19872aSmrg_LT_DECL([], [RANLIB], [1],
15512d19872aSmrg    [Commands used to install an old-style archive])
15522d19872aSmrg
15532d19872aSmrg# Determine commands to create old-style static archives.
15542d19872aSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
15552d19872aSmrgold_postinstall_cmds='chmod 644 $oldlib'
15562d19872aSmrgold_postuninstall_cmds=
15572d19872aSmrg
15582d19872aSmrgif test -n "$RANLIB"; then
15592d19872aSmrg  case $host_os in
15602d19872aSmrg  bitrig* | openbsd*)
15612d19872aSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
15622d19872aSmrg    ;;
15632d19872aSmrg  *)
15642d19872aSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
15652d19872aSmrg    ;;
15662d19872aSmrg  esac
15672d19872aSmrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
15682d19872aSmrgfi
15692d19872aSmrg
15702d19872aSmrgcase $host_os in
15712d19872aSmrg  darwin*)
15722d19872aSmrg    lock_old_archive_extraction=yes ;;
15732d19872aSmrg  *)
15742d19872aSmrg    lock_old_archive_extraction=no ;;
15752d19872aSmrgesac
15762d19872aSmrg_LT_DECL([], [old_postinstall_cmds], [2])
15772d19872aSmrg_LT_DECL([], [old_postuninstall_cmds], [2])
15782d19872aSmrg_LT_TAGDECL([], [old_archive_cmds], [2],
15792d19872aSmrg    [Commands used to build an old-style archive])
15802d19872aSmrg_LT_DECL([], [lock_old_archive_extraction], [0],
15812d19872aSmrg    [Whether to use a lock for old archive extraction])
15822d19872aSmrg])# _LT_CMD_OLD_ARCHIVE
15832d19872aSmrg
15842d19872aSmrg
15852d19872aSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
15862d19872aSmrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
15872d19872aSmrg# ----------------------------------------------------------------
15882d19872aSmrg# Check whether the given compiler option works
15892d19872aSmrgAC_DEFUN([_LT_COMPILER_OPTION],
15902d19872aSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
15912d19872aSmrgm4_require([_LT_DECL_SED])dnl
15922d19872aSmrgAC_CACHE_CHECK([$1], [$2],
15932d19872aSmrg  [$2=no
15942d19872aSmrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
15952d19872aSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
15962d19872aSmrg   lt_compiler_flag="$3"  ## exclude from sc_useless_quotes_in_assignment
15972d19872aSmrg   # Insert the option either (1) after the last *FLAGS variable, or
15982d19872aSmrg   # (2) before a word containing "conftest.", or (3) at the end.
15992d19872aSmrg   # Note that $ac_compile itself does not contain backslashes and begins
16002d19872aSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
16012d19872aSmrg   # The option is referenced via a variable to avoid confusing sed.
16022d19872aSmrg   lt_compile=`echo "$ac_compile" | $SED \
16032d19872aSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
16042d19872aSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
16052d19872aSmrg   -e 's:$: $lt_compiler_flag:'`
16062d19872aSmrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
16072d19872aSmrg   (eval "$lt_compile" 2>conftest.err)
16082d19872aSmrg   ac_status=$?
16092d19872aSmrg   cat conftest.err >&AS_MESSAGE_LOG_FD
16102d19872aSmrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
16112d19872aSmrg   if (exit $ac_status) && test -s "$ac_outfile"; then
16122d19872aSmrg     # The compiler can only warn and ignore the option if not recognized
16132d19872aSmrg     # So say no if there are warnings other than the usual output.
16142d19872aSmrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
16152d19872aSmrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
16162d19872aSmrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
16172d19872aSmrg       $2=yes
16182d19872aSmrg     fi
16192d19872aSmrg   fi
16202d19872aSmrg   $RM conftest*
16212d19872aSmrg])
16222d19872aSmrg
16232d19872aSmrgif test yes = "[$]$2"; then
16242d19872aSmrg    m4_if([$5], , :, [$5])
16252d19872aSmrgelse
16262d19872aSmrg    m4_if([$6], , :, [$6])
16272d19872aSmrgfi
16282d19872aSmrg])# _LT_COMPILER_OPTION
16292d19872aSmrg
16302d19872aSmrg# Old name:
16312d19872aSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
16322d19872aSmrgdnl aclocal-1.4 backwards compatibility:
16332d19872aSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
16342d19872aSmrg
16352d19872aSmrg
16362d19872aSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
16372d19872aSmrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
16382d19872aSmrg# ----------------------------------------------------
16392d19872aSmrg# Check whether the given linker option works
16402d19872aSmrgAC_DEFUN([_LT_LINKER_OPTION],
16412d19872aSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
16422d19872aSmrgm4_require([_LT_DECL_SED])dnl
16432d19872aSmrgAC_CACHE_CHECK([$1], [$2],
16442d19872aSmrg  [$2=no
16452d19872aSmrg   save_LDFLAGS=$LDFLAGS
16462d19872aSmrg   LDFLAGS="$LDFLAGS $3"
16472d19872aSmrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
16482d19872aSmrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
16492d19872aSmrg     # The linker can only warn and ignore the option if not recognized
16502d19872aSmrg     # So say no if there are warnings
16512d19872aSmrg     if test -s conftest.err; then
16522d19872aSmrg       # Append any errors to the config.log.
16532d19872aSmrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
16542d19872aSmrg       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
16552d19872aSmrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
16562d19872aSmrg       if diff conftest.exp conftest.er2 >/dev/null; then
16572d19872aSmrg         $2=yes
16582d19872aSmrg       fi
16592d19872aSmrg     else
16602d19872aSmrg       $2=yes
16612d19872aSmrg     fi
16622d19872aSmrg   fi
16632d19872aSmrg   $RM -r conftest*
16642d19872aSmrg   LDFLAGS=$save_LDFLAGS
16652d19872aSmrg])
16662d19872aSmrg
16672d19872aSmrgif test yes = "[$]$2"; then
16682d19872aSmrg    m4_if([$4], , :, [$4])
16692d19872aSmrgelse
16702d19872aSmrg    m4_if([$5], , :, [$5])
16712d19872aSmrgfi
16722d19872aSmrg])# _LT_LINKER_OPTION
16732d19872aSmrg
16742d19872aSmrg# Old name:
16752d19872aSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
16762d19872aSmrgdnl aclocal-1.4 backwards compatibility:
16772d19872aSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
16782d19872aSmrg
16792d19872aSmrg
16802d19872aSmrg# LT_CMD_MAX_LEN
16812d19872aSmrg#---------------
16822d19872aSmrgAC_DEFUN([LT_CMD_MAX_LEN],
16832d19872aSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
16842d19872aSmrg# find the maximum length of command line arguments
16852d19872aSmrgAC_MSG_CHECKING([the maximum length of command line arguments])
16862d19872aSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
16872d19872aSmrg  i=0
16882d19872aSmrg  teststring=ABCD
16892d19872aSmrg
16902d19872aSmrg  case $build_os in
16912d19872aSmrg  msdosdjgpp*)
16922d19872aSmrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
16932d19872aSmrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
16942d19872aSmrg    # during glob expansion).  Even if it were fixed, the result of this
16952d19872aSmrg    # check would be larger than it should be.
16962d19872aSmrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
16972d19872aSmrg    ;;
16982d19872aSmrg
16992d19872aSmrg  gnu*)
17002d19872aSmrg    # Under GNU Hurd, this test is not required because there is
17012d19872aSmrg    # no limit to the length of command line arguments.
17022d19872aSmrg    # Libtool will interpret -1 as no limit whatsoever
17032d19872aSmrg    lt_cv_sys_max_cmd_len=-1;
17042d19872aSmrg    ;;
17052d19872aSmrg
17062d19872aSmrg  cygwin* | mingw* | cegcc*)
17072d19872aSmrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
17082d19872aSmrg    # about 5 minutes as the teststring grows exponentially.
17092d19872aSmrg    # Worse, since 9x/ME are not pre-emptively multitasking,
17102d19872aSmrg    # you end up with a "frozen" computer, even though with patience
17112d19872aSmrg    # the test eventually succeeds (with a max line length of 256k).
17122d19872aSmrg    # Instead, let's just punt: use the minimum linelength reported by
17132d19872aSmrg    # all of the supported platforms: 8192 (on NT/2K/XP).
17142d19872aSmrg    lt_cv_sys_max_cmd_len=8192;
17152d19872aSmrg    ;;
17162d19872aSmrg
17172d19872aSmrg  mint*)
17182d19872aSmrg    # On MiNT this can take a long time and run out of memory.
17192d19872aSmrg    lt_cv_sys_max_cmd_len=8192;
17202d19872aSmrg    ;;
17212d19872aSmrg
17222d19872aSmrg  amigaos*)
17232d19872aSmrg    # On AmigaOS with pdksh, this test takes hours, literally.
17242d19872aSmrg    # So we just punt and use a minimum line length of 8192.
17252d19872aSmrg    lt_cv_sys_max_cmd_len=8192;
17262d19872aSmrg    ;;
17272d19872aSmrg
17282d19872aSmrg  bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
17292d19872aSmrg    # This has been around since 386BSD, at least.  Likely further.
17302d19872aSmrg    if test -x /sbin/sysctl; then
17312d19872aSmrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
17322d19872aSmrg    elif test -x /usr/sbin/sysctl; then
17332d19872aSmrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
17342d19872aSmrg    else
17352d19872aSmrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
17362d19872aSmrg    fi
17372d19872aSmrg    # And add a safety zone
17382d19872aSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
17392d19872aSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
17402d19872aSmrg    ;;
17412d19872aSmrg
17422d19872aSmrg  interix*)
17432d19872aSmrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
17442d19872aSmrg    lt_cv_sys_max_cmd_len=196608
17452d19872aSmrg    ;;
17462d19872aSmrg
17472d19872aSmrg  os2*)
17482d19872aSmrg    # The test takes a long time on OS/2.
17492d19872aSmrg    lt_cv_sys_max_cmd_len=8192
17502d19872aSmrg    ;;
17512d19872aSmrg
17522d19872aSmrg  osf*)
17532d19872aSmrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
17542d19872aSmrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
17552d19872aSmrg    # nice to cause kernel panics so lets avoid the loop below.
17562d19872aSmrg    # First set a reasonable default.
17572d19872aSmrg    lt_cv_sys_max_cmd_len=16384
17582d19872aSmrg    #
17592d19872aSmrg    if test -x /sbin/sysconfig; then
17602d19872aSmrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
17612d19872aSmrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
17622d19872aSmrg      esac
17632d19872aSmrg    fi
17642d19872aSmrg    ;;
17652d19872aSmrg  sco3.2v5*)
17662d19872aSmrg    lt_cv_sys_max_cmd_len=102400
17672d19872aSmrg    ;;
17682d19872aSmrg  sysv5* | sco5v6* | sysv4.2uw2*)
17692d19872aSmrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
17702d19872aSmrg    if test -n "$kargmax"; then
17712d19872aSmrg      lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[	 ]]//'`
17722d19872aSmrg    else
17732d19872aSmrg      lt_cv_sys_max_cmd_len=32768
17742d19872aSmrg    fi
17752d19872aSmrg    ;;
17762d19872aSmrg  *)
17772d19872aSmrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
17782d19872aSmrg    if test -n "$lt_cv_sys_max_cmd_len" && \
17792d19872aSmrg       test undefined != "$lt_cv_sys_max_cmd_len"; then
17802d19872aSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
17812d19872aSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
17822d19872aSmrg    else
17832d19872aSmrg      # Make teststring a little bigger before we do anything with it.
17842d19872aSmrg      # a 1K string should be a reasonable start.
17852d19872aSmrg      for i in 1 2 3 4 5 6 7 8; do
17862d19872aSmrg        teststring=$teststring$teststring
17872d19872aSmrg      done
17882d19872aSmrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
17892d19872aSmrg      # If test is not a shell built-in, we'll probably end up computing a
17902d19872aSmrg      # maximum length that is only half of the actual maximum length, but
17912d19872aSmrg      # we can't tell.
17922d19872aSmrg      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
17932d19872aSmrg	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
17942d19872aSmrg	      test 17 != "$i" # 1/2 MB should be enough
17952d19872aSmrg      do
17962d19872aSmrg        i=`expr $i + 1`
17972d19872aSmrg        teststring=$teststring$teststring
17982d19872aSmrg      done
17992d19872aSmrg      # Only check the string length outside the loop.
18002d19872aSmrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
18012d19872aSmrg      teststring=
18022d19872aSmrg      # Add a significant safety factor because C++ compilers can tack on
18032d19872aSmrg      # massive amounts of additional arguments before passing them to the
18042d19872aSmrg      # linker.  It appears as though 1/2 is a usable value.
18052d19872aSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
18062d19872aSmrg    fi
18072d19872aSmrg    ;;
18082d19872aSmrg  esac
18092d19872aSmrg])
18102d19872aSmrgif test -n "$lt_cv_sys_max_cmd_len"; then
18112d19872aSmrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
18122d19872aSmrgelse
18132d19872aSmrg  AC_MSG_RESULT(none)
18142d19872aSmrgfi
18152d19872aSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len
18162d19872aSmrg_LT_DECL([], [max_cmd_len], [0],
18172d19872aSmrg    [What is the maximum length of a command?])
18182d19872aSmrg])# LT_CMD_MAX_LEN
18192d19872aSmrg
18202d19872aSmrg# Old name:
18212d19872aSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
18222d19872aSmrgdnl aclocal-1.4 backwards compatibility:
18232d19872aSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
18242d19872aSmrg
18252d19872aSmrg
18262d19872aSmrg# _LT_HEADER_DLFCN
18272d19872aSmrg# ----------------
18282d19872aSmrgm4_defun([_LT_HEADER_DLFCN],
18292d19872aSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
18302d19872aSmrg])# _LT_HEADER_DLFCN
18312d19872aSmrg
18322d19872aSmrg
18332d19872aSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
18342d19872aSmrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
18352d19872aSmrg# ----------------------------------------------------------------
18362d19872aSmrgm4_defun([_LT_TRY_DLOPEN_SELF],
18372d19872aSmrg[m4_require([_LT_HEADER_DLFCN])dnl
18382d19872aSmrgif test yes = "$cross_compiling"; then :
18392d19872aSmrg  [$4]
18402d19872aSmrgelse
18412d19872aSmrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
18422d19872aSmrg  lt_status=$lt_dlunknown
18432d19872aSmrg  cat > conftest.$ac_ext <<_LT_EOF
18442d19872aSmrg[#line $LINENO "configure"
18452d19872aSmrg#include "confdefs.h"
18462d19872aSmrg
18472d19872aSmrg#if HAVE_DLFCN_H
18482d19872aSmrg#include <dlfcn.h>
18492d19872aSmrg#endif
18502d19872aSmrg
18512d19872aSmrg#include <stdio.h>
18522d19872aSmrg
18532d19872aSmrg#ifdef RTLD_GLOBAL
18542d19872aSmrg#  define LT_DLGLOBAL		RTLD_GLOBAL
18552d19872aSmrg#else
18562d19872aSmrg#  ifdef DL_GLOBAL
18572d19872aSmrg#    define LT_DLGLOBAL		DL_GLOBAL
18582d19872aSmrg#  else
18592d19872aSmrg#    define LT_DLGLOBAL		0
18602d19872aSmrg#  endif
18612d19872aSmrg#endif
18622d19872aSmrg
18632d19872aSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
18642d19872aSmrg   find out it does not work in some platform. */
18652d19872aSmrg#ifndef LT_DLLAZY_OR_NOW
18662d19872aSmrg#  ifdef RTLD_LAZY
18672d19872aSmrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
18682d19872aSmrg#  else
18692d19872aSmrg#    ifdef DL_LAZY
18702d19872aSmrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
18712d19872aSmrg#    else
18722d19872aSmrg#      ifdef RTLD_NOW
18732d19872aSmrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
18742d19872aSmrg#      else
18752d19872aSmrg#        ifdef DL_NOW
18762d19872aSmrg#          define LT_DLLAZY_OR_NOW	DL_NOW
18772d19872aSmrg#        else
18782d19872aSmrg#          define LT_DLLAZY_OR_NOW	0
18792d19872aSmrg#        endif
18802d19872aSmrg#      endif
18812d19872aSmrg#    endif
18822d19872aSmrg#  endif
18832d19872aSmrg#endif
18842d19872aSmrg
18852d19872aSmrg/* When -fvisibility=hidden is used, assume the code has been annotated
18862d19872aSmrg   correspondingly for the symbols needed.  */
18872d19872aSmrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
18882d19872aSmrgint fnord () __attribute__((visibility("default")));
18892d19872aSmrg#endif
18902d19872aSmrg
18912d19872aSmrgint fnord () { return 42; }
18922d19872aSmrgint main ()
18932d19872aSmrg{
18942d19872aSmrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
18952d19872aSmrg  int status = $lt_dlunknown;
18962d19872aSmrg
18972d19872aSmrg  if (self)
18982d19872aSmrg    {
18992d19872aSmrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
19002d19872aSmrg      else
19012d19872aSmrg        {
19022d19872aSmrg	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
19032d19872aSmrg          else puts (dlerror ());
19042d19872aSmrg	}
19052d19872aSmrg      /* dlclose (self); */
19062d19872aSmrg    }
19072d19872aSmrg  else
19082d19872aSmrg    puts (dlerror ());
19092d19872aSmrg
19102d19872aSmrg  return status;
19112d19872aSmrg}]
19122d19872aSmrg_LT_EOF
19132d19872aSmrg  if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
19142d19872aSmrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
19152d19872aSmrg    lt_status=$?
19162d19872aSmrg    case x$lt_status in
19172d19872aSmrg      x$lt_dlno_uscore) $1 ;;
19182d19872aSmrg      x$lt_dlneed_uscore) $2 ;;
19192d19872aSmrg      x$lt_dlunknown|x*) $3 ;;
19202d19872aSmrg    esac
19212d19872aSmrg  else :
19222d19872aSmrg    # compilation failed
19232d19872aSmrg    $3
19242d19872aSmrg  fi
19252d19872aSmrgfi
19262d19872aSmrgrm -fr conftest*
19272d19872aSmrg])# _LT_TRY_DLOPEN_SELF
19282d19872aSmrg
19292d19872aSmrg
19302d19872aSmrg# LT_SYS_DLOPEN_SELF
19312d19872aSmrg# ------------------
19322d19872aSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
19332d19872aSmrg[m4_require([_LT_HEADER_DLFCN])dnl
19342d19872aSmrgif test yes != "$enable_dlopen"; then
19352d19872aSmrg  enable_dlopen=unknown
19362d19872aSmrg  enable_dlopen_self=unknown
19372d19872aSmrg  enable_dlopen_self_static=unknown
19382d19872aSmrgelse
19392d19872aSmrg  lt_cv_dlopen=no
19402d19872aSmrg  lt_cv_dlopen_libs=
19412d19872aSmrg
19422d19872aSmrg  case $host_os in
19432d19872aSmrg  beos*)
19442d19872aSmrg    lt_cv_dlopen=load_add_on
19452d19872aSmrg    lt_cv_dlopen_libs=
19462d19872aSmrg    lt_cv_dlopen_self=yes
19472d19872aSmrg    ;;
19482d19872aSmrg
19492d19872aSmrg  mingw* | pw32* | cegcc*)
19502d19872aSmrg    lt_cv_dlopen=LoadLibrary
19512d19872aSmrg    lt_cv_dlopen_libs=
19522d19872aSmrg    ;;
19532d19872aSmrg
19542d19872aSmrg  cygwin*)
19552d19872aSmrg    lt_cv_dlopen=dlopen
19562d19872aSmrg    lt_cv_dlopen_libs=
19572d19872aSmrg    ;;
19582d19872aSmrg
19592d19872aSmrg  darwin*)
19602d19872aSmrg    # if libdl is installed we need to link against it
19612d19872aSmrg    AC_CHECK_LIB([dl], [dlopen],
19622d19872aSmrg		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
19632d19872aSmrg    lt_cv_dlopen=dyld
19642d19872aSmrg    lt_cv_dlopen_libs=
19652d19872aSmrg    lt_cv_dlopen_self=yes
19662d19872aSmrg    ])
19672d19872aSmrg    ;;
19682d19872aSmrg
19692d19872aSmrg  tpf*)
19702d19872aSmrg    # Don't try to run any link tests for TPF.  We know it's impossible
19712d19872aSmrg    # because TPF is a cross-compiler, and we know how we open DSOs.
19722d19872aSmrg    lt_cv_dlopen=dlopen
19732d19872aSmrg    lt_cv_dlopen_libs=
19742d19872aSmrg    lt_cv_dlopen_self=no
19752d19872aSmrg    ;;
19762d19872aSmrg
19772d19872aSmrg  *)
19782d19872aSmrg    AC_CHECK_FUNC([shl_load],
19792d19872aSmrg	  [lt_cv_dlopen=shl_load],
19802d19872aSmrg      [AC_CHECK_LIB([dld], [shl_load],
19812d19872aSmrg	    [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
19822d19872aSmrg	[AC_CHECK_FUNC([dlopen],
19832d19872aSmrg	      [lt_cv_dlopen=dlopen],
19842d19872aSmrg	  [AC_CHECK_LIB([dl], [dlopen],
19852d19872aSmrg		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
19862d19872aSmrg	    [AC_CHECK_LIB([svld], [dlopen],
19872d19872aSmrg		  [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
19882d19872aSmrg	      [AC_CHECK_LIB([dld], [dld_link],
19892d19872aSmrg		    [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
19902d19872aSmrg	      ])
19912d19872aSmrg	    ])
19922d19872aSmrg	  ])
19932d19872aSmrg	])
19942d19872aSmrg      ])
19952d19872aSmrg    ;;
19962d19872aSmrg  esac
19972d19872aSmrg
19982d19872aSmrg  if test no = "$lt_cv_dlopen"; then
19992d19872aSmrg    enable_dlopen=no
20002d19872aSmrg  else
20012d19872aSmrg    enable_dlopen=yes
20022d19872aSmrg  fi
20032d19872aSmrg
20042d19872aSmrg  case $lt_cv_dlopen in
20052d19872aSmrg  dlopen)
20062d19872aSmrg    save_CPPFLAGS=$CPPFLAGS
20072d19872aSmrg    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
20082d19872aSmrg
20092d19872aSmrg    save_LDFLAGS=$LDFLAGS
20102d19872aSmrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
20112d19872aSmrg
20122d19872aSmrg    save_LIBS=$LIBS
20132d19872aSmrg    LIBS="$lt_cv_dlopen_libs $LIBS"
20142d19872aSmrg
20152d19872aSmrg    AC_CACHE_CHECK([whether a program can dlopen itself],
20162d19872aSmrg	  lt_cv_dlopen_self, [dnl
20172d19872aSmrg	  _LT_TRY_DLOPEN_SELF(
20182d19872aSmrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
20192d19872aSmrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
20202d19872aSmrg    ])
20212d19872aSmrg
20222d19872aSmrg    if test yes = "$lt_cv_dlopen_self"; then
20232d19872aSmrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
20242d19872aSmrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
20252d19872aSmrg	  lt_cv_dlopen_self_static, [dnl
20262d19872aSmrg	  _LT_TRY_DLOPEN_SELF(
20272d19872aSmrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
20282d19872aSmrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
20292d19872aSmrg      ])
20302d19872aSmrg    fi
20312d19872aSmrg
20322d19872aSmrg    CPPFLAGS=$save_CPPFLAGS
20332d19872aSmrg    LDFLAGS=$save_LDFLAGS
20342d19872aSmrg    LIBS=$save_LIBS
20352d19872aSmrg    ;;
20362d19872aSmrg  esac
20372d19872aSmrg
20382d19872aSmrg  case $lt_cv_dlopen_self in
20392d19872aSmrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
20402d19872aSmrg  *) enable_dlopen_self=unknown ;;
20412d19872aSmrg  esac
20422d19872aSmrg
20432d19872aSmrg  case $lt_cv_dlopen_self_static in
20442d19872aSmrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
20452d19872aSmrg  *) enable_dlopen_self_static=unknown ;;
20462d19872aSmrg  esac
20472d19872aSmrgfi
20482d19872aSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
20492d19872aSmrg	 [Whether dlopen is supported])
20502d19872aSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
20512d19872aSmrg	 [Whether dlopen of programs is supported])
20522d19872aSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
20532d19872aSmrg	 [Whether dlopen of statically linked programs is supported])
20542d19872aSmrg])# LT_SYS_DLOPEN_SELF
20552d19872aSmrg
20562d19872aSmrg# Old name:
20572d19872aSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
20582d19872aSmrgdnl aclocal-1.4 backwards compatibility:
20592d19872aSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
20602d19872aSmrg
20612d19872aSmrg
20622d19872aSmrg# _LT_COMPILER_C_O([TAGNAME])
20632d19872aSmrg# ---------------------------
20642d19872aSmrg# Check to see if options -c and -o are simultaneously supported by compiler.
20652d19872aSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
20662d19872aSmrgm4_defun([_LT_COMPILER_C_O],
20672d19872aSmrg[m4_require([_LT_DECL_SED])dnl
20682d19872aSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
20692d19872aSmrgm4_require([_LT_TAG_COMPILER])dnl
20702d19872aSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
20712d19872aSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
20722d19872aSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
20732d19872aSmrg   $RM -r conftest 2>/dev/null
20742d19872aSmrg   mkdir conftest
20752d19872aSmrg   cd conftest
20762d19872aSmrg   mkdir out
20772d19872aSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
20782d19872aSmrg
20792d19872aSmrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
20802d19872aSmrg   # Insert the option either (1) after the last *FLAGS variable, or
20812d19872aSmrg   # (2) before a word containing "conftest.", or (3) at the end.
20822d19872aSmrg   # Note that $ac_compile itself does not contain backslashes and begins
20832d19872aSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
20842d19872aSmrg   lt_compile=`echo "$ac_compile" | $SED \
20852d19872aSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
20862d19872aSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
20872d19872aSmrg   -e 's:$: $lt_compiler_flag:'`
20882d19872aSmrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
20892d19872aSmrg   (eval "$lt_compile" 2>out/conftest.err)
20902d19872aSmrg   ac_status=$?
20912d19872aSmrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
20922d19872aSmrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
20932d19872aSmrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
20942d19872aSmrg   then
20952d19872aSmrg     # The compiler can only warn and ignore the option if not recognized
20962d19872aSmrg     # So say no if there are warnings
20972d19872aSmrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
20982d19872aSmrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
20992d19872aSmrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
21002d19872aSmrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
21012d19872aSmrg     fi
21022d19872aSmrg   fi
21032d19872aSmrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
21042d19872aSmrg   $RM conftest*
21052d19872aSmrg   # SGI C++ compiler will create directory out/ii_files/ for
21062d19872aSmrg   # template instantiation
21072d19872aSmrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
21082d19872aSmrg   $RM out/* && rmdir out
21092d19872aSmrg   cd ..
21102d19872aSmrg   $RM -r conftest
21112d19872aSmrg   $RM conftest*
21122d19872aSmrg])
21132d19872aSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
21142d19872aSmrg	[Does compiler simultaneously support -c and -o options?])
21152d19872aSmrg])# _LT_COMPILER_C_O
21162d19872aSmrg
21172d19872aSmrg
21182d19872aSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
21192d19872aSmrg# ----------------------------------
21202d19872aSmrg# Check to see if we can do hard links to lock some files if needed
21212d19872aSmrgm4_defun([_LT_COMPILER_FILE_LOCKS],
21222d19872aSmrg[m4_require([_LT_ENABLE_LOCK])dnl
21232d19872aSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
21242d19872aSmrg_LT_COMPILER_C_O([$1])
21252d19872aSmrg
21262d19872aSmrghard_links=nottested
21272d19872aSmrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
21282d19872aSmrg  # do not overwrite the value of need_locks provided by the user
21292d19872aSmrg  AC_MSG_CHECKING([if we can lock with hard links])
21302d19872aSmrg  hard_links=yes
21312d19872aSmrg  $RM conftest*
21322d19872aSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
21332d19872aSmrg  touch conftest.a
21342d19872aSmrg  ln conftest.a conftest.b 2>&5 || hard_links=no
21352d19872aSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
21362d19872aSmrg  AC_MSG_RESULT([$hard_links])
21372d19872aSmrg  if test no = "$hard_links"; then
21382d19872aSmrg    AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
21392d19872aSmrg    need_locks=warn
21402d19872aSmrg  fi
21412d19872aSmrgelse
21422d19872aSmrg  need_locks=no
21432d19872aSmrgfi
21442d19872aSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
21452d19872aSmrg])# _LT_COMPILER_FILE_LOCKS
21462d19872aSmrg
21472d19872aSmrg
21482d19872aSmrg# _LT_CHECK_OBJDIR
21492d19872aSmrg# ----------------
21502d19872aSmrgm4_defun([_LT_CHECK_OBJDIR],
21512d19872aSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
21522d19872aSmrg[rm -f .libs 2>/dev/null
21532d19872aSmrgmkdir .libs 2>/dev/null
21542d19872aSmrgif test -d .libs; then
21552d19872aSmrg  lt_cv_objdir=.libs
21562d19872aSmrgelse
21572d19872aSmrg  # MS-DOS does not allow filenames that begin with a dot.
21582d19872aSmrg  lt_cv_objdir=_libs
21592d19872aSmrgfi
21602d19872aSmrgrmdir .libs 2>/dev/null])
21612d19872aSmrgobjdir=$lt_cv_objdir
21622d19872aSmrg_LT_DECL([], [objdir], [0],
21632d19872aSmrg         [The name of the directory that contains temporary libtool files])dnl
21642d19872aSmrgm4_pattern_allow([LT_OBJDIR])dnl
21652d19872aSmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
21662d19872aSmrg  [Define to the sub-directory where libtool stores uninstalled libraries.])
21672d19872aSmrg])# _LT_CHECK_OBJDIR
21682d19872aSmrg
21692d19872aSmrg
21702d19872aSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
21712d19872aSmrg# --------------------------------------
21722d19872aSmrg# Check hardcoding attributes.
21732d19872aSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
21742d19872aSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
21752d19872aSmrg_LT_TAGVAR(hardcode_action, $1)=
21762d19872aSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
21772d19872aSmrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
21782d19872aSmrg   test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
21792d19872aSmrg
21802d19872aSmrg  # We can hardcode non-existent directories.
21812d19872aSmrg  if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
21822d19872aSmrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
21832d19872aSmrg     # have to relink, otherwise we might link with an installed library
21842d19872aSmrg     # when we should be linking with a yet-to-be-installed one
21852d19872aSmrg     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
21862d19872aSmrg     test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
21872d19872aSmrg    # Linking always hardcodes the temporary library directory.
21882d19872aSmrg    _LT_TAGVAR(hardcode_action, $1)=relink
21892d19872aSmrg  else
21902d19872aSmrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
21912d19872aSmrg    _LT_TAGVAR(hardcode_action, $1)=immediate
21922d19872aSmrg  fi
21932d19872aSmrgelse
21942d19872aSmrg  # We cannot hardcode anything, or else we can only hardcode existing
21952d19872aSmrg  # directories.
21962d19872aSmrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
21972d19872aSmrgfi
21982d19872aSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
21992d19872aSmrg
22002d19872aSmrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
22012d19872aSmrg   test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
22022d19872aSmrg  # Fast installation is not supported
22032d19872aSmrg  enable_fast_install=no
22042d19872aSmrgelif test yes = "$shlibpath_overrides_runpath" ||
22052d19872aSmrg     test no = "$enable_shared"; then
22062d19872aSmrg  # Fast installation is not necessary
22072d19872aSmrg  enable_fast_install=needless
22082d19872aSmrgfi
22092d19872aSmrg_LT_TAGDECL([], [hardcode_action], [0],
22102d19872aSmrg    [How to hardcode a shared library path into an executable])
22112d19872aSmrg])# _LT_LINKER_HARDCODE_LIBPATH
22122d19872aSmrg
22132d19872aSmrg
22142d19872aSmrg# _LT_CMD_STRIPLIB
22152d19872aSmrg# ----------------
22162d19872aSmrgm4_defun([_LT_CMD_STRIPLIB],
22172d19872aSmrg[m4_require([_LT_DECL_EGREP])
22182d19872aSmrgstriplib=
22192d19872aSmrgold_striplib=
22202d19872aSmrgAC_MSG_CHECKING([whether stripping libraries is possible])
22212d19872aSmrgif test -z "$STRIP"; then
22222d19872aSmrg  AC_MSG_RESULT([no])
22232d19872aSmrgelse
22242d19872aSmrg  if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
22252d19872aSmrg    old_striplib="$STRIP --strip-debug"
22262d19872aSmrg    striplib="$STRIP --strip-unneeded"
22272d19872aSmrg    AC_MSG_RESULT([yes])
22282d19872aSmrg  else
22292d19872aSmrg    case $host_os in
22302d19872aSmrg    darwin*)
22312d19872aSmrg      # FIXME - insert some real tests, host_os isn't really good enough
22322d19872aSmrg      striplib="$STRIP -x"
22332d19872aSmrg      old_striplib="$STRIP -S"
22342d19872aSmrg      AC_MSG_RESULT([yes])
22352d19872aSmrg      ;;
22362d19872aSmrg    freebsd*)
22372d19872aSmrg      if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
22382d19872aSmrg        old_striplib="$STRIP --strip-debug"
22392d19872aSmrg        striplib="$STRIP --strip-unneeded"
22402d19872aSmrg        AC_MSG_RESULT([yes])
22412d19872aSmrg      else
22422d19872aSmrg        AC_MSG_RESULT([no])
22432d19872aSmrg      fi
22442d19872aSmrg      ;;
22452d19872aSmrg    *)
22462d19872aSmrg      AC_MSG_RESULT([no])
22472d19872aSmrg      ;;
22482d19872aSmrg    esac
22492d19872aSmrg  fi
22502d19872aSmrgfi
22512d19872aSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
22522d19872aSmrg_LT_DECL([], [striplib], [1])
22532d19872aSmrg])# _LT_CMD_STRIPLIB
22542d19872aSmrg
22552d19872aSmrg
22562d19872aSmrg# _LT_PREPARE_MUNGE_PATH_LIST
22572d19872aSmrg# ---------------------------
22582d19872aSmrg# Make sure func_munge_path_list() is defined correctly.
22592d19872aSmrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
22602d19872aSmrg[[# func_munge_path_list VARIABLE PATH
22612d19872aSmrg# -----------------------------------
22622d19872aSmrg# VARIABLE is name of variable containing _space_ separated list of
22632d19872aSmrg# directories to be munged by the contents of PATH, which is string
22642d19872aSmrg# having a format:
22652d19872aSmrg# "DIR[:DIR]:"
22662d19872aSmrg#       string "DIR[ DIR]" will be prepended to VARIABLE
22672d19872aSmrg# ":DIR[:DIR]"
22682d19872aSmrg#       string "DIR[ DIR]" will be appended to VARIABLE
22692d19872aSmrg# "DIRP[:DIRP]::[DIRA:]DIRA"
22702d19872aSmrg#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
22712d19872aSmrg#       "DIRA[ DIRA]" will be appended to VARIABLE
22722d19872aSmrg# "DIR[:DIR]"
22732d19872aSmrg#       VARIABLE will be replaced by "DIR[ DIR]"
22742d19872aSmrgfunc_munge_path_list ()
22752d19872aSmrg{
22762d19872aSmrg    case x@S|@2 in
22772d19872aSmrg    x)
22782d19872aSmrg        ;;
22792d19872aSmrg    *:)
22802d19872aSmrg        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
22812d19872aSmrg        ;;
22822d19872aSmrg    x:*)
22832d19872aSmrg        eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
22842d19872aSmrg        ;;
22852d19872aSmrg    *::*)
22862d19872aSmrg        eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
22872d19872aSmrg        eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
22882d19872aSmrg        ;;
22892d19872aSmrg    *)
22902d19872aSmrg        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
22912d19872aSmrg        ;;
22922d19872aSmrg    esac
22932d19872aSmrg}
22942d19872aSmrg]])# _LT_PREPARE_PATH_LIST
22952d19872aSmrg
22962d19872aSmrg
22972d19872aSmrg# _LT_SYS_DYNAMIC_LINKER([TAG])
22982d19872aSmrg# -----------------------------
22992d19872aSmrg# PORTME Fill in your ld.so characteristics
23002d19872aSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
23012d19872aSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
23022d19872aSmrgm4_require([_LT_DECL_EGREP])dnl
23032d19872aSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
23042d19872aSmrgm4_require([_LT_DECL_OBJDUMP])dnl
23052d19872aSmrgm4_require([_LT_DECL_SED])dnl
23062d19872aSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
23072d19872aSmrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
23082d19872aSmrgAC_MSG_CHECKING([dynamic linker characteristics])
23092d19872aSmrgm4_if([$1],
23102d19872aSmrg	[], [
23112d19872aSmrgif test yes = "$GCC"; then
23122d19872aSmrg  case $host_os in
23132d19872aSmrg    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
23142d19872aSmrg    *) lt_awk_arg='/^libraries:/' ;;
23152d19872aSmrg  esac
23162d19872aSmrg  case $host_os in
23172d19872aSmrg    mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
23182d19872aSmrg    *) lt_sed_strip_eq='s|=/|/|g' ;;
23192d19872aSmrg  esac
23202d19872aSmrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
23212d19872aSmrg  case $lt_search_path_spec in
23222d19872aSmrg  *\;*)
23232d19872aSmrg    # if the path contains ";" then we assume it to be the separator
23242d19872aSmrg    # otherwise default to the standard path separator (i.e. ":") - it is
23252d19872aSmrg    # assumed that no part of a normal pathname contains ";" but that should
23262d19872aSmrg    # okay in the real world where ";" in dirpaths is itself problematic.
23272d19872aSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
23282d19872aSmrg    ;;
23292d19872aSmrg  *)
23302d19872aSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
23312d19872aSmrg    ;;
23322d19872aSmrg  esac
23332d19872aSmrg  # Ok, now we have the path, separated by spaces, we can step through it
23342d19872aSmrg  # and add multilib dir if necessary...
23352d19872aSmrg  lt_tmp_lt_search_path_spec=
23362d19872aSmrg  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
23372d19872aSmrg  # ...but if some path component already ends with the multilib dir we assume
23382d19872aSmrg  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
23392d19872aSmrg  case "$lt_multi_os_dir; $lt_search_path_spec " in
23402d19872aSmrg  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
23412d19872aSmrg    lt_multi_os_dir=
23422d19872aSmrg    ;;
23432d19872aSmrg  esac
23442d19872aSmrg  for lt_sys_path in $lt_search_path_spec; do
23452d19872aSmrg    if test -d "$lt_sys_path$lt_multi_os_dir"; then
23462d19872aSmrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
23472d19872aSmrg    elif test -n "$lt_multi_os_dir"; then
23482d19872aSmrg      test -d "$lt_sys_path" && \
23492d19872aSmrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
23502d19872aSmrg    fi
23512d19872aSmrg  done
23522d19872aSmrg  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
23532d19872aSmrgBEGIN {RS = " "; FS = "/|\n";} {
23542d19872aSmrg  lt_foo = "";
23552d19872aSmrg  lt_count = 0;
23562d19872aSmrg  for (lt_i = NF; lt_i > 0; lt_i--) {
23572d19872aSmrg    if ($lt_i != "" && $lt_i != ".") {
23582d19872aSmrg      if ($lt_i == "..") {
23592d19872aSmrg        lt_count++;
23602d19872aSmrg      } else {
23612d19872aSmrg        if (lt_count == 0) {
23622d19872aSmrg          lt_foo = "/" $lt_i lt_foo;
23632d19872aSmrg        } else {
23642d19872aSmrg          lt_count--;
23652d19872aSmrg        }
23662d19872aSmrg      }
23672d19872aSmrg    }
23682d19872aSmrg  }
23692d19872aSmrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
23702d19872aSmrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
23712d19872aSmrg}'`
23722d19872aSmrg  # AWK program above erroneously prepends '/' to C:/dos/paths
23732d19872aSmrg  # for these hosts.
23742d19872aSmrg  case $host_os in
23752d19872aSmrg    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
23762d19872aSmrg      $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
23772d19872aSmrg  esac
23782d19872aSmrg  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
23792d19872aSmrgelse
23802d19872aSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
23812d19872aSmrgfi])
23822d19872aSmrglibrary_names_spec=
23832d19872aSmrglibname_spec='lib$name'
23842d19872aSmrgsoname_spec=
23852d19872aSmrgshrext_cmds=.so
23862d19872aSmrgpostinstall_cmds=
23872d19872aSmrgpostuninstall_cmds=
23882d19872aSmrgfinish_cmds=
23892d19872aSmrgfinish_eval=
23902d19872aSmrgshlibpath_var=
23912d19872aSmrgshlibpath_overrides_runpath=unknown
23922d19872aSmrgversion_type=none
23932d19872aSmrgdynamic_linker="$host_os ld.so"
23942d19872aSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
23952d19872aSmrgneed_lib_prefix=unknown
23962d19872aSmrghardcode_into_libs=no
23972d19872aSmrg
23982d19872aSmrg# when you set need_version to no, make sure it does not cause -set_version
23992d19872aSmrg# flags to be left without arguments
24002d19872aSmrgneed_version=unknown
24012d19872aSmrg
24022d19872aSmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH],
24032d19872aSmrg[User-defined run-time library search path.])
24042d19872aSmrg
24052d19872aSmrgcase $host_os in
24062d19872aSmrgaix3*)
24072d19872aSmrg  version_type=linux # correct to gnu/linux during the next big refactor
24082d19872aSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
24092d19872aSmrg  shlibpath_var=LIBPATH
24102d19872aSmrg
24112d19872aSmrg  # AIX 3 has no versioning support, so we append a major version to the name.
24122d19872aSmrg  soname_spec='$libname$release$shared_ext$major'
24132d19872aSmrg  ;;
24142d19872aSmrg
24152d19872aSmrgaix[[4-9]]*)
24162d19872aSmrg  version_type=linux # correct to gnu/linux during the next big refactor
24172d19872aSmrg  need_lib_prefix=no
24182d19872aSmrg  need_version=no
24192d19872aSmrg  hardcode_into_libs=yes
24202d19872aSmrg  if test ia64 = "$host_cpu"; then
24212d19872aSmrg    # AIX 5 supports IA64
24222d19872aSmrg    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
24232d19872aSmrg    shlibpath_var=LD_LIBRARY_PATH
24242d19872aSmrg  else
24252d19872aSmrg    # With GCC up to 2.95.x, collect2 would create an import file
24262d19872aSmrg    # for dependence libraries.  The import file would start with
24272d19872aSmrg    # the line '#! .'.  This would cause the generated library to
24282d19872aSmrg    # depend on '.', always an invalid library.  This was fixed in
24292d19872aSmrg    # development snapshots of GCC prior to 3.0.
24302d19872aSmrg    case $host_os in
24312d19872aSmrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
24322d19872aSmrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
24332d19872aSmrg	   echo ' yes '
24342d19872aSmrg	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
24352d19872aSmrg	:
24362d19872aSmrg      else
24372d19872aSmrg	can_build_shared=no
24382d19872aSmrg      fi
24392d19872aSmrg      ;;
24402d19872aSmrg    esac
24412d19872aSmrg    # Using Import Files as archive members, it is possible to support
24422d19872aSmrg    # filename-based versioning of shared library archives on AIX. While
24432d19872aSmrg    # this would work for both with and without runtime linking, it will
24442d19872aSmrg    # prevent static linking of such archives. So we do filename-based
24452d19872aSmrg    # shared library versioning with .so extension only, which is used
24462d19872aSmrg    # when both runtime linking and shared linking is enabled.
24472d19872aSmrg    # Unfortunately, runtime linking may impact performance, so we do
24482d19872aSmrg    # not want this to be the default eventually. Also, we use the
24492d19872aSmrg    # versioned .so libs for executables only if there is the -brtl
24502d19872aSmrg    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
24512d19872aSmrg    # To allow for filename-based versioning support, we need to create
24522d19872aSmrg    # libNAME.so.V as an archive file, containing:
24532d19872aSmrg    # *) an Import File, referring to the versioned filename of the
24542d19872aSmrg    #    archive as well as the shared archive member, telling the
24552d19872aSmrg    #    bitwidth (32 or 64) of that shared object, and providing the
24562d19872aSmrg    #    list of exported symbols of that shared object, eventually
24572d19872aSmrg    #    decorated with the 'weak' keyword
24582d19872aSmrg    # *) the shared object with the F_LOADONLY flag set, to really avoid
24592d19872aSmrg    #    it being seen by the linker.
24602d19872aSmrg    # At run time we better use the real file rather than another symlink,
24612d19872aSmrg    # but for link time we create the symlink libNAME.so -> libNAME.so.V
24622d19872aSmrg
24632d19872aSmrg    case $with_aix_soname,$aix_use_runtimelinking in
24642d19872aSmrg    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
24652d19872aSmrg    # soname into executable. Probably we can add versioning support to
24662d19872aSmrg    # collect2, so additional links can be useful in future.
24672d19872aSmrg    aix,yes) # traditional libtool
24682d19872aSmrg      dynamic_linker='AIX unversionable lib.so'
24692d19872aSmrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
24702d19872aSmrg      # instead of lib<name>.a to let people know that these are not
24712d19872aSmrg      # typical AIX shared libraries.
24722d19872aSmrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
24732d19872aSmrg      ;;
24742d19872aSmrg    aix,no) # traditional AIX only
24752d19872aSmrg      dynamic_linker='AIX lib.a[(]lib.so.V[)]'
24762d19872aSmrg      # We preserve .a as extension for shared libraries through AIX4.2
24772d19872aSmrg      # and later when we are not doing run time linking.
24782d19872aSmrg      library_names_spec='$libname$release.a $libname.a'
24792d19872aSmrg      soname_spec='$libname$release$shared_ext$major'
24802d19872aSmrg      ;;
24812d19872aSmrg    svr4,*) # full svr4 only
24822d19872aSmrg      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
24832d19872aSmrg      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
24842d19872aSmrg      # We do not specify a path in Import Files, so LIBPATH fires.
24852d19872aSmrg      shlibpath_overrides_runpath=yes
24862d19872aSmrg      ;;
24872d19872aSmrg    *,yes) # both, prefer svr4
24882d19872aSmrg      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
24892d19872aSmrg      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
24902d19872aSmrg      # unpreferred sharedlib libNAME.a needs extra handling
24912d19872aSmrg      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"'
24922d19872aSmrg      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"'
24932d19872aSmrg      # We do not specify a path in Import Files, so LIBPATH fires.
24942d19872aSmrg      shlibpath_overrides_runpath=yes
24952d19872aSmrg      ;;
24962d19872aSmrg    *,no) # both, prefer aix
24972d19872aSmrg      dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
24982d19872aSmrg      library_names_spec='$libname$release.a $libname.a'
24992d19872aSmrg      soname_spec='$libname$release$shared_ext$major'
25002d19872aSmrg      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
25012d19872aSmrg      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)'
25022d19872aSmrg      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"'
25032d19872aSmrg      ;;
25042d19872aSmrg    esac
25052d19872aSmrg    shlibpath_var=LIBPATH
25062d19872aSmrg  fi
25072d19872aSmrg  ;;
25082d19872aSmrg
25092d19872aSmrgamigaos*)
25102d19872aSmrg  case $host_cpu in
25112d19872aSmrg  powerpc)
25122d19872aSmrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
25132d19872aSmrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
25142d19872aSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
25152d19872aSmrg    ;;
25162d19872aSmrg  m68k)
25172d19872aSmrg    library_names_spec='$libname.ixlibrary $libname.a'
25182d19872aSmrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
25192d19872aSmrg    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'
25202d19872aSmrg    ;;
25212d19872aSmrg  esac
25222d19872aSmrg  ;;
25232d19872aSmrg
25242d19872aSmrgbeos*)
25252d19872aSmrg  library_names_spec='$libname$shared_ext'
25262d19872aSmrg  dynamic_linker="$host_os ld.so"
25272d19872aSmrg  shlibpath_var=LIBRARY_PATH
25282d19872aSmrg  ;;
25292d19872aSmrg
25302d19872aSmrgbsdi[[45]]*)
25312d19872aSmrg  version_type=linux # correct to gnu/linux during the next big refactor
25322d19872aSmrg  need_version=no
25332d19872aSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
25342d19872aSmrg  soname_spec='$libname$release$shared_ext$major'
25352d19872aSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
25362d19872aSmrg  shlibpath_var=LD_LIBRARY_PATH
25372d19872aSmrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
25382d19872aSmrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
25392d19872aSmrg  # the default ld.so.conf also contains /usr/contrib/lib and
25402d19872aSmrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
25412d19872aSmrg  # libtool to hard-code these into programs
25422d19872aSmrg  ;;
25432d19872aSmrg
25442d19872aSmrgcygwin* | mingw* | pw32* | cegcc*)
25452d19872aSmrg  version_type=windows
25462d19872aSmrg  shrext_cmds=.dll
25472d19872aSmrg  need_version=no
25482d19872aSmrg  need_lib_prefix=no
25492d19872aSmrg
25502d19872aSmrg  case $GCC,$cc_basename in
25512d19872aSmrg  yes,*)
25522d19872aSmrg    # gcc
25532d19872aSmrg    library_names_spec='$libname.dll.a'
25542d19872aSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
25552d19872aSmrg    postinstall_cmds='base_file=`basename \$file`~
25562d19872aSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
25572d19872aSmrg      dldir=$destdir/`dirname \$dlpath`~
25582d19872aSmrg      test -d \$dldir || mkdir -p \$dldir~
25592d19872aSmrg      $install_prog $dir/$dlname \$dldir/$dlname~
25602d19872aSmrg      chmod a+x \$dldir/$dlname~
25612d19872aSmrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
25622d19872aSmrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
25632d19872aSmrg      fi'
25642d19872aSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
25652d19872aSmrg      dlpath=$dir/\$dldll~
25662d19872aSmrg       $RM \$dlpath'
25672d19872aSmrg    shlibpath_overrides_runpath=yes
25682d19872aSmrg
25692d19872aSmrg    case $host_os in
25702d19872aSmrg    cygwin*)
25712d19872aSmrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
25722d19872aSmrg      soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
25732d19872aSmrgm4_if([$1], [],[
25742d19872aSmrg      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
25752d19872aSmrg      ;;
25762d19872aSmrg    mingw* | cegcc*)
25772d19872aSmrg      # MinGW DLLs use traditional 'lib' prefix
25782d19872aSmrg      soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
25792d19872aSmrg      ;;
25802d19872aSmrg    pw32*)
25812d19872aSmrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
25822d19872aSmrg      library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
25832d19872aSmrg      ;;
25842d19872aSmrg    esac
25852d19872aSmrg    dynamic_linker='Win32 ld.exe'
25862d19872aSmrg    ;;
25872d19872aSmrg
25882d19872aSmrg  *,cl* | *,icl*)
25892d19872aSmrg    # Native MSVC or ICC
25902d19872aSmrg    libname_spec='$name'
25912d19872aSmrg    soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
25922d19872aSmrg    library_names_spec='$libname.dll.lib'
25932d19872aSmrg
25942d19872aSmrg    case $build_os in
25952d19872aSmrg    mingw*)
25962d19872aSmrg      sys_lib_search_path_spec=
25972d19872aSmrg      lt_save_ifs=$IFS
25982d19872aSmrg      IFS=';'
25992d19872aSmrg      for lt_path in $LIB
26002d19872aSmrg      do
26012d19872aSmrg        IFS=$lt_save_ifs
26022d19872aSmrg        # Let DOS variable expansion print the short 8.3 style file name.
26032d19872aSmrg        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
26042d19872aSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
26052d19872aSmrg      done
26062d19872aSmrg      IFS=$lt_save_ifs
26072d19872aSmrg      # Convert to MSYS style.
26082d19872aSmrg      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
26092d19872aSmrg      ;;
26102d19872aSmrg    cygwin*)
26112d19872aSmrg      # Convert to unix form, then to dos form, then back to unix form
26122d19872aSmrg      # but this time dos style (no spaces!) so that the unix form looks
26132d19872aSmrg      # like /cygdrive/c/PROGRA~1:/cygdr...
26142d19872aSmrg      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
26152d19872aSmrg      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
26162d19872aSmrg      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
26172d19872aSmrg      ;;
26182d19872aSmrg    *)
26192d19872aSmrg      sys_lib_search_path_spec=$LIB
26202d19872aSmrg      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
26212d19872aSmrg        # It is most probably a Windows format PATH.
26222d19872aSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
26232d19872aSmrg      else
26242d19872aSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
26252d19872aSmrg      fi
26262d19872aSmrg      # FIXME: find the short name or the path components, as spaces are
26272d19872aSmrg      # common. (e.g. "Program Files" -> "PROGRA~1")
26282d19872aSmrg      ;;
26292d19872aSmrg    esac
26302d19872aSmrg
26312d19872aSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
26322d19872aSmrg    postinstall_cmds='base_file=`basename \$file`~
26332d19872aSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
26342d19872aSmrg      dldir=$destdir/`dirname \$dlpath`~
26352d19872aSmrg      test -d \$dldir || mkdir -p \$dldir~
26362d19872aSmrg      $install_prog $dir/$dlname \$dldir/$dlname'
26372d19872aSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
26382d19872aSmrg      dlpath=$dir/\$dldll~
26392d19872aSmrg       $RM \$dlpath'
26402d19872aSmrg    shlibpath_overrides_runpath=yes
26412d19872aSmrg    dynamic_linker='Win32 link.exe'
26422d19872aSmrg    ;;
26432d19872aSmrg
26442d19872aSmrg  *)
26452d19872aSmrg    # Assume MSVC and ICC wrapper
26462d19872aSmrg    library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
26472d19872aSmrg    dynamic_linker='Win32 ld.exe'
26482d19872aSmrg    ;;
26492d19872aSmrg  esac
26502d19872aSmrg  # FIXME: first we should search . and the directory the executable is in
26512d19872aSmrg  shlibpath_var=PATH
26522d19872aSmrg  ;;
26532d19872aSmrg
26542d19872aSmrgdarwin* | rhapsody*)
26552d19872aSmrg  dynamic_linker="$host_os dyld"
26562d19872aSmrg  version_type=darwin
26572d19872aSmrg  need_lib_prefix=no
26582d19872aSmrg  need_version=no
26592d19872aSmrg  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
26602d19872aSmrg  soname_spec='$libname$release$major$shared_ext'
26612d19872aSmrg  shlibpath_overrides_runpath=yes
26622d19872aSmrg  shlibpath_var=DYLD_LIBRARY_PATH
26632d19872aSmrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
26642d19872aSmrgm4_if([$1], [],[
26652d19872aSmrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
26662d19872aSmrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
26672d19872aSmrg  ;;
26682d19872aSmrg
26692d19872aSmrgdgux*)
26702d19872aSmrg  version_type=linux # correct to gnu/linux during the next big refactor
26712d19872aSmrg  need_lib_prefix=no
26722d19872aSmrg  need_version=no
26732d19872aSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
26742d19872aSmrg  soname_spec='$libname$release$shared_ext$major'
26752d19872aSmrg  shlibpath_var=LD_LIBRARY_PATH
26762d19872aSmrg  ;;
26772d19872aSmrg
26782d19872aSmrgfreebsd* | dragonfly* | midnightbsd*)
26792d19872aSmrg  # DragonFly does not have aout.  When/if they implement a new
26802d19872aSmrg  # versioning mechanism, adjust this.
26812d19872aSmrg  if test -x /usr/bin/objformat; then
26822d19872aSmrg    objformat=`/usr/bin/objformat`
26832d19872aSmrg  else
26842d19872aSmrg    case $host_os in
26852d19872aSmrg    freebsd[[23]].*) objformat=aout ;;
26862d19872aSmrg    *) objformat=elf ;;
26872d19872aSmrg    esac
26882d19872aSmrg  fi
26892d19872aSmrg  version_type=freebsd-$objformat
26902d19872aSmrg  case $version_type in
26912d19872aSmrg    freebsd-elf*)
26922d19872aSmrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
26932d19872aSmrg      soname_spec='$libname$release$shared_ext$major'
26942d19872aSmrg      need_version=no
26952d19872aSmrg      need_lib_prefix=no
26962d19872aSmrg      ;;
26972d19872aSmrg    freebsd-*)
26982d19872aSmrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
26992d19872aSmrg      need_version=yes
27002d19872aSmrg      ;;
27012d19872aSmrg  esac
27022d19872aSmrg  shlibpath_var=LD_LIBRARY_PATH
27032d19872aSmrg  case $host_os in
27042d19872aSmrg  freebsd2.*)
27052d19872aSmrg    shlibpath_overrides_runpath=yes
27062d19872aSmrg    ;;
27072d19872aSmrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
27082d19872aSmrg    shlibpath_overrides_runpath=yes
27092d19872aSmrg    hardcode_into_libs=yes
27102d19872aSmrg    ;;
27112d19872aSmrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
27122d19872aSmrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
27132d19872aSmrg    shlibpath_overrides_runpath=no
27142d19872aSmrg    hardcode_into_libs=yes
27152d19872aSmrg    ;;
27162d19872aSmrg  *) # from 4.6 on, and DragonFly
27172d19872aSmrg    shlibpath_overrides_runpath=yes
27182d19872aSmrg    hardcode_into_libs=yes
27192d19872aSmrg    ;;
27202d19872aSmrg  esac
27212d19872aSmrg  ;;
27222d19872aSmrg
27232d19872aSmrghaiku*)
27242d19872aSmrg  version_type=linux # correct to gnu/linux during the next big refactor
27252d19872aSmrg  need_lib_prefix=no
27262d19872aSmrg  need_version=no
27272d19872aSmrg  dynamic_linker="$host_os runtime_loader"
27282d19872aSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
27292d19872aSmrg  soname_spec='$libname$release$shared_ext$major'
27302d19872aSmrg  shlibpath_var=LIBRARY_PATH
27312d19872aSmrg  shlibpath_overrides_runpath=no
27322d19872aSmrg  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
27332d19872aSmrg  hardcode_into_libs=yes
27342d19872aSmrg  ;;
27352d19872aSmrg
27362d19872aSmrghpux9* | hpux10* | hpux11*)
27372d19872aSmrg  # Give a soname corresponding to the major version so that dld.sl refuses to
27382d19872aSmrg  # link against other versions.
27392d19872aSmrg  version_type=sunos
27402d19872aSmrg  need_lib_prefix=no
27412d19872aSmrg  need_version=no
27422d19872aSmrg  case $host_cpu in
27432d19872aSmrg  ia64*)
27442d19872aSmrg    shrext_cmds='.so'
27452d19872aSmrg    hardcode_into_libs=yes
27462d19872aSmrg    dynamic_linker="$host_os dld.so"
27472d19872aSmrg    shlibpath_var=LD_LIBRARY_PATH
27482d19872aSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
27492d19872aSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
27502d19872aSmrg    soname_spec='$libname$release$shared_ext$major'
27512d19872aSmrg    if test 32 = "$HPUX_IA64_MODE"; then
27522d19872aSmrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
27532d19872aSmrg      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
27542d19872aSmrg    else
27552d19872aSmrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
27562d19872aSmrg      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
27572d19872aSmrg    fi
27582d19872aSmrg    ;;
27592d19872aSmrg  hppa*64*)
27602d19872aSmrg    shrext_cmds='.sl'
27612d19872aSmrg    hardcode_into_libs=yes
27622d19872aSmrg    dynamic_linker="$host_os dld.sl"
27632d19872aSmrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
27642d19872aSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
27652d19872aSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
27662d19872aSmrg    soname_spec='$libname$release$shared_ext$major'
27672d19872aSmrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
27682d19872aSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
27692d19872aSmrg    ;;
27702d19872aSmrg  *)
27712d19872aSmrg    shrext_cmds='.sl'
27722d19872aSmrg    dynamic_linker="$host_os dld.sl"
27732d19872aSmrg    shlibpath_var=SHLIB_PATH
27742d19872aSmrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
27752d19872aSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
27762d19872aSmrg    soname_spec='$libname$release$shared_ext$major'
27772d19872aSmrg    ;;
27782d19872aSmrg  esac
27792d19872aSmrg  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
27802d19872aSmrg  postinstall_cmds='chmod 555 $lib'
27812d19872aSmrg  # or fails outright, so override atomically:
27822d19872aSmrg  install_override_mode=555
27832d19872aSmrg  ;;
27842d19872aSmrg
27852d19872aSmrginterix[[3-9]]*)
27862d19872aSmrg  version_type=linux # correct to gnu/linux during the next big refactor
27872d19872aSmrg  need_lib_prefix=no
27882d19872aSmrg  need_version=no
27892d19872aSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
27902d19872aSmrg  soname_spec='$libname$release$shared_ext$major'
27912d19872aSmrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
27922d19872aSmrg  shlibpath_var=LD_LIBRARY_PATH
27932d19872aSmrg  shlibpath_overrides_runpath=no
27942d19872aSmrg  hardcode_into_libs=yes
27952d19872aSmrg  ;;
27962d19872aSmrg
27972d19872aSmrgirix5* | irix6* | nonstopux*)
27982d19872aSmrg  case $host_os in
27992d19872aSmrg    nonstopux*) version_type=nonstopux ;;
28002d19872aSmrg    *)
28012d19872aSmrg	if test yes = "$lt_cv_prog_gnu_ld"; then
28022d19872aSmrg		version_type=linux # correct to gnu/linux during the next big refactor
28032d19872aSmrg	else
28042d19872aSmrg		version_type=irix
28052d19872aSmrg	fi ;;
28062d19872aSmrg  esac
28072d19872aSmrg  need_lib_prefix=no
28082d19872aSmrg  need_version=no
28092d19872aSmrg  soname_spec='$libname$release$shared_ext$major'
28102d19872aSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
28112d19872aSmrg  case $host_os in
28122d19872aSmrg  irix5* | nonstopux*)
28132d19872aSmrg    libsuff= shlibsuff=
28142d19872aSmrg    ;;
28152d19872aSmrg  *)
28162d19872aSmrg    case $LD in # libtool.m4 will add one of these switches to LD
28172d19872aSmrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
28182d19872aSmrg      libsuff= shlibsuff= libmagic=32-bit;;
28192d19872aSmrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
28202d19872aSmrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
28212d19872aSmrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
28222d19872aSmrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
28232d19872aSmrg    *) libsuff= shlibsuff= libmagic=never-match;;
28242d19872aSmrg    esac
28252d19872aSmrg    ;;
28262d19872aSmrg  esac
28272d19872aSmrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
28282d19872aSmrg  shlibpath_overrides_runpath=no
28292d19872aSmrg  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
28302d19872aSmrg  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
28312d19872aSmrg  hardcode_into_libs=yes
28322d19872aSmrg  ;;
28332d19872aSmrg
28342d19872aSmrg# No shared lib support for Linux oldld, aout, or coff.
28352d19872aSmrglinux*oldld* | linux*aout* | linux*coff*)
28362d19872aSmrg  dynamic_linker=no
28372d19872aSmrg  ;;
28382d19872aSmrg
28392d19872aSmrglinux*android*)
28402d19872aSmrg  version_type=none # Android doesn't support versioned libraries.
28412d19872aSmrg  need_lib_prefix=no
28422d19872aSmrg  need_version=no
28432d19872aSmrg  library_names_spec='$libname$release$shared_ext'
28442d19872aSmrg  soname_spec='$libname$release$shared_ext'
28452d19872aSmrg  finish_cmds=
28462d19872aSmrg  shlibpath_var=LD_LIBRARY_PATH
28472d19872aSmrg  shlibpath_overrides_runpath=yes
28482d19872aSmrg
28492d19872aSmrg  # This implies no fast_install, which is unacceptable.
28502d19872aSmrg  # Some rework will be needed to allow for fast_install
28512d19872aSmrg  # before this can be enabled.
28522d19872aSmrg  hardcode_into_libs=yes
28532d19872aSmrg
28542d19872aSmrg  dynamic_linker='Android linker'
28552d19872aSmrg  # Don't embed -rpath directories since the linker doesn't support them.
28562d19872aSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
28572d19872aSmrg  ;;
28582d19872aSmrg
28592d19872aSmrg# This must be glibc/ELF.
28602d19872aSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
28612d19872aSmrg  version_type=linux # correct to gnu/linux during the next big refactor
28622d19872aSmrg  need_lib_prefix=no
28632d19872aSmrg  need_version=no
28642d19872aSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
28652d19872aSmrg  soname_spec='$libname$release$shared_ext$major'
28662d19872aSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
28672d19872aSmrg  shlibpath_var=LD_LIBRARY_PATH
28682d19872aSmrg  shlibpath_overrides_runpath=no
28692d19872aSmrg
28702d19872aSmrg  # Some binutils ld are patched to set DT_RUNPATH
28712d19872aSmrg  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
28722d19872aSmrg    [lt_cv_shlibpath_overrides_runpath=no
28732d19872aSmrg    save_LDFLAGS=$LDFLAGS
28742d19872aSmrg    save_libdir=$libdir
28752d19872aSmrg    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
28762d19872aSmrg	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
28772d19872aSmrg    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
28782d19872aSmrg      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
28792d19872aSmrg	 [lt_cv_shlibpath_overrides_runpath=yes])])
28802d19872aSmrg    LDFLAGS=$save_LDFLAGS
28812d19872aSmrg    libdir=$save_libdir
28822d19872aSmrg    ])
28832d19872aSmrg  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
28842d19872aSmrg
28852d19872aSmrg  # This implies no fast_install, which is unacceptable.
28862d19872aSmrg  # Some rework will be needed to allow for fast_install
28872d19872aSmrg  # before this can be enabled.
28882d19872aSmrg  hardcode_into_libs=yes
28892d19872aSmrg
28902d19872aSmrg  # Add ABI-specific directories to the system library path.
28912d19872aSmrg  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
28922d19872aSmrg
28932d19872aSmrg  # Ideally, we could use ldconfig to report *all* directores which are
28942d19872aSmrg  # searched for libraries, however this is still not possible.  Aside from not
28952d19872aSmrg  # being certain /sbin/ldconfig is available, command
28962d19872aSmrg  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
28972d19872aSmrg  # even though it is searched at run-time.  Try to do the best guess by
28982d19872aSmrg  # appending ld.so.conf contents (and includes) to the search path.
28992d19872aSmrg  if test -f /etc/ld.so.conf; then
29002d19872aSmrg    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' ' '`
29012d19872aSmrg    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
29022d19872aSmrg  fi
29032d19872aSmrg
29042d19872aSmrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
29052d19872aSmrg  # powerpc, because MkLinux only supported shared libraries with the
29062d19872aSmrg  # GNU dynamic linker.  Since this was broken with cross compilers,
29072d19872aSmrg  # most powerpc-linux boxes support dynamic linking these days and
29082d19872aSmrg  # people can always --disable-shared, the test was removed, and we
29092d19872aSmrg  # assume the GNU/Linux dynamic linker is in use.
29102d19872aSmrg  dynamic_linker='GNU/Linux ld.so'
29112d19872aSmrg  ;;
29122d19872aSmrg
29132d19872aSmrgnetbsd*)
29142d19872aSmrg  version_type=sunos
29152d19872aSmrg  need_lib_prefix=no
29162d19872aSmrg  need_version=no
29172d19872aSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
29182d19872aSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
29192d19872aSmrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
29202d19872aSmrg    dynamic_linker='NetBSD (a.out) ld.so'
29212d19872aSmrg  else
29222d19872aSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
29232d19872aSmrg    soname_spec='$libname$release$shared_ext$major'
29242d19872aSmrg    dynamic_linker='NetBSD ld.elf_so'
29252d19872aSmrg  fi
29262d19872aSmrg  shlibpath_var=LD_LIBRARY_PATH
29272d19872aSmrg  shlibpath_overrides_runpath=yes
29282d19872aSmrg  hardcode_into_libs=yes
29292d19872aSmrg  ;;
29302d19872aSmrg
29312d19872aSmrgnewsos6)
29322d19872aSmrg  version_type=linux # correct to gnu/linux during the next big refactor
29332d19872aSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
29342d19872aSmrg  shlibpath_var=LD_LIBRARY_PATH
29352d19872aSmrg  shlibpath_overrides_runpath=yes
29362d19872aSmrg  ;;
29372d19872aSmrg
29382d19872aSmrg*nto* | *qnx*)
29392d19872aSmrg  version_type=qnx
29402d19872aSmrg  need_lib_prefix=no
29412d19872aSmrg  need_version=no
29422d19872aSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
29432d19872aSmrg  soname_spec='$libname$release$shared_ext$major'
29442d19872aSmrg  shlibpath_var=LD_LIBRARY_PATH
29452d19872aSmrg  shlibpath_overrides_runpath=no
29462d19872aSmrg  hardcode_into_libs=yes
29472d19872aSmrg  dynamic_linker='ldqnx.so'
29482d19872aSmrg  ;;
29492d19872aSmrg
29502d19872aSmrgopenbsd* | bitrig*)
29512d19872aSmrg  version_type=sunos
29522d19872aSmrg  sys_lib_dlsearch_path_spec=/usr/lib
29532d19872aSmrg  need_lib_prefix=no
29542d19872aSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
29552d19872aSmrg    need_version=no
29562d19872aSmrg  else
29572d19872aSmrg    need_version=yes
29582d19872aSmrg  fi
29592d19872aSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
29602d19872aSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
29612d19872aSmrg  shlibpath_var=LD_LIBRARY_PATH
29622d19872aSmrg  shlibpath_overrides_runpath=yes
29632d19872aSmrg  ;;
29642d19872aSmrg
29652d19872aSmrgos2*)
29662d19872aSmrg  libname_spec='$name'
29672d19872aSmrg  version_type=windows
29682d19872aSmrg  shrext_cmds=.dll
29692d19872aSmrg  need_version=no
29702d19872aSmrg  need_lib_prefix=no
29712d19872aSmrg  # OS/2 can only load a DLL with a base name of 8 characters or less.
29722d19872aSmrg  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
29732d19872aSmrg    v=$($ECHO $release$versuffix | tr -d .-);
29742d19872aSmrg    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
29752d19872aSmrg    $ECHO $n$v`$shared_ext'
29762d19872aSmrg  library_names_spec='${libname}_dll.$libext'
29772d19872aSmrg  dynamic_linker='OS/2 ld.exe'
29782d19872aSmrg  shlibpath_var=BEGINLIBPATH
29792d19872aSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
29802d19872aSmrg  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
29812d19872aSmrg  postinstall_cmds='base_file=`basename \$file`~
29822d19872aSmrg    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
29832d19872aSmrg    dldir=$destdir/`dirname \$dlpath`~
29842d19872aSmrg    test -d \$dldir || mkdir -p \$dldir~
29852d19872aSmrg    $install_prog $dir/$dlname \$dldir/$dlname~
29862d19872aSmrg    chmod a+x \$dldir/$dlname~
29872d19872aSmrg    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
29882d19872aSmrg      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
29892d19872aSmrg    fi'
29902d19872aSmrg  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
29912d19872aSmrg    dlpath=$dir/\$dldll~
29922d19872aSmrg    $RM \$dlpath'
29932d19872aSmrg  ;;
29942d19872aSmrg
29952d19872aSmrgosf3* | osf4* | osf5*)
29962d19872aSmrg  version_type=osf
29972d19872aSmrg  need_lib_prefix=no
29982d19872aSmrg  need_version=no
29992d19872aSmrg  soname_spec='$libname$release$shared_ext$major'
30002d19872aSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
30012d19872aSmrg  shlibpath_var=LD_LIBRARY_PATH
30022d19872aSmrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
30032d19872aSmrg  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
30042d19872aSmrg  ;;
30052d19872aSmrg
30062d19872aSmrgrdos*)
30072d19872aSmrg  dynamic_linker=no
30082d19872aSmrg  ;;
30092d19872aSmrg
30102d19872aSmrgsolaris*)
30112d19872aSmrg  version_type=linux # correct to gnu/linux during the next big refactor
30122d19872aSmrg  need_lib_prefix=no
30132d19872aSmrg  need_version=no
30142d19872aSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
30152d19872aSmrg  soname_spec='$libname$release$shared_ext$major'
30162d19872aSmrg  shlibpath_var=LD_LIBRARY_PATH
30172d19872aSmrg  shlibpath_overrides_runpath=yes
30182d19872aSmrg  hardcode_into_libs=yes
30192d19872aSmrg  # ldd complains unless libraries are executable
30202d19872aSmrg  postinstall_cmds='chmod +x $lib'
30212d19872aSmrg  ;;
30222d19872aSmrg
30232d19872aSmrgsunos4*)
30242d19872aSmrg  version_type=sunos
30252d19872aSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
30262d19872aSmrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
30272d19872aSmrg  shlibpath_var=LD_LIBRARY_PATH
30282d19872aSmrg  shlibpath_overrides_runpath=yes
30292d19872aSmrg  if test yes = "$with_gnu_ld"; then
30302d19872aSmrg    need_lib_prefix=no
30312d19872aSmrg  fi
30322d19872aSmrg  need_version=yes
30332d19872aSmrg  ;;
30342d19872aSmrg
30352d19872aSmrgsysv4 | sysv4.3*)
30362d19872aSmrg  version_type=linux # correct to gnu/linux during the next big refactor
30372d19872aSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
30382d19872aSmrg  soname_spec='$libname$release$shared_ext$major'
30392d19872aSmrg  shlibpath_var=LD_LIBRARY_PATH
30402d19872aSmrg  case $host_vendor in
30412d19872aSmrg    sni)
30422d19872aSmrg      shlibpath_overrides_runpath=no
30432d19872aSmrg      need_lib_prefix=no
30442d19872aSmrg      runpath_var=LD_RUN_PATH
30452d19872aSmrg      ;;
30462d19872aSmrg    siemens)
30472d19872aSmrg      need_lib_prefix=no
30482d19872aSmrg      ;;
30492d19872aSmrg    motorola)
30502d19872aSmrg      need_lib_prefix=no
30512d19872aSmrg      need_version=no
30522d19872aSmrg      shlibpath_overrides_runpath=no
30532d19872aSmrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
30542d19872aSmrg      ;;
30552d19872aSmrg  esac
30562d19872aSmrg  ;;
30572d19872aSmrg
30582d19872aSmrgsysv4*MP*)
30592d19872aSmrg  if test -d /usr/nec; then
30602d19872aSmrg    version_type=linux # correct to gnu/linux during the next big refactor
30612d19872aSmrg    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
30622d19872aSmrg    soname_spec='$libname$shared_ext.$major'
30632d19872aSmrg    shlibpath_var=LD_LIBRARY_PATH
30642d19872aSmrg  fi
30652d19872aSmrg  ;;
30662d19872aSmrg
30672d19872aSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
30682d19872aSmrg  version_type=sco
30692d19872aSmrg  need_lib_prefix=no
30702d19872aSmrg  need_version=no
30712d19872aSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
30722d19872aSmrg  soname_spec='$libname$release$shared_ext$major'
30732d19872aSmrg  shlibpath_var=LD_LIBRARY_PATH
30742d19872aSmrg  shlibpath_overrides_runpath=yes
30752d19872aSmrg  hardcode_into_libs=yes
30762d19872aSmrg  if test yes = "$with_gnu_ld"; then
30772d19872aSmrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
30782d19872aSmrg  else
30792d19872aSmrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
30802d19872aSmrg    case $host_os in
30812d19872aSmrg      sco3.2v5*)
30822d19872aSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
30832d19872aSmrg	;;
30842d19872aSmrg    esac
30852d19872aSmrg  fi
30862d19872aSmrg  sys_lib_dlsearch_path_spec='/usr/lib'
30872d19872aSmrg  ;;
30882d19872aSmrg
30892d19872aSmrgtpf*)
30902d19872aSmrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
30912d19872aSmrg  version_type=linux # correct to gnu/linux during the next big refactor
30922d19872aSmrg  need_lib_prefix=no
30932d19872aSmrg  need_version=no
30942d19872aSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
30952d19872aSmrg  shlibpath_var=LD_LIBRARY_PATH
30962d19872aSmrg  shlibpath_overrides_runpath=no
30972d19872aSmrg  hardcode_into_libs=yes
30982d19872aSmrg  ;;
30992d19872aSmrg
31002d19872aSmrguts4*)
31012d19872aSmrg  version_type=linux # correct to gnu/linux during the next big refactor
31022d19872aSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
31032d19872aSmrg  soname_spec='$libname$release$shared_ext$major'
31042d19872aSmrg  shlibpath_var=LD_LIBRARY_PATH
31052d19872aSmrg  ;;
31062d19872aSmrg
31072d19872aSmrg*)
31082d19872aSmrg  dynamic_linker=no
31092d19872aSmrg  ;;
31102d19872aSmrgesac
31112d19872aSmrgAC_MSG_RESULT([$dynamic_linker])
31122d19872aSmrgtest no = "$dynamic_linker" && can_build_shared=no
31132d19872aSmrg
31142d19872aSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
31152d19872aSmrgif test yes = "$GCC"; then
31162d19872aSmrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
31172d19872aSmrgfi
31182d19872aSmrg
31192d19872aSmrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
31202d19872aSmrg  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
31212d19872aSmrgfi
31222d19872aSmrg
31232d19872aSmrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
31242d19872aSmrg  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
31252d19872aSmrgfi
31262d19872aSmrg
31272d19872aSmrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
31282d19872aSmrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
31292d19872aSmrg
31302d19872aSmrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
31312d19872aSmrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
31322d19872aSmrg
31332d19872aSmrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
31342d19872aSmrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
31352d19872aSmrg
31362d19872aSmrg_LT_DECL([], [variables_saved_for_relink], [1],
31372d19872aSmrg    [Variables whose values should be saved in libtool wrapper scripts and
31382d19872aSmrg    restored at link time])
31392d19872aSmrg_LT_DECL([], [need_lib_prefix], [0],
31402d19872aSmrg    [Do we need the "lib" prefix for modules?])
31412d19872aSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
31422d19872aSmrg_LT_DECL([], [version_type], [0], [Library versioning type])
31432d19872aSmrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
31442d19872aSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
31452d19872aSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
31462d19872aSmrg    [Is shlibpath searched before the hard-coded library search path?])
31472d19872aSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
31482d19872aSmrg_LT_DECL([], [library_names_spec], [1],
31492d19872aSmrg    [[List of archive names.  First name is the real one, the rest are links.
31502d19872aSmrg    The last name is the one that the linker finds with -lNAME]])
31512d19872aSmrg_LT_DECL([], [soname_spec], [1],
31522d19872aSmrg    [[The coded name of the library, if different from the real name]])
31532d19872aSmrg_LT_DECL([], [install_override_mode], [1],
31542d19872aSmrg    [Permission mode override for installation of shared libraries])
31552d19872aSmrg_LT_DECL([], [postinstall_cmds], [2],
31562d19872aSmrg    [Command to use after installation of a shared archive])
31572d19872aSmrg_LT_DECL([], [postuninstall_cmds], [2],
31582d19872aSmrg    [Command to use after uninstallation of a shared archive])
31592d19872aSmrg_LT_DECL([], [finish_cmds], [2],
31602d19872aSmrg    [Commands used to finish a libtool library installation in a directory])
31612d19872aSmrg_LT_DECL([], [finish_eval], [1],
31622d19872aSmrg    [[As "finish_cmds", except a single script fragment to be evaled but
31632d19872aSmrg    not shown]])
31642d19872aSmrg_LT_DECL([], [hardcode_into_libs], [0],
31652d19872aSmrg    [Whether we should hardcode library paths into libraries])
31662d19872aSmrg_LT_DECL([], [sys_lib_search_path_spec], [2],
31672d19872aSmrg    [Compile-time system search path for libraries])
31682d19872aSmrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
31692d19872aSmrg    [Detected run-time system search path for libraries])
31702d19872aSmrg_LT_DECL([], [configure_time_lt_sys_library_path], [2],
31712d19872aSmrg    [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
31722d19872aSmrg])# _LT_SYS_DYNAMIC_LINKER
31732d19872aSmrg
31742d19872aSmrg
31752d19872aSmrg# _LT_PATH_TOOL_PREFIX(TOOL)
31762d19872aSmrg# --------------------------
31772d19872aSmrg# find a file program that can recognize shared library
31782d19872aSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
31792d19872aSmrg[m4_require([_LT_DECL_EGREP])dnl
31802d19872aSmrgAC_MSG_CHECKING([for $1])
31812d19872aSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
31822d19872aSmrg[case $MAGIC_CMD in
31832d19872aSmrg[[\\/*] |  ?:[\\/]*])
31842d19872aSmrg  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
31852d19872aSmrg  ;;
31862d19872aSmrg*)
31872d19872aSmrg  lt_save_MAGIC_CMD=$MAGIC_CMD
31882d19872aSmrg  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
31892d19872aSmrgdnl $ac_dummy forces splitting on constant user-supplied paths.
31902d19872aSmrgdnl POSIX.2 word splitting is done only on the output of word expansions,
31912d19872aSmrgdnl not every word.  This closes a longstanding sh security hole.
31922d19872aSmrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
31932d19872aSmrg  for ac_dir in $ac_dummy; do
31942d19872aSmrg    IFS=$lt_save_ifs
31952d19872aSmrg    test -z "$ac_dir" && ac_dir=.
31962d19872aSmrg    if test -f "$ac_dir/$1"; then
31972d19872aSmrg      lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
31982d19872aSmrg      if test -n "$file_magic_test_file"; then
31992d19872aSmrg	case $deplibs_check_method in
32002d19872aSmrg	"file_magic "*)
32012d19872aSmrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
32022d19872aSmrg	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
32032d19872aSmrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
32042d19872aSmrg	    $EGREP "$file_magic_regex" > /dev/null; then
32052d19872aSmrg	    :
32062d19872aSmrg	  else
32072d19872aSmrg	    cat <<_LT_EOF 1>&2
32082d19872aSmrg
32092d19872aSmrg*** Warning: the command libtool uses to detect shared libraries,
32102d19872aSmrg*** $file_magic_cmd, produces output that libtool cannot recognize.
32112d19872aSmrg*** The result is that libtool may fail to recognize shared libraries
32122d19872aSmrg*** as such.  This will affect the creation of libtool libraries that
32132d19872aSmrg*** depend on shared libraries, but programs linked with such libtool
32142d19872aSmrg*** libraries will work regardless of this problem.  Nevertheless, you
32152d19872aSmrg*** may want to report the problem to your system manager and/or to
32162d19872aSmrg*** bug-libtool@gnu.org
32172d19872aSmrg
32182d19872aSmrg_LT_EOF
32192d19872aSmrg	  fi ;;
32202d19872aSmrg	esac
32212d19872aSmrg      fi
32222d19872aSmrg      break
32232d19872aSmrg    fi
32242d19872aSmrg  done
32252d19872aSmrg  IFS=$lt_save_ifs
32262d19872aSmrg  MAGIC_CMD=$lt_save_MAGIC_CMD
32272d19872aSmrg  ;;
32282d19872aSmrgesac])
32292d19872aSmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD
32302d19872aSmrgif test -n "$MAGIC_CMD"; then
32312d19872aSmrg  AC_MSG_RESULT($MAGIC_CMD)
32322d19872aSmrgelse
32332d19872aSmrg  AC_MSG_RESULT(no)
32342d19872aSmrgfi
32352d19872aSmrg_LT_DECL([], [MAGIC_CMD], [0],
32362d19872aSmrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
32372d19872aSmrg])# _LT_PATH_TOOL_PREFIX
32382d19872aSmrg
32392d19872aSmrg# Old name:
32402d19872aSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
32412d19872aSmrgdnl aclocal-1.4 backwards compatibility:
32422d19872aSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
32432d19872aSmrg
32442d19872aSmrg
32452d19872aSmrg# _LT_PATH_MAGIC
32462d19872aSmrg# --------------
32472d19872aSmrg# find a file program that can recognize a shared library
32482d19872aSmrgm4_defun([_LT_PATH_MAGIC],
32492d19872aSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
32502d19872aSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then
32512d19872aSmrg  if test -n "$ac_tool_prefix"; then
32522d19872aSmrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
32532d19872aSmrg  else
32542d19872aSmrg    MAGIC_CMD=:
32552d19872aSmrg  fi
32562d19872aSmrgfi
32572d19872aSmrg])# _LT_PATH_MAGIC
32582d19872aSmrg
32592d19872aSmrg
32602d19872aSmrg# LT_PATH_LD
32612d19872aSmrg# ----------
32622d19872aSmrg# find the pathname to the GNU or non-GNU linker
32632d19872aSmrgAC_DEFUN([LT_PATH_LD],
32642d19872aSmrg[AC_REQUIRE([AC_PROG_CC])dnl
32652d19872aSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
32662d19872aSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
32672d19872aSmrgm4_require([_LT_DECL_SED])dnl
32682d19872aSmrgm4_require([_LT_DECL_EGREP])dnl
32692d19872aSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl
32702d19872aSmrg
32712d19872aSmrgAC_ARG_WITH([gnu-ld],
32722d19872aSmrg    [AS_HELP_STRING([--with-gnu-ld],
32732d19872aSmrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
32742d19872aSmrg    [test no = "$withval" || with_gnu_ld=yes],
32752d19872aSmrg    [with_gnu_ld=no])dnl
32762d19872aSmrg
32772d19872aSmrgac_prog=ld
32782d19872aSmrgif test yes = "$GCC"; then
32792d19872aSmrg  # Check if gcc -print-prog-name=ld gives a path.
32802d19872aSmrg  AC_MSG_CHECKING([for ld used by $CC])
32812d19872aSmrg  case $host in
32822d19872aSmrg  *-*-mingw*)
32832d19872aSmrg    # gcc leaves a trailing carriage return, which upsets mingw
32842d19872aSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
32852d19872aSmrg  *)
32862d19872aSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
32872d19872aSmrg  esac
32882d19872aSmrg  case $ac_prog in
32892d19872aSmrg    # Accept absolute paths.
32902d19872aSmrg    [[\\/]]* | ?:[[\\/]]*)
32912d19872aSmrg      re_direlt='/[[^/]][[^/]]*/\.\./'
32922d19872aSmrg      # Canonicalize the pathname of ld
32932d19872aSmrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
32942d19872aSmrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
32952d19872aSmrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
32962d19872aSmrg      done
32972d19872aSmrg      test -z "$LD" && LD=$ac_prog
32982d19872aSmrg      ;;
32992d19872aSmrg  "")
33002d19872aSmrg    # If it fails, then pretend we aren't using GCC.
33012d19872aSmrg    ac_prog=ld
33022d19872aSmrg    ;;
33032d19872aSmrg  *)
33042d19872aSmrg    # If it is relative, then search for the first ld in PATH.
33052d19872aSmrg    with_gnu_ld=unknown
33062d19872aSmrg    ;;
33072d19872aSmrg  esac
33082d19872aSmrgelif test yes = "$with_gnu_ld"; then
33092d19872aSmrg  AC_MSG_CHECKING([for GNU ld])
33102d19872aSmrgelse
33112d19872aSmrg  AC_MSG_CHECKING([for non-GNU ld])
33122d19872aSmrgfi
33132d19872aSmrgAC_CACHE_VAL(lt_cv_path_LD,
33142d19872aSmrg[if test -z "$LD"; then
33152d19872aSmrg  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
33162d19872aSmrg  for ac_dir in $PATH; do
33172d19872aSmrg    IFS=$lt_save_ifs
33182d19872aSmrg    test -z "$ac_dir" && ac_dir=.
33192d19872aSmrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
33202d19872aSmrg      lt_cv_path_LD=$ac_dir/$ac_prog
33212d19872aSmrg      # Check to see if the program is GNU ld.  I'd rather use --version,
33222d19872aSmrg      # but apparently some variants of GNU ld only accept -v.
33232d19872aSmrg      # Break only if it was the GNU/non-GNU ld that we prefer.
33242d19872aSmrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
33252d19872aSmrg      *GNU* | *'with BFD'*)
33262d19872aSmrg	test no != "$with_gnu_ld" && break
33272d19872aSmrg	;;
33282d19872aSmrg      *)
33292d19872aSmrg	test yes != "$with_gnu_ld" && break
33302d19872aSmrg	;;
33312d19872aSmrg      esac
33322d19872aSmrg    fi
33332d19872aSmrg  done
33342d19872aSmrg  IFS=$lt_save_ifs
33352d19872aSmrgelse
33362d19872aSmrg  lt_cv_path_LD=$LD # Let the user override the test with a path.
33372d19872aSmrgfi])
33382d19872aSmrgLD=$lt_cv_path_LD
33392d19872aSmrgif test -n "$LD"; then
33402d19872aSmrg  AC_MSG_RESULT($LD)
33412d19872aSmrgelse
33422d19872aSmrg  AC_MSG_RESULT(no)
33432d19872aSmrgfi
33442d19872aSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
33452d19872aSmrg_LT_PATH_LD_GNU
33462d19872aSmrgAC_SUBST([LD])
33472d19872aSmrg
33482d19872aSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
33492d19872aSmrg])# LT_PATH_LD
33502d19872aSmrg
33512d19872aSmrg# Old names:
33522d19872aSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
33532d19872aSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
33542d19872aSmrgdnl aclocal-1.4 backwards compatibility:
33552d19872aSmrgdnl AC_DEFUN([AM_PROG_LD], [])
33562d19872aSmrgdnl AC_DEFUN([AC_PROG_LD], [])
33572d19872aSmrg
33582d19872aSmrg
33592d19872aSmrg# _LT_PATH_LD_GNU
33602d19872aSmrg#- --------------
33612d19872aSmrgm4_defun([_LT_PATH_LD_GNU],
33622d19872aSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
33632d19872aSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
33642d19872aSmrgcase `$LD -v 2>&1 </dev/null` in
33652d19872aSmrg*GNU* | *'with BFD'*)
33662d19872aSmrg  lt_cv_prog_gnu_ld=yes
33672d19872aSmrg  ;;
33682d19872aSmrg*)
33692d19872aSmrg  lt_cv_prog_gnu_ld=no
33702d19872aSmrg  ;;
33712d19872aSmrgesac])
33722d19872aSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
33732d19872aSmrg])# _LT_PATH_LD_GNU
33742d19872aSmrg
33752d19872aSmrg
33762d19872aSmrg# _LT_CMD_RELOAD
33772d19872aSmrg# --------------
33782d19872aSmrg# find reload flag for linker
33792d19872aSmrg#   -- PORTME Some linkers may need a different reload flag.
33802d19872aSmrgm4_defun([_LT_CMD_RELOAD],
33812d19872aSmrg[AC_CACHE_CHECK([for $LD option to reload object files],
33822d19872aSmrg  lt_cv_ld_reload_flag,
33832d19872aSmrg  [lt_cv_ld_reload_flag='-r'])
33842d19872aSmrgreload_flag=$lt_cv_ld_reload_flag
33852d19872aSmrgcase $reload_flag in
33862d19872aSmrg"" | " "*) ;;
33872d19872aSmrg*) reload_flag=" $reload_flag" ;;
33882d19872aSmrgesac
33892d19872aSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
33902d19872aSmrgcase $host_os in
33912d19872aSmrg  cygwin* | mingw* | pw32* | cegcc*)
33922d19872aSmrg    if test yes != "$GCC"; then
33932d19872aSmrg      reload_cmds=false
33942d19872aSmrg    fi
33952d19872aSmrg    ;;
33962d19872aSmrg  darwin*)
33972d19872aSmrg    if test yes = "$GCC"; then
33982d19872aSmrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
33992d19872aSmrg    else
34002d19872aSmrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
34012d19872aSmrg    fi
34022d19872aSmrg    ;;
34032d19872aSmrgesac
34042d19872aSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
34052d19872aSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl
34062d19872aSmrg])# _LT_CMD_RELOAD
34072d19872aSmrg
34082d19872aSmrg
34092d19872aSmrg# _LT_PATH_DD
34102d19872aSmrg# -----------
34112d19872aSmrg# find a working dd
34122d19872aSmrgm4_defun([_LT_PATH_DD],
34132d19872aSmrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
34142d19872aSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i
34152d19872aSmrgcat conftest.i conftest.i >conftest2.i
34162d19872aSmrg: ${lt_DD:=$DD}
34172d19872aSmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
34182d19872aSmrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
34192d19872aSmrg  cmp -s conftest.i conftest.out \
34202d19872aSmrg  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
34212d19872aSmrgfi])
34222d19872aSmrgrm -f conftest.i conftest2.i conftest.out])
34232d19872aSmrg])# _LT_PATH_DD
34242d19872aSmrg
34252d19872aSmrg
34262d19872aSmrg# _LT_CMD_TRUNCATE
34272d19872aSmrg# ----------------
34282d19872aSmrg# find command to truncate a binary pipe
34292d19872aSmrgm4_defun([_LT_CMD_TRUNCATE],
34302d19872aSmrg[m4_require([_LT_PATH_DD])
34312d19872aSmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
34322d19872aSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i
34332d19872aSmrgcat conftest.i conftest.i >conftest2.i
34342d19872aSmrglt_cv_truncate_bin=
34352d19872aSmrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
34362d19872aSmrg  cmp -s conftest.i conftest.out \
34372d19872aSmrg  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
34382d19872aSmrgfi
34392d19872aSmrgrm -f conftest.i conftest2.i conftest.out
34402d19872aSmrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
34412d19872aSmrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
34422d19872aSmrg  [Command to truncate a binary pipe])
34432d19872aSmrg])# _LT_CMD_TRUNCATE
34442d19872aSmrg
34452d19872aSmrg
34462d19872aSmrg# _LT_CHECK_MAGIC_METHOD
34472d19872aSmrg# ----------------------
34482d19872aSmrg# how to check for library dependencies
34492d19872aSmrg#  -- PORTME fill in with the dynamic library characteristics
34502d19872aSmrgm4_defun([_LT_CHECK_MAGIC_METHOD],
34512d19872aSmrg[m4_require([_LT_DECL_EGREP])
34522d19872aSmrgm4_require([_LT_DECL_OBJDUMP])
34532d19872aSmrgAC_CACHE_CHECK([how to recognize dependent libraries],
34542d19872aSmrglt_cv_deplibs_check_method,
34552d19872aSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
34562d19872aSmrglt_cv_file_magic_test_file=
34572d19872aSmrglt_cv_deplibs_check_method='unknown'
34582d19872aSmrg# Need to set the preceding variable on all platforms that support
34592d19872aSmrg# interlibrary dependencies.
34602d19872aSmrg# 'none' -- dependencies not supported.
34612d19872aSmrg# 'unknown' -- same as none, but documents that we really don't know.
34622d19872aSmrg# 'pass_all' -- all dependencies passed with no checks.
34632d19872aSmrg# 'test_compile' -- check by making test program.
34642d19872aSmrg# 'file_magic [[regex]]' -- check by looking for files in library path
34652d19872aSmrg# that responds to the $file_magic_cmd with a given extended regex.
34662d19872aSmrg# If you have 'file' or equivalent on your system and you're not sure
34672d19872aSmrg# whether 'pass_all' will *always* work, you probably want this one.
34682d19872aSmrg
34692d19872aSmrgcase $host_os in
34702d19872aSmrgaix[[4-9]]*)
34712d19872aSmrg  lt_cv_deplibs_check_method=pass_all
34722d19872aSmrg  ;;
34732d19872aSmrg
34742d19872aSmrgbeos*)
34752d19872aSmrg  lt_cv_deplibs_check_method=pass_all
34762d19872aSmrg  ;;
34772d19872aSmrg
34782d19872aSmrgbsdi[[45]]*)
34792d19872aSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
34802d19872aSmrg  lt_cv_file_magic_cmd='$FILECMD -L'
34812d19872aSmrg  lt_cv_file_magic_test_file=/shlib/libc.so
34822d19872aSmrg  ;;
34832d19872aSmrg
34842d19872aSmrgcygwin*)
34852d19872aSmrg  # func_win32_libid is a shell function defined in ltmain.sh
34862d19872aSmrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
34872d19872aSmrg  lt_cv_file_magic_cmd='func_win32_libid'
34882d19872aSmrg  ;;
34892d19872aSmrg
34902d19872aSmrgmingw* | pw32*)
34912d19872aSmrg  # Base MSYS/MinGW do not provide the 'file' command needed by
34922d19872aSmrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
34932d19872aSmrg  # unless we find 'file', for example because we are cross-compiling.
34942d19872aSmrg  if ( file / ) >/dev/null 2>&1; then
34952d19872aSmrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
34962d19872aSmrg    lt_cv_file_magic_cmd='func_win32_libid'
34972d19872aSmrg  else
34982d19872aSmrg    # Keep this pattern in sync with the one in func_win32_libid.
34992d19872aSmrg    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
35002d19872aSmrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
35012d19872aSmrg  fi
35022d19872aSmrg  ;;
35032d19872aSmrg
35042d19872aSmrgcegcc*)
35052d19872aSmrg  # use the weaker test based on 'objdump'. See mingw*.
35062d19872aSmrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
35072d19872aSmrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
35082d19872aSmrg  ;;
35092d19872aSmrg
35102d19872aSmrgdarwin* | rhapsody*)
35112d19872aSmrg  lt_cv_deplibs_check_method=pass_all
35122d19872aSmrg  ;;
35132d19872aSmrg
35142d19872aSmrgfreebsd* | dragonfly* | midnightbsd*)
35152d19872aSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
35162d19872aSmrg    case $host_cpu in
35172d19872aSmrg    i*86 )
35182d19872aSmrg      # Not sure whether the presence of OpenBSD here was a mistake.
35192d19872aSmrg      # Let's accept both of them until this is cleared up.
35202d19872aSmrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
35212d19872aSmrg      lt_cv_file_magic_cmd=$FILECMD
35222d19872aSmrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
35232d19872aSmrg      ;;
35242d19872aSmrg    esac
35252d19872aSmrg  else
35262d19872aSmrg    lt_cv_deplibs_check_method=pass_all
35272d19872aSmrg  fi
35282d19872aSmrg  ;;
35292d19872aSmrg
35302d19872aSmrghaiku*)
35312d19872aSmrg  lt_cv_deplibs_check_method=pass_all
35322d19872aSmrg  ;;
35332d19872aSmrg
35342d19872aSmrghpux10.20* | hpux11*)
35352d19872aSmrg  lt_cv_file_magic_cmd=$FILECMD
35362d19872aSmrg  case $host_cpu in
35372d19872aSmrg  ia64*)
35382d19872aSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
35392d19872aSmrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
35402d19872aSmrg    ;;
35412d19872aSmrg  hppa*64*)
35422d19872aSmrg    [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]']
35432d19872aSmrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
35442d19872aSmrg    ;;
35452d19872aSmrg  *)
35462d19872aSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
35472d19872aSmrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
35482d19872aSmrg    ;;
35492d19872aSmrg  esac
35502d19872aSmrg  ;;
35512d19872aSmrg
35522d19872aSmrginterix[[3-9]]*)
35532d19872aSmrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
35542d19872aSmrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
35552d19872aSmrg  ;;
35562d19872aSmrg
35572d19872aSmrgirix5* | irix6* | nonstopux*)
35582d19872aSmrg  case $LD in
35592d19872aSmrg  *-32|*"-32 ") libmagic=32-bit;;
35602d19872aSmrg  *-n32|*"-n32 ") libmagic=N32;;
35612d19872aSmrg  *-64|*"-64 ") libmagic=64-bit;;
35622d19872aSmrg  *) libmagic=never-match;;
35632d19872aSmrg  esac
35642d19872aSmrg  lt_cv_deplibs_check_method=pass_all
35652d19872aSmrg  ;;
35662d19872aSmrg
35672d19872aSmrg# This must be glibc/ELF.
35682d19872aSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
35692d19872aSmrg  lt_cv_deplibs_check_method=pass_all
35702d19872aSmrg  ;;
35712d19872aSmrg
35722d19872aSmrgnetbsd*)
35732d19872aSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
35742d19872aSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
35752d19872aSmrg  else
35762d19872aSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
35772d19872aSmrg  fi
35782d19872aSmrg  ;;
35792d19872aSmrg
35802d19872aSmrgnewos6*)
35812d19872aSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
35822d19872aSmrg  lt_cv_file_magic_cmd=$FILECMD
35832d19872aSmrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
35842d19872aSmrg  ;;
35852d19872aSmrg
35862d19872aSmrg*nto* | *qnx*)
35872d19872aSmrg  lt_cv_deplibs_check_method=pass_all
35882d19872aSmrg  ;;
35892d19872aSmrg
35902d19872aSmrgopenbsd* | bitrig*)
35912d19872aSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
35922d19872aSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
35932d19872aSmrg  else
35942d19872aSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
35952d19872aSmrg  fi
35962d19872aSmrg  ;;
35972d19872aSmrg
35982d19872aSmrgosf3* | osf4* | osf5*)
35992d19872aSmrg  lt_cv_deplibs_check_method=pass_all
36002d19872aSmrg  ;;
36012d19872aSmrg
36022d19872aSmrgrdos*)
36032d19872aSmrg  lt_cv_deplibs_check_method=pass_all
36042d19872aSmrg  ;;
36052d19872aSmrg
36062d19872aSmrgsolaris*)
36072d19872aSmrg  lt_cv_deplibs_check_method=pass_all
36082d19872aSmrg  ;;
36092d19872aSmrg
36102d19872aSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
36112d19872aSmrg  lt_cv_deplibs_check_method=pass_all
36122d19872aSmrg  ;;
36132d19872aSmrg
36142d19872aSmrgsysv4 | sysv4.3*)
36152d19872aSmrg  case $host_vendor in
36162d19872aSmrg  motorola)
36172d19872aSmrg    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]]'
36182d19872aSmrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
36192d19872aSmrg    ;;
36202d19872aSmrg  ncr)
36212d19872aSmrg    lt_cv_deplibs_check_method=pass_all
36222d19872aSmrg    ;;
36232d19872aSmrg  sequent)
36242d19872aSmrg    lt_cv_file_magic_cmd='/bin/file'
36252d19872aSmrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
36262d19872aSmrg    ;;
36272d19872aSmrg  sni)
36282d19872aSmrg    lt_cv_file_magic_cmd='/bin/file'
36292d19872aSmrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
36302d19872aSmrg    lt_cv_file_magic_test_file=/lib/libc.so
36312d19872aSmrg    ;;
36322d19872aSmrg  siemens)
36332d19872aSmrg    lt_cv_deplibs_check_method=pass_all
36342d19872aSmrg    ;;
36352d19872aSmrg  pc)
36362d19872aSmrg    lt_cv_deplibs_check_method=pass_all
36372d19872aSmrg    ;;
36382d19872aSmrg  esac
36392d19872aSmrg  ;;
36402d19872aSmrg
36412d19872aSmrgtpf*)
36422d19872aSmrg  lt_cv_deplibs_check_method=pass_all
36432d19872aSmrg  ;;
36442d19872aSmrgos2*)
36452d19872aSmrg  lt_cv_deplibs_check_method=pass_all
36462d19872aSmrg  ;;
36472d19872aSmrgesac
36482d19872aSmrg])
36492d19872aSmrg
36502d19872aSmrgfile_magic_glob=
36512d19872aSmrgwant_nocaseglob=no
36522d19872aSmrgif test "$build" = "$host"; then
36532d19872aSmrg  case $host_os in
36542d19872aSmrg  mingw* | pw32*)
36552d19872aSmrg    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
36562d19872aSmrg      want_nocaseglob=yes
36572d19872aSmrg    else
36582d19872aSmrg      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
36592d19872aSmrg    fi
36602d19872aSmrg    ;;
36612d19872aSmrg  esac
36622d19872aSmrgfi
36632d19872aSmrg
36642d19872aSmrgfile_magic_cmd=$lt_cv_file_magic_cmd
36652d19872aSmrgdeplibs_check_method=$lt_cv_deplibs_check_method
36662d19872aSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
36672d19872aSmrg
36682d19872aSmrg_LT_DECL([], [deplibs_check_method], [1],
36692d19872aSmrg    [Method to check whether dependent libraries are shared objects])
36702d19872aSmrg_LT_DECL([], [file_magic_cmd], [1],
36712d19872aSmrg    [Command to use when deplibs_check_method = "file_magic"])
36722d19872aSmrg_LT_DECL([], [file_magic_glob], [1],
36732d19872aSmrg    [How to find potential files when deplibs_check_method = "file_magic"])
36742d19872aSmrg_LT_DECL([], [want_nocaseglob], [1],
36752d19872aSmrg    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
36762d19872aSmrg])# _LT_CHECK_MAGIC_METHOD
36772d19872aSmrg
36782d19872aSmrg
36792d19872aSmrg# LT_PATH_NM
36802d19872aSmrg# ----------
36812d19872aSmrg# find the pathname to a BSD- or MS-compatible name lister
36822d19872aSmrgAC_DEFUN([LT_PATH_NM],
36832d19872aSmrg[AC_REQUIRE([AC_PROG_CC])dnl
36842d19872aSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
36852d19872aSmrg[if test -n "$NM"; then
36862d19872aSmrg  # Let the user override the test.
36872d19872aSmrg  lt_cv_path_NM=$NM
36882d19872aSmrgelse
36892d19872aSmrg  lt_nm_to_check=${ac_tool_prefix}nm
36902d19872aSmrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
36912d19872aSmrg    lt_nm_to_check="$lt_nm_to_check nm"
36922d19872aSmrg  fi
36932d19872aSmrg  for lt_tmp_nm in $lt_nm_to_check; do
36942d19872aSmrg    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
36952d19872aSmrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
36962d19872aSmrg      IFS=$lt_save_ifs
36972d19872aSmrg      test -z "$ac_dir" && ac_dir=.
36982d19872aSmrg      tmp_nm=$ac_dir/$lt_tmp_nm
36992d19872aSmrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
37002d19872aSmrg	# Check to see if the nm accepts a BSD-compat flag.
37012d19872aSmrg	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
37022d19872aSmrg	#   nm: unknown option "B" ignored
37032d19872aSmrg	# Tru64's nm complains that /dev/null is an invalid object file
37042d19872aSmrg	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
37052d19872aSmrg	case $build_os in
37062d19872aSmrg	mingw*) lt_bad_file=conftest.nm/nofile ;;
37072d19872aSmrg	*) lt_bad_file=/dev/null ;;
37082d19872aSmrg	esac
37092d19872aSmrg	case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
37102d19872aSmrg	*$lt_bad_file* | *'Invalid file or object type'*)
37112d19872aSmrg	  lt_cv_path_NM="$tmp_nm -B"
37122d19872aSmrg	  break 2
37132d19872aSmrg	  ;;
37142d19872aSmrg	*)
37152d19872aSmrg	  case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
37162d19872aSmrg	  */dev/null*)
37172d19872aSmrg	    lt_cv_path_NM="$tmp_nm -p"
37182d19872aSmrg	    break 2
37192d19872aSmrg	    ;;
37202d19872aSmrg	  *)
37212d19872aSmrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
37222d19872aSmrg	    continue # so that we can try to find one that supports BSD flags
37232d19872aSmrg	    ;;
37242d19872aSmrg	  esac
37252d19872aSmrg	  ;;
37262d19872aSmrg	esac
37272d19872aSmrg      fi
37282d19872aSmrg    done
37292d19872aSmrg    IFS=$lt_save_ifs
37302d19872aSmrg  done
37312d19872aSmrg  : ${lt_cv_path_NM=no}
37322d19872aSmrgfi])
37332d19872aSmrgif test no != "$lt_cv_path_NM"; then
37342d19872aSmrg  NM=$lt_cv_path_NM
37352d19872aSmrgelse
37362d19872aSmrg  # Didn't find any BSD compatible name lister, look for dumpbin.
37372d19872aSmrg  if test -n "$DUMPBIN"; then :
37382d19872aSmrg    # Let the user override the test.
37392d19872aSmrg  else
37402d19872aSmrg    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
37412d19872aSmrg    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
37422d19872aSmrg    *COFF*)
37432d19872aSmrg      DUMPBIN="$DUMPBIN -symbols -headers"
37442d19872aSmrg      ;;
37452d19872aSmrg    *)
37462d19872aSmrg      DUMPBIN=:
37472d19872aSmrg      ;;
37482d19872aSmrg    esac
37492d19872aSmrg  fi
37502d19872aSmrg  AC_SUBST([DUMPBIN])
37512d19872aSmrg  if test : != "$DUMPBIN"; then
37522d19872aSmrg    NM=$DUMPBIN
37532d19872aSmrg  fi
37542d19872aSmrgfi
37552d19872aSmrgtest -z "$NM" && NM=nm
37562d19872aSmrgAC_SUBST([NM])
37572d19872aSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
37582d19872aSmrg
37592d19872aSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
37602d19872aSmrg  [lt_cv_nm_interface="BSD nm"
37612d19872aSmrg  echo "int some_variable = 0;" > conftest.$ac_ext
37622d19872aSmrg  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
37632d19872aSmrg  (eval "$ac_compile" 2>conftest.err)
37642d19872aSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
37652d19872aSmrg  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
37662d19872aSmrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
37672d19872aSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
37682d19872aSmrg  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
37692d19872aSmrg  cat conftest.out >&AS_MESSAGE_LOG_FD
37702d19872aSmrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
37712d19872aSmrg    lt_cv_nm_interface="MS dumpbin"
37722d19872aSmrg  fi
37732d19872aSmrg  rm -f conftest*])
37742d19872aSmrg])# LT_PATH_NM
37752d19872aSmrg
37762d19872aSmrg# Old names:
37772d19872aSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
37782d19872aSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
37792d19872aSmrgdnl aclocal-1.4 backwards compatibility:
37802d19872aSmrgdnl AC_DEFUN([AM_PROG_NM], [])
37812d19872aSmrgdnl AC_DEFUN([AC_PROG_NM], [])
37822d19872aSmrg
37832d19872aSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
37842d19872aSmrg# --------------------------------
37852d19872aSmrg# how to determine the name of the shared library
37862d19872aSmrg# associated with a specific link library.
37872d19872aSmrg#  -- PORTME fill in with the dynamic library characteristics
37882d19872aSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
37892d19872aSmrg[m4_require([_LT_DECL_EGREP])
37902d19872aSmrgm4_require([_LT_DECL_OBJDUMP])
37912d19872aSmrgm4_require([_LT_DECL_DLLTOOL])
37922d19872aSmrgAC_CACHE_CHECK([how to associate runtime and link libraries],
37932d19872aSmrglt_cv_sharedlib_from_linklib_cmd,
37942d19872aSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown'
37952d19872aSmrg
37962d19872aSmrgcase $host_os in
37972d19872aSmrgcygwin* | mingw* | pw32* | cegcc*)
37982d19872aSmrg  # two different shell functions defined in ltmain.sh;
37992d19872aSmrg  # decide which one to use based on capabilities of $DLLTOOL
38002d19872aSmrg  case `$DLLTOOL --help 2>&1` in
38012d19872aSmrg  *--identify-strict*)
38022d19872aSmrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
38032d19872aSmrg    ;;
38042d19872aSmrg  *)
38052d19872aSmrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
38062d19872aSmrg    ;;
38072d19872aSmrg  esac
38082d19872aSmrg  ;;
38092d19872aSmrg*)
38102d19872aSmrg  # fallback: assume linklib IS sharedlib
38112d19872aSmrg  lt_cv_sharedlib_from_linklib_cmd=$ECHO
38122d19872aSmrg  ;;
38132d19872aSmrgesac
38142d19872aSmrg])
38152d19872aSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
38162d19872aSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
38172d19872aSmrg
38182d19872aSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
38192d19872aSmrg    [Command to associate shared and link libraries])
38202d19872aSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
38212d19872aSmrg
38222d19872aSmrg
38232d19872aSmrg# _LT_PATH_MANIFEST_TOOL
38242d19872aSmrg# ----------------------
38252d19872aSmrg# locate the manifest tool
38262d19872aSmrgm4_defun([_LT_PATH_MANIFEST_TOOL],
38272d19872aSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
38282d19872aSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
38292d19872aSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
38302d19872aSmrg  [lt_cv_path_mainfest_tool=no
38312d19872aSmrg  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
38322d19872aSmrg  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
38332d19872aSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
38342d19872aSmrg  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
38352d19872aSmrg    lt_cv_path_mainfest_tool=yes
38362d19872aSmrg  fi
38372d19872aSmrg  rm -f conftest*])
38382d19872aSmrgif test yes != "$lt_cv_path_mainfest_tool"; then
38392d19872aSmrg  MANIFEST_TOOL=:
38402d19872aSmrgfi
38412d19872aSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
38422d19872aSmrg])# _LT_PATH_MANIFEST_TOOL
38432d19872aSmrg
38442d19872aSmrg
38452d19872aSmrg# _LT_DLL_DEF_P([FILE])
38462d19872aSmrg# ---------------------
38472d19872aSmrg# True iff FILE is a Windows DLL '.def' file.
38482d19872aSmrg# Keep in sync with func_dll_def_p in the libtool script
38492d19872aSmrgAC_DEFUN([_LT_DLL_DEF_P],
38502d19872aSmrg[dnl
38512d19872aSmrg  test DEF = "`$SED -n dnl
38522d19872aSmrg    -e '\''s/^[[	 ]]*//'\'' dnl Strip leading whitespace
38532d19872aSmrg    -e '\''/^\(;.*\)*$/d'\'' dnl      Delete empty lines and comments
38542d19872aSmrg    -e '\''s/^\(EXPORTS\|LIBRARY\)\([[	 ]].*\)*$/DEF/p'\'' dnl
38552d19872aSmrg    -e q dnl                          Only consider the first "real" line
38562d19872aSmrg    $1`" dnl
38572d19872aSmrg])# _LT_DLL_DEF_P
38582d19872aSmrg
38592d19872aSmrg
38602d19872aSmrg# LT_LIB_M
38612d19872aSmrg# --------
38622d19872aSmrg# check for math library
38632d19872aSmrgAC_DEFUN([LT_LIB_M],
38642d19872aSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
38652d19872aSmrgLIBM=
38662d19872aSmrgcase $host in
38672d19872aSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
38682d19872aSmrg  # These system don't have libm, or don't need it
38692d19872aSmrg  ;;
38702d19872aSmrg*-ncr-sysv4.3*)
38712d19872aSmrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
38722d19872aSmrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
38732d19872aSmrg  ;;
38742d19872aSmrg*)
38752d19872aSmrg  AC_CHECK_LIB(m, cos, LIBM=-lm)
38762d19872aSmrg  ;;
38772d19872aSmrgesac
38782d19872aSmrgAC_SUBST([LIBM])
38792d19872aSmrg])# LT_LIB_M
38802d19872aSmrg
38812d19872aSmrg# Old name:
38822d19872aSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
38832d19872aSmrgdnl aclocal-1.4 backwards compatibility:
38842d19872aSmrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
38852d19872aSmrg
38862d19872aSmrg
38872d19872aSmrg# _LT_COMPILER_NO_RTTI([TAGNAME])
38882d19872aSmrg# -------------------------------
38892d19872aSmrgm4_defun([_LT_COMPILER_NO_RTTI],
38902d19872aSmrg[m4_require([_LT_TAG_COMPILER])dnl
38912d19872aSmrg
38922d19872aSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
38932d19872aSmrg
38942d19872aSmrgif test yes = "$GCC"; then
38952d19872aSmrg  case $cc_basename in
38962d19872aSmrg  nvcc*)
38972d19872aSmrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
38982d19872aSmrg  *)
38992d19872aSmrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
39002d19872aSmrg  esac
39012d19872aSmrg
39022d19872aSmrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
39032d19872aSmrg    lt_cv_prog_compiler_rtti_exceptions,
39042d19872aSmrg    [-fno-rtti -fno-exceptions], [],
39052d19872aSmrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
39062d19872aSmrgfi
39072d19872aSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
39082d19872aSmrg	[Compiler flag to turn off builtin functions])
39092d19872aSmrg])# _LT_COMPILER_NO_RTTI
39102d19872aSmrg
39112d19872aSmrg
39122d19872aSmrg# _LT_CMD_GLOBAL_SYMBOLS
39132d19872aSmrg# ----------------------
39142d19872aSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
39152d19872aSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
39162d19872aSmrgAC_REQUIRE([AC_PROG_CC])dnl
39172d19872aSmrgAC_REQUIRE([AC_PROG_AWK])dnl
39182d19872aSmrgAC_REQUIRE([LT_PATH_NM])dnl
39192d19872aSmrgAC_REQUIRE([LT_PATH_LD])dnl
39202d19872aSmrgm4_require([_LT_DECL_SED])dnl
39212d19872aSmrgm4_require([_LT_DECL_EGREP])dnl
39222d19872aSmrgm4_require([_LT_TAG_COMPILER])dnl
39232d19872aSmrg
39242d19872aSmrg# Check for command to grab the raw symbol name followed by C symbol from nm.
39252d19872aSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
39262d19872aSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
39272d19872aSmrg[
39282d19872aSmrg# These are sane defaults that work on at least a few old systems.
39292d19872aSmrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
39302d19872aSmrg
39312d19872aSmrg# Character class describing NM global symbol codes.
39322d19872aSmrgsymcode='[[BCDEGRST]]'
39332d19872aSmrg
39342d19872aSmrg# Regexp to match symbols that can be accessed directly from C.
39352d19872aSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
39362d19872aSmrg
39372d19872aSmrg# Define system-specific variables.
39382d19872aSmrgcase $host_os in
39392d19872aSmrgaix*)
39402d19872aSmrg  symcode='[[BCDT]]'
39412d19872aSmrg  ;;
39422d19872aSmrgcygwin* | mingw* | pw32* | cegcc*)
39432d19872aSmrg  symcode='[[ABCDGISTW]]'
39442d19872aSmrg  ;;
39452d19872aSmrghpux*)
39462d19872aSmrg  if test ia64 = "$host_cpu"; then
39472d19872aSmrg    symcode='[[ABCDEGRST]]'
39482d19872aSmrg  fi
39492d19872aSmrg  ;;
39502d19872aSmrgirix* | nonstopux*)
39512d19872aSmrg  symcode='[[BCDEGRST]]'
39522d19872aSmrg  ;;
39532d19872aSmrgosf*)
39542d19872aSmrg  symcode='[[BCDEGQRST]]'
39552d19872aSmrg  ;;
39562d19872aSmrgsolaris*)
39572d19872aSmrg  symcode='[[BDRT]]'
39582d19872aSmrg  ;;
39592d19872aSmrgsco3.2v5*)
39602d19872aSmrg  symcode='[[DT]]'
39612d19872aSmrg  ;;
39622d19872aSmrgsysv4.2uw2*)
39632d19872aSmrg  symcode='[[DT]]'
39642d19872aSmrg  ;;
39652d19872aSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
39662d19872aSmrg  symcode='[[ABDT]]'
39672d19872aSmrg  ;;
39682d19872aSmrgsysv4)
39692d19872aSmrg  symcode='[[DFNSTU]]'
39702d19872aSmrg  ;;
39712d19872aSmrgesac
39722d19872aSmrg
39732d19872aSmrg# If we're using GNU nm, then use its standard symbol codes.
39742d19872aSmrgcase `$NM -V 2>&1` in
39752d19872aSmrg*GNU* | *'with BFD'*)
39762d19872aSmrg  symcode='[[ABCDGIRSTW]]' ;;
39772d19872aSmrgesac
39782d19872aSmrg
39792d19872aSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
39802d19872aSmrg  # Gets list of data symbols to import.
39812d19872aSmrg  lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
39822d19872aSmrg  # Adjust the below global symbol transforms to fixup imported variables.
39832d19872aSmrg  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
39842d19872aSmrg  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
39852d19872aSmrg  lt_c_name_lib_hook="\
39862d19872aSmrg  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
39872d19872aSmrg  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
39882d19872aSmrgelse
39892d19872aSmrg  # Disable hooks by default.
39902d19872aSmrg  lt_cv_sys_global_symbol_to_import=
39912d19872aSmrg  lt_cdecl_hook=
39922d19872aSmrg  lt_c_name_hook=
39932d19872aSmrg  lt_c_name_lib_hook=
39942d19872aSmrgfi
39952d19872aSmrg
39962d19872aSmrg# Transform an extracted symbol line into a proper C declaration.
39972d19872aSmrg# Some systems (esp. on ia64) link data and code symbols differently,
39982d19872aSmrg# so use this general approach.
39992d19872aSmrglt_cv_sys_global_symbol_to_cdecl="$SED -n"\
40002d19872aSmrg$lt_cdecl_hook\
40012d19872aSmrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
40022d19872aSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
40032d19872aSmrg
40042d19872aSmrg# Transform an extracted symbol line into symbol name and symbol address
40052d19872aSmrglt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
40062d19872aSmrg$lt_c_name_hook\
40072d19872aSmrg" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
40082d19872aSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
40092d19872aSmrg
40102d19872aSmrg# Transform an extracted symbol line into symbol name with lib prefix and
40112d19872aSmrg# symbol address.
40122d19872aSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
40132d19872aSmrg$lt_c_name_lib_hook\
40142d19872aSmrg" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
40152d19872aSmrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
40162d19872aSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
40172d19872aSmrg
40182d19872aSmrg# Handle CRLF in mingw tool chain
40192d19872aSmrgopt_cr=
40202d19872aSmrgcase $build_os in
40212d19872aSmrgmingw*)
40222d19872aSmrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
40232d19872aSmrg  ;;
40242d19872aSmrgesac
40252d19872aSmrg
40262d19872aSmrg# Try without a prefix underscore, then with it.
40272d19872aSmrgfor ac_symprfx in "" "_"; do
40282d19872aSmrg
40292d19872aSmrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
40302d19872aSmrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
40312d19872aSmrg
40322d19872aSmrg  # Write the raw and C identifiers.
40332d19872aSmrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
40342d19872aSmrg    # Fake it for dumpbin and say T for any non-static function,
40352d19872aSmrg    # D for any global variable and I for any imported variable.
40362d19872aSmrg    # Also find C++ and __fastcall symbols from MSVC++ or ICC,
40372d19872aSmrg    # which start with @ or ?.
40382d19872aSmrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
40392d19872aSmrg"     {last_section=section; section=\$ 3};"\
40402d19872aSmrg"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
40412d19872aSmrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
40422d19872aSmrg"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
40432d19872aSmrg"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
40442d19872aSmrg"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
40452d19872aSmrg"     \$ 0!~/External *\|/{next};"\
40462d19872aSmrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
40472d19872aSmrg"     {if(hide[section]) next};"\
40482d19872aSmrg"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
40492d19872aSmrg"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
40502d19872aSmrg"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
40512d19872aSmrg"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
40522d19872aSmrg"     ' prfx=^$ac_symprfx]"
40532d19872aSmrg  else
40542d19872aSmrg    lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
40552d19872aSmrg  fi
40562d19872aSmrg  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
40572d19872aSmrg
40582d19872aSmrg  # Check to see that the pipe works correctly.
40592d19872aSmrg  pipe_works=no
40602d19872aSmrg
40612d19872aSmrg  rm -f conftest*
40622d19872aSmrg  cat > conftest.$ac_ext <<_LT_EOF
40632d19872aSmrg#ifdef __cplusplus
40642d19872aSmrgextern "C" {
40652d19872aSmrg#endif
40662d19872aSmrgchar nm_test_var;
40672d19872aSmrgvoid nm_test_func(void);
40682d19872aSmrgvoid nm_test_func(void){}
40692d19872aSmrg#ifdef __cplusplus
40702d19872aSmrg}
40712d19872aSmrg#endif
40722d19872aSmrgint main(){nm_test_var='a';nm_test_func();return(0);}
40732d19872aSmrg_LT_EOF
40742d19872aSmrg
40752d19872aSmrg  if AC_TRY_EVAL(ac_compile); then
40762d19872aSmrg    # Now try to grab the symbols.
40772d19872aSmrg    nlist=conftest.nm
40782d19872aSmrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
40792d19872aSmrg      # Try sorting and uniquifying the output.
40802d19872aSmrg      if sort "$nlist" | uniq > "$nlist"T; then
40812d19872aSmrg	mv -f "$nlist"T "$nlist"
40822d19872aSmrg      else
40832d19872aSmrg	rm -f "$nlist"T
40842d19872aSmrg      fi
40852d19872aSmrg
40862d19872aSmrg      # Make sure that we snagged all the symbols we need.
40872d19872aSmrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
40882d19872aSmrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
40892d19872aSmrg	  cat <<_LT_EOF > conftest.$ac_ext
40902d19872aSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
40912d19872aSmrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
40922d19872aSmrg/* DATA imports from DLLs on WIN32 can't be const, because runtime
40932d19872aSmrg   relocations are performed -- see ld's documentation on pseudo-relocs.  */
40942d19872aSmrg# define LT@&t@_DLSYM_CONST
40952d19872aSmrg#elif defined __osf__
40962d19872aSmrg/* This system does not cope well with relocations in const data.  */
40972d19872aSmrg# define LT@&t@_DLSYM_CONST
40982d19872aSmrg#else
40992d19872aSmrg# define LT@&t@_DLSYM_CONST const
41002d19872aSmrg#endif
41012d19872aSmrg
41022d19872aSmrg#ifdef __cplusplus
41032d19872aSmrgextern "C" {
41042d19872aSmrg#endif
41052d19872aSmrg
41062d19872aSmrg_LT_EOF
41072d19872aSmrg	  # Now generate the symbol file.
41082d19872aSmrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
41092d19872aSmrg
41102d19872aSmrg	  cat <<_LT_EOF >> conftest.$ac_ext
41112d19872aSmrg
41122d19872aSmrg/* The mapping between symbol names and symbols.  */
41132d19872aSmrgLT@&t@_DLSYM_CONST struct {
41142d19872aSmrg  const char *name;
41152d19872aSmrg  void       *address;
41162d19872aSmrg}
41172d19872aSmrglt__PROGRAM__LTX_preloaded_symbols[[]] =
41182d19872aSmrg{
41192d19872aSmrg  { "@PROGRAM@", (void *) 0 },
41202d19872aSmrg_LT_EOF
41212d19872aSmrg	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
41222d19872aSmrg	  cat <<\_LT_EOF >> conftest.$ac_ext
41232d19872aSmrg  {0, (void *) 0}
41242d19872aSmrg};
41252d19872aSmrg
41262d19872aSmrg/* This works around a problem in FreeBSD linker */
41272d19872aSmrg#ifdef FREEBSD_WORKAROUND
41282d19872aSmrgstatic const void *lt_preloaded_setup() {
41292d19872aSmrg  return lt__PROGRAM__LTX_preloaded_symbols;
41302d19872aSmrg}
41312d19872aSmrg#endif
41322d19872aSmrg
41332d19872aSmrg#ifdef __cplusplus
41342d19872aSmrg}
41352d19872aSmrg#endif
41362d19872aSmrg_LT_EOF
41372d19872aSmrg	  # Now try linking the two files.
41382d19872aSmrg	  mv conftest.$ac_objext conftstm.$ac_objext
41392d19872aSmrg	  lt_globsym_save_LIBS=$LIBS
41402d19872aSmrg	  lt_globsym_save_CFLAGS=$CFLAGS
41412d19872aSmrg	  LIBS=conftstm.$ac_objext
41422d19872aSmrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
41432d19872aSmrg	  if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
41442d19872aSmrg	    pipe_works=yes
41452d19872aSmrg	  fi
41462d19872aSmrg	  LIBS=$lt_globsym_save_LIBS
41472d19872aSmrg	  CFLAGS=$lt_globsym_save_CFLAGS
41482d19872aSmrg	else
41492d19872aSmrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
41502d19872aSmrg	fi
41512d19872aSmrg      else
41522d19872aSmrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
41532d19872aSmrg      fi
41542d19872aSmrg    else
41552d19872aSmrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
41562d19872aSmrg    fi
41572d19872aSmrg  else
41582d19872aSmrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
41592d19872aSmrg    cat conftest.$ac_ext >&5
41602d19872aSmrg  fi
41612d19872aSmrg  rm -rf conftest* conftst*
41622d19872aSmrg
41632d19872aSmrg  # Do not use the global_symbol_pipe unless it works.
41642d19872aSmrg  if test yes = "$pipe_works"; then
41652d19872aSmrg    break
41662d19872aSmrg  else
41672d19872aSmrg    lt_cv_sys_global_symbol_pipe=
41682d19872aSmrg  fi
41692d19872aSmrgdone
41702d19872aSmrg])
41712d19872aSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
41722d19872aSmrg  lt_cv_sys_global_symbol_to_cdecl=
41732d19872aSmrgfi
41742d19872aSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
41752d19872aSmrg  AC_MSG_RESULT(failed)
41762d19872aSmrgelse
41772d19872aSmrg  AC_MSG_RESULT(ok)
41782d19872aSmrgfi
41792d19872aSmrg
41802d19872aSmrg# Response file support.
41812d19872aSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
41822d19872aSmrg  nm_file_list_spec='@'
41832d19872aSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
41842d19872aSmrg  nm_file_list_spec='@'
41852d19872aSmrgfi
41862d19872aSmrg
41872d19872aSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
41882d19872aSmrg    [Take the output of nm and produce a listing of raw symbols and C names])
41892d19872aSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
41902d19872aSmrg    [Transform the output of nm in a proper C declaration])
41912d19872aSmrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
41922d19872aSmrg    [Transform the output of nm into a list of symbols to manually relocate])
41932d19872aSmrg_LT_DECL([global_symbol_to_c_name_address],
41942d19872aSmrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
41952d19872aSmrg    [Transform the output of nm in a C name address pair])
41962d19872aSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
41972d19872aSmrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
41982d19872aSmrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
41992d19872aSmrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
42002d19872aSmrg    [The name lister interface])
42012d19872aSmrg_LT_DECL([], [nm_file_list_spec], [1],
42022d19872aSmrg    [Specify filename containing input files for $NM])
42032d19872aSmrg]) # _LT_CMD_GLOBAL_SYMBOLS
42042d19872aSmrg
42052d19872aSmrg
42062d19872aSmrg# _LT_COMPILER_PIC([TAGNAME])
42072d19872aSmrg# ---------------------------
42082d19872aSmrgm4_defun([_LT_COMPILER_PIC],
42092d19872aSmrg[m4_require([_LT_TAG_COMPILER])dnl
42102d19872aSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
42112d19872aSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
42122d19872aSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
42132d19872aSmrg
42142d19872aSmrgm4_if([$1], [CXX], [
42152d19872aSmrg  # C++ specific cases for pic, static, wl, etc.
42162d19872aSmrg  if test yes = "$GXX"; then
42172d19872aSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
42182d19872aSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
42192d19872aSmrg
42202d19872aSmrg    case $host_os in
42212d19872aSmrg    aix*)
42222d19872aSmrg      # All AIX code is PIC.
42232d19872aSmrg      if test ia64 = "$host_cpu"; then
42242d19872aSmrg	# AIX 5 now supports IA64 processor
42252d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
42262d19872aSmrg      fi
42272d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
42282d19872aSmrg      ;;
42292d19872aSmrg
42302d19872aSmrg    amigaos*)
42312d19872aSmrg      case $host_cpu in
42322d19872aSmrg      powerpc)
42332d19872aSmrg            # see comment about AmigaOS4 .so support
42342d19872aSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
42352d19872aSmrg        ;;
42362d19872aSmrg      m68k)
42372d19872aSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
42382d19872aSmrg            # adding the '-m68020' flag to GCC prevents building anything better,
42392d19872aSmrg            # like '-m68040'.
42402d19872aSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
42412d19872aSmrg        ;;
42422d19872aSmrg      esac
42432d19872aSmrg      ;;
42442d19872aSmrg
42452d19872aSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
42462d19872aSmrg      # PIC is the default for these OSes.
42472d19872aSmrg      ;;
42482d19872aSmrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
42492d19872aSmrg      # This hack is so that the source file can tell whether it is being
42502d19872aSmrg      # built for inclusion in a dll (and should export symbols for example).
42512d19872aSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
42522d19872aSmrg      # (--disable-auto-import) libraries
42532d19872aSmrg      m4_if([$1], [GCJ], [],
42542d19872aSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
42552d19872aSmrg      case $host_os in
42562d19872aSmrg      os2*)
42572d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
42582d19872aSmrg	;;
42592d19872aSmrg      esac
42602d19872aSmrg      ;;
42612d19872aSmrg    darwin* | rhapsody*)
42622d19872aSmrg      # PIC is the default on this platform
42632d19872aSmrg      # Common symbols not allowed in MH_DYLIB files
42642d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
42652d19872aSmrg      ;;
42662d19872aSmrg    *djgpp*)
42672d19872aSmrg      # DJGPP does not support shared libraries at all
42682d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
42692d19872aSmrg      ;;
42702d19872aSmrg    haiku*)
42712d19872aSmrg      # PIC is the default for Haiku.
42722d19872aSmrg      # The "-static" flag exists, but is broken.
42732d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
42742d19872aSmrg      ;;
42752d19872aSmrg    interix[[3-9]]*)
42762d19872aSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
42772d19872aSmrg      # Instead, we relocate shared libraries at runtime.
42782d19872aSmrg      ;;
42792d19872aSmrg    sysv4*MP*)
42802d19872aSmrg      if test -d /usr/nec; then
42812d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
42822d19872aSmrg      fi
42832d19872aSmrg      ;;
42842d19872aSmrg    hpux*)
42852d19872aSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
42862d19872aSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
42872d19872aSmrg      # sets the default TLS model and affects inlining.
42882d19872aSmrg      case $host_cpu in
42892d19872aSmrg      hppa*64*)
42902d19872aSmrg	;;
42912d19872aSmrg      *)
42922d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
42932d19872aSmrg	;;
42942d19872aSmrg      esac
42952d19872aSmrg      ;;
42962d19872aSmrg    *qnx* | *nto*)
42972d19872aSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
42982d19872aSmrg      # it will coredump.
42992d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
43002d19872aSmrg      ;;
43012d19872aSmrg    *)
43022d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
43032d19872aSmrg      ;;
43042d19872aSmrg    esac
43052d19872aSmrg  else
43062d19872aSmrg    case $host_os in
43072d19872aSmrg      aix[[4-9]]*)
43082d19872aSmrg	# All AIX code is PIC.
43092d19872aSmrg	if test ia64 = "$host_cpu"; then
43102d19872aSmrg	  # AIX 5 now supports IA64 processor
43112d19872aSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
43122d19872aSmrg	else
43132d19872aSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
43142d19872aSmrg	fi
43152d19872aSmrg	;;
43162d19872aSmrg      chorus*)
43172d19872aSmrg	case $cc_basename in
43182d19872aSmrg	cxch68*)
43192d19872aSmrg	  # Green Hills C++ Compiler
43202d19872aSmrg	  # _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"
43212d19872aSmrg	  ;;
43222d19872aSmrg	esac
43232d19872aSmrg	;;
43242d19872aSmrg      mingw* | cygwin* | os2* | pw32* | cegcc*)
43252d19872aSmrg	# This hack is so that the source file can tell whether it is being
43262d19872aSmrg	# built for inclusion in a dll (and should export symbols for example).
43272d19872aSmrg	m4_if([$1], [GCJ], [],
43282d19872aSmrg	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
43292d19872aSmrg	;;
43302d19872aSmrg      dgux*)
43312d19872aSmrg	case $cc_basename in
43322d19872aSmrg	  ec++*)
43332d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
43342d19872aSmrg	    ;;
43352d19872aSmrg	  ghcx*)
43362d19872aSmrg	    # Green Hills C++ Compiler
43372d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
43382d19872aSmrg	    ;;
43392d19872aSmrg	  *)
43402d19872aSmrg	    ;;
43412d19872aSmrg	esac
43422d19872aSmrg	;;
43432d19872aSmrg      freebsd* | dragonfly* | midnightbsd*)
43442d19872aSmrg	# FreeBSD uses GNU C++
43452d19872aSmrg	;;
43462d19872aSmrg      hpux9* | hpux10* | hpux11*)
43472d19872aSmrg	case $cc_basename in
43482d19872aSmrg	  CC*)
43492d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43502d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
43512d19872aSmrg	    if test ia64 != "$host_cpu"; then
43522d19872aSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
43532d19872aSmrg	    fi
43542d19872aSmrg	    ;;
43552d19872aSmrg	  aCC*)
43562d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43572d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
43582d19872aSmrg	    case $host_cpu in
43592d19872aSmrg	    hppa*64*|ia64*)
43602d19872aSmrg	      # +Z the default
43612d19872aSmrg	      ;;
43622d19872aSmrg	    *)
43632d19872aSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
43642d19872aSmrg	      ;;
43652d19872aSmrg	    esac
43662d19872aSmrg	    ;;
43672d19872aSmrg	  *)
43682d19872aSmrg	    ;;
43692d19872aSmrg	esac
43702d19872aSmrg	;;
43712d19872aSmrg      interix*)
43722d19872aSmrg	# This is c89, which is MS Visual C++ (no shared libs)
43732d19872aSmrg	# Anyone wants to do a port?
43742d19872aSmrg	;;
43752d19872aSmrg      irix5* | irix6* | nonstopux*)
43762d19872aSmrg	case $cc_basename in
43772d19872aSmrg	  CC*)
43782d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43792d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
43802d19872aSmrg	    # CC pic flag -KPIC is the default.
43812d19872aSmrg	    ;;
43822d19872aSmrg	  *)
43832d19872aSmrg	    ;;
43842d19872aSmrg	esac
43852d19872aSmrg	;;
43862d19872aSmrg      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
43872d19872aSmrg	case $cc_basename in
43882d19872aSmrg	  KCC*)
43892d19872aSmrg	    # KAI C++ Compiler
43902d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
43912d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
43922d19872aSmrg	    ;;
43932d19872aSmrg	  ecpc* )
43942d19872aSmrg	    # old Intel C++ for x86_64, which still supported -KPIC.
43952d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43962d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
43972d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
43982d19872aSmrg	    ;;
43992d19872aSmrg	  icpc* )
44002d19872aSmrg	    # Intel C++, used to be incompatible with GCC.
44012d19872aSmrg	    # ICC 10 doesn't accept -KPIC any more.
44022d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
44032d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
44042d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
44052d19872aSmrg	    ;;
44062d19872aSmrg	  pgCC* | pgcpp*)
44072d19872aSmrg	    # Portland Group C++ compiler
44082d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
44092d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
44102d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
44112d19872aSmrg	    ;;
44122d19872aSmrg	  cxx*)
44132d19872aSmrg	    # Compaq C++
44142d19872aSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
44152d19872aSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
44162d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
44172d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
44182d19872aSmrg	    ;;
44192d19872aSmrg	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
44202d19872aSmrg	    # IBM XL 8.0, 9.0 on PPC and BlueGene
44212d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
44222d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
44232d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
44242d19872aSmrg	    ;;
44252d19872aSmrg	  *)
44262d19872aSmrg	    case `$CC -V 2>&1 | $SED 5q` in
44272d19872aSmrg	    *Sun\ C*)
44282d19872aSmrg	      # Sun C++ 5.9
44292d19872aSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
44302d19872aSmrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
44312d19872aSmrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
44322d19872aSmrg	      ;;
44332d19872aSmrg	    esac
44342d19872aSmrg	    ;;
44352d19872aSmrg	esac
44362d19872aSmrg	;;
44372d19872aSmrg      lynxos*)
44382d19872aSmrg	;;
44392d19872aSmrg      m88k*)
44402d19872aSmrg	;;
44412d19872aSmrg      mvs*)
44422d19872aSmrg	case $cc_basename in
44432d19872aSmrg	  cxx*)
44442d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
44452d19872aSmrg	    ;;
44462d19872aSmrg	  *)
44472d19872aSmrg	    ;;
44482d19872aSmrg	esac
44492d19872aSmrg	;;
44502d19872aSmrg      netbsd*)
44512d19872aSmrg	;;
44522d19872aSmrg      *qnx* | *nto*)
44532d19872aSmrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
44542d19872aSmrg        # it will coredump.
44552d19872aSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
44562d19872aSmrg        ;;
44572d19872aSmrg      osf3* | osf4* | osf5*)
44582d19872aSmrg	case $cc_basename in
44592d19872aSmrg	  KCC*)
44602d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
44612d19872aSmrg	    ;;
44622d19872aSmrg	  RCC*)
44632d19872aSmrg	    # Rational C++ 2.4.1
44642d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
44652d19872aSmrg	    ;;
44662d19872aSmrg	  cxx*)
44672d19872aSmrg	    # Digital/Compaq C++
44682d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
44692d19872aSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
44702d19872aSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
44712d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
44722d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
44732d19872aSmrg	    ;;
44742d19872aSmrg	  *)
44752d19872aSmrg	    ;;
44762d19872aSmrg	esac
44772d19872aSmrg	;;
44782d19872aSmrg      psos*)
44792d19872aSmrg	;;
44802d19872aSmrg      solaris*)
44812d19872aSmrg	case $cc_basename in
44822d19872aSmrg	  CC* | sunCC*)
44832d19872aSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
44842d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
44852d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
44862d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
44872d19872aSmrg	    ;;
44882d19872aSmrg	  gcx*)
44892d19872aSmrg	    # Green Hills C++ Compiler
44902d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
44912d19872aSmrg	    ;;
44922d19872aSmrg	  *)
44932d19872aSmrg	    ;;
44942d19872aSmrg	esac
44952d19872aSmrg	;;
44962d19872aSmrg      sunos4*)
44972d19872aSmrg	case $cc_basename in
44982d19872aSmrg	  CC*)
44992d19872aSmrg	    # Sun C++ 4.x
45002d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
45012d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
45022d19872aSmrg	    ;;
45032d19872aSmrg	  lcc*)
45042d19872aSmrg	    # Lucid
45052d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
45062d19872aSmrg	    ;;
45072d19872aSmrg	  *)
45082d19872aSmrg	    ;;
45092d19872aSmrg	esac
45102d19872aSmrg	;;
45112d19872aSmrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
45122d19872aSmrg	case $cc_basename in
45132d19872aSmrg	  CC*)
45142d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
45152d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
45162d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
45172d19872aSmrg	    ;;
45182d19872aSmrg	esac
45192d19872aSmrg	;;
45202d19872aSmrg      tandem*)
45212d19872aSmrg	case $cc_basename in
45222d19872aSmrg	  NCC*)
45232d19872aSmrg	    # NonStop-UX NCC 3.20
45242d19872aSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
45252d19872aSmrg	    ;;
45262d19872aSmrg	  *)
45272d19872aSmrg	    ;;
45282d19872aSmrg	esac
45292d19872aSmrg	;;
45302d19872aSmrg      vxworks*)
45312d19872aSmrg	;;
45322d19872aSmrg      *)
45332d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
45342d19872aSmrg	;;
45352d19872aSmrg    esac
45362d19872aSmrg  fi
45372d19872aSmrg],
45382d19872aSmrg[
45392d19872aSmrg  if test yes = "$GCC"; then
45402d19872aSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
45412d19872aSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
45422d19872aSmrg
45432d19872aSmrg    case $host_os in
45442d19872aSmrg      aix*)
45452d19872aSmrg      # All AIX code is PIC.
45462d19872aSmrg      if test ia64 = "$host_cpu"; then
45472d19872aSmrg	# AIX 5 now supports IA64 processor
45482d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
45492d19872aSmrg      fi
45502d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
45512d19872aSmrg      ;;
45522d19872aSmrg
45532d19872aSmrg    amigaos*)
45542d19872aSmrg      case $host_cpu in
45552d19872aSmrg      powerpc)
45562d19872aSmrg            # see comment about AmigaOS4 .so support
45572d19872aSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
45582d19872aSmrg        ;;
45592d19872aSmrg      m68k)
45602d19872aSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
45612d19872aSmrg            # adding the '-m68020' flag to GCC prevents building anything better,
45622d19872aSmrg            # like '-m68040'.
45632d19872aSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
45642d19872aSmrg        ;;
45652d19872aSmrg      esac
45662d19872aSmrg      ;;
45672d19872aSmrg
45682d19872aSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
45692d19872aSmrg      # PIC is the default for these OSes.
45702d19872aSmrg      ;;
45712d19872aSmrg
45722d19872aSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
45732d19872aSmrg      # This hack is so that the source file can tell whether it is being
45742d19872aSmrg      # built for inclusion in a dll (and should export symbols for example).
45752d19872aSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
45762d19872aSmrg      # (--disable-auto-import) libraries
45772d19872aSmrg      m4_if([$1], [GCJ], [],
45782d19872aSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
45792d19872aSmrg      case $host_os in
45802d19872aSmrg      os2*)
45812d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
45822d19872aSmrg	;;
45832d19872aSmrg      esac
45842d19872aSmrg      ;;
45852d19872aSmrg
45862d19872aSmrg    darwin* | rhapsody*)
45872d19872aSmrg      # PIC is the default on this platform
45882d19872aSmrg      # Common symbols not allowed in MH_DYLIB files
45892d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
45902d19872aSmrg      ;;
45912d19872aSmrg
45922d19872aSmrg    haiku*)
45932d19872aSmrg      # PIC is the default for Haiku.
45942d19872aSmrg      # The "-static" flag exists, but is broken.
45952d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
45962d19872aSmrg      ;;
45972d19872aSmrg
45982d19872aSmrg    hpux*)
45992d19872aSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
46002d19872aSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
46012d19872aSmrg      # sets the default TLS model and affects inlining.
46022d19872aSmrg      case $host_cpu in
46032d19872aSmrg      hppa*64*)
46042d19872aSmrg	# +Z the default
46052d19872aSmrg	;;
46062d19872aSmrg      *)
46072d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
46082d19872aSmrg	;;
46092d19872aSmrg      esac
46102d19872aSmrg      ;;
46112d19872aSmrg
46122d19872aSmrg    interix[[3-9]]*)
46132d19872aSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
46142d19872aSmrg      # Instead, we relocate shared libraries at runtime.
46152d19872aSmrg      ;;
46162d19872aSmrg
46172d19872aSmrg    msdosdjgpp*)
46182d19872aSmrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
46192d19872aSmrg      # on systems that don't support them.
46202d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
46212d19872aSmrg      enable_shared=no
46222d19872aSmrg      ;;
46232d19872aSmrg
46242d19872aSmrg    *nto* | *qnx*)
46252d19872aSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
46262d19872aSmrg      # it will coredump.
46272d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
46282d19872aSmrg      ;;
46292d19872aSmrg
46302d19872aSmrg    sysv4*MP*)
46312d19872aSmrg      if test -d /usr/nec; then
46322d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
46332d19872aSmrg      fi
46342d19872aSmrg      ;;
46352d19872aSmrg
46362d19872aSmrg    *)
46372d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
46382d19872aSmrg      ;;
46392d19872aSmrg    esac
46402d19872aSmrg
46412d19872aSmrg    case $cc_basename in
46422d19872aSmrg    nvcc*) # Cuda Compiler Driver 2.2
46432d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
46442d19872aSmrg      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
46452d19872aSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
46462d19872aSmrg      fi
46472d19872aSmrg      ;;
46482d19872aSmrg    esac
46492d19872aSmrg  else
46502d19872aSmrg    # PORTME Check for flag to pass linker flags through the system compiler.
46512d19872aSmrg    case $host_os in
46522d19872aSmrg    aix*)
46532d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
46542d19872aSmrg      if test ia64 = "$host_cpu"; then
46552d19872aSmrg	# AIX 5 now supports IA64 processor
46562d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
46572d19872aSmrg      else
46582d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
46592d19872aSmrg      fi
46602d19872aSmrg      ;;
46612d19872aSmrg
46622d19872aSmrg    darwin* | rhapsody*)
46632d19872aSmrg      # PIC is the default on this platform
46642d19872aSmrg      # Common symbols not allowed in MH_DYLIB files
46652d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
46662d19872aSmrg      case $cc_basename in
46672d19872aSmrg      nagfor*)
46682d19872aSmrg        # NAG Fortran compiler
46692d19872aSmrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
46702d19872aSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
46712d19872aSmrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
46722d19872aSmrg        ;;
46732d19872aSmrg      esac
46742d19872aSmrg      ;;
46752d19872aSmrg
46762d19872aSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
46772d19872aSmrg      # This hack is so that the source file can tell whether it is being
46782d19872aSmrg      # built for inclusion in a dll (and should export symbols for example).
46792d19872aSmrg      m4_if([$1], [GCJ], [],
46802d19872aSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
46812d19872aSmrg      case $host_os in
46822d19872aSmrg      os2*)
46832d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
46842d19872aSmrg	;;
46852d19872aSmrg      esac
46862d19872aSmrg      ;;
46872d19872aSmrg
46882d19872aSmrg    hpux9* | hpux10* | hpux11*)
46892d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
46902d19872aSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
46912d19872aSmrg      # not for PA HP-UX.
46922d19872aSmrg      case $host_cpu in
46932d19872aSmrg      hppa*64*|ia64*)
46942d19872aSmrg	# +Z the default
46952d19872aSmrg	;;
46962d19872aSmrg      *)
46972d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
46982d19872aSmrg	;;
46992d19872aSmrg      esac
47002d19872aSmrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
47012d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
47022d19872aSmrg      ;;
47032d19872aSmrg
47042d19872aSmrg    irix5* | irix6* | nonstopux*)
47052d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47062d19872aSmrg      # PIC (with -KPIC) is the default.
47072d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
47082d19872aSmrg      ;;
47092d19872aSmrg
47102d19872aSmrg    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
47112d19872aSmrg      case $cc_basename in
47122d19872aSmrg      # old Intel for x86_64, which still supported -KPIC.
47132d19872aSmrg      ecc*)
47142d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47152d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
47162d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
47172d19872aSmrg        ;;
47182d19872aSmrg      # icc used to be incompatible with GCC.
47192d19872aSmrg      # ICC 10 doesn't accept -KPIC any more.
47202d19872aSmrg      icc* | ifort*)
47212d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47222d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
47232d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
47242d19872aSmrg        ;;
47252d19872aSmrg      # Lahey Fortran 8.1.
47262d19872aSmrg      lf95*)
47272d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47282d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
47292d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
47302d19872aSmrg	;;
47312d19872aSmrg      nagfor*)
47322d19872aSmrg	# NAG Fortran compiler
47332d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
47342d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
47352d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47362d19872aSmrg	;;
47372d19872aSmrg      tcc*)
47382d19872aSmrg	# Fabrice Bellard et al's Tiny C Compiler
47392d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47402d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
47412d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
47422d19872aSmrg	;;
47432d19872aSmrg      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
47442d19872aSmrg        # Portland Group compilers (*not* the Pentium gcc compiler,
47452d19872aSmrg	# which looks to be a dead project)
47462d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47472d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
47482d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47492d19872aSmrg        ;;
47502d19872aSmrg      ccc*)
47512d19872aSmrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47522d19872aSmrg        # All Alpha code is PIC.
47532d19872aSmrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
47542d19872aSmrg        ;;
47552d19872aSmrg      xl* | bgxl* | bgf* | mpixl*)
47562d19872aSmrg	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
47572d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47582d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
47592d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
47602d19872aSmrg	;;
47612d19872aSmrg      *)
47622d19872aSmrg	case `$CC -V 2>&1 | $SED 5q` in
47632d19872aSmrg	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
47642d19872aSmrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
47652d19872aSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
47662d19872aSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47672d19872aSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
47682d19872aSmrg	  ;;
47692d19872aSmrg	*Sun\ F* | *Sun*Fortran*)
47702d19872aSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
47712d19872aSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47722d19872aSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
47732d19872aSmrg	  ;;
47742d19872aSmrg	*Sun\ C*)
47752d19872aSmrg	  # Sun C 5.9
47762d19872aSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
47772d19872aSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47782d19872aSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47792d19872aSmrg	  ;;
47802d19872aSmrg        *Intel*\ [[CF]]*Compiler*)
47812d19872aSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47822d19872aSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
47832d19872aSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
47842d19872aSmrg	  ;;
47852d19872aSmrg	*Portland\ Group*)
47862d19872aSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47872d19872aSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
47882d19872aSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47892d19872aSmrg	  ;;
47902d19872aSmrg	esac
47912d19872aSmrg	;;
47922d19872aSmrg      esac
47932d19872aSmrg      ;;
47942d19872aSmrg
47952d19872aSmrg    newsos6)
47962d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
47972d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47982d19872aSmrg      ;;
47992d19872aSmrg
48002d19872aSmrg    *nto* | *qnx*)
48012d19872aSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
48022d19872aSmrg      # it will coredump.
48032d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
48042d19872aSmrg      ;;
48052d19872aSmrg
48062d19872aSmrg    osf3* | osf4* | osf5*)
48072d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
48082d19872aSmrg      # All OSF/1 code is PIC.
48092d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
48102d19872aSmrg      ;;
48112d19872aSmrg
48122d19872aSmrg    rdos*)
48132d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
48142d19872aSmrg      ;;
48152d19872aSmrg
48162d19872aSmrg    solaris*)
48172d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
48182d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48192d19872aSmrg      case $cc_basename in
48202d19872aSmrg      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
48212d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
48222d19872aSmrg      *)
48232d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
48242d19872aSmrg      esac
48252d19872aSmrg      ;;
48262d19872aSmrg
48272d19872aSmrg    sunos4*)
48282d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
48292d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
48302d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48312d19872aSmrg      ;;
48322d19872aSmrg
48332d19872aSmrg    sysv4 | sysv4.2uw2* | sysv4.3*)
48342d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
48352d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
48362d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48372d19872aSmrg      ;;
48382d19872aSmrg
48392d19872aSmrg    sysv4*MP*)
48402d19872aSmrg      if test -d /usr/nec; then
48412d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
48422d19872aSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48432d19872aSmrg      fi
48442d19872aSmrg      ;;
48452d19872aSmrg
48462d19872aSmrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
48472d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
48482d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
48492d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48502d19872aSmrg      ;;
48512d19872aSmrg
48522d19872aSmrg    unicos*)
48532d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
48542d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
48552d19872aSmrg      ;;
48562d19872aSmrg
48572d19872aSmrg    uts4*)
48582d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
48592d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48602d19872aSmrg      ;;
48612d19872aSmrg
48622d19872aSmrg    *)
48632d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
48642d19872aSmrg      ;;
48652d19872aSmrg    esac
48662d19872aSmrg  fi
48672d19872aSmrg])
48682d19872aSmrgcase $host_os in
48692d19872aSmrg  # For platforms that do not support PIC, -DPIC is meaningless:
48702d19872aSmrg  *djgpp*)
48712d19872aSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
48722d19872aSmrg    ;;
48732d19872aSmrg  *)
48742d19872aSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
48752d19872aSmrg    ;;
48762d19872aSmrgesac
48772d19872aSmrg
48782d19872aSmrgAC_CACHE_CHECK([for $compiler option to produce PIC],
48792d19872aSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
48802d19872aSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
48812d19872aSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
48822d19872aSmrg
48832d19872aSmrg#
48842d19872aSmrg# Check to make sure the PIC flag actually works.
48852d19872aSmrg#
48862d19872aSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
48872d19872aSmrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
48882d19872aSmrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
48892d19872aSmrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
48902d19872aSmrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
48912d19872aSmrg     "" | " "*) ;;
48922d19872aSmrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
48932d19872aSmrg     esac],
48942d19872aSmrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
48952d19872aSmrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
48962d19872aSmrgfi
48972d19872aSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
48982d19872aSmrg	[Additional compiler flags for building library objects])
48992d19872aSmrg
49002d19872aSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
49012d19872aSmrg	[How to pass a linker flag through the compiler])
49022d19872aSmrg#
49032d19872aSmrg# Check to make sure the static flag actually works.
49042d19872aSmrg#
49052d19872aSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
49062d19872aSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
49072d19872aSmrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
49082d19872aSmrg  $lt_tmp_static_flag,
49092d19872aSmrg  [],
49102d19872aSmrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
49112d19872aSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
49122d19872aSmrg	[Compiler flag to prevent dynamic linking])
49132d19872aSmrg])# _LT_COMPILER_PIC
49142d19872aSmrg
49152d19872aSmrg
49162d19872aSmrg# _LT_LINKER_SHLIBS([TAGNAME])
49172d19872aSmrg# ----------------------------
49182d19872aSmrg# See if the linker supports building shared libraries.
49192d19872aSmrgm4_defun([_LT_LINKER_SHLIBS],
49202d19872aSmrg[AC_REQUIRE([LT_PATH_LD])dnl
49212d19872aSmrgAC_REQUIRE([LT_PATH_NM])dnl
49222d19872aSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
49232d19872aSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
49242d19872aSmrgm4_require([_LT_DECL_EGREP])dnl
49252d19872aSmrgm4_require([_LT_DECL_SED])dnl
49262d19872aSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
49272d19872aSmrgm4_require([_LT_TAG_COMPILER])dnl
49282d19872aSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
49292d19872aSmrgm4_if([$1], [CXX], [
49302d19872aSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
49312d19872aSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
49322d19872aSmrg  case $host_os in
49332d19872aSmrg  aix[[4-9]]*)
49342d19872aSmrg    # If we're using GNU nm, then we don't want the "-C" option.
49352d19872aSmrg    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
49362d19872aSmrg    # Without the "-l" option, or with the "-B" option, AIX nm treats
49372d19872aSmrg    # weak defined symbols like other global defined symbols, whereas
49382d19872aSmrg    # GNU nm marks them as "W".
49392d19872aSmrg    # While the 'weak' keyword is ignored in the Export File, we need
49402d19872aSmrg    # it in the Import File for the 'aix-soname' feature, so we have
49412d19872aSmrg    # to replace the "-B" option with "-P" for AIX nm.
49422d19872aSmrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
49432d19872aSmrg      _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'
49442d19872aSmrg    else
49452d19872aSmrg      _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'
49462d19872aSmrg    fi
49472d19872aSmrg    ;;
49482d19872aSmrg  pw32*)
49492d19872aSmrg    _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
49502d19872aSmrg    ;;
49512d19872aSmrg  cygwin* | mingw* | cegcc*)
49522d19872aSmrg    case $cc_basename in
49532d19872aSmrg    cl* | icl*)
49542d19872aSmrg      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
49552d19872aSmrg      ;;
49562d19872aSmrg    *)
49572d19872aSmrg      _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'
49582d19872aSmrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
49592d19872aSmrg      ;;
49602d19872aSmrg    esac
49612d19872aSmrg    ;;
49622d19872aSmrg  *)
49632d19872aSmrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
49642d19872aSmrg    ;;
49652d19872aSmrg  esac
49662d19872aSmrg], [
49672d19872aSmrg  runpath_var=
49682d19872aSmrg  _LT_TAGVAR(allow_undefined_flag, $1)=
49692d19872aSmrg  _LT_TAGVAR(always_export_symbols, $1)=no
49702d19872aSmrg  _LT_TAGVAR(archive_cmds, $1)=
49712d19872aSmrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
49722d19872aSmrg  _LT_TAGVAR(compiler_needs_object, $1)=no
49732d19872aSmrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
49742d19872aSmrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
49752d19872aSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
49762d19872aSmrg  _LT_TAGVAR(hardcode_automatic, $1)=no
49772d19872aSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
49782d19872aSmrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
49792d19872aSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
49802d19872aSmrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
49812d19872aSmrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
49822d19872aSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
49832d19872aSmrg  _LT_TAGVAR(inherit_rpath, $1)=no
49842d19872aSmrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
49852d19872aSmrg  _LT_TAGVAR(module_cmds, $1)=
49862d19872aSmrg  _LT_TAGVAR(module_expsym_cmds, $1)=
49872d19872aSmrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
49882d19872aSmrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
49892d19872aSmrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
49902d19872aSmrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
49912d19872aSmrg  # include_expsyms should be a list of space-separated symbols to be *always*
49922d19872aSmrg  # included in the symbol list
49932d19872aSmrg  _LT_TAGVAR(include_expsyms, $1)=
49942d19872aSmrg  # exclude_expsyms can be an extended regexp of symbols to exclude
49952d19872aSmrg  # it will be wrapped by ' (' and ')$', so one must not match beginning or
49962d19872aSmrg  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
49972d19872aSmrg  # as well as any symbol that contains 'd'.
49982d19872aSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
49992d19872aSmrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
50002d19872aSmrg  # platforms (ab)use it in PIC code, but their linkers get confused if
50012d19872aSmrg  # the symbol is explicitly referenced.  Since portable code cannot
50022d19872aSmrg  # rely on this symbol name, it's probably fine to never include it in
50032d19872aSmrg  # preloaded symbol tables.
50042d19872aSmrg  # Exclude shared library initialization/finalization symbols.
50052d19872aSmrgdnl Note also adjust exclude_expsyms for C++ above.
50062d19872aSmrg  extract_expsyms_cmds=
50072d19872aSmrg
50082d19872aSmrg  case $host_os in
50092d19872aSmrg  cygwin* | mingw* | pw32* | cegcc*)
50102d19872aSmrg    # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
50112d19872aSmrg    # When not using gcc, we currently assume that we are using
50122d19872aSmrg    # Microsoft Visual C++ or Intel C++ Compiler.
50132d19872aSmrg    if test yes != "$GCC"; then
50142d19872aSmrg      with_gnu_ld=no
50152d19872aSmrg    fi
50162d19872aSmrg    ;;
50172d19872aSmrg  interix*)
50182d19872aSmrg    # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
50192d19872aSmrg    with_gnu_ld=yes
50202d19872aSmrg    ;;
50212d19872aSmrg  openbsd* | bitrig*)
50222d19872aSmrg    with_gnu_ld=no
50232d19872aSmrg    ;;
50242d19872aSmrg  esac
50252d19872aSmrg
50262d19872aSmrg  _LT_TAGVAR(ld_shlibs, $1)=yes
50272d19872aSmrg
50282d19872aSmrg  # On some targets, GNU ld is compatible enough with the native linker
50292d19872aSmrg  # that we're better off using the native interface for both.
50302d19872aSmrg  lt_use_gnu_ld_interface=no
50312d19872aSmrg  if test yes = "$with_gnu_ld"; then
50322d19872aSmrg    case $host_os in
50332d19872aSmrg      aix*)
50342d19872aSmrg	# The AIX port of GNU ld has always aspired to compatibility
50352d19872aSmrg	# with the native linker.  However, as the warning in the GNU ld
50362d19872aSmrg	# block says, versions before 2.19.5* couldn't really create working
50372d19872aSmrg	# shared libraries, regardless of the interface used.
50382d19872aSmrg	case `$LD -v 2>&1` in
50392d19872aSmrg	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
50402d19872aSmrg	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
50412d19872aSmrg	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
50422d19872aSmrg	  *)
50432d19872aSmrg	    lt_use_gnu_ld_interface=yes
50442d19872aSmrg	    ;;
50452d19872aSmrg	esac
50462d19872aSmrg	;;
50472d19872aSmrg      *)
50482d19872aSmrg	lt_use_gnu_ld_interface=yes
50492d19872aSmrg	;;
50502d19872aSmrg    esac
50512d19872aSmrg  fi
50522d19872aSmrg
50532d19872aSmrg  if test yes = "$lt_use_gnu_ld_interface"; then
50542d19872aSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
50552d19872aSmrg    wlarc='$wl'
50562d19872aSmrg
50572d19872aSmrg    # Set some defaults for GNU ld with shared library support. These
50582d19872aSmrg    # are reset later if shared libraries are not supported. Putting them
50592d19872aSmrg    # here allows them to be overridden if necessary.
50602d19872aSmrg    runpath_var=LD_RUN_PATH
50612d19872aSmrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
50622d19872aSmrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
50632d19872aSmrg    # ancient GNU ld didn't support --whole-archive et. al.
50642d19872aSmrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
50652d19872aSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
50662d19872aSmrg    else
50672d19872aSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
50682d19872aSmrg    fi
50692d19872aSmrg    supports_anon_versioning=no
50702d19872aSmrg    case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in
50712d19872aSmrg      *GNU\ gold*) supports_anon_versioning=yes ;;
50722d19872aSmrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
50732d19872aSmrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
50742d19872aSmrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
50752d19872aSmrg      *\ 2.11.*) ;; # other 2.11 versions
50762d19872aSmrg      *) supports_anon_versioning=yes ;;
50772d19872aSmrg    esac
50782d19872aSmrg
50792d19872aSmrg    # See if GNU ld supports shared libraries.
50802d19872aSmrg    case $host_os in
50812d19872aSmrg    aix[[3-9]]*)
50822d19872aSmrg      # On AIX/PPC, the GNU linker is very broken
50832d19872aSmrg      if test ia64 != "$host_cpu"; then
50842d19872aSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
50852d19872aSmrg	cat <<_LT_EOF 1>&2
50862d19872aSmrg
50872d19872aSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported
50882d19872aSmrg*** to be unable to reliably create shared libraries on AIX.
50892d19872aSmrg*** Therefore, libtool is disabling shared libraries support.  If you
50902d19872aSmrg*** really care for shared libraries, you may want to install binutils
50912d19872aSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
50922d19872aSmrg*** You will then need to restart the configuration process.
50932d19872aSmrg
50942d19872aSmrg_LT_EOF
50952d19872aSmrg      fi
50962d19872aSmrg      ;;
50972d19872aSmrg
50982d19872aSmrg    amigaos*)
50992d19872aSmrg      case $host_cpu in
51002d19872aSmrg      powerpc)
51012d19872aSmrg            # see comment about AmigaOS4 .so support
51022d19872aSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
51032d19872aSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
51042d19872aSmrg        ;;
51052d19872aSmrg      m68k)
51062d19872aSmrg            _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)'
51072d19872aSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
51082d19872aSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
51092d19872aSmrg        ;;
51102d19872aSmrg      esac
51112d19872aSmrg      ;;
51122d19872aSmrg
51132d19872aSmrg    beos*)
51142d19872aSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
51152d19872aSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
51162d19872aSmrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
51172d19872aSmrg	# support --undefined.  This deserves some investigation.  FIXME
51182d19872aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
51192d19872aSmrg      else
51202d19872aSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
51212d19872aSmrg      fi
51222d19872aSmrg      ;;
51232d19872aSmrg
51242d19872aSmrg    cygwin* | mingw* | pw32* | cegcc*)
51252d19872aSmrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
51262d19872aSmrg      # as there is no search path for DLLs.
51272d19872aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
51282d19872aSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
51292d19872aSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
51302d19872aSmrg      _LT_TAGVAR(always_export_symbols, $1)=no
51312d19872aSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
51322d19872aSmrg      _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'
51332d19872aSmrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
51342d19872aSmrg
51352d19872aSmrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
51362d19872aSmrg        _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'
51372d19872aSmrg	# If the export-symbols file already is a .def file, use it as
51382d19872aSmrg	# is; otherwise, prepend EXPORTS...
51392d19872aSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
51402d19872aSmrg          cp $export_symbols $output_objdir/$soname.def;
51412d19872aSmrg        else
51422d19872aSmrg          echo EXPORTS > $output_objdir/$soname.def;
51432d19872aSmrg          cat $export_symbols >> $output_objdir/$soname.def;
51442d19872aSmrg        fi~
51452d19872aSmrg        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
51462d19872aSmrg      else
51472d19872aSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
51482d19872aSmrg      fi
51492d19872aSmrg      ;;
51502d19872aSmrg
51512d19872aSmrg    haiku*)
51522d19872aSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
51532d19872aSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
51542d19872aSmrg      ;;
51552d19872aSmrg
51562d19872aSmrg    os2*)
51572d19872aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
51582d19872aSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
51592d19872aSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
51602d19872aSmrg      shrext_cmds=.dll
51612d19872aSmrg      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
51622d19872aSmrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
51632d19872aSmrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
51642d19872aSmrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
51652d19872aSmrg	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
51662d19872aSmrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
51672d19872aSmrg	emximp -o $lib $output_objdir/$libname.def'
51682d19872aSmrg      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
51692d19872aSmrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
51702d19872aSmrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
51712d19872aSmrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
51722d19872aSmrg	prefix_cmds="$SED"~
51732d19872aSmrg	if test EXPORTS = "`$SED 1q $export_symbols`"; then
51742d19872aSmrg	  prefix_cmds="$prefix_cmds -e 1d";
51752d19872aSmrg	fi~
51762d19872aSmrg	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
51772d19872aSmrg	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
51782d19872aSmrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
51792d19872aSmrg	emximp -o $lib $output_objdir/$libname.def'
51802d19872aSmrg      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
51812d19872aSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
51822d19872aSmrg      _LT_TAGVAR(file_list_spec, $1)='@'
51832d19872aSmrg      ;;
51842d19872aSmrg
51852d19872aSmrg    interix[[3-9]]*)
51862d19872aSmrg      _LT_TAGVAR(hardcode_direct, $1)=no
51872d19872aSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
51882d19872aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
51892d19872aSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
51902d19872aSmrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
51912d19872aSmrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
51922d19872aSmrg      # default) and relocated if they conflict, which is a slow very memory
51932d19872aSmrg      # consuming and fragmenting process.  To avoid this, we pick a random,
51942d19872aSmrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
51952d19872aSmrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
51962d19872aSmrg      _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'
51972d19872aSmrg      _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'
51982d19872aSmrg      ;;
51992d19872aSmrg
52002d19872aSmrg    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
52012d19872aSmrg      tmp_diet=no
52022d19872aSmrg      if test linux-dietlibc = "$host_os"; then
52032d19872aSmrg	case $cc_basename in
52042d19872aSmrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
52052d19872aSmrg	esac
52062d19872aSmrg      fi
52072d19872aSmrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
52082d19872aSmrg	 && test no = "$tmp_diet"
52092d19872aSmrg      then
52102d19872aSmrg	tmp_addflag=' $pic_flag'
52112d19872aSmrg	tmp_sharedflag='-shared'
52122d19872aSmrg	case $cc_basename,$host_cpu in
52132d19872aSmrg        pgcc*)				# Portland Group C compiler
52142d19872aSmrg	  _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'
52152d19872aSmrg	  tmp_addflag=' $pic_flag'
52162d19872aSmrg	  ;;
52172d19872aSmrg	pgf77* | pgf90* | pgf95* | pgfortran*)
52182d19872aSmrg					# Portland Group f77 and f90 compilers
52192d19872aSmrg	  _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'
52202d19872aSmrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
52212d19872aSmrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
52222d19872aSmrg	  tmp_addflag=' -i_dynamic' ;;
52232d19872aSmrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
52242d19872aSmrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
52252d19872aSmrg	ifc* | ifort*)			# Intel Fortran compiler
52262d19872aSmrg	  tmp_addflag=' -nofor_main' ;;
52272d19872aSmrg	lf95*)				# Lahey Fortran 8.1
52282d19872aSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
52292d19872aSmrg	  tmp_sharedflag='--shared' ;;
52302d19872aSmrg        nagfor*)                        # NAGFOR 5.3
52312d19872aSmrg          tmp_sharedflag='-Wl,-shared' ;;
52322d19872aSmrg	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
52332d19872aSmrg	  tmp_sharedflag='-qmkshrobj'
52342d19872aSmrg	  tmp_addflag= ;;
52352d19872aSmrg	nvcc*)	# Cuda Compiler Driver 2.2
52362d19872aSmrg	  _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'
52372d19872aSmrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
52382d19872aSmrg	  ;;
52392d19872aSmrg	esac
52402d19872aSmrg	case `$CC -V 2>&1 | $SED 5q` in
52412d19872aSmrg	*Sun\ C*)			# Sun C 5.9
52422d19872aSmrg	  _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'
52432d19872aSmrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
52442d19872aSmrg	  tmp_sharedflag='-G' ;;
52452d19872aSmrg	*Sun\ F*)			# Sun Fortran 8.3
52462d19872aSmrg	  tmp_sharedflag='-G' ;;
52472d19872aSmrg	esac
52482d19872aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
52492d19872aSmrg
52502d19872aSmrg        if test yes = "$supports_anon_versioning"; then
52512d19872aSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
52522d19872aSmrg            cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
52532d19872aSmrg            echo "local: *; };" >> $output_objdir/$libname.ver~
52542d19872aSmrg            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
52552d19872aSmrg        fi
52562d19872aSmrg
52572d19872aSmrg	case $cc_basename in
52582d19872aSmrg	tcc*)
52592d19872aSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
52602d19872aSmrg	  ;;
52612d19872aSmrg	xlf* | bgf* | bgxlf* | mpixlf*)
52622d19872aSmrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
52632d19872aSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
52642d19872aSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
52652d19872aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
52662d19872aSmrg	  if test yes = "$supports_anon_versioning"; then
52672d19872aSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
52682d19872aSmrg              cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
52692d19872aSmrg              echo "local: *; };" >> $output_objdir/$libname.ver~
52702d19872aSmrg              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
52712d19872aSmrg	  fi
52722d19872aSmrg	  ;;
52732d19872aSmrg	esac
52742d19872aSmrg      else
52752d19872aSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
52762d19872aSmrg      fi
52772d19872aSmrg      ;;
52782d19872aSmrg
52792d19872aSmrg    netbsd*)
52802d19872aSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
52812d19872aSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
52822d19872aSmrg	wlarc=
52832d19872aSmrg      else
52842d19872aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
52852d19872aSmrg	_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'
52862d19872aSmrg      fi
52872d19872aSmrg      ;;
52882d19872aSmrg
52892d19872aSmrg    solaris*)
52902d19872aSmrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
52912d19872aSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
52922d19872aSmrg	cat <<_LT_EOF 1>&2
52932d19872aSmrg
52942d19872aSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
52952d19872aSmrg*** create shared libraries on Solaris systems.  Therefore, libtool
52962d19872aSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
52972d19872aSmrg*** binutils to release 2.9.1 or newer.  Another option is to modify
52982d19872aSmrg*** your PATH or compiler configuration so that the native linker is
52992d19872aSmrg*** used, and then restart.
53002d19872aSmrg
53012d19872aSmrg_LT_EOF
53022d19872aSmrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
53032d19872aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
53042d19872aSmrg	_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'
53052d19872aSmrg      else
53062d19872aSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
53072d19872aSmrg      fi
53082d19872aSmrg      ;;
53092d19872aSmrg
53102d19872aSmrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
53112d19872aSmrg      case `$LD -v 2>&1` in
53122d19872aSmrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
53132d19872aSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
53142d19872aSmrg	cat <<_LT_EOF 1>&2
53152d19872aSmrg
53162d19872aSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
53172d19872aSmrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
53182d19872aSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
53192d19872aSmrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
53202d19872aSmrg*** your PATH or compiler configuration so that the native linker is
53212d19872aSmrg*** used, and then restart.
53222d19872aSmrg
53232d19872aSmrg_LT_EOF
53242d19872aSmrg	;;
53252d19872aSmrg	*)
53262d19872aSmrg	  # For security reasons, it is highly recommended that you always
53272d19872aSmrg	  # use absolute paths for naming shared libraries, and exclude the
53282d19872aSmrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
53292d19872aSmrg	  # requires that you compile everything twice, which is a pain.
53302d19872aSmrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
53312d19872aSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
53322d19872aSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
53332d19872aSmrg	    _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'
53342d19872aSmrg	  else
53352d19872aSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
53362d19872aSmrg	  fi
53372d19872aSmrg	;;
53382d19872aSmrg      esac
53392d19872aSmrg      ;;
53402d19872aSmrg
53412d19872aSmrg    sunos4*)
53422d19872aSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
53432d19872aSmrg      wlarc=
53442d19872aSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
53452d19872aSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
53462d19872aSmrg      ;;
53472d19872aSmrg
53482d19872aSmrg    *)
53492d19872aSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
53502d19872aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
53512d19872aSmrg	_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'
53522d19872aSmrg      else
53532d19872aSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
53542d19872aSmrg      fi
53552d19872aSmrg      ;;
53562d19872aSmrg    esac
53572d19872aSmrg
53582d19872aSmrg    if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
53592d19872aSmrg      runpath_var=
53602d19872aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
53612d19872aSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
53622d19872aSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
53632d19872aSmrg    fi
53642d19872aSmrg  else
53652d19872aSmrg    # PORTME fill in a description of your system's linker (not GNU ld)
53662d19872aSmrg    case $host_os in
53672d19872aSmrg    aix3*)
53682d19872aSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
53692d19872aSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
53702d19872aSmrg      _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'
53712d19872aSmrg      # Note: this linker hardcodes the directories in LIBPATH if there
53722d19872aSmrg      # are no directories specified by -L.
53732d19872aSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
53742d19872aSmrg      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
53752d19872aSmrg	# Neither direct hardcoding nor static linking is supported with a
53762d19872aSmrg	# broken collect2.
53772d19872aSmrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
53782d19872aSmrg      fi
53792d19872aSmrg      ;;
53802d19872aSmrg
53812d19872aSmrg    aix[[4-9]]*)
53822d19872aSmrg      if test ia64 = "$host_cpu"; then
53832d19872aSmrg	# On IA64, the linker does run time linking by default, so we don't
53842d19872aSmrg	# have to do anything special.
53852d19872aSmrg	aix_use_runtimelinking=no
53862d19872aSmrg	exp_sym_flag='-Bexport'
53872d19872aSmrg	no_entry_flag=
53882d19872aSmrg      else
53892d19872aSmrg	# If we're using GNU nm, then we don't want the "-C" option.
53902d19872aSmrg	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
53912d19872aSmrg	# Without the "-l" option, or with the "-B" option, AIX nm treats
53922d19872aSmrg	# weak defined symbols like other global defined symbols, whereas
53932d19872aSmrg	# GNU nm marks them as "W".
53942d19872aSmrg	# While the 'weak' keyword is ignored in the Export File, we need
53952d19872aSmrg	# it in the Import File for the 'aix-soname' feature, so we have
53962d19872aSmrg	# to replace the "-B" option with "-P" for AIX nm.
53972d19872aSmrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
53982d19872aSmrg	  _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'
53992d19872aSmrg	else
54002d19872aSmrg	  _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'
54012d19872aSmrg	fi
54022d19872aSmrg	aix_use_runtimelinking=no
54032d19872aSmrg
54042d19872aSmrg	# Test if we are trying to use run time linking or normal
54052d19872aSmrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
54062d19872aSmrg	# have runtime linking enabled, and use it for executables.
54072d19872aSmrg	# For shared libraries, we enable/disable runtime linking
54082d19872aSmrg	# depending on the kind of the shared library created -
54092d19872aSmrg	# when "with_aix_soname,aix_use_runtimelinking" is:
54102d19872aSmrg	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
54112d19872aSmrg	# "aix,yes"  lib.so          shared, rtl:yes, for executables
54122d19872aSmrg	#            lib.a           static archive
54132d19872aSmrg	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
54142d19872aSmrg	#            lib.a(lib.so.V) shared, rtl:no,  for executables
54152d19872aSmrg	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
54162d19872aSmrg	#            lib.a(lib.so.V) shared, rtl:no
54172d19872aSmrg	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
54182d19872aSmrg	#            lib.a           static archive
54192d19872aSmrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
54202d19872aSmrg	  for ld_flag in $LDFLAGS; do
54212d19872aSmrg	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
54222d19872aSmrg	    aix_use_runtimelinking=yes
54232d19872aSmrg	    break
54242d19872aSmrg	  fi
54252d19872aSmrg	  done
54262d19872aSmrg	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
54272d19872aSmrg	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
54282d19872aSmrg	    # so we don't have lib.a shared libs to link our executables.
54292d19872aSmrg	    # We have to force runtime linking in this case.
54302d19872aSmrg	    aix_use_runtimelinking=yes
54312d19872aSmrg	    LDFLAGS="$LDFLAGS -Wl,-brtl"
54322d19872aSmrg	  fi
54332d19872aSmrg	  ;;
54342d19872aSmrg	esac
54352d19872aSmrg
54362d19872aSmrg	exp_sym_flag='-bexport'
54372d19872aSmrg	no_entry_flag='-bnoentry'
54382d19872aSmrg      fi
54392d19872aSmrg
54402d19872aSmrg      # When large executables or shared objects are built, AIX ld can
54412d19872aSmrg      # have problems creating the table of contents.  If linking a library
54422d19872aSmrg      # or program results in "error TOC overflow" add -mminimal-toc to
54432d19872aSmrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
54442d19872aSmrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
54452d19872aSmrg
54462d19872aSmrg      _LT_TAGVAR(archive_cmds, $1)=''
54472d19872aSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
54482d19872aSmrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
54492d19872aSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
54502d19872aSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
54512d19872aSmrg      _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
54522d19872aSmrg      case $with_aix_soname,$aix_use_runtimelinking in
54532d19872aSmrg      aix,*) ;; # traditional, no import file
54542d19872aSmrg      svr4,* | *,yes) # use import file
54552d19872aSmrg	# The Import File defines what to hardcode.
54562d19872aSmrg	_LT_TAGVAR(hardcode_direct, $1)=no
54572d19872aSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=no
54582d19872aSmrg	;;
54592d19872aSmrg      esac
54602d19872aSmrg
54612d19872aSmrg      if test yes = "$GCC"; then
54622d19872aSmrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
54632d19872aSmrg	# We only want to do this on AIX 4.2 and lower, the check
54642d19872aSmrg	# below for broken collect2 doesn't work under 4.3+
54652d19872aSmrg	  collect2name=`$CC -print-prog-name=collect2`
54662d19872aSmrg	  if test -f "$collect2name" &&
54672d19872aSmrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
54682d19872aSmrg	  then
54692d19872aSmrg	  # We have reworked collect2
54702d19872aSmrg	  :
54712d19872aSmrg	  else
54722d19872aSmrg	  # We have old collect2
54732d19872aSmrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
54742d19872aSmrg	  # It fails to find uninstalled libraries when the uninstalled
54752d19872aSmrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
54762d19872aSmrg	  # to unsupported forces relinking
54772d19872aSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
54782d19872aSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
54792d19872aSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
54802d19872aSmrg	  fi
54812d19872aSmrg	  ;;
54822d19872aSmrg	esac
54832d19872aSmrg	shared_flag='-shared'
54842d19872aSmrg	if test yes = "$aix_use_runtimelinking"; then
54852d19872aSmrg	  shared_flag="$shared_flag "'$wl-G'
54862d19872aSmrg	fi
54872d19872aSmrg	# Need to ensure runtime linking is disabled for the traditional
54882d19872aSmrg	# shared library, or the linker may eventually find shared libraries
54892d19872aSmrg	# /with/ Import File - we do not want to mix them.
54902d19872aSmrg	shared_flag_aix='-shared'
54912d19872aSmrg	shared_flag_svr4='-shared $wl-G'
54922d19872aSmrg      else
54932d19872aSmrg	# not using gcc
54942d19872aSmrg	if test ia64 = "$host_cpu"; then
54952d19872aSmrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
54962d19872aSmrg	# chokes on -Wl,-G. The following line is correct:
54972d19872aSmrg	  shared_flag='-G'
54982d19872aSmrg	else
54992d19872aSmrg	  if test yes = "$aix_use_runtimelinking"; then
55002d19872aSmrg	    shared_flag='$wl-G'
55012d19872aSmrg	  else
55022d19872aSmrg	    shared_flag='$wl-bM:SRE'
55032d19872aSmrg	  fi
55042d19872aSmrg	  shared_flag_aix='$wl-bM:SRE'
55052d19872aSmrg	  shared_flag_svr4='$wl-G'
55062d19872aSmrg	fi
55072d19872aSmrg      fi
55082d19872aSmrg
55092d19872aSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
55102d19872aSmrg      # It seems that -bexpall does not export symbols beginning with
55112d19872aSmrg      # underscore (_), so it is better to generate a list of symbols to export.
55122d19872aSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
55132d19872aSmrg      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
55142d19872aSmrg	# Warning - without using the other runtime loading flags (-brtl),
55152d19872aSmrg	# -berok will link without error, but may produce a broken library.
55162d19872aSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
55172d19872aSmrg        # Determine the default libpath from the value encoded in an
55182d19872aSmrg        # empty executable.
55192d19872aSmrg        _LT_SYS_MODULE_PATH_AIX([$1])
55202d19872aSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
55212d19872aSmrg        _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
55222d19872aSmrg      else
55232d19872aSmrg	if test ia64 = "$host_cpu"; then
55242d19872aSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
55252d19872aSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
55262d19872aSmrg	  _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"
55272d19872aSmrg	else
55282d19872aSmrg	 # Determine the default libpath from the value encoded in an
55292d19872aSmrg	 # empty executable.
55302d19872aSmrg	 _LT_SYS_MODULE_PATH_AIX([$1])
55312d19872aSmrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
55322d19872aSmrg	  # Warning - without using the other run time loading flags,
55332d19872aSmrg	  # -berok will link without error, but may produce a broken library.
55342d19872aSmrg	  _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
55352d19872aSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
55362d19872aSmrg	  if test yes = "$with_gnu_ld"; then
55372d19872aSmrg	    # We only use this code for GNU lds that support --whole-archive.
55382d19872aSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
55392d19872aSmrg	  else
55402d19872aSmrg	    # Exported symbols can be pulled into shared objects from archives
55412d19872aSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
55422d19872aSmrg	  fi
55432d19872aSmrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
55442d19872aSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
55452d19872aSmrg	  # -brtl affects multiple linker settings, -berok does not and is overridden later
55462d19872aSmrg	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
55472d19872aSmrg	  if test svr4 != "$with_aix_soname"; then
55482d19872aSmrg	    # This is similar to how AIX traditionally builds its shared libraries.
55492d19872aSmrg	    _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'
55502d19872aSmrg	  fi
55512d19872aSmrg	  if test aix != "$with_aix_soname"; then
55522d19872aSmrg	    _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'
55532d19872aSmrg	  else
55542d19872aSmrg	    # used by -dlpreopen to get the symbols
55552d19872aSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
55562d19872aSmrg	  fi
55572d19872aSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
55582d19872aSmrg	fi
55592d19872aSmrg      fi
55602d19872aSmrg      ;;
55612d19872aSmrg
55622d19872aSmrg    amigaos*)
55632d19872aSmrg      case $host_cpu in
55642d19872aSmrg      powerpc)
55652d19872aSmrg            # see comment about AmigaOS4 .so support
55662d19872aSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
55672d19872aSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
55682d19872aSmrg        ;;
55692d19872aSmrg      m68k)
55702d19872aSmrg            _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)'
55712d19872aSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
55722d19872aSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
55732d19872aSmrg        ;;
55742d19872aSmrg      esac
55752d19872aSmrg      ;;
55762d19872aSmrg
55772d19872aSmrg    bsdi[[45]]*)
55782d19872aSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
55792d19872aSmrg      ;;
55802d19872aSmrg
55812d19872aSmrg    cygwin* | mingw* | pw32* | cegcc*)
55822d19872aSmrg      # When not using gcc, we currently assume that we are using
55832d19872aSmrg      # Microsoft Visual C++ or Intel C++ Compiler.
55842d19872aSmrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
55852d19872aSmrg      # no search path for DLLs.
55862d19872aSmrg      case $cc_basename in
55872d19872aSmrg      cl* | icl*)
55882d19872aSmrg	# Native MSVC or ICC
55892d19872aSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
55902d19872aSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
55912d19872aSmrg	_LT_TAGVAR(always_export_symbols, $1)=yes
55922d19872aSmrg	_LT_TAGVAR(file_list_spec, $1)='@'
55932d19872aSmrg	# Tell ltmain to make .lib files, not .a files.
55942d19872aSmrg	libext=lib
55952d19872aSmrg	# Tell ltmain to make .dll files, not .so files.
55962d19872aSmrg	shrext_cmds=.dll
55972d19872aSmrg	# FIXME: Setting linknames here is a bad hack.
55982d19872aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
55992d19872aSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
56002d19872aSmrg            cp "$export_symbols" "$output_objdir/$soname.def";
56012d19872aSmrg            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
56022d19872aSmrg          else
56032d19872aSmrg            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
56042d19872aSmrg          fi~
56052d19872aSmrg          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
56062d19872aSmrg          linknames='
56072d19872aSmrg	# The linker will not automatically build a static lib if we build a DLL.
56082d19872aSmrg	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
56092d19872aSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
56102d19872aSmrg	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
56112d19872aSmrg	_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'
56122d19872aSmrg	# Don't use ranlib
56132d19872aSmrg	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
56142d19872aSmrg	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
56152d19872aSmrg          lt_tool_outputfile="@TOOL_OUTPUT@"~
56162d19872aSmrg          case $lt_outputfile in
56172d19872aSmrg            *.exe|*.EXE) ;;
56182d19872aSmrg            *)
56192d19872aSmrg              lt_outputfile=$lt_outputfile.exe
56202d19872aSmrg              lt_tool_outputfile=$lt_tool_outputfile.exe
56212d19872aSmrg              ;;
56222d19872aSmrg          esac~
56232d19872aSmrg          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
56242d19872aSmrg            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
56252d19872aSmrg            $RM "$lt_outputfile.manifest";
56262d19872aSmrg          fi'
56272d19872aSmrg	;;
56282d19872aSmrg      *)
56292d19872aSmrg	# Assume MSVC and ICC wrapper
56302d19872aSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
56312d19872aSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
56322d19872aSmrg	# Tell ltmain to make .lib files, not .a files.
56332d19872aSmrg	libext=lib
56342d19872aSmrg	# Tell ltmain to make .dll files, not .so files.
56352d19872aSmrg	shrext_cmds=.dll
56362d19872aSmrg	# FIXME: Setting linknames here is a bad hack.
56372d19872aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
56382d19872aSmrg	# The linker will automatically build a .lib file if we build a DLL.
56392d19872aSmrg	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
56402d19872aSmrg	# FIXME: Should let the user specify the lib program.
56412d19872aSmrg	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
56422d19872aSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
56432d19872aSmrg	;;
56442d19872aSmrg      esac
56452d19872aSmrg      ;;
56462d19872aSmrg
56472d19872aSmrg    darwin* | rhapsody*)
56482d19872aSmrg      _LT_DARWIN_LINKER_FEATURES($1)
56492d19872aSmrg      ;;
56502d19872aSmrg
56512d19872aSmrg    dgux*)
56522d19872aSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
56532d19872aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
56542d19872aSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
56552d19872aSmrg      ;;
56562d19872aSmrg
56572d19872aSmrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
56582d19872aSmrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
56592d19872aSmrg    # does not break anything, and helps significantly (at the cost of a little
56602d19872aSmrg    # extra space).
56612d19872aSmrg    freebsd2.2*)
56622d19872aSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
56632d19872aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
56642d19872aSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
56652d19872aSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
56662d19872aSmrg      ;;
56672d19872aSmrg
56682d19872aSmrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
56692d19872aSmrg    freebsd2.*)
56702d19872aSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
56712d19872aSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
56722d19872aSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
56732d19872aSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
56742d19872aSmrg      ;;
56752d19872aSmrg
56762d19872aSmrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
56772d19872aSmrg    freebsd* | dragonfly* | midnightbsd*)
56782d19872aSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
56792d19872aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
56802d19872aSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
56812d19872aSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
56822d19872aSmrg      ;;
56832d19872aSmrg
56842d19872aSmrg    hpux9*)
56852d19872aSmrg      if test yes = "$GCC"; then
56862d19872aSmrg	_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'
56872d19872aSmrg      else
56882d19872aSmrg	_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'
56892d19872aSmrg      fi
56902d19872aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
56912d19872aSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
56922d19872aSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
56932d19872aSmrg
56942d19872aSmrg      # hardcode_minus_L: Not really in the search PATH,
56952d19872aSmrg      # but as the default location of the library.
56962d19872aSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
56972d19872aSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
56982d19872aSmrg      ;;
56992d19872aSmrg
57002d19872aSmrg    hpux10*)
57012d19872aSmrg      if test yes,no = "$GCC,$with_gnu_ld"; then
57022d19872aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
57032d19872aSmrg      else
57042d19872aSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
57052d19872aSmrg      fi
57062d19872aSmrg      if test no = "$with_gnu_ld"; then
57072d19872aSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
57082d19872aSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
57092d19872aSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
57102d19872aSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
57112d19872aSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
57122d19872aSmrg	# hardcode_minus_L: Not really in the search PATH,
57132d19872aSmrg	# but as the default location of the library.
57142d19872aSmrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
57152d19872aSmrg      fi
57162d19872aSmrg      ;;
57172d19872aSmrg
57182d19872aSmrg    hpux11*)
57192d19872aSmrg      if test yes,no = "$GCC,$with_gnu_ld"; then
57202d19872aSmrg	case $host_cpu in
57212d19872aSmrg	hppa*64*)
57222d19872aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
57232d19872aSmrg	  ;;
57242d19872aSmrg	ia64*)
57252d19872aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
57262d19872aSmrg	  ;;
57272d19872aSmrg	*)
57282d19872aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
57292d19872aSmrg	  ;;
57302d19872aSmrg	esac
57312d19872aSmrg      else
57322d19872aSmrg	case $host_cpu in
57332d19872aSmrg	hppa*64*)
57342d19872aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
57352d19872aSmrg	  ;;
57362d19872aSmrg	ia64*)
57372d19872aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
57382d19872aSmrg	  ;;
57392d19872aSmrg	*)
57402d19872aSmrg	m4_if($1, [], [
57412d19872aSmrg	  # Older versions of the 11.00 compiler do not understand -b yet
57422d19872aSmrg	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
57432d19872aSmrg	  _LT_LINKER_OPTION([if $CC understands -b],
57442d19872aSmrg	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
57452d19872aSmrg	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
57462d19872aSmrg	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
57472d19872aSmrg	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
57482d19872aSmrg	  ;;
57492d19872aSmrg	esac
57502d19872aSmrg      fi
57512d19872aSmrg      if test no = "$with_gnu_ld"; then
57522d19872aSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
57532d19872aSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
57542d19872aSmrg
57552d19872aSmrg	case $host_cpu in
57562d19872aSmrg	hppa*64*|ia64*)
57572d19872aSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
57582d19872aSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
57592d19872aSmrg	  ;;
57602d19872aSmrg	*)
57612d19872aSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
57622d19872aSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
57632d19872aSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
57642d19872aSmrg
57652d19872aSmrg	  # hardcode_minus_L: Not really in the search PATH,
57662d19872aSmrg	  # but as the default location of the library.
57672d19872aSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
57682d19872aSmrg	  ;;
57692d19872aSmrg	esac
57702d19872aSmrg      fi
57712d19872aSmrg      ;;
57722d19872aSmrg
57732d19872aSmrg    irix5* | irix6* | nonstopux*)
57742d19872aSmrg      if test yes = "$GCC"; then
57752d19872aSmrg	_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'
57762d19872aSmrg	# Try to use the -exported_symbol ld option, if it does not
57772d19872aSmrg	# work, assume that -exports_file does not work either and
57782d19872aSmrg	# implicitly export all symbols.
57792d19872aSmrg	# This should be the same for all languages, so no per-tag cache variable.
57802d19872aSmrg	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
57812d19872aSmrg	  [lt_cv_irix_exported_symbol],
57822d19872aSmrg	  [save_LDFLAGS=$LDFLAGS
57832d19872aSmrg	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
57842d19872aSmrg	   AC_LINK_IFELSE(
57852d19872aSmrg	     [AC_LANG_SOURCE(
57862d19872aSmrg	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
57872d19872aSmrg			      [C++], [[int foo (void) { return 0; }]],
57882d19872aSmrg			      [Fortran 77], [[
57892d19872aSmrg      subroutine foo
57902d19872aSmrg      end]],
57912d19872aSmrg			      [Fortran], [[
57922d19872aSmrg      subroutine foo
57932d19872aSmrg      end]])])],
57942d19872aSmrg	      [lt_cv_irix_exported_symbol=yes],
57952d19872aSmrg	      [lt_cv_irix_exported_symbol=no])
57962d19872aSmrg           LDFLAGS=$save_LDFLAGS])
57972d19872aSmrg	if test yes = "$lt_cv_irix_exported_symbol"; then
57982d19872aSmrg          _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'
57992d19872aSmrg	fi
58002d19872aSmrg      else
58012d19872aSmrg	_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'
58022d19872aSmrg	_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'
58032d19872aSmrg      fi
58042d19872aSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
58052d19872aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
58062d19872aSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
58072d19872aSmrg      _LT_TAGVAR(inherit_rpath, $1)=yes
58082d19872aSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
58092d19872aSmrg      ;;
58102d19872aSmrg
58112d19872aSmrg    linux*)
58122d19872aSmrg      case $cc_basename in
58132d19872aSmrg      tcc*)
58142d19872aSmrg	# Fabrice Bellard et al's Tiny C Compiler
58152d19872aSmrg	_LT_TAGVAR(ld_shlibs, $1)=yes
58162d19872aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
58172d19872aSmrg	;;
58182d19872aSmrg      esac
58192d19872aSmrg      ;;
58202d19872aSmrg
58212d19872aSmrg    netbsd*)
58222d19872aSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
58232d19872aSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
58242d19872aSmrg      else
58252d19872aSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
58262d19872aSmrg      fi
58272d19872aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
58282d19872aSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
58292d19872aSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
58302d19872aSmrg      ;;
58312d19872aSmrg
58322d19872aSmrg    newsos6)
58332d19872aSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
58342d19872aSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
58352d19872aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
58362d19872aSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
58372d19872aSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
58382d19872aSmrg      ;;
58392d19872aSmrg
58402d19872aSmrg    *nto* | *qnx*)
58412d19872aSmrg      ;;
58422d19872aSmrg
58432d19872aSmrg    openbsd* | bitrig*)
58442d19872aSmrg      if test -f /usr/libexec/ld.so; then
58452d19872aSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
58462d19872aSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
58472d19872aSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
58482d19872aSmrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
58492d19872aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
58502d19872aSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
58512d19872aSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
58522d19872aSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
58532d19872aSmrg	else
58542d19872aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
58552d19872aSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
58562d19872aSmrg	fi
58572d19872aSmrg      else
58582d19872aSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
58592d19872aSmrg      fi
58602d19872aSmrg      ;;
58612d19872aSmrg
58622d19872aSmrg    os2*)
58632d19872aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
58642d19872aSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
58652d19872aSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
58662d19872aSmrg      shrext_cmds=.dll
58672d19872aSmrg      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
58682d19872aSmrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
58692d19872aSmrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
58702d19872aSmrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
58712d19872aSmrg	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
58722d19872aSmrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
58732d19872aSmrg	emximp -o $lib $output_objdir/$libname.def'
58742d19872aSmrg      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
58752d19872aSmrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
58762d19872aSmrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
58772d19872aSmrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
58782d19872aSmrg	prefix_cmds="$SED"~
58792d19872aSmrg	if test EXPORTS = "`$SED 1q $export_symbols`"; then
58802d19872aSmrg	  prefix_cmds="$prefix_cmds -e 1d";
58812d19872aSmrg	fi~
58822d19872aSmrg	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
58832d19872aSmrg	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
58842d19872aSmrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
58852d19872aSmrg	emximp -o $lib $output_objdir/$libname.def'
58862d19872aSmrg      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
58872d19872aSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
58882d19872aSmrg      _LT_TAGVAR(file_list_spec, $1)='@'
58892d19872aSmrg      ;;
58902d19872aSmrg
58912d19872aSmrg    osf3*)
58922d19872aSmrg      if test yes = "$GCC"; then
58932d19872aSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
58942d19872aSmrg	_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'
58952d19872aSmrg      else
58962d19872aSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
58972d19872aSmrg	_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'
58982d19872aSmrg      fi
58992d19872aSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
59002d19872aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
59012d19872aSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
59022d19872aSmrg      ;;
59032d19872aSmrg
59042d19872aSmrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
59052d19872aSmrg      if test yes = "$GCC"; then
59062d19872aSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
59072d19872aSmrg	_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'
59082d19872aSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
59092d19872aSmrg      else
59102d19872aSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
59112d19872aSmrg	_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'
59122d19872aSmrg	_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~
59132d19872aSmrg          $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'
59142d19872aSmrg
59152d19872aSmrg	# Both c and cxx compiler support -rpath directly
59162d19872aSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
59172d19872aSmrg      fi
59182d19872aSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
59192d19872aSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
59202d19872aSmrg      ;;
59212d19872aSmrg
59222d19872aSmrg    solaris*)
59232d19872aSmrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
59242d19872aSmrg      if test yes = "$GCC"; then
59252d19872aSmrg	wlarc='$wl'
59262d19872aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
59272d19872aSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
59282d19872aSmrg          $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'
59292d19872aSmrg      else
59302d19872aSmrg	case `$CC -V 2>&1` in
59312d19872aSmrg	*"Compilers 5.0"*)
59322d19872aSmrg	  wlarc=''
59332d19872aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
59342d19872aSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
59352d19872aSmrg            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
59362d19872aSmrg	  ;;
59372d19872aSmrg	*)
59382d19872aSmrg	  wlarc='$wl'
59392d19872aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
59402d19872aSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
59412d19872aSmrg            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
59422d19872aSmrg	  ;;
59432d19872aSmrg	esac
59442d19872aSmrg      fi
59452d19872aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
59462d19872aSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
59472d19872aSmrg      case $host_os in
59482d19872aSmrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
59492d19872aSmrg      *)
59502d19872aSmrg	# The compiler driver will combine and reorder linker options,
59512d19872aSmrg	# but understands '-z linker_flag'.  GCC discards it without '$wl',
59522d19872aSmrg	# but is careful enough not to reorder.
59532d19872aSmrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
59542d19872aSmrg	if test yes = "$GCC"; then
59552d19872aSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
59562d19872aSmrg	else
59572d19872aSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
59582d19872aSmrg	fi
59592d19872aSmrg	;;
59602d19872aSmrg      esac
59612d19872aSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
59622d19872aSmrg      ;;
59632d19872aSmrg
59642d19872aSmrg    sunos4*)
59652d19872aSmrg      if test sequent = "$host_vendor"; then
59662d19872aSmrg	# Use $CC to link under sequent, because it throws in some extra .o
59672d19872aSmrg	# files that make .init and .fini sections work.
59682d19872aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
59692d19872aSmrg      else
59702d19872aSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
59712d19872aSmrg      fi
59722d19872aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
59732d19872aSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
59742d19872aSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
59752d19872aSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
59762d19872aSmrg      ;;
59772d19872aSmrg
59782d19872aSmrg    sysv4)
59792d19872aSmrg      case $host_vendor in
59802d19872aSmrg	sni)
59812d19872aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
59822d19872aSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
59832d19872aSmrg	;;
59842d19872aSmrg	siemens)
59852d19872aSmrg	  ## LD is ld it makes a PLAMLIB
59862d19872aSmrg	  ## CC just makes a GrossModule.
59872d19872aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
59882d19872aSmrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
59892d19872aSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
59902d19872aSmrg        ;;
59912d19872aSmrg	motorola)
59922d19872aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
59932d19872aSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
59942d19872aSmrg	;;
59952d19872aSmrg      esac
59962d19872aSmrg      runpath_var='LD_RUN_PATH'
59972d19872aSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
59982d19872aSmrg      ;;
59992d19872aSmrg
60002d19872aSmrg    sysv4.3*)
60012d19872aSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
60022d19872aSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60032d19872aSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
60042d19872aSmrg      ;;
60052d19872aSmrg
60062d19872aSmrg    sysv4*MP*)
60072d19872aSmrg      if test -d /usr/nec; then
60082d19872aSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
60092d19872aSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60102d19872aSmrg	runpath_var=LD_RUN_PATH
60112d19872aSmrg	hardcode_runpath_var=yes
60122d19872aSmrg	_LT_TAGVAR(ld_shlibs, $1)=yes
60132d19872aSmrg      fi
60142d19872aSmrg      ;;
60152d19872aSmrg
60162d19872aSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
60172d19872aSmrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
60182d19872aSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
60192d19872aSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60202d19872aSmrg      runpath_var='LD_RUN_PATH'
60212d19872aSmrg
60222d19872aSmrg      if test yes = "$GCC"; then
60232d19872aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60242d19872aSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60252d19872aSmrg      else
60262d19872aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60272d19872aSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60282d19872aSmrg      fi
60292d19872aSmrg      ;;
60302d19872aSmrg
60312d19872aSmrg    sysv5* | sco3.2v5* | sco5v6*)
60322d19872aSmrg      # Note: We CANNOT use -z defs as we might desire, because we do not
60332d19872aSmrg      # link with -lc, and that would cause any symbols used from libc to
60342d19872aSmrg      # always be unresolved, which means just about no library would
60352d19872aSmrg      # ever link correctly.  If we're not using GNU ld we use -z text
60362d19872aSmrg      # though, which does catch some bad symbols but isn't as heavy-handed
60372d19872aSmrg      # as -z defs.
60382d19872aSmrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
60392d19872aSmrg      _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
60402d19872aSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
60412d19872aSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60422d19872aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
60432d19872aSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
60442d19872aSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
60452d19872aSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
60462d19872aSmrg      runpath_var='LD_RUN_PATH'
60472d19872aSmrg
60482d19872aSmrg      if test yes = "$GCC"; then
60492d19872aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60502d19872aSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60512d19872aSmrg      else
60522d19872aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60532d19872aSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60542d19872aSmrg      fi
60552d19872aSmrg      ;;
60562d19872aSmrg
60572d19872aSmrg    uts4*)
60582d19872aSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
60592d19872aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
60602d19872aSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60612d19872aSmrg      ;;
60622d19872aSmrg
60632d19872aSmrg    *)
60642d19872aSmrg      _LT_TAGVAR(ld_shlibs, $1)=no
60652d19872aSmrg      ;;
60662d19872aSmrg    esac
60672d19872aSmrg
60682d19872aSmrg    if test sni = "$host_vendor"; then
60692d19872aSmrg      case $host in
60702d19872aSmrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
60712d19872aSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
60722d19872aSmrg	;;
60732d19872aSmrg      esac
60742d19872aSmrg    fi
60752d19872aSmrg  fi
60762d19872aSmrg])
60772d19872aSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
60782d19872aSmrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
60792d19872aSmrg
60802d19872aSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
60812d19872aSmrg
60822d19872aSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
60832d19872aSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
60842d19872aSmrg_LT_DECL([], [extract_expsyms_cmds], [2],
60852d19872aSmrg    [The commands to extract the exported symbol list from a shared archive])
60862d19872aSmrg
60872d19872aSmrg#
60882d19872aSmrg# Do we need to explicitly link libc?
60892d19872aSmrg#
60902d19872aSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
60912d19872aSmrgx|xyes)
60922d19872aSmrg  # Assume -lc should be added
60932d19872aSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
60942d19872aSmrg
60952d19872aSmrg  if test yes,yes = "$GCC,$enable_shared"; then
60962d19872aSmrg    case $_LT_TAGVAR(archive_cmds, $1) in
60972d19872aSmrg    *'~'*)
60982d19872aSmrg      # FIXME: we may have to deal with multi-command sequences.
60992d19872aSmrg      ;;
61002d19872aSmrg    '$CC '*)
61012d19872aSmrg      # Test whether the compiler implicitly links with -lc since on some
61022d19872aSmrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
61032d19872aSmrg      # to ld, don't add -lc before -lgcc.
61042d19872aSmrg      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
61052d19872aSmrg	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
61062d19872aSmrg	[$RM conftest*
61072d19872aSmrg	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
61082d19872aSmrg
61092d19872aSmrg	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
61102d19872aSmrg	  soname=conftest
61112d19872aSmrg	  lib=conftest
61122d19872aSmrg	  libobjs=conftest.$ac_objext
61132d19872aSmrg	  deplibs=
61142d19872aSmrg	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
61152d19872aSmrg	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
61162d19872aSmrg	  compiler_flags=-v
61172d19872aSmrg	  linker_flags=-v
61182d19872aSmrg	  verstring=
61192d19872aSmrg	  output_objdir=.
61202d19872aSmrg	  libname=conftest
61212d19872aSmrg	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
61222d19872aSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=
61232d19872aSmrg	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
61242d19872aSmrg	  then
61252d19872aSmrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
61262d19872aSmrg	  else
61272d19872aSmrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
61282d19872aSmrg	  fi
61292d19872aSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
61302d19872aSmrg	else
61312d19872aSmrg	  cat conftest.err 1>&5
61322d19872aSmrg	fi
61332d19872aSmrg	$RM conftest*
61342d19872aSmrg	])
61352d19872aSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
61362d19872aSmrg      ;;
61372d19872aSmrg    esac
61382d19872aSmrg  fi
61392d19872aSmrg  ;;
61402d19872aSmrgesac
61412d19872aSmrg
61422d19872aSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
61432d19872aSmrg    [Whether or not to add -lc for building shared libraries])
61442d19872aSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
61452d19872aSmrg    [enable_shared_with_static_runtimes], [0],
61462d19872aSmrg    [Whether or not to disallow shared libs when runtime libs are static])
61472d19872aSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
61482d19872aSmrg    [Compiler flag to allow reflexive dlopens])
61492d19872aSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
61502d19872aSmrg    [Compiler flag to generate shared objects directly from archives])
61512d19872aSmrg_LT_TAGDECL([], [compiler_needs_object], [1],
61522d19872aSmrg    [Whether the compiler copes with passing no objects directly])
61532d19872aSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
61542d19872aSmrg    [Create an old-style archive from a shared archive])
61552d19872aSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
61562d19872aSmrg    [Create a temporary old-style archive to link instead of a shared archive])
61572d19872aSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
61582d19872aSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
61592d19872aSmrg_LT_TAGDECL([], [module_cmds], [2],
61602d19872aSmrg    [Commands used to build a loadable module if different from building
61612d19872aSmrg    a shared archive.])
61622d19872aSmrg_LT_TAGDECL([], [module_expsym_cmds], [2])
61632d19872aSmrg_LT_TAGDECL([], [with_gnu_ld], [1],
61642d19872aSmrg    [Whether we are building with GNU ld or not])
61652d19872aSmrg_LT_TAGDECL([], [allow_undefined_flag], [1],
61662d19872aSmrg    [Flag that allows shared libraries with undefined symbols to be built])
61672d19872aSmrg_LT_TAGDECL([], [no_undefined_flag], [1],
61682d19872aSmrg    [Flag that enforces no undefined symbols])
61692d19872aSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
61702d19872aSmrg    [Flag to hardcode $libdir into a binary during linking.
61712d19872aSmrg    This must work even if $libdir does not exist])
61722d19872aSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
61732d19872aSmrg    [Whether we need a single "-rpath" flag with a separated argument])
61742d19872aSmrg_LT_TAGDECL([], [hardcode_direct], [0],
61752d19872aSmrg    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
61762d19872aSmrg    DIR into the resulting binary])
61772d19872aSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
61782d19872aSmrg    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
61792d19872aSmrg    DIR into the resulting binary and the resulting library dependency is
61802d19872aSmrg    "absolute", i.e impossible to change by setting $shlibpath_var if the
61812d19872aSmrg    library is relocated])
61822d19872aSmrg_LT_TAGDECL([], [hardcode_minus_L], [0],
61832d19872aSmrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
61842d19872aSmrg    into the resulting binary])
61852d19872aSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
61862d19872aSmrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
61872d19872aSmrg    into the resulting binary])
61882d19872aSmrg_LT_TAGDECL([], [hardcode_automatic], [0],
61892d19872aSmrg    [Set to "yes" if building a shared library automatically hardcodes DIR
61902d19872aSmrg    into the library and all subsequent libraries and executables linked
61912d19872aSmrg    against it])
61922d19872aSmrg_LT_TAGDECL([], [inherit_rpath], [0],
61932d19872aSmrg    [Set to yes if linker adds runtime paths of dependent libraries
61942d19872aSmrg    to runtime path list])
61952d19872aSmrg_LT_TAGDECL([], [link_all_deplibs], [0],
61962d19872aSmrg    [Whether libtool must link a program against all its dependency libraries])
61972d19872aSmrg_LT_TAGDECL([], [always_export_symbols], [0],
61982d19872aSmrg    [Set to "yes" if exported symbols are required])
61992d19872aSmrg_LT_TAGDECL([], [export_symbols_cmds], [2],
62002d19872aSmrg    [The commands to list exported symbols])
62012d19872aSmrg_LT_TAGDECL([], [exclude_expsyms], [1],
62022d19872aSmrg    [Symbols that should not be listed in the preloaded symbols])
62032d19872aSmrg_LT_TAGDECL([], [include_expsyms], [1],
62042d19872aSmrg    [Symbols that must always be exported])
62052d19872aSmrg_LT_TAGDECL([], [prelink_cmds], [2],
62062d19872aSmrg    [Commands necessary for linking programs (against libraries) with templates])
62072d19872aSmrg_LT_TAGDECL([], [postlink_cmds], [2],
62082d19872aSmrg    [Commands necessary for finishing linking programs])
62092d19872aSmrg_LT_TAGDECL([], [file_list_spec], [1],
62102d19872aSmrg    [Specify filename containing input files])
62112d19872aSmrgdnl FIXME: Not yet implemented
62122d19872aSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
62132d19872aSmrgdnl    [Compiler flag to generate thread safe objects])
62142d19872aSmrg])# _LT_LINKER_SHLIBS
62152d19872aSmrg
62162d19872aSmrg
62172d19872aSmrg# _LT_LANG_C_CONFIG([TAG])
62182d19872aSmrg# ------------------------
62192d19872aSmrg# Ensure that the configuration variables for a C compiler are suitably
62202d19872aSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
62212d19872aSmrg# the compiler configuration to 'libtool'.
62222d19872aSmrgm4_defun([_LT_LANG_C_CONFIG],
62232d19872aSmrg[m4_require([_LT_DECL_EGREP])dnl
62242d19872aSmrglt_save_CC=$CC
62252d19872aSmrgAC_LANG_PUSH(C)
62262d19872aSmrg
62272d19872aSmrg# Source file extension for C test sources.
62282d19872aSmrgac_ext=c
62292d19872aSmrg
62302d19872aSmrg# Object file extension for compiled C test sources.
62312d19872aSmrgobjext=o
62322d19872aSmrg_LT_TAGVAR(objext, $1)=$objext
62332d19872aSmrg
62342d19872aSmrg# Code to be used in simple compile tests
62352d19872aSmrglt_simple_compile_test_code="int some_variable = 0;"
62362d19872aSmrg
62372d19872aSmrg# Code to be used in simple link tests
62382d19872aSmrglt_simple_link_test_code='int main(){return(0);}'
62392d19872aSmrg
62402d19872aSmrg_LT_TAG_COMPILER
62412d19872aSmrg# Save the default compiler, since it gets overwritten when the other
62422d19872aSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
62432d19872aSmrgcompiler_DEFAULT=$CC
62442d19872aSmrg
62452d19872aSmrg# save warnings/boilerplate of simple test code
62462d19872aSmrg_LT_COMPILER_BOILERPLATE
62472d19872aSmrg_LT_LINKER_BOILERPLATE
62482d19872aSmrg
62492d19872aSmrg## CAVEAT EMPTOR:
62502d19872aSmrg## There is no encapsulation within the following macros, do not change
62512d19872aSmrg## the running order or otherwise move them around unless you know exactly
62522d19872aSmrg## what you are doing...
62532d19872aSmrgif test -n "$compiler"; then
62542d19872aSmrg  _LT_COMPILER_NO_RTTI($1)
62552d19872aSmrg  _LT_COMPILER_PIC($1)
62562d19872aSmrg  _LT_COMPILER_C_O($1)
62572d19872aSmrg  _LT_COMPILER_FILE_LOCKS($1)
62582d19872aSmrg  _LT_LINKER_SHLIBS($1)
62592d19872aSmrg  _LT_SYS_DYNAMIC_LINKER($1)
62602d19872aSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
62612d19872aSmrg  LT_SYS_DLOPEN_SELF
62622d19872aSmrg  _LT_CMD_STRIPLIB
62632d19872aSmrg
62642d19872aSmrg  # Report what library types will actually be built
62652d19872aSmrg  AC_MSG_CHECKING([if libtool supports shared libraries])
62662d19872aSmrg  AC_MSG_RESULT([$can_build_shared])
62672d19872aSmrg
62682d19872aSmrg  AC_MSG_CHECKING([whether to build shared libraries])
62692d19872aSmrg  test no = "$can_build_shared" && enable_shared=no
62702d19872aSmrg
62712d19872aSmrg  # On AIX, shared libraries and static libraries use the same namespace, and
62722d19872aSmrg  # are all built from PIC.
62732d19872aSmrg  case $host_os in
62742d19872aSmrg  aix3*)
62752d19872aSmrg    test yes = "$enable_shared" && enable_static=no
62762d19872aSmrg    if test -n "$RANLIB"; then
62772d19872aSmrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
62782d19872aSmrg      postinstall_cmds='$RANLIB $lib'
62792d19872aSmrg    fi
62802d19872aSmrg    ;;
62812d19872aSmrg
62822d19872aSmrg  aix[[4-9]]*)
62832d19872aSmrg    if test ia64 != "$host_cpu"; then
62842d19872aSmrg      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
62852d19872aSmrg      yes,aix,yes) ;;			# shared object as lib.so file only
62862d19872aSmrg      yes,svr4,*) ;;			# shared object as lib.so archive member only
62872d19872aSmrg      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
62882d19872aSmrg      esac
62892d19872aSmrg    fi
62902d19872aSmrg    ;;
62912d19872aSmrg  esac
62922d19872aSmrg  AC_MSG_RESULT([$enable_shared])
62932d19872aSmrg
62942d19872aSmrg  AC_MSG_CHECKING([whether to build static libraries])
62952d19872aSmrg  # Make sure either enable_shared or enable_static is yes.
62962d19872aSmrg  test yes = "$enable_shared" || enable_static=yes
62972d19872aSmrg  AC_MSG_RESULT([$enable_static])
62982d19872aSmrg
62992d19872aSmrg  _LT_CONFIG($1)
63002d19872aSmrgfi
63012d19872aSmrgAC_LANG_POP
63022d19872aSmrgCC=$lt_save_CC
63032d19872aSmrg])# _LT_LANG_C_CONFIG
63042d19872aSmrg
63052d19872aSmrg
63062d19872aSmrg# _LT_LANG_CXX_CONFIG([TAG])
63072d19872aSmrg# --------------------------
63082d19872aSmrg# Ensure that the configuration variables for a C++ compiler are suitably
63092d19872aSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
63102d19872aSmrg# the compiler configuration to 'libtool'.
63112d19872aSmrgm4_defun([_LT_LANG_CXX_CONFIG],
63122d19872aSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
63132d19872aSmrgm4_require([_LT_DECL_EGREP])dnl
63142d19872aSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
63152d19872aSmrgif test -n "$CXX" && ( test no != "$CXX" &&
63162d19872aSmrg    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
63172d19872aSmrg    (test g++ != "$CXX"))); then
63182d19872aSmrg  AC_PROG_CXXCPP
63192d19872aSmrgelse
63202d19872aSmrg  _lt_caught_CXX_error=yes
63212d19872aSmrgfi
63222d19872aSmrg
63232d19872aSmrgAC_LANG_PUSH(C++)
63242d19872aSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
63252d19872aSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
63262d19872aSmrg_LT_TAGVAR(always_export_symbols, $1)=no
63272d19872aSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
63282d19872aSmrg_LT_TAGVAR(compiler_needs_object, $1)=no
63292d19872aSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
63302d19872aSmrg_LT_TAGVAR(hardcode_direct, $1)=no
63312d19872aSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
63322d19872aSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
63332d19872aSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
63342d19872aSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
63352d19872aSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
63362d19872aSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
63372d19872aSmrg_LT_TAGVAR(inherit_rpath, $1)=no
63382d19872aSmrg_LT_TAGVAR(module_cmds, $1)=
63392d19872aSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
63402d19872aSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
63412d19872aSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
63422d19872aSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
63432d19872aSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
63442d19872aSmrg_LT_TAGVAR(no_undefined_flag, $1)=
63452d19872aSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
63462d19872aSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
63472d19872aSmrg
63482d19872aSmrg# Source file extension for C++ test sources.
63492d19872aSmrgac_ext=cpp
63502d19872aSmrg
63512d19872aSmrg# Object file extension for compiled C++ test sources.
63522d19872aSmrgobjext=o
63532d19872aSmrg_LT_TAGVAR(objext, $1)=$objext
63542d19872aSmrg
63552d19872aSmrg# No sense in running all these tests if we already determined that
63562d19872aSmrg# the CXX compiler isn't working.  Some variables (like enable_shared)
63572d19872aSmrg# are currently assumed to apply to all compilers on this platform,
63582d19872aSmrg# and will be corrupted by setting them based on a non-working compiler.
63592d19872aSmrgif test yes != "$_lt_caught_CXX_error"; then
63602d19872aSmrg  # Code to be used in simple compile tests
63612d19872aSmrg  lt_simple_compile_test_code="int some_variable = 0;"
63622d19872aSmrg
63632d19872aSmrg  # Code to be used in simple link tests
63642d19872aSmrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
63652d19872aSmrg
63662d19872aSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
63672d19872aSmrg  _LT_TAG_COMPILER
63682d19872aSmrg
63692d19872aSmrg  # save warnings/boilerplate of simple test code
63702d19872aSmrg  _LT_COMPILER_BOILERPLATE
63712d19872aSmrg  _LT_LINKER_BOILERPLATE
63722d19872aSmrg
63732d19872aSmrg  # Allow CC to be a program name with arguments.
63742d19872aSmrg  lt_save_CC=$CC
63752d19872aSmrg  lt_save_CFLAGS=$CFLAGS
63762d19872aSmrg  lt_save_LD=$LD
63772d19872aSmrg  lt_save_GCC=$GCC
63782d19872aSmrg  GCC=$GXX
63792d19872aSmrg  lt_save_with_gnu_ld=$with_gnu_ld
63802d19872aSmrg  lt_save_path_LD=$lt_cv_path_LD
63812d19872aSmrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
63822d19872aSmrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
63832d19872aSmrg  else
63842d19872aSmrg    $as_unset lt_cv_prog_gnu_ld
63852d19872aSmrg  fi
63862d19872aSmrg  if test -n "${lt_cv_path_LDCXX+set}"; then
63872d19872aSmrg    lt_cv_path_LD=$lt_cv_path_LDCXX
63882d19872aSmrg  else
63892d19872aSmrg    $as_unset lt_cv_path_LD
63902d19872aSmrg  fi
63912d19872aSmrg  test -z "${LDCXX+set}" || LD=$LDCXX
63922d19872aSmrg  CC=${CXX-"c++"}
63932d19872aSmrg  CFLAGS=$CXXFLAGS
63942d19872aSmrg  compiler=$CC
63952d19872aSmrg  _LT_TAGVAR(compiler, $1)=$CC
63962d19872aSmrg  _LT_CC_BASENAME([$compiler])
63972d19872aSmrg
63982d19872aSmrg  if test -n "$compiler"; then
63992d19872aSmrg    # We don't want -fno-exception when compiling C++ code, so set the
64002d19872aSmrg    # no_builtin_flag separately
64012d19872aSmrg    if test yes = "$GXX"; then
64022d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
64032d19872aSmrg    else
64042d19872aSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
64052d19872aSmrg    fi
64062d19872aSmrg
64072d19872aSmrg    if test yes = "$GXX"; then
64082d19872aSmrg      # Set up default GNU C++ configuration
64092d19872aSmrg
64102d19872aSmrg      LT_PATH_LD
64112d19872aSmrg
64122d19872aSmrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
64132d19872aSmrg      # archiving commands below assume that GNU ld is being used.
64142d19872aSmrg      if test yes = "$with_gnu_ld"; then
64152d19872aSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
64162d19872aSmrg        _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'
64172d19872aSmrg
64182d19872aSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
64192d19872aSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
64202d19872aSmrg
64212d19872aSmrg        # If archive_cmds runs LD, not CC, wlarc should be empty
64222d19872aSmrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
64232d19872aSmrg        #     investigate it a little bit more. (MM)
64242d19872aSmrg        wlarc='$wl'
64252d19872aSmrg
64262d19872aSmrg        # ancient GNU ld didn't support --whole-archive et. al.
64272d19872aSmrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
64282d19872aSmrg	  $GREP 'no-whole-archive' > /dev/null; then
64292d19872aSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
64302d19872aSmrg        else
64312d19872aSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
64322d19872aSmrg        fi
64332d19872aSmrg      else
64342d19872aSmrg        with_gnu_ld=no
64352d19872aSmrg        wlarc=
64362d19872aSmrg
64372d19872aSmrg        # A generic and very simple default shared library creation
64382d19872aSmrg        # command for GNU C++ for the case where it uses the native
64392d19872aSmrg        # linker, instead of GNU ld.  If possible, this setting should
64402d19872aSmrg        # overridden to take advantage of the native linker features on
64412d19872aSmrg        # the platform it is being used on.
64422d19872aSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
64432d19872aSmrg      fi
64442d19872aSmrg
64452d19872aSmrg      # Commands to make compiler produce verbose output that lists
64462d19872aSmrg      # what "hidden" libraries, object files and flags are used when
64472d19872aSmrg      # linking a shared library.
64482d19872aSmrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
64492d19872aSmrg
64502d19872aSmrg    else
64512d19872aSmrg      GXX=no
64522d19872aSmrg      with_gnu_ld=no
64532d19872aSmrg      wlarc=
64542d19872aSmrg    fi
64552d19872aSmrg
64562d19872aSmrg    # PORTME: fill in a description of your system's C++ link characteristics
64572d19872aSmrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
64582d19872aSmrg    _LT_TAGVAR(ld_shlibs, $1)=yes
64592d19872aSmrg    case $host_os in
64602d19872aSmrg      aix3*)
64612d19872aSmrg        # FIXME: insert proper C++ library support
64622d19872aSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
64632d19872aSmrg        ;;
64642d19872aSmrg      aix[[4-9]]*)
64652d19872aSmrg        if test ia64 = "$host_cpu"; then
64662d19872aSmrg          # On IA64, the linker does run time linking by default, so we don't
64672d19872aSmrg          # have to do anything special.
64682d19872aSmrg          aix_use_runtimelinking=no
64692d19872aSmrg          exp_sym_flag='-Bexport'
64702d19872aSmrg          no_entry_flag=
64712d19872aSmrg        else
64722d19872aSmrg          aix_use_runtimelinking=no
64732d19872aSmrg
64742d19872aSmrg          # Test if we are trying to use run time linking or normal
64752d19872aSmrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
64762d19872aSmrg          # have runtime linking enabled, and use it for executables.
64772d19872aSmrg          # For shared libraries, we enable/disable runtime linking
64782d19872aSmrg          # depending on the kind of the shared library created -
64792d19872aSmrg          # when "with_aix_soname,aix_use_runtimelinking" is:
64802d19872aSmrg          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
64812d19872aSmrg          # "aix,yes"  lib.so          shared, rtl:yes, for executables
64822d19872aSmrg          #            lib.a           static archive
64832d19872aSmrg          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
64842d19872aSmrg          #            lib.a(lib.so.V) shared, rtl:no,  for executables
64852d19872aSmrg          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
64862d19872aSmrg          #            lib.a(lib.so.V) shared, rtl:no
64872d19872aSmrg          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
64882d19872aSmrg          #            lib.a           static archive
64892d19872aSmrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
64902d19872aSmrg	    for ld_flag in $LDFLAGS; do
64912d19872aSmrg	      case $ld_flag in
64922d19872aSmrg	      *-brtl*)
64932d19872aSmrg	        aix_use_runtimelinking=yes
64942d19872aSmrg	        break
64952d19872aSmrg	        ;;
64962d19872aSmrg	      esac
64972d19872aSmrg	    done
64982d19872aSmrg	    if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
64992d19872aSmrg	      # With aix-soname=svr4, we create the lib.so.V shared archives only,
65002d19872aSmrg	      # so we don't have lib.a shared libs to link our executables.
65012d19872aSmrg	      # We have to force runtime linking in this case.
65022d19872aSmrg	      aix_use_runtimelinking=yes
65032d19872aSmrg	      LDFLAGS="$LDFLAGS -Wl,-brtl"
65042d19872aSmrg	    fi
65052d19872aSmrg	    ;;
65062d19872aSmrg          esac
65072d19872aSmrg
65082d19872aSmrg          exp_sym_flag='-bexport'
65092d19872aSmrg          no_entry_flag='-bnoentry'
65102d19872aSmrg        fi
65112d19872aSmrg
65122d19872aSmrg        # When large executables or shared objects are built, AIX ld can
65132d19872aSmrg        # have problems creating the table of contents.  If linking a library
65142d19872aSmrg        # or program results in "error TOC overflow" add -mminimal-toc to
65152d19872aSmrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
65162d19872aSmrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
65172d19872aSmrg
65182d19872aSmrg        _LT_TAGVAR(archive_cmds, $1)=''
65192d19872aSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
65202d19872aSmrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
65212d19872aSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
65222d19872aSmrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
65232d19872aSmrg        _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
65242d19872aSmrg        case $with_aix_soname,$aix_use_runtimelinking in
65252d19872aSmrg        aix,*) ;;	# no import file
65262d19872aSmrg        svr4,* | *,yes) # use import file
65272d19872aSmrg          # The Import File defines what to hardcode.
65282d19872aSmrg          _LT_TAGVAR(hardcode_direct, $1)=no
65292d19872aSmrg          _LT_TAGVAR(hardcode_direct_absolute, $1)=no
65302d19872aSmrg          ;;
65312d19872aSmrg        esac
65322d19872aSmrg
65332d19872aSmrg        if test yes = "$GXX"; then
65342d19872aSmrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
65352d19872aSmrg          # We only want to do this on AIX 4.2 and lower, the check
65362d19872aSmrg          # below for broken collect2 doesn't work under 4.3+
65372d19872aSmrg	  collect2name=`$CC -print-prog-name=collect2`
65382d19872aSmrg	  if test -f "$collect2name" &&
65392d19872aSmrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
65402d19872aSmrg	  then
65412d19872aSmrg	    # We have reworked collect2
65422d19872aSmrg	    :
65432d19872aSmrg	  else
65442d19872aSmrg	    # We have old collect2
65452d19872aSmrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
65462d19872aSmrg	    # It fails to find uninstalled libraries when the uninstalled
65472d19872aSmrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
65482d19872aSmrg	    # to unsupported forces relinking
65492d19872aSmrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
65502d19872aSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
65512d19872aSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
65522d19872aSmrg	  fi
65532d19872aSmrg          esac
65542d19872aSmrg          shared_flag='-shared'
65552d19872aSmrg	  if test yes = "$aix_use_runtimelinking"; then
65562d19872aSmrg	    shared_flag=$shared_flag' $wl-G'
65572d19872aSmrg	  fi
65582d19872aSmrg	  # Need to ensure runtime linking is disabled for the traditional
65592d19872aSmrg	  # shared library, or the linker may eventually find shared libraries
65602d19872aSmrg	  # /with/ Import File - we do not want to mix them.
65612d19872aSmrg	  shared_flag_aix='-shared'
65622d19872aSmrg	  shared_flag_svr4='-shared $wl-G'
65632d19872aSmrg        else
65642d19872aSmrg          # not using gcc
65652d19872aSmrg          if test ia64 = "$host_cpu"; then
65662d19872aSmrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
65672d19872aSmrg	  # chokes on -Wl,-G. The following line is correct:
65682d19872aSmrg	  shared_flag='-G'
65692d19872aSmrg          else
65702d19872aSmrg	    if test yes = "$aix_use_runtimelinking"; then
65712d19872aSmrg	      shared_flag='$wl-G'
65722d19872aSmrg	    else
65732d19872aSmrg	      shared_flag='$wl-bM:SRE'
65742d19872aSmrg	    fi
65752d19872aSmrg	    shared_flag_aix='$wl-bM:SRE'
65762d19872aSmrg	    shared_flag_svr4='$wl-G'
65772d19872aSmrg          fi
65782d19872aSmrg        fi
65792d19872aSmrg
65802d19872aSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
65812d19872aSmrg        # It seems that -bexpall does not export symbols beginning with
65822d19872aSmrg        # underscore (_), so it is better to generate a list of symbols to
65832d19872aSmrg	# export.
65842d19872aSmrg        _LT_TAGVAR(always_export_symbols, $1)=yes
65852d19872aSmrg	if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
65862d19872aSmrg          # Warning - without using the other runtime loading flags (-brtl),
65872d19872aSmrg          # -berok will link without error, but may produce a broken library.
65882d19872aSmrg          # The "-G" linker flag allows undefined symbols.
65892d19872aSmrg          _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
65902d19872aSmrg          # Determine the default libpath from the value encoded in an empty
65912d19872aSmrg          # executable.
65922d19872aSmrg          _LT_SYS_MODULE_PATH_AIX([$1])
65932d19872aSmrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
65942d19872aSmrg
65952d19872aSmrg          _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
65962d19872aSmrg        else
65972d19872aSmrg          if test ia64 = "$host_cpu"; then
65982d19872aSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
65992d19872aSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
66002d19872aSmrg	    _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"
66012d19872aSmrg          else
66022d19872aSmrg	    # Determine the default libpath from the value encoded in an
66032d19872aSmrg	    # empty executable.
66042d19872aSmrg	    _LT_SYS_MODULE_PATH_AIX([$1])
66052d19872aSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
66062d19872aSmrg	    # Warning - without using the other run time loading flags,
66072d19872aSmrg	    # -berok will link without error, but may produce a broken library.
66082d19872aSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
66092d19872aSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
66102d19872aSmrg	    if test yes = "$with_gnu_ld"; then
66112d19872aSmrg	      # We only use this code for GNU lds that support --whole-archive.
66122d19872aSmrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
66132d19872aSmrg	    else
66142d19872aSmrg	      # Exported symbols can be pulled into shared objects from archives
66152d19872aSmrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
66162d19872aSmrg	    fi
66172d19872aSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
66182d19872aSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
66192d19872aSmrg	    # -brtl affects multiple linker settings, -berok does not and is overridden later
66202d19872aSmrg	    compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
66212d19872aSmrg	    if test svr4 != "$with_aix_soname"; then
66222d19872aSmrg	      # This is similar to how AIX traditionally builds its shared
66232d19872aSmrg	      # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
66242d19872aSmrg	      _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'
66252d19872aSmrg	    fi
66262d19872aSmrg	    if test aix != "$with_aix_soname"; then
66272d19872aSmrg	      _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'
66282d19872aSmrg	    else
66292d19872aSmrg	      # used by -dlpreopen to get the symbols
66302d19872aSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
66312d19872aSmrg	    fi
66322d19872aSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
66332d19872aSmrg          fi
66342d19872aSmrg        fi
66352d19872aSmrg        ;;
66362d19872aSmrg
66372d19872aSmrg      beos*)
66382d19872aSmrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
66392d19872aSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
66402d19872aSmrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
66412d19872aSmrg	  # support --undefined.  This deserves some investigation.  FIXME
66422d19872aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
66432d19872aSmrg	else
66442d19872aSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
66452d19872aSmrg	fi
66462d19872aSmrg	;;
66472d19872aSmrg
66482d19872aSmrg      chorus*)
66492d19872aSmrg        case $cc_basename in
66502d19872aSmrg          *)
66512d19872aSmrg	  # FIXME: insert proper C++ library support
66522d19872aSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
66532d19872aSmrg	  ;;
66542d19872aSmrg        esac
66552d19872aSmrg        ;;
66562d19872aSmrg
66572d19872aSmrg      cygwin* | mingw* | pw32* | cegcc*)
66582d19872aSmrg	case $GXX,$cc_basename in
66592d19872aSmrg	,cl* | no,cl* | ,icl* | no,icl*)
66602d19872aSmrg	  # Native MSVC or ICC
66612d19872aSmrg	  # hardcode_libdir_flag_spec is actually meaningless, as there is
66622d19872aSmrg	  # no search path for DLLs.
66632d19872aSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
66642d19872aSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
66652d19872aSmrg	  _LT_TAGVAR(always_export_symbols, $1)=yes
66662d19872aSmrg	  _LT_TAGVAR(file_list_spec, $1)='@'
66672d19872aSmrg	  # Tell ltmain to make .lib files, not .a files.
66682d19872aSmrg	  libext=lib
66692d19872aSmrg	  # Tell ltmain to make .dll files, not .so files.
66702d19872aSmrg	  shrext_cmds=.dll
66712d19872aSmrg	  # FIXME: Setting linknames here is a bad hack.
66722d19872aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
66732d19872aSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
66742d19872aSmrg              cp "$export_symbols" "$output_objdir/$soname.def";
66752d19872aSmrg              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
66762d19872aSmrg            else
66772d19872aSmrg              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
66782d19872aSmrg            fi~
66792d19872aSmrg            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
66802d19872aSmrg            linknames='
66812d19872aSmrg	  # The linker will not automatically build a static lib if we build a DLL.
66822d19872aSmrg	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
66832d19872aSmrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
66842d19872aSmrg	  # Don't use ranlib
66852d19872aSmrg	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
66862d19872aSmrg	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
66872d19872aSmrg            lt_tool_outputfile="@TOOL_OUTPUT@"~
66882d19872aSmrg            case $lt_outputfile in
66892d19872aSmrg              *.exe|*.EXE) ;;
66902d19872aSmrg              *)
66912d19872aSmrg                lt_outputfile=$lt_outputfile.exe
66922d19872aSmrg                lt_tool_outputfile=$lt_tool_outputfile.exe
66932d19872aSmrg                ;;
66942d19872aSmrg            esac~
66952d19872aSmrg            func_to_tool_file "$lt_outputfile"~
66962d19872aSmrg            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
66972d19872aSmrg              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
66982d19872aSmrg              $RM "$lt_outputfile.manifest";
66992d19872aSmrg            fi'
67002d19872aSmrg	  ;;
67012d19872aSmrg	*)
67022d19872aSmrg	  # g++
67032d19872aSmrg	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
67042d19872aSmrg	  # as there is no search path for DLLs.
67052d19872aSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
67062d19872aSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
67072d19872aSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
67082d19872aSmrg	  _LT_TAGVAR(always_export_symbols, $1)=no
67092d19872aSmrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
67102d19872aSmrg
67112d19872aSmrg	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
67122d19872aSmrg	    _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'
67132d19872aSmrg	    # If the export-symbols file already is a .def file, use it as
67142d19872aSmrg	    # is; otherwise, prepend EXPORTS...
67152d19872aSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
67162d19872aSmrg              cp $export_symbols $output_objdir/$soname.def;
67172d19872aSmrg            else
67182d19872aSmrg              echo EXPORTS > $output_objdir/$soname.def;
67192d19872aSmrg              cat $export_symbols >> $output_objdir/$soname.def;
67202d19872aSmrg            fi~
67212d19872aSmrg            $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'
67222d19872aSmrg	  else
67232d19872aSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
67242d19872aSmrg	  fi
67252d19872aSmrg	  ;;
67262d19872aSmrg	esac
67272d19872aSmrg	;;
67282d19872aSmrg      darwin* | rhapsody*)
67292d19872aSmrg        _LT_DARWIN_LINKER_FEATURES($1)
67302d19872aSmrg	;;
67312d19872aSmrg
67322d19872aSmrg      os2*)
67332d19872aSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
67342d19872aSmrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
67352d19872aSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
67362d19872aSmrg	shrext_cmds=.dll
67372d19872aSmrg	_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
67382d19872aSmrg	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
67392d19872aSmrg	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
67402d19872aSmrg	  $ECHO EXPORTS >> $output_objdir/$libname.def~
67412d19872aSmrg	  emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
67422d19872aSmrg	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
67432d19872aSmrg	  emximp -o $lib $output_objdir/$libname.def'
67442d19872aSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
67452d19872aSmrg	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
67462d19872aSmrg	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
67472d19872aSmrg	  $ECHO EXPORTS >> $output_objdir/$libname.def~
67482d19872aSmrg	  prefix_cmds="$SED"~
67492d19872aSmrg	  if test EXPORTS = "`$SED 1q $export_symbols`"; then
67502d19872aSmrg	    prefix_cmds="$prefix_cmds -e 1d";
67512d19872aSmrg	  fi~
67522d19872aSmrg	  prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
67532d19872aSmrg	  cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
67542d19872aSmrg	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
67552d19872aSmrg	  emximp -o $lib $output_objdir/$libname.def'
67562d19872aSmrg	_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
67572d19872aSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
67582d19872aSmrg	_LT_TAGVAR(file_list_spec, $1)='@'
67592d19872aSmrg	;;
67602d19872aSmrg
67612d19872aSmrg      dgux*)
67622d19872aSmrg        case $cc_basename in
67632d19872aSmrg          ec++*)
67642d19872aSmrg	    # FIXME: insert proper C++ library support
67652d19872aSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
67662d19872aSmrg	    ;;
67672d19872aSmrg          ghcx*)
67682d19872aSmrg	    # Green Hills C++ Compiler
67692d19872aSmrg	    # FIXME: insert proper C++ library support
67702d19872aSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
67712d19872aSmrg	    ;;
67722d19872aSmrg          *)
67732d19872aSmrg	    # FIXME: insert proper C++ library support
67742d19872aSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
67752d19872aSmrg	    ;;
67762d19872aSmrg        esac
67772d19872aSmrg        ;;
67782d19872aSmrg
67792d19872aSmrg      freebsd2.*)
67802d19872aSmrg        # C++ shared libraries reported to be fairly broken before
67812d19872aSmrg	# switch to ELF
67822d19872aSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
67832d19872aSmrg        ;;
67842d19872aSmrg
67852d19872aSmrg      freebsd-elf*)
67862d19872aSmrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
67872d19872aSmrg        ;;
67882d19872aSmrg
67892d19872aSmrg      freebsd* | dragonfly* | midnightbsd*)
67902d19872aSmrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
67912d19872aSmrg        # conventions
67922d19872aSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
67932d19872aSmrg        ;;
67942d19872aSmrg
67952d19872aSmrg      haiku*)
67962d19872aSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
67972d19872aSmrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
67982d19872aSmrg        ;;
67992d19872aSmrg
68002d19872aSmrg      hpux9*)
68012d19872aSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
68022d19872aSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
68032d19872aSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
68042d19872aSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
68052d19872aSmrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
68062d19872aSmrg				             # but as the default
68072d19872aSmrg				             # location of the library.
68082d19872aSmrg
68092d19872aSmrg        case $cc_basename in
68102d19872aSmrg          CC*)
68112d19872aSmrg            # FIXME: insert proper C++ library support
68122d19872aSmrg            _LT_TAGVAR(ld_shlibs, $1)=no
68132d19872aSmrg            ;;
68142d19872aSmrg          aCC*)
68152d19872aSmrg            _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'
68162d19872aSmrg            # Commands to make compiler produce verbose output that lists
68172d19872aSmrg            # what "hidden" libraries, object files and flags are used when
68182d19872aSmrg            # linking a shared library.
68192d19872aSmrg            #
68202d19872aSmrg            # There doesn't appear to be a way to prevent this compiler from
68212d19872aSmrg            # explicitly linking system object files so we need to strip them
68222d19872aSmrg            # from the output so that they don't get included in the library
68232d19872aSmrg            # dependencies.
68242d19872aSmrg            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"'
68252d19872aSmrg            ;;
68262d19872aSmrg          *)
68272d19872aSmrg            if test yes = "$GXX"; then
68282d19872aSmrg              _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'
68292d19872aSmrg            else
68302d19872aSmrg              # FIXME: insert proper C++ library support
68312d19872aSmrg              _LT_TAGVAR(ld_shlibs, $1)=no
68322d19872aSmrg            fi
68332d19872aSmrg            ;;
68342d19872aSmrg        esac
68352d19872aSmrg        ;;
68362d19872aSmrg
68372d19872aSmrg      hpux10*|hpux11*)
68382d19872aSmrg        if test no = "$with_gnu_ld"; then
68392d19872aSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
68402d19872aSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
68412d19872aSmrg
68422d19872aSmrg          case $host_cpu in
68432d19872aSmrg            hppa*64*|ia64*)
68442d19872aSmrg              ;;
68452d19872aSmrg            *)
68462d19872aSmrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
68472d19872aSmrg              ;;
68482d19872aSmrg          esac
68492d19872aSmrg        fi
68502d19872aSmrg        case $host_cpu in
68512d19872aSmrg          hppa*64*|ia64*)
68522d19872aSmrg            _LT_TAGVAR(hardcode_direct, $1)=no
68532d19872aSmrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
68542d19872aSmrg            ;;
68552d19872aSmrg          *)
68562d19872aSmrg            _LT_TAGVAR(hardcode_direct, $1)=yes
68572d19872aSmrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
68582d19872aSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
68592d19872aSmrg					         # but as the default
68602d19872aSmrg					         # location of the library.
68612d19872aSmrg            ;;
68622d19872aSmrg        esac
68632d19872aSmrg
68642d19872aSmrg        case $cc_basename in
68652d19872aSmrg          CC*)
68662d19872aSmrg	    # FIXME: insert proper C++ library support
68672d19872aSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
68682d19872aSmrg	    ;;
68692d19872aSmrg          aCC*)
68702d19872aSmrg	    case $host_cpu in
68712d19872aSmrg	      hppa*64*)
68722d19872aSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
68732d19872aSmrg	        ;;
68742d19872aSmrg	      ia64*)
68752d19872aSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
68762d19872aSmrg	        ;;
68772d19872aSmrg	      *)
68782d19872aSmrg	        _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'
68792d19872aSmrg	        ;;
68802d19872aSmrg	    esac
68812d19872aSmrg	    # Commands to make compiler produce verbose output that lists
68822d19872aSmrg	    # what "hidden" libraries, object files and flags are used when
68832d19872aSmrg	    # linking a shared library.
68842d19872aSmrg	    #
68852d19872aSmrg	    # There doesn't appear to be a way to prevent this compiler from
68862d19872aSmrg	    # explicitly linking system object files so we need to strip them
68872d19872aSmrg	    # from the output so that they don't get included in the library
68882d19872aSmrg	    # dependencies.
68892d19872aSmrg	    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"'
68902d19872aSmrg	    ;;
68912d19872aSmrg          *)
68922d19872aSmrg	    if test yes = "$GXX"; then
68932d19872aSmrg	      if test no = "$with_gnu_ld"; then
68942d19872aSmrg	        case $host_cpu in
68952d19872aSmrg	          hppa*64*)
68962d19872aSmrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
68972d19872aSmrg	            ;;
68982d19872aSmrg	          ia64*)
68992d19872aSmrg	            _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'
69002d19872aSmrg	            ;;
69012d19872aSmrg	          *)
69022d19872aSmrg	            _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'
69032d19872aSmrg	            ;;
69042d19872aSmrg	        esac
69052d19872aSmrg	      fi
69062d19872aSmrg	    else
69072d19872aSmrg	      # FIXME: insert proper C++ library support
69082d19872aSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
69092d19872aSmrg	    fi
69102d19872aSmrg	    ;;
69112d19872aSmrg        esac
69122d19872aSmrg        ;;
69132d19872aSmrg
69142d19872aSmrg      interix[[3-9]]*)
69152d19872aSmrg	_LT_TAGVAR(hardcode_direct, $1)=no
69162d19872aSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
69172d19872aSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
69182d19872aSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
69192d19872aSmrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
69202d19872aSmrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
69212d19872aSmrg	# default) and relocated if they conflict, which is a slow very memory
69222d19872aSmrg	# consuming and fragmenting process.  To avoid this, we pick a random,
69232d19872aSmrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
69242d19872aSmrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
69252d19872aSmrg	_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'
69262d19872aSmrg	_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'
69272d19872aSmrg	;;
69282d19872aSmrg      irix5* | irix6*)
69292d19872aSmrg        case $cc_basename in
69302d19872aSmrg          CC*)
69312d19872aSmrg	    # SGI C++
69322d19872aSmrg	    _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'
69332d19872aSmrg
69342d19872aSmrg	    # Archives containing C++ object files must be created using
69352d19872aSmrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
69362d19872aSmrg	    # necessary to make sure instantiated templates are included
69372d19872aSmrg	    # in the archive.
69382d19872aSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
69392d19872aSmrg	    ;;
69402d19872aSmrg          *)
69412d19872aSmrg	    if test yes = "$GXX"; then
69422d19872aSmrg	      if test no = "$with_gnu_ld"; then
69432d19872aSmrg	        _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'
69442d19872aSmrg	      else
69452d19872aSmrg	        _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'
69462d19872aSmrg	      fi
69472d19872aSmrg	    fi
69482d19872aSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
69492d19872aSmrg	    ;;
69502d19872aSmrg        esac
69512d19872aSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
69522d19872aSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
69532d19872aSmrg        _LT_TAGVAR(inherit_rpath, $1)=yes
69542d19872aSmrg        ;;
69552d19872aSmrg
69562d19872aSmrg      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
69572d19872aSmrg        case $cc_basename in
69582d19872aSmrg          KCC*)
69592d19872aSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
69602d19872aSmrg
69612d19872aSmrg	    # KCC will only create a shared library if the output file
69622d19872aSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
69632d19872aSmrg	    # to its proper name (with version) after linking.
69642d19872aSmrg	    _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'
69652d19872aSmrg	    _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'
69662d19872aSmrg	    # Commands to make compiler produce verbose output that lists
69672d19872aSmrg	    # what "hidden" libraries, object files and flags are used when
69682d19872aSmrg	    # linking a shared library.
69692d19872aSmrg	    #
69702d19872aSmrg	    # There doesn't appear to be a way to prevent this compiler from
69712d19872aSmrg	    # explicitly linking system object files so we need to strip them
69722d19872aSmrg	    # from the output so that they don't get included in the library
69732d19872aSmrg	    # dependencies.
69742d19872aSmrg	    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"'
69752d19872aSmrg
69762d19872aSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
69772d19872aSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
69782d19872aSmrg
69792d19872aSmrg	    # Archives containing C++ object files must be created using
69802d19872aSmrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
69812d19872aSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
69822d19872aSmrg	    ;;
69832d19872aSmrg	  icpc* | ecpc* )
69842d19872aSmrg	    # Intel C++
69852d19872aSmrg	    with_gnu_ld=yes
69862d19872aSmrg	    # version 8.0 and above of icpc choke on multiply defined symbols
69872d19872aSmrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
69882d19872aSmrg	    # earlier do not add the objects themselves.
69892d19872aSmrg	    case `$CC -V 2>&1` in
69902d19872aSmrg	      *"Version 7."*)
69912d19872aSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
69922d19872aSmrg		_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'
69932d19872aSmrg		;;
69942d19872aSmrg	      *)  # Version 8.0 or newer
69952d19872aSmrg	        tmp_idyn=
69962d19872aSmrg	        case $host_cpu in
69972d19872aSmrg		  ia64*) tmp_idyn=' -i_dynamic';;
69982d19872aSmrg		esac
69992d19872aSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
70002d19872aSmrg		_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'
70012d19872aSmrg		;;
70022d19872aSmrg	    esac
70032d19872aSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
70042d19872aSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
70052d19872aSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
70062d19872aSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
70072d19872aSmrg	    ;;
70082d19872aSmrg          pgCC* | pgcpp*)
70092d19872aSmrg            # Portland Group C++ compiler
70102d19872aSmrg	    case `$CC -V` in
70112d19872aSmrg	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
70122d19872aSmrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
70132d19872aSmrg               rm -rf $tpldir~
70142d19872aSmrg               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
70152d19872aSmrg               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
70162d19872aSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
70172d19872aSmrg                rm -rf $tpldir~
70182d19872aSmrg                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
70192d19872aSmrg                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
70202d19872aSmrg                $RANLIB $oldlib'
70212d19872aSmrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
70222d19872aSmrg                rm -rf $tpldir~
70232d19872aSmrg                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
70242d19872aSmrg                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
70252d19872aSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
70262d19872aSmrg                rm -rf $tpldir~
70272d19872aSmrg                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
70282d19872aSmrg                $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'
70292d19872aSmrg	      ;;
70302d19872aSmrg	    *) # Version 6 and above use weak symbols
70312d19872aSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
70322d19872aSmrg	      _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'
70332d19872aSmrg	      ;;
70342d19872aSmrg	    esac
70352d19872aSmrg
70362d19872aSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
70372d19872aSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
70382d19872aSmrg	    _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'
70392d19872aSmrg            ;;
70402d19872aSmrg	  cxx*)
70412d19872aSmrg	    # Compaq C++
70422d19872aSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
70432d19872aSmrg	    _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'
70442d19872aSmrg
70452d19872aSmrg	    runpath_var=LD_RUN_PATH
70462d19872aSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
70472d19872aSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
70482d19872aSmrg
70492d19872aSmrg	    # Commands to make compiler produce verbose output that lists
70502d19872aSmrg	    # what "hidden" libraries, object files and flags are used when
70512d19872aSmrg	    # linking a shared library.
70522d19872aSmrg	    #
70532d19872aSmrg	    # There doesn't appear to be a way to prevent this compiler from
70542d19872aSmrg	    # explicitly linking system object files so we need to strip them
70552d19872aSmrg	    # from the output so that they don't get included in the library
70562d19872aSmrg	    # dependencies.
70572d19872aSmrg	    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'
70582d19872aSmrg	    ;;
70592d19872aSmrg	  xl* | mpixl* | bgxl*)
70602d19872aSmrg	    # IBM XL 8.0 on PPC, with GNU ld
70612d19872aSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
70622d19872aSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
70632d19872aSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
70642d19872aSmrg	    if test yes = "$supports_anon_versioning"; then
70652d19872aSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
70662d19872aSmrg                cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
70672d19872aSmrg                echo "local: *; };" >> $output_objdir/$libname.ver~
70682d19872aSmrg                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
70692d19872aSmrg	    fi
70702d19872aSmrg	    ;;
70712d19872aSmrg	  *)
70722d19872aSmrg	    case `$CC -V 2>&1 | $SED 5q` in
70732d19872aSmrg	    *Sun\ C*)
70742d19872aSmrg	      # Sun C++ 5.9
70752d19872aSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
70762d19872aSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
70772d19872aSmrg	      _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'
70782d19872aSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
70792d19872aSmrg	      _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'
70802d19872aSmrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
70812d19872aSmrg
70822d19872aSmrg	      # Not sure whether something based on
70832d19872aSmrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
70842d19872aSmrg	      # would be better.
70852d19872aSmrg	      output_verbose_link_cmd='func_echo_all'
70862d19872aSmrg
70872d19872aSmrg	      # Archives containing C++ object files must be created using
70882d19872aSmrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
70892d19872aSmrg	      # necessary to make sure instantiated templates are included
70902d19872aSmrg	      # in the archive.
70912d19872aSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
70922d19872aSmrg	      ;;
70932d19872aSmrg	    esac
70942d19872aSmrg	    ;;
70952d19872aSmrg	esac
70962d19872aSmrg	;;
70972d19872aSmrg
70982d19872aSmrg      lynxos*)
70992d19872aSmrg        # FIXME: insert proper C++ library support
71002d19872aSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
71012d19872aSmrg	;;
71022d19872aSmrg
71032d19872aSmrg      m88k*)
71042d19872aSmrg        # FIXME: insert proper C++ library support
71052d19872aSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
71062d19872aSmrg	;;
71072d19872aSmrg
71082d19872aSmrg      mvs*)
71092d19872aSmrg        case $cc_basename in
71102d19872aSmrg          cxx*)
71112d19872aSmrg	    # FIXME: insert proper C++ library support
71122d19872aSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
71132d19872aSmrg	    ;;
71142d19872aSmrg	  *)
71152d19872aSmrg	    # FIXME: insert proper C++ library support
71162d19872aSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
71172d19872aSmrg	    ;;
71182d19872aSmrg	esac
71192d19872aSmrg	;;
71202d19872aSmrg
71212d19872aSmrg      netbsd*)
71222d19872aSmrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
71232d19872aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
71242d19872aSmrg	  wlarc=
71252d19872aSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
71262d19872aSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
71272d19872aSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
71282d19872aSmrg	fi
71292d19872aSmrg	# Workaround some broken pre-1.5 toolchains
71302d19872aSmrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
71312d19872aSmrg	;;
71322d19872aSmrg
71332d19872aSmrg      *nto* | *qnx*)
71342d19872aSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
71352d19872aSmrg	;;
71362d19872aSmrg
71372d19872aSmrg      openbsd* | bitrig*)
71382d19872aSmrg	if test -f /usr/libexec/ld.so; then
71392d19872aSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
71402d19872aSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
71412d19872aSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
71422d19872aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
71432d19872aSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
71442d19872aSmrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
71452d19872aSmrg	    _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'
71462d19872aSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
71472d19872aSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
71482d19872aSmrg	  fi
71492d19872aSmrg	  output_verbose_link_cmd=func_echo_all
71502d19872aSmrg	else
71512d19872aSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
71522d19872aSmrg	fi
71532d19872aSmrg	;;
71542d19872aSmrg
71552d19872aSmrg      osf3* | osf4* | osf5*)
71562d19872aSmrg        case $cc_basename in
71572d19872aSmrg          KCC*)
71582d19872aSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
71592d19872aSmrg
71602d19872aSmrg	    # KCC will only create a shared library if the output file
71612d19872aSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
71622d19872aSmrg	    # to its proper name (with version) after linking.
71632d19872aSmrg	    _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'
71642d19872aSmrg
71652d19872aSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
71662d19872aSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
71672d19872aSmrg
71682d19872aSmrg	    # Archives containing C++ object files must be created using
71692d19872aSmrg	    # the KAI C++ compiler.
71702d19872aSmrg	    case $host in
71712d19872aSmrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
71722d19872aSmrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
71732d19872aSmrg	    esac
71742d19872aSmrg	    ;;
71752d19872aSmrg          RCC*)
71762d19872aSmrg	    # Rational C++ 2.4.1
71772d19872aSmrg	    # FIXME: insert proper C++ library support
71782d19872aSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
71792d19872aSmrg	    ;;
71802d19872aSmrg          cxx*)
71812d19872aSmrg	    case $host in
71822d19872aSmrg	      osf3*)
71832d19872aSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
71842d19872aSmrg	        _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'
71852d19872aSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
71862d19872aSmrg		;;
71872d19872aSmrg	      *)
71882d19872aSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
71892d19872aSmrg	        _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'
71902d19872aSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
71912d19872aSmrg                  echo "-hidden">> $lib.exp~
71922d19872aSmrg                  $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~
71932d19872aSmrg                  $RM $lib.exp'
71942d19872aSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
71952d19872aSmrg		;;
71962d19872aSmrg	    esac
71972d19872aSmrg
71982d19872aSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
71992d19872aSmrg
72002d19872aSmrg	    # Commands to make compiler produce verbose output that lists
72012d19872aSmrg	    # what "hidden" libraries, object files and flags are used when
72022d19872aSmrg	    # linking a shared library.
72032d19872aSmrg	    #
72042d19872aSmrg	    # There doesn't appear to be a way to prevent this compiler from
72052d19872aSmrg	    # explicitly linking system object files so we need to strip them
72062d19872aSmrg	    # from the output so that they don't get included in the library
72072d19872aSmrg	    # dependencies.
72082d19872aSmrg	    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"'
72092d19872aSmrg	    ;;
72102d19872aSmrg	  *)
72112d19872aSmrg	    if test yes,no = "$GXX,$with_gnu_ld"; then
72122d19872aSmrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
72132d19872aSmrg	      case $host in
72142d19872aSmrg	        osf3*)
72152d19872aSmrg	          _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'
72162d19872aSmrg		  ;;
72172d19872aSmrg	        *)
72182d19872aSmrg	          _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'
72192d19872aSmrg		  ;;
72202d19872aSmrg	      esac
72212d19872aSmrg
72222d19872aSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
72232d19872aSmrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
72242d19872aSmrg
72252d19872aSmrg	      # Commands to make compiler produce verbose output that lists
72262d19872aSmrg	      # what "hidden" libraries, object files and flags are used when
72272d19872aSmrg	      # linking a shared library.
72282d19872aSmrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
72292d19872aSmrg
72302d19872aSmrg	    else
72312d19872aSmrg	      # FIXME: insert proper C++ library support
72322d19872aSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
72332d19872aSmrg	    fi
72342d19872aSmrg	    ;;
72352d19872aSmrg        esac
72362d19872aSmrg        ;;
72372d19872aSmrg
72382d19872aSmrg      psos*)
72392d19872aSmrg        # FIXME: insert proper C++ library support
72402d19872aSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
72412d19872aSmrg        ;;
72422d19872aSmrg
72432d19872aSmrg      sunos4*)
72442d19872aSmrg        case $cc_basename in
72452d19872aSmrg          CC*)
72462d19872aSmrg	    # Sun C++ 4.x
72472d19872aSmrg	    # FIXME: insert proper C++ library support
72482d19872aSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
72492d19872aSmrg	    ;;
72502d19872aSmrg          lcc*)
72512d19872aSmrg	    # Lucid
72522d19872aSmrg	    # FIXME: insert proper C++ library support
72532d19872aSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
72542d19872aSmrg	    ;;
72552d19872aSmrg          *)
72562d19872aSmrg	    # FIXME: insert proper C++ library support
72572d19872aSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
72582d19872aSmrg	    ;;
72592d19872aSmrg        esac
72602d19872aSmrg        ;;
72612d19872aSmrg
72622d19872aSmrg      solaris*)
72632d19872aSmrg        case $cc_basename in
72642d19872aSmrg          CC* | sunCC*)
72652d19872aSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
72662d19872aSmrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
72672d19872aSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
72682d19872aSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
72692d19872aSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
72702d19872aSmrg              $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'
72712d19872aSmrg
72722d19872aSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
72732d19872aSmrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
72742d19872aSmrg	    case $host_os in
72752d19872aSmrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
72762d19872aSmrg	      *)
72772d19872aSmrg		# The compiler driver will combine and reorder linker options,
72782d19872aSmrg		# but understands '-z linker_flag'.
72792d19872aSmrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
72802d19872aSmrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
72812d19872aSmrg	        ;;
72822d19872aSmrg	    esac
72832d19872aSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
72842d19872aSmrg
72852d19872aSmrg	    output_verbose_link_cmd='func_echo_all'
72862d19872aSmrg
72872d19872aSmrg	    # Archives containing C++ object files must be created using
72882d19872aSmrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
72892d19872aSmrg	    # necessary to make sure instantiated templates are included
72902d19872aSmrg	    # in the archive.
72912d19872aSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
72922d19872aSmrg	    ;;
72932d19872aSmrg          gcx*)
72942d19872aSmrg	    # Green Hills C++ Compiler
72952d19872aSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
72962d19872aSmrg
72972d19872aSmrg	    # The C++ compiler must be used to create the archive.
72982d19872aSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
72992d19872aSmrg	    ;;
73002d19872aSmrg          *)
73012d19872aSmrg	    # GNU C++ compiler with Solaris linker
73022d19872aSmrg	    if test yes,no = "$GXX,$with_gnu_ld"; then
73032d19872aSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
73042d19872aSmrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
73052d19872aSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
73062d19872aSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
73072d19872aSmrg                  $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'
73082d19872aSmrg
73092d19872aSmrg	        # Commands to make compiler produce verbose output that lists
73102d19872aSmrg	        # what "hidden" libraries, object files and flags are used when
73112d19872aSmrg	        # linking a shared library.
73122d19872aSmrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
73132d19872aSmrg	      else
73142d19872aSmrg	        # g++ 2.7 appears to require '-G' NOT '-shared' on this
73152d19872aSmrg	        # platform.
73162d19872aSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
73172d19872aSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
73182d19872aSmrg                  $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'
73192d19872aSmrg
73202d19872aSmrg	        # Commands to make compiler produce verbose output that lists
73212d19872aSmrg	        # what "hidden" libraries, object files and flags are used when
73222d19872aSmrg	        # linking a shared library.
73232d19872aSmrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
73242d19872aSmrg	      fi
73252d19872aSmrg
73262d19872aSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
73272d19872aSmrg	      case $host_os in
73282d19872aSmrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
73292d19872aSmrg		*)
73302d19872aSmrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
73312d19872aSmrg		  ;;
73322d19872aSmrg	      esac
73332d19872aSmrg	    fi
73342d19872aSmrg	    ;;
73352d19872aSmrg        esac
73362d19872aSmrg        ;;
73372d19872aSmrg
73382d19872aSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
73392d19872aSmrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
73402d19872aSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
73412d19872aSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
73422d19872aSmrg      runpath_var='LD_RUN_PATH'
73432d19872aSmrg
73442d19872aSmrg      case $cc_basename in
73452d19872aSmrg        CC*)
73462d19872aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73472d19872aSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73482d19872aSmrg	  ;;
73492d19872aSmrg	*)
73502d19872aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73512d19872aSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73522d19872aSmrg	  ;;
73532d19872aSmrg      esac
73542d19872aSmrg      ;;
73552d19872aSmrg
73562d19872aSmrg      sysv5* | sco3.2v5* | sco5v6*)
73572d19872aSmrg	# Note: We CANNOT use -z defs as we might desire, because we do not
73582d19872aSmrg	# link with -lc, and that would cause any symbols used from libc to
73592d19872aSmrg	# always be unresolved, which means just about no library would
73602d19872aSmrg	# ever link correctly.  If we're not using GNU ld we use -z text
73612d19872aSmrg	# though, which does catch some bad symbols but isn't as heavy-handed
73622d19872aSmrg	# as -z defs.
73632d19872aSmrg	_LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
73642d19872aSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
73652d19872aSmrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
73662d19872aSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
73672d19872aSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
73682d19872aSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
73692d19872aSmrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
73702d19872aSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
73712d19872aSmrg	runpath_var='LD_RUN_PATH'
73722d19872aSmrg
73732d19872aSmrg	case $cc_basename in
73742d19872aSmrg          CC*)
73752d19872aSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73762d19872aSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73772d19872aSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
73782d19872aSmrg              '"$_LT_TAGVAR(old_archive_cmds, $1)"
73792d19872aSmrg	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
73802d19872aSmrg              '"$_LT_TAGVAR(reload_cmds, $1)"
73812d19872aSmrg	    ;;
73822d19872aSmrg	  *)
73832d19872aSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73842d19872aSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73852d19872aSmrg	    ;;
73862d19872aSmrg	esac
73872d19872aSmrg      ;;
73882d19872aSmrg
73892d19872aSmrg      tandem*)
73902d19872aSmrg        case $cc_basename in
73912d19872aSmrg          NCC*)
73922d19872aSmrg	    # NonStop-UX NCC 3.20
73932d19872aSmrg	    # FIXME: insert proper C++ library support
73942d19872aSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
73952d19872aSmrg	    ;;
73962d19872aSmrg          *)
73972d19872aSmrg	    # FIXME: insert proper C++ library support
73982d19872aSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
73992d19872aSmrg	    ;;
74002d19872aSmrg        esac
74012d19872aSmrg        ;;
74022d19872aSmrg
74032d19872aSmrg      vxworks*)
74042d19872aSmrg        # FIXME: insert proper C++ library support
74052d19872aSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
74062d19872aSmrg        ;;
74072d19872aSmrg
74082d19872aSmrg      *)
74092d19872aSmrg        # FIXME: insert proper C++ library support
74102d19872aSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
74112d19872aSmrg        ;;
74122d19872aSmrg    esac
74132d19872aSmrg
74142d19872aSmrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
74152d19872aSmrg    test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
74162d19872aSmrg
74172d19872aSmrg    _LT_TAGVAR(GCC, $1)=$GXX
74182d19872aSmrg    _LT_TAGVAR(LD, $1)=$LD
74192d19872aSmrg
74202d19872aSmrg    ## CAVEAT EMPTOR:
74212d19872aSmrg    ## There is no encapsulation within the following macros, do not change
74222d19872aSmrg    ## the running order or otherwise move them around unless you know exactly
74232d19872aSmrg    ## what you are doing...
74242d19872aSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
74252d19872aSmrg    _LT_COMPILER_PIC($1)
74262d19872aSmrg    _LT_COMPILER_C_O($1)
74272d19872aSmrg    _LT_COMPILER_FILE_LOCKS($1)
74282d19872aSmrg    _LT_LINKER_SHLIBS($1)
74292d19872aSmrg    _LT_SYS_DYNAMIC_LINKER($1)
74302d19872aSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
74312d19872aSmrg
74322d19872aSmrg    _LT_CONFIG($1)
74332d19872aSmrg  fi # test -n "$compiler"
74342d19872aSmrg
74352d19872aSmrg  CC=$lt_save_CC
74362d19872aSmrg  CFLAGS=$lt_save_CFLAGS
74372d19872aSmrg  LDCXX=$LD
74382d19872aSmrg  LD=$lt_save_LD
74392d19872aSmrg  GCC=$lt_save_GCC
74402d19872aSmrg  with_gnu_ld=$lt_save_with_gnu_ld
74412d19872aSmrg  lt_cv_path_LDCXX=$lt_cv_path_LD
74422d19872aSmrg  lt_cv_path_LD=$lt_save_path_LD
74432d19872aSmrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
74442d19872aSmrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
74452d19872aSmrgfi # test yes != "$_lt_caught_CXX_error"
74462d19872aSmrg
74472d19872aSmrgAC_LANG_POP
74482d19872aSmrg])# _LT_LANG_CXX_CONFIG
74492d19872aSmrg
74502d19872aSmrg
74512d19872aSmrg# _LT_FUNC_STRIPNAME_CNF
74522d19872aSmrg# ----------------------
74532d19872aSmrg# func_stripname_cnf prefix suffix name
74542d19872aSmrg# strip PREFIX and SUFFIX off of NAME.
74552d19872aSmrg# PREFIX and SUFFIX must not contain globbing or regex special
74562d19872aSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading
74572d19872aSmrg# dot (in which case that matches only a dot).
74582d19872aSmrg#
74592d19872aSmrg# This function is identical to the (non-XSI) version of func_stripname,
74602d19872aSmrg# except this one can be used by m4 code that may be executed by configure,
74612d19872aSmrg# rather than the libtool script.
74622d19872aSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
74632d19872aSmrgAC_REQUIRE([_LT_DECL_SED])
74642d19872aSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
74652d19872aSmrgfunc_stripname_cnf ()
74662d19872aSmrg{
74672d19872aSmrg  case @S|@2 in
74682d19872aSmrg  .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
74692d19872aSmrg  *)  func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
74702d19872aSmrg  esac
74712d19872aSmrg} # func_stripname_cnf
74722d19872aSmrg])# _LT_FUNC_STRIPNAME_CNF
74732d19872aSmrg
74742d19872aSmrg
74752d19872aSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
74762d19872aSmrg# ---------------------------------
74772d19872aSmrg# Figure out "hidden" library dependencies from verbose
74782d19872aSmrg# compiler output when linking a shared library.
74792d19872aSmrg# Parse the compiler output and extract the necessary
74802d19872aSmrg# objects, libraries and library flags.
74812d19872aSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
74822d19872aSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
74832d19872aSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
74842d19872aSmrg# Dependencies to place before and after the object being linked:
74852d19872aSmrg_LT_TAGVAR(predep_objects, $1)=
74862d19872aSmrg_LT_TAGVAR(postdep_objects, $1)=
74872d19872aSmrg_LT_TAGVAR(predeps, $1)=
74882d19872aSmrg_LT_TAGVAR(postdeps, $1)=
74892d19872aSmrg_LT_TAGVAR(compiler_lib_search_path, $1)=
74902d19872aSmrg
74912d19872aSmrgdnl we can't use the lt_simple_compile_test_code here,
74922d19872aSmrgdnl because it contains code intended for an executable,
74932d19872aSmrgdnl not a library.  It's possible we should let each
74942d19872aSmrgdnl tag define a new lt_????_link_test_code variable,
74952d19872aSmrgdnl but it's only used here...
74962d19872aSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
74972d19872aSmrgint a;
74982d19872aSmrgvoid foo (void) { a = 0; }
74992d19872aSmrg_LT_EOF
75002d19872aSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
75012d19872aSmrgclass Foo
75022d19872aSmrg{
75032d19872aSmrgpublic:
75042d19872aSmrg  Foo (void) { a = 0; }
75052d19872aSmrgprivate:
75062d19872aSmrg  int a;
75072d19872aSmrg};
75082d19872aSmrg_LT_EOF
75092d19872aSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
75102d19872aSmrg      subroutine foo
75112d19872aSmrg      implicit none
75122d19872aSmrg      integer*4 a
75132d19872aSmrg      a=0
75142d19872aSmrg      return
75152d19872aSmrg      end
75162d19872aSmrg_LT_EOF
75172d19872aSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
75182d19872aSmrg      subroutine foo
75192d19872aSmrg      implicit none
75202d19872aSmrg      integer a
75212d19872aSmrg      a=0
75222d19872aSmrg      return
75232d19872aSmrg      end
75242d19872aSmrg_LT_EOF
75252d19872aSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
75262d19872aSmrgpublic class foo {
75272d19872aSmrg  private int a;
75282d19872aSmrg  public void bar (void) {
75292d19872aSmrg    a = 0;
75302d19872aSmrg  }
75312d19872aSmrg};
75322d19872aSmrg_LT_EOF
75332d19872aSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
75342d19872aSmrgpackage foo
75352d19872aSmrgfunc foo() {
75362d19872aSmrg}
75372d19872aSmrg_LT_EOF
75382d19872aSmrg])
75392d19872aSmrg
75402d19872aSmrg_lt_libdeps_save_CFLAGS=$CFLAGS
75412d19872aSmrgcase "$CC $CFLAGS " in #(
75422d19872aSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
75432d19872aSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
75442d19872aSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
75452d19872aSmrgesac
75462d19872aSmrg
75472d19872aSmrgdnl Parse the compiler output and extract the necessary
75482d19872aSmrgdnl objects, libraries and library flags.
75492d19872aSmrgif AC_TRY_EVAL(ac_compile); then
75502d19872aSmrg  # Parse the compiler output and extract the necessary
75512d19872aSmrg  # objects, libraries and library flags.
75522d19872aSmrg
75532d19872aSmrg  # Sentinel used to keep track of whether or not we are before
75542d19872aSmrg  # the conftest object file.
75552d19872aSmrg  pre_test_object_deps_done=no
75562d19872aSmrg
75572d19872aSmrg  for p in `eval "$output_verbose_link_cmd"`; do
75582d19872aSmrg    case $prev$p in
75592d19872aSmrg
75602d19872aSmrg    -L* | -R* | -l*)
75612d19872aSmrg       # Some compilers place space between "-{L,R}" and the path.
75622d19872aSmrg       # Remove the space.
75632d19872aSmrg       if test x-L = "$p" ||
75642d19872aSmrg          test x-R = "$p"; then
75652d19872aSmrg	 prev=$p
75662d19872aSmrg	 continue
75672d19872aSmrg       fi
75682d19872aSmrg
75692d19872aSmrg       # Expand the sysroot to ease extracting the directories later.
75702d19872aSmrg       if test -z "$prev"; then
75712d19872aSmrg         case $p in
75722d19872aSmrg         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
75732d19872aSmrg         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
75742d19872aSmrg         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
75752d19872aSmrg         esac
75762d19872aSmrg       fi
75772d19872aSmrg       case $p in
75782d19872aSmrg       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
75792d19872aSmrg       esac
75802d19872aSmrg       if test no = "$pre_test_object_deps_done"; then
75812d19872aSmrg	 case $prev in
75822d19872aSmrg	 -L | -R)
75832d19872aSmrg	   # Internal compiler library paths should come after those
75842d19872aSmrg	   # provided the user.  The postdeps already come after the
75852d19872aSmrg	   # user supplied libs so there is no need to process them.
75862d19872aSmrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
75872d19872aSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
75882d19872aSmrg	   else
75892d19872aSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
75902d19872aSmrg	   fi
75912d19872aSmrg	   ;;
75922d19872aSmrg	 # The "-l" case would never come before the object being
75932d19872aSmrg	 # linked, so don't bother handling this case.
75942d19872aSmrg	 esac
75952d19872aSmrg       else
75962d19872aSmrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
75972d19872aSmrg	   _LT_TAGVAR(postdeps, $1)=$prev$p
75982d19872aSmrg	 else
75992d19872aSmrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
76002d19872aSmrg	 fi
76012d19872aSmrg       fi
76022d19872aSmrg       prev=
76032d19872aSmrg       ;;
76042d19872aSmrg
76052d19872aSmrg    *.lto.$objext) ;; # Ignore GCC LTO objects
76062d19872aSmrg    *.$objext)
76072d19872aSmrg       # This assumes that the test object file only shows up
76082d19872aSmrg       # once in the compiler output.
76092d19872aSmrg       if test "$p" = "conftest.$objext"; then
76102d19872aSmrg	 pre_test_object_deps_done=yes
76112d19872aSmrg	 continue
76122d19872aSmrg       fi
76132d19872aSmrg
76142d19872aSmrg       if test no = "$pre_test_object_deps_done"; then
76152d19872aSmrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
76162d19872aSmrg	   _LT_TAGVAR(predep_objects, $1)=$p
76172d19872aSmrg	 else
76182d19872aSmrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
76192d19872aSmrg	 fi
76202d19872aSmrg       else
76212d19872aSmrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
76222d19872aSmrg	   _LT_TAGVAR(postdep_objects, $1)=$p
76232d19872aSmrg	 else
76242d19872aSmrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
76252d19872aSmrg	 fi
76262d19872aSmrg       fi
76272d19872aSmrg       ;;
76282d19872aSmrg
76292d19872aSmrg    *) ;; # Ignore the rest.
76302d19872aSmrg
76312d19872aSmrg    esac
76322d19872aSmrg  done
76332d19872aSmrg
76342d19872aSmrg  # Clean up.
76352d19872aSmrg  rm -f a.out a.exe
76362d19872aSmrgelse
76372d19872aSmrg  echo "libtool.m4: error: problem compiling $1 test program"
76382d19872aSmrgfi
76392d19872aSmrg
76402d19872aSmrg$RM -f confest.$objext
76412d19872aSmrgCFLAGS=$_lt_libdeps_save_CFLAGS
76422d19872aSmrg
76432d19872aSmrg# PORTME: override above test on systems where it is broken
76442d19872aSmrgm4_if([$1], [CXX],
76452d19872aSmrg[case $host_os in
76462d19872aSmrginterix[[3-9]]*)
76472d19872aSmrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
76482d19872aSmrg  # hack all around it, let's just trust "g++" to DTRT.
76492d19872aSmrg  _LT_TAGVAR(predep_objects,$1)=
76502d19872aSmrg  _LT_TAGVAR(postdep_objects,$1)=
76512d19872aSmrg  _LT_TAGVAR(postdeps,$1)=
76522d19872aSmrg  ;;
76532d19872aSmrgesac
76542d19872aSmrg])
76552d19872aSmrg
76562d19872aSmrgcase " $_LT_TAGVAR(postdeps, $1) " in
76572d19872aSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
76582d19872aSmrgesac
76592d19872aSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
76602d19872aSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
76612d19872aSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
76622d19872aSmrgfi
76632d19872aSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
76642d19872aSmrg    [The directories searched by this compiler when creating a shared library])
76652d19872aSmrg_LT_TAGDECL([], [predep_objects], [1],
76662d19872aSmrg    [Dependencies to place before and after the objects being linked to
76672d19872aSmrg    create a shared library])
76682d19872aSmrg_LT_TAGDECL([], [postdep_objects], [1])
76692d19872aSmrg_LT_TAGDECL([], [predeps], [1])
76702d19872aSmrg_LT_TAGDECL([], [postdeps], [1])
76712d19872aSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
76722d19872aSmrg    [The library search path used internally by the compiler when linking
76732d19872aSmrg    a shared library])
76742d19872aSmrg])# _LT_SYS_HIDDEN_LIBDEPS
76752d19872aSmrg
76762d19872aSmrg
76772d19872aSmrg# _LT_LANG_F77_CONFIG([TAG])
76782d19872aSmrg# --------------------------
76792d19872aSmrg# Ensure that the configuration variables for a Fortran 77 compiler are
76802d19872aSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
76812d19872aSmrg# to write the compiler configuration to 'libtool'.
76822d19872aSmrgm4_defun([_LT_LANG_F77_CONFIG],
76832d19872aSmrg[AC_LANG_PUSH(Fortran 77)
76842d19872aSmrgif test -z "$F77" || test no = "$F77"; then
76852d19872aSmrg  _lt_disable_F77=yes
76862d19872aSmrgfi
76872d19872aSmrg
76882d19872aSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
76892d19872aSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
76902d19872aSmrg_LT_TAGVAR(always_export_symbols, $1)=no
76912d19872aSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
76922d19872aSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
76932d19872aSmrg_LT_TAGVAR(hardcode_direct, $1)=no
76942d19872aSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
76952d19872aSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
76962d19872aSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
76972d19872aSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
76982d19872aSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
76992d19872aSmrg_LT_TAGVAR(inherit_rpath, $1)=no
77002d19872aSmrg_LT_TAGVAR(module_cmds, $1)=
77012d19872aSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
77022d19872aSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
77032d19872aSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
77042d19872aSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
77052d19872aSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
77062d19872aSmrg_LT_TAGVAR(no_undefined_flag, $1)=
77072d19872aSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
77082d19872aSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
77092d19872aSmrg
77102d19872aSmrg# Source file extension for f77 test sources.
77112d19872aSmrgac_ext=f
77122d19872aSmrg
77132d19872aSmrg# Object file extension for compiled f77 test sources.
77142d19872aSmrgobjext=o
77152d19872aSmrg_LT_TAGVAR(objext, $1)=$objext
77162d19872aSmrg
77172d19872aSmrg# No sense in running all these tests if we already determined that
77182d19872aSmrg# the F77 compiler isn't working.  Some variables (like enable_shared)
77192d19872aSmrg# are currently assumed to apply to all compilers on this platform,
77202d19872aSmrg# and will be corrupted by setting them based on a non-working compiler.
77212d19872aSmrgif test yes != "$_lt_disable_F77"; then
77222d19872aSmrg  # Code to be used in simple compile tests
77232d19872aSmrg  lt_simple_compile_test_code="\
77242d19872aSmrg      subroutine t
77252d19872aSmrg      return
77262d19872aSmrg      end
77272d19872aSmrg"
77282d19872aSmrg
77292d19872aSmrg  # Code to be used in simple link tests
77302d19872aSmrg  lt_simple_link_test_code="\
77312d19872aSmrg      program t
77322d19872aSmrg      end
77332d19872aSmrg"
77342d19872aSmrg
77352d19872aSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
77362d19872aSmrg  _LT_TAG_COMPILER
77372d19872aSmrg
77382d19872aSmrg  # save warnings/boilerplate of simple test code
77392d19872aSmrg  _LT_COMPILER_BOILERPLATE
77402d19872aSmrg  _LT_LINKER_BOILERPLATE
77412d19872aSmrg
77422d19872aSmrg  # Allow CC to be a program name with arguments.
77432d19872aSmrg  lt_save_CC=$CC
77442d19872aSmrg  lt_save_GCC=$GCC
77452d19872aSmrg  lt_save_CFLAGS=$CFLAGS
77462d19872aSmrg  CC=${F77-"f77"}
77472d19872aSmrg  CFLAGS=$FFLAGS
77482d19872aSmrg  compiler=$CC
77492d19872aSmrg  _LT_TAGVAR(compiler, $1)=$CC
77502d19872aSmrg  _LT_CC_BASENAME([$compiler])
77512d19872aSmrg  GCC=$G77
77522d19872aSmrg  if test -n "$compiler"; then
77532d19872aSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
77542d19872aSmrg    AC_MSG_RESULT([$can_build_shared])
77552d19872aSmrg
77562d19872aSmrg    AC_MSG_CHECKING([whether to build shared libraries])
77572d19872aSmrg    test no = "$can_build_shared" && enable_shared=no
77582d19872aSmrg
77592d19872aSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
77602d19872aSmrg    # are all built from PIC.
77612d19872aSmrg    case $host_os in
77622d19872aSmrg      aix3*)
77632d19872aSmrg        test yes = "$enable_shared" && enable_static=no
77642d19872aSmrg        if test -n "$RANLIB"; then
77652d19872aSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
77662d19872aSmrg          postinstall_cmds='$RANLIB $lib'
77672d19872aSmrg        fi
77682d19872aSmrg        ;;
77692d19872aSmrg      aix[[4-9]]*)
77702d19872aSmrg	if test ia64 != "$host_cpu"; then
77712d19872aSmrg	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
77722d19872aSmrg	  yes,aix,yes) ;;		# shared object as lib.so file only
77732d19872aSmrg	  yes,svr4,*) ;;		# shared object as lib.so archive member only
77742d19872aSmrg	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
77752d19872aSmrg	  esac
77762d19872aSmrg	fi
77772d19872aSmrg        ;;
77782d19872aSmrg    esac
77792d19872aSmrg    AC_MSG_RESULT([$enable_shared])
77802d19872aSmrg
77812d19872aSmrg    AC_MSG_CHECKING([whether to build static libraries])
77822d19872aSmrg    # Make sure either enable_shared or enable_static is yes.
77832d19872aSmrg    test yes = "$enable_shared" || enable_static=yes
77842d19872aSmrg    AC_MSG_RESULT([$enable_static])
77852d19872aSmrg
77862d19872aSmrg    _LT_TAGVAR(GCC, $1)=$G77
77872d19872aSmrg    _LT_TAGVAR(LD, $1)=$LD
77882d19872aSmrg
77892d19872aSmrg    ## CAVEAT EMPTOR:
77902d19872aSmrg    ## There is no encapsulation within the following macros, do not change
77912d19872aSmrg    ## the running order or otherwise move them around unless you know exactly
77922d19872aSmrg    ## what you are doing...
77932d19872aSmrg    _LT_COMPILER_PIC($1)
77942d19872aSmrg    _LT_COMPILER_C_O($1)
77952d19872aSmrg    _LT_COMPILER_FILE_LOCKS($1)
77962d19872aSmrg    _LT_LINKER_SHLIBS($1)
77972d19872aSmrg    _LT_SYS_DYNAMIC_LINKER($1)
77982d19872aSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
77992d19872aSmrg
78002d19872aSmrg    _LT_CONFIG($1)
78012d19872aSmrg  fi # test -n "$compiler"
78022d19872aSmrg
78032d19872aSmrg  GCC=$lt_save_GCC
78042d19872aSmrg  CC=$lt_save_CC
78052d19872aSmrg  CFLAGS=$lt_save_CFLAGS
78062d19872aSmrgfi # test yes != "$_lt_disable_F77"
78072d19872aSmrg
78082d19872aSmrgAC_LANG_POP
78092d19872aSmrg])# _LT_LANG_F77_CONFIG
78102d19872aSmrg
78112d19872aSmrg
78122d19872aSmrg# _LT_LANG_FC_CONFIG([TAG])
78132d19872aSmrg# -------------------------
78142d19872aSmrg# Ensure that the configuration variables for a Fortran compiler are
78152d19872aSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
78162d19872aSmrg# to write the compiler configuration to 'libtool'.
78172d19872aSmrgm4_defun([_LT_LANG_FC_CONFIG],
78182d19872aSmrg[AC_LANG_PUSH(Fortran)
78192d19872aSmrg
78202d19872aSmrgif test -z "$FC" || test no = "$FC"; then
78212d19872aSmrg  _lt_disable_FC=yes
78222d19872aSmrgfi
78232d19872aSmrg
78242d19872aSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
78252d19872aSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
78262d19872aSmrg_LT_TAGVAR(always_export_symbols, $1)=no
78272d19872aSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
78282d19872aSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
78292d19872aSmrg_LT_TAGVAR(hardcode_direct, $1)=no
78302d19872aSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
78312d19872aSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
78322d19872aSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
78332d19872aSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
78342d19872aSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
78352d19872aSmrg_LT_TAGVAR(inherit_rpath, $1)=no
78362d19872aSmrg_LT_TAGVAR(module_cmds, $1)=
78372d19872aSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
78382d19872aSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
78392d19872aSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
78402d19872aSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
78412d19872aSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
78422d19872aSmrg_LT_TAGVAR(no_undefined_flag, $1)=
78432d19872aSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
78442d19872aSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
78452d19872aSmrg
78462d19872aSmrg# Source file extension for fc test sources.
78472d19872aSmrgac_ext=${ac_fc_srcext-f}
78482d19872aSmrg
78492d19872aSmrg# Object file extension for compiled fc test sources.
78502d19872aSmrgobjext=o
78512d19872aSmrg_LT_TAGVAR(objext, $1)=$objext
78522d19872aSmrg
78532d19872aSmrg# No sense in running all these tests if we already determined that
78542d19872aSmrg# the FC compiler isn't working.  Some variables (like enable_shared)
78552d19872aSmrg# are currently assumed to apply to all compilers on this platform,
78562d19872aSmrg# and will be corrupted by setting them based on a non-working compiler.
78572d19872aSmrgif test yes != "$_lt_disable_FC"; then
78582d19872aSmrg  # Code to be used in simple compile tests
78592d19872aSmrg  lt_simple_compile_test_code="\
78602d19872aSmrg      subroutine t
78612d19872aSmrg      return
78622d19872aSmrg      end
78632d19872aSmrg"
78642d19872aSmrg
78652d19872aSmrg  # Code to be used in simple link tests
78662d19872aSmrg  lt_simple_link_test_code="\
78672d19872aSmrg      program t
78682d19872aSmrg      end
78692d19872aSmrg"
78702d19872aSmrg
78712d19872aSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
78722d19872aSmrg  _LT_TAG_COMPILER
78732d19872aSmrg
78742d19872aSmrg  # save warnings/boilerplate of simple test code
78752d19872aSmrg  _LT_COMPILER_BOILERPLATE
78762d19872aSmrg  _LT_LINKER_BOILERPLATE
78772d19872aSmrg
78782d19872aSmrg  # Allow CC to be a program name with arguments.
78792d19872aSmrg  lt_save_CC=$CC
78802d19872aSmrg  lt_save_GCC=$GCC
78812d19872aSmrg  lt_save_CFLAGS=$CFLAGS
78822d19872aSmrg  CC=${FC-"f95"}
78832d19872aSmrg  CFLAGS=$FCFLAGS
78842d19872aSmrg  compiler=$CC
78852d19872aSmrg  GCC=$ac_cv_fc_compiler_gnu
78862d19872aSmrg
78872d19872aSmrg  _LT_TAGVAR(compiler, $1)=$CC
78882d19872aSmrg  _LT_CC_BASENAME([$compiler])
78892d19872aSmrg
78902d19872aSmrg  if test -n "$compiler"; then
78912d19872aSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
78922d19872aSmrg    AC_MSG_RESULT([$can_build_shared])
78932d19872aSmrg
78942d19872aSmrg    AC_MSG_CHECKING([whether to build shared libraries])
78952d19872aSmrg    test no = "$can_build_shared" && enable_shared=no
78962d19872aSmrg
78972d19872aSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
78982d19872aSmrg    # are all built from PIC.
78992d19872aSmrg    case $host_os in
79002d19872aSmrg      aix3*)
79012d19872aSmrg        test yes = "$enable_shared" && enable_static=no
79022d19872aSmrg        if test -n "$RANLIB"; then
79032d19872aSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
79042d19872aSmrg          postinstall_cmds='$RANLIB $lib'
79052d19872aSmrg        fi
79062d19872aSmrg        ;;
79072d19872aSmrg      aix[[4-9]]*)
79082d19872aSmrg	if test ia64 != "$host_cpu"; then
79092d19872aSmrg	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
79102d19872aSmrg	  yes,aix,yes) ;;		# shared object as lib.so file only
79112d19872aSmrg	  yes,svr4,*) ;;		# shared object as lib.so archive member only
79122d19872aSmrg	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
79132d19872aSmrg	  esac
79142d19872aSmrg	fi
79152d19872aSmrg        ;;
79162d19872aSmrg    esac
79172d19872aSmrg    AC_MSG_RESULT([$enable_shared])
79182d19872aSmrg
79192d19872aSmrg    AC_MSG_CHECKING([whether to build static libraries])
79202d19872aSmrg    # Make sure either enable_shared or enable_static is yes.
79212d19872aSmrg    test yes = "$enable_shared" || enable_static=yes
79222d19872aSmrg    AC_MSG_RESULT([$enable_static])
79232d19872aSmrg
79242d19872aSmrg    _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
79252d19872aSmrg    _LT_TAGVAR(LD, $1)=$LD
79262d19872aSmrg
79272d19872aSmrg    ## CAVEAT EMPTOR:
79282d19872aSmrg    ## There is no encapsulation within the following macros, do not change
79292d19872aSmrg    ## the running order or otherwise move them around unless you know exactly
79302d19872aSmrg    ## what you are doing...
79312d19872aSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
79322d19872aSmrg    _LT_COMPILER_PIC($1)
79332d19872aSmrg    _LT_COMPILER_C_O($1)
79342d19872aSmrg    _LT_COMPILER_FILE_LOCKS($1)
79352d19872aSmrg    _LT_LINKER_SHLIBS($1)
79362d19872aSmrg    _LT_SYS_DYNAMIC_LINKER($1)
79372d19872aSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
79382d19872aSmrg
79392d19872aSmrg    _LT_CONFIG($1)
79402d19872aSmrg  fi # test -n "$compiler"
79412d19872aSmrg
79422d19872aSmrg  GCC=$lt_save_GCC
79432d19872aSmrg  CC=$lt_save_CC
79442d19872aSmrg  CFLAGS=$lt_save_CFLAGS
79452d19872aSmrgfi # test yes != "$_lt_disable_FC"
79462d19872aSmrg
79472d19872aSmrgAC_LANG_POP
79482d19872aSmrg])# _LT_LANG_FC_CONFIG
79492d19872aSmrg
79502d19872aSmrg
79512d19872aSmrg# _LT_LANG_GCJ_CONFIG([TAG])
79522d19872aSmrg# --------------------------
79532d19872aSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler
79542d19872aSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
79552d19872aSmrg# to write the compiler configuration to 'libtool'.
79562d19872aSmrgm4_defun([_LT_LANG_GCJ_CONFIG],
79572d19872aSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl
79582d19872aSmrgAC_LANG_SAVE
79592d19872aSmrg
79602d19872aSmrg# Source file extension for Java test sources.
79612d19872aSmrgac_ext=java
79622d19872aSmrg
79632d19872aSmrg# Object file extension for compiled Java test sources.
79642d19872aSmrgobjext=o
79652d19872aSmrg_LT_TAGVAR(objext, $1)=$objext
79662d19872aSmrg
79672d19872aSmrg# Code to be used in simple compile tests
79682d19872aSmrglt_simple_compile_test_code="class foo {}"
79692d19872aSmrg
79702d19872aSmrg# Code to be used in simple link tests
79712d19872aSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
79722d19872aSmrg
79732d19872aSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
79742d19872aSmrg_LT_TAG_COMPILER
79752d19872aSmrg
79762d19872aSmrg# save warnings/boilerplate of simple test code
79772d19872aSmrg_LT_COMPILER_BOILERPLATE
79782d19872aSmrg_LT_LINKER_BOILERPLATE
79792d19872aSmrg
79802d19872aSmrg# Allow CC to be a program name with arguments.
79812d19872aSmrglt_save_CC=$CC
79822d19872aSmrglt_save_CFLAGS=$CFLAGS
79832d19872aSmrglt_save_GCC=$GCC
79842d19872aSmrgGCC=yes
79852d19872aSmrgCC=${GCJ-"gcj"}
79862d19872aSmrgCFLAGS=$GCJFLAGS
79872d19872aSmrgcompiler=$CC
79882d19872aSmrg_LT_TAGVAR(compiler, $1)=$CC
79892d19872aSmrg_LT_TAGVAR(LD, $1)=$LD
79902d19872aSmrg_LT_CC_BASENAME([$compiler])
79912d19872aSmrg
79922d19872aSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
79932d19872aSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
79942d19872aSmrg
79952d19872aSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
79962d19872aSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
79972d19872aSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
79982d19872aSmrg
79992d19872aSmrg## CAVEAT EMPTOR:
80002d19872aSmrg## There is no encapsulation within the following macros, do not change
80012d19872aSmrg## the running order or otherwise move them around unless you know exactly
80022d19872aSmrg## what you are doing...
80032d19872aSmrgif test -n "$compiler"; then
80042d19872aSmrg  _LT_COMPILER_NO_RTTI($1)
80052d19872aSmrg  _LT_COMPILER_PIC($1)
80062d19872aSmrg  _LT_COMPILER_C_O($1)
80072d19872aSmrg  _LT_COMPILER_FILE_LOCKS($1)
80082d19872aSmrg  _LT_LINKER_SHLIBS($1)
80092d19872aSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
80102d19872aSmrg
80112d19872aSmrg  _LT_CONFIG($1)
80122d19872aSmrgfi
80132d19872aSmrg
80142d19872aSmrgAC_LANG_RESTORE
80152d19872aSmrg
80162d19872aSmrgGCC=$lt_save_GCC
80172d19872aSmrgCC=$lt_save_CC
80182d19872aSmrgCFLAGS=$lt_save_CFLAGS
80192d19872aSmrg])# _LT_LANG_GCJ_CONFIG
80202d19872aSmrg
80212d19872aSmrg
80222d19872aSmrg# _LT_LANG_GO_CONFIG([TAG])
80232d19872aSmrg# --------------------------
80242d19872aSmrg# Ensure that the configuration variables for the GNU Go compiler
80252d19872aSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
80262d19872aSmrg# to write the compiler configuration to 'libtool'.
80272d19872aSmrgm4_defun([_LT_LANG_GO_CONFIG],
80282d19872aSmrg[AC_REQUIRE([LT_PROG_GO])dnl
80292d19872aSmrgAC_LANG_SAVE
80302d19872aSmrg
80312d19872aSmrg# Source file extension for Go test sources.
80322d19872aSmrgac_ext=go
80332d19872aSmrg
80342d19872aSmrg# Object file extension for compiled Go test sources.
80352d19872aSmrgobjext=o
80362d19872aSmrg_LT_TAGVAR(objext, $1)=$objext
80372d19872aSmrg
80382d19872aSmrg# Code to be used in simple compile tests
80392d19872aSmrglt_simple_compile_test_code="package main; func main() { }"
80402d19872aSmrg
80412d19872aSmrg# Code to be used in simple link tests
80422d19872aSmrglt_simple_link_test_code='package main; func main() { }'
80432d19872aSmrg
80442d19872aSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
80452d19872aSmrg_LT_TAG_COMPILER
80462d19872aSmrg
80472d19872aSmrg# save warnings/boilerplate of simple test code
80482d19872aSmrg_LT_COMPILER_BOILERPLATE
80492d19872aSmrg_LT_LINKER_BOILERPLATE
80502d19872aSmrg
80512d19872aSmrg# Allow CC to be a program name with arguments.
80522d19872aSmrglt_save_CC=$CC
80532d19872aSmrglt_save_CFLAGS=$CFLAGS
80542d19872aSmrglt_save_GCC=$GCC
80552d19872aSmrgGCC=yes
80562d19872aSmrgCC=${GOC-"gccgo"}
80572d19872aSmrgCFLAGS=$GOFLAGS
80582d19872aSmrgcompiler=$CC
80592d19872aSmrg_LT_TAGVAR(compiler, $1)=$CC
80602d19872aSmrg_LT_TAGVAR(LD, $1)=$LD
80612d19872aSmrg_LT_CC_BASENAME([$compiler])
80622d19872aSmrg
80632d19872aSmrg# Go did not exist at the time GCC didn't implicitly link libc in.
80642d19872aSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
80652d19872aSmrg
80662d19872aSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
80672d19872aSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
80682d19872aSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
80692d19872aSmrg
80702d19872aSmrg## CAVEAT EMPTOR:
80712d19872aSmrg## There is no encapsulation within the following macros, do not change
80722d19872aSmrg## the running order or otherwise move them around unless you know exactly
80732d19872aSmrg## what you are doing...
80742d19872aSmrgif test -n "$compiler"; then
80752d19872aSmrg  _LT_COMPILER_NO_RTTI($1)
80762d19872aSmrg  _LT_COMPILER_PIC($1)
80772d19872aSmrg  _LT_COMPILER_C_O($1)
80782d19872aSmrg  _LT_COMPILER_FILE_LOCKS($1)
80792d19872aSmrg  _LT_LINKER_SHLIBS($1)
80802d19872aSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
80812d19872aSmrg
80822d19872aSmrg  _LT_CONFIG($1)
80832d19872aSmrgfi
80842d19872aSmrg
80852d19872aSmrgAC_LANG_RESTORE
80862d19872aSmrg
80872d19872aSmrgGCC=$lt_save_GCC
80882d19872aSmrgCC=$lt_save_CC
80892d19872aSmrgCFLAGS=$lt_save_CFLAGS
80902d19872aSmrg])# _LT_LANG_GO_CONFIG
80912d19872aSmrg
80922d19872aSmrg
80932d19872aSmrg# _LT_LANG_RC_CONFIG([TAG])
80942d19872aSmrg# -------------------------
80952d19872aSmrg# Ensure that the configuration variables for the Windows resource compiler
80962d19872aSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
80972d19872aSmrg# to write the compiler configuration to 'libtool'.
80982d19872aSmrgm4_defun([_LT_LANG_RC_CONFIG],
80992d19872aSmrg[AC_REQUIRE([LT_PROG_RC])dnl
81002d19872aSmrgAC_LANG_SAVE
81012d19872aSmrg
81022d19872aSmrg# Source file extension for RC test sources.
81032d19872aSmrgac_ext=rc
81042d19872aSmrg
81052d19872aSmrg# Object file extension for compiled RC test sources.
81062d19872aSmrgobjext=o
81072d19872aSmrg_LT_TAGVAR(objext, $1)=$objext
81082d19872aSmrg
81092d19872aSmrg# Code to be used in simple compile tests
81102d19872aSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
81112d19872aSmrg
81122d19872aSmrg# Code to be used in simple link tests
81132d19872aSmrglt_simple_link_test_code=$lt_simple_compile_test_code
81142d19872aSmrg
81152d19872aSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
81162d19872aSmrg_LT_TAG_COMPILER
81172d19872aSmrg
81182d19872aSmrg# save warnings/boilerplate of simple test code
81192d19872aSmrg_LT_COMPILER_BOILERPLATE
81202d19872aSmrg_LT_LINKER_BOILERPLATE
81212d19872aSmrg
81222d19872aSmrg# Allow CC to be a program name with arguments.
81232d19872aSmrglt_save_CC=$CC
81242d19872aSmrglt_save_CFLAGS=$CFLAGS
81252d19872aSmrglt_save_GCC=$GCC
81262d19872aSmrgGCC=
81272d19872aSmrgCC=${RC-"windres"}
81282d19872aSmrgCFLAGS=
81292d19872aSmrgcompiler=$CC
81302d19872aSmrg_LT_TAGVAR(compiler, $1)=$CC
81312d19872aSmrg_LT_CC_BASENAME([$compiler])
81322d19872aSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
81332d19872aSmrg
81342d19872aSmrgif test -n "$compiler"; then
81352d19872aSmrg  :
81362d19872aSmrg  _LT_CONFIG($1)
81372d19872aSmrgfi
81382d19872aSmrg
81392d19872aSmrgGCC=$lt_save_GCC
81402d19872aSmrgAC_LANG_RESTORE
81412d19872aSmrgCC=$lt_save_CC
81422d19872aSmrgCFLAGS=$lt_save_CFLAGS
81432d19872aSmrg])# _LT_LANG_RC_CONFIG
81442d19872aSmrg
81452d19872aSmrg
81462d19872aSmrg# LT_PROG_GCJ
81472d19872aSmrg# -----------
81482d19872aSmrgAC_DEFUN([LT_PROG_GCJ],
81492d19872aSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
81502d19872aSmrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
81512d19872aSmrg    [AC_CHECK_TOOL(GCJ, gcj,)
81522d19872aSmrg      test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
81532d19872aSmrg      AC_SUBST(GCJFLAGS)])])[]dnl
81542d19872aSmrg])
81552d19872aSmrg
81562d19872aSmrg# Old name:
81572d19872aSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
81582d19872aSmrgdnl aclocal-1.4 backwards compatibility:
81592d19872aSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
81602d19872aSmrg
81612d19872aSmrg
81622d19872aSmrg# LT_PROG_GO
81632d19872aSmrg# ----------
81642d19872aSmrgAC_DEFUN([LT_PROG_GO],
81652d19872aSmrg[AC_CHECK_TOOL(GOC, gccgo,)
81662d19872aSmrg])
81672d19872aSmrg
81682d19872aSmrg
81692d19872aSmrg# LT_PROG_RC
81702d19872aSmrg# ----------
81712d19872aSmrgAC_DEFUN([LT_PROG_RC],
81722d19872aSmrg[AC_CHECK_TOOL(RC, windres,)
81732d19872aSmrg])
81742d19872aSmrg
81752d19872aSmrg# Old name:
81762d19872aSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
81772d19872aSmrgdnl aclocal-1.4 backwards compatibility:
81782d19872aSmrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
81792d19872aSmrg
81802d19872aSmrg
81812d19872aSmrg# _LT_DECL_EGREP
81822d19872aSmrg# --------------
81832d19872aSmrg# If we don't have a new enough Autoconf to choose the best grep
81842d19872aSmrg# available, choose the one first in the user's PATH.
81852d19872aSmrgm4_defun([_LT_DECL_EGREP],
81862d19872aSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
81872d19872aSmrgAC_REQUIRE([AC_PROG_FGREP])dnl
81882d19872aSmrgtest -z "$GREP" && GREP=grep
81892d19872aSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
81902d19872aSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
81912d19872aSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
81922d19872aSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
81932d19872aSmrgAC_SUBST([GREP])
81942d19872aSmrg])
81952d19872aSmrg
81962d19872aSmrg
81972d19872aSmrg# _LT_DECL_OBJDUMP
81982d19872aSmrg# --------------
81992d19872aSmrg# If we don't have a new enough Autoconf to choose the best objdump
82002d19872aSmrg# available, choose the one first in the user's PATH.
82012d19872aSmrgm4_defun([_LT_DECL_OBJDUMP],
82022d19872aSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
82032d19872aSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
82042d19872aSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
82052d19872aSmrgAC_SUBST([OBJDUMP])
82062d19872aSmrg])
82072d19872aSmrg
82082d19872aSmrg# _LT_DECL_DLLTOOL
82092d19872aSmrg# ----------------
82102d19872aSmrg# Ensure DLLTOOL variable is set.
82112d19872aSmrgm4_defun([_LT_DECL_DLLTOOL],
82122d19872aSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
82132d19872aSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
82142d19872aSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
82152d19872aSmrgAC_SUBST([DLLTOOL])
82162d19872aSmrg])
82172d19872aSmrg
82182d19872aSmrg# _LT_DECL_FILECMD
82192d19872aSmrg# ----------------
82202d19872aSmrg# Check for a file(cmd) program that can be used to detect file type and magic
82212d19872aSmrgm4_defun([_LT_DECL_FILECMD],
82222d19872aSmrg[AC_CHECK_TOOL([FILECMD], [file], [:])
82232d19872aSmrg_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types])
82242d19872aSmrg])# _LD_DECL_FILECMD
82252d19872aSmrg
82262d19872aSmrg# _LT_DECL_SED
82272d19872aSmrg# ------------
82282d19872aSmrg# Check for a fully-functional sed program, that truncates
82292d19872aSmrg# as few characters as possible.  Prefer GNU sed if found.
82302d19872aSmrgm4_defun([_LT_DECL_SED],
82312d19872aSmrg[AC_PROG_SED
82322d19872aSmrgtest -z "$SED" && SED=sed
82332d19872aSmrgXsed="$SED -e 1s/^X//"
82342d19872aSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
82352d19872aSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
82362d19872aSmrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
82372d19872aSmrg])# _LT_DECL_SED
82382d19872aSmrg
82392d19872aSmrgm4_ifndef([AC_PROG_SED], [
82402d19872aSmrg############################################################
82412d19872aSmrg# NOTE: This macro has been submitted for inclusion into   #
82422d19872aSmrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
82432d19872aSmrg#  a released version of Autoconf we should remove this    #
82442d19872aSmrg#  macro and use it instead.                               #
82452d19872aSmrg############################################################
82462d19872aSmrg
82472d19872aSmrgm4_defun([AC_PROG_SED],
82482d19872aSmrg[AC_MSG_CHECKING([for a sed that does not truncate output])
82492d19872aSmrgAC_CACHE_VAL(lt_cv_path_SED,
82502d19872aSmrg[# Loop through the user's path and test for sed and gsed.
82512d19872aSmrg# Then use that list of sed's as ones to test for truncation.
82522d19872aSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
82532d19872aSmrgfor as_dir in $PATH
82542d19872aSmrgdo
82552d19872aSmrg  IFS=$as_save_IFS
82562d19872aSmrg  test -z "$as_dir" && as_dir=.
82572d19872aSmrg  for lt_ac_prog in sed gsed; do
82582d19872aSmrg    for ac_exec_ext in '' $ac_executable_extensions; do
82592d19872aSmrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
82602d19872aSmrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
82612d19872aSmrg      fi
82622d19872aSmrg    done
82632d19872aSmrg  done
82642d19872aSmrgdone
82652d19872aSmrgIFS=$as_save_IFS
82662d19872aSmrglt_ac_max=0
82672d19872aSmrglt_ac_count=0
82682d19872aSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
82692d19872aSmrg# along with /bin/sed that truncates output.
82702d19872aSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
82712d19872aSmrg  test ! -f "$lt_ac_sed" && continue
82722d19872aSmrg  cat /dev/null > conftest.in
82732d19872aSmrg  lt_ac_count=0
82742d19872aSmrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
82752d19872aSmrg  # Check for GNU sed and select it if it is found.
82762d19872aSmrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
82772d19872aSmrg    lt_cv_path_SED=$lt_ac_sed
82782d19872aSmrg    break
82792d19872aSmrg  fi
82802d19872aSmrg  while true; do
82812d19872aSmrg    cat conftest.in conftest.in >conftest.tmp
82822d19872aSmrg    mv conftest.tmp conftest.in
82832d19872aSmrg    cp conftest.in conftest.nl
82842d19872aSmrg    echo >>conftest.nl
82852d19872aSmrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
82862d19872aSmrg    cmp -s conftest.out conftest.nl || break
82872d19872aSmrg    # 10000 chars as input seems more than enough
82882d19872aSmrg    test 10 -lt "$lt_ac_count" && break
82892d19872aSmrg    lt_ac_count=`expr $lt_ac_count + 1`
82902d19872aSmrg    if test "$lt_ac_count" -gt "$lt_ac_max"; then
82912d19872aSmrg      lt_ac_max=$lt_ac_count
82922d19872aSmrg      lt_cv_path_SED=$lt_ac_sed
82932d19872aSmrg    fi
82942d19872aSmrg  done
82952d19872aSmrgdone
82962d19872aSmrg])
82972d19872aSmrgSED=$lt_cv_path_SED
82982d19872aSmrgAC_SUBST([SED])
82992d19872aSmrgAC_MSG_RESULT([$SED])
83002d19872aSmrg])#AC_PROG_SED
83012d19872aSmrg])#m4_ifndef
83022d19872aSmrg
83032d19872aSmrg# Old name:
83042d19872aSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
83052d19872aSmrgdnl aclocal-1.4 backwards compatibility:
83062d19872aSmrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
83072d19872aSmrg
83082d19872aSmrg
83092d19872aSmrg# _LT_CHECK_SHELL_FEATURES
83102d19872aSmrg# ------------------------
83112d19872aSmrg# Find out whether the shell is Bourne or XSI compatible,
83122d19872aSmrg# or has some other useful features.
83132d19872aSmrgm4_defun([_LT_CHECK_SHELL_FEATURES],
83142d19872aSmrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
83152d19872aSmrg  lt_unset=unset
83162d19872aSmrgelse
83172d19872aSmrg  lt_unset=false
83182d19872aSmrgfi
83192d19872aSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
83202d19872aSmrg
83212d19872aSmrg# test EBCDIC or ASCII
83222d19872aSmrgcase `echo X|tr X '\101'` in
83232d19872aSmrg A) # ASCII based system
83242d19872aSmrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
83252d19872aSmrg  lt_SP2NL='tr \040 \012'
83262d19872aSmrg  lt_NL2SP='tr \015\012 \040\040'
83272d19872aSmrg  ;;
83282d19872aSmrg *) # EBCDIC based system
83292d19872aSmrg  lt_SP2NL='tr \100 \n'
83302d19872aSmrg  lt_NL2SP='tr \r\n \100\100'
83312d19872aSmrg  ;;
83322d19872aSmrgesac
83332d19872aSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
83342d19872aSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
83352d19872aSmrg])# _LT_CHECK_SHELL_FEATURES
83362d19872aSmrg
83372d19872aSmrg
83382d19872aSmrg# _LT_PATH_CONVERSION_FUNCTIONS
83392d19872aSmrg# -----------------------------
83402d19872aSmrg# Determine what file name conversion functions should be used by
83412d19872aSmrg# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
83422d19872aSmrg# for certain cross-compile configurations and native mingw.
83432d19872aSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
83442d19872aSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
83452d19872aSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
83462d19872aSmrgAC_MSG_CHECKING([how to convert $build file names to $host format])
83472d19872aSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd,
83482d19872aSmrg[case $host in
83492d19872aSmrg  *-*-mingw* )
83502d19872aSmrg    case $build in
83512d19872aSmrg      *-*-mingw* ) # actually msys
83522d19872aSmrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
83532d19872aSmrg        ;;
83542d19872aSmrg      *-*-cygwin* )
83552d19872aSmrg        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
83562d19872aSmrg        ;;
83572d19872aSmrg      * ) # otherwise, assume *nix
83582d19872aSmrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
83592d19872aSmrg        ;;
83602d19872aSmrg    esac
83612d19872aSmrg    ;;
83622d19872aSmrg  *-*-cygwin* )
83632d19872aSmrg    case $build in
83642d19872aSmrg      *-*-mingw* ) # actually msys
83652d19872aSmrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
83662d19872aSmrg        ;;
83672d19872aSmrg      *-*-cygwin* )
83682d19872aSmrg        lt_cv_to_host_file_cmd=func_convert_file_noop
83692d19872aSmrg        ;;
83702d19872aSmrg      * ) # otherwise, assume *nix
83712d19872aSmrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
83722d19872aSmrg        ;;
83732d19872aSmrg    esac
83742d19872aSmrg    ;;
83752d19872aSmrg  * ) # unhandled hosts (and "normal" native builds)
83762d19872aSmrg    lt_cv_to_host_file_cmd=func_convert_file_noop
83772d19872aSmrg    ;;
83782d19872aSmrgesac
83792d19872aSmrg])
83802d19872aSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd
83812d19872aSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd])
83822d19872aSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
83832d19872aSmrg         [0], [convert $build file names to $host format])dnl
83842d19872aSmrg
83852d19872aSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format])
83862d19872aSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd,
83872d19872aSmrg[#assume ordinary cross tools, or native build.
83882d19872aSmrglt_cv_to_tool_file_cmd=func_convert_file_noop
83892d19872aSmrgcase $host in
83902d19872aSmrg  *-*-mingw* )
83912d19872aSmrg    case $build in
83922d19872aSmrg      *-*-mingw* ) # actually msys
83932d19872aSmrg        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
83942d19872aSmrg        ;;
83952d19872aSmrg    esac
83962d19872aSmrg    ;;
83972d19872aSmrgesac
83982d19872aSmrg])
83992d19872aSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd
84002d19872aSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
84012d19872aSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
84022d19872aSmrg         [0], [convert $build files to toolchain format])dnl
84032d19872aSmrg])# _LT_PATH_CONVERSION_FUNCTIONS
8404