libtool.m4 revision 5b16253f
15b16253fSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
25b16253fSmrg#
35b16253fSmrg#   Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software
45b16253fSmrg#   Foundation, Inc.
55b16253fSmrg#   Written by Gordon Matzigkeit, 1996
65b16253fSmrg#
75b16253fSmrg# This file is free software; the Free Software Foundation gives
85b16253fSmrg# unlimited permission to copy and/or distribute it, with or without
95b16253fSmrg# modifications, as long as this notice is preserved.
105b16253fSmrg
115b16253fSmrgm4_define([_LT_COPYING], [dnl
125b16253fSmrg# Copyright (C) 2014 Free Software Foundation, Inc.
135b16253fSmrg# This is free software; see the source for copying conditions.  There is NO
145b16253fSmrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
155b16253fSmrg
165b16253fSmrg# GNU Libtool is free software; you can redistribute it and/or modify
175b16253fSmrg# it under the terms of the GNU General Public License as published by
185b16253fSmrg# the Free Software Foundation; either version 2 of of the License, or
195b16253fSmrg# (at your option) any later version.
205b16253fSmrg#
215b16253fSmrg# As a special exception to the GNU General Public License, if you
225b16253fSmrg# distribute this file as part of a program or library that is built
235b16253fSmrg# using GNU Libtool, you may include this file under the  same
245b16253fSmrg# distribution terms that you use for the rest of that program.
255b16253fSmrg#
265b16253fSmrg# GNU Libtool is distributed in the hope that it will be useful, but
275b16253fSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
285b16253fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
295b16253fSmrg# GNU General Public License for more details.
305b16253fSmrg#
315b16253fSmrg# You should have received a copy of the GNU General Public License
325b16253fSmrg# along with this program.  If not, see <http://www.gnu.org/licenses/>.
335b16253fSmrg])
345b16253fSmrg
355b16253fSmrg# serial 59 LT_INIT
365b16253fSmrg
375b16253fSmrg
385b16253fSmrg# LT_PREREQ(VERSION)
395b16253fSmrg# ------------------
405b16253fSmrg# Complain and exit if this libtool version is less that VERSION.
415b16253fSmrgm4_defun([LT_PREREQ],
425b16253fSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
435b16253fSmrg       [m4_default([$3],
445b16253fSmrg		   [m4_fatal([Libtool version $1 or higher is required],
455b16253fSmrg		             63)])],
465b16253fSmrg       [$2])])
475b16253fSmrg
485b16253fSmrg
495b16253fSmrg# _LT_CHECK_BUILDDIR
505b16253fSmrg# ------------------
515b16253fSmrg# Complain if the absolute build directory name contains unusual characters
525b16253fSmrgm4_defun([_LT_CHECK_BUILDDIR],
535b16253fSmrg[case `pwd` in
545b16253fSmrg  *\ * | *\	*)
555b16253fSmrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
565b16253fSmrgesac
575b16253fSmrg])
585b16253fSmrg
595b16253fSmrg
605b16253fSmrg# LT_INIT([OPTIONS])
615b16253fSmrg# ------------------
625b16253fSmrgAC_DEFUN([LT_INIT],
635b16253fSmrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
645b16253fSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
655b16253fSmrgAC_BEFORE([$0], [LT_LANG])dnl
665b16253fSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
675b16253fSmrgAC_BEFORE([$0], [LTDL_INIT])dnl
685b16253fSmrgm4_require([_LT_CHECK_BUILDDIR])dnl
695b16253fSmrg
705b16253fSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
715b16253fSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
725b16253fSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
735b16253fSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
745b16253fSmrgdnl unless we require an AC_DEFUNed macro:
755b16253fSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
765b16253fSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
775b16253fSmrgAC_REQUIRE([LTVERSION_VERSION])dnl
785b16253fSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
795b16253fSmrgm4_require([_LT_PROG_LTMAIN])dnl
805b16253fSmrg
815b16253fSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
825b16253fSmrg
835b16253fSmrgdnl Parse OPTIONS
845b16253fSmrg_LT_SET_OPTIONS([$0], [$1])
855b16253fSmrg
865b16253fSmrg# This can be used to rebuild libtool when needed
875b16253fSmrgLIBTOOL_DEPS=$ltmain
885b16253fSmrg
895b16253fSmrg# Always use our own libtool.
905b16253fSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
915b16253fSmrgAC_SUBST(LIBTOOL)dnl
925b16253fSmrg
935b16253fSmrg_LT_SETUP
945b16253fSmrg
955b16253fSmrg# Only expand once:
965b16253fSmrgm4_define([LT_INIT])
975b16253fSmrg])# LT_INIT
985b16253fSmrg
995b16253fSmrg# Old names:
1005b16253fSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1015b16253fSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1025b16253fSmrgdnl aclocal-1.4 backwards compatibility:
1035b16253fSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1045b16253fSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1055b16253fSmrg
1065b16253fSmrg
1075b16253fSmrg# _LT_PREPARE_CC_BASENAME
1085b16253fSmrg# -----------------------
1095b16253fSmrgm4_defun([_LT_PREPARE_CC_BASENAME], [
1105b16253fSmrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1115b16253fSmrgfunc_cc_basename ()
1125b16253fSmrg{
1135b16253fSmrg    for cc_temp in @S|@*""; do
1145b16253fSmrg      case $cc_temp in
1155b16253fSmrg        compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1165b16253fSmrg        distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1175b16253fSmrg        \-*) ;;
1185b16253fSmrg        *) break;;
1195b16253fSmrg      esac
1205b16253fSmrg    done
1215b16253fSmrg    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
1225b16253fSmrg}
1235b16253fSmrg])# _LT_PREPARE_CC_BASENAME
1245b16253fSmrg
1255b16253fSmrg
1265b16253fSmrg# _LT_CC_BASENAME(CC)
1275b16253fSmrg# -------------------
1285b16253fSmrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
1295b16253fSmrg# but that macro is also expanded into generated libtool script, which
1305b16253fSmrg# arranges for $SED and $ECHO to be set by different means.
1315b16253fSmrgm4_defun([_LT_CC_BASENAME],
1325b16253fSmrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl
1335b16253fSmrgAC_REQUIRE([_LT_DECL_SED])dnl
1345b16253fSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1355b16253fSmrgfunc_cc_basename $1
1365b16253fSmrgcc_basename=$func_cc_basename_result
1375b16253fSmrg])
1385b16253fSmrg
1395b16253fSmrg
1405b16253fSmrg# _LT_FILEUTILS_DEFAULTS
1415b16253fSmrg# ----------------------
1425b16253fSmrg# It is okay to use these file commands and assume they have been set
1435b16253fSmrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
1445b16253fSmrgm4_defun([_LT_FILEUTILS_DEFAULTS],
1455b16253fSmrg[: ${CP="cp -f"}
1465b16253fSmrg: ${MV="mv -f"}
1475b16253fSmrg: ${RM="rm -f"}
1485b16253fSmrg])# _LT_FILEUTILS_DEFAULTS
1495b16253fSmrg
1505b16253fSmrg
1515b16253fSmrg# _LT_SETUP
1525b16253fSmrg# ---------
1535b16253fSmrgm4_defun([_LT_SETUP],
1545b16253fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1555b16253fSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
1565b16253fSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
1575b16253fSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1585b16253fSmrg
1595b16253fSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
1605b16253fSmrgdnl
1615b16253fSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl
1625b16253fSmrg_LT_DECL([], [host], [0])dnl
1635b16253fSmrg_LT_DECL([], [host_os], [0])dnl
1645b16253fSmrgdnl
1655b16253fSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl
1665b16253fSmrg_LT_DECL([], [build], [0])dnl
1675b16253fSmrg_LT_DECL([], [build_os], [0])dnl
1685b16253fSmrgdnl
1695b16253fSmrgAC_REQUIRE([AC_PROG_CC])dnl
1705b16253fSmrgAC_REQUIRE([LT_PATH_LD])dnl
1715b16253fSmrgAC_REQUIRE([LT_PATH_NM])dnl
1725b16253fSmrgdnl
1735b16253fSmrgAC_REQUIRE([AC_PROG_LN_S])dnl
1745b16253fSmrgtest -z "$LN_S" && LN_S="ln -s"
1755b16253fSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1765b16253fSmrgdnl
1775b16253fSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
1785b16253fSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1795b16253fSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1805b16253fSmrgdnl
1815b16253fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
1825b16253fSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
1835b16253fSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
1845b16253fSmrgm4_require([_LT_CMD_RELOAD])dnl
1855b16253fSmrgm4_require([_LT_DECL_FILECMD])dnl
1865b16253fSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
1875b16253fSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
1885b16253fSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
1895b16253fSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1905b16253fSmrgm4_require([_LT_WITH_SYSROOT])dnl
1915b16253fSmrgm4_require([_LT_CMD_TRUNCATE])dnl
1925b16253fSmrg
1935b16253fSmrg_LT_CONFIG_LIBTOOL_INIT([
1945b16253fSmrg# See if we are running on zsh, and set the options that allow our
1955b16253fSmrg# commands through without removal of \ escapes INIT.
1965b16253fSmrgif test -n "\${ZSH_VERSION+set}"; then
1975b16253fSmrg   setopt NO_GLOB_SUBST
1985b16253fSmrgfi
1995b16253fSmrg])
2005b16253fSmrgif test -n "${ZSH_VERSION+set}"; then
2015b16253fSmrg   setopt NO_GLOB_SUBST
2025b16253fSmrgfi
2035b16253fSmrg
2045b16253fSmrg_LT_CHECK_OBJDIR
2055b16253fSmrg
2065b16253fSmrgm4_require([_LT_TAG_COMPILER])dnl
2075b16253fSmrg
2085b16253fSmrgcase $host_os in
2095b16253fSmrgaix3*)
2105b16253fSmrg  # AIX sometimes has problems with the GCC collect2 program.  For some
2115b16253fSmrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
2125b16253fSmrg  # vanish in a puff of smoke.
2135b16253fSmrg  if test set != "${COLLECT_NAMES+set}"; then
2145b16253fSmrg    COLLECT_NAMES=
2155b16253fSmrg    export COLLECT_NAMES
2165b16253fSmrg  fi
2175b16253fSmrg  ;;
2185b16253fSmrgesac
2195b16253fSmrg
2205b16253fSmrg# Global variables:
2215b16253fSmrgofile=libtool
2225b16253fSmrgcan_build_shared=yes
2235b16253fSmrg
2245b16253fSmrg# All known linkers require a '.a' archive for static linking (except MSVC and
2255b16253fSmrg# ICC, which need '.lib').
2265b16253fSmrglibext=a
2275b16253fSmrg
2285b16253fSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
2295b16253fSmrg
2305b16253fSmrgold_CC=$CC
2315b16253fSmrgold_CFLAGS=$CFLAGS
2325b16253fSmrg
2335b16253fSmrg# Set sane defaults for various variables
2345b16253fSmrgtest -z "$CC" && CC=cc
2355b16253fSmrgtest -z "$LTCC" && LTCC=$CC
2365b16253fSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
2375b16253fSmrgtest -z "$LD" && LD=ld
2385b16253fSmrgtest -z "$ac_objext" && ac_objext=o
2395b16253fSmrg
2405b16253fSmrg_LT_CC_BASENAME([$compiler])
2415b16253fSmrg
2425b16253fSmrg# Only perform the check for file, if the check method requires it
2435b16253fSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
2445b16253fSmrgcase $deplibs_check_method in
2455b16253fSmrgfile_magic*)
2465b16253fSmrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2475b16253fSmrg    _LT_PATH_MAGIC
2485b16253fSmrg  fi
2495b16253fSmrg  ;;
2505b16253fSmrgesac
2515b16253fSmrg
2525b16253fSmrg# Use C for the default configuration in the libtool script
2535b16253fSmrgLT_SUPPORTED_TAG([CC])
2545b16253fSmrg_LT_LANG_C_CONFIG
2555b16253fSmrg_LT_LANG_DEFAULT_CONFIG
2565b16253fSmrg_LT_CONFIG_COMMANDS
2575b16253fSmrg])# _LT_SETUP
2585b16253fSmrg
2595b16253fSmrg
2605b16253fSmrg# _LT_PREPARE_SED_QUOTE_VARS
2615b16253fSmrg# --------------------------
2625b16253fSmrg# Define a few sed substitution that help us do robust quoting.
2635b16253fSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS],
2645b16253fSmrg[# Backslashify metacharacters that are still active within
2655b16253fSmrg# double-quoted strings.
2665b16253fSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
2675b16253fSmrg
2685b16253fSmrg# Same as above, but do not quote variable references.
2695b16253fSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
2705b16253fSmrg
2715b16253fSmrg# Sed substitution to delay expansion of an escaped shell variable in a
2725b16253fSmrg# double_quote_subst'ed string.
2735b16253fSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
2745b16253fSmrg
2755b16253fSmrg# Sed substitution to delay expansion of an escaped single quote.
2765b16253fSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
2775b16253fSmrg
2785b16253fSmrg# Sed substitution to avoid accidental globbing in evaled expressions
2795b16253fSmrgno_glob_subst='s/\*/\\\*/g'
2805b16253fSmrg])
2815b16253fSmrg
2825b16253fSmrg# _LT_PROG_LTMAIN
2835b16253fSmrg# ---------------
2845b16253fSmrg# Note that this code is called both from 'configure', and 'config.status'
2855b16253fSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
2865b16253fSmrg# 'config.status' has no value for ac_aux_dir unless we are using Automake,
2875b16253fSmrg# so we pass a copy along to make sure it has a sensible value anyway.
2885b16253fSmrgm4_defun([_LT_PROG_LTMAIN],
2895b16253fSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
2905b16253fSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
2915b16253fSmrgltmain=$ac_aux_dir/ltmain.sh
2925b16253fSmrg])# _LT_PROG_LTMAIN
2935b16253fSmrg
2945b16253fSmrg
2955b16253fSmrg## ------------------------------------- ##
2965b16253fSmrg## Accumulate code for creating libtool. ##
2975b16253fSmrg## ------------------------------------- ##
2985b16253fSmrg
2995b16253fSmrg# So that we can recreate a full libtool script including additional
3005b16253fSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
3015b16253fSmrg# in macros and then make a single call at the end using the 'libtool'
3025b16253fSmrg# label.
3035b16253fSmrg
3045b16253fSmrg
3055b16253fSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
3065b16253fSmrg# ----------------------------------------
3075b16253fSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
3085b16253fSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
3095b16253fSmrg[m4_ifval([$1],
3105b16253fSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
3115b16253fSmrg                     [$1
3125b16253fSmrg])])])
3135b16253fSmrg
3145b16253fSmrg# Initialize.
3155b16253fSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
3165b16253fSmrg
3175b16253fSmrg
3185b16253fSmrg# _LT_CONFIG_LIBTOOL([COMMANDS])
3195b16253fSmrg# ------------------------------
3205b16253fSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
3215b16253fSmrgm4_define([_LT_CONFIG_LIBTOOL],
3225b16253fSmrg[m4_ifval([$1],
3235b16253fSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
3245b16253fSmrg                     [$1
3255b16253fSmrg])])])
3265b16253fSmrg
3275b16253fSmrg# Initialize.
3285b16253fSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
3295b16253fSmrg
3305b16253fSmrg
3315b16253fSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
3325b16253fSmrg# -----------------------------------------------------
3335b16253fSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
3345b16253fSmrg[_LT_CONFIG_LIBTOOL([$1])
3355b16253fSmrg_LT_CONFIG_LIBTOOL_INIT([$2])
3365b16253fSmrg])
3375b16253fSmrg
3385b16253fSmrg
3395b16253fSmrg# _LT_FORMAT_COMMENT([COMMENT])
3405b16253fSmrg# -----------------------------
3415b16253fSmrg# Add leading comment marks to the start of each line, and a trailing
3425b16253fSmrg# full-stop to the whole comment if one is not present already.
3435b16253fSmrgm4_define([_LT_FORMAT_COMMENT],
3445b16253fSmrg[m4_ifval([$1], [
3455b16253fSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
3465b16253fSmrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
3475b16253fSmrg)])
3485b16253fSmrg
3495b16253fSmrg
3505b16253fSmrg
3515b16253fSmrg## ------------------------ ##
3525b16253fSmrg## FIXME: Eliminate VARNAME ##
3535b16253fSmrg## ------------------------ ##
3545b16253fSmrg
3555b16253fSmrg
3565b16253fSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
3575b16253fSmrg# -------------------------------------------------------------------
3585b16253fSmrg# CONFIGNAME is the name given to the value in the libtool script.
3595b16253fSmrg# VARNAME is the (base) name used in the configure script.
3605b16253fSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
3615b16253fSmrg# VARNAME.  Any other value will be used directly.
3625b16253fSmrgm4_define([_LT_DECL],
3635b16253fSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
3645b16253fSmrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
3655b16253fSmrg	[m4_ifval([$1], [$1], [$2])])
3665b16253fSmrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
3675b16253fSmrg    m4_ifval([$4],
3685b16253fSmrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
3695b16253fSmrg    lt_dict_add_subkey([lt_decl_dict], [$2],
3705b16253fSmrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
3715b16253fSmrg])
3725b16253fSmrg
3735b16253fSmrg
3745b16253fSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
3755b16253fSmrg# --------------------------------------------------------
3765b16253fSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
3775b16253fSmrg
3785b16253fSmrg
3795b16253fSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
3805b16253fSmrg# ------------------------------------------------
3815b16253fSmrgm4_define([lt_decl_tag_varnames],
3825b16253fSmrg[_lt_decl_filter([tagged?], [yes], $@)])
3835b16253fSmrg
3845b16253fSmrg
3855b16253fSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
3865b16253fSmrg# ---------------------------------------------------------
3875b16253fSmrgm4_define([_lt_decl_filter],
3885b16253fSmrg[m4_case([$#],
3895b16253fSmrg  [0], [m4_fatal([$0: too few arguments: $#])],
3905b16253fSmrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
3915b16253fSmrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
3925b16253fSmrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
3935b16253fSmrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
3945b16253fSmrg])
3955b16253fSmrg
3965b16253fSmrg
3975b16253fSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
3985b16253fSmrg# --------------------------------------------------
3995b16253fSmrgm4_define([lt_decl_quote_varnames],
4005b16253fSmrg[_lt_decl_filter([value], [1], $@)])
4015b16253fSmrg
4025b16253fSmrg
4035b16253fSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
4045b16253fSmrg# ---------------------------------------------------
4055b16253fSmrgm4_define([lt_decl_dquote_varnames],
4065b16253fSmrg[_lt_decl_filter([value], [2], $@)])
4075b16253fSmrg
4085b16253fSmrg
4095b16253fSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
4105b16253fSmrg# ---------------------------------------------------
4115b16253fSmrgm4_define([lt_decl_varnames_tagged],
4125b16253fSmrg[m4_assert([$# <= 2])dnl
4135b16253fSmrg_$0(m4_quote(m4_default([$1], [[, ]])),
4145b16253fSmrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
4155b16253fSmrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
4165b16253fSmrgm4_define([_lt_decl_varnames_tagged],
4175b16253fSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
4185b16253fSmrg
4195b16253fSmrg
4205b16253fSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
4215b16253fSmrg# ------------------------------------------------
4225b16253fSmrgm4_define([lt_decl_all_varnames],
4235b16253fSmrg[_$0(m4_quote(m4_default([$1], [[, ]])),
4245b16253fSmrg     m4_if([$2], [],
4255b16253fSmrg	   m4_quote(lt_decl_varnames),
4265b16253fSmrg	m4_quote(m4_shift($@))))[]dnl
4275b16253fSmrg])
4285b16253fSmrgm4_define([_lt_decl_all_varnames],
4295b16253fSmrg[lt_join($@, lt_decl_varnames_tagged([$1],
4305b16253fSmrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
4315b16253fSmrg])
4325b16253fSmrg
4335b16253fSmrg
4345b16253fSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
4355b16253fSmrg# ------------------------------------
4365b16253fSmrg# Quote a variable value, and forward it to 'config.status' so that its
4375b16253fSmrg# declaration there will have the same value as in 'configure'.  VARNAME
4385b16253fSmrg# must have a single quote delimited value for this to work.
4395b16253fSmrgm4_define([_LT_CONFIG_STATUS_DECLARE],
4405b16253fSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
4415b16253fSmrg
4425b16253fSmrg
4435b16253fSmrg# _LT_CONFIG_STATUS_DECLARATIONS
4445b16253fSmrg# ------------------------------
4455b16253fSmrg# We delimit libtool config variables with single quotes, so when
4465b16253fSmrg# we write them to config.status, we have to be sure to quote all
4475b16253fSmrg# embedded single quotes properly.  In configure, this macro expands
4485b16253fSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
4495b16253fSmrg#
4505b16253fSmrg#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
4515b16253fSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
4525b16253fSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
4535b16253fSmrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
4545b16253fSmrg
4555b16253fSmrg
4565b16253fSmrg# _LT_LIBTOOL_TAGS
4575b16253fSmrg# ----------------
4585b16253fSmrg# Output comment and list of tags supported by the script
4595b16253fSmrgm4_defun([_LT_LIBTOOL_TAGS],
4605b16253fSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
4615b16253fSmrgavailable_tags='_LT_TAGS'dnl
4625b16253fSmrg])
4635b16253fSmrg
4645b16253fSmrg
4655b16253fSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
4665b16253fSmrg# -----------------------------------
4675b16253fSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and
4685b16253fSmrg# expand to a commented shell variable setting:
4695b16253fSmrg#
4705b16253fSmrg#    # Some comment about what VAR is for.
4715b16253fSmrg#    visible_name=$lt_internal_name
4725b16253fSmrgm4_define([_LT_LIBTOOL_DECLARE],
4735b16253fSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
4745b16253fSmrg					   [description])))[]dnl
4755b16253fSmrgm4_pushdef([_libtool_name],
4765b16253fSmrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
4775b16253fSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
4785b16253fSmrg    [0], [_libtool_name=[$]$1],
4795b16253fSmrg    [1], [_libtool_name=$lt_[]$1],
4805b16253fSmrg    [2], [_libtool_name=$lt_[]$1],
4815b16253fSmrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
4825b16253fSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
4835b16253fSmrg])
4845b16253fSmrg
4855b16253fSmrg
4865b16253fSmrg# _LT_LIBTOOL_CONFIG_VARS
4875b16253fSmrg# -----------------------
4885b16253fSmrg# Produce commented declarations of non-tagged libtool config variables
4895b16253fSmrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
4905b16253fSmrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
4915b16253fSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
4925b16253fSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
4935b16253fSmrg[m4_foreach([_lt_var],
4945b16253fSmrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
4955b16253fSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
4965b16253fSmrg
4975b16253fSmrg
4985b16253fSmrg# _LT_LIBTOOL_TAG_VARS(TAG)
4995b16253fSmrg# -------------------------
5005b16253fSmrgm4_define([_LT_LIBTOOL_TAG_VARS],
5015b16253fSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
5025b16253fSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
5035b16253fSmrg
5045b16253fSmrg
5055b16253fSmrg# _LT_TAGVAR(VARNAME, [TAGNAME])
5065b16253fSmrg# ------------------------------
5075b16253fSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
5085b16253fSmrg
5095b16253fSmrg
5105b16253fSmrg# _LT_CONFIG_COMMANDS
5115b16253fSmrg# -------------------
5125b16253fSmrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
5135b16253fSmrg# variables for single and double quote escaping we saved from calls
5145b16253fSmrg# to _LT_DECL, we can put quote escaped variables declarations
5155b16253fSmrg# into 'config.status', and then the shell code to quote escape them in
5165b16253fSmrg# for loops in 'config.status'.  Finally, any additional code accumulated
5175b16253fSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
5185b16253fSmrgm4_defun([_LT_CONFIG_COMMANDS],
5195b16253fSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
5205b16253fSmrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
5215b16253fSmrg	dnl instead of duplicating it all over again into config.status,
5225b16253fSmrg	dnl then we will have config.status run $CONFIG_LT later, so it
5235b16253fSmrg	dnl needs to know what name is stored there:
5245b16253fSmrg        [AC_CONFIG_COMMANDS([libtool],
5255b16253fSmrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
5265b16253fSmrg    dnl If the libtool generation code is destined for config.status,
5275b16253fSmrg    dnl expand the accumulated commands and init code now:
5285b16253fSmrg    [AC_CONFIG_COMMANDS([libtool],
5295b16253fSmrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
5305b16253fSmrg])#_LT_CONFIG_COMMANDS
5315b16253fSmrg
5325b16253fSmrg
5335b16253fSmrg# Initialize.
5345b16253fSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
5355b16253fSmrg[
5365b16253fSmrg
5375b16253fSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
5385b16253fSmrg# if CDPATH is set.
5395b16253fSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5405b16253fSmrg
5415b16253fSmrgsed_quote_subst='$sed_quote_subst'
5425b16253fSmrgdouble_quote_subst='$double_quote_subst'
5435b16253fSmrgdelay_variable_subst='$delay_variable_subst'
5445b16253fSmrg_LT_CONFIG_STATUS_DECLARATIONS
5455b16253fSmrgLTCC='$LTCC'
5465b16253fSmrgLTCFLAGS='$LTCFLAGS'
5475b16253fSmrgcompiler='$compiler_DEFAULT'
5485b16253fSmrg
5495b16253fSmrg# A function that is used when there is no print builtin or printf.
5505b16253fSmrgfunc_fallback_echo ()
5515b16253fSmrg{
5525b16253fSmrg  eval 'cat <<_LTECHO_EOF
5535b16253fSmrg\$[]1
5545b16253fSmrg_LTECHO_EOF'
5555b16253fSmrg}
5565b16253fSmrg
5575b16253fSmrg# Quote evaled strings.
5585b16253fSmrgfor var in lt_decl_all_varnames([[ \
5595b16253fSmrg]], lt_decl_quote_varnames); do
5605b16253fSmrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
5615b16253fSmrg    *[[\\\\\\\`\\"\\\$]]*)
5625b16253fSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
5635b16253fSmrg      ;;
5645b16253fSmrg    *)
5655b16253fSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
5665b16253fSmrg      ;;
5675b16253fSmrg    esac
5685b16253fSmrgdone
5695b16253fSmrg
5705b16253fSmrg# Double-quote double-evaled strings.
5715b16253fSmrgfor var in lt_decl_all_varnames([[ \
5725b16253fSmrg]], lt_decl_dquote_varnames); do
5735b16253fSmrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
5745b16253fSmrg    *[[\\\\\\\`\\"\\\$]]*)
5755b16253fSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
5765b16253fSmrg      ;;
5775b16253fSmrg    *)
5785b16253fSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
5795b16253fSmrg      ;;
5805b16253fSmrg    esac
5815b16253fSmrgdone
5825b16253fSmrg
5835b16253fSmrg_LT_OUTPUT_LIBTOOL_INIT
5845b16253fSmrg])
5855b16253fSmrg
5865b16253fSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
5875b16253fSmrg# ------------------------------------
5885b16253fSmrg# Generate a child script FILE with all initialization necessary to
5895b16253fSmrg# reuse the environment learned by the parent script, and make the
5905b16253fSmrg# file executable.  If COMMENT is supplied, it is inserted after the
5915b16253fSmrg# '#!' sequence but before initialization text begins.  After this
5925b16253fSmrg# macro, additional text can be appended to FILE to form the body of
5935b16253fSmrg# the child script.  The macro ends with non-zero status if the
5945b16253fSmrg# file could not be fully written (such as if the disk is full).
5955b16253fSmrgm4_ifdef([AS_INIT_GENERATED],
5965b16253fSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
5975b16253fSmrg[m4_defun([_LT_GENERATED_FILE_INIT],
5985b16253fSmrg[m4_require([AS_PREPARE])]dnl
5995b16253fSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
6005b16253fSmrg[lt_write_fail=0
6015b16253fSmrgcat >$1 <<_ASEOF || lt_write_fail=1
6025b16253fSmrg#! $SHELL
6035b16253fSmrg# Generated by $as_me.
6045b16253fSmrg$2
6055b16253fSmrgSHELL=\${CONFIG_SHELL-$SHELL}
6065b16253fSmrgexport SHELL
6075b16253fSmrg_ASEOF
6085b16253fSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1
6095b16253fSmrgAS_SHELL_SANITIZE
6105b16253fSmrg_AS_PREPARE
6115b16253fSmrgexec AS_MESSAGE_FD>&1
6125b16253fSmrg_ASEOF
6135b16253fSmrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl
6145b16253fSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
6155b16253fSmrg
6165b16253fSmrg# LT_OUTPUT
6175b16253fSmrg# ---------
6185b16253fSmrg# This macro allows early generation of the libtool script (before
6195b16253fSmrg# AC_OUTPUT is called), incase it is used in configure for compilation
6205b16253fSmrg# tests.
6215b16253fSmrgAC_DEFUN([LT_OUTPUT],
6225b16253fSmrg[: ${CONFIG_LT=./config.lt}
6235b16253fSmrgAC_MSG_NOTICE([creating $CONFIG_LT])
6245b16253fSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
6255b16253fSmrg[# Run this file to recreate a libtool stub with the current configuration.])
6265b16253fSmrg
6275b16253fSmrgcat >>"$CONFIG_LT" <<\_LTEOF
6285b16253fSmrglt_cl_silent=false
6295b16253fSmrgexec AS_MESSAGE_LOG_FD>>config.log
6305b16253fSmrg{
6315b16253fSmrg  echo
6325b16253fSmrg  AS_BOX([Running $as_me.])
6335b16253fSmrg} >&AS_MESSAGE_LOG_FD
6345b16253fSmrg
6355b16253fSmrglt_cl_help="\
6365b16253fSmrg'$as_me' creates a local libtool stub from the current configuration,
6375b16253fSmrgfor use in further configure time tests before the real libtool is
6385b16253fSmrggenerated.
6395b16253fSmrg
6405b16253fSmrgUsage: $[0] [[OPTIONS]]
6415b16253fSmrg
6425b16253fSmrg  -h, --help      print this help, then exit
6435b16253fSmrg  -V, --version   print version number, then exit
6445b16253fSmrg  -q, --quiet     do not print progress messages
6455b16253fSmrg  -d, --debug     don't remove temporary files
6465b16253fSmrg
6475b16253fSmrgReport bugs to <bug-libtool@gnu.org>."
6485b16253fSmrg
6495b16253fSmrglt_cl_version="\
6505b16253fSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
6515b16253fSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
6525b16253fSmrgconfigured by $[0], generated by m4_PACKAGE_STRING.
6535b16253fSmrg
6545b16253fSmrgCopyright (C) 2011 Free Software Foundation, Inc.
6555b16253fSmrgThis config.lt script is free software; the Free Software Foundation
6565b16253fSmrggives unlimited permision to copy, distribute and modify it."
6575b16253fSmrg
6585b16253fSmrgwhile test 0 != $[#]
6595b16253fSmrgdo
6605b16253fSmrg  case $[1] in
6615b16253fSmrg    --version | --v* | -V )
6625b16253fSmrg      echo "$lt_cl_version"; exit 0 ;;
6635b16253fSmrg    --help | --h* | -h )
6645b16253fSmrg      echo "$lt_cl_help"; exit 0 ;;
6655b16253fSmrg    --debug | --d* | -d )
6665b16253fSmrg      debug=: ;;
6675b16253fSmrg    --quiet | --q* | --silent | --s* | -q )
6685b16253fSmrg      lt_cl_silent=: ;;
6695b16253fSmrg
6705b16253fSmrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
6715b16253fSmrgTry '$[0] --help' for more information.]) ;;
6725b16253fSmrg
6735b16253fSmrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
6745b16253fSmrgTry '$[0] --help' for more information.]) ;;
6755b16253fSmrg  esac
6765b16253fSmrg  shift
6775b16253fSmrgdone
6785b16253fSmrg
6795b16253fSmrgif $lt_cl_silent; then
6805b16253fSmrg  exec AS_MESSAGE_FD>/dev/null
6815b16253fSmrgfi
6825b16253fSmrg_LTEOF
6835b16253fSmrg
6845b16253fSmrgcat >>"$CONFIG_LT" <<_LTEOF
6855b16253fSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
6865b16253fSmrg_LTEOF
6875b16253fSmrg
6885b16253fSmrgcat >>"$CONFIG_LT" <<\_LTEOF
6895b16253fSmrgAC_MSG_NOTICE([creating $ofile])
6905b16253fSmrg_LT_OUTPUT_LIBTOOL_COMMANDS
6915b16253fSmrgAS_EXIT(0)
6925b16253fSmrg_LTEOF
6935b16253fSmrgchmod +x "$CONFIG_LT"
6945b16253fSmrg
6955b16253fSmrg# configure is writing to config.log, but config.lt does its own redirection,
6965b16253fSmrg# appending to config.log, which fails on DOS, as config.log is still kept
6975b16253fSmrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
6985b16253fSmrg# config.log, so it can be properly (re)opened and appended to by config.lt.
6995b16253fSmrglt_cl_success=:
7005b16253fSmrgtest yes = "$silent" &&
7015b16253fSmrg  lt_config_lt_args="$lt_config_lt_args --quiet"
7025b16253fSmrgexec AS_MESSAGE_LOG_FD>/dev/null
7035b16253fSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
7045b16253fSmrgexec AS_MESSAGE_LOG_FD>>config.log
7055b16253fSmrg$lt_cl_success || AS_EXIT(1)
7065b16253fSmrg])# LT_OUTPUT
7075b16253fSmrg
7085b16253fSmrg
7095b16253fSmrg# _LT_CONFIG(TAG)
7105b16253fSmrg# ---------------
7115b16253fSmrg# If TAG is the built-in tag, create an initial libtool script with a
7125b16253fSmrg# default configuration from the untagged config vars.  Otherwise add code
7135b16253fSmrg# to config.status for appending the configuration named by TAG from the
7145b16253fSmrg# matching tagged config vars.
7155b16253fSmrgm4_defun([_LT_CONFIG],
7165b16253fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7175b16253fSmrg_LT_CONFIG_SAVE_COMMANDS([
7185b16253fSmrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
7195b16253fSmrg  m4_if(_LT_TAG, [C], [
7205b16253fSmrg    # See if we are running on zsh, and set the options that allow our
7215b16253fSmrg    # commands through without removal of \ escapes.
7225b16253fSmrg    if test -n "${ZSH_VERSION+set}"; then
7235b16253fSmrg      setopt NO_GLOB_SUBST
7245b16253fSmrg    fi
7255b16253fSmrg
7265b16253fSmrg    cfgfile=${ofile}T
7275b16253fSmrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
7285b16253fSmrg    $RM "$cfgfile"
7295b16253fSmrg
7305b16253fSmrg    cat <<_LT_EOF >> "$cfgfile"
7315b16253fSmrg#! $SHELL
7325b16253fSmrg# Generated automatically by $as_me ($PACKAGE) $VERSION
7335b16253fSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7345b16253fSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
7355b16253fSmrg
7365b16253fSmrg# Provide generalized library-building support services.
7375b16253fSmrg# Written by Gordon Matzigkeit, 1996
7385b16253fSmrg
7395b16253fSmrg_LT_COPYING
7405b16253fSmrg_LT_LIBTOOL_TAGS
7415b16253fSmrg
7425b16253fSmrg# Configured defaults for sys_lib_dlsearch_path munging.
7435b16253fSmrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
7445b16253fSmrg
7455b16253fSmrg# ### BEGIN LIBTOOL CONFIG
7465b16253fSmrg_LT_LIBTOOL_CONFIG_VARS
7475b16253fSmrg_LT_LIBTOOL_TAG_VARS
7485b16253fSmrg# ### END LIBTOOL CONFIG
7495b16253fSmrg
7505b16253fSmrg_LT_EOF
7515b16253fSmrg
7525b16253fSmrg    cat <<'_LT_EOF' >> "$cfgfile"
7535b16253fSmrg
7545b16253fSmrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
7555b16253fSmrg
7565b16253fSmrg_LT_PREPARE_MUNGE_PATH_LIST
7575b16253fSmrg_LT_PREPARE_CC_BASENAME
7585b16253fSmrg
7595b16253fSmrg# ### END FUNCTIONS SHARED WITH CONFIGURE
7605b16253fSmrg
7615b16253fSmrg_LT_EOF
7625b16253fSmrg
7635b16253fSmrg  case $host_os in
7645b16253fSmrg  aix3*)
7655b16253fSmrg    cat <<\_LT_EOF >> "$cfgfile"
7665b16253fSmrg# AIX sometimes has problems with the GCC collect2 program.  For some
7675b16253fSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems
7685b16253fSmrg# vanish in a puff of smoke.
7695b16253fSmrgif test set != "${COLLECT_NAMES+set}"; then
7705b16253fSmrg  COLLECT_NAMES=
7715b16253fSmrg  export COLLECT_NAMES
7725b16253fSmrgfi
7735b16253fSmrg_LT_EOF
7745b16253fSmrg    ;;
7755b16253fSmrg  esac
7765b16253fSmrg
7775b16253fSmrg  _LT_PROG_LTMAIN
7785b16253fSmrg
7795b16253fSmrg  # We use sed instead of cat because bash on DJGPP gets confused if
7805b16253fSmrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7815b16253fSmrg  # text mode, it properly converts lines to CR/LF.  This bash problem
7825b16253fSmrg  # is reportedly fixed, but why not run on old versions too?
7835b16253fSmrg  $SED '$q' "$ltmain" >> "$cfgfile" \
7845b16253fSmrg     || (rm -f "$cfgfile"; exit 1)
7855b16253fSmrg
7865b16253fSmrg   mv -f "$cfgfile" "$ofile" ||
7875b16253fSmrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
7885b16253fSmrg  chmod +x "$ofile"
7895b16253fSmrg],
7905b16253fSmrg[cat <<_LT_EOF >> "$ofile"
7915b16253fSmrg
7925b16253fSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
7935b16253fSmrgdnl in a comment (ie after a #).
7945b16253fSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1
7955b16253fSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
7965b16253fSmrg# ### END LIBTOOL TAG CONFIG: $1
7975b16253fSmrg_LT_EOF
7985b16253fSmrg])dnl /m4_if
7995b16253fSmrg],
8005b16253fSmrg[m4_if([$1], [], [
8015b16253fSmrg    PACKAGE='$PACKAGE'
8025b16253fSmrg    VERSION='$VERSION'
8035b16253fSmrg    RM='$RM'
8045b16253fSmrg    ofile='$ofile'], [])
8055b16253fSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS
8065b16253fSmrg])# _LT_CONFIG
8075b16253fSmrg
8085b16253fSmrg
8095b16253fSmrg# LT_SUPPORTED_TAG(TAG)
8105b16253fSmrg# ---------------------
8115b16253fSmrg# Trace this macro to discover what tags are supported by the libtool
8125b16253fSmrg# --tag option, using:
8135b16253fSmrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
8145b16253fSmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
8155b16253fSmrg
8165b16253fSmrg
8175b16253fSmrg# C support is built-in for now
8185b16253fSmrgm4_define([_LT_LANG_C_enabled], [])
8195b16253fSmrgm4_define([_LT_TAGS], [])
8205b16253fSmrg
8215b16253fSmrg
8225b16253fSmrg# LT_LANG(LANG)
8235b16253fSmrg# -------------
8245b16253fSmrg# Enable libtool support for the given language if not already enabled.
8255b16253fSmrgAC_DEFUN([LT_LANG],
8265b16253fSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
8275b16253fSmrgm4_case([$1],
8285b16253fSmrg  [C],			[_LT_LANG(C)],
8295b16253fSmrg  [C++],		[_LT_LANG(CXX)],
8305b16253fSmrg  [Go],			[_LT_LANG(GO)],
8315b16253fSmrg  [Java],		[_LT_LANG(GCJ)],
8325b16253fSmrg  [Fortran 77],		[_LT_LANG(F77)],
8335b16253fSmrg  [Fortran],		[_LT_LANG(FC)],
8345b16253fSmrg  [Windows Resource],	[_LT_LANG(RC)],
8355b16253fSmrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
8365b16253fSmrg    [_LT_LANG($1)],
8375b16253fSmrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
8385b16253fSmrg])# LT_LANG
8395b16253fSmrg
8405b16253fSmrg
8415b16253fSmrg# _LT_LANG(LANGNAME)
8425b16253fSmrg# ------------------
8435b16253fSmrgm4_defun([_LT_LANG],
8445b16253fSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
8455b16253fSmrg  [LT_SUPPORTED_TAG([$1])dnl
8465b16253fSmrg  m4_append([_LT_TAGS], [$1 ])dnl
8475b16253fSmrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
8485b16253fSmrg  _LT_LANG_$1_CONFIG($1)])dnl
8495b16253fSmrg])# _LT_LANG
8505b16253fSmrg
8515b16253fSmrg
8525b16253fSmrgm4_ifndef([AC_PROG_GO], [
8535b16253fSmrg############################################################
8545b16253fSmrg# NOTE: This macro has been submitted for inclusion into   #
8555b16253fSmrg#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
8565b16253fSmrg#  a released version of Autoconf we should remove this    #
8575b16253fSmrg#  macro and use it instead.                               #
8585b16253fSmrg############################################################
8595b16253fSmrgm4_defun([AC_PROG_GO],
8605b16253fSmrg[AC_LANG_PUSH(Go)dnl
8615b16253fSmrgAC_ARG_VAR([GOC],     [Go compiler command])dnl
8625b16253fSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
8635b16253fSmrg_AC_ARG_VAR_LDFLAGS()dnl
8645b16253fSmrgAC_CHECK_TOOL(GOC, gccgo)
8655b16253fSmrgif test -z "$GOC"; then
8665b16253fSmrg  if test -n "$ac_tool_prefix"; then
8675b16253fSmrg    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
8685b16253fSmrg  fi
8695b16253fSmrgfi
8705b16253fSmrgif test -z "$GOC"; then
8715b16253fSmrg  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
8725b16253fSmrgfi
8735b16253fSmrg])#m4_defun
8745b16253fSmrg])#m4_ifndef
8755b16253fSmrg
8765b16253fSmrg
8775b16253fSmrg# _LT_LANG_DEFAULT_CONFIG
8785b16253fSmrg# -----------------------
8795b16253fSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
8805b16253fSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
8815b16253fSmrg  [LT_LANG(CXX)],
8825b16253fSmrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
8835b16253fSmrg
8845b16253fSmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
8855b16253fSmrg  [LT_LANG(F77)],
8865b16253fSmrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
8875b16253fSmrg
8885b16253fSmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
8895b16253fSmrg  [LT_LANG(FC)],
8905b16253fSmrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
8915b16253fSmrg
8925b16253fSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
8935b16253fSmrgdnl pulling things in needlessly.
8945b16253fSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
8955b16253fSmrg  [LT_LANG(GCJ)],
8965b16253fSmrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
8975b16253fSmrg    [LT_LANG(GCJ)],
8985b16253fSmrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
8995b16253fSmrg      [LT_LANG(GCJ)],
9005b16253fSmrg      [m4_ifdef([AC_PROG_GCJ],
9015b16253fSmrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
9025b16253fSmrg       m4_ifdef([A][M_PROG_GCJ],
9035b16253fSmrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
9045b16253fSmrg       m4_ifdef([LT_PROG_GCJ],
9055b16253fSmrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
9065b16253fSmrg
9075b16253fSmrgAC_PROVIDE_IFELSE([AC_PROG_GO],
9085b16253fSmrg  [LT_LANG(GO)],
9095b16253fSmrg  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
9105b16253fSmrg
9115b16253fSmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
9125b16253fSmrg  [LT_LANG(RC)],
9135b16253fSmrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
9145b16253fSmrg])# _LT_LANG_DEFAULT_CONFIG
9155b16253fSmrg
9165b16253fSmrg# Obsolete macros:
9175b16253fSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
9185b16253fSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
9195b16253fSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
9205b16253fSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
9215b16253fSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
9225b16253fSmrgdnl aclocal-1.4 backwards compatibility:
9235b16253fSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
9245b16253fSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
9255b16253fSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
9265b16253fSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
9275b16253fSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], [])
9285b16253fSmrg
9295b16253fSmrg
9305b16253fSmrg# _LT_TAG_COMPILER
9315b16253fSmrg# ----------------
9325b16253fSmrgm4_defun([_LT_TAG_COMPILER],
9335b16253fSmrg[AC_REQUIRE([AC_PROG_CC])dnl
9345b16253fSmrg
9355b16253fSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
9365b16253fSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
9375b16253fSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
9385b16253fSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
9395b16253fSmrg
9405b16253fSmrg# If no C compiler was specified, use CC.
9415b16253fSmrgLTCC=${LTCC-"$CC"}
9425b16253fSmrg
9435b16253fSmrg# If no C compiler flags were specified, use CFLAGS.
9445b16253fSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
9455b16253fSmrg
9465b16253fSmrg# Allow CC to be a program name with arguments.
9475b16253fSmrgcompiler=$CC
9485b16253fSmrg])# _LT_TAG_COMPILER
9495b16253fSmrg
9505b16253fSmrg
9515b16253fSmrg# _LT_COMPILER_BOILERPLATE
9525b16253fSmrg# ------------------------
9535b16253fSmrg# Check for compiler boilerplate output or warnings with
9545b16253fSmrg# the simple compiler test code.
9555b16253fSmrgm4_defun([_LT_COMPILER_BOILERPLATE],
9565b16253fSmrg[m4_require([_LT_DECL_SED])dnl
9575b16253fSmrgac_outfile=conftest.$ac_objext
9585b16253fSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
9595b16253fSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
9605b16253fSmrg_lt_compiler_boilerplate=`cat conftest.err`
9615b16253fSmrg$RM conftest*
9625b16253fSmrg])# _LT_COMPILER_BOILERPLATE
9635b16253fSmrg
9645b16253fSmrg
9655b16253fSmrg# _LT_LINKER_BOILERPLATE
9665b16253fSmrg# ----------------------
9675b16253fSmrg# Check for linker boilerplate output or warnings with
9685b16253fSmrg# the simple link test code.
9695b16253fSmrgm4_defun([_LT_LINKER_BOILERPLATE],
9705b16253fSmrg[m4_require([_LT_DECL_SED])dnl
9715b16253fSmrgac_outfile=conftest.$ac_objext
9725b16253fSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
9735b16253fSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
9745b16253fSmrg_lt_linker_boilerplate=`cat conftest.err`
9755b16253fSmrg$RM -r conftest*
9765b16253fSmrg])# _LT_LINKER_BOILERPLATE
9775b16253fSmrg
9785b16253fSmrg# _LT_REQUIRED_DARWIN_CHECKS
9795b16253fSmrg# -------------------------
9805b16253fSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
9815b16253fSmrg  case $host_os in
9825b16253fSmrg    rhapsody* | darwin*)
9835b16253fSmrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
9845b16253fSmrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
9855b16253fSmrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
9865b16253fSmrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
9875b16253fSmrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
9885b16253fSmrg    _LT_DECL([], [DSYMUTIL], [1],
9895b16253fSmrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
9905b16253fSmrg    _LT_DECL([], [NMEDIT], [1],
9915b16253fSmrg      [Tool to change global to local symbols on Mac OS X])
9925b16253fSmrg    _LT_DECL([], [LIPO], [1],
9935b16253fSmrg      [Tool to manipulate fat objects and archives on Mac OS X])
9945b16253fSmrg    _LT_DECL([], [OTOOL], [1],
9955b16253fSmrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
9965b16253fSmrg    _LT_DECL([], [OTOOL64], [1],
9975b16253fSmrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
9985b16253fSmrg
9995b16253fSmrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
10005b16253fSmrg      [lt_cv_apple_cc_single_mod=no
10015b16253fSmrg      if test -z "$LT_MULTI_MODULE"; then
10025b16253fSmrg	# By default we will add the -single_module flag. You can override
10035b16253fSmrg	# by either setting the environment variable LT_MULTI_MODULE
10045b16253fSmrg	# non-empty at configure time, or by adding -multi_module to the
10055b16253fSmrg	# link flags.
10065b16253fSmrg	rm -rf libconftest.dylib*
10075b16253fSmrg	echo "int foo(void){return 1;}" > conftest.c
10085b16253fSmrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10095b16253fSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
10105b16253fSmrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10115b16253fSmrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
10125b16253fSmrg        _lt_result=$?
10135b16253fSmrg	# If there is a non-empty error log, and "single_module"
10145b16253fSmrg	# appears in it, assume the flag caused a linker warning
10155b16253fSmrg        if test -s conftest.err && $GREP single_module conftest.err; then
10165b16253fSmrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
10175b16253fSmrg	# Otherwise, if the output was created with a 0 exit code from
10185b16253fSmrg	# the compiler, it worked.
10195b16253fSmrg	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
10205b16253fSmrg	  lt_cv_apple_cc_single_mod=yes
10215b16253fSmrg	else
10225b16253fSmrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
10235b16253fSmrg	fi
10245b16253fSmrg	rm -rf libconftest.dylib*
10255b16253fSmrg	rm -f conftest.*
10265b16253fSmrg      fi])
10275b16253fSmrg
10285b16253fSmrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
10295b16253fSmrg      [lt_cv_ld_exported_symbols_list],
10305b16253fSmrg      [lt_cv_ld_exported_symbols_list=no
10315b16253fSmrg      save_LDFLAGS=$LDFLAGS
10325b16253fSmrg      echo "_main" > conftest.sym
10335b16253fSmrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
10345b16253fSmrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
10355b16253fSmrg	[lt_cv_ld_exported_symbols_list=yes],
10365b16253fSmrg	[lt_cv_ld_exported_symbols_list=no])
10375b16253fSmrg	LDFLAGS=$save_LDFLAGS
10385b16253fSmrg    ])
10395b16253fSmrg
10405b16253fSmrg    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
10415b16253fSmrg      [lt_cv_ld_force_load=no
10425b16253fSmrg      cat > conftest.c << _LT_EOF
10435b16253fSmrgint forced_loaded() { return 2;}
10445b16253fSmrg_LT_EOF
10455b16253fSmrg      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
10465b16253fSmrg      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
10475b16253fSmrg      echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
10485b16253fSmrg      $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
10495b16253fSmrg      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
10505b16253fSmrg      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
10515b16253fSmrg      cat > conftest.c << _LT_EOF
10525b16253fSmrgint main() { return 0;}
10535b16253fSmrg_LT_EOF
10545b16253fSmrg      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
10555b16253fSmrg      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
10565b16253fSmrg      _lt_result=$?
10575b16253fSmrg      if test -s conftest.err && $GREP force_load conftest.err; then
10585b16253fSmrg	cat conftest.err >&AS_MESSAGE_LOG_FD
10595b16253fSmrg      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
10605b16253fSmrg	lt_cv_ld_force_load=yes
10615b16253fSmrg      else
10625b16253fSmrg	cat conftest.err >&AS_MESSAGE_LOG_FD
10635b16253fSmrg      fi
10645b16253fSmrg        rm -f conftest.err libconftest.a conftest conftest.c
10655b16253fSmrg        rm -rf conftest.dSYM
10665b16253fSmrg    ])
10675b16253fSmrg    case $host_os in
10685b16253fSmrg    rhapsody* | darwin1.[[012]])
10695b16253fSmrg      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
10705b16253fSmrg    darwin1.*)
10715b16253fSmrg      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10725b16253fSmrg    darwin*)
10735b16253fSmrg      case $MACOSX_DEPLOYMENT_TARGET,$host in
10745b16253fSmrg        10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
10755b16253fSmrg          _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10765b16253fSmrg        *)
10775b16253fSmrg          _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10785b16253fSmrg      esac
10795b16253fSmrg    ;;
10805b16253fSmrg  esac
10815b16253fSmrg    if test yes = "$lt_cv_apple_cc_single_mod"; then
10825b16253fSmrg      _lt_dar_single_mod='$single_module'
10835b16253fSmrg    fi
10845b16253fSmrg    if test yes = "$lt_cv_ld_exported_symbols_list"; then
10855b16253fSmrg      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
10865b16253fSmrg    else
10875b16253fSmrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
10885b16253fSmrg    fi
10895b16253fSmrg    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
10905b16253fSmrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
10915b16253fSmrg    else
10925b16253fSmrg      _lt_dsymutil=
10935b16253fSmrg    fi
10945b16253fSmrg    ;;
10955b16253fSmrg  esac
10965b16253fSmrg])
10975b16253fSmrg
10985b16253fSmrg
10995b16253fSmrg# _LT_DARWIN_LINKER_FEATURES([TAG])
11005b16253fSmrg# ---------------------------------
11015b16253fSmrg# Checks for linker and compiler features on darwin
11025b16253fSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
11035b16253fSmrg[
11045b16253fSmrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
11055b16253fSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
11065b16253fSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
11075b16253fSmrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
11085b16253fSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
11095b16253fSmrg  if test yes = "$lt_cv_ld_force_load"; then
11105b16253fSmrg    _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\"`'
11115b16253fSmrg    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
11125b16253fSmrg                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
11135b16253fSmrg  else
11145b16253fSmrg    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
11155b16253fSmrg  fi
11165b16253fSmrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
11175b16253fSmrg  _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
11185b16253fSmrg  case $cc_basename in
11195b16253fSmrg     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
11205b16253fSmrg     *) _lt_dar_can_shared=$GCC ;;
11215b16253fSmrg  esac
11225b16253fSmrg  if test yes = "$_lt_dar_can_shared"; then
11235b16253fSmrg    output_verbose_link_cmd=func_echo_all
11245b16253fSmrg    _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"
11255b16253fSmrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
11265b16253fSmrg    _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"
11275b16253fSmrg    _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"
11285b16253fSmrg    m4_if([$1], [CXX],
11295b16253fSmrg[   if test yes != "$lt_cv_apple_cc_single_mod"; then
11305b16253fSmrg      _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"
11315b16253fSmrg      _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"
11325b16253fSmrg    fi
11335b16253fSmrg],[])
11345b16253fSmrg  else
11355b16253fSmrg  _LT_TAGVAR(ld_shlibs, $1)=no
11365b16253fSmrg  fi
11375b16253fSmrg])
11385b16253fSmrg
11395b16253fSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
11405b16253fSmrg# ----------------------------------
11415b16253fSmrg# Links a minimal program and checks the executable
11425b16253fSmrg# for the system default hardcoded library path. In most cases,
11435b16253fSmrg# this is /usr/lib:/lib, but when the MPI compilers are used
11445b16253fSmrg# the location of the communication and MPI libs are included too.
11455b16253fSmrg# If we don't find anything, use the default library path according
11465b16253fSmrg# to the aix ld manual.
11475b16253fSmrg# Store the results from the different compilers for each TAGNAME.
11485b16253fSmrg# Allow to override them for all tags through lt_cv_aix_libpath.
11495b16253fSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
11505b16253fSmrg[m4_require([_LT_DECL_SED])dnl
11515b16253fSmrgif test set = "${lt_cv_aix_libpath+set}"; then
11525b16253fSmrg  aix_libpath=$lt_cv_aix_libpath
11535b16253fSmrgelse
11545b16253fSmrg  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
11555b16253fSmrg  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
11565b16253fSmrg  lt_aix_libpath_sed='[
11575b16253fSmrg      /Import File Strings/,/^$/ {
11585b16253fSmrg	  /^0/ {
11595b16253fSmrg	      s/^0  *\([^ ]*\) *$/\1/
11605b16253fSmrg	      p
11615b16253fSmrg	  }
11625b16253fSmrg      }]'
11635b16253fSmrg  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11645b16253fSmrg  # Check for a 64-bit object if we didn't find anything.
11655b16253fSmrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
11665b16253fSmrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11675b16253fSmrg  fi],[])
11685b16253fSmrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
11695b16253fSmrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
11705b16253fSmrg  fi
11715b16253fSmrg  ])
11725b16253fSmrg  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
11735b16253fSmrgfi
11745b16253fSmrg])# _LT_SYS_MODULE_PATH_AIX
11755b16253fSmrg
11765b16253fSmrg
11775b16253fSmrg# _LT_SHELL_INIT(ARG)
11785b16253fSmrg# -------------------
11795b16253fSmrgm4_define([_LT_SHELL_INIT],
11805b16253fSmrg[m4_divert_text([M4SH-INIT], [$1
11815b16253fSmrg])])# _LT_SHELL_INIT
11825b16253fSmrg
11835b16253fSmrg
11845b16253fSmrg
11855b16253fSmrg# _LT_PROG_ECHO_BACKSLASH
11865b16253fSmrg# -----------------------
11875b16253fSmrg# Find how we can fake an echo command that does not interpret backslash.
11885b16253fSmrg# In particular, with Autoconf 2.60 or later we add some code to the start
11895b16253fSmrg# of the generated configure script that will find a shell with a builtin
11905b16253fSmrg# printf (that we can use as an echo command).
11915b16253fSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
11925b16253fSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
11935b16253fSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
11945b16253fSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
11955b16253fSmrg
11965b16253fSmrgAC_MSG_CHECKING([how to print strings])
11975b16253fSmrg# Test print first, because it will be a builtin if present.
11985b16253fSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
11995b16253fSmrg   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
12005b16253fSmrg  ECHO='print -r --'
12015b16253fSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
12025b16253fSmrg  ECHO='printf %s\n'
12035b16253fSmrgelse
12045b16253fSmrg  # Use this function as a fallback that always works.
12055b16253fSmrg  func_fallback_echo ()
12065b16253fSmrg  {
12075b16253fSmrg    eval 'cat <<_LTECHO_EOF
12085b16253fSmrg$[]1
12095b16253fSmrg_LTECHO_EOF'
12105b16253fSmrg  }
12115b16253fSmrg  ECHO='func_fallback_echo'
12125b16253fSmrgfi
12135b16253fSmrg
12145b16253fSmrg# func_echo_all arg...
12155b16253fSmrg# Invoke $ECHO with all args, space-separated.
12165b16253fSmrgfunc_echo_all ()
12175b16253fSmrg{
12185b16253fSmrg    $ECHO "$*"
12195b16253fSmrg}
12205b16253fSmrg
12215b16253fSmrgcase $ECHO in
12225b16253fSmrg  printf*) AC_MSG_RESULT([printf]) ;;
12235b16253fSmrg  print*) AC_MSG_RESULT([print -r]) ;;
12245b16253fSmrg  *) AC_MSG_RESULT([cat]) ;;
12255b16253fSmrgesac
12265b16253fSmrg
12275b16253fSmrgm4_ifdef([_AS_DETECT_SUGGESTED],
12285b16253fSmrg[_AS_DETECT_SUGGESTED([
12295b16253fSmrg  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
12305b16253fSmrg    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
12315b16253fSmrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
12325b16253fSmrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
12335b16253fSmrg    PATH=/empty FPATH=/empty; export PATH FPATH
12345b16253fSmrg    test "X`printf %s $ECHO`" = "X$ECHO" \
12355b16253fSmrg      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
12365b16253fSmrg
12375b16253fSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
12385b16253fSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
12395b16253fSmrg])# _LT_PROG_ECHO_BACKSLASH
12405b16253fSmrg
12415b16253fSmrg
12425b16253fSmrg# _LT_WITH_SYSROOT
12435b16253fSmrg# ----------------
12445b16253fSmrgAC_DEFUN([_LT_WITH_SYSROOT],
12455b16253fSmrg[m4_require([_LT_DECL_SED])dnl
12465b16253fSmrgAC_MSG_CHECKING([for sysroot])
12475b16253fSmrgAC_ARG_WITH([sysroot],
12485b16253fSmrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
12495b16253fSmrg  [Search for dependent libraries within DIR (or the compiler's sysroot
12505b16253fSmrg   if not specified).])],
12515b16253fSmrg[], [with_sysroot=no])
12525b16253fSmrg
12535b16253fSmrgdnl lt_sysroot will always be passed unquoted.  We quote it here
12545b16253fSmrgdnl in case the user passed a directory name.
12555b16253fSmrglt_sysroot=
12565b16253fSmrgcase $with_sysroot in #(
12575b16253fSmrg yes)
12585b16253fSmrg   if test yes = "$GCC"; then
12595b16253fSmrg     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
12605b16253fSmrg   fi
12615b16253fSmrg   ;; #(
12625b16253fSmrg /*)
12635b16253fSmrg   lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
12645b16253fSmrg   ;; #(
12655b16253fSmrg no|'')
12665b16253fSmrg   ;; #(
12675b16253fSmrg *)
12685b16253fSmrg   AC_MSG_RESULT([$with_sysroot])
12695b16253fSmrg   AC_MSG_ERROR([The sysroot must be an absolute path.])
12705b16253fSmrg   ;;
12715b16253fSmrgesac
12725b16253fSmrg
12735b16253fSmrg AC_MSG_RESULT([${lt_sysroot:-no}])
12745b16253fSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
12755b16253fSmrg[dependent libraries, and where our libraries should be installed.])])
12765b16253fSmrg
12775b16253fSmrg# _LT_ENABLE_LOCK
12785b16253fSmrg# ---------------
12795b16253fSmrgm4_defun([_LT_ENABLE_LOCK],
12805b16253fSmrg[AC_ARG_ENABLE([libtool-lock],
12815b16253fSmrg  [AS_HELP_STRING([--disable-libtool-lock],
12825b16253fSmrg    [avoid locking (might break parallel builds)])])
12835b16253fSmrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes
12845b16253fSmrg
12855b16253fSmrg# Some flags need to be propagated to the compiler or linker for good
12865b16253fSmrg# libtool support.
12875b16253fSmrgcase $host in
12885b16253fSmrgia64-*-hpux*)
12895b16253fSmrg  # Find out what ABI is being produced by ac_compile, and set mode
12905b16253fSmrg  # options accordingly.
12915b16253fSmrg  echo 'int i;' > conftest.$ac_ext
12925b16253fSmrg  if AC_TRY_EVAL(ac_compile); then
12935b16253fSmrg    case `$FILECMD conftest.$ac_objext` in
12945b16253fSmrg      *ELF-32*)
12955b16253fSmrg	HPUX_IA64_MODE=32
12965b16253fSmrg	;;
12975b16253fSmrg      *ELF-64*)
12985b16253fSmrg	HPUX_IA64_MODE=64
12995b16253fSmrg	;;
13005b16253fSmrg    esac
13015b16253fSmrg  fi
13025b16253fSmrg  rm -rf conftest*
13035b16253fSmrg  ;;
13045b16253fSmrg*-*-irix6*)
13055b16253fSmrg  # Find out what ABI is being produced by ac_compile, and set linker
13065b16253fSmrg  # options accordingly.
13075b16253fSmrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
13085b16253fSmrg  if AC_TRY_EVAL(ac_compile); then
13095b16253fSmrg    if test yes = "$lt_cv_prog_gnu_ld"; then
13105b16253fSmrg      case `$FILECMD conftest.$ac_objext` in
13115b16253fSmrg	*32-bit*)
13125b16253fSmrg	  LD="${LD-ld} -melf32bsmip"
13135b16253fSmrg	  ;;
13145b16253fSmrg	*N32*)
13155b16253fSmrg	  LD="${LD-ld} -melf32bmipn32"
13165b16253fSmrg	  ;;
13175b16253fSmrg	*64-bit*)
13185b16253fSmrg	  LD="${LD-ld} -melf64bmip"
13195b16253fSmrg	;;
13205b16253fSmrg      esac
13215b16253fSmrg    else
13225b16253fSmrg      case `$FILECMD conftest.$ac_objext` in
13235b16253fSmrg	*32-bit*)
13245b16253fSmrg	  LD="${LD-ld} -32"
13255b16253fSmrg	  ;;
13265b16253fSmrg	*N32*)
13275b16253fSmrg	  LD="${LD-ld} -n32"
13285b16253fSmrg	  ;;
13295b16253fSmrg	*64-bit*)
13305b16253fSmrg	  LD="${LD-ld} -64"
13315b16253fSmrg	  ;;
13325b16253fSmrg      esac
13335b16253fSmrg    fi
13345b16253fSmrg  fi
13355b16253fSmrg  rm -rf conftest*
13365b16253fSmrg  ;;
13375b16253fSmrg
13385b16253fSmrgmips64*-*linux*)
13395b16253fSmrg  # Find out what ABI is being produced by ac_compile, and set linker
13405b16253fSmrg  # options accordingly.
13415b16253fSmrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
13425b16253fSmrg  if AC_TRY_EVAL(ac_compile); then
13435b16253fSmrg    emul=elf
13445b16253fSmrg    case `$FILECMD conftest.$ac_objext` in
13455b16253fSmrg      *32-bit*)
13465b16253fSmrg	emul="${emul}32"
13475b16253fSmrg	;;
13485b16253fSmrg      *64-bit*)
13495b16253fSmrg	emul="${emul}64"
13505b16253fSmrg	;;
13515b16253fSmrg    esac
13525b16253fSmrg    case `$FILECMD conftest.$ac_objext` in
13535b16253fSmrg      *MSB*)
13545b16253fSmrg	emul="${emul}btsmip"
13555b16253fSmrg	;;
13565b16253fSmrg      *LSB*)
13575b16253fSmrg	emul="${emul}ltsmip"
13585b16253fSmrg	;;
13595b16253fSmrg    esac
13605b16253fSmrg    case `$FILECMD conftest.$ac_objext` in
13615b16253fSmrg      *N32*)
13625b16253fSmrg	emul="${emul}n32"
13635b16253fSmrg	;;
13645b16253fSmrg    esac
13655b16253fSmrg    LD="${LD-ld} -m $emul"
13665b16253fSmrg  fi
13675b16253fSmrg  rm -rf conftest*
13685b16253fSmrg  ;;
13695b16253fSmrg
13705b16253fSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
13715b16253fSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
13725b16253fSmrg  # Find out what ABI is being produced by ac_compile, and set linker
13735b16253fSmrg  # options accordingly.  Note that the listed cases only cover the
13745b16253fSmrg  # situations where additional linker options are needed (such as when
13755b16253fSmrg  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
13765b16253fSmrg  # vice versa); the common cases where no linker options are needed do
13775b16253fSmrg  # not appear in the list.
13785b16253fSmrg  echo 'int i;' > conftest.$ac_ext
13795b16253fSmrg  if AC_TRY_EVAL(ac_compile); then
13805b16253fSmrg    case `$FILECMD conftest.o` in
13815b16253fSmrg      *32-bit*)
13825b16253fSmrg	case $host in
13835b16253fSmrg	  x86_64-*kfreebsd*-gnu)
13845b16253fSmrg	    LD="${LD-ld} -m elf_i386_fbsd"
13855b16253fSmrg	    ;;
13865b16253fSmrg	  x86_64-*linux*)
13875b16253fSmrg	    case `$FILECMD conftest.o` in
13885b16253fSmrg	      *x86-64*)
13895b16253fSmrg		LD="${LD-ld} -m elf32_x86_64"
13905b16253fSmrg		;;
13915b16253fSmrg	      *)
13925b16253fSmrg		LD="${LD-ld} -m elf_i386"
13935b16253fSmrg		;;
13945b16253fSmrg	    esac
13955b16253fSmrg	    ;;
13965b16253fSmrg	  powerpc64le-*linux*)
13975b16253fSmrg	    LD="${LD-ld} -m elf32lppclinux"
13985b16253fSmrg	    ;;
13995b16253fSmrg	  powerpc64-*linux*)
14005b16253fSmrg	    LD="${LD-ld} -m elf32ppclinux"
14015b16253fSmrg	    ;;
14025b16253fSmrg	  s390x-*linux*)
14035b16253fSmrg	    LD="${LD-ld} -m elf_s390"
14045b16253fSmrg	    ;;
14055b16253fSmrg	  sparc64-*linux*)
14065b16253fSmrg	    LD="${LD-ld} -m elf32_sparc"
14075b16253fSmrg	    ;;
14085b16253fSmrg	esac
14095b16253fSmrg	;;
14105b16253fSmrg      *64-bit*)
14115b16253fSmrg	case $host in
14125b16253fSmrg	  x86_64-*kfreebsd*-gnu)
14135b16253fSmrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
14145b16253fSmrg	    ;;
14155b16253fSmrg	  x86_64-*linux*)
14165b16253fSmrg	    LD="${LD-ld} -m elf_x86_64"
14175b16253fSmrg	    ;;
14185b16253fSmrg	  powerpcle-*linux*)
14195b16253fSmrg	    LD="${LD-ld} -m elf64lppc"
14205b16253fSmrg	    ;;
14215b16253fSmrg	  powerpc-*linux*)
14225b16253fSmrg	    LD="${LD-ld} -m elf64ppc"
14235b16253fSmrg	    ;;
14245b16253fSmrg	  s390*-*linux*|s390*-*tpf*)
14255b16253fSmrg	    LD="${LD-ld} -m elf64_s390"
14265b16253fSmrg	    ;;
14275b16253fSmrg	  sparc*-*linux*)
14285b16253fSmrg	    LD="${LD-ld} -m elf64_sparc"
14295b16253fSmrg	    ;;
14305b16253fSmrg	esac
14315b16253fSmrg	;;
14325b16253fSmrg    esac
14335b16253fSmrg  fi
14345b16253fSmrg  rm -rf conftest*
14355b16253fSmrg  ;;
14365b16253fSmrg
14375b16253fSmrg*-*-sco3.2v5*)
14385b16253fSmrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
14395b16253fSmrg  SAVE_CFLAGS=$CFLAGS
14405b16253fSmrg  CFLAGS="$CFLAGS -belf"
14415b16253fSmrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
14425b16253fSmrg    [AC_LANG_PUSH(C)
14435b16253fSmrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
14445b16253fSmrg     AC_LANG_POP])
14455b16253fSmrg  if test yes != "$lt_cv_cc_needs_belf"; then
14465b16253fSmrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
14475b16253fSmrg    CFLAGS=$SAVE_CFLAGS
14485b16253fSmrg  fi
14495b16253fSmrg  ;;
14505b16253fSmrg*-*solaris*)
14515b16253fSmrg  # Find out what ABI is being produced by ac_compile, and set linker
14525b16253fSmrg  # options accordingly.
14535b16253fSmrg  echo 'int i;' > conftest.$ac_ext
14545b16253fSmrg  if AC_TRY_EVAL(ac_compile); then
14555b16253fSmrg    case `$FILECMD conftest.o` in
14565b16253fSmrg    *64-bit*)
14575b16253fSmrg      case $lt_cv_prog_gnu_ld in
14585b16253fSmrg      yes*)
14595b16253fSmrg        case $host in
14605b16253fSmrg        i?86-*-solaris*|x86_64-*-solaris*)
14615b16253fSmrg          LD="${LD-ld} -m elf_x86_64"
14625b16253fSmrg          ;;
14635b16253fSmrg        sparc*-*-solaris*)
14645b16253fSmrg          LD="${LD-ld} -m elf64_sparc"
14655b16253fSmrg          ;;
14665b16253fSmrg        esac
14675b16253fSmrg        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
14685b16253fSmrg        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
14695b16253fSmrg          LD=${LD-ld}_sol2
14705b16253fSmrg        fi
14715b16253fSmrg        ;;
14725b16253fSmrg      *)
14735b16253fSmrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
14745b16253fSmrg	  LD="${LD-ld} -64"
14755b16253fSmrg	fi
14765b16253fSmrg	;;
14775b16253fSmrg      esac
14785b16253fSmrg      ;;
14795b16253fSmrg    esac
14805b16253fSmrg  fi
14815b16253fSmrg  rm -rf conftest*
14825b16253fSmrg  ;;
14835b16253fSmrgesac
14845b16253fSmrg
14855b16253fSmrgneed_locks=$enable_libtool_lock
14865b16253fSmrg])# _LT_ENABLE_LOCK
14875b16253fSmrg
14885b16253fSmrg
14895b16253fSmrg# _LT_PROG_AR
14905b16253fSmrg# -----------
14915b16253fSmrgm4_defun([_LT_PROG_AR],
14925b16253fSmrg[AC_CHECK_TOOLS(AR, [ar], false)
14935b16253fSmrg: ${AR=ar}
14945b16253fSmrg_LT_DECL([], [AR], [1], [The archiver])
14955b16253fSmrg
14965b16253fSmrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with
14975b16253fSmrg# Automake.  If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
14985b16253fSmrg# higher priority because thats what people were doing historically (setting
14995b16253fSmrg# ARFLAGS for automake and AR_FLAGS for libtool).  FIXME: Make the AR_FLAGS
15005b16253fSmrg# variable obsoleted/removed.
15015b16253fSmrg
15025b16253fSmrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
15035b16253fSmrglt_ar_flags=$AR_FLAGS
15045b16253fSmrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])
15055b16253fSmrg
15065b16253fSmrg# Make AR_FLAGS overridable by 'make ARFLAGS='.  Don't try to run-time override
15075b16253fSmrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
15085b16253fSmrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}],
15095b16253fSmrg         [Flags to create an archive])
15105b16253fSmrg
15115b16253fSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
15125b16253fSmrg  [lt_cv_ar_at_file=no
15135b16253fSmrg   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
15145b16253fSmrg     [echo conftest.$ac_objext > conftest.lst
15155b16253fSmrg      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
15165b16253fSmrg      AC_TRY_EVAL([lt_ar_try])
15175b16253fSmrg      if test 0 -eq "$ac_status"; then
15185b16253fSmrg	# Ensure the archiver fails upon bogus file names.
15195b16253fSmrg	rm -f conftest.$ac_objext libconftest.a
15205b16253fSmrg	AC_TRY_EVAL([lt_ar_try])
15215b16253fSmrg	if test 0 -ne "$ac_status"; then
15225b16253fSmrg          lt_cv_ar_at_file=@
15235b16253fSmrg        fi
15245b16253fSmrg      fi
15255b16253fSmrg      rm -f conftest.* libconftest.a
15265b16253fSmrg     ])
15275b16253fSmrg  ])
15285b16253fSmrg
15295b16253fSmrgif test no = "$lt_cv_ar_at_file"; then
15305b16253fSmrg  archiver_list_spec=
15315b16253fSmrgelse
15325b16253fSmrg  archiver_list_spec=$lt_cv_ar_at_file
15335b16253fSmrgfi
15345b16253fSmrg_LT_DECL([], [archiver_list_spec], [1],
15355b16253fSmrg  [How to feed a file listing to the archiver])
15365b16253fSmrg])# _LT_PROG_AR
15375b16253fSmrg
15385b16253fSmrg
15395b16253fSmrg# _LT_CMD_OLD_ARCHIVE
15405b16253fSmrg# -------------------
15415b16253fSmrgm4_defun([_LT_CMD_OLD_ARCHIVE],
15425b16253fSmrg[_LT_PROG_AR
15435b16253fSmrg
15445b16253fSmrgAC_CHECK_TOOL(STRIP, strip, :)
15455b16253fSmrgtest -z "$STRIP" && STRIP=:
15465b16253fSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
15475b16253fSmrg
15485b16253fSmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
15495b16253fSmrgtest -z "$RANLIB" && RANLIB=:
15505b16253fSmrg_LT_DECL([], [RANLIB], [1],
15515b16253fSmrg    [Commands used to install an old-style archive])
15525b16253fSmrg
15535b16253fSmrg# Determine commands to create old-style static archives.
15545b16253fSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
15555b16253fSmrgold_postinstall_cmds='chmod 644 $oldlib'
15565b16253fSmrgold_postuninstall_cmds=
15575b16253fSmrg
15585b16253fSmrgif test -n "$RANLIB"; then
15595b16253fSmrg  case $host_os in
15605b16253fSmrg  bitrig* | openbsd*)
15615b16253fSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
15625b16253fSmrg    ;;
15635b16253fSmrg  *)
15645b16253fSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
15655b16253fSmrg    ;;
15665b16253fSmrg  esac
15675b16253fSmrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
15685b16253fSmrgfi
15695b16253fSmrg
15705b16253fSmrgcase $host_os in
15715b16253fSmrg  darwin*)
15725b16253fSmrg    lock_old_archive_extraction=yes ;;
15735b16253fSmrg  *)
15745b16253fSmrg    lock_old_archive_extraction=no ;;
15755b16253fSmrgesac
15765b16253fSmrg_LT_DECL([], [old_postinstall_cmds], [2])
15775b16253fSmrg_LT_DECL([], [old_postuninstall_cmds], [2])
15785b16253fSmrg_LT_TAGDECL([], [old_archive_cmds], [2],
15795b16253fSmrg    [Commands used to build an old-style archive])
15805b16253fSmrg_LT_DECL([], [lock_old_archive_extraction], [0],
15815b16253fSmrg    [Whether to use a lock for old archive extraction])
15825b16253fSmrg])# _LT_CMD_OLD_ARCHIVE
15835b16253fSmrg
15845b16253fSmrg
15855b16253fSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
15865b16253fSmrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
15875b16253fSmrg# ----------------------------------------------------------------
15885b16253fSmrg# Check whether the given compiler option works
15895b16253fSmrgAC_DEFUN([_LT_COMPILER_OPTION],
15905b16253fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
15915b16253fSmrgm4_require([_LT_DECL_SED])dnl
15925b16253fSmrgAC_CACHE_CHECK([$1], [$2],
15935b16253fSmrg  [$2=no
15945b16253fSmrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
15955b16253fSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
15965b16253fSmrg   lt_compiler_flag="$3"  ## exclude from sc_useless_quotes_in_assignment
15975b16253fSmrg   # Insert the option either (1) after the last *FLAGS variable, or
15985b16253fSmrg   # (2) before a word containing "conftest.", or (3) at the end.
15995b16253fSmrg   # Note that $ac_compile itself does not contain backslashes and begins
16005b16253fSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
16015b16253fSmrg   # The option is referenced via a variable to avoid confusing sed.
16025b16253fSmrg   lt_compile=`echo "$ac_compile" | $SED \
16035b16253fSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
16045b16253fSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
16055b16253fSmrg   -e 's:$: $lt_compiler_flag:'`
16065b16253fSmrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
16075b16253fSmrg   (eval "$lt_compile" 2>conftest.err)
16085b16253fSmrg   ac_status=$?
16095b16253fSmrg   cat conftest.err >&AS_MESSAGE_LOG_FD
16105b16253fSmrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
16115b16253fSmrg   if (exit $ac_status) && test -s "$ac_outfile"; then
16125b16253fSmrg     # The compiler can only warn and ignore the option if not recognized
16135b16253fSmrg     # So say no if there are warnings other than the usual output.
16145b16253fSmrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
16155b16253fSmrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
16165b16253fSmrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
16175b16253fSmrg       $2=yes
16185b16253fSmrg     fi
16195b16253fSmrg   fi
16205b16253fSmrg   $RM conftest*
16215b16253fSmrg])
16225b16253fSmrg
16235b16253fSmrgif test yes = "[$]$2"; then
16245b16253fSmrg    m4_if([$5], , :, [$5])
16255b16253fSmrgelse
16265b16253fSmrg    m4_if([$6], , :, [$6])
16275b16253fSmrgfi
16285b16253fSmrg])# _LT_COMPILER_OPTION
16295b16253fSmrg
16305b16253fSmrg# Old name:
16315b16253fSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
16325b16253fSmrgdnl aclocal-1.4 backwards compatibility:
16335b16253fSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
16345b16253fSmrg
16355b16253fSmrg
16365b16253fSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
16375b16253fSmrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
16385b16253fSmrg# ----------------------------------------------------
16395b16253fSmrg# Check whether the given linker option works
16405b16253fSmrgAC_DEFUN([_LT_LINKER_OPTION],
16415b16253fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
16425b16253fSmrgm4_require([_LT_DECL_SED])dnl
16435b16253fSmrgAC_CACHE_CHECK([$1], [$2],
16445b16253fSmrg  [$2=no
16455b16253fSmrg   save_LDFLAGS=$LDFLAGS
16465b16253fSmrg   LDFLAGS="$LDFLAGS $3"
16475b16253fSmrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
16485b16253fSmrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
16495b16253fSmrg     # The linker can only warn and ignore the option if not recognized
16505b16253fSmrg     # So say no if there are warnings
16515b16253fSmrg     if test -s conftest.err; then
16525b16253fSmrg       # Append any errors to the config.log.
16535b16253fSmrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
16545b16253fSmrg       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
16555b16253fSmrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
16565b16253fSmrg       if diff conftest.exp conftest.er2 >/dev/null; then
16575b16253fSmrg         $2=yes
16585b16253fSmrg       fi
16595b16253fSmrg     else
16605b16253fSmrg       $2=yes
16615b16253fSmrg     fi
16625b16253fSmrg   fi
16635b16253fSmrg   $RM -r conftest*
16645b16253fSmrg   LDFLAGS=$save_LDFLAGS
16655b16253fSmrg])
16665b16253fSmrg
16675b16253fSmrgif test yes = "[$]$2"; then
16685b16253fSmrg    m4_if([$4], , :, [$4])
16695b16253fSmrgelse
16705b16253fSmrg    m4_if([$5], , :, [$5])
16715b16253fSmrgfi
16725b16253fSmrg])# _LT_LINKER_OPTION
16735b16253fSmrg
16745b16253fSmrg# Old name:
16755b16253fSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
16765b16253fSmrgdnl aclocal-1.4 backwards compatibility:
16775b16253fSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
16785b16253fSmrg
16795b16253fSmrg
16805b16253fSmrg# LT_CMD_MAX_LEN
16815b16253fSmrg#---------------
16825b16253fSmrgAC_DEFUN([LT_CMD_MAX_LEN],
16835b16253fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
16845b16253fSmrg# find the maximum length of command line arguments
16855b16253fSmrgAC_MSG_CHECKING([the maximum length of command line arguments])
16865b16253fSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
16875b16253fSmrg  i=0
16885b16253fSmrg  teststring=ABCD
16895b16253fSmrg
16905b16253fSmrg  case $build_os in
16915b16253fSmrg  msdosdjgpp*)
16925b16253fSmrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
16935b16253fSmrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
16945b16253fSmrg    # during glob expansion).  Even if it were fixed, the result of this
16955b16253fSmrg    # check would be larger than it should be.
16965b16253fSmrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
16975b16253fSmrg    ;;
16985b16253fSmrg
16995b16253fSmrg  gnu*)
17005b16253fSmrg    # Under GNU Hurd, this test is not required because there is
17015b16253fSmrg    # no limit to the length of command line arguments.
17025b16253fSmrg    # Libtool will interpret -1 as no limit whatsoever
17035b16253fSmrg    lt_cv_sys_max_cmd_len=-1;
17045b16253fSmrg    ;;
17055b16253fSmrg
17065b16253fSmrg  cygwin* | mingw* | cegcc*)
17075b16253fSmrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
17085b16253fSmrg    # about 5 minutes as the teststring grows exponentially.
17095b16253fSmrg    # Worse, since 9x/ME are not pre-emptively multitasking,
17105b16253fSmrg    # you end up with a "frozen" computer, even though with patience
17115b16253fSmrg    # the test eventually succeeds (with a max line length of 256k).
17125b16253fSmrg    # Instead, let's just punt: use the minimum linelength reported by
17135b16253fSmrg    # all of the supported platforms: 8192 (on NT/2K/XP).
17145b16253fSmrg    lt_cv_sys_max_cmd_len=8192;
17155b16253fSmrg    ;;
17165b16253fSmrg
17175b16253fSmrg  mint*)
17185b16253fSmrg    # On MiNT this can take a long time and run out of memory.
17195b16253fSmrg    lt_cv_sys_max_cmd_len=8192;
17205b16253fSmrg    ;;
17215b16253fSmrg
17225b16253fSmrg  amigaos*)
17235b16253fSmrg    # On AmigaOS with pdksh, this test takes hours, literally.
17245b16253fSmrg    # So we just punt and use a minimum line length of 8192.
17255b16253fSmrg    lt_cv_sys_max_cmd_len=8192;
17265b16253fSmrg    ;;
17275b16253fSmrg
17285b16253fSmrg  bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
17295b16253fSmrg    # This has been around since 386BSD, at least.  Likely further.
17305b16253fSmrg    if test -x /sbin/sysctl; then
17315b16253fSmrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
17325b16253fSmrg    elif test -x /usr/sbin/sysctl; then
17335b16253fSmrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
17345b16253fSmrg    else
17355b16253fSmrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
17365b16253fSmrg    fi
17375b16253fSmrg    # And add a safety zone
17385b16253fSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
17395b16253fSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
17405b16253fSmrg    ;;
17415b16253fSmrg
17425b16253fSmrg  interix*)
17435b16253fSmrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
17445b16253fSmrg    lt_cv_sys_max_cmd_len=196608
17455b16253fSmrg    ;;
17465b16253fSmrg
17475b16253fSmrg  os2*)
17485b16253fSmrg    # The test takes a long time on OS/2.
17495b16253fSmrg    lt_cv_sys_max_cmd_len=8192
17505b16253fSmrg    ;;
17515b16253fSmrg
17525b16253fSmrg  osf*)
17535b16253fSmrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
17545b16253fSmrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
17555b16253fSmrg    # nice to cause kernel panics so lets avoid the loop below.
17565b16253fSmrg    # First set a reasonable default.
17575b16253fSmrg    lt_cv_sys_max_cmd_len=16384
17585b16253fSmrg    #
17595b16253fSmrg    if test -x /sbin/sysconfig; then
17605b16253fSmrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
17615b16253fSmrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
17625b16253fSmrg      esac
17635b16253fSmrg    fi
17645b16253fSmrg    ;;
17655b16253fSmrg  sco3.2v5*)
17665b16253fSmrg    lt_cv_sys_max_cmd_len=102400
17675b16253fSmrg    ;;
17685b16253fSmrg  sysv5* | sco5v6* | sysv4.2uw2*)
17695b16253fSmrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
17705b16253fSmrg    if test -n "$kargmax"; then
17715b16253fSmrg      lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[	 ]]//'`
17725b16253fSmrg    else
17735b16253fSmrg      lt_cv_sys_max_cmd_len=32768
17745b16253fSmrg    fi
17755b16253fSmrg    ;;
17765b16253fSmrg  *)
17775b16253fSmrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
17785b16253fSmrg    if test -n "$lt_cv_sys_max_cmd_len" && \
17795b16253fSmrg       test undefined != "$lt_cv_sys_max_cmd_len"; then
17805b16253fSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
17815b16253fSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
17825b16253fSmrg    else
17835b16253fSmrg      # Make teststring a little bigger before we do anything with it.
17845b16253fSmrg      # a 1K string should be a reasonable start.
17855b16253fSmrg      for i in 1 2 3 4 5 6 7 8; do
17865b16253fSmrg        teststring=$teststring$teststring
17875b16253fSmrg      done
17885b16253fSmrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
17895b16253fSmrg      # If test is not a shell built-in, we'll probably end up computing a
17905b16253fSmrg      # maximum length that is only half of the actual maximum length, but
17915b16253fSmrg      # we can't tell.
17925b16253fSmrg      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
17935b16253fSmrg	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
17945b16253fSmrg	      test 17 != "$i" # 1/2 MB should be enough
17955b16253fSmrg      do
17965b16253fSmrg        i=`expr $i + 1`
17975b16253fSmrg        teststring=$teststring$teststring
17985b16253fSmrg      done
17995b16253fSmrg      # Only check the string length outside the loop.
18005b16253fSmrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
18015b16253fSmrg      teststring=
18025b16253fSmrg      # Add a significant safety factor because C++ compilers can tack on
18035b16253fSmrg      # massive amounts of additional arguments before passing them to the
18045b16253fSmrg      # linker.  It appears as though 1/2 is a usable value.
18055b16253fSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
18065b16253fSmrg    fi
18075b16253fSmrg    ;;
18085b16253fSmrg  esac
18095b16253fSmrg])
18105b16253fSmrgif test -n "$lt_cv_sys_max_cmd_len"; then
18115b16253fSmrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
18125b16253fSmrgelse
18135b16253fSmrg  AC_MSG_RESULT(none)
18145b16253fSmrgfi
18155b16253fSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len
18165b16253fSmrg_LT_DECL([], [max_cmd_len], [0],
18175b16253fSmrg    [What is the maximum length of a command?])
18185b16253fSmrg])# LT_CMD_MAX_LEN
18195b16253fSmrg
18205b16253fSmrg# Old name:
18215b16253fSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
18225b16253fSmrgdnl aclocal-1.4 backwards compatibility:
18235b16253fSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
18245b16253fSmrg
18255b16253fSmrg
18265b16253fSmrg# _LT_HEADER_DLFCN
18275b16253fSmrg# ----------------
18285b16253fSmrgm4_defun([_LT_HEADER_DLFCN],
18295b16253fSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
18305b16253fSmrg])# _LT_HEADER_DLFCN
18315b16253fSmrg
18325b16253fSmrg
18335b16253fSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
18345b16253fSmrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
18355b16253fSmrg# ----------------------------------------------------------------
18365b16253fSmrgm4_defun([_LT_TRY_DLOPEN_SELF],
18375b16253fSmrg[m4_require([_LT_HEADER_DLFCN])dnl
18385b16253fSmrgif test yes = "$cross_compiling"; then :
18395b16253fSmrg  [$4]
18405b16253fSmrgelse
18415b16253fSmrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
18425b16253fSmrg  lt_status=$lt_dlunknown
18435b16253fSmrg  cat > conftest.$ac_ext <<_LT_EOF
18445b16253fSmrg[#line $LINENO "configure"
18455b16253fSmrg#include "confdefs.h"
18465b16253fSmrg
18475b16253fSmrg#if HAVE_DLFCN_H
18485b16253fSmrg#include <dlfcn.h>
18495b16253fSmrg#endif
18505b16253fSmrg
18515b16253fSmrg#include <stdio.h>
18525b16253fSmrg
18535b16253fSmrg#ifdef RTLD_GLOBAL
18545b16253fSmrg#  define LT_DLGLOBAL		RTLD_GLOBAL
18555b16253fSmrg#else
18565b16253fSmrg#  ifdef DL_GLOBAL
18575b16253fSmrg#    define LT_DLGLOBAL		DL_GLOBAL
18585b16253fSmrg#  else
18595b16253fSmrg#    define LT_DLGLOBAL		0
18605b16253fSmrg#  endif
18615b16253fSmrg#endif
18625b16253fSmrg
18635b16253fSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
18645b16253fSmrg   find out it does not work in some platform. */
18655b16253fSmrg#ifndef LT_DLLAZY_OR_NOW
18665b16253fSmrg#  ifdef RTLD_LAZY
18675b16253fSmrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
18685b16253fSmrg#  else
18695b16253fSmrg#    ifdef DL_LAZY
18705b16253fSmrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
18715b16253fSmrg#    else
18725b16253fSmrg#      ifdef RTLD_NOW
18735b16253fSmrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
18745b16253fSmrg#      else
18755b16253fSmrg#        ifdef DL_NOW
18765b16253fSmrg#          define LT_DLLAZY_OR_NOW	DL_NOW
18775b16253fSmrg#        else
18785b16253fSmrg#          define LT_DLLAZY_OR_NOW	0
18795b16253fSmrg#        endif
18805b16253fSmrg#      endif
18815b16253fSmrg#    endif
18825b16253fSmrg#  endif
18835b16253fSmrg#endif
18845b16253fSmrg
18855b16253fSmrg/* When -fvisibility=hidden is used, assume the code has been annotated
18865b16253fSmrg   correspondingly for the symbols needed.  */
18875b16253fSmrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
18885b16253fSmrgint fnord () __attribute__((visibility("default")));
18895b16253fSmrg#endif
18905b16253fSmrg
18915b16253fSmrgint fnord () { return 42; }
18925b16253fSmrgint main ()
18935b16253fSmrg{
18945b16253fSmrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
18955b16253fSmrg  int status = $lt_dlunknown;
18965b16253fSmrg
18975b16253fSmrg  if (self)
18985b16253fSmrg    {
18995b16253fSmrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
19005b16253fSmrg      else
19015b16253fSmrg        {
19025b16253fSmrg	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
19035b16253fSmrg          else puts (dlerror ());
19045b16253fSmrg	}
19055b16253fSmrg      /* dlclose (self); */
19065b16253fSmrg    }
19075b16253fSmrg  else
19085b16253fSmrg    puts (dlerror ());
19095b16253fSmrg
19105b16253fSmrg  return status;
19115b16253fSmrg}]
19125b16253fSmrg_LT_EOF
19135b16253fSmrg  if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
19145b16253fSmrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
19155b16253fSmrg    lt_status=$?
19165b16253fSmrg    case x$lt_status in
19175b16253fSmrg      x$lt_dlno_uscore) $1 ;;
19185b16253fSmrg      x$lt_dlneed_uscore) $2 ;;
19195b16253fSmrg      x$lt_dlunknown|x*) $3 ;;
19205b16253fSmrg    esac
19215b16253fSmrg  else :
19225b16253fSmrg    # compilation failed
19235b16253fSmrg    $3
19245b16253fSmrg  fi
19255b16253fSmrgfi
19265b16253fSmrgrm -fr conftest*
19275b16253fSmrg])# _LT_TRY_DLOPEN_SELF
19285b16253fSmrg
19295b16253fSmrg
19305b16253fSmrg# LT_SYS_DLOPEN_SELF
19315b16253fSmrg# ------------------
19325b16253fSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
19335b16253fSmrg[m4_require([_LT_HEADER_DLFCN])dnl
19345b16253fSmrgif test yes != "$enable_dlopen"; then
19355b16253fSmrg  enable_dlopen=unknown
19365b16253fSmrg  enable_dlopen_self=unknown
19375b16253fSmrg  enable_dlopen_self_static=unknown
19385b16253fSmrgelse
19395b16253fSmrg  lt_cv_dlopen=no
19405b16253fSmrg  lt_cv_dlopen_libs=
19415b16253fSmrg
19425b16253fSmrg  case $host_os in
19435b16253fSmrg  beos*)
19445b16253fSmrg    lt_cv_dlopen=load_add_on
19455b16253fSmrg    lt_cv_dlopen_libs=
19465b16253fSmrg    lt_cv_dlopen_self=yes
19475b16253fSmrg    ;;
19485b16253fSmrg
19495b16253fSmrg  mingw* | pw32* | cegcc*)
19505b16253fSmrg    lt_cv_dlopen=LoadLibrary
19515b16253fSmrg    lt_cv_dlopen_libs=
19525b16253fSmrg    ;;
19535b16253fSmrg
19545b16253fSmrg  cygwin*)
19555b16253fSmrg    lt_cv_dlopen=dlopen
19565b16253fSmrg    lt_cv_dlopen_libs=
19575b16253fSmrg    ;;
19585b16253fSmrg
19595b16253fSmrg  darwin*)
19605b16253fSmrg    # if libdl is installed we need to link against it
19615b16253fSmrg    AC_CHECK_LIB([dl], [dlopen],
19625b16253fSmrg		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
19635b16253fSmrg    lt_cv_dlopen=dyld
19645b16253fSmrg    lt_cv_dlopen_libs=
19655b16253fSmrg    lt_cv_dlopen_self=yes
19665b16253fSmrg    ])
19675b16253fSmrg    ;;
19685b16253fSmrg
19695b16253fSmrg  tpf*)
19705b16253fSmrg    # Don't try to run any link tests for TPF.  We know it's impossible
19715b16253fSmrg    # because TPF is a cross-compiler, and we know how we open DSOs.
19725b16253fSmrg    lt_cv_dlopen=dlopen
19735b16253fSmrg    lt_cv_dlopen_libs=
19745b16253fSmrg    lt_cv_dlopen_self=no
19755b16253fSmrg    ;;
19765b16253fSmrg
19775b16253fSmrg  *)
19785b16253fSmrg    AC_CHECK_FUNC([shl_load],
19795b16253fSmrg	  [lt_cv_dlopen=shl_load],
19805b16253fSmrg      [AC_CHECK_LIB([dld], [shl_load],
19815b16253fSmrg	    [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
19825b16253fSmrg	[AC_CHECK_FUNC([dlopen],
19835b16253fSmrg	      [lt_cv_dlopen=dlopen],
19845b16253fSmrg	  [AC_CHECK_LIB([dl], [dlopen],
19855b16253fSmrg		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
19865b16253fSmrg	    [AC_CHECK_LIB([svld], [dlopen],
19875b16253fSmrg		  [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
19885b16253fSmrg	      [AC_CHECK_LIB([dld], [dld_link],
19895b16253fSmrg		    [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
19905b16253fSmrg	      ])
19915b16253fSmrg	    ])
19925b16253fSmrg	  ])
19935b16253fSmrg	])
19945b16253fSmrg      ])
19955b16253fSmrg    ;;
19965b16253fSmrg  esac
19975b16253fSmrg
19985b16253fSmrg  if test no = "$lt_cv_dlopen"; then
19995b16253fSmrg    enable_dlopen=no
20005b16253fSmrg  else
20015b16253fSmrg    enable_dlopen=yes
20025b16253fSmrg  fi
20035b16253fSmrg
20045b16253fSmrg  case $lt_cv_dlopen in
20055b16253fSmrg  dlopen)
20065b16253fSmrg    save_CPPFLAGS=$CPPFLAGS
20075b16253fSmrg    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
20085b16253fSmrg
20095b16253fSmrg    save_LDFLAGS=$LDFLAGS
20105b16253fSmrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
20115b16253fSmrg
20125b16253fSmrg    save_LIBS=$LIBS
20135b16253fSmrg    LIBS="$lt_cv_dlopen_libs $LIBS"
20145b16253fSmrg
20155b16253fSmrg    AC_CACHE_CHECK([whether a program can dlopen itself],
20165b16253fSmrg	  lt_cv_dlopen_self, [dnl
20175b16253fSmrg	  _LT_TRY_DLOPEN_SELF(
20185b16253fSmrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
20195b16253fSmrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
20205b16253fSmrg    ])
20215b16253fSmrg
20225b16253fSmrg    if test yes = "$lt_cv_dlopen_self"; then
20235b16253fSmrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
20245b16253fSmrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
20255b16253fSmrg	  lt_cv_dlopen_self_static, [dnl
20265b16253fSmrg	  _LT_TRY_DLOPEN_SELF(
20275b16253fSmrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
20285b16253fSmrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
20295b16253fSmrg      ])
20305b16253fSmrg    fi
20315b16253fSmrg
20325b16253fSmrg    CPPFLAGS=$save_CPPFLAGS
20335b16253fSmrg    LDFLAGS=$save_LDFLAGS
20345b16253fSmrg    LIBS=$save_LIBS
20355b16253fSmrg    ;;
20365b16253fSmrg  esac
20375b16253fSmrg
20385b16253fSmrg  case $lt_cv_dlopen_self in
20395b16253fSmrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
20405b16253fSmrg  *) enable_dlopen_self=unknown ;;
20415b16253fSmrg  esac
20425b16253fSmrg
20435b16253fSmrg  case $lt_cv_dlopen_self_static in
20445b16253fSmrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
20455b16253fSmrg  *) enable_dlopen_self_static=unknown ;;
20465b16253fSmrg  esac
20475b16253fSmrgfi
20485b16253fSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
20495b16253fSmrg	 [Whether dlopen is supported])
20505b16253fSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
20515b16253fSmrg	 [Whether dlopen of programs is supported])
20525b16253fSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
20535b16253fSmrg	 [Whether dlopen of statically linked programs is supported])
20545b16253fSmrg])# LT_SYS_DLOPEN_SELF
20555b16253fSmrg
20565b16253fSmrg# Old name:
20575b16253fSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
20585b16253fSmrgdnl aclocal-1.4 backwards compatibility:
20595b16253fSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
20605b16253fSmrg
20615b16253fSmrg
20625b16253fSmrg# _LT_COMPILER_C_O([TAGNAME])
20635b16253fSmrg# ---------------------------
20645b16253fSmrg# Check to see if options -c and -o are simultaneously supported by compiler.
20655b16253fSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
20665b16253fSmrgm4_defun([_LT_COMPILER_C_O],
20675b16253fSmrg[m4_require([_LT_DECL_SED])dnl
20685b16253fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
20695b16253fSmrgm4_require([_LT_TAG_COMPILER])dnl
20705b16253fSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
20715b16253fSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
20725b16253fSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
20735b16253fSmrg   $RM -r conftest 2>/dev/null
20745b16253fSmrg   mkdir conftest
20755b16253fSmrg   cd conftest
20765b16253fSmrg   mkdir out
20775b16253fSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
20785b16253fSmrg
20795b16253fSmrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
20805b16253fSmrg   # Insert the option either (1) after the last *FLAGS variable, or
20815b16253fSmrg   # (2) before a word containing "conftest.", or (3) at the end.
20825b16253fSmrg   # Note that $ac_compile itself does not contain backslashes and begins
20835b16253fSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
20845b16253fSmrg   lt_compile=`echo "$ac_compile" | $SED \
20855b16253fSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
20865b16253fSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
20875b16253fSmrg   -e 's:$: $lt_compiler_flag:'`
20885b16253fSmrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
20895b16253fSmrg   (eval "$lt_compile" 2>out/conftest.err)
20905b16253fSmrg   ac_status=$?
20915b16253fSmrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
20925b16253fSmrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
20935b16253fSmrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
20945b16253fSmrg   then
20955b16253fSmrg     # The compiler can only warn and ignore the option if not recognized
20965b16253fSmrg     # So say no if there are warnings
20975b16253fSmrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
20985b16253fSmrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
20995b16253fSmrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
21005b16253fSmrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
21015b16253fSmrg     fi
21025b16253fSmrg   fi
21035b16253fSmrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
21045b16253fSmrg   $RM conftest*
21055b16253fSmrg   # SGI C++ compiler will create directory out/ii_files/ for
21065b16253fSmrg   # template instantiation
21075b16253fSmrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
21085b16253fSmrg   $RM out/* && rmdir out
21095b16253fSmrg   cd ..
21105b16253fSmrg   $RM -r conftest
21115b16253fSmrg   $RM conftest*
21125b16253fSmrg])
21135b16253fSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
21145b16253fSmrg	[Does compiler simultaneously support -c and -o options?])
21155b16253fSmrg])# _LT_COMPILER_C_O
21165b16253fSmrg
21175b16253fSmrg
21185b16253fSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
21195b16253fSmrg# ----------------------------------
21205b16253fSmrg# Check to see if we can do hard links to lock some files if needed
21215b16253fSmrgm4_defun([_LT_COMPILER_FILE_LOCKS],
21225b16253fSmrg[m4_require([_LT_ENABLE_LOCK])dnl
21235b16253fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
21245b16253fSmrg_LT_COMPILER_C_O([$1])
21255b16253fSmrg
21265b16253fSmrghard_links=nottested
21275b16253fSmrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
21285b16253fSmrg  # do not overwrite the value of need_locks provided by the user
21295b16253fSmrg  AC_MSG_CHECKING([if we can lock with hard links])
21305b16253fSmrg  hard_links=yes
21315b16253fSmrg  $RM conftest*
21325b16253fSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
21335b16253fSmrg  touch conftest.a
21345b16253fSmrg  ln conftest.a conftest.b 2>&5 || hard_links=no
21355b16253fSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
21365b16253fSmrg  AC_MSG_RESULT([$hard_links])
21375b16253fSmrg  if test no = "$hard_links"; then
21385b16253fSmrg    AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
21395b16253fSmrg    need_locks=warn
21405b16253fSmrg  fi
21415b16253fSmrgelse
21425b16253fSmrg  need_locks=no
21435b16253fSmrgfi
21445b16253fSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
21455b16253fSmrg])# _LT_COMPILER_FILE_LOCKS
21465b16253fSmrg
21475b16253fSmrg
21485b16253fSmrg# _LT_CHECK_OBJDIR
21495b16253fSmrg# ----------------
21505b16253fSmrgm4_defun([_LT_CHECK_OBJDIR],
21515b16253fSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
21525b16253fSmrg[rm -f .libs 2>/dev/null
21535b16253fSmrgmkdir .libs 2>/dev/null
21545b16253fSmrgif test -d .libs; then
21555b16253fSmrg  lt_cv_objdir=.libs
21565b16253fSmrgelse
21575b16253fSmrg  # MS-DOS does not allow filenames that begin with a dot.
21585b16253fSmrg  lt_cv_objdir=_libs
21595b16253fSmrgfi
21605b16253fSmrgrmdir .libs 2>/dev/null])
21615b16253fSmrgobjdir=$lt_cv_objdir
21625b16253fSmrg_LT_DECL([], [objdir], [0],
21635b16253fSmrg         [The name of the directory that contains temporary libtool files])dnl
21645b16253fSmrgm4_pattern_allow([LT_OBJDIR])dnl
21655b16253fSmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
21665b16253fSmrg  [Define to the sub-directory where libtool stores uninstalled libraries.])
21675b16253fSmrg])# _LT_CHECK_OBJDIR
21685b16253fSmrg
21695b16253fSmrg
21705b16253fSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
21715b16253fSmrg# --------------------------------------
21725b16253fSmrg# Check hardcoding attributes.
21735b16253fSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
21745b16253fSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
21755b16253fSmrg_LT_TAGVAR(hardcode_action, $1)=
21765b16253fSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
21775b16253fSmrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
21785b16253fSmrg   test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
21795b16253fSmrg
21805b16253fSmrg  # We can hardcode non-existent directories.
21815b16253fSmrg  if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
21825b16253fSmrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
21835b16253fSmrg     # have to relink, otherwise we might link with an installed library
21845b16253fSmrg     # when we should be linking with a yet-to-be-installed one
21855b16253fSmrg     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
21865b16253fSmrg     test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
21875b16253fSmrg    # Linking always hardcodes the temporary library directory.
21885b16253fSmrg    _LT_TAGVAR(hardcode_action, $1)=relink
21895b16253fSmrg  else
21905b16253fSmrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
21915b16253fSmrg    _LT_TAGVAR(hardcode_action, $1)=immediate
21925b16253fSmrg  fi
21935b16253fSmrgelse
21945b16253fSmrg  # We cannot hardcode anything, or else we can only hardcode existing
21955b16253fSmrg  # directories.
21965b16253fSmrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
21975b16253fSmrgfi
21985b16253fSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
21995b16253fSmrg
22005b16253fSmrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
22015b16253fSmrg   test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
22025b16253fSmrg  # Fast installation is not supported
22035b16253fSmrg  enable_fast_install=no
22045b16253fSmrgelif test yes = "$shlibpath_overrides_runpath" ||
22055b16253fSmrg     test no = "$enable_shared"; then
22065b16253fSmrg  # Fast installation is not necessary
22075b16253fSmrg  enable_fast_install=needless
22085b16253fSmrgfi
22095b16253fSmrg_LT_TAGDECL([], [hardcode_action], [0],
22105b16253fSmrg    [How to hardcode a shared library path into an executable])
22115b16253fSmrg])# _LT_LINKER_HARDCODE_LIBPATH
22125b16253fSmrg
22135b16253fSmrg
22145b16253fSmrg# _LT_CMD_STRIPLIB
22155b16253fSmrg# ----------------
22165b16253fSmrgm4_defun([_LT_CMD_STRIPLIB],
22175b16253fSmrg[m4_require([_LT_DECL_EGREP])
22185b16253fSmrgstriplib=
22195b16253fSmrgold_striplib=
22205b16253fSmrgAC_MSG_CHECKING([whether stripping libraries is possible])
22215b16253fSmrgif test -z "$STRIP"; then
22225b16253fSmrg  AC_MSG_RESULT([no])
22235b16253fSmrgelse
22245b16253fSmrg  if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
22255b16253fSmrg    old_striplib="$STRIP --strip-debug"
22265b16253fSmrg    striplib="$STRIP --strip-unneeded"
22275b16253fSmrg    AC_MSG_RESULT([yes])
22285b16253fSmrg  else
22295b16253fSmrg    case $host_os in
22305b16253fSmrg    darwin*)
22315b16253fSmrg      # FIXME - insert some real tests, host_os isn't really good enough
22325b16253fSmrg      striplib="$STRIP -x"
22335b16253fSmrg      old_striplib="$STRIP -S"
22345b16253fSmrg      AC_MSG_RESULT([yes])
22355b16253fSmrg      ;;
22365b16253fSmrg    freebsd*)
22375b16253fSmrg      if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
22385b16253fSmrg        old_striplib="$STRIP --strip-debug"
22395b16253fSmrg        striplib="$STRIP --strip-unneeded"
22405b16253fSmrg        AC_MSG_RESULT([yes])
22415b16253fSmrg      else
22425b16253fSmrg        AC_MSG_RESULT([no])
22435b16253fSmrg      fi
22445b16253fSmrg      ;;
22455b16253fSmrg    *)
22465b16253fSmrg      AC_MSG_RESULT([no])
22475b16253fSmrg      ;;
22485b16253fSmrg    esac
22495b16253fSmrg  fi
22505b16253fSmrgfi
22515b16253fSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
22525b16253fSmrg_LT_DECL([], [striplib], [1])
22535b16253fSmrg])# _LT_CMD_STRIPLIB
22545b16253fSmrg
22555b16253fSmrg
22565b16253fSmrg# _LT_PREPARE_MUNGE_PATH_LIST
22575b16253fSmrg# ---------------------------
22585b16253fSmrg# Make sure func_munge_path_list() is defined correctly.
22595b16253fSmrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
22605b16253fSmrg[[# func_munge_path_list VARIABLE PATH
22615b16253fSmrg# -----------------------------------
22625b16253fSmrg# VARIABLE is name of variable containing _space_ separated list of
22635b16253fSmrg# directories to be munged by the contents of PATH, which is string
22645b16253fSmrg# having a format:
22655b16253fSmrg# "DIR[:DIR]:"
22665b16253fSmrg#       string "DIR[ DIR]" will be prepended to VARIABLE
22675b16253fSmrg# ":DIR[:DIR]"
22685b16253fSmrg#       string "DIR[ DIR]" will be appended to VARIABLE
22695b16253fSmrg# "DIRP[:DIRP]::[DIRA:]DIRA"
22705b16253fSmrg#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
22715b16253fSmrg#       "DIRA[ DIRA]" will be appended to VARIABLE
22725b16253fSmrg# "DIR[:DIR]"
22735b16253fSmrg#       VARIABLE will be replaced by "DIR[ DIR]"
22745b16253fSmrgfunc_munge_path_list ()
22755b16253fSmrg{
22765b16253fSmrg    case x@S|@2 in
22775b16253fSmrg    x)
22785b16253fSmrg        ;;
22795b16253fSmrg    *:)
22805b16253fSmrg        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
22815b16253fSmrg        ;;
22825b16253fSmrg    x:*)
22835b16253fSmrg        eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
22845b16253fSmrg        ;;
22855b16253fSmrg    *::*)
22865b16253fSmrg        eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
22875b16253fSmrg        eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
22885b16253fSmrg        ;;
22895b16253fSmrg    *)
22905b16253fSmrg        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
22915b16253fSmrg        ;;
22925b16253fSmrg    esac
22935b16253fSmrg}
22945b16253fSmrg]])# _LT_PREPARE_PATH_LIST
22955b16253fSmrg
22965b16253fSmrg
22975b16253fSmrg# _LT_SYS_DYNAMIC_LINKER([TAG])
22985b16253fSmrg# -----------------------------
22995b16253fSmrg# PORTME Fill in your ld.so characteristics
23005b16253fSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
23015b16253fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
23025b16253fSmrgm4_require([_LT_DECL_EGREP])dnl
23035b16253fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
23045b16253fSmrgm4_require([_LT_DECL_OBJDUMP])dnl
23055b16253fSmrgm4_require([_LT_DECL_SED])dnl
23065b16253fSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
23075b16253fSmrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
23085b16253fSmrgAC_MSG_CHECKING([dynamic linker characteristics])
23095b16253fSmrgm4_if([$1],
23105b16253fSmrg	[], [
23115b16253fSmrgif test yes = "$GCC"; then
23125b16253fSmrg  case $host_os in
23135b16253fSmrg    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
23145b16253fSmrg    *) lt_awk_arg='/^libraries:/' ;;
23155b16253fSmrg  esac
23165b16253fSmrg  case $host_os in
23175b16253fSmrg    mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
23185b16253fSmrg    *) lt_sed_strip_eq='s|=/|/|g' ;;
23195b16253fSmrg  esac
23205b16253fSmrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
23215b16253fSmrg  case $lt_search_path_spec in
23225b16253fSmrg  *\;*)
23235b16253fSmrg    # if the path contains ";" then we assume it to be the separator
23245b16253fSmrg    # otherwise default to the standard path separator (i.e. ":") - it is
23255b16253fSmrg    # assumed that no part of a normal pathname contains ";" but that should
23265b16253fSmrg    # okay in the real world where ";" in dirpaths is itself problematic.
23275b16253fSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
23285b16253fSmrg    ;;
23295b16253fSmrg  *)
23305b16253fSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
23315b16253fSmrg    ;;
23325b16253fSmrg  esac
23335b16253fSmrg  # Ok, now we have the path, separated by spaces, we can step through it
23345b16253fSmrg  # and add multilib dir if necessary...
23355b16253fSmrg  lt_tmp_lt_search_path_spec=
23365b16253fSmrg  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
23375b16253fSmrg  # ...but if some path component already ends with the multilib dir we assume
23385b16253fSmrg  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
23395b16253fSmrg  case "$lt_multi_os_dir; $lt_search_path_spec " in
23405b16253fSmrg  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
23415b16253fSmrg    lt_multi_os_dir=
23425b16253fSmrg    ;;
23435b16253fSmrg  esac
23445b16253fSmrg  for lt_sys_path in $lt_search_path_spec; do
23455b16253fSmrg    if test -d "$lt_sys_path$lt_multi_os_dir"; then
23465b16253fSmrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
23475b16253fSmrg    elif test -n "$lt_multi_os_dir"; then
23485b16253fSmrg      test -d "$lt_sys_path" && \
23495b16253fSmrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
23505b16253fSmrg    fi
23515b16253fSmrg  done
23525b16253fSmrg  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
23535b16253fSmrgBEGIN {RS = " "; FS = "/|\n";} {
23545b16253fSmrg  lt_foo = "";
23555b16253fSmrg  lt_count = 0;
23565b16253fSmrg  for (lt_i = NF; lt_i > 0; lt_i--) {
23575b16253fSmrg    if ($lt_i != "" && $lt_i != ".") {
23585b16253fSmrg      if ($lt_i == "..") {
23595b16253fSmrg        lt_count++;
23605b16253fSmrg      } else {
23615b16253fSmrg        if (lt_count == 0) {
23625b16253fSmrg          lt_foo = "/" $lt_i lt_foo;
23635b16253fSmrg        } else {
23645b16253fSmrg          lt_count--;
23655b16253fSmrg        }
23665b16253fSmrg      }
23675b16253fSmrg    }
23685b16253fSmrg  }
23695b16253fSmrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
23705b16253fSmrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
23715b16253fSmrg}'`
23725b16253fSmrg  # AWK program above erroneously prepends '/' to C:/dos/paths
23735b16253fSmrg  # for these hosts.
23745b16253fSmrg  case $host_os in
23755b16253fSmrg    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
23765b16253fSmrg      $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
23775b16253fSmrg  esac
23785b16253fSmrg  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
23795b16253fSmrgelse
23805b16253fSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
23815b16253fSmrgfi])
23825b16253fSmrglibrary_names_spec=
23835b16253fSmrglibname_spec='lib$name'
23845b16253fSmrgsoname_spec=
23855b16253fSmrgshrext_cmds=.so
23865b16253fSmrgpostinstall_cmds=
23875b16253fSmrgpostuninstall_cmds=
23885b16253fSmrgfinish_cmds=
23895b16253fSmrgfinish_eval=
23905b16253fSmrgshlibpath_var=
23915b16253fSmrgshlibpath_overrides_runpath=unknown
23925b16253fSmrgversion_type=none
23935b16253fSmrgdynamic_linker="$host_os ld.so"
23945b16253fSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
23955b16253fSmrgneed_lib_prefix=unknown
23965b16253fSmrghardcode_into_libs=no
23975b16253fSmrg
23985b16253fSmrg# when you set need_version to no, make sure it does not cause -set_version
23995b16253fSmrg# flags to be left without arguments
24005b16253fSmrgneed_version=unknown
24015b16253fSmrg
24025b16253fSmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH],
24035b16253fSmrg[User-defined run-time library search path.])
24045b16253fSmrg
24055b16253fSmrgcase $host_os in
24065b16253fSmrgaix3*)
24075b16253fSmrg  version_type=linux # correct to gnu/linux during the next big refactor
24085b16253fSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
24095b16253fSmrg  shlibpath_var=LIBPATH
24105b16253fSmrg
24115b16253fSmrg  # AIX 3 has no versioning support, so we append a major version to the name.
24125b16253fSmrg  soname_spec='$libname$release$shared_ext$major'
24135b16253fSmrg  ;;
24145b16253fSmrg
24155b16253fSmrgaix[[4-9]]*)
24165b16253fSmrg  version_type=linux # correct to gnu/linux during the next big refactor
24175b16253fSmrg  need_lib_prefix=no
24185b16253fSmrg  need_version=no
24195b16253fSmrg  hardcode_into_libs=yes
24205b16253fSmrg  if test ia64 = "$host_cpu"; then
24215b16253fSmrg    # AIX 5 supports IA64
24225b16253fSmrg    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
24235b16253fSmrg    shlibpath_var=LD_LIBRARY_PATH
24245b16253fSmrg  else
24255b16253fSmrg    # With GCC up to 2.95.x, collect2 would create an import file
24265b16253fSmrg    # for dependence libraries.  The import file would start with
24275b16253fSmrg    # the line '#! .'.  This would cause the generated library to
24285b16253fSmrg    # depend on '.', always an invalid library.  This was fixed in
24295b16253fSmrg    # development snapshots of GCC prior to 3.0.
24305b16253fSmrg    case $host_os in
24315b16253fSmrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
24325b16253fSmrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
24335b16253fSmrg	   echo ' yes '
24345b16253fSmrg	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
24355b16253fSmrg	:
24365b16253fSmrg      else
24375b16253fSmrg	can_build_shared=no
24385b16253fSmrg      fi
24395b16253fSmrg      ;;
24405b16253fSmrg    esac
24415b16253fSmrg    # Using Import Files as archive members, it is possible to support
24425b16253fSmrg    # filename-based versioning of shared library archives on AIX. While
24435b16253fSmrg    # this would work for both with and without runtime linking, it will
24445b16253fSmrg    # prevent static linking of such archives. So we do filename-based
24455b16253fSmrg    # shared library versioning with .so extension only, which is used
24465b16253fSmrg    # when both runtime linking and shared linking is enabled.
24475b16253fSmrg    # Unfortunately, runtime linking may impact performance, so we do
24485b16253fSmrg    # not want this to be the default eventually. Also, we use the
24495b16253fSmrg    # versioned .so libs for executables only if there is the -brtl
24505b16253fSmrg    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
24515b16253fSmrg    # To allow for filename-based versioning support, we need to create
24525b16253fSmrg    # libNAME.so.V as an archive file, containing:
24535b16253fSmrg    # *) an Import File, referring to the versioned filename of the
24545b16253fSmrg    #    archive as well as the shared archive member, telling the
24555b16253fSmrg    #    bitwidth (32 or 64) of that shared object, and providing the
24565b16253fSmrg    #    list of exported symbols of that shared object, eventually
24575b16253fSmrg    #    decorated with the 'weak' keyword
24585b16253fSmrg    # *) the shared object with the F_LOADONLY flag set, to really avoid
24595b16253fSmrg    #    it being seen by the linker.
24605b16253fSmrg    # At run time we better use the real file rather than another symlink,
24615b16253fSmrg    # but for link time we create the symlink libNAME.so -> libNAME.so.V
24625b16253fSmrg
24635b16253fSmrg    case $with_aix_soname,$aix_use_runtimelinking in
24645b16253fSmrg    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
24655b16253fSmrg    # soname into executable. Probably we can add versioning support to
24665b16253fSmrg    # collect2, so additional links can be useful in future.
24675b16253fSmrg    aix,yes) # traditional libtool
24685b16253fSmrg      dynamic_linker='AIX unversionable lib.so'
24695b16253fSmrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
24705b16253fSmrg      # instead of lib<name>.a to let people know that these are not
24715b16253fSmrg      # typical AIX shared libraries.
24725b16253fSmrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
24735b16253fSmrg      ;;
24745b16253fSmrg    aix,no) # traditional AIX only
24755b16253fSmrg      dynamic_linker='AIX lib.a[(]lib.so.V[)]'
24765b16253fSmrg      # We preserve .a as extension for shared libraries through AIX4.2
24775b16253fSmrg      # and later when we are not doing run time linking.
24785b16253fSmrg      library_names_spec='$libname$release.a $libname.a'
24795b16253fSmrg      soname_spec='$libname$release$shared_ext$major'
24805b16253fSmrg      ;;
24815b16253fSmrg    svr4,*) # full svr4 only
24825b16253fSmrg      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
24835b16253fSmrg      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
24845b16253fSmrg      # We do not specify a path in Import Files, so LIBPATH fires.
24855b16253fSmrg      shlibpath_overrides_runpath=yes
24865b16253fSmrg      ;;
24875b16253fSmrg    *,yes) # both, prefer svr4
24885b16253fSmrg      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
24895b16253fSmrg      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
24905b16253fSmrg      # unpreferred sharedlib libNAME.a needs extra handling
24915b16253fSmrg      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"'
24925b16253fSmrg      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"'
24935b16253fSmrg      # We do not specify a path in Import Files, so LIBPATH fires.
24945b16253fSmrg      shlibpath_overrides_runpath=yes
24955b16253fSmrg      ;;
24965b16253fSmrg    *,no) # both, prefer aix
24975b16253fSmrg      dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
24985b16253fSmrg      library_names_spec='$libname$release.a $libname.a'
24995b16253fSmrg      soname_spec='$libname$release$shared_ext$major'
25005b16253fSmrg      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
25015b16253fSmrg      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)'
25025b16253fSmrg      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"'
25035b16253fSmrg      ;;
25045b16253fSmrg    esac
25055b16253fSmrg    shlibpath_var=LIBPATH
25065b16253fSmrg  fi
25075b16253fSmrg  ;;
25085b16253fSmrg
25095b16253fSmrgamigaos*)
25105b16253fSmrg  case $host_cpu in
25115b16253fSmrg  powerpc)
25125b16253fSmrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
25135b16253fSmrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
25145b16253fSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
25155b16253fSmrg    ;;
25165b16253fSmrg  m68k)
25175b16253fSmrg    library_names_spec='$libname.ixlibrary $libname.a'
25185b16253fSmrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
25195b16253fSmrg    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'
25205b16253fSmrg    ;;
25215b16253fSmrg  esac
25225b16253fSmrg  ;;
25235b16253fSmrg
25245b16253fSmrgbeos*)
25255b16253fSmrg  library_names_spec='$libname$shared_ext'
25265b16253fSmrg  dynamic_linker="$host_os ld.so"
25275b16253fSmrg  shlibpath_var=LIBRARY_PATH
25285b16253fSmrg  ;;
25295b16253fSmrg
25305b16253fSmrgbsdi[[45]]*)
25315b16253fSmrg  version_type=linux # correct to gnu/linux during the next big refactor
25325b16253fSmrg  need_version=no
25335b16253fSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
25345b16253fSmrg  soname_spec='$libname$release$shared_ext$major'
25355b16253fSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
25365b16253fSmrg  shlibpath_var=LD_LIBRARY_PATH
25375b16253fSmrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
25385b16253fSmrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
25395b16253fSmrg  # the default ld.so.conf also contains /usr/contrib/lib and
25405b16253fSmrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
25415b16253fSmrg  # libtool to hard-code these into programs
25425b16253fSmrg  ;;
25435b16253fSmrg
25445b16253fSmrgcygwin* | mingw* | pw32* | cegcc*)
25455b16253fSmrg  version_type=windows
25465b16253fSmrg  shrext_cmds=.dll
25475b16253fSmrg  need_version=no
25485b16253fSmrg  need_lib_prefix=no
25495b16253fSmrg
25505b16253fSmrg  case $GCC,$cc_basename in
25515b16253fSmrg  yes,*)
25525b16253fSmrg    # gcc
25535b16253fSmrg    library_names_spec='$libname.dll.a'
25545b16253fSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
25555b16253fSmrg    postinstall_cmds='base_file=`basename \$file`~
25565b16253fSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
25575b16253fSmrg      dldir=$destdir/`dirname \$dlpath`~
25585b16253fSmrg      test -d \$dldir || mkdir -p \$dldir~
25595b16253fSmrg      $install_prog $dir/$dlname \$dldir/$dlname~
25605b16253fSmrg      chmod a+x \$dldir/$dlname~
25615b16253fSmrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
25625b16253fSmrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
25635b16253fSmrg      fi'
25645b16253fSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
25655b16253fSmrg      dlpath=$dir/\$dldll~
25665b16253fSmrg       $RM \$dlpath'
25675b16253fSmrg    shlibpath_overrides_runpath=yes
25685b16253fSmrg
25695b16253fSmrg    case $host_os in
25705b16253fSmrg    cygwin*)
25715b16253fSmrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
25725b16253fSmrg      soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
25735b16253fSmrgm4_if([$1], [],[
25745b16253fSmrg      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
25755b16253fSmrg      ;;
25765b16253fSmrg    mingw* | cegcc*)
25775b16253fSmrg      # MinGW DLLs use traditional 'lib' prefix
25785b16253fSmrg      soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
25795b16253fSmrg      ;;
25805b16253fSmrg    pw32*)
25815b16253fSmrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
25825b16253fSmrg      library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
25835b16253fSmrg      ;;
25845b16253fSmrg    esac
25855b16253fSmrg    dynamic_linker='Win32 ld.exe'
25865b16253fSmrg    ;;
25875b16253fSmrg
25885b16253fSmrg  *,cl* | *,icl*)
25895b16253fSmrg    # Native MSVC or ICC
25905b16253fSmrg    libname_spec='$name'
25915b16253fSmrg    soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
25925b16253fSmrg    library_names_spec='$libname.dll.lib'
25935b16253fSmrg
25945b16253fSmrg    case $build_os in
25955b16253fSmrg    mingw*)
25965b16253fSmrg      sys_lib_search_path_spec=
25975b16253fSmrg      lt_save_ifs=$IFS
25985b16253fSmrg      IFS=';'
25995b16253fSmrg      for lt_path in $LIB
26005b16253fSmrg      do
26015b16253fSmrg        IFS=$lt_save_ifs
26025b16253fSmrg        # Let DOS variable expansion print the short 8.3 style file name.
26035b16253fSmrg        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
26045b16253fSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
26055b16253fSmrg      done
26065b16253fSmrg      IFS=$lt_save_ifs
26075b16253fSmrg      # Convert to MSYS style.
26085b16253fSmrg      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
26095b16253fSmrg      ;;
26105b16253fSmrg    cygwin*)
26115b16253fSmrg      # Convert to unix form, then to dos form, then back to unix form
26125b16253fSmrg      # but this time dos style (no spaces!) so that the unix form looks
26135b16253fSmrg      # like /cygdrive/c/PROGRA~1:/cygdr...
26145b16253fSmrg      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
26155b16253fSmrg      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
26165b16253fSmrg      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
26175b16253fSmrg      ;;
26185b16253fSmrg    *)
26195b16253fSmrg      sys_lib_search_path_spec=$LIB
26205b16253fSmrg      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
26215b16253fSmrg        # It is most probably a Windows format PATH.
26225b16253fSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
26235b16253fSmrg      else
26245b16253fSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
26255b16253fSmrg      fi
26265b16253fSmrg      # FIXME: find the short name or the path components, as spaces are
26275b16253fSmrg      # common. (e.g. "Program Files" -> "PROGRA~1")
26285b16253fSmrg      ;;
26295b16253fSmrg    esac
26305b16253fSmrg
26315b16253fSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
26325b16253fSmrg    postinstall_cmds='base_file=`basename \$file`~
26335b16253fSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
26345b16253fSmrg      dldir=$destdir/`dirname \$dlpath`~
26355b16253fSmrg      test -d \$dldir || mkdir -p \$dldir~
26365b16253fSmrg      $install_prog $dir/$dlname \$dldir/$dlname'
26375b16253fSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
26385b16253fSmrg      dlpath=$dir/\$dldll~
26395b16253fSmrg       $RM \$dlpath'
26405b16253fSmrg    shlibpath_overrides_runpath=yes
26415b16253fSmrg    dynamic_linker='Win32 link.exe'
26425b16253fSmrg    ;;
26435b16253fSmrg
26445b16253fSmrg  *)
26455b16253fSmrg    # Assume MSVC and ICC wrapper
26465b16253fSmrg    library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
26475b16253fSmrg    dynamic_linker='Win32 ld.exe'
26485b16253fSmrg    ;;
26495b16253fSmrg  esac
26505b16253fSmrg  # FIXME: first we should search . and the directory the executable is in
26515b16253fSmrg  shlibpath_var=PATH
26525b16253fSmrg  ;;
26535b16253fSmrg
26545b16253fSmrgdarwin* | rhapsody*)
26555b16253fSmrg  dynamic_linker="$host_os dyld"
26565b16253fSmrg  version_type=darwin
26575b16253fSmrg  need_lib_prefix=no
26585b16253fSmrg  need_version=no
26595b16253fSmrg  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
26605b16253fSmrg  soname_spec='$libname$release$major$shared_ext'
26615b16253fSmrg  shlibpath_overrides_runpath=yes
26625b16253fSmrg  shlibpath_var=DYLD_LIBRARY_PATH
26635b16253fSmrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
26645b16253fSmrgm4_if([$1], [],[
26655b16253fSmrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
26665b16253fSmrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
26675b16253fSmrg  ;;
26685b16253fSmrg
26695b16253fSmrgdgux*)
26705b16253fSmrg  version_type=linux # correct to gnu/linux during the next big refactor
26715b16253fSmrg  need_lib_prefix=no
26725b16253fSmrg  need_version=no
26735b16253fSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
26745b16253fSmrg  soname_spec='$libname$release$shared_ext$major'
26755b16253fSmrg  shlibpath_var=LD_LIBRARY_PATH
26765b16253fSmrg  ;;
26775b16253fSmrg
26785b16253fSmrgfreebsd* | dragonfly* | midnightbsd*)
26795b16253fSmrg  # DragonFly does not have aout.  When/if they implement a new
26805b16253fSmrg  # versioning mechanism, adjust this.
26815b16253fSmrg  if test -x /usr/bin/objformat; then
26825b16253fSmrg    objformat=`/usr/bin/objformat`
26835b16253fSmrg  else
26845b16253fSmrg    case $host_os in
26855b16253fSmrg    freebsd[[23]].*) objformat=aout ;;
26865b16253fSmrg    *) objformat=elf ;;
26875b16253fSmrg    esac
26885b16253fSmrg  fi
26895b16253fSmrg  version_type=freebsd-$objformat
26905b16253fSmrg  case $version_type in
26915b16253fSmrg    freebsd-elf*)
26925b16253fSmrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
26935b16253fSmrg      soname_spec='$libname$release$shared_ext$major'
26945b16253fSmrg      need_version=no
26955b16253fSmrg      need_lib_prefix=no
26965b16253fSmrg      ;;
26975b16253fSmrg    freebsd-*)
26985b16253fSmrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
26995b16253fSmrg      need_version=yes
27005b16253fSmrg      ;;
27015b16253fSmrg  esac
27025b16253fSmrg  shlibpath_var=LD_LIBRARY_PATH
27035b16253fSmrg  case $host_os in
27045b16253fSmrg  freebsd2.*)
27055b16253fSmrg    shlibpath_overrides_runpath=yes
27065b16253fSmrg    ;;
27075b16253fSmrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
27085b16253fSmrg    shlibpath_overrides_runpath=yes
27095b16253fSmrg    hardcode_into_libs=yes
27105b16253fSmrg    ;;
27115b16253fSmrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
27125b16253fSmrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
27135b16253fSmrg    shlibpath_overrides_runpath=no
27145b16253fSmrg    hardcode_into_libs=yes
27155b16253fSmrg    ;;
27165b16253fSmrg  *) # from 4.6 on, and DragonFly
27175b16253fSmrg    shlibpath_overrides_runpath=yes
27185b16253fSmrg    hardcode_into_libs=yes
27195b16253fSmrg    ;;
27205b16253fSmrg  esac
27215b16253fSmrg  ;;
27225b16253fSmrg
27235b16253fSmrghaiku*)
27245b16253fSmrg  version_type=linux # correct to gnu/linux during the next big refactor
27255b16253fSmrg  need_lib_prefix=no
27265b16253fSmrg  need_version=no
27275b16253fSmrg  dynamic_linker="$host_os runtime_loader"
27285b16253fSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
27295b16253fSmrg  soname_spec='$libname$release$shared_ext$major'
27305b16253fSmrg  shlibpath_var=LIBRARY_PATH
27315b16253fSmrg  shlibpath_overrides_runpath=no
27325b16253fSmrg  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
27335b16253fSmrg  hardcode_into_libs=yes
27345b16253fSmrg  ;;
27355b16253fSmrg
27365b16253fSmrghpux9* | hpux10* | hpux11*)
27375b16253fSmrg  # Give a soname corresponding to the major version so that dld.sl refuses to
27385b16253fSmrg  # link against other versions.
27395b16253fSmrg  version_type=sunos
27405b16253fSmrg  need_lib_prefix=no
27415b16253fSmrg  need_version=no
27425b16253fSmrg  case $host_cpu in
27435b16253fSmrg  ia64*)
27445b16253fSmrg    shrext_cmds='.so'
27455b16253fSmrg    hardcode_into_libs=yes
27465b16253fSmrg    dynamic_linker="$host_os dld.so"
27475b16253fSmrg    shlibpath_var=LD_LIBRARY_PATH
27485b16253fSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
27495b16253fSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
27505b16253fSmrg    soname_spec='$libname$release$shared_ext$major'
27515b16253fSmrg    if test 32 = "$HPUX_IA64_MODE"; then
27525b16253fSmrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
27535b16253fSmrg      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
27545b16253fSmrg    else
27555b16253fSmrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
27565b16253fSmrg      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
27575b16253fSmrg    fi
27585b16253fSmrg    ;;
27595b16253fSmrg  hppa*64*)
27605b16253fSmrg    shrext_cmds='.sl'
27615b16253fSmrg    hardcode_into_libs=yes
27625b16253fSmrg    dynamic_linker="$host_os dld.sl"
27635b16253fSmrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
27645b16253fSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
27655b16253fSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
27665b16253fSmrg    soname_spec='$libname$release$shared_ext$major'
27675b16253fSmrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
27685b16253fSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
27695b16253fSmrg    ;;
27705b16253fSmrg  *)
27715b16253fSmrg    shrext_cmds='.sl'
27725b16253fSmrg    dynamic_linker="$host_os dld.sl"
27735b16253fSmrg    shlibpath_var=SHLIB_PATH
27745b16253fSmrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
27755b16253fSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
27765b16253fSmrg    soname_spec='$libname$release$shared_ext$major'
27775b16253fSmrg    ;;
27785b16253fSmrg  esac
27795b16253fSmrg  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
27805b16253fSmrg  postinstall_cmds='chmod 555 $lib'
27815b16253fSmrg  # or fails outright, so override atomically:
27825b16253fSmrg  install_override_mode=555
27835b16253fSmrg  ;;
27845b16253fSmrg
27855b16253fSmrginterix[[3-9]]*)
27865b16253fSmrg  version_type=linux # correct to gnu/linux during the next big refactor
27875b16253fSmrg  need_lib_prefix=no
27885b16253fSmrg  need_version=no
27895b16253fSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
27905b16253fSmrg  soname_spec='$libname$release$shared_ext$major'
27915b16253fSmrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
27925b16253fSmrg  shlibpath_var=LD_LIBRARY_PATH
27935b16253fSmrg  shlibpath_overrides_runpath=no
27945b16253fSmrg  hardcode_into_libs=yes
27955b16253fSmrg  ;;
27965b16253fSmrg
27975b16253fSmrgirix5* | irix6* | nonstopux*)
27985b16253fSmrg  case $host_os in
27995b16253fSmrg    nonstopux*) version_type=nonstopux ;;
28005b16253fSmrg    *)
28015b16253fSmrg	if test yes = "$lt_cv_prog_gnu_ld"; then
28025b16253fSmrg		version_type=linux # correct to gnu/linux during the next big refactor
28035b16253fSmrg	else
28045b16253fSmrg		version_type=irix
28055b16253fSmrg	fi ;;
28065b16253fSmrg  esac
28075b16253fSmrg  need_lib_prefix=no
28085b16253fSmrg  need_version=no
28095b16253fSmrg  soname_spec='$libname$release$shared_ext$major'
28105b16253fSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
28115b16253fSmrg  case $host_os in
28125b16253fSmrg  irix5* | nonstopux*)
28135b16253fSmrg    libsuff= shlibsuff=
28145b16253fSmrg    ;;
28155b16253fSmrg  *)
28165b16253fSmrg    case $LD in # libtool.m4 will add one of these switches to LD
28175b16253fSmrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
28185b16253fSmrg      libsuff= shlibsuff= libmagic=32-bit;;
28195b16253fSmrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
28205b16253fSmrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
28215b16253fSmrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
28225b16253fSmrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
28235b16253fSmrg    *) libsuff= shlibsuff= libmagic=never-match;;
28245b16253fSmrg    esac
28255b16253fSmrg    ;;
28265b16253fSmrg  esac
28275b16253fSmrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
28285b16253fSmrg  shlibpath_overrides_runpath=no
28295b16253fSmrg  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
28305b16253fSmrg  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
28315b16253fSmrg  hardcode_into_libs=yes
28325b16253fSmrg  ;;
28335b16253fSmrg
28345b16253fSmrg# No shared lib support for Linux oldld, aout, or coff.
28355b16253fSmrglinux*oldld* | linux*aout* | linux*coff*)
28365b16253fSmrg  dynamic_linker=no
28375b16253fSmrg  ;;
28385b16253fSmrg
28395b16253fSmrglinux*android*)
28405b16253fSmrg  version_type=none # Android doesn't support versioned libraries.
28415b16253fSmrg  need_lib_prefix=no
28425b16253fSmrg  need_version=no
28435b16253fSmrg  library_names_spec='$libname$release$shared_ext'
28445b16253fSmrg  soname_spec='$libname$release$shared_ext'
28455b16253fSmrg  finish_cmds=
28465b16253fSmrg  shlibpath_var=LD_LIBRARY_PATH
28475b16253fSmrg  shlibpath_overrides_runpath=yes
28485b16253fSmrg
28495b16253fSmrg  # This implies no fast_install, which is unacceptable.
28505b16253fSmrg  # Some rework will be needed to allow for fast_install
28515b16253fSmrg  # before this can be enabled.
28525b16253fSmrg  hardcode_into_libs=yes
28535b16253fSmrg
28545b16253fSmrg  dynamic_linker='Android linker'
28555b16253fSmrg  # Don't embed -rpath directories since the linker doesn't support them.
28565b16253fSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
28575b16253fSmrg  ;;
28585b16253fSmrg
28595b16253fSmrg# This must be glibc/ELF.
28605b16253fSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
28615b16253fSmrg  version_type=linux # correct to gnu/linux during the next big refactor
28625b16253fSmrg  need_lib_prefix=no
28635b16253fSmrg  need_version=no
28645b16253fSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
28655b16253fSmrg  soname_spec='$libname$release$shared_ext$major'
28665b16253fSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
28675b16253fSmrg  shlibpath_var=LD_LIBRARY_PATH
28685b16253fSmrg  shlibpath_overrides_runpath=no
28695b16253fSmrg
28705b16253fSmrg  # Some binutils ld are patched to set DT_RUNPATH
28715b16253fSmrg  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
28725b16253fSmrg    [lt_cv_shlibpath_overrides_runpath=no
28735b16253fSmrg    save_LDFLAGS=$LDFLAGS
28745b16253fSmrg    save_libdir=$libdir
28755b16253fSmrg    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
28765b16253fSmrg	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
28775b16253fSmrg    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
28785b16253fSmrg      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
28795b16253fSmrg	 [lt_cv_shlibpath_overrides_runpath=yes])])
28805b16253fSmrg    LDFLAGS=$save_LDFLAGS
28815b16253fSmrg    libdir=$save_libdir
28825b16253fSmrg    ])
28835b16253fSmrg  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
28845b16253fSmrg
28855b16253fSmrg  # This implies no fast_install, which is unacceptable.
28865b16253fSmrg  # Some rework will be needed to allow for fast_install
28875b16253fSmrg  # before this can be enabled.
28885b16253fSmrg  hardcode_into_libs=yes
28895b16253fSmrg
28905b16253fSmrg  # Ideally, we could use ldconfig to report *all* directores which are
28915b16253fSmrg  # searched for libraries, however this is still not possible.  Aside from not
28925b16253fSmrg  # being certain /sbin/ldconfig is available, command
28935b16253fSmrg  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
28945b16253fSmrg  # even though it is searched at run-time.  Try to do the best guess by
28955b16253fSmrg  # appending ld.so.conf contents (and includes) to the search path.
28965b16253fSmrg  if test -f /etc/ld.so.conf; then
28975b16253fSmrg    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' ' '`
28985b16253fSmrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
28995b16253fSmrg  fi
29005b16253fSmrg
29015b16253fSmrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
29025b16253fSmrg  # powerpc, because MkLinux only supported shared libraries with the
29035b16253fSmrg  # GNU dynamic linker.  Since this was broken with cross compilers,
29045b16253fSmrg  # most powerpc-linux boxes support dynamic linking these days and
29055b16253fSmrg  # people can always --disable-shared, the test was removed, and we
29065b16253fSmrg  # assume the GNU/Linux dynamic linker is in use.
29075b16253fSmrg  dynamic_linker='GNU/Linux ld.so'
29085b16253fSmrg  ;;
29095b16253fSmrg
29105b16253fSmrgnetbsd*)
29115b16253fSmrg  version_type=sunos
29125b16253fSmrg  need_lib_prefix=no
29135b16253fSmrg  need_version=no
29145b16253fSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
29155b16253fSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
29165b16253fSmrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
29175b16253fSmrg    dynamic_linker='NetBSD (a.out) ld.so'
29185b16253fSmrg  else
29195b16253fSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
29205b16253fSmrg    soname_spec='$libname$release$shared_ext$major'
29215b16253fSmrg    dynamic_linker='NetBSD ld.elf_so'
29225b16253fSmrg  fi
29235b16253fSmrg  shlibpath_var=LD_LIBRARY_PATH
29245b16253fSmrg  shlibpath_overrides_runpath=yes
29255b16253fSmrg  hardcode_into_libs=yes
29265b16253fSmrg  ;;
29275b16253fSmrg
29285b16253fSmrgnewsos6)
29295b16253fSmrg  version_type=linux # correct to gnu/linux during the next big refactor
29305b16253fSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
29315b16253fSmrg  shlibpath_var=LD_LIBRARY_PATH
29325b16253fSmrg  shlibpath_overrides_runpath=yes
29335b16253fSmrg  ;;
29345b16253fSmrg
29355b16253fSmrg*nto* | *qnx*)
29365b16253fSmrg  version_type=qnx
29375b16253fSmrg  need_lib_prefix=no
29385b16253fSmrg  need_version=no
29395b16253fSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
29405b16253fSmrg  soname_spec='$libname$release$shared_ext$major'
29415b16253fSmrg  shlibpath_var=LD_LIBRARY_PATH
29425b16253fSmrg  shlibpath_overrides_runpath=no
29435b16253fSmrg  hardcode_into_libs=yes
29445b16253fSmrg  dynamic_linker='ldqnx.so'
29455b16253fSmrg  ;;
29465b16253fSmrg
29475b16253fSmrgopenbsd* | bitrig*)
29485b16253fSmrg  version_type=sunos
29495b16253fSmrg  sys_lib_dlsearch_path_spec=/usr/lib
29505b16253fSmrg  need_lib_prefix=no
29515b16253fSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
29525b16253fSmrg    need_version=no
29535b16253fSmrg  else
29545b16253fSmrg    need_version=yes
29555b16253fSmrg  fi
29565b16253fSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
29575b16253fSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
29585b16253fSmrg  shlibpath_var=LD_LIBRARY_PATH
29595b16253fSmrg  shlibpath_overrides_runpath=yes
29605b16253fSmrg  ;;
29615b16253fSmrg
29625b16253fSmrgos2*)
29635b16253fSmrg  libname_spec='$name'
29645b16253fSmrg  version_type=windows
29655b16253fSmrg  shrext_cmds=.dll
29665b16253fSmrg  need_version=no
29675b16253fSmrg  need_lib_prefix=no
29685b16253fSmrg  # OS/2 can only load a DLL with a base name of 8 characters or less.
29695b16253fSmrg  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
29705b16253fSmrg    v=$($ECHO $release$versuffix | tr -d .-);
29715b16253fSmrg    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
29725b16253fSmrg    $ECHO $n$v`$shared_ext'
29735b16253fSmrg  library_names_spec='${libname}_dll.$libext'
29745b16253fSmrg  dynamic_linker='OS/2 ld.exe'
29755b16253fSmrg  shlibpath_var=BEGINLIBPATH
29765b16253fSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
29775b16253fSmrg  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
29785b16253fSmrg  postinstall_cmds='base_file=`basename \$file`~
29795b16253fSmrg    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
29805b16253fSmrg    dldir=$destdir/`dirname \$dlpath`~
29815b16253fSmrg    test -d \$dldir || mkdir -p \$dldir~
29825b16253fSmrg    $install_prog $dir/$dlname \$dldir/$dlname~
29835b16253fSmrg    chmod a+x \$dldir/$dlname~
29845b16253fSmrg    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
29855b16253fSmrg      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
29865b16253fSmrg    fi'
29875b16253fSmrg  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
29885b16253fSmrg    dlpath=$dir/\$dldll~
29895b16253fSmrg    $RM \$dlpath'
29905b16253fSmrg  ;;
29915b16253fSmrg
29925b16253fSmrgosf3* | osf4* | osf5*)
29935b16253fSmrg  version_type=osf
29945b16253fSmrg  need_lib_prefix=no
29955b16253fSmrg  need_version=no
29965b16253fSmrg  soname_spec='$libname$release$shared_ext$major'
29975b16253fSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
29985b16253fSmrg  shlibpath_var=LD_LIBRARY_PATH
29995b16253fSmrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
30005b16253fSmrg  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
30015b16253fSmrg  ;;
30025b16253fSmrg
30035b16253fSmrgrdos*)
30045b16253fSmrg  dynamic_linker=no
30055b16253fSmrg  ;;
30065b16253fSmrg
30075b16253fSmrgsolaris*)
30085b16253fSmrg  version_type=linux # correct to gnu/linux during the next big refactor
30095b16253fSmrg  need_lib_prefix=no
30105b16253fSmrg  need_version=no
30115b16253fSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
30125b16253fSmrg  soname_spec='$libname$release$shared_ext$major'
30135b16253fSmrg  shlibpath_var=LD_LIBRARY_PATH
30145b16253fSmrg  shlibpath_overrides_runpath=yes
30155b16253fSmrg  hardcode_into_libs=yes
30165b16253fSmrg  # ldd complains unless libraries are executable
30175b16253fSmrg  postinstall_cmds='chmod +x $lib'
30185b16253fSmrg  ;;
30195b16253fSmrg
30205b16253fSmrgsunos4*)
30215b16253fSmrg  version_type=sunos
30225b16253fSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
30235b16253fSmrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
30245b16253fSmrg  shlibpath_var=LD_LIBRARY_PATH
30255b16253fSmrg  shlibpath_overrides_runpath=yes
30265b16253fSmrg  if test yes = "$with_gnu_ld"; then
30275b16253fSmrg    need_lib_prefix=no
30285b16253fSmrg  fi
30295b16253fSmrg  need_version=yes
30305b16253fSmrg  ;;
30315b16253fSmrg
30325b16253fSmrgsysv4 | sysv4.3*)
30335b16253fSmrg  version_type=linux # correct to gnu/linux during the next big refactor
30345b16253fSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
30355b16253fSmrg  soname_spec='$libname$release$shared_ext$major'
30365b16253fSmrg  shlibpath_var=LD_LIBRARY_PATH
30375b16253fSmrg  case $host_vendor in
30385b16253fSmrg    sni)
30395b16253fSmrg      shlibpath_overrides_runpath=no
30405b16253fSmrg      need_lib_prefix=no
30415b16253fSmrg      runpath_var=LD_RUN_PATH
30425b16253fSmrg      ;;
30435b16253fSmrg    siemens)
30445b16253fSmrg      need_lib_prefix=no
30455b16253fSmrg      ;;
30465b16253fSmrg    motorola)
30475b16253fSmrg      need_lib_prefix=no
30485b16253fSmrg      need_version=no
30495b16253fSmrg      shlibpath_overrides_runpath=no
30505b16253fSmrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
30515b16253fSmrg      ;;
30525b16253fSmrg  esac
30535b16253fSmrg  ;;
30545b16253fSmrg
30555b16253fSmrgsysv4*MP*)
30565b16253fSmrg  if test -d /usr/nec; then
30575b16253fSmrg    version_type=linux # correct to gnu/linux during the next big refactor
30585b16253fSmrg    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
30595b16253fSmrg    soname_spec='$libname$shared_ext.$major'
30605b16253fSmrg    shlibpath_var=LD_LIBRARY_PATH
30615b16253fSmrg  fi
30625b16253fSmrg  ;;
30635b16253fSmrg
30645b16253fSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
30655b16253fSmrg  version_type=sco
30665b16253fSmrg  need_lib_prefix=no
30675b16253fSmrg  need_version=no
30685b16253fSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
30695b16253fSmrg  soname_spec='$libname$release$shared_ext$major'
30705b16253fSmrg  shlibpath_var=LD_LIBRARY_PATH
30715b16253fSmrg  shlibpath_overrides_runpath=yes
30725b16253fSmrg  hardcode_into_libs=yes
30735b16253fSmrg  if test yes = "$with_gnu_ld"; then
30745b16253fSmrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
30755b16253fSmrg  else
30765b16253fSmrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
30775b16253fSmrg    case $host_os in
30785b16253fSmrg      sco3.2v5*)
30795b16253fSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
30805b16253fSmrg	;;
30815b16253fSmrg    esac
30825b16253fSmrg  fi
30835b16253fSmrg  sys_lib_dlsearch_path_spec='/usr/lib'
30845b16253fSmrg  ;;
30855b16253fSmrg
30865b16253fSmrgtpf*)
30875b16253fSmrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
30885b16253fSmrg  version_type=linux # correct to gnu/linux during the next big refactor
30895b16253fSmrg  need_lib_prefix=no
30905b16253fSmrg  need_version=no
30915b16253fSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
30925b16253fSmrg  shlibpath_var=LD_LIBRARY_PATH
30935b16253fSmrg  shlibpath_overrides_runpath=no
30945b16253fSmrg  hardcode_into_libs=yes
30955b16253fSmrg  ;;
30965b16253fSmrg
30975b16253fSmrguts4*)
30985b16253fSmrg  version_type=linux # correct to gnu/linux during the next big refactor
30995b16253fSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
31005b16253fSmrg  soname_spec='$libname$release$shared_ext$major'
31015b16253fSmrg  shlibpath_var=LD_LIBRARY_PATH
31025b16253fSmrg  ;;
31035b16253fSmrg
31045b16253fSmrg*)
31055b16253fSmrg  dynamic_linker=no
31065b16253fSmrg  ;;
31075b16253fSmrgesac
31085b16253fSmrgAC_MSG_RESULT([$dynamic_linker])
31095b16253fSmrgtest no = "$dynamic_linker" && can_build_shared=no
31105b16253fSmrg
31115b16253fSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
31125b16253fSmrgif test yes = "$GCC"; then
31135b16253fSmrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
31145b16253fSmrgfi
31155b16253fSmrg
31165b16253fSmrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
31175b16253fSmrg  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
31185b16253fSmrgfi
31195b16253fSmrg
31205b16253fSmrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
31215b16253fSmrg  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
31225b16253fSmrgfi
31235b16253fSmrg
31245b16253fSmrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
31255b16253fSmrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
31265b16253fSmrg
31275b16253fSmrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
31285b16253fSmrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
31295b16253fSmrg
31305b16253fSmrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
31315b16253fSmrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
31325b16253fSmrg
31335b16253fSmrg_LT_DECL([], [variables_saved_for_relink], [1],
31345b16253fSmrg    [Variables whose values should be saved in libtool wrapper scripts and
31355b16253fSmrg    restored at link time])
31365b16253fSmrg_LT_DECL([], [need_lib_prefix], [0],
31375b16253fSmrg    [Do we need the "lib" prefix for modules?])
31385b16253fSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
31395b16253fSmrg_LT_DECL([], [version_type], [0], [Library versioning type])
31405b16253fSmrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
31415b16253fSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
31425b16253fSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
31435b16253fSmrg    [Is shlibpath searched before the hard-coded library search path?])
31445b16253fSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
31455b16253fSmrg_LT_DECL([], [library_names_spec], [1],
31465b16253fSmrg    [[List of archive names.  First name is the real one, the rest are links.
31475b16253fSmrg    The last name is the one that the linker finds with -lNAME]])
31485b16253fSmrg_LT_DECL([], [soname_spec], [1],
31495b16253fSmrg    [[The coded name of the library, if different from the real name]])
31505b16253fSmrg_LT_DECL([], [install_override_mode], [1],
31515b16253fSmrg    [Permission mode override for installation of shared libraries])
31525b16253fSmrg_LT_DECL([], [postinstall_cmds], [2],
31535b16253fSmrg    [Command to use after installation of a shared archive])
31545b16253fSmrg_LT_DECL([], [postuninstall_cmds], [2],
31555b16253fSmrg    [Command to use after uninstallation of a shared archive])
31565b16253fSmrg_LT_DECL([], [finish_cmds], [2],
31575b16253fSmrg    [Commands used to finish a libtool library installation in a directory])
31585b16253fSmrg_LT_DECL([], [finish_eval], [1],
31595b16253fSmrg    [[As "finish_cmds", except a single script fragment to be evaled but
31605b16253fSmrg    not shown]])
31615b16253fSmrg_LT_DECL([], [hardcode_into_libs], [0],
31625b16253fSmrg    [Whether we should hardcode library paths into libraries])
31635b16253fSmrg_LT_DECL([], [sys_lib_search_path_spec], [2],
31645b16253fSmrg    [Compile-time system search path for libraries])
31655b16253fSmrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
31665b16253fSmrg    [Detected run-time system search path for libraries])
31675b16253fSmrg_LT_DECL([], [configure_time_lt_sys_library_path], [2],
31685b16253fSmrg    [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
31695b16253fSmrg])# _LT_SYS_DYNAMIC_LINKER
31705b16253fSmrg
31715b16253fSmrg
31725b16253fSmrg# _LT_PATH_TOOL_PREFIX(TOOL)
31735b16253fSmrg# --------------------------
31745b16253fSmrg# find a file program that can recognize shared library
31755b16253fSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
31765b16253fSmrg[m4_require([_LT_DECL_EGREP])dnl
31775b16253fSmrgAC_MSG_CHECKING([for $1])
31785b16253fSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
31795b16253fSmrg[case $MAGIC_CMD in
31805b16253fSmrg[[\\/*] |  ?:[\\/]*])
31815b16253fSmrg  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
31825b16253fSmrg  ;;
31835b16253fSmrg*)
31845b16253fSmrg  lt_save_MAGIC_CMD=$MAGIC_CMD
31855b16253fSmrg  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
31865b16253fSmrgdnl $ac_dummy forces splitting on constant user-supplied paths.
31875b16253fSmrgdnl POSIX.2 word splitting is done only on the output of word expansions,
31885b16253fSmrgdnl not every word.  This closes a longstanding sh security hole.
31895b16253fSmrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
31905b16253fSmrg  for ac_dir in $ac_dummy; do
31915b16253fSmrg    IFS=$lt_save_ifs
31925b16253fSmrg    test -z "$ac_dir" && ac_dir=.
31935b16253fSmrg    if test -f "$ac_dir/$1"; then
31945b16253fSmrg      lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
31955b16253fSmrg      if test -n "$file_magic_test_file"; then
31965b16253fSmrg	case $deplibs_check_method in
31975b16253fSmrg	"file_magic "*)
31985b16253fSmrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
31995b16253fSmrg	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
32005b16253fSmrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
32015b16253fSmrg	    $EGREP "$file_magic_regex" > /dev/null; then
32025b16253fSmrg	    :
32035b16253fSmrg	  else
32045b16253fSmrg	    cat <<_LT_EOF 1>&2
32055b16253fSmrg
32065b16253fSmrg*** Warning: the command libtool uses to detect shared libraries,
32075b16253fSmrg*** $file_magic_cmd, produces output that libtool cannot recognize.
32085b16253fSmrg*** The result is that libtool may fail to recognize shared libraries
32095b16253fSmrg*** as such.  This will affect the creation of libtool libraries that
32105b16253fSmrg*** depend on shared libraries, but programs linked with such libtool
32115b16253fSmrg*** libraries will work regardless of this problem.  Nevertheless, you
32125b16253fSmrg*** may want to report the problem to your system manager and/or to
32135b16253fSmrg*** bug-libtool@gnu.org
32145b16253fSmrg
32155b16253fSmrg_LT_EOF
32165b16253fSmrg	  fi ;;
32175b16253fSmrg	esac
32185b16253fSmrg      fi
32195b16253fSmrg      break
32205b16253fSmrg    fi
32215b16253fSmrg  done
32225b16253fSmrg  IFS=$lt_save_ifs
32235b16253fSmrg  MAGIC_CMD=$lt_save_MAGIC_CMD
32245b16253fSmrg  ;;
32255b16253fSmrgesac])
32265b16253fSmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD
32275b16253fSmrgif test -n "$MAGIC_CMD"; then
32285b16253fSmrg  AC_MSG_RESULT($MAGIC_CMD)
32295b16253fSmrgelse
32305b16253fSmrg  AC_MSG_RESULT(no)
32315b16253fSmrgfi
32325b16253fSmrg_LT_DECL([], [MAGIC_CMD], [0],
32335b16253fSmrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
32345b16253fSmrg])# _LT_PATH_TOOL_PREFIX
32355b16253fSmrg
32365b16253fSmrg# Old name:
32375b16253fSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
32385b16253fSmrgdnl aclocal-1.4 backwards compatibility:
32395b16253fSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
32405b16253fSmrg
32415b16253fSmrg
32425b16253fSmrg# _LT_PATH_MAGIC
32435b16253fSmrg# --------------
32445b16253fSmrg# find a file program that can recognize a shared library
32455b16253fSmrgm4_defun([_LT_PATH_MAGIC],
32465b16253fSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
32475b16253fSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then
32485b16253fSmrg  if test -n "$ac_tool_prefix"; then
32495b16253fSmrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
32505b16253fSmrg  else
32515b16253fSmrg    MAGIC_CMD=:
32525b16253fSmrg  fi
32535b16253fSmrgfi
32545b16253fSmrg])# _LT_PATH_MAGIC
32555b16253fSmrg
32565b16253fSmrg
32575b16253fSmrg# LT_PATH_LD
32585b16253fSmrg# ----------
32595b16253fSmrg# find the pathname to the GNU or non-GNU linker
32605b16253fSmrgAC_DEFUN([LT_PATH_LD],
32615b16253fSmrg[AC_REQUIRE([AC_PROG_CC])dnl
32625b16253fSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
32635b16253fSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
32645b16253fSmrgm4_require([_LT_DECL_SED])dnl
32655b16253fSmrgm4_require([_LT_DECL_EGREP])dnl
32665b16253fSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl
32675b16253fSmrg
32685b16253fSmrgAC_ARG_WITH([gnu-ld],
32695b16253fSmrg    [AS_HELP_STRING([--with-gnu-ld],
32705b16253fSmrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
32715b16253fSmrg    [test no = "$withval" || with_gnu_ld=yes],
32725b16253fSmrg    [with_gnu_ld=no])dnl
32735b16253fSmrg
32745b16253fSmrgac_prog=ld
32755b16253fSmrgif test yes = "$GCC"; then
32765b16253fSmrg  # Check if gcc -print-prog-name=ld gives a path.
32775b16253fSmrg  AC_MSG_CHECKING([for ld used by $CC])
32785b16253fSmrg  case $host in
32795b16253fSmrg  *-*-mingw*)
32805b16253fSmrg    # gcc leaves a trailing carriage return, which upsets mingw
32815b16253fSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
32825b16253fSmrg  *)
32835b16253fSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
32845b16253fSmrg  esac
32855b16253fSmrg  case $ac_prog in
32865b16253fSmrg    # Accept absolute paths.
32875b16253fSmrg    [[\\/]]* | ?:[[\\/]]*)
32885b16253fSmrg      re_direlt='/[[^/]][[^/]]*/\.\./'
32895b16253fSmrg      # Canonicalize the pathname of ld
32905b16253fSmrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
32915b16253fSmrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
32925b16253fSmrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
32935b16253fSmrg      done
32945b16253fSmrg      test -z "$LD" && LD=$ac_prog
32955b16253fSmrg      ;;
32965b16253fSmrg  "")
32975b16253fSmrg    # If it fails, then pretend we aren't using GCC.
32985b16253fSmrg    ac_prog=ld
32995b16253fSmrg    ;;
33005b16253fSmrg  *)
33015b16253fSmrg    # If it is relative, then search for the first ld in PATH.
33025b16253fSmrg    with_gnu_ld=unknown
33035b16253fSmrg    ;;
33045b16253fSmrg  esac
33055b16253fSmrgelif test yes = "$with_gnu_ld"; then
33065b16253fSmrg  AC_MSG_CHECKING([for GNU ld])
33075b16253fSmrgelse
33085b16253fSmrg  AC_MSG_CHECKING([for non-GNU ld])
33095b16253fSmrgfi
33105b16253fSmrgAC_CACHE_VAL(lt_cv_path_LD,
33115b16253fSmrg[if test -z "$LD"; then
33125b16253fSmrg  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
33135b16253fSmrg  for ac_dir in $PATH; do
33145b16253fSmrg    IFS=$lt_save_ifs
33155b16253fSmrg    test -z "$ac_dir" && ac_dir=.
33165b16253fSmrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
33175b16253fSmrg      lt_cv_path_LD=$ac_dir/$ac_prog
33185b16253fSmrg      # Check to see if the program is GNU ld.  I'd rather use --version,
33195b16253fSmrg      # but apparently some variants of GNU ld only accept -v.
33205b16253fSmrg      # Break only if it was the GNU/non-GNU ld that we prefer.
33215b16253fSmrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
33225b16253fSmrg      *GNU* | *'with BFD'*)
33235b16253fSmrg	test no != "$with_gnu_ld" && break
33245b16253fSmrg	;;
33255b16253fSmrg      *)
33265b16253fSmrg	test yes != "$with_gnu_ld" && break
33275b16253fSmrg	;;
33285b16253fSmrg      esac
33295b16253fSmrg    fi
33305b16253fSmrg  done
33315b16253fSmrg  IFS=$lt_save_ifs
33325b16253fSmrgelse
33335b16253fSmrg  lt_cv_path_LD=$LD # Let the user override the test with a path.
33345b16253fSmrgfi])
33355b16253fSmrgLD=$lt_cv_path_LD
33365b16253fSmrgif test -n "$LD"; then
33375b16253fSmrg  AC_MSG_RESULT($LD)
33385b16253fSmrgelse
33395b16253fSmrg  AC_MSG_RESULT(no)
33405b16253fSmrgfi
33415b16253fSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
33425b16253fSmrg_LT_PATH_LD_GNU
33435b16253fSmrgAC_SUBST([LD])
33445b16253fSmrg
33455b16253fSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
33465b16253fSmrg])# LT_PATH_LD
33475b16253fSmrg
33485b16253fSmrg# Old names:
33495b16253fSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
33505b16253fSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
33515b16253fSmrgdnl aclocal-1.4 backwards compatibility:
33525b16253fSmrgdnl AC_DEFUN([AM_PROG_LD], [])
33535b16253fSmrgdnl AC_DEFUN([AC_PROG_LD], [])
33545b16253fSmrg
33555b16253fSmrg
33565b16253fSmrg# _LT_PATH_LD_GNU
33575b16253fSmrg#- --------------
33585b16253fSmrgm4_defun([_LT_PATH_LD_GNU],
33595b16253fSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
33605b16253fSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
33615b16253fSmrgcase `$LD -v 2>&1 </dev/null` in
33625b16253fSmrg*GNU* | *'with BFD'*)
33635b16253fSmrg  lt_cv_prog_gnu_ld=yes
33645b16253fSmrg  ;;
33655b16253fSmrg*)
33665b16253fSmrg  lt_cv_prog_gnu_ld=no
33675b16253fSmrg  ;;
33685b16253fSmrgesac])
33695b16253fSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
33705b16253fSmrg])# _LT_PATH_LD_GNU
33715b16253fSmrg
33725b16253fSmrg
33735b16253fSmrg# _LT_CMD_RELOAD
33745b16253fSmrg# --------------
33755b16253fSmrg# find reload flag for linker
33765b16253fSmrg#   -- PORTME Some linkers may need a different reload flag.
33775b16253fSmrgm4_defun([_LT_CMD_RELOAD],
33785b16253fSmrg[AC_CACHE_CHECK([for $LD option to reload object files],
33795b16253fSmrg  lt_cv_ld_reload_flag,
33805b16253fSmrg  [lt_cv_ld_reload_flag='-r'])
33815b16253fSmrgreload_flag=$lt_cv_ld_reload_flag
33825b16253fSmrgcase $reload_flag in
33835b16253fSmrg"" | " "*) ;;
33845b16253fSmrg*) reload_flag=" $reload_flag" ;;
33855b16253fSmrgesac
33865b16253fSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
33875b16253fSmrgcase $host_os in
33885b16253fSmrg  cygwin* | mingw* | pw32* | cegcc*)
33895b16253fSmrg    if test yes != "$GCC"; then
33905b16253fSmrg      reload_cmds=false
33915b16253fSmrg    fi
33925b16253fSmrg    ;;
33935b16253fSmrg  darwin*)
33945b16253fSmrg    if test yes = "$GCC"; then
33955b16253fSmrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
33965b16253fSmrg    else
33975b16253fSmrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
33985b16253fSmrg    fi
33995b16253fSmrg    ;;
34005b16253fSmrgesac
34015b16253fSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
34025b16253fSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl
34035b16253fSmrg])# _LT_CMD_RELOAD
34045b16253fSmrg
34055b16253fSmrg
34065b16253fSmrg# _LT_PATH_DD
34075b16253fSmrg# -----------
34085b16253fSmrg# find a working dd
34095b16253fSmrgm4_defun([_LT_PATH_DD],
34105b16253fSmrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
34115b16253fSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i
34125b16253fSmrgcat conftest.i conftest.i >conftest2.i
34135b16253fSmrg: ${lt_DD:=$DD}
34145b16253fSmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
34155b16253fSmrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
34165b16253fSmrg  cmp -s conftest.i conftest.out \
34175b16253fSmrg  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
34185b16253fSmrgfi])
34195b16253fSmrgrm -f conftest.i conftest2.i conftest.out])
34205b16253fSmrg])# _LT_PATH_DD
34215b16253fSmrg
34225b16253fSmrg
34235b16253fSmrg# _LT_CMD_TRUNCATE
34245b16253fSmrg# ----------------
34255b16253fSmrg# find command to truncate a binary pipe
34265b16253fSmrgm4_defun([_LT_CMD_TRUNCATE],
34275b16253fSmrg[m4_require([_LT_PATH_DD])
34285b16253fSmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
34295b16253fSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i
34305b16253fSmrgcat conftest.i conftest.i >conftest2.i
34315b16253fSmrglt_cv_truncate_bin=
34325b16253fSmrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
34335b16253fSmrg  cmp -s conftest.i conftest.out \
34345b16253fSmrg  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
34355b16253fSmrgfi
34365b16253fSmrgrm -f conftest.i conftest2.i conftest.out
34375b16253fSmrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
34385b16253fSmrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
34395b16253fSmrg  [Command to truncate a binary pipe])
34405b16253fSmrg])# _LT_CMD_TRUNCATE
34415b16253fSmrg
34425b16253fSmrg
34435b16253fSmrg# _LT_CHECK_MAGIC_METHOD
34445b16253fSmrg# ----------------------
34455b16253fSmrg# how to check for library dependencies
34465b16253fSmrg#  -- PORTME fill in with the dynamic library characteristics
34475b16253fSmrgm4_defun([_LT_CHECK_MAGIC_METHOD],
34485b16253fSmrg[m4_require([_LT_DECL_EGREP])
34495b16253fSmrgm4_require([_LT_DECL_OBJDUMP])
34505b16253fSmrgAC_CACHE_CHECK([how to recognize dependent libraries],
34515b16253fSmrglt_cv_deplibs_check_method,
34525b16253fSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
34535b16253fSmrglt_cv_file_magic_test_file=
34545b16253fSmrglt_cv_deplibs_check_method='unknown'
34555b16253fSmrg# Need to set the preceding variable on all platforms that support
34565b16253fSmrg# interlibrary dependencies.
34575b16253fSmrg# 'none' -- dependencies not supported.
34585b16253fSmrg# 'unknown' -- same as none, but documents that we really don't know.
34595b16253fSmrg# 'pass_all' -- all dependencies passed with no checks.
34605b16253fSmrg# 'test_compile' -- check by making test program.
34615b16253fSmrg# 'file_magic [[regex]]' -- check by looking for files in library path
34625b16253fSmrg# that responds to the $file_magic_cmd with a given extended regex.
34635b16253fSmrg# If you have 'file' or equivalent on your system and you're not sure
34645b16253fSmrg# whether 'pass_all' will *always* work, you probably want this one.
34655b16253fSmrg
34665b16253fSmrgcase $host_os in
34675b16253fSmrgaix[[4-9]]*)
34685b16253fSmrg  lt_cv_deplibs_check_method=pass_all
34695b16253fSmrg  ;;
34705b16253fSmrg
34715b16253fSmrgbeos*)
34725b16253fSmrg  lt_cv_deplibs_check_method=pass_all
34735b16253fSmrg  ;;
34745b16253fSmrg
34755b16253fSmrgbsdi[[45]]*)
34765b16253fSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
34775b16253fSmrg  lt_cv_file_magic_cmd='$FILECMD -L'
34785b16253fSmrg  lt_cv_file_magic_test_file=/shlib/libc.so
34795b16253fSmrg  ;;
34805b16253fSmrg
34815b16253fSmrgcygwin*)
34825b16253fSmrg  # func_win32_libid is a shell function defined in ltmain.sh
34835b16253fSmrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
34845b16253fSmrg  lt_cv_file_magic_cmd='func_win32_libid'
34855b16253fSmrg  ;;
34865b16253fSmrg
34875b16253fSmrgmingw* | pw32*)
34885b16253fSmrg  # Base MSYS/MinGW do not provide the 'file' command needed by
34895b16253fSmrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
34905b16253fSmrg  # unless we find 'file', for example because we are cross-compiling.
34915b16253fSmrg  if ( file / ) >/dev/null 2>&1; then
34925b16253fSmrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
34935b16253fSmrg    lt_cv_file_magic_cmd='func_win32_libid'
34945b16253fSmrg  else
34955b16253fSmrg    # Keep this pattern in sync with the one in func_win32_libid.
34965b16253fSmrg    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
34975b16253fSmrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
34985b16253fSmrg  fi
34995b16253fSmrg  ;;
35005b16253fSmrg
35015b16253fSmrgcegcc*)
35025b16253fSmrg  # use the weaker test based on 'objdump'. See mingw*.
35035b16253fSmrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
35045b16253fSmrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
35055b16253fSmrg  ;;
35065b16253fSmrg
35075b16253fSmrgdarwin* | rhapsody*)
35085b16253fSmrg  lt_cv_deplibs_check_method=pass_all
35095b16253fSmrg  ;;
35105b16253fSmrg
35115b16253fSmrgfreebsd* | dragonfly* | midnightbsd*)
35125b16253fSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
35135b16253fSmrg    case $host_cpu in
35145b16253fSmrg    i*86 )
35155b16253fSmrg      # Not sure whether the presence of OpenBSD here was a mistake.
35165b16253fSmrg      # Let's accept both of them until this is cleared up.
35175b16253fSmrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
35185b16253fSmrg      lt_cv_file_magic_cmd=$FILECMD
35195b16253fSmrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
35205b16253fSmrg      ;;
35215b16253fSmrg    esac
35225b16253fSmrg  else
35235b16253fSmrg    lt_cv_deplibs_check_method=pass_all
35245b16253fSmrg  fi
35255b16253fSmrg  ;;
35265b16253fSmrg
35275b16253fSmrghaiku*)
35285b16253fSmrg  lt_cv_deplibs_check_method=pass_all
35295b16253fSmrg  ;;
35305b16253fSmrg
35315b16253fSmrghpux10.20* | hpux11*)
35325b16253fSmrg  lt_cv_file_magic_cmd=$FILECMD
35335b16253fSmrg  case $host_cpu in
35345b16253fSmrg  ia64*)
35355b16253fSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
35365b16253fSmrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
35375b16253fSmrg    ;;
35385b16253fSmrg  hppa*64*)
35395b16253fSmrg    [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]']
35405b16253fSmrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
35415b16253fSmrg    ;;
35425b16253fSmrg  *)
35435b16253fSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
35445b16253fSmrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
35455b16253fSmrg    ;;
35465b16253fSmrg  esac
35475b16253fSmrg  ;;
35485b16253fSmrg
35495b16253fSmrginterix[[3-9]]*)
35505b16253fSmrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
35515b16253fSmrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
35525b16253fSmrg  ;;
35535b16253fSmrg
35545b16253fSmrgirix5* | irix6* | nonstopux*)
35555b16253fSmrg  case $LD in
35565b16253fSmrg  *-32|*"-32 ") libmagic=32-bit;;
35575b16253fSmrg  *-n32|*"-n32 ") libmagic=N32;;
35585b16253fSmrg  *-64|*"-64 ") libmagic=64-bit;;
35595b16253fSmrg  *) libmagic=never-match;;
35605b16253fSmrg  esac
35615b16253fSmrg  lt_cv_deplibs_check_method=pass_all
35625b16253fSmrg  ;;
35635b16253fSmrg
35645b16253fSmrg# This must be glibc/ELF.
35655b16253fSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
35665b16253fSmrg  lt_cv_deplibs_check_method=pass_all
35675b16253fSmrg  ;;
35685b16253fSmrg
35695b16253fSmrgnetbsd*)
35705b16253fSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
35715b16253fSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
35725b16253fSmrg  else
35735b16253fSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
35745b16253fSmrg  fi
35755b16253fSmrg  ;;
35765b16253fSmrg
35775b16253fSmrgnewos6*)
35785b16253fSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
35795b16253fSmrg  lt_cv_file_magic_cmd=$FILECMD
35805b16253fSmrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
35815b16253fSmrg  ;;
35825b16253fSmrg
35835b16253fSmrg*nto* | *qnx*)
35845b16253fSmrg  lt_cv_deplibs_check_method=pass_all
35855b16253fSmrg  ;;
35865b16253fSmrg
35875b16253fSmrgopenbsd* | bitrig*)
35885b16253fSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
35895b16253fSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
35905b16253fSmrg  else
35915b16253fSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
35925b16253fSmrg  fi
35935b16253fSmrg  ;;
35945b16253fSmrg
35955b16253fSmrgosf3* | osf4* | osf5*)
35965b16253fSmrg  lt_cv_deplibs_check_method=pass_all
35975b16253fSmrg  ;;
35985b16253fSmrg
35995b16253fSmrgrdos*)
36005b16253fSmrg  lt_cv_deplibs_check_method=pass_all
36015b16253fSmrg  ;;
36025b16253fSmrg
36035b16253fSmrgsolaris*)
36045b16253fSmrg  lt_cv_deplibs_check_method=pass_all
36055b16253fSmrg  ;;
36065b16253fSmrg
36075b16253fSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
36085b16253fSmrg  lt_cv_deplibs_check_method=pass_all
36095b16253fSmrg  ;;
36105b16253fSmrg
36115b16253fSmrgsysv4 | sysv4.3*)
36125b16253fSmrg  case $host_vendor in
36135b16253fSmrg  motorola)
36145b16253fSmrg    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]]'
36155b16253fSmrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
36165b16253fSmrg    ;;
36175b16253fSmrg  ncr)
36185b16253fSmrg    lt_cv_deplibs_check_method=pass_all
36195b16253fSmrg    ;;
36205b16253fSmrg  sequent)
36215b16253fSmrg    lt_cv_file_magic_cmd='/bin/file'
36225b16253fSmrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
36235b16253fSmrg    ;;
36245b16253fSmrg  sni)
36255b16253fSmrg    lt_cv_file_magic_cmd='/bin/file'
36265b16253fSmrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
36275b16253fSmrg    lt_cv_file_magic_test_file=/lib/libc.so
36285b16253fSmrg    ;;
36295b16253fSmrg  siemens)
36305b16253fSmrg    lt_cv_deplibs_check_method=pass_all
36315b16253fSmrg    ;;
36325b16253fSmrg  pc)
36335b16253fSmrg    lt_cv_deplibs_check_method=pass_all
36345b16253fSmrg    ;;
36355b16253fSmrg  esac
36365b16253fSmrg  ;;
36375b16253fSmrg
36385b16253fSmrgtpf*)
36395b16253fSmrg  lt_cv_deplibs_check_method=pass_all
36405b16253fSmrg  ;;
36415b16253fSmrgos2*)
36425b16253fSmrg  lt_cv_deplibs_check_method=pass_all
36435b16253fSmrg  ;;
36445b16253fSmrgesac
36455b16253fSmrg])
36465b16253fSmrg
36475b16253fSmrgfile_magic_glob=
36485b16253fSmrgwant_nocaseglob=no
36495b16253fSmrgif test "$build" = "$host"; then
36505b16253fSmrg  case $host_os in
36515b16253fSmrg  mingw* | pw32*)
36525b16253fSmrg    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
36535b16253fSmrg      want_nocaseglob=yes
36545b16253fSmrg    else
36555b16253fSmrg      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
36565b16253fSmrg    fi
36575b16253fSmrg    ;;
36585b16253fSmrg  esac
36595b16253fSmrgfi
36605b16253fSmrg
36615b16253fSmrgfile_magic_cmd=$lt_cv_file_magic_cmd
36625b16253fSmrgdeplibs_check_method=$lt_cv_deplibs_check_method
36635b16253fSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
36645b16253fSmrg
36655b16253fSmrg_LT_DECL([], [deplibs_check_method], [1],
36665b16253fSmrg    [Method to check whether dependent libraries are shared objects])
36675b16253fSmrg_LT_DECL([], [file_magic_cmd], [1],
36685b16253fSmrg    [Command to use when deplibs_check_method = "file_magic"])
36695b16253fSmrg_LT_DECL([], [file_magic_glob], [1],
36705b16253fSmrg    [How to find potential files when deplibs_check_method = "file_magic"])
36715b16253fSmrg_LT_DECL([], [want_nocaseglob], [1],
36725b16253fSmrg    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
36735b16253fSmrg])# _LT_CHECK_MAGIC_METHOD
36745b16253fSmrg
36755b16253fSmrg
36765b16253fSmrg# LT_PATH_NM
36775b16253fSmrg# ----------
36785b16253fSmrg# find the pathname to a BSD- or MS-compatible name lister
36795b16253fSmrgAC_DEFUN([LT_PATH_NM],
36805b16253fSmrg[AC_REQUIRE([AC_PROG_CC])dnl
36815b16253fSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
36825b16253fSmrg[if test -n "$NM"; then
36835b16253fSmrg  # Let the user override the test.
36845b16253fSmrg  lt_cv_path_NM=$NM
36855b16253fSmrgelse
36865b16253fSmrg  lt_nm_to_check=${ac_tool_prefix}nm
36875b16253fSmrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
36885b16253fSmrg    lt_nm_to_check="$lt_nm_to_check nm"
36895b16253fSmrg  fi
36905b16253fSmrg  for lt_tmp_nm in $lt_nm_to_check; do
36915b16253fSmrg    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
36925b16253fSmrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
36935b16253fSmrg      IFS=$lt_save_ifs
36945b16253fSmrg      test -z "$ac_dir" && ac_dir=.
36955b16253fSmrg      tmp_nm=$ac_dir/$lt_tmp_nm
36965b16253fSmrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
36975b16253fSmrg	# Check to see if the nm accepts a BSD-compat flag.
36985b16253fSmrg	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
36995b16253fSmrg	#   nm: unknown option "B" ignored
37005b16253fSmrg	# Tru64's nm complains that /dev/null is an invalid object file
37015b16253fSmrg	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
37025b16253fSmrg	case $build_os in
37035b16253fSmrg	mingw*) lt_bad_file=conftest.nm/nofile ;;
37045b16253fSmrg	*) lt_bad_file=/dev/null ;;
37055b16253fSmrg	esac
37065b16253fSmrg	case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
37075b16253fSmrg	*$lt_bad_file* | *'Invalid file or object type'*)
37085b16253fSmrg	  lt_cv_path_NM="$tmp_nm -B"
37095b16253fSmrg	  break 2
37105b16253fSmrg	  ;;
37115b16253fSmrg	*)
37125b16253fSmrg	  case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
37135b16253fSmrg	  */dev/null*)
37145b16253fSmrg	    lt_cv_path_NM="$tmp_nm -p"
37155b16253fSmrg	    break 2
37165b16253fSmrg	    ;;
37175b16253fSmrg	  *)
37185b16253fSmrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
37195b16253fSmrg	    continue # so that we can try to find one that supports BSD flags
37205b16253fSmrg	    ;;
37215b16253fSmrg	  esac
37225b16253fSmrg	  ;;
37235b16253fSmrg	esac
37245b16253fSmrg      fi
37255b16253fSmrg    done
37265b16253fSmrg    IFS=$lt_save_ifs
37275b16253fSmrg  done
37285b16253fSmrg  : ${lt_cv_path_NM=no}
37295b16253fSmrgfi])
37305b16253fSmrgif test no != "$lt_cv_path_NM"; then
37315b16253fSmrg  NM=$lt_cv_path_NM
37325b16253fSmrgelse
37335b16253fSmrg  # Didn't find any BSD compatible name lister, look for dumpbin.
37345b16253fSmrg  if test -n "$DUMPBIN"; then :
37355b16253fSmrg    # Let the user override the test.
37365b16253fSmrg  else
37375b16253fSmrg    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
37385b16253fSmrg    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
37395b16253fSmrg    *COFF*)
37405b16253fSmrg      DUMPBIN="$DUMPBIN -symbols -headers"
37415b16253fSmrg      ;;
37425b16253fSmrg    *)
37435b16253fSmrg      DUMPBIN=:
37445b16253fSmrg      ;;
37455b16253fSmrg    esac
37465b16253fSmrg  fi
37475b16253fSmrg  AC_SUBST([DUMPBIN])
37485b16253fSmrg  if test : != "$DUMPBIN"; then
37495b16253fSmrg    NM=$DUMPBIN
37505b16253fSmrg  fi
37515b16253fSmrgfi
37525b16253fSmrgtest -z "$NM" && NM=nm
37535b16253fSmrgAC_SUBST([NM])
37545b16253fSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
37555b16253fSmrg
37565b16253fSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
37575b16253fSmrg  [lt_cv_nm_interface="BSD nm"
37585b16253fSmrg  echo "int some_variable = 0;" > conftest.$ac_ext
37595b16253fSmrg  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
37605b16253fSmrg  (eval "$ac_compile" 2>conftest.err)
37615b16253fSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
37625b16253fSmrg  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
37635b16253fSmrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
37645b16253fSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
37655b16253fSmrg  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
37665b16253fSmrg  cat conftest.out >&AS_MESSAGE_LOG_FD
37675b16253fSmrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
37685b16253fSmrg    lt_cv_nm_interface="MS dumpbin"
37695b16253fSmrg  fi
37705b16253fSmrg  rm -f conftest*])
37715b16253fSmrg])# LT_PATH_NM
37725b16253fSmrg
37735b16253fSmrg# Old names:
37745b16253fSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
37755b16253fSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
37765b16253fSmrgdnl aclocal-1.4 backwards compatibility:
37775b16253fSmrgdnl AC_DEFUN([AM_PROG_NM], [])
37785b16253fSmrgdnl AC_DEFUN([AC_PROG_NM], [])
37795b16253fSmrg
37805b16253fSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
37815b16253fSmrg# --------------------------------
37825b16253fSmrg# how to determine the name of the shared library
37835b16253fSmrg# associated with a specific link library.
37845b16253fSmrg#  -- PORTME fill in with the dynamic library characteristics
37855b16253fSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
37865b16253fSmrg[m4_require([_LT_DECL_EGREP])
37875b16253fSmrgm4_require([_LT_DECL_OBJDUMP])
37885b16253fSmrgm4_require([_LT_DECL_DLLTOOL])
37895b16253fSmrgAC_CACHE_CHECK([how to associate runtime and link libraries],
37905b16253fSmrglt_cv_sharedlib_from_linklib_cmd,
37915b16253fSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown'
37925b16253fSmrg
37935b16253fSmrgcase $host_os in
37945b16253fSmrgcygwin* | mingw* | pw32* | cegcc*)
37955b16253fSmrg  # two different shell functions defined in ltmain.sh;
37965b16253fSmrg  # decide which one to use based on capabilities of $DLLTOOL
37975b16253fSmrg  case `$DLLTOOL --help 2>&1` in
37985b16253fSmrg  *--identify-strict*)
37995b16253fSmrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
38005b16253fSmrg    ;;
38015b16253fSmrg  *)
38025b16253fSmrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
38035b16253fSmrg    ;;
38045b16253fSmrg  esac
38055b16253fSmrg  ;;
38065b16253fSmrg*)
38075b16253fSmrg  # fallback: assume linklib IS sharedlib
38085b16253fSmrg  lt_cv_sharedlib_from_linklib_cmd=$ECHO
38095b16253fSmrg  ;;
38105b16253fSmrgesac
38115b16253fSmrg])
38125b16253fSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
38135b16253fSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
38145b16253fSmrg
38155b16253fSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
38165b16253fSmrg    [Command to associate shared and link libraries])
38175b16253fSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
38185b16253fSmrg
38195b16253fSmrg
38205b16253fSmrg# _LT_PATH_MANIFEST_TOOL
38215b16253fSmrg# ----------------------
38225b16253fSmrg# locate the manifest tool
38235b16253fSmrgm4_defun([_LT_PATH_MANIFEST_TOOL],
38245b16253fSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
38255b16253fSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
38265b16253fSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
38275b16253fSmrg  [lt_cv_path_mainfest_tool=no
38285b16253fSmrg  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
38295b16253fSmrg  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
38305b16253fSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
38315b16253fSmrg  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
38325b16253fSmrg    lt_cv_path_mainfest_tool=yes
38335b16253fSmrg  fi
38345b16253fSmrg  rm -f conftest*])
38355b16253fSmrgif test yes != "$lt_cv_path_mainfest_tool"; then
38365b16253fSmrg  MANIFEST_TOOL=:
38375b16253fSmrgfi
38385b16253fSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
38395b16253fSmrg])# _LT_PATH_MANIFEST_TOOL
38405b16253fSmrg
38415b16253fSmrg
38425b16253fSmrg# _LT_DLL_DEF_P([FILE])
38435b16253fSmrg# ---------------------
38445b16253fSmrg# True iff FILE is a Windows DLL '.def' file.
38455b16253fSmrg# Keep in sync with func_dll_def_p in the libtool script
38465b16253fSmrgAC_DEFUN([_LT_DLL_DEF_P],
38475b16253fSmrg[dnl
38485b16253fSmrg  test DEF = "`$SED -n dnl
38495b16253fSmrg    -e '\''s/^[[	 ]]*//'\'' dnl Strip leading whitespace
38505b16253fSmrg    -e '\''/^\(;.*\)*$/d'\'' dnl      Delete empty lines and comments
38515b16253fSmrg    -e '\''s/^\(EXPORTS\|LIBRARY\)\([[	 ]].*\)*$/DEF/p'\'' dnl
38525b16253fSmrg    -e q dnl                          Only consider the first "real" line
38535b16253fSmrg    $1`" dnl
38545b16253fSmrg])# _LT_DLL_DEF_P
38555b16253fSmrg
38565b16253fSmrg
38575b16253fSmrg# LT_LIB_M
38585b16253fSmrg# --------
38595b16253fSmrg# check for math library
38605b16253fSmrgAC_DEFUN([LT_LIB_M],
38615b16253fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
38625b16253fSmrgLIBM=
38635b16253fSmrgcase $host in
38645b16253fSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
38655b16253fSmrg  # These system don't have libm, or don't need it
38665b16253fSmrg  ;;
38675b16253fSmrg*-ncr-sysv4.3*)
38685b16253fSmrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
38695b16253fSmrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
38705b16253fSmrg  ;;
38715b16253fSmrg*)
38725b16253fSmrg  AC_CHECK_LIB(m, cos, LIBM=-lm)
38735b16253fSmrg  ;;
38745b16253fSmrgesac
38755b16253fSmrgAC_SUBST([LIBM])
38765b16253fSmrg])# LT_LIB_M
38775b16253fSmrg
38785b16253fSmrg# Old name:
38795b16253fSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
38805b16253fSmrgdnl aclocal-1.4 backwards compatibility:
38815b16253fSmrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
38825b16253fSmrg
38835b16253fSmrg
38845b16253fSmrg# _LT_COMPILER_NO_RTTI([TAGNAME])
38855b16253fSmrg# -------------------------------
38865b16253fSmrgm4_defun([_LT_COMPILER_NO_RTTI],
38875b16253fSmrg[m4_require([_LT_TAG_COMPILER])dnl
38885b16253fSmrg
38895b16253fSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
38905b16253fSmrg
38915b16253fSmrgif test yes = "$GCC"; then
38925b16253fSmrg  case $cc_basename in
38935b16253fSmrg  nvcc*)
38945b16253fSmrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
38955b16253fSmrg  *)
38965b16253fSmrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
38975b16253fSmrg  esac
38985b16253fSmrg
38995b16253fSmrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
39005b16253fSmrg    lt_cv_prog_compiler_rtti_exceptions,
39015b16253fSmrg    [-fno-rtti -fno-exceptions], [],
39025b16253fSmrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
39035b16253fSmrgfi
39045b16253fSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
39055b16253fSmrg	[Compiler flag to turn off builtin functions])
39065b16253fSmrg])# _LT_COMPILER_NO_RTTI
39075b16253fSmrg
39085b16253fSmrg
39095b16253fSmrg# _LT_CMD_GLOBAL_SYMBOLS
39105b16253fSmrg# ----------------------
39115b16253fSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
39125b16253fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
39135b16253fSmrgAC_REQUIRE([AC_PROG_CC])dnl
39145b16253fSmrgAC_REQUIRE([AC_PROG_AWK])dnl
39155b16253fSmrgAC_REQUIRE([LT_PATH_NM])dnl
39165b16253fSmrgAC_REQUIRE([LT_PATH_LD])dnl
39175b16253fSmrgm4_require([_LT_DECL_SED])dnl
39185b16253fSmrgm4_require([_LT_DECL_EGREP])dnl
39195b16253fSmrgm4_require([_LT_TAG_COMPILER])dnl
39205b16253fSmrg
39215b16253fSmrg# Check for command to grab the raw symbol name followed by C symbol from nm.
39225b16253fSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
39235b16253fSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
39245b16253fSmrg[
39255b16253fSmrg# These are sane defaults that work on at least a few old systems.
39265b16253fSmrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
39275b16253fSmrg
39285b16253fSmrg# Character class describing NM global symbol codes.
39295b16253fSmrgsymcode='[[BCDEGRST]]'
39305b16253fSmrg
39315b16253fSmrg# Regexp to match symbols that can be accessed directly from C.
39325b16253fSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
39335b16253fSmrg
39345b16253fSmrg# Define system-specific variables.
39355b16253fSmrgcase $host_os in
39365b16253fSmrgaix*)
39375b16253fSmrg  symcode='[[BCDT]]'
39385b16253fSmrg  ;;
39395b16253fSmrgcygwin* | mingw* | pw32* | cegcc*)
39405b16253fSmrg  symcode='[[ABCDGISTW]]'
39415b16253fSmrg  ;;
39425b16253fSmrghpux*)
39435b16253fSmrg  if test ia64 = "$host_cpu"; then
39445b16253fSmrg    symcode='[[ABCDEGRST]]'
39455b16253fSmrg  fi
39465b16253fSmrg  ;;
39475b16253fSmrgirix* | nonstopux*)
39485b16253fSmrg  symcode='[[BCDEGRST]]'
39495b16253fSmrg  ;;
39505b16253fSmrgosf*)
39515b16253fSmrg  symcode='[[BCDEGQRST]]'
39525b16253fSmrg  ;;
39535b16253fSmrgsolaris*)
39545b16253fSmrg  symcode='[[BDRT]]'
39555b16253fSmrg  ;;
39565b16253fSmrgsco3.2v5*)
39575b16253fSmrg  symcode='[[DT]]'
39585b16253fSmrg  ;;
39595b16253fSmrgsysv4.2uw2*)
39605b16253fSmrg  symcode='[[DT]]'
39615b16253fSmrg  ;;
39625b16253fSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
39635b16253fSmrg  symcode='[[ABDT]]'
39645b16253fSmrg  ;;
39655b16253fSmrgsysv4)
39665b16253fSmrg  symcode='[[DFNSTU]]'
39675b16253fSmrg  ;;
39685b16253fSmrgesac
39695b16253fSmrg
39705b16253fSmrg# If we're using GNU nm, then use its standard symbol codes.
39715b16253fSmrgcase `$NM -V 2>&1` in
39725b16253fSmrg*GNU* | *'with BFD'*)
39735b16253fSmrg  symcode='[[ABCDGIRSTW]]' ;;
39745b16253fSmrgesac
39755b16253fSmrg
39765b16253fSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
39775b16253fSmrg  # Gets list of data symbols to import.
39785b16253fSmrg  lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
39795b16253fSmrg  # Adjust the below global symbol transforms to fixup imported variables.
39805b16253fSmrg  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
39815b16253fSmrg  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
39825b16253fSmrg  lt_c_name_lib_hook="\
39835b16253fSmrg  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
39845b16253fSmrg  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
39855b16253fSmrgelse
39865b16253fSmrg  # Disable hooks by default.
39875b16253fSmrg  lt_cv_sys_global_symbol_to_import=
39885b16253fSmrg  lt_cdecl_hook=
39895b16253fSmrg  lt_c_name_hook=
39905b16253fSmrg  lt_c_name_lib_hook=
39915b16253fSmrgfi
39925b16253fSmrg
39935b16253fSmrg# Transform an extracted symbol line into a proper C declaration.
39945b16253fSmrg# Some systems (esp. on ia64) link data and code symbols differently,
39955b16253fSmrg# so use this general approach.
39965b16253fSmrglt_cv_sys_global_symbol_to_cdecl="$SED -n"\
39975b16253fSmrg$lt_cdecl_hook\
39985b16253fSmrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
39995b16253fSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
40005b16253fSmrg
40015b16253fSmrg# Transform an extracted symbol line into symbol name and symbol address
40025b16253fSmrglt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
40035b16253fSmrg$lt_c_name_hook\
40045b16253fSmrg" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
40055b16253fSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
40065b16253fSmrg
40075b16253fSmrg# Transform an extracted symbol line into symbol name with lib prefix and
40085b16253fSmrg# symbol address.
40095b16253fSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
40105b16253fSmrg$lt_c_name_lib_hook\
40115b16253fSmrg" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
40125b16253fSmrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
40135b16253fSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
40145b16253fSmrg
40155b16253fSmrg# Handle CRLF in mingw tool chain
40165b16253fSmrgopt_cr=
40175b16253fSmrgcase $build_os in
40185b16253fSmrgmingw*)
40195b16253fSmrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
40205b16253fSmrg  ;;
40215b16253fSmrgesac
40225b16253fSmrg
40235b16253fSmrg# Try without a prefix underscore, then with it.
40245b16253fSmrgfor ac_symprfx in "" "_"; do
40255b16253fSmrg
40265b16253fSmrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
40275b16253fSmrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
40285b16253fSmrg
40295b16253fSmrg  # Write the raw and C identifiers.
40305b16253fSmrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
40315b16253fSmrg    # Fake it for dumpbin and say T for any non-static function,
40325b16253fSmrg    # D for any global variable and I for any imported variable.
40335b16253fSmrg    # Also find C++ and __fastcall symbols from MSVC++ or ICC,
40345b16253fSmrg    # which start with @ or ?.
40355b16253fSmrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
40365b16253fSmrg"     {last_section=section; section=\$ 3};"\
40375b16253fSmrg"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
40385b16253fSmrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
40395b16253fSmrg"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
40405b16253fSmrg"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
40415b16253fSmrg"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
40425b16253fSmrg"     \$ 0!~/External *\|/{next};"\
40435b16253fSmrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
40445b16253fSmrg"     {if(hide[section]) next};"\
40455b16253fSmrg"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
40465b16253fSmrg"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
40475b16253fSmrg"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
40485b16253fSmrg"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
40495b16253fSmrg"     ' prfx=^$ac_symprfx]"
40505b16253fSmrg  else
40515b16253fSmrg    lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
40525b16253fSmrg  fi
40535b16253fSmrg  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
40545b16253fSmrg
40555b16253fSmrg  # Check to see that the pipe works correctly.
40565b16253fSmrg  pipe_works=no
40575b16253fSmrg
40585b16253fSmrg  rm -f conftest*
40595b16253fSmrg  cat > conftest.$ac_ext <<_LT_EOF
40605b16253fSmrg#ifdef __cplusplus
40615b16253fSmrgextern "C" {
40625b16253fSmrg#endif
40635b16253fSmrgchar nm_test_var;
40645b16253fSmrgvoid nm_test_func(void);
40655b16253fSmrgvoid nm_test_func(void){}
40665b16253fSmrg#ifdef __cplusplus
40675b16253fSmrg}
40685b16253fSmrg#endif
40695b16253fSmrgint main(){nm_test_var='a';nm_test_func();return(0);}
40705b16253fSmrg_LT_EOF
40715b16253fSmrg
40725b16253fSmrg  if AC_TRY_EVAL(ac_compile); then
40735b16253fSmrg    # Now try to grab the symbols.
40745b16253fSmrg    nlist=conftest.nm
40755b16253fSmrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
40765b16253fSmrg      # Try sorting and uniquifying the output.
40775b16253fSmrg      if sort "$nlist" | uniq > "$nlist"T; then
40785b16253fSmrg	mv -f "$nlist"T "$nlist"
40795b16253fSmrg      else
40805b16253fSmrg	rm -f "$nlist"T
40815b16253fSmrg      fi
40825b16253fSmrg
40835b16253fSmrg      # Make sure that we snagged all the symbols we need.
40845b16253fSmrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
40855b16253fSmrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
40865b16253fSmrg	  cat <<_LT_EOF > conftest.$ac_ext
40875b16253fSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
40885b16253fSmrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
40895b16253fSmrg/* DATA imports from DLLs on WIN32 can't be const, because runtime
40905b16253fSmrg   relocations are performed -- see ld's documentation on pseudo-relocs.  */
40915b16253fSmrg# define LT@&t@_DLSYM_CONST
40925b16253fSmrg#elif defined __osf__
40935b16253fSmrg/* This system does not cope well with relocations in const data.  */
40945b16253fSmrg# define LT@&t@_DLSYM_CONST
40955b16253fSmrg#else
40965b16253fSmrg# define LT@&t@_DLSYM_CONST const
40975b16253fSmrg#endif
40985b16253fSmrg
40995b16253fSmrg#ifdef __cplusplus
41005b16253fSmrgextern "C" {
41015b16253fSmrg#endif
41025b16253fSmrg
41035b16253fSmrg_LT_EOF
41045b16253fSmrg	  # Now generate the symbol file.
41055b16253fSmrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
41065b16253fSmrg
41075b16253fSmrg	  cat <<_LT_EOF >> conftest.$ac_ext
41085b16253fSmrg
41095b16253fSmrg/* The mapping between symbol names and symbols.  */
41105b16253fSmrgLT@&t@_DLSYM_CONST struct {
41115b16253fSmrg  const char *name;
41125b16253fSmrg  void       *address;
41135b16253fSmrg}
41145b16253fSmrglt__PROGRAM__LTX_preloaded_symbols[[]] =
41155b16253fSmrg{
41165b16253fSmrg  { "@PROGRAM@", (void *) 0 },
41175b16253fSmrg_LT_EOF
41185b16253fSmrg	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
41195b16253fSmrg	  cat <<\_LT_EOF >> conftest.$ac_ext
41205b16253fSmrg  {0, (void *) 0}
41215b16253fSmrg};
41225b16253fSmrg
41235b16253fSmrg/* This works around a problem in FreeBSD linker */
41245b16253fSmrg#ifdef FREEBSD_WORKAROUND
41255b16253fSmrgstatic const void *lt_preloaded_setup() {
41265b16253fSmrg  return lt__PROGRAM__LTX_preloaded_symbols;
41275b16253fSmrg}
41285b16253fSmrg#endif
41295b16253fSmrg
41305b16253fSmrg#ifdef __cplusplus
41315b16253fSmrg}
41325b16253fSmrg#endif
41335b16253fSmrg_LT_EOF
41345b16253fSmrg	  # Now try linking the two files.
41355b16253fSmrg	  mv conftest.$ac_objext conftstm.$ac_objext
41365b16253fSmrg	  lt_globsym_save_LIBS=$LIBS
41375b16253fSmrg	  lt_globsym_save_CFLAGS=$CFLAGS
41385b16253fSmrg	  LIBS=conftstm.$ac_objext
41395b16253fSmrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
41405b16253fSmrg	  if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
41415b16253fSmrg	    pipe_works=yes
41425b16253fSmrg	  fi
41435b16253fSmrg	  LIBS=$lt_globsym_save_LIBS
41445b16253fSmrg	  CFLAGS=$lt_globsym_save_CFLAGS
41455b16253fSmrg	else
41465b16253fSmrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
41475b16253fSmrg	fi
41485b16253fSmrg      else
41495b16253fSmrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
41505b16253fSmrg      fi
41515b16253fSmrg    else
41525b16253fSmrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
41535b16253fSmrg    fi
41545b16253fSmrg  else
41555b16253fSmrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
41565b16253fSmrg    cat conftest.$ac_ext >&5
41575b16253fSmrg  fi
41585b16253fSmrg  rm -rf conftest* conftst*
41595b16253fSmrg
41605b16253fSmrg  # Do not use the global_symbol_pipe unless it works.
41615b16253fSmrg  if test yes = "$pipe_works"; then
41625b16253fSmrg    break
41635b16253fSmrg  else
41645b16253fSmrg    lt_cv_sys_global_symbol_pipe=
41655b16253fSmrg  fi
41665b16253fSmrgdone
41675b16253fSmrg])
41685b16253fSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
41695b16253fSmrg  lt_cv_sys_global_symbol_to_cdecl=
41705b16253fSmrgfi
41715b16253fSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
41725b16253fSmrg  AC_MSG_RESULT(failed)
41735b16253fSmrgelse
41745b16253fSmrg  AC_MSG_RESULT(ok)
41755b16253fSmrgfi
41765b16253fSmrg
41775b16253fSmrg# Response file support.
41785b16253fSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
41795b16253fSmrg  nm_file_list_spec='@'
41805b16253fSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
41815b16253fSmrg  nm_file_list_spec='@'
41825b16253fSmrgfi
41835b16253fSmrg
41845b16253fSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
41855b16253fSmrg    [Take the output of nm and produce a listing of raw symbols and C names])
41865b16253fSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
41875b16253fSmrg    [Transform the output of nm in a proper C declaration])
41885b16253fSmrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
41895b16253fSmrg    [Transform the output of nm into a list of symbols to manually relocate])
41905b16253fSmrg_LT_DECL([global_symbol_to_c_name_address],
41915b16253fSmrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
41925b16253fSmrg    [Transform the output of nm in a C name address pair])
41935b16253fSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
41945b16253fSmrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
41955b16253fSmrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
41965b16253fSmrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
41975b16253fSmrg    [The name lister interface])
41985b16253fSmrg_LT_DECL([], [nm_file_list_spec], [1],
41995b16253fSmrg    [Specify filename containing input files for $NM])
42005b16253fSmrg]) # _LT_CMD_GLOBAL_SYMBOLS
42015b16253fSmrg
42025b16253fSmrg
42035b16253fSmrg# _LT_COMPILER_PIC([TAGNAME])
42045b16253fSmrg# ---------------------------
42055b16253fSmrgm4_defun([_LT_COMPILER_PIC],
42065b16253fSmrg[m4_require([_LT_TAG_COMPILER])dnl
42075b16253fSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
42085b16253fSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
42095b16253fSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
42105b16253fSmrg
42115b16253fSmrgm4_if([$1], [CXX], [
42125b16253fSmrg  # C++ specific cases for pic, static, wl, etc.
42135b16253fSmrg  if test yes = "$GXX"; then
42145b16253fSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
42155b16253fSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
42165b16253fSmrg
42175b16253fSmrg    case $host_os in
42185b16253fSmrg    aix*)
42195b16253fSmrg      # All AIX code is PIC.
42205b16253fSmrg      if test ia64 = "$host_cpu"; then
42215b16253fSmrg	# AIX 5 now supports IA64 processor
42225b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
42235b16253fSmrg      fi
42245b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
42255b16253fSmrg      ;;
42265b16253fSmrg
42275b16253fSmrg    amigaos*)
42285b16253fSmrg      case $host_cpu in
42295b16253fSmrg      powerpc)
42305b16253fSmrg            # see comment about AmigaOS4 .so support
42315b16253fSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
42325b16253fSmrg        ;;
42335b16253fSmrg      m68k)
42345b16253fSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
42355b16253fSmrg            # adding the '-m68020' flag to GCC prevents building anything better,
42365b16253fSmrg            # like '-m68040'.
42375b16253fSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
42385b16253fSmrg        ;;
42395b16253fSmrg      esac
42405b16253fSmrg      ;;
42415b16253fSmrg
42425b16253fSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
42435b16253fSmrg      # PIC is the default for these OSes.
42445b16253fSmrg      ;;
42455b16253fSmrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
42465b16253fSmrg      # This hack is so that the source file can tell whether it is being
42475b16253fSmrg      # built for inclusion in a dll (and should export symbols for example).
42485b16253fSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
42495b16253fSmrg      # (--disable-auto-import) libraries
42505b16253fSmrg      m4_if([$1], [GCJ], [],
42515b16253fSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
42525b16253fSmrg      case $host_os in
42535b16253fSmrg      os2*)
42545b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
42555b16253fSmrg	;;
42565b16253fSmrg      esac
42575b16253fSmrg      ;;
42585b16253fSmrg    darwin* | rhapsody*)
42595b16253fSmrg      # PIC is the default on this platform
42605b16253fSmrg      # Common symbols not allowed in MH_DYLIB files
42615b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
42625b16253fSmrg      ;;
42635b16253fSmrg    *djgpp*)
42645b16253fSmrg      # DJGPP does not support shared libraries at all
42655b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
42665b16253fSmrg      ;;
42675b16253fSmrg    haiku*)
42685b16253fSmrg      # PIC is the default for Haiku.
42695b16253fSmrg      # The "-static" flag exists, but is broken.
42705b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
42715b16253fSmrg      ;;
42725b16253fSmrg    interix[[3-9]]*)
42735b16253fSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
42745b16253fSmrg      # Instead, we relocate shared libraries at runtime.
42755b16253fSmrg      ;;
42765b16253fSmrg    sysv4*MP*)
42775b16253fSmrg      if test -d /usr/nec; then
42785b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
42795b16253fSmrg      fi
42805b16253fSmrg      ;;
42815b16253fSmrg    hpux*)
42825b16253fSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
42835b16253fSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
42845b16253fSmrg      # sets the default TLS model and affects inlining.
42855b16253fSmrg      case $host_cpu in
42865b16253fSmrg      hppa*64*)
42875b16253fSmrg	;;
42885b16253fSmrg      *)
42895b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
42905b16253fSmrg	;;
42915b16253fSmrg      esac
42925b16253fSmrg      ;;
42935b16253fSmrg    *qnx* | *nto*)
42945b16253fSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
42955b16253fSmrg      # it will coredump.
42965b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
42975b16253fSmrg      ;;
42985b16253fSmrg    *)
42995b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
43005b16253fSmrg      ;;
43015b16253fSmrg    esac
43025b16253fSmrg  else
43035b16253fSmrg    case $host_os in
43045b16253fSmrg      aix[[4-9]]*)
43055b16253fSmrg	# All AIX code is PIC.
43065b16253fSmrg	if test ia64 = "$host_cpu"; then
43075b16253fSmrg	  # AIX 5 now supports IA64 processor
43085b16253fSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
43095b16253fSmrg	else
43105b16253fSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
43115b16253fSmrg	fi
43125b16253fSmrg	;;
43135b16253fSmrg      chorus*)
43145b16253fSmrg	case $cc_basename in
43155b16253fSmrg	cxch68*)
43165b16253fSmrg	  # Green Hills C++ Compiler
43175b16253fSmrg	  # _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"
43185b16253fSmrg	  ;;
43195b16253fSmrg	esac
43205b16253fSmrg	;;
43215b16253fSmrg      mingw* | cygwin* | os2* | pw32* | cegcc*)
43225b16253fSmrg	# This hack is so that the source file can tell whether it is being
43235b16253fSmrg	# built for inclusion in a dll (and should export symbols for example).
43245b16253fSmrg	m4_if([$1], [GCJ], [],
43255b16253fSmrg	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
43265b16253fSmrg	;;
43275b16253fSmrg      dgux*)
43285b16253fSmrg	case $cc_basename in
43295b16253fSmrg	  ec++*)
43305b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
43315b16253fSmrg	    ;;
43325b16253fSmrg	  ghcx*)
43335b16253fSmrg	    # Green Hills C++ Compiler
43345b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
43355b16253fSmrg	    ;;
43365b16253fSmrg	  *)
43375b16253fSmrg	    ;;
43385b16253fSmrg	esac
43395b16253fSmrg	;;
43405b16253fSmrg      freebsd* | dragonfly* | midnightbsd*)
43415b16253fSmrg	# FreeBSD uses GNU C++
43425b16253fSmrg	;;
43435b16253fSmrg      hpux9* | hpux10* | hpux11*)
43445b16253fSmrg	case $cc_basename in
43455b16253fSmrg	  CC*)
43465b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43475b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
43485b16253fSmrg	    if test ia64 != "$host_cpu"; then
43495b16253fSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
43505b16253fSmrg	    fi
43515b16253fSmrg	    ;;
43525b16253fSmrg	  aCC*)
43535b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43545b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
43555b16253fSmrg	    case $host_cpu in
43565b16253fSmrg	    hppa*64*|ia64*)
43575b16253fSmrg	      # +Z the default
43585b16253fSmrg	      ;;
43595b16253fSmrg	    *)
43605b16253fSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
43615b16253fSmrg	      ;;
43625b16253fSmrg	    esac
43635b16253fSmrg	    ;;
43645b16253fSmrg	  *)
43655b16253fSmrg	    ;;
43665b16253fSmrg	esac
43675b16253fSmrg	;;
43685b16253fSmrg      interix*)
43695b16253fSmrg	# This is c89, which is MS Visual C++ (no shared libs)
43705b16253fSmrg	# Anyone wants to do a port?
43715b16253fSmrg	;;
43725b16253fSmrg      irix5* | irix6* | nonstopux*)
43735b16253fSmrg	case $cc_basename in
43745b16253fSmrg	  CC*)
43755b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43765b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
43775b16253fSmrg	    # CC pic flag -KPIC is the default.
43785b16253fSmrg	    ;;
43795b16253fSmrg	  *)
43805b16253fSmrg	    ;;
43815b16253fSmrg	esac
43825b16253fSmrg	;;
43835b16253fSmrg      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
43845b16253fSmrg	case $cc_basename in
43855b16253fSmrg	  KCC*)
43865b16253fSmrg	    # KAI C++ Compiler
43875b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
43885b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
43895b16253fSmrg	    ;;
43905b16253fSmrg	  ecpc* )
43915b16253fSmrg	    # old Intel C++ for x86_64, which still supported -KPIC.
43925b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43935b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
43945b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
43955b16253fSmrg	    ;;
43965b16253fSmrg	  icpc* )
43975b16253fSmrg	    # Intel C++, used to be incompatible with GCC.
43985b16253fSmrg	    # ICC 10 doesn't accept -KPIC any more.
43995b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
44005b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
44015b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
44025b16253fSmrg	    ;;
44035b16253fSmrg	  pgCC* | pgcpp*)
44045b16253fSmrg	    # Portland Group C++ compiler
44055b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
44065b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
44075b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
44085b16253fSmrg	    ;;
44095b16253fSmrg	  cxx*)
44105b16253fSmrg	    # Compaq C++
44115b16253fSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
44125b16253fSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
44135b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
44145b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
44155b16253fSmrg	    ;;
44165b16253fSmrg	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
44175b16253fSmrg	    # IBM XL 8.0, 9.0 on PPC and BlueGene
44185b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
44195b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
44205b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
44215b16253fSmrg	    ;;
44225b16253fSmrg	  *)
44235b16253fSmrg	    case `$CC -V 2>&1 | $SED 5q` in
44245b16253fSmrg	    *Sun\ C*)
44255b16253fSmrg	      # Sun C++ 5.9
44265b16253fSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
44275b16253fSmrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
44285b16253fSmrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
44295b16253fSmrg	      ;;
44305b16253fSmrg	    esac
44315b16253fSmrg	    ;;
44325b16253fSmrg	esac
44335b16253fSmrg	;;
44345b16253fSmrg      lynxos*)
44355b16253fSmrg	;;
44365b16253fSmrg      m88k*)
44375b16253fSmrg	;;
44385b16253fSmrg      mvs*)
44395b16253fSmrg	case $cc_basename in
44405b16253fSmrg	  cxx*)
44415b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
44425b16253fSmrg	    ;;
44435b16253fSmrg	  *)
44445b16253fSmrg	    ;;
44455b16253fSmrg	esac
44465b16253fSmrg	;;
44475b16253fSmrg      netbsd*)
44485b16253fSmrg	;;
44495b16253fSmrg      *qnx* | *nto*)
44505b16253fSmrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
44515b16253fSmrg        # it will coredump.
44525b16253fSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
44535b16253fSmrg        ;;
44545b16253fSmrg      osf3* | osf4* | osf5*)
44555b16253fSmrg	case $cc_basename in
44565b16253fSmrg	  KCC*)
44575b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
44585b16253fSmrg	    ;;
44595b16253fSmrg	  RCC*)
44605b16253fSmrg	    # Rational C++ 2.4.1
44615b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
44625b16253fSmrg	    ;;
44635b16253fSmrg	  cxx*)
44645b16253fSmrg	    # Digital/Compaq C++
44655b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
44665b16253fSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
44675b16253fSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
44685b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
44695b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
44705b16253fSmrg	    ;;
44715b16253fSmrg	  *)
44725b16253fSmrg	    ;;
44735b16253fSmrg	esac
44745b16253fSmrg	;;
44755b16253fSmrg      psos*)
44765b16253fSmrg	;;
44775b16253fSmrg      solaris*)
44785b16253fSmrg	case $cc_basename in
44795b16253fSmrg	  CC* | sunCC*)
44805b16253fSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
44815b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
44825b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
44835b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
44845b16253fSmrg	    ;;
44855b16253fSmrg	  gcx*)
44865b16253fSmrg	    # Green Hills C++ Compiler
44875b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
44885b16253fSmrg	    ;;
44895b16253fSmrg	  *)
44905b16253fSmrg	    ;;
44915b16253fSmrg	esac
44925b16253fSmrg	;;
44935b16253fSmrg      sunos4*)
44945b16253fSmrg	case $cc_basename in
44955b16253fSmrg	  CC*)
44965b16253fSmrg	    # Sun C++ 4.x
44975b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
44985b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
44995b16253fSmrg	    ;;
45005b16253fSmrg	  lcc*)
45015b16253fSmrg	    # Lucid
45025b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
45035b16253fSmrg	    ;;
45045b16253fSmrg	  *)
45055b16253fSmrg	    ;;
45065b16253fSmrg	esac
45075b16253fSmrg	;;
45085b16253fSmrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
45095b16253fSmrg	case $cc_basename in
45105b16253fSmrg	  CC*)
45115b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
45125b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
45135b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
45145b16253fSmrg	    ;;
45155b16253fSmrg	esac
45165b16253fSmrg	;;
45175b16253fSmrg      tandem*)
45185b16253fSmrg	case $cc_basename in
45195b16253fSmrg	  NCC*)
45205b16253fSmrg	    # NonStop-UX NCC 3.20
45215b16253fSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
45225b16253fSmrg	    ;;
45235b16253fSmrg	  *)
45245b16253fSmrg	    ;;
45255b16253fSmrg	esac
45265b16253fSmrg	;;
45275b16253fSmrg      vxworks*)
45285b16253fSmrg	;;
45295b16253fSmrg      *)
45305b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
45315b16253fSmrg	;;
45325b16253fSmrg    esac
45335b16253fSmrg  fi
45345b16253fSmrg],
45355b16253fSmrg[
45365b16253fSmrg  if test yes = "$GCC"; then
45375b16253fSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
45385b16253fSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
45395b16253fSmrg
45405b16253fSmrg    case $host_os in
45415b16253fSmrg      aix*)
45425b16253fSmrg      # All AIX code is PIC.
45435b16253fSmrg      if test ia64 = "$host_cpu"; then
45445b16253fSmrg	# AIX 5 now supports IA64 processor
45455b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
45465b16253fSmrg      fi
45475b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
45485b16253fSmrg      ;;
45495b16253fSmrg
45505b16253fSmrg    amigaos*)
45515b16253fSmrg      case $host_cpu in
45525b16253fSmrg      powerpc)
45535b16253fSmrg            # see comment about AmigaOS4 .so support
45545b16253fSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
45555b16253fSmrg        ;;
45565b16253fSmrg      m68k)
45575b16253fSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
45585b16253fSmrg            # adding the '-m68020' flag to GCC prevents building anything better,
45595b16253fSmrg            # like '-m68040'.
45605b16253fSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
45615b16253fSmrg        ;;
45625b16253fSmrg      esac
45635b16253fSmrg      ;;
45645b16253fSmrg
45655b16253fSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
45665b16253fSmrg      # PIC is the default for these OSes.
45675b16253fSmrg      ;;
45685b16253fSmrg
45695b16253fSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
45705b16253fSmrg      # This hack is so that the source file can tell whether it is being
45715b16253fSmrg      # built for inclusion in a dll (and should export symbols for example).
45725b16253fSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
45735b16253fSmrg      # (--disable-auto-import) libraries
45745b16253fSmrg      m4_if([$1], [GCJ], [],
45755b16253fSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
45765b16253fSmrg      case $host_os in
45775b16253fSmrg      os2*)
45785b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
45795b16253fSmrg	;;
45805b16253fSmrg      esac
45815b16253fSmrg      ;;
45825b16253fSmrg
45835b16253fSmrg    darwin* | rhapsody*)
45845b16253fSmrg      # PIC is the default on this platform
45855b16253fSmrg      # Common symbols not allowed in MH_DYLIB files
45865b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
45875b16253fSmrg      ;;
45885b16253fSmrg
45895b16253fSmrg    haiku*)
45905b16253fSmrg      # PIC is the default for Haiku.
45915b16253fSmrg      # The "-static" flag exists, but is broken.
45925b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
45935b16253fSmrg      ;;
45945b16253fSmrg
45955b16253fSmrg    hpux*)
45965b16253fSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
45975b16253fSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
45985b16253fSmrg      # sets the default TLS model and affects inlining.
45995b16253fSmrg      case $host_cpu in
46005b16253fSmrg      hppa*64*)
46015b16253fSmrg	# +Z the default
46025b16253fSmrg	;;
46035b16253fSmrg      *)
46045b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
46055b16253fSmrg	;;
46065b16253fSmrg      esac
46075b16253fSmrg      ;;
46085b16253fSmrg
46095b16253fSmrg    interix[[3-9]]*)
46105b16253fSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
46115b16253fSmrg      # Instead, we relocate shared libraries at runtime.
46125b16253fSmrg      ;;
46135b16253fSmrg
46145b16253fSmrg    msdosdjgpp*)
46155b16253fSmrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
46165b16253fSmrg      # on systems that don't support them.
46175b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
46185b16253fSmrg      enable_shared=no
46195b16253fSmrg      ;;
46205b16253fSmrg
46215b16253fSmrg    *nto* | *qnx*)
46225b16253fSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
46235b16253fSmrg      # it will coredump.
46245b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
46255b16253fSmrg      ;;
46265b16253fSmrg
46275b16253fSmrg    sysv4*MP*)
46285b16253fSmrg      if test -d /usr/nec; then
46295b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
46305b16253fSmrg      fi
46315b16253fSmrg      ;;
46325b16253fSmrg
46335b16253fSmrg    *)
46345b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
46355b16253fSmrg      ;;
46365b16253fSmrg    esac
46375b16253fSmrg
46385b16253fSmrg    case $cc_basename in
46395b16253fSmrg    nvcc*) # Cuda Compiler Driver 2.2
46405b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
46415b16253fSmrg      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
46425b16253fSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
46435b16253fSmrg      fi
46445b16253fSmrg      ;;
46455b16253fSmrg    esac
46465b16253fSmrg  else
46475b16253fSmrg    # PORTME Check for flag to pass linker flags through the system compiler.
46485b16253fSmrg    case $host_os in
46495b16253fSmrg    aix*)
46505b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
46515b16253fSmrg      if test ia64 = "$host_cpu"; then
46525b16253fSmrg	# AIX 5 now supports IA64 processor
46535b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
46545b16253fSmrg      else
46555b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
46565b16253fSmrg      fi
46575b16253fSmrg      ;;
46585b16253fSmrg
46595b16253fSmrg    darwin* | rhapsody*)
46605b16253fSmrg      # PIC is the default on this platform
46615b16253fSmrg      # Common symbols not allowed in MH_DYLIB files
46625b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
46635b16253fSmrg      case $cc_basename in
46645b16253fSmrg      nagfor*)
46655b16253fSmrg        # NAG Fortran compiler
46665b16253fSmrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
46675b16253fSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
46685b16253fSmrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
46695b16253fSmrg        ;;
46705b16253fSmrg      esac
46715b16253fSmrg      ;;
46725b16253fSmrg
46735b16253fSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
46745b16253fSmrg      # This hack is so that the source file can tell whether it is being
46755b16253fSmrg      # built for inclusion in a dll (and should export symbols for example).
46765b16253fSmrg      m4_if([$1], [GCJ], [],
46775b16253fSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
46785b16253fSmrg      case $host_os in
46795b16253fSmrg      os2*)
46805b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
46815b16253fSmrg	;;
46825b16253fSmrg      esac
46835b16253fSmrg      ;;
46845b16253fSmrg
46855b16253fSmrg    hpux9* | hpux10* | hpux11*)
46865b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
46875b16253fSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
46885b16253fSmrg      # not for PA HP-UX.
46895b16253fSmrg      case $host_cpu in
46905b16253fSmrg      hppa*64*|ia64*)
46915b16253fSmrg	# +Z the default
46925b16253fSmrg	;;
46935b16253fSmrg      *)
46945b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
46955b16253fSmrg	;;
46965b16253fSmrg      esac
46975b16253fSmrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
46985b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
46995b16253fSmrg      ;;
47005b16253fSmrg
47015b16253fSmrg    irix5* | irix6* | nonstopux*)
47025b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47035b16253fSmrg      # PIC (with -KPIC) is the default.
47045b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
47055b16253fSmrg      ;;
47065b16253fSmrg
47075b16253fSmrg    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
47085b16253fSmrg      case $cc_basename in
47095b16253fSmrg      # old Intel for x86_64, which still supported -KPIC.
47105b16253fSmrg      ecc*)
47115b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47125b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
47135b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
47145b16253fSmrg        ;;
47155b16253fSmrg      # icc used to be incompatible with GCC.
47165b16253fSmrg      # ICC 10 doesn't accept -KPIC any more.
47175b16253fSmrg      icc* | ifort*)
47185b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47195b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
47205b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
47215b16253fSmrg        ;;
47225b16253fSmrg      # Lahey Fortran 8.1.
47235b16253fSmrg      lf95*)
47245b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47255b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
47265b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
47275b16253fSmrg	;;
47285b16253fSmrg      nagfor*)
47295b16253fSmrg	# NAG Fortran compiler
47305b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
47315b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
47325b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47335b16253fSmrg	;;
47345b16253fSmrg      tcc*)
47355b16253fSmrg	# Fabrice Bellard et al's Tiny C Compiler
47365b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47375b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
47385b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
47395b16253fSmrg	;;
47405b16253fSmrg      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
47415b16253fSmrg        # Portland Group compilers (*not* the Pentium gcc compiler,
47425b16253fSmrg	# which looks to be a dead project)
47435b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47445b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
47455b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47465b16253fSmrg        ;;
47475b16253fSmrg      ccc*)
47485b16253fSmrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47495b16253fSmrg        # All Alpha code is PIC.
47505b16253fSmrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
47515b16253fSmrg        ;;
47525b16253fSmrg      xl* | bgxl* | bgf* | mpixl*)
47535b16253fSmrg	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
47545b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47555b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
47565b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
47575b16253fSmrg	;;
47585b16253fSmrg      *)
47595b16253fSmrg	case `$CC -V 2>&1 | $SED 5q` in
47605b16253fSmrg	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
47615b16253fSmrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
47625b16253fSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
47635b16253fSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47645b16253fSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
47655b16253fSmrg	  ;;
47665b16253fSmrg	*Sun\ F* | *Sun*Fortran*)
47675b16253fSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
47685b16253fSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47695b16253fSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
47705b16253fSmrg	  ;;
47715b16253fSmrg	*Sun\ C*)
47725b16253fSmrg	  # Sun C 5.9
47735b16253fSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
47745b16253fSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47755b16253fSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47765b16253fSmrg	  ;;
47775b16253fSmrg        *Intel*\ [[CF]]*Compiler*)
47785b16253fSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47795b16253fSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
47805b16253fSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
47815b16253fSmrg	  ;;
47825b16253fSmrg	*Portland\ Group*)
47835b16253fSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47845b16253fSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
47855b16253fSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47865b16253fSmrg	  ;;
47875b16253fSmrg	esac
47885b16253fSmrg	;;
47895b16253fSmrg      esac
47905b16253fSmrg      ;;
47915b16253fSmrg
47925b16253fSmrg    newsos6)
47935b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
47945b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
47955b16253fSmrg      ;;
47965b16253fSmrg
47975b16253fSmrg    *nto* | *qnx*)
47985b16253fSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
47995b16253fSmrg      # it will coredump.
48005b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
48015b16253fSmrg      ;;
48025b16253fSmrg
48035b16253fSmrg    osf3* | osf4* | osf5*)
48045b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
48055b16253fSmrg      # All OSF/1 code is PIC.
48065b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
48075b16253fSmrg      ;;
48085b16253fSmrg
48095b16253fSmrg    rdos*)
48105b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
48115b16253fSmrg      ;;
48125b16253fSmrg
48135b16253fSmrg    solaris*)
48145b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
48155b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48165b16253fSmrg      case $cc_basename in
48175b16253fSmrg      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
48185b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
48195b16253fSmrg      *)
48205b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
48215b16253fSmrg      esac
48225b16253fSmrg      ;;
48235b16253fSmrg
48245b16253fSmrg    sunos4*)
48255b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
48265b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
48275b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48285b16253fSmrg      ;;
48295b16253fSmrg
48305b16253fSmrg    sysv4 | sysv4.2uw2* | sysv4.3*)
48315b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
48325b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
48335b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48345b16253fSmrg      ;;
48355b16253fSmrg
48365b16253fSmrg    sysv4*MP*)
48375b16253fSmrg      if test -d /usr/nec; then
48385b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
48395b16253fSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48405b16253fSmrg      fi
48415b16253fSmrg      ;;
48425b16253fSmrg
48435b16253fSmrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
48445b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
48455b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
48465b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48475b16253fSmrg      ;;
48485b16253fSmrg
48495b16253fSmrg    unicos*)
48505b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
48515b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
48525b16253fSmrg      ;;
48535b16253fSmrg
48545b16253fSmrg    uts4*)
48555b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
48565b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
48575b16253fSmrg      ;;
48585b16253fSmrg
48595b16253fSmrg    *)
48605b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
48615b16253fSmrg      ;;
48625b16253fSmrg    esac
48635b16253fSmrg  fi
48645b16253fSmrg])
48655b16253fSmrgcase $host_os in
48665b16253fSmrg  # For platforms that do not support PIC, -DPIC is meaningless:
48675b16253fSmrg  *djgpp*)
48685b16253fSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
48695b16253fSmrg    ;;
48705b16253fSmrg  *)
48715b16253fSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
48725b16253fSmrg    ;;
48735b16253fSmrgesac
48745b16253fSmrg
48755b16253fSmrgAC_CACHE_CHECK([for $compiler option to produce PIC],
48765b16253fSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
48775b16253fSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
48785b16253fSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
48795b16253fSmrg
48805b16253fSmrg#
48815b16253fSmrg# Check to make sure the PIC flag actually works.
48825b16253fSmrg#
48835b16253fSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
48845b16253fSmrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
48855b16253fSmrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
48865b16253fSmrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
48875b16253fSmrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
48885b16253fSmrg     "" | " "*) ;;
48895b16253fSmrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
48905b16253fSmrg     esac],
48915b16253fSmrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
48925b16253fSmrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
48935b16253fSmrgfi
48945b16253fSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
48955b16253fSmrg	[Additional compiler flags for building library objects])
48965b16253fSmrg
48975b16253fSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
48985b16253fSmrg	[How to pass a linker flag through the compiler])
48995b16253fSmrg#
49005b16253fSmrg# Check to make sure the static flag actually works.
49015b16253fSmrg#
49025b16253fSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
49035b16253fSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
49045b16253fSmrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
49055b16253fSmrg  $lt_tmp_static_flag,
49065b16253fSmrg  [],
49075b16253fSmrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
49085b16253fSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
49095b16253fSmrg	[Compiler flag to prevent dynamic linking])
49105b16253fSmrg])# _LT_COMPILER_PIC
49115b16253fSmrg
49125b16253fSmrg
49135b16253fSmrg# _LT_LINKER_SHLIBS([TAGNAME])
49145b16253fSmrg# ----------------------------
49155b16253fSmrg# See if the linker supports building shared libraries.
49165b16253fSmrgm4_defun([_LT_LINKER_SHLIBS],
49175b16253fSmrg[AC_REQUIRE([LT_PATH_LD])dnl
49185b16253fSmrgAC_REQUIRE([LT_PATH_NM])dnl
49195b16253fSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
49205b16253fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
49215b16253fSmrgm4_require([_LT_DECL_EGREP])dnl
49225b16253fSmrgm4_require([_LT_DECL_SED])dnl
49235b16253fSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
49245b16253fSmrgm4_require([_LT_TAG_COMPILER])dnl
49255b16253fSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
49265b16253fSmrgm4_if([$1], [CXX], [
49275b16253fSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
49285b16253fSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
49295b16253fSmrg  case $host_os in
49305b16253fSmrg  aix[[4-9]]*)
49315b16253fSmrg    # If we're using GNU nm, then we don't want the "-C" option.
49325b16253fSmrg    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
49335b16253fSmrg    # Without the "-l" option, or with the "-B" option, AIX nm treats
49345b16253fSmrg    # weak defined symbols like other global defined symbols, whereas
49355b16253fSmrg    # GNU nm marks them as "W".
49365b16253fSmrg    # While the 'weak' keyword is ignored in the Export File, we need
49375b16253fSmrg    # it in the Import File for the 'aix-soname' feature, so we have
49385b16253fSmrg    # to replace the "-B" option with "-P" for AIX nm.
49395b16253fSmrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
49405b16253fSmrg      _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'
49415b16253fSmrg    else
49425b16253fSmrg      _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'
49435b16253fSmrg    fi
49445b16253fSmrg    ;;
49455b16253fSmrg  pw32*)
49465b16253fSmrg    _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
49475b16253fSmrg    ;;
49485b16253fSmrg  cygwin* | mingw* | cegcc*)
49495b16253fSmrg    case $cc_basename in
49505b16253fSmrg    cl* | icl*)
49515b16253fSmrg      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
49525b16253fSmrg      ;;
49535b16253fSmrg    *)
49545b16253fSmrg      _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'
49555b16253fSmrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
49565b16253fSmrg      ;;
49575b16253fSmrg    esac
49585b16253fSmrg    ;;
49595b16253fSmrg  *)
49605b16253fSmrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
49615b16253fSmrg    ;;
49625b16253fSmrg  esac
49635b16253fSmrg], [
49645b16253fSmrg  runpath_var=
49655b16253fSmrg  _LT_TAGVAR(allow_undefined_flag, $1)=
49665b16253fSmrg  _LT_TAGVAR(always_export_symbols, $1)=no
49675b16253fSmrg  _LT_TAGVAR(archive_cmds, $1)=
49685b16253fSmrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
49695b16253fSmrg  _LT_TAGVAR(compiler_needs_object, $1)=no
49705b16253fSmrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
49715b16253fSmrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
49725b16253fSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
49735b16253fSmrg  _LT_TAGVAR(hardcode_automatic, $1)=no
49745b16253fSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
49755b16253fSmrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
49765b16253fSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
49775b16253fSmrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
49785b16253fSmrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
49795b16253fSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
49805b16253fSmrg  _LT_TAGVAR(inherit_rpath, $1)=no
49815b16253fSmrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
49825b16253fSmrg  _LT_TAGVAR(module_cmds, $1)=
49835b16253fSmrg  _LT_TAGVAR(module_expsym_cmds, $1)=
49845b16253fSmrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
49855b16253fSmrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
49865b16253fSmrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
49875b16253fSmrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
49885b16253fSmrg  # include_expsyms should be a list of space-separated symbols to be *always*
49895b16253fSmrg  # included in the symbol list
49905b16253fSmrg  _LT_TAGVAR(include_expsyms, $1)=
49915b16253fSmrg  # exclude_expsyms can be an extended regexp of symbols to exclude
49925b16253fSmrg  # it will be wrapped by ' (' and ')$', so one must not match beginning or
49935b16253fSmrg  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
49945b16253fSmrg  # as well as any symbol that contains 'd'.
49955b16253fSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
49965b16253fSmrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
49975b16253fSmrg  # platforms (ab)use it in PIC code, but their linkers get confused if
49985b16253fSmrg  # the symbol is explicitly referenced.  Since portable code cannot
49995b16253fSmrg  # rely on this symbol name, it's probably fine to never include it in
50005b16253fSmrg  # preloaded symbol tables.
50015b16253fSmrg  # Exclude shared library initialization/finalization symbols.
50025b16253fSmrgdnl Note also adjust exclude_expsyms for C++ above.
50035b16253fSmrg  extract_expsyms_cmds=
50045b16253fSmrg
50055b16253fSmrg  case $host_os in
50065b16253fSmrg  cygwin* | mingw* | pw32* | cegcc*)
50075b16253fSmrg    # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
50085b16253fSmrg    # When not using gcc, we currently assume that we are using
50095b16253fSmrg    # Microsoft Visual C++ or Intel C++ Compiler.
50105b16253fSmrg    if test yes != "$GCC"; then
50115b16253fSmrg      with_gnu_ld=no
50125b16253fSmrg    fi
50135b16253fSmrg    ;;
50145b16253fSmrg  interix*)
50155b16253fSmrg    # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
50165b16253fSmrg    with_gnu_ld=yes
50175b16253fSmrg    ;;
50185b16253fSmrg  openbsd* | bitrig*)
50195b16253fSmrg    with_gnu_ld=no
50205b16253fSmrg    ;;
50215b16253fSmrg  esac
50225b16253fSmrg
50235b16253fSmrg  _LT_TAGVAR(ld_shlibs, $1)=yes
50245b16253fSmrg
50255b16253fSmrg  # On some targets, GNU ld is compatible enough with the native linker
50265b16253fSmrg  # that we're better off using the native interface for both.
50275b16253fSmrg  lt_use_gnu_ld_interface=no
50285b16253fSmrg  if test yes = "$with_gnu_ld"; then
50295b16253fSmrg    case $host_os in
50305b16253fSmrg      aix*)
50315b16253fSmrg	# The AIX port of GNU ld has always aspired to compatibility
50325b16253fSmrg	# with the native linker.  However, as the warning in the GNU ld
50335b16253fSmrg	# block says, versions before 2.19.5* couldn't really create working
50345b16253fSmrg	# shared libraries, regardless of the interface used.
50355b16253fSmrg	case `$LD -v 2>&1` in
50365b16253fSmrg	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
50375b16253fSmrg	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
50385b16253fSmrg	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
50395b16253fSmrg	  *)
50405b16253fSmrg	    lt_use_gnu_ld_interface=yes
50415b16253fSmrg	    ;;
50425b16253fSmrg	esac
50435b16253fSmrg	;;
50445b16253fSmrg      *)
50455b16253fSmrg	lt_use_gnu_ld_interface=yes
50465b16253fSmrg	;;
50475b16253fSmrg    esac
50485b16253fSmrg  fi
50495b16253fSmrg
50505b16253fSmrg  if test yes = "$lt_use_gnu_ld_interface"; then
50515b16253fSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
50525b16253fSmrg    wlarc='$wl'
50535b16253fSmrg
50545b16253fSmrg    # Set some defaults for GNU ld with shared library support. These
50555b16253fSmrg    # are reset later if shared libraries are not supported. Putting them
50565b16253fSmrg    # here allows them to be overridden if necessary.
50575b16253fSmrg    runpath_var=LD_RUN_PATH
50585b16253fSmrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
50595b16253fSmrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
50605b16253fSmrg    # ancient GNU ld didn't support --whole-archive et. al.
50615b16253fSmrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
50625b16253fSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
50635b16253fSmrg    else
50645b16253fSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
50655b16253fSmrg    fi
50665b16253fSmrg    supports_anon_versioning=no
50675b16253fSmrg    case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in
50685b16253fSmrg      *GNU\ gold*) supports_anon_versioning=yes ;;
50695b16253fSmrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
50705b16253fSmrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
50715b16253fSmrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
50725b16253fSmrg      *\ 2.11.*) ;; # other 2.11 versions
50735b16253fSmrg      *) supports_anon_versioning=yes ;;
50745b16253fSmrg    esac
50755b16253fSmrg
50765b16253fSmrg    # See if GNU ld supports shared libraries.
50775b16253fSmrg    case $host_os in
50785b16253fSmrg    aix[[3-9]]*)
50795b16253fSmrg      # On AIX/PPC, the GNU linker is very broken
50805b16253fSmrg      if test ia64 != "$host_cpu"; then
50815b16253fSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
50825b16253fSmrg	cat <<_LT_EOF 1>&2
50835b16253fSmrg
50845b16253fSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported
50855b16253fSmrg*** to be unable to reliably create shared libraries on AIX.
50865b16253fSmrg*** Therefore, libtool is disabling shared libraries support.  If you
50875b16253fSmrg*** really care for shared libraries, you may want to install binutils
50885b16253fSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
50895b16253fSmrg*** You will then need to restart the configuration process.
50905b16253fSmrg
50915b16253fSmrg_LT_EOF
50925b16253fSmrg      fi
50935b16253fSmrg      ;;
50945b16253fSmrg
50955b16253fSmrg    amigaos*)
50965b16253fSmrg      case $host_cpu in
50975b16253fSmrg      powerpc)
50985b16253fSmrg            # see comment about AmigaOS4 .so support
50995b16253fSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
51005b16253fSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
51015b16253fSmrg        ;;
51025b16253fSmrg      m68k)
51035b16253fSmrg            _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)'
51045b16253fSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
51055b16253fSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
51065b16253fSmrg        ;;
51075b16253fSmrg      esac
51085b16253fSmrg      ;;
51095b16253fSmrg
51105b16253fSmrg    beos*)
51115b16253fSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
51125b16253fSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
51135b16253fSmrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
51145b16253fSmrg	# support --undefined.  This deserves some investigation.  FIXME
51155b16253fSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
51165b16253fSmrg      else
51175b16253fSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
51185b16253fSmrg      fi
51195b16253fSmrg      ;;
51205b16253fSmrg
51215b16253fSmrg    cygwin* | mingw* | pw32* | cegcc*)
51225b16253fSmrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
51235b16253fSmrg      # as there is no search path for DLLs.
51245b16253fSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
51255b16253fSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
51265b16253fSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
51275b16253fSmrg      _LT_TAGVAR(always_export_symbols, $1)=no
51285b16253fSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
51295b16253fSmrg      _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'
51305b16253fSmrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
51315b16253fSmrg
51325b16253fSmrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
51335b16253fSmrg        _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'
51345b16253fSmrg	# If the export-symbols file already is a .def file, use it as
51355b16253fSmrg	# is; otherwise, prepend EXPORTS...
51365b16253fSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
51375b16253fSmrg          cp $export_symbols $output_objdir/$soname.def;
51385b16253fSmrg        else
51395b16253fSmrg          echo EXPORTS > $output_objdir/$soname.def;
51405b16253fSmrg          cat $export_symbols >> $output_objdir/$soname.def;
51415b16253fSmrg        fi~
51425b16253fSmrg        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
51435b16253fSmrg      else
51445b16253fSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
51455b16253fSmrg      fi
51465b16253fSmrg      ;;
51475b16253fSmrg
51485b16253fSmrg    haiku*)
51495b16253fSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
51505b16253fSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
51515b16253fSmrg      ;;
51525b16253fSmrg
51535b16253fSmrg    os2*)
51545b16253fSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
51555b16253fSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
51565b16253fSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
51575b16253fSmrg      shrext_cmds=.dll
51585b16253fSmrg      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
51595b16253fSmrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
51605b16253fSmrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
51615b16253fSmrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
51625b16253fSmrg	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
51635b16253fSmrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
51645b16253fSmrg	emximp -o $lib $output_objdir/$libname.def'
51655b16253fSmrg      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
51665b16253fSmrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
51675b16253fSmrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
51685b16253fSmrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
51695b16253fSmrg	prefix_cmds="$SED"~
51705b16253fSmrg	if test EXPORTS = "`$SED 1q $export_symbols`"; then
51715b16253fSmrg	  prefix_cmds="$prefix_cmds -e 1d";
51725b16253fSmrg	fi~
51735b16253fSmrg	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
51745b16253fSmrg	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
51755b16253fSmrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
51765b16253fSmrg	emximp -o $lib $output_objdir/$libname.def'
51775b16253fSmrg      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
51785b16253fSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
51795b16253fSmrg      _LT_TAGVAR(file_list_spec, $1)='@'
51805b16253fSmrg      ;;
51815b16253fSmrg
51825b16253fSmrg    interix[[3-9]]*)
51835b16253fSmrg      _LT_TAGVAR(hardcode_direct, $1)=no
51845b16253fSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
51855b16253fSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
51865b16253fSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
51875b16253fSmrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
51885b16253fSmrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
51895b16253fSmrg      # default) and relocated if they conflict, which is a slow very memory
51905b16253fSmrg      # consuming and fragmenting process.  To avoid this, we pick a random,
51915b16253fSmrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
51925b16253fSmrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
51935b16253fSmrg      _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'
51945b16253fSmrg      _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'
51955b16253fSmrg      ;;
51965b16253fSmrg
51975b16253fSmrg    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
51985b16253fSmrg      tmp_diet=no
51995b16253fSmrg      if test linux-dietlibc = "$host_os"; then
52005b16253fSmrg	case $cc_basename in
52015b16253fSmrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
52025b16253fSmrg	esac
52035b16253fSmrg      fi
52045b16253fSmrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
52055b16253fSmrg	 && test no = "$tmp_diet"
52065b16253fSmrg      then
52075b16253fSmrg	tmp_addflag=' $pic_flag'
52085b16253fSmrg	tmp_sharedflag='-shared'
52095b16253fSmrg	case $cc_basename,$host_cpu in
52105b16253fSmrg        pgcc*)				# Portland Group C compiler
52115b16253fSmrg	  _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'
52125b16253fSmrg	  tmp_addflag=' $pic_flag'
52135b16253fSmrg	  ;;
52145b16253fSmrg	pgf77* | pgf90* | pgf95* | pgfortran*)
52155b16253fSmrg					# Portland Group f77 and f90 compilers
52165b16253fSmrg	  _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'
52175b16253fSmrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
52185b16253fSmrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
52195b16253fSmrg	  tmp_addflag=' -i_dynamic' ;;
52205b16253fSmrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
52215b16253fSmrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
52225b16253fSmrg	ifc* | ifort*)			# Intel Fortran compiler
52235b16253fSmrg	  tmp_addflag=' -nofor_main' ;;
52245b16253fSmrg	lf95*)				# Lahey Fortran 8.1
52255b16253fSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
52265b16253fSmrg	  tmp_sharedflag='--shared' ;;
52275b16253fSmrg        nagfor*)                        # NAGFOR 5.3
52285b16253fSmrg          tmp_sharedflag='-Wl,-shared' ;;
52295b16253fSmrg	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
52305b16253fSmrg	  tmp_sharedflag='-qmkshrobj'
52315b16253fSmrg	  tmp_addflag= ;;
52325b16253fSmrg	nvcc*)	# Cuda Compiler Driver 2.2
52335b16253fSmrg	  _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'
52345b16253fSmrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
52355b16253fSmrg	  ;;
52365b16253fSmrg	esac
52375b16253fSmrg	case `$CC -V 2>&1 | $SED 5q` in
52385b16253fSmrg	*Sun\ C*)			# Sun C 5.9
52395b16253fSmrg	  _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'
52405b16253fSmrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
52415b16253fSmrg	  tmp_sharedflag='-G' ;;
52425b16253fSmrg	*Sun\ F*)			# Sun Fortran 8.3
52435b16253fSmrg	  tmp_sharedflag='-G' ;;
52445b16253fSmrg	esac
52455b16253fSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
52465b16253fSmrg
52475b16253fSmrg        if test yes = "$supports_anon_versioning"; then
52485b16253fSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
52495b16253fSmrg            cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
52505b16253fSmrg            echo "local: *; };" >> $output_objdir/$libname.ver~
52515b16253fSmrg            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
52525b16253fSmrg        fi
52535b16253fSmrg
52545b16253fSmrg	case $cc_basename in
52555b16253fSmrg	tcc*)
52565b16253fSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
52575b16253fSmrg	  ;;
52585b16253fSmrg	xlf* | bgf* | bgxlf* | mpixlf*)
52595b16253fSmrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
52605b16253fSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
52615b16253fSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
52625b16253fSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
52635b16253fSmrg	  if test yes = "$supports_anon_versioning"; then
52645b16253fSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
52655b16253fSmrg              cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
52665b16253fSmrg              echo "local: *; };" >> $output_objdir/$libname.ver~
52675b16253fSmrg              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
52685b16253fSmrg	  fi
52695b16253fSmrg	  ;;
52705b16253fSmrg	esac
52715b16253fSmrg      else
52725b16253fSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
52735b16253fSmrg      fi
52745b16253fSmrg      ;;
52755b16253fSmrg
52765b16253fSmrg    netbsd*)
52775b16253fSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
52785b16253fSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
52795b16253fSmrg	wlarc=
52805b16253fSmrg      else
52815b16253fSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
52825b16253fSmrg	_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'
52835b16253fSmrg      fi
52845b16253fSmrg      ;;
52855b16253fSmrg
52865b16253fSmrg    solaris*)
52875b16253fSmrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
52885b16253fSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
52895b16253fSmrg	cat <<_LT_EOF 1>&2
52905b16253fSmrg
52915b16253fSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
52925b16253fSmrg*** create shared libraries on Solaris systems.  Therefore, libtool
52935b16253fSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
52945b16253fSmrg*** binutils to release 2.9.1 or newer.  Another option is to modify
52955b16253fSmrg*** your PATH or compiler configuration so that the native linker is
52965b16253fSmrg*** used, and then restart.
52975b16253fSmrg
52985b16253fSmrg_LT_EOF
52995b16253fSmrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
53005b16253fSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
53015b16253fSmrg	_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'
53025b16253fSmrg      else
53035b16253fSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
53045b16253fSmrg      fi
53055b16253fSmrg      ;;
53065b16253fSmrg
53075b16253fSmrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
53085b16253fSmrg      case `$LD -v 2>&1` in
53095b16253fSmrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
53105b16253fSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
53115b16253fSmrg	cat <<_LT_EOF 1>&2
53125b16253fSmrg
53135b16253fSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
53145b16253fSmrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
53155b16253fSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
53165b16253fSmrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
53175b16253fSmrg*** your PATH or compiler configuration so that the native linker is
53185b16253fSmrg*** used, and then restart.
53195b16253fSmrg
53205b16253fSmrg_LT_EOF
53215b16253fSmrg	;;
53225b16253fSmrg	*)
53235b16253fSmrg	  # For security reasons, it is highly recommended that you always
53245b16253fSmrg	  # use absolute paths for naming shared libraries, and exclude the
53255b16253fSmrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
53265b16253fSmrg	  # requires that you compile everything twice, which is a pain.
53275b16253fSmrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
53285b16253fSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
53295b16253fSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
53305b16253fSmrg	    _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'
53315b16253fSmrg	  else
53325b16253fSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
53335b16253fSmrg	  fi
53345b16253fSmrg	;;
53355b16253fSmrg      esac
53365b16253fSmrg      ;;
53375b16253fSmrg
53385b16253fSmrg    sunos4*)
53395b16253fSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
53405b16253fSmrg      wlarc=
53415b16253fSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
53425b16253fSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
53435b16253fSmrg      ;;
53445b16253fSmrg
53455b16253fSmrg    *)
53465b16253fSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
53475b16253fSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
53485b16253fSmrg	_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'
53495b16253fSmrg      else
53505b16253fSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
53515b16253fSmrg      fi
53525b16253fSmrg      ;;
53535b16253fSmrg    esac
53545b16253fSmrg
53555b16253fSmrg    if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
53565b16253fSmrg      runpath_var=
53575b16253fSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
53585b16253fSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
53595b16253fSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
53605b16253fSmrg    fi
53615b16253fSmrg  else
53625b16253fSmrg    # PORTME fill in a description of your system's linker (not GNU ld)
53635b16253fSmrg    case $host_os in
53645b16253fSmrg    aix3*)
53655b16253fSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
53665b16253fSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
53675b16253fSmrg      _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'
53685b16253fSmrg      # Note: this linker hardcodes the directories in LIBPATH if there
53695b16253fSmrg      # are no directories specified by -L.
53705b16253fSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
53715b16253fSmrg      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
53725b16253fSmrg	# Neither direct hardcoding nor static linking is supported with a
53735b16253fSmrg	# broken collect2.
53745b16253fSmrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
53755b16253fSmrg      fi
53765b16253fSmrg      ;;
53775b16253fSmrg
53785b16253fSmrg    aix[[4-9]]*)
53795b16253fSmrg      if test ia64 = "$host_cpu"; then
53805b16253fSmrg	# On IA64, the linker does run time linking by default, so we don't
53815b16253fSmrg	# have to do anything special.
53825b16253fSmrg	aix_use_runtimelinking=no
53835b16253fSmrg	exp_sym_flag='-Bexport'
53845b16253fSmrg	no_entry_flag=
53855b16253fSmrg      else
53865b16253fSmrg	# If we're using GNU nm, then we don't want the "-C" option.
53875b16253fSmrg	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
53885b16253fSmrg	# Without the "-l" option, or with the "-B" option, AIX nm treats
53895b16253fSmrg	# weak defined symbols like other global defined symbols, whereas
53905b16253fSmrg	# GNU nm marks them as "W".
53915b16253fSmrg	# While the 'weak' keyword is ignored in the Export File, we need
53925b16253fSmrg	# it in the Import File for the 'aix-soname' feature, so we have
53935b16253fSmrg	# to replace the "-B" option with "-P" for AIX nm.
53945b16253fSmrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
53955b16253fSmrg	  _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'
53965b16253fSmrg	else
53975b16253fSmrg	  _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'
53985b16253fSmrg	fi
53995b16253fSmrg	aix_use_runtimelinking=no
54005b16253fSmrg
54015b16253fSmrg	# Test if we are trying to use run time linking or normal
54025b16253fSmrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
54035b16253fSmrg	# have runtime linking enabled, and use it for executables.
54045b16253fSmrg	# For shared libraries, we enable/disable runtime linking
54055b16253fSmrg	# depending on the kind of the shared library created -
54065b16253fSmrg	# when "with_aix_soname,aix_use_runtimelinking" is:
54075b16253fSmrg	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
54085b16253fSmrg	# "aix,yes"  lib.so          shared, rtl:yes, for executables
54095b16253fSmrg	#            lib.a           static archive
54105b16253fSmrg	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
54115b16253fSmrg	#            lib.a(lib.so.V) shared, rtl:no,  for executables
54125b16253fSmrg	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
54135b16253fSmrg	#            lib.a(lib.so.V) shared, rtl:no
54145b16253fSmrg	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
54155b16253fSmrg	#            lib.a           static archive
54165b16253fSmrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
54175b16253fSmrg	  for ld_flag in $LDFLAGS; do
54185b16253fSmrg	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
54195b16253fSmrg	    aix_use_runtimelinking=yes
54205b16253fSmrg	    break
54215b16253fSmrg	  fi
54225b16253fSmrg	  done
54235b16253fSmrg	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
54245b16253fSmrg	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
54255b16253fSmrg	    # so we don't have lib.a shared libs to link our executables.
54265b16253fSmrg	    # We have to force runtime linking in this case.
54275b16253fSmrg	    aix_use_runtimelinking=yes
54285b16253fSmrg	    LDFLAGS="$LDFLAGS -Wl,-brtl"
54295b16253fSmrg	  fi
54305b16253fSmrg	  ;;
54315b16253fSmrg	esac
54325b16253fSmrg
54335b16253fSmrg	exp_sym_flag='-bexport'
54345b16253fSmrg	no_entry_flag='-bnoentry'
54355b16253fSmrg      fi
54365b16253fSmrg
54375b16253fSmrg      # When large executables or shared objects are built, AIX ld can
54385b16253fSmrg      # have problems creating the table of contents.  If linking a library
54395b16253fSmrg      # or program results in "error TOC overflow" add -mminimal-toc to
54405b16253fSmrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
54415b16253fSmrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
54425b16253fSmrg
54435b16253fSmrg      _LT_TAGVAR(archive_cmds, $1)=''
54445b16253fSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
54455b16253fSmrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
54465b16253fSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
54475b16253fSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
54485b16253fSmrg      _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
54495b16253fSmrg      case $with_aix_soname,$aix_use_runtimelinking in
54505b16253fSmrg      aix,*) ;; # traditional, no import file
54515b16253fSmrg      svr4,* | *,yes) # use import file
54525b16253fSmrg	# The Import File defines what to hardcode.
54535b16253fSmrg	_LT_TAGVAR(hardcode_direct, $1)=no
54545b16253fSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=no
54555b16253fSmrg	;;
54565b16253fSmrg      esac
54575b16253fSmrg
54585b16253fSmrg      if test yes = "$GCC"; then
54595b16253fSmrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
54605b16253fSmrg	# We only want to do this on AIX 4.2 and lower, the check
54615b16253fSmrg	# below for broken collect2 doesn't work under 4.3+
54625b16253fSmrg	  collect2name=`$CC -print-prog-name=collect2`
54635b16253fSmrg	  if test -f "$collect2name" &&
54645b16253fSmrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
54655b16253fSmrg	  then
54665b16253fSmrg	  # We have reworked collect2
54675b16253fSmrg	  :
54685b16253fSmrg	  else
54695b16253fSmrg	  # We have old collect2
54705b16253fSmrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
54715b16253fSmrg	  # It fails to find uninstalled libraries when the uninstalled
54725b16253fSmrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
54735b16253fSmrg	  # to unsupported forces relinking
54745b16253fSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
54755b16253fSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
54765b16253fSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
54775b16253fSmrg	  fi
54785b16253fSmrg	  ;;
54795b16253fSmrg	esac
54805b16253fSmrg	shared_flag='-shared'
54815b16253fSmrg	if test yes = "$aix_use_runtimelinking"; then
54825b16253fSmrg	  shared_flag="$shared_flag "'$wl-G'
54835b16253fSmrg	fi
54845b16253fSmrg	# Need to ensure runtime linking is disabled for the traditional
54855b16253fSmrg	# shared library, or the linker may eventually find shared libraries
54865b16253fSmrg	# /with/ Import File - we do not want to mix them.
54875b16253fSmrg	shared_flag_aix='-shared'
54885b16253fSmrg	shared_flag_svr4='-shared $wl-G'
54895b16253fSmrg      else
54905b16253fSmrg	# not using gcc
54915b16253fSmrg	if test ia64 = "$host_cpu"; then
54925b16253fSmrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
54935b16253fSmrg	# chokes on -Wl,-G. The following line is correct:
54945b16253fSmrg	  shared_flag='-G'
54955b16253fSmrg	else
54965b16253fSmrg	  if test yes = "$aix_use_runtimelinking"; then
54975b16253fSmrg	    shared_flag='$wl-G'
54985b16253fSmrg	  else
54995b16253fSmrg	    shared_flag='$wl-bM:SRE'
55005b16253fSmrg	  fi
55015b16253fSmrg	  shared_flag_aix='$wl-bM:SRE'
55025b16253fSmrg	  shared_flag_svr4='$wl-G'
55035b16253fSmrg	fi
55045b16253fSmrg      fi
55055b16253fSmrg
55065b16253fSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
55075b16253fSmrg      # It seems that -bexpall does not export symbols beginning with
55085b16253fSmrg      # underscore (_), so it is better to generate a list of symbols to export.
55095b16253fSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
55105b16253fSmrg      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
55115b16253fSmrg	# Warning - without using the other runtime loading flags (-brtl),
55125b16253fSmrg	# -berok will link without error, but may produce a broken library.
55135b16253fSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
55145b16253fSmrg        # Determine the default libpath from the value encoded in an
55155b16253fSmrg        # empty executable.
55165b16253fSmrg        _LT_SYS_MODULE_PATH_AIX([$1])
55175b16253fSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
55185b16253fSmrg        _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
55195b16253fSmrg      else
55205b16253fSmrg	if test ia64 = "$host_cpu"; then
55215b16253fSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
55225b16253fSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
55235b16253fSmrg	  _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"
55245b16253fSmrg	else
55255b16253fSmrg	 # Determine the default libpath from the value encoded in an
55265b16253fSmrg	 # empty executable.
55275b16253fSmrg	 _LT_SYS_MODULE_PATH_AIX([$1])
55285b16253fSmrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
55295b16253fSmrg	  # Warning - without using the other run time loading flags,
55305b16253fSmrg	  # -berok will link without error, but may produce a broken library.
55315b16253fSmrg	  _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
55325b16253fSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
55335b16253fSmrg	  if test yes = "$with_gnu_ld"; then
55345b16253fSmrg	    # We only use this code for GNU lds that support --whole-archive.
55355b16253fSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
55365b16253fSmrg	  else
55375b16253fSmrg	    # Exported symbols can be pulled into shared objects from archives
55385b16253fSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
55395b16253fSmrg	  fi
55405b16253fSmrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
55415b16253fSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
55425b16253fSmrg	  # -brtl affects multiple linker settings, -berok does not and is overridden later
55435b16253fSmrg	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
55445b16253fSmrg	  if test svr4 != "$with_aix_soname"; then
55455b16253fSmrg	    # This is similar to how AIX traditionally builds its shared libraries.
55465b16253fSmrg	    _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'
55475b16253fSmrg	  fi
55485b16253fSmrg	  if test aix != "$with_aix_soname"; then
55495b16253fSmrg	    _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'
55505b16253fSmrg	  else
55515b16253fSmrg	    # used by -dlpreopen to get the symbols
55525b16253fSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
55535b16253fSmrg	  fi
55545b16253fSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
55555b16253fSmrg	fi
55565b16253fSmrg      fi
55575b16253fSmrg      ;;
55585b16253fSmrg
55595b16253fSmrg    amigaos*)
55605b16253fSmrg      case $host_cpu in
55615b16253fSmrg      powerpc)
55625b16253fSmrg            # see comment about AmigaOS4 .so support
55635b16253fSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
55645b16253fSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
55655b16253fSmrg        ;;
55665b16253fSmrg      m68k)
55675b16253fSmrg            _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)'
55685b16253fSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
55695b16253fSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
55705b16253fSmrg        ;;
55715b16253fSmrg      esac
55725b16253fSmrg      ;;
55735b16253fSmrg
55745b16253fSmrg    bsdi[[45]]*)
55755b16253fSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
55765b16253fSmrg      ;;
55775b16253fSmrg
55785b16253fSmrg    cygwin* | mingw* | pw32* | cegcc*)
55795b16253fSmrg      # When not using gcc, we currently assume that we are using
55805b16253fSmrg      # Microsoft Visual C++ or Intel C++ Compiler.
55815b16253fSmrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
55825b16253fSmrg      # no search path for DLLs.
55835b16253fSmrg      case $cc_basename in
55845b16253fSmrg      cl* | icl*)
55855b16253fSmrg	# Native MSVC or ICC
55865b16253fSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
55875b16253fSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
55885b16253fSmrg	_LT_TAGVAR(always_export_symbols, $1)=yes
55895b16253fSmrg	_LT_TAGVAR(file_list_spec, $1)='@'
55905b16253fSmrg	# Tell ltmain to make .lib files, not .a files.
55915b16253fSmrg	libext=lib
55925b16253fSmrg	# Tell ltmain to make .dll files, not .so files.
55935b16253fSmrg	shrext_cmds=.dll
55945b16253fSmrg	# FIXME: Setting linknames here is a bad hack.
55955b16253fSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
55965b16253fSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
55975b16253fSmrg            cp "$export_symbols" "$output_objdir/$soname.def";
55985b16253fSmrg            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
55995b16253fSmrg          else
56005b16253fSmrg            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
56015b16253fSmrg          fi~
56025b16253fSmrg          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
56035b16253fSmrg          linknames='
56045b16253fSmrg	# The linker will not automatically build a static lib if we build a DLL.
56055b16253fSmrg	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
56065b16253fSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
56075b16253fSmrg	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
56085b16253fSmrg	_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'
56095b16253fSmrg	# Don't use ranlib
56105b16253fSmrg	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
56115b16253fSmrg	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
56125b16253fSmrg          lt_tool_outputfile="@TOOL_OUTPUT@"~
56135b16253fSmrg          case $lt_outputfile in
56145b16253fSmrg            *.exe|*.EXE) ;;
56155b16253fSmrg            *)
56165b16253fSmrg              lt_outputfile=$lt_outputfile.exe
56175b16253fSmrg              lt_tool_outputfile=$lt_tool_outputfile.exe
56185b16253fSmrg              ;;
56195b16253fSmrg          esac~
56205b16253fSmrg          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
56215b16253fSmrg            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
56225b16253fSmrg            $RM "$lt_outputfile.manifest";
56235b16253fSmrg          fi'
56245b16253fSmrg	;;
56255b16253fSmrg      *)
56265b16253fSmrg	# Assume MSVC and ICC wrapper
56275b16253fSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
56285b16253fSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
56295b16253fSmrg	# Tell ltmain to make .lib files, not .a files.
56305b16253fSmrg	libext=lib
56315b16253fSmrg	# Tell ltmain to make .dll files, not .so files.
56325b16253fSmrg	shrext_cmds=.dll
56335b16253fSmrg	# FIXME: Setting linknames here is a bad hack.
56345b16253fSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
56355b16253fSmrg	# The linker will automatically build a .lib file if we build a DLL.
56365b16253fSmrg	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
56375b16253fSmrg	# FIXME: Should let the user specify the lib program.
56385b16253fSmrg	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
56395b16253fSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
56405b16253fSmrg	;;
56415b16253fSmrg      esac
56425b16253fSmrg      ;;
56435b16253fSmrg
56445b16253fSmrg    darwin* | rhapsody*)
56455b16253fSmrg      _LT_DARWIN_LINKER_FEATURES($1)
56465b16253fSmrg      ;;
56475b16253fSmrg
56485b16253fSmrg    dgux*)
56495b16253fSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
56505b16253fSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
56515b16253fSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
56525b16253fSmrg      ;;
56535b16253fSmrg
56545b16253fSmrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
56555b16253fSmrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
56565b16253fSmrg    # does not break anything, and helps significantly (at the cost of a little
56575b16253fSmrg    # extra space).
56585b16253fSmrg    freebsd2.2*)
56595b16253fSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
56605b16253fSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
56615b16253fSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
56625b16253fSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
56635b16253fSmrg      ;;
56645b16253fSmrg
56655b16253fSmrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
56665b16253fSmrg    freebsd2.*)
56675b16253fSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
56685b16253fSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
56695b16253fSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
56705b16253fSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
56715b16253fSmrg      ;;
56725b16253fSmrg
56735b16253fSmrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
56745b16253fSmrg    freebsd* | dragonfly* | midnightbsd*)
56755b16253fSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
56765b16253fSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
56775b16253fSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
56785b16253fSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
56795b16253fSmrg      ;;
56805b16253fSmrg
56815b16253fSmrg    hpux9*)
56825b16253fSmrg      if test yes = "$GCC"; then
56835b16253fSmrg	_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'
56845b16253fSmrg      else
56855b16253fSmrg	_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'
56865b16253fSmrg      fi
56875b16253fSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
56885b16253fSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
56895b16253fSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
56905b16253fSmrg
56915b16253fSmrg      # hardcode_minus_L: Not really in the search PATH,
56925b16253fSmrg      # but as the default location of the library.
56935b16253fSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
56945b16253fSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
56955b16253fSmrg      ;;
56965b16253fSmrg
56975b16253fSmrg    hpux10*)
56985b16253fSmrg      if test yes,no = "$GCC,$with_gnu_ld"; then
56995b16253fSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
57005b16253fSmrg      else
57015b16253fSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
57025b16253fSmrg      fi
57035b16253fSmrg      if test no = "$with_gnu_ld"; then
57045b16253fSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
57055b16253fSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
57065b16253fSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
57075b16253fSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
57085b16253fSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
57095b16253fSmrg	# hardcode_minus_L: Not really in the search PATH,
57105b16253fSmrg	# but as the default location of the library.
57115b16253fSmrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
57125b16253fSmrg      fi
57135b16253fSmrg      ;;
57145b16253fSmrg
57155b16253fSmrg    hpux11*)
57165b16253fSmrg      if test yes,no = "$GCC,$with_gnu_ld"; then
57175b16253fSmrg	case $host_cpu in
57185b16253fSmrg	hppa*64*)
57195b16253fSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
57205b16253fSmrg	  ;;
57215b16253fSmrg	ia64*)
57225b16253fSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
57235b16253fSmrg	  ;;
57245b16253fSmrg	*)
57255b16253fSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
57265b16253fSmrg	  ;;
57275b16253fSmrg	esac
57285b16253fSmrg      else
57295b16253fSmrg	case $host_cpu in
57305b16253fSmrg	hppa*64*)
57315b16253fSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
57325b16253fSmrg	  ;;
57335b16253fSmrg	ia64*)
57345b16253fSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
57355b16253fSmrg	  ;;
57365b16253fSmrg	*)
57375b16253fSmrg	m4_if($1, [], [
57385b16253fSmrg	  # Older versions of the 11.00 compiler do not understand -b yet
57395b16253fSmrg	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
57405b16253fSmrg	  _LT_LINKER_OPTION([if $CC understands -b],
57415b16253fSmrg	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
57425b16253fSmrg	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
57435b16253fSmrg	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
57445b16253fSmrg	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
57455b16253fSmrg	  ;;
57465b16253fSmrg	esac
57475b16253fSmrg      fi
57485b16253fSmrg      if test no = "$with_gnu_ld"; then
57495b16253fSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
57505b16253fSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
57515b16253fSmrg
57525b16253fSmrg	case $host_cpu in
57535b16253fSmrg	hppa*64*|ia64*)
57545b16253fSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
57555b16253fSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
57565b16253fSmrg	  ;;
57575b16253fSmrg	*)
57585b16253fSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
57595b16253fSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
57605b16253fSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
57615b16253fSmrg
57625b16253fSmrg	  # hardcode_minus_L: Not really in the search PATH,
57635b16253fSmrg	  # but as the default location of the library.
57645b16253fSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
57655b16253fSmrg	  ;;
57665b16253fSmrg	esac
57675b16253fSmrg      fi
57685b16253fSmrg      ;;
57695b16253fSmrg
57705b16253fSmrg    irix5* | irix6* | nonstopux*)
57715b16253fSmrg      if test yes = "$GCC"; then
57725b16253fSmrg	_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'
57735b16253fSmrg	# Try to use the -exported_symbol ld option, if it does not
57745b16253fSmrg	# work, assume that -exports_file does not work either and
57755b16253fSmrg	# implicitly export all symbols.
57765b16253fSmrg	# This should be the same for all languages, so no per-tag cache variable.
57775b16253fSmrg	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
57785b16253fSmrg	  [lt_cv_irix_exported_symbol],
57795b16253fSmrg	  [save_LDFLAGS=$LDFLAGS
57805b16253fSmrg	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
57815b16253fSmrg	   AC_LINK_IFELSE(
57825b16253fSmrg	     [AC_LANG_SOURCE(
57835b16253fSmrg	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
57845b16253fSmrg			      [C++], [[int foo (void) { return 0; }]],
57855b16253fSmrg			      [Fortran 77], [[
57865b16253fSmrg      subroutine foo
57875b16253fSmrg      end]],
57885b16253fSmrg			      [Fortran], [[
57895b16253fSmrg      subroutine foo
57905b16253fSmrg      end]])])],
57915b16253fSmrg	      [lt_cv_irix_exported_symbol=yes],
57925b16253fSmrg	      [lt_cv_irix_exported_symbol=no])
57935b16253fSmrg           LDFLAGS=$save_LDFLAGS])
57945b16253fSmrg	if test yes = "$lt_cv_irix_exported_symbol"; then
57955b16253fSmrg          _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'
57965b16253fSmrg	fi
57975b16253fSmrg      else
57985b16253fSmrg	_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'
57995b16253fSmrg	_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'
58005b16253fSmrg      fi
58015b16253fSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
58025b16253fSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
58035b16253fSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
58045b16253fSmrg      _LT_TAGVAR(inherit_rpath, $1)=yes
58055b16253fSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
58065b16253fSmrg      ;;
58075b16253fSmrg
58085b16253fSmrg    linux*)
58095b16253fSmrg      case $cc_basename in
58105b16253fSmrg      tcc*)
58115b16253fSmrg	# Fabrice Bellard et al's Tiny C Compiler
58125b16253fSmrg	_LT_TAGVAR(ld_shlibs, $1)=yes
58135b16253fSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
58145b16253fSmrg	;;
58155b16253fSmrg      esac
58165b16253fSmrg      ;;
58175b16253fSmrg
58185b16253fSmrg    netbsd*)
58195b16253fSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
58205b16253fSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
58215b16253fSmrg      else
58225b16253fSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
58235b16253fSmrg      fi
58245b16253fSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
58255b16253fSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
58265b16253fSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
58275b16253fSmrg      ;;
58285b16253fSmrg
58295b16253fSmrg    newsos6)
58305b16253fSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
58315b16253fSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
58325b16253fSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
58335b16253fSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
58345b16253fSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
58355b16253fSmrg      ;;
58365b16253fSmrg
58375b16253fSmrg    *nto* | *qnx*)
58385b16253fSmrg      ;;
58395b16253fSmrg
58405b16253fSmrg    openbsd* | bitrig*)
58415b16253fSmrg      if test -f /usr/libexec/ld.so; then
58425b16253fSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
58435b16253fSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
58445b16253fSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
58455b16253fSmrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
58465b16253fSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
58475b16253fSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
58485b16253fSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
58495b16253fSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
58505b16253fSmrg	else
58515b16253fSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
58525b16253fSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
58535b16253fSmrg	fi
58545b16253fSmrg      else
58555b16253fSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
58565b16253fSmrg      fi
58575b16253fSmrg      ;;
58585b16253fSmrg
58595b16253fSmrg    os2*)
58605b16253fSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
58615b16253fSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
58625b16253fSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
58635b16253fSmrg      shrext_cmds=.dll
58645b16253fSmrg      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
58655b16253fSmrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
58665b16253fSmrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
58675b16253fSmrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
58685b16253fSmrg	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
58695b16253fSmrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
58705b16253fSmrg	emximp -o $lib $output_objdir/$libname.def'
58715b16253fSmrg      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
58725b16253fSmrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
58735b16253fSmrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
58745b16253fSmrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
58755b16253fSmrg	prefix_cmds="$SED"~
58765b16253fSmrg	if test EXPORTS = "`$SED 1q $export_symbols`"; then
58775b16253fSmrg	  prefix_cmds="$prefix_cmds -e 1d";
58785b16253fSmrg	fi~
58795b16253fSmrg	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
58805b16253fSmrg	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
58815b16253fSmrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
58825b16253fSmrg	emximp -o $lib $output_objdir/$libname.def'
58835b16253fSmrg      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
58845b16253fSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
58855b16253fSmrg      _LT_TAGVAR(file_list_spec, $1)='@'
58865b16253fSmrg      ;;
58875b16253fSmrg
58885b16253fSmrg    osf3*)
58895b16253fSmrg      if test yes = "$GCC"; then
58905b16253fSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
58915b16253fSmrg	_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'
58925b16253fSmrg      else
58935b16253fSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
58945b16253fSmrg	_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'
58955b16253fSmrg      fi
58965b16253fSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
58975b16253fSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
58985b16253fSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
58995b16253fSmrg      ;;
59005b16253fSmrg
59015b16253fSmrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
59025b16253fSmrg      if test yes = "$GCC"; then
59035b16253fSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
59045b16253fSmrg	_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'
59055b16253fSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
59065b16253fSmrg      else
59075b16253fSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
59085b16253fSmrg	_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'
59095b16253fSmrg	_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~
59105b16253fSmrg          $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'
59115b16253fSmrg
59125b16253fSmrg	# Both c and cxx compiler support -rpath directly
59135b16253fSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
59145b16253fSmrg      fi
59155b16253fSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
59165b16253fSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
59175b16253fSmrg      ;;
59185b16253fSmrg
59195b16253fSmrg    solaris*)
59205b16253fSmrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
59215b16253fSmrg      if test yes = "$GCC"; then
59225b16253fSmrg	wlarc='$wl'
59235b16253fSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
59245b16253fSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
59255b16253fSmrg          $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'
59265b16253fSmrg      else
59275b16253fSmrg	case `$CC -V 2>&1` in
59285b16253fSmrg	*"Compilers 5.0"*)
59295b16253fSmrg	  wlarc=''
59305b16253fSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
59315b16253fSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
59325b16253fSmrg            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
59335b16253fSmrg	  ;;
59345b16253fSmrg	*)
59355b16253fSmrg	  wlarc='$wl'
59365b16253fSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
59375b16253fSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
59385b16253fSmrg            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
59395b16253fSmrg	  ;;
59405b16253fSmrg	esac
59415b16253fSmrg      fi
59425b16253fSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
59435b16253fSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
59445b16253fSmrg      case $host_os in
59455b16253fSmrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
59465b16253fSmrg      *)
59475b16253fSmrg	# The compiler driver will combine and reorder linker options,
59485b16253fSmrg	# but understands '-z linker_flag'.  GCC discards it without '$wl',
59495b16253fSmrg	# but is careful enough not to reorder.
59505b16253fSmrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
59515b16253fSmrg	if test yes = "$GCC"; then
59525b16253fSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
59535b16253fSmrg	else
59545b16253fSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
59555b16253fSmrg	fi
59565b16253fSmrg	;;
59575b16253fSmrg      esac
59585b16253fSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
59595b16253fSmrg      ;;
59605b16253fSmrg
59615b16253fSmrg    sunos4*)
59625b16253fSmrg      if test sequent = "$host_vendor"; then
59635b16253fSmrg	# Use $CC to link under sequent, because it throws in some extra .o
59645b16253fSmrg	# files that make .init and .fini sections work.
59655b16253fSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
59665b16253fSmrg      else
59675b16253fSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
59685b16253fSmrg      fi
59695b16253fSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
59705b16253fSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
59715b16253fSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
59725b16253fSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
59735b16253fSmrg      ;;
59745b16253fSmrg
59755b16253fSmrg    sysv4)
59765b16253fSmrg      case $host_vendor in
59775b16253fSmrg	sni)
59785b16253fSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
59795b16253fSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
59805b16253fSmrg	;;
59815b16253fSmrg	siemens)
59825b16253fSmrg	  ## LD is ld it makes a PLAMLIB
59835b16253fSmrg	  ## CC just makes a GrossModule.
59845b16253fSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
59855b16253fSmrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
59865b16253fSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
59875b16253fSmrg        ;;
59885b16253fSmrg	motorola)
59895b16253fSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
59905b16253fSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
59915b16253fSmrg	;;
59925b16253fSmrg      esac
59935b16253fSmrg      runpath_var='LD_RUN_PATH'
59945b16253fSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
59955b16253fSmrg      ;;
59965b16253fSmrg
59975b16253fSmrg    sysv4.3*)
59985b16253fSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
59995b16253fSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60005b16253fSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
60015b16253fSmrg      ;;
60025b16253fSmrg
60035b16253fSmrg    sysv4*MP*)
60045b16253fSmrg      if test -d /usr/nec; then
60055b16253fSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
60065b16253fSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60075b16253fSmrg	runpath_var=LD_RUN_PATH
60085b16253fSmrg	hardcode_runpath_var=yes
60095b16253fSmrg	_LT_TAGVAR(ld_shlibs, $1)=yes
60105b16253fSmrg      fi
60115b16253fSmrg      ;;
60125b16253fSmrg
60135b16253fSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
60145b16253fSmrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
60155b16253fSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
60165b16253fSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60175b16253fSmrg      runpath_var='LD_RUN_PATH'
60185b16253fSmrg
60195b16253fSmrg      if test yes = "$GCC"; then
60205b16253fSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60215b16253fSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60225b16253fSmrg      else
60235b16253fSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60245b16253fSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60255b16253fSmrg      fi
60265b16253fSmrg      ;;
60275b16253fSmrg
60285b16253fSmrg    sysv5* | sco3.2v5* | sco5v6*)
60295b16253fSmrg      # Note: We CANNOT use -z defs as we might desire, because we do not
60305b16253fSmrg      # link with -lc, and that would cause any symbols used from libc to
60315b16253fSmrg      # always be unresolved, which means just about no library would
60325b16253fSmrg      # ever link correctly.  If we're not using GNU ld we use -z text
60335b16253fSmrg      # though, which does catch some bad symbols but isn't as heavy-handed
60345b16253fSmrg      # as -z defs.
60355b16253fSmrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
60365b16253fSmrg      _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
60375b16253fSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
60385b16253fSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60395b16253fSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
60405b16253fSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
60415b16253fSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
60425b16253fSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
60435b16253fSmrg      runpath_var='LD_RUN_PATH'
60445b16253fSmrg
60455b16253fSmrg      if test yes = "$GCC"; then
60465b16253fSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60475b16253fSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60485b16253fSmrg      else
60495b16253fSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60505b16253fSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60515b16253fSmrg      fi
60525b16253fSmrg      ;;
60535b16253fSmrg
60545b16253fSmrg    uts4*)
60555b16253fSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
60565b16253fSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
60575b16253fSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60585b16253fSmrg      ;;
60595b16253fSmrg
60605b16253fSmrg    *)
60615b16253fSmrg      _LT_TAGVAR(ld_shlibs, $1)=no
60625b16253fSmrg      ;;
60635b16253fSmrg    esac
60645b16253fSmrg
60655b16253fSmrg    if test sni = "$host_vendor"; then
60665b16253fSmrg      case $host in
60675b16253fSmrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
60685b16253fSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
60695b16253fSmrg	;;
60705b16253fSmrg      esac
60715b16253fSmrg    fi
60725b16253fSmrg  fi
60735b16253fSmrg])
60745b16253fSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
60755b16253fSmrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
60765b16253fSmrg
60775b16253fSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
60785b16253fSmrg
60795b16253fSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
60805b16253fSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
60815b16253fSmrg_LT_DECL([], [extract_expsyms_cmds], [2],
60825b16253fSmrg    [The commands to extract the exported symbol list from a shared archive])
60835b16253fSmrg
60845b16253fSmrg#
60855b16253fSmrg# Do we need to explicitly link libc?
60865b16253fSmrg#
60875b16253fSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
60885b16253fSmrgx|xyes)
60895b16253fSmrg  # Assume -lc should be added
60905b16253fSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
60915b16253fSmrg
60925b16253fSmrg  if test yes,yes = "$GCC,$enable_shared"; then
60935b16253fSmrg    case $_LT_TAGVAR(archive_cmds, $1) in
60945b16253fSmrg    *'~'*)
60955b16253fSmrg      # FIXME: we may have to deal with multi-command sequences.
60965b16253fSmrg      ;;
60975b16253fSmrg    '$CC '*)
60985b16253fSmrg      # Test whether the compiler implicitly links with -lc since on some
60995b16253fSmrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
61005b16253fSmrg      # to ld, don't add -lc before -lgcc.
61015b16253fSmrg      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
61025b16253fSmrg	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
61035b16253fSmrg	[$RM conftest*
61045b16253fSmrg	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
61055b16253fSmrg
61065b16253fSmrg	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
61075b16253fSmrg	  soname=conftest
61085b16253fSmrg	  lib=conftest
61095b16253fSmrg	  libobjs=conftest.$ac_objext
61105b16253fSmrg	  deplibs=
61115b16253fSmrg	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
61125b16253fSmrg	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
61135b16253fSmrg	  compiler_flags=-v
61145b16253fSmrg	  linker_flags=-v
61155b16253fSmrg	  verstring=
61165b16253fSmrg	  output_objdir=.
61175b16253fSmrg	  libname=conftest
61185b16253fSmrg	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
61195b16253fSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=
61205b16253fSmrg	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
61215b16253fSmrg	  then
61225b16253fSmrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
61235b16253fSmrg	  else
61245b16253fSmrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
61255b16253fSmrg	  fi
61265b16253fSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
61275b16253fSmrg	else
61285b16253fSmrg	  cat conftest.err 1>&5
61295b16253fSmrg	fi
61305b16253fSmrg	$RM conftest*
61315b16253fSmrg	])
61325b16253fSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
61335b16253fSmrg      ;;
61345b16253fSmrg    esac
61355b16253fSmrg  fi
61365b16253fSmrg  ;;
61375b16253fSmrgesac
61385b16253fSmrg
61395b16253fSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
61405b16253fSmrg    [Whether or not to add -lc for building shared libraries])
61415b16253fSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
61425b16253fSmrg    [enable_shared_with_static_runtimes], [0],
61435b16253fSmrg    [Whether or not to disallow shared libs when runtime libs are static])
61445b16253fSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
61455b16253fSmrg    [Compiler flag to allow reflexive dlopens])
61465b16253fSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
61475b16253fSmrg    [Compiler flag to generate shared objects directly from archives])
61485b16253fSmrg_LT_TAGDECL([], [compiler_needs_object], [1],
61495b16253fSmrg    [Whether the compiler copes with passing no objects directly])
61505b16253fSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
61515b16253fSmrg    [Create an old-style archive from a shared archive])
61525b16253fSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
61535b16253fSmrg    [Create a temporary old-style archive to link instead of a shared archive])
61545b16253fSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
61555b16253fSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
61565b16253fSmrg_LT_TAGDECL([], [module_cmds], [2],
61575b16253fSmrg    [Commands used to build a loadable module if different from building
61585b16253fSmrg    a shared archive.])
61595b16253fSmrg_LT_TAGDECL([], [module_expsym_cmds], [2])
61605b16253fSmrg_LT_TAGDECL([], [with_gnu_ld], [1],
61615b16253fSmrg    [Whether we are building with GNU ld or not])
61625b16253fSmrg_LT_TAGDECL([], [allow_undefined_flag], [1],
61635b16253fSmrg    [Flag that allows shared libraries with undefined symbols to be built])
61645b16253fSmrg_LT_TAGDECL([], [no_undefined_flag], [1],
61655b16253fSmrg    [Flag that enforces no undefined symbols])
61665b16253fSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
61675b16253fSmrg    [Flag to hardcode $libdir into a binary during linking.
61685b16253fSmrg    This must work even if $libdir does not exist])
61695b16253fSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
61705b16253fSmrg    [Whether we need a single "-rpath" flag with a separated argument])
61715b16253fSmrg_LT_TAGDECL([], [hardcode_direct], [0],
61725b16253fSmrg    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
61735b16253fSmrg    DIR into the resulting binary])
61745b16253fSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
61755b16253fSmrg    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
61765b16253fSmrg    DIR into the resulting binary and the resulting library dependency is
61775b16253fSmrg    "absolute", i.e impossible to change by setting $shlibpath_var if the
61785b16253fSmrg    library is relocated])
61795b16253fSmrg_LT_TAGDECL([], [hardcode_minus_L], [0],
61805b16253fSmrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
61815b16253fSmrg    into the resulting binary])
61825b16253fSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
61835b16253fSmrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
61845b16253fSmrg    into the resulting binary])
61855b16253fSmrg_LT_TAGDECL([], [hardcode_automatic], [0],
61865b16253fSmrg    [Set to "yes" if building a shared library automatically hardcodes DIR
61875b16253fSmrg    into the library and all subsequent libraries and executables linked
61885b16253fSmrg    against it])
61895b16253fSmrg_LT_TAGDECL([], [inherit_rpath], [0],
61905b16253fSmrg    [Set to yes if linker adds runtime paths of dependent libraries
61915b16253fSmrg    to runtime path list])
61925b16253fSmrg_LT_TAGDECL([], [link_all_deplibs], [0],
61935b16253fSmrg    [Whether libtool must link a program against all its dependency libraries])
61945b16253fSmrg_LT_TAGDECL([], [always_export_symbols], [0],
61955b16253fSmrg    [Set to "yes" if exported symbols are required])
61965b16253fSmrg_LT_TAGDECL([], [export_symbols_cmds], [2],
61975b16253fSmrg    [The commands to list exported symbols])
61985b16253fSmrg_LT_TAGDECL([], [exclude_expsyms], [1],
61995b16253fSmrg    [Symbols that should not be listed in the preloaded symbols])
62005b16253fSmrg_LT_TAGDECL([], [include_expsyms], [1],
62015b16253fSmrg    [Symbols that must always be exported])
62025b16253fSmrg_LT_TAGDECL([], [prelink_cmds], [2],
62035b16253fSmrg    [Commands necessary for linking programs (against libraries) with templates])
62045b16253fSmrg_LT_TAGDECL([], [postlink_cmds], [2],
62055b16253fSmrg    [Commands necessary for finishing linking programs])
62065b16253fSmrg_LT_TAGDECL([], [file_list_spec], [1],
62075b16253fSmrg    [Specify filename containing input files])
62085b16253fSmrgdnl FIXME: Not yet implemented
62095b16253fSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
62105b16253fSmrgdnl    [Compiler flag to generate thread safe objects])
62115b16253fSmrg])# _LT_LINKER_SHLIBS
62125b16253fSmrg
62135b16253fSmrg
62145b16253fSmrg# _LT_LANG_C_CONFIG([TAG])
62155b16253fSmrg# ------------------------
62165b16253fSmrg# Ensure that the configuration variables for a C compiler are suitably
62175b16253fSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
62185b16253fSmrg# the compiler configuration to 'libtool'.
62195b16253fSmrgm4_defun([_LT_LANG_C_CONFIG],
62205b16253fSmrg[m4_require([_LT_DECL_EGREP])dnl
62215b16253fSmrglt_save_CC=$CC
62225b16253fSmrgAC_LANG_PUSH(C)
62235b16253fSmrg
62245b16253fSmrg# Source file extension for C test sources.
62255b16253fSmrgac_ext=c
62265b16253fSmrg
62275b16253fSmrg# Object file extension for compiled C test sources.
62285b16253fSmrgobjext=o
62295b16253fSmrg_LT_TAGVAR(objext, $1)=$objext
62305b16253fSmrg
62315b16253fSmrg# Code to be used in simple compile tests
62325b16253fSmrglt_simple_compile_test_code="int some_variable = 0;"
62335b16253fSmrg
62345b16253fSmrg# Code to be used in simple link tests
62355b16253fSmrglt_simple_link_test_code='int main(){return(0);}'
62365b16253fSmrg
62375b16253fSmrg_LT_TAG_COMPILER
62385b16253fSmrg# Save the default compiler, since it gets overwritten when the other
62395b16253fSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
62405b16253fSmrgcompiler_DEFAULT=$CC
62415b16253fSmrg
62425b16253fSmrg# save warnings/boilerplate of simple test code
62435b16253fSmrg_LT_COMPILER_BOILERPLATE
62445b16253fSmrg_LT_LINKER_BOILERPLATE
62455b16253fSmrg
62465b16253fSmrg## CAVEAT EMPTOR:
62475b16253fSmrg## There is no encapsulation within the following macros, do not change
62485b16253fSmrg## the running order or otherwise move them around unless you know exactly
62495b16253fSmrg## what you are doing...
62505b16253fSmrgif test -n "$compiler"; then
62515b16253fSmrg  _LT_COMPILER_NO_RTTI($1)
62525b16253fSmrg  _LT_COMPILER_PIC($1)
62535b16253fSmrg  _LT_COMPILER_C_O($1)
62545b16253fSmrg  _LT_COMPILER_FILE_LOCKS($1)
62555b16253fSmrg  _LT_LINKER_SHLIBS($1)
62565b16253fSmrg  _LT_SYS_DYNAMIC_LINKER($1)
62575b16253fSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
62585b16253fSmrg  LT_SYS_DLOPEN_SELF
62595b16253fSmrg  _LT_CMD_STRIPLIB
62605b16253fSmrg
62615b16253fSmrg  # Report what library types will actually be built
62625b16253fSmrg  AC_MSG_CHECKING([if libtool supports shared libraries])
62635b16253fSmrg  AC_MSG_RESULT([$can_build_shared])
62645b16253fSmrg
62655b16253fSmrg  AC_MSG_CHECKING([whether to build shared libraries])
62665b16253fSmrg  test no = "$can_build_shared" && enable_shared=no
62675b16253fSmrg
62685b16253fSmrg  # On AIX, shared libraries and static libraries use the same namespace, and
62695b16253fSmrg  # are all built from PIC.
62705b16253fSmrg  case $host_os in
62715b16253fSmrg  aix3*)
62725b16253fSmrg    test yes = "$enable_shared" && enable_static=no
62735b16253fSmrg    if test -n "$RANLIB"; then
62745b16253fSmrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
62755b16253fSmrg      postinstall_cmds='$RANLIB $lib'
62765b16253fSmrg    fi
62775b16253fSmrg    ;;
62785b16253fSmrg
62795b16253fSmrg  aix[[4-9]]*)
62805b16253fSmrg    if test ia64 != "$host_cpu"; then
62815b16253fSmrg      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
62825b16253fSmrg      yes,aix,yes) ;;			# shared object as lib.so file only
62835b16253fSmrg      yes,svr4,*) ;;			# shared object as lib.so archive member only
62845b16253fSmrg      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
62855b16253fSmrg      esac
62865b16253fSmrg    fi
62875b16253fSmrg    ;;
62885b16253fSmrg  esac
62895b16253fSmrg  AC_MSG_RESULT([$enable_shared])
62905b16253fSmrg
62915b16253fSmrg  AC_MSG_CHECKING([whether to build static libraries])
62925b16253fSmrg  # Make sure either enable_shared or enable_static is yes.
62935b16253fSmrg  test yes = "$enable_shared" || enable_static=yes
62945b16253fSmrg  AC_MSG_RESULT([$enable_static])
62955b16253fSmrg
62965b16253fSmrg  _LT_CONFIG($1)
62975b16253fSmrgfi
62985b16253fSmrgAC_LANG_POP
62995b16253fSmrgCC=$lt_save_CC
63005b16253fSmrg])# _LT_LANG_C_CONFIG
63015b16253fSmrg
63025b16253fSmrg
63035b16253fSmrg# _LT_LANG_CXX_CONFIG([TAG])
63045b16253fSmrg# --------------------------
63055b16253fSmrg# Ensure that the configuration variables for a C++ compiler are suitably
63065b16253fSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
63075b16253fSmrg# the compiler configuration to 'libtool'.
63085b16253fSmrgm4_defun([_LT_LANG_CXX_CONFIG],
63095b16253fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
63105b16253fSmrgm4_require([_LT_DECL_EGREP])dnl
63115b16253fSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
63125b16253fSmrgif test -n "$CXX" && ( test no != "$CXX" &&
63135b16253fSmrg    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
63145b16253fSmrg    (test g++ != "$CXX"))); then
63155b16253fSmrg  AC_PROG_CXXCPP
63165b16253fSmrgelse
63175b16253fSmrg  _lt_caught_CXX_error=yes
63185b16253fSmrgfi
63195b16253fSmrg
63205b16253fSmrgAC_LANG_PUSH(C++)
63215b16253fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
63225b16253fSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
63235b16253fSmrg_LT_TAGVAR(always_export_symbols, $1)=no
63245b16253fSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
63255b16253fSmrg_LT_TAGVAR(compiler_needs_object, $1)=no
63265b16253fSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
63275b16253fSmrg_LT_TAGVAR(hardcode_direct, $1)=no
63285b16253fSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
63295b16253fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
63305b16253fSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
63315b16253fSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
63325b16253fSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
63335b16253fSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
63345b16253fSmrg_LT_TAGVAR(inherit_rpath, $1)=no
63355b16253fSmrg_LT_TAGVAR(module_cmds, $1)=
63365b16253fSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
63375b16253fSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
63385b16253fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
63395b16253fSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
63405b16253fSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
63415b16253fSmrg_LT_TAGVAR(no_undefined_flag, $1)=
63425b16253fSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
63435b16253fSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
63445b16253fSmrg
63455b16253fSmrg# Source file extension for C++ test sources.
63465b16253fSmrgac_ext=cpp
63475b16253fSmrg
63485b16253fSmrg# Object file extension for compiled C++ test sources.
63495b16253fSmrgobjext=o
63505b16253fSmrg_LT_TAGVAR(objext, $1)=$objext
63515b16253fSmrg
63525b16253fSmrg# No sense in running all these tests if we already determined that
63535b16253fSmrg# the CXX compiler isn't working.  Some variables (like enable_shared)
63545b16253fSmrg# are currently assumed to apply to all compilers on this platform,
63555b16253fSmrg# and will be corrupted by setting them based on a non-working compiler.
63565b16253fSmrgif test yes != "$_lt_caught_CXX_error"; then
63575b16253fSmrg  # Code to be used in simple compile tests
63585b16253fSmrg  lt_simple_compile_test_code="int some_variable = 0;"
63595b16253fSmrg
63605b16253fSmrg  # Code to be used in simple link tests
63615b16253fSmrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
63625b16253fSmrg
63635b16253fSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
63645b16253fSmrg  _LT_TAG_COMPILER
63655b16253fSmrg
63665b16253fSmrg  # save warnings/boilerplate of simple test code
63675b16253fSmrg  _LT_COMPILER_BOILERPLATE
63685b16253fSmrg  _LT_LINKER_BOILERPLATE
63695b16253fSmrg
63705b16253fSmrg  # Allow CC to be a program name with arguments.
63715b16253fSmrg  lt_save_CC=$CC
63725b16253fSmrg  lt_save_CFLAGS=$CFLAGS
63735b16253fSmrg  lt_save_LD=$LD
63745b16253fSmrg  lt_save_GCC=$GCC
63755b16253fSmrg  GCC=$GXX
63765b16253fSmrg  lt_save_with_gnu_ld=$with_gnu_ld
63775b16253fSmrg  lt_save_path_LD=$lt_cv_path_LD
63785b16253fSmrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
63795b16253fSmrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
63805b16253fSmrg  else
63815b16253fSmrg    $as_unset lt_cv_prog_gnu_ld
63825b16253fSmrg  fi
63835b16253fSmrg  if test -n "${lt_cv_path_LDCXX+set}"; then
63845b16253fSmrg    lt_cv_path_LD=$lt_cv_path_LDCXX
63855b16253fSmrg  else
63865b16253fSmrg    $as_unset lt_cv_path_LD
63875b16253fSmrg  fi
63885b16253fSmrg  test -z "${LDCXX+set}" || LD=$LDCXX
63895b16253fSmrg  CC=${CXX-"c++"}
63905b16253fSmrg  CFLAGS=$CXXFLAGS
63915b16253fSmrg  compiler=$CC
63925b16253fSmrg  _LT_TAGVAR(compiler, $1)=$CC
63935b16253fSmrg  _LT_CC_BASENAME([$compiler])
63945b16253fSmrg
63955b16253fSmrg  if test -n "$compiler"; then
63965b16253fSmrg    # We don't want -fno-exception when compiling C++ code, so set the
63975b16253fSmrg    # no_builtin_flag separately
63985b16253fSmrg    if test yes = "$GXX"; then
63995b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
64005b16253fSmrg    else
64015b16253fSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
64025b16253fSmrg    fi
64035b16253fSmrg
64045b16253fSmrg    if test yes = "$GXX"; then
64055b16253fSmrg      # Set up default GNU C++ configuration
64065b16253fSmrg
64075b16253fSmrg      LT_PATH_LD
64085b16253fSmrg
64095b16253fSmrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
64105b16253fSmrg      # archiving commands below assume that GNU ld is being used.
64115b16253fSmrg      if test yes = "$with_gnu_ld"; then
64125b16253fSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
64135b16253fSmrg        _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'
64145b16253fSmrg
64155b16253fSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
64165b16253fSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
64175b16253fSmrg
64185b16253fSmrg        # If archive_cmds runs LD, not CC, wlarc should be empty
64195b16253fSmrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
64205b16253fSmrg        #     investigate it a little bit more. (MM)
64215b16253fSmrg        wlarc='$wl'
64225b16253fSmrg
64235b16253fSmrg        # ancient GNU ld didn't support --whole-archive et. al.
64245b16253fSmrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
64255b16253fSmrg	  $GREP 'no-whole-archive' > /dev/null; then
64265b16253fSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
64275b16253fSmrg        else
64285b16253fSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
64295b16253fSmrg        fi
64305b16253fSmrg      else
64315b16253fSmrg        with_gnu_ld=no
64325b16253fSmrg        wlarc=
64335b16253fSmrg
64345b16253fSmrg        # A generic and very simple default shared library creation
64355b16253fSmrg        # command for GNU C++ for the case where it uses the native
64365b16253fSmrg        # linker, instead of GNU ld.  If possible, this setting should
64375b16253fSmrg        # overridden to take advantage of the native linker features on
64385b16253fSmrg        # the platform it is being used on.
64395b16253fSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
64405b16253fSmrg      fi
64415b16253fSmrg
64425b16253fSmrg      # Commands to make compiler produce verbose output that lists
64435b16253fSmrg      # what "hidden" libraries, object files and flags are used when
64445b16253fSmrg      # linking a shared library.
64455b16253fSmrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
64465b16253fSmrg
64475b16253fSmrg    else
64485b16253fSmrg      GXX=no
64495b16253fSmrg      with_gnu_ld=no
64505b16253fSmrg      wlarc=
64515b16253fSmrg    fi
64525b16253fSmrg
64535b16253fSmrg    # PORTME: fill in a description of your system's C++ link characteristics
64545b16253fSmrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
64555b16253fSmrg    _LT_TAGVAR(ld_shlibs, $1)=yes
64565b16253fSmrg    case $host_os in
64575b16253fSmrg      aix3*)
64585b16253fSmrg        # FIXME: insert proper C++ library support
64595b16253fSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
64605b16253fSmrg        ;;
64615b16253fSmrg      aix[[4-9]]*)
64625b16253fSmrg        if test ia64 = "$host_cpu"; then
64635b16253fSmrg          # On IA64, the linker does run time linking by default, so we don't
64645b16253fSmrg          # have to do anything special.
64655b16253fSmrg          aix_use_runtimelinking=no
64665b16253fSmrg          exp_sym_flag='-Bexport'
64675b16253fSmrg          no_entry_flag=
64685b16253fSmrg        else
64695b16253fSmrg          aix_use_runtimelinking=no
64705b16253fSmrg
64715b16253fSmrg          # Test if we are trying to use run time linking or normal
64725b16253fSmrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
64735b16253fSmrg          # have runtime linking enabled, and use it for executables.
64745b16253fSmrg          # For shared libraries, we enable/disable runtime linking
64755b16253fSmrg          # depending on the kind of the shared library created -
64765b16253fSmrg          # when "with_aix_soname,aix_use_runtimelinking" is:
64775b16253fSmrg          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
64785b16253fSmrg          # "aix,yes"  lib.so          shared, rtl:yes, for executables
64795b16253fSmrg          #            lib.a           static archive
64805b16253fSmrg          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
64815b16253fSmrg          #            lib.a(lib.so.V) shared, rtl:no,  for executables
64825b16253fSmrg          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
64835b16253fSmrg          #            lib.a(lib.so.V) shared, rtl:no
64845b16253fSmrg          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
64855b16253fSmrg          #            lib.a           static archive
64865b16253fSmrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
64875b16253fSmrg	    for ld_flag in $LDFLAGS; do
64885b16253fSmrg	      case $ld_flag in
64895b16253fSmrg	      *-brtl*)
64905b16253fSmrg	        aix_use_runtimelinking=yes
64915b16253fSmrg	        break
64925b16253fSmrg	        ;;
64935b16253fSmrg	      esac
64945b16253fSmrg	    done
64955b16253fSmrg	    if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
64965b16253fSmrg	      # With aix-soname=svr4, we create the lib.so.V shared archives only,
64975b16253fSmrg	      # so we don't have lib.a shared libs to link our executables.
64985b16253fSmrg	      # We have to force runtime linking in this case.
64995b16253fSmrg	      aix_use_runtimelinking=yes
65005b16253fSmrg	      LDFLAGS="$LDFLAGS -Wl,-brtl"
65015b16253fSmrg	    fi
65025b16253fSmrg	    ;;
65035b16253fSmrg          esac
65045b16253fSmrg
65055b16253fSmrg          exp_sym_flag='-bexport'
65065b16253fSmrg          no_entry_flag='-bnoentry'
65075b16253fSmrg        fi
65085b16253fSmrg
65095b16253fSmrg        # When large executables or shared objects are built, AIX ld can
65105b16253fSmrg        # have problems creating the table of contents.  If linking a library
65115b16253fSmrg        # or program results in "error TOC overflow" add -mminimal-toc to
65125b16253fSmrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
65135b16253fSmrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
65145b16253fSmrg
65155b16253fSmrg        _LT_TAGVAR(archive_cmds, $1)=''
65165b16253fSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
65175b16253fSmrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
65185b16253fSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
65195b16253fSmrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
65205b16253fSmrg        _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
65215b16253fSmrg        case $with_aix_soname,$aix_use_runtimelinking in
65225b16253fSmrg        aix,*) ;;	# no import file
65235b16253fSmrg        svr4,* | *,yes) # use import file
65245b16253fSmrg          # The Import File defines what to hardcode.
65255b16253fSmrg          _LT_TAGVAR(hardcode_direct, $1)=no
65265b16253fSmrg          _LT_TAGVAR(hardcode_direct_absolute, $1)=no
65275b16253fSmrg          ;;
65285b16253fSmrg        esac
65295b16253fSmrg
65305b16253fSmrg        if test yes = "$GXX"; then
65315b16253fSmrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
65325b16253fSmrg          # We only want to do this on AIX 4.2 and lower, the check
65335b16253fSmrg          # below for broken collect2 doesn't work under 4.3+
65345b16253fSmrg	  collect2name=`$CC -print-prog-name=collect2`
65355b16253fSmrg	  if test -f "$collect2name" &&
65365b16253fSmrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
65375b16253fSmrg	  then
65385b16253fSmrg	    # We have reworked collect2
65395b16253fSmrg	    :
65405b16253fSmrg	  else
65415b16253fSmrg	    # We have old collect2
65425b16253fSmrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
65435b16253fSmrg	    # It fails to find uninstalled libraries when the uninstalled
65445b16253fSmrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
65455b16253fSmrg	    # to unsupported forces relinking
65465b16253fSmrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
65475b16253fSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
65485b16253fSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
65495b16253fSmrg	  fi
65505b16253fSmrg          esac
65515b16253fSmrg          shared_flag='-shared'
65525b16253fSmrg	  if test yes = "$aix_use_runtimelinking"; then
65535b16253fSmrg	    shared_flag=$shared_flag' $wl-G'
65545b16253fSmrg	  fi
65555b16253fSmrg	  # Need to ensure runtime linking is disabled for the traditional
65565b16253fSmrg	  # shared library, or the linker may eventually find shared libraries
65575b16253fSmrg	  # /with/ Import File - we do not want to mix them.
65585b16253fSmrg	  shared_flag_aix='-shared'
65595b16253fSmrg	  shared_flag_svr4='-shared $wl-G'
65605b16253fSmrg        else
65615b16253fSmrg          # not using gcc
65625b16253fSmrg          if test ia64 = "$host_cpu"; then
65635b16253fSmrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
65645b16253fSmrg	  # chokes on -Wl,-G. The following line is correct:
65655b16253fSmrg	  shared_flag='-G'
65665b16253fSmrg          else
65675b16253fSmrg	    if test yes = "$aix_use_runtimelinking"; then
65685b16253fSmrg	      shared_flag='$wl-G'
65695b16253fSmrg	    else
65705b16253fSmrg	      shared_flag='$wl-bM:SRE'
65715b16253fSmrg	    fi
65725b16253fSmrg	    shared_flag_aix='$wl-bM:SRE'
65735b16253fSmrg	    shared_flag_svr4='$wl-G'
65745b16253fSmrg          fi
65755b16253fSmrg        fi
65765b16253fSmrg
65775b16253fSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
65785b16253fSmrg        # It seems that -bexpall does not export symbols beginning with
65795b16253fSmrg        # underscore (_), so it is better to generate a list of symbols to
65805b16253fSmrg	# export.
65815b16253fSmrg        _LT_TAGVAR(always_export_symbols, $1)=yes
65825b16253fSmrg	if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
65835b16253fSmrg          # Warning - without using the other runtime loading flags (-brtl),
65845b16253fSmrg          # -berok will link without error, but may produce a broken library.
65855b16253fSmrg          # The "-G" linker flag allows undefined symbols.
65865b16253fSmrg          _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
65875b16253fSmrg          # Determine the default libpath from the value encoded in an empty
65885b16253fSmrg          # executable.
65895b16253fSmrg          _LT_SYS_MODULE_PATH_AIX([$1])
65905b16253fSmrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
65915b16253fSmrg
65925b16253fSmrg          _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
65935b16253fSmrg        else
65945b16253fSmrg          if test ia64 = "$host_cpu"; then
65955b16253fSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
65965b16253fSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
65975b16253fSmrg	    _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"
65985b16253fSmrg          else
65995b16253fSmrg	    # Determine the default libpath from the value encoded in an
66005b16253fSmrg	    # empty executable.
66015b16253fSmrg	    _LT_SYS_MODULE_PATH_AIX([$1])
66025b16253fSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
66035b16253fSmrg	    # Warning - without using the other run time loading flags,
66045b16253fSmrg	    # -berok will link without error, but may produce a broken library.
66055b16253fSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
66065b16253fSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
66075b16253fSmrg	    if test yes = "$with_gnu_ld"; then
66085b16253fSmrg	      # We only use this code for GNU lds that support --whole-archive.
66095b16253fSmrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
66105b16253fSmrg	    else
66115b16253fSmrg	      # Exported symbols can be pulled into shared objects from archives
66125b16253fSmrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
66135b16253fSmrg	    fi
66145b16253fSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
66155b16253fSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
66165b16253fSmrg	    # -brtl affects multiple linker settings, -berok does not and is overridden later
66175b16253fSmrg	    compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
66185b16253fSmrg	    if test svr4 != "$with_aix_soname"; then
66195b16253fSmrg	      # This is similar to how AIX traditionally builds its shared
66205b16253fSmrg	      # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
66215b16253fSmrg	      _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'
66225b16253fSmrg	    fi
66235b16253fSmrg	    if test aix != "$with_aix_soname"; then
66245b16253fSmrg	      _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'
66255b16253fSmrg	    else
66265b16253fSmrg	      # used by -dlpreopen to get the symbols
66275b16253fSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
66285b16253fSmrg	    fi
66295b16253fSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
66305b16253fSmrg          fi
66315b16253fSmrg        fi
66325b16253fSmrg        ;;
66335b16253fSmrg
66345b16253fSmrg      beos*)
66355b16253fSmrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
66365b16253fSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
66375b16253fSmrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
66385b16253fSmrg	  # support --undefined.  This deserves some investigation.  FIXME
66395b16253fSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
66405b16253fSmrg	else
66415b16253fSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
66425b16253fSmrg	fi
66435b16253fSmrg	;;
66445b16253fSmrg
66455b16253fSmrg      chorus*)
66465b16253fSmrg        case $cc_basename in
66475b16253fSmrg          *)
66485b16253fSmrg	  # FIXME: insert proper C++ library support
66495b16253fSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
66505b16253fSmrg	  ;;
66515b16253fSmrg        esac
66525b16253fSmrg        ;;
66535b16253fSmrg
66545b16253fSmrg      cygwin* | mingw* | pw32* | cegcc*)
66555b16253fSmrg	case $GXX,$cc_basename in
66565b16253fSmrg	,cl* | no,cl* | ,icl* | no,icl*)
66575b16253fSmrg	  # Native MSVC or ICC
66585b16253fSmrg	  # hardcode_libdir_flag_spec is actually meaningless, as there is
66595b16253fSmrg	  # no search path for DLLs.
66605b16253fSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
66615b16253fSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
66625b16253fSmrg	  _LT_TAGVAR(always_export_symbols, $1)=yes
66635b16253fSmrg	  _LT_TAGVAR(file_list_spec, $1)='@'
66645b16253fSmrg	  # Tell ltmain to make .lib files, not .a files.
66655b16253fSmrg	  libext=lib
66665b16253fSmrg	  # Tell ltmain to make .dll files, not .so files.
66675b16253fSmrg	  shrext_cmds=.dll
66685b16253fSmrg	  # FIXME: Setting linknames here is a bad hack.
66695b16253fSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
66705b16253fSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
66715b16253fSmrg              cp "$export_symbols" "$output_objdir/$soname.def";
66725b16253fSmrg              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
66735b16253fSmrg            else
66745b16253fSmrg              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
66755b16253fSmrg            fi~
66765b16253fSmrg            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
66775b16253fSmrg            linknames='
66785b16253fSmrg	  # The linker will not automatically build a static lib if we build a DLL.
66795b16253fSmrg	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
66805b16253fSmrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
66815b16253fSmrg	  # Don't use ranlib
66825b16253fSmrg	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
66835b16253fSmrg	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
66845b16253fSmrg            lt_tool_outputfile="@TOOL_OUTPUT@"~
66855b16253fSmrg            case $lt_outputfile in
66865b16253fSmrg              *.exe|*.EXE) ;;
66875b16253fSmrg              *)
66885b16253fSmrg                lt_outputfile=$lt_outputfile.exe
66895b16253fSmrg                lt_tool_outputfile=$lt_tool_outputfile.exe
66905b16253fSmrg                ;;
66915b16253fSmrg            esac~
66925b16253fSmrg            func_to_tool_file "$lt_outputfile"~
66935b16253fSmrg            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
66945b16253fSmrg              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
66955b16253fSmrg              $RM "$lt_outputfile.manifest";
66965b16253fSmrg            fi'
66975b16253fSmrg	  ;;
66985b16253fSmrg	*)
66995b16253fSmrg	  # g++
67005b16253fSmrg	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
67015b16253fSmrg	  # as there is no search path for DLLs.
67025b16253fSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
67035b16253fSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
67045b16253fSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
67055b16253fSmrg	  _LT_TAGVAR(always_export_symbols, $1)=no
67065b16253fSmrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
67075b16253fSmrg
67085b16253fSmrg	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
67095b16253fSmrg	    _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'
67105b16253fSmrg	    # If the export-symbols file already is a .def file, use it as
67115b16253fSmrg	    # is; otherwise, prepend EXPORTS...
67125b16253fSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
67135b16253fSmrg              cp $export_symbols $output_objdir/$soname.def;
67145b16253fSmrg            else
67155b16253fSmrg              echo EXPORTS > $output_objdir/$soname.def;
67165b16253fSmrg              cat $export_symbols >> $output_objdir/$soname.def;
67175b16253fSmrg            fi~
67185b16253fSmrg            $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'
67195b16253fSmrg	  else
67205b16253fSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
67215b16253fSmrg	  fi
67225b16253fSmrg	  ;;
67235b16253fSmrg	esac
67245b16253fSmrg	;;
67255b16253fSmrg      darwin* | rhapsody*)
67265b16253fSmrg        _LT_DARWIN_LINKER_FEATURES($1)
67275b16253fSmrg	;;
67285b16253fSmrg
67295b16253fSmrg      os2*)
67305b16253fSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
67315b16253fSmrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
67325b16253fSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
67335b16253fSmrg	shrext_cmds=.dll
67345b16253fSmrg	_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
67355b16253fSmrg	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
67365b16253fSmrg	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
67375b16253fSmrg	  $ECHO EXPORTS >> $output_objdir/$libname.def~
67385b16253fSmrg	  emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
67395b16253fSmrg	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
67405b16253fSmrg	  emximp -o $lib $output_objdir/$libname.def'
67415b16253fSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
67425b16253fSmrg	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
67435b16253fSmrg	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
67445b16253fSmrg	  $ECHO EXPORTS >> $output_objdir/$libname.def~
67455b16253fSmrg	  prefix_cmds="$SED"~
67465b16253fSmrg	  if test EXPORTS = "`$SED 1q $export_symbols`"; then
67475b16253fSmrg	    prefix_cmds="$prefix_cmds -e 1d";
67485b16253fSmrg	  fi~
67495b16253fSmrg	  prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
67505b16253fSmrg	  cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
67515b16253fSmrg	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
67525b16253fSmrg	  emximp -o $lib $output_objdir/$libname.def'
67535b16253fSmrg	_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
67545b16253fSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
67555b16253fSmrg	_LT_TAGVAR(file_list_spec, $1)='@'
67565b16253fSmrg	;;
67575b16253fSmrg
67585b16253fSmrg      dgux*)
67595b16253fSmrg        case $cc_basename in
67605b16253fSmrg          ec++*)
67615b16253fSmrg	    # FIXME: insert proper C++ library support
67625b16253fSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
67635b16253fSmrg	    ;;
67645b16253fSmrg          ghcx*)
67655b16253fSmrg	    # Green Hills C++ Compiler
67665b16253fSmrg	    # FIXME: insert proper C++ library support
67675b16253fSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
67685b16253fSmrg	    ;;
67695b16253fSmrg          *)
67705b16253fSmrg	    # FIXME: insert proper C++ library support
67715b16253fSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
67725b16253fSmrg	    ;;
67735b16253fSmrg        esac
67745b16253fSmrg        ;;
67755b16253fSmrg
67765b16253fSmrg      freebsd2.*)
67775b16253fSmrg        # C++ shared libraries reported to be fairly broken before
67785b16253fSmrg	# switch to ELF
67795b16253fSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
67805b16253fSmrg        ;;
67815b16253fSmrg
67825b16253fSmrg      freebsd-elf*)
67835b16253fSmrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
67845b16253fSmrg        ;;
67855b16253fSmrg
67865b16253fSmrg      freebsd* | dragonfly* | midnightbsd*)
67875b16253fSmrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
67885b16253fSmrg        # conventions
67895b16253fSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
67905b16253fSmrg        ;;
67915b16253fSmrg
67925b16253fSmrg      haiku*)
67935b16253fSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
67945b16253fSmrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
67955b16253fSmrg        ;;
67965b16253fSmrg
67975b16253fSmrg      hpux9*)
67985b16253fSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
67995b16253fSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
68005b16253fSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
68015b16253fSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
68025b16253fSmrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
68035b16253fSmrg				             # but as the default
68045b16253fSmrg				             # location of the library.
68055b16253fSmrg
68065b16253fSmrg        case $cc_basename in
68075b16253fSmrg          CC*)
68085b16253fSmrg            # FIXME: insert proper C++ library support
68095b16253fSmrg            _LT_TAGVAR(ld_shlibs, $1)=no
68105b16253fSmrg            ;;
68115b16253fSmrg          aCC*)
68125b16253fSmrg            _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'
68135b16253fSmrg            # Commands to make compiler produce verbose output that lists
68145b16253fSmrg            # what "hidden" libraries, object files and flags are used when
68155b16253fSmrg            # linking a shared library.
68165b16253fSmrg            #
68175b16253fSmrg            # There doesn't appear to be a way to prevent this compiler from
68185b16253fSmrg            # explicitly linking system object files so we need to strip them
68195b16253fSmrg            # from the output so that they don't get included in the library
68205b16253fSmrg            # dependencies.
68215b16253fSmrg            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"'
68225b16253fSmrg            ;;
68235b16253fSmrg          *)
68245b16253fSmrg            if test yes = "$GXX"; then
68255b16253fSmrg              _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'
68265b16253fSmrg            else
68275b16253fSmrg              # FIXME: insert proper C++ library support
68285b16253fSmrg              _LT_TAGVAR(ld_shlibs, $1)=no
68295b16253fSmrg            fi
68305b16253fSmrg            ;;
68315b16253fSmrg        esac
68325b16253fSmrg        ;;
68335b16253fSmrg
68345b16253fSmrg      hpux10*|hpux11*)
68355b16253fSmrg        if test no = "$with_gnu_ld"; then
68365b16253fSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
68375b16253fSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
68385b16253fSmrg
68395b16253fSmrg          case $host_cpu in
68405b16253fSmrg            hppa*64*|ia64*)
68415b16253fSmrg              ;;
68425b16253fSmrg            *)
68435b16253fSmrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
68445b16253fSmrg              ;;
68455b16253fSmrg          esac
68465b16253fSmrg        fi
68475b16253fSmrg        case $host_cpu in
68485b16253fSmrg          hppa*64*|ia64*)
68495b16253fSmrg            _LT_TAGVAR(hardcode_direct, $1)=no
68505b16253fSmrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
68515b16253fSmrg            ;;
68525b16253fSmrg          *)
68535b16253fSmrg            _LT_TAGVAR(hardcode_direct, $1)=yes
68545b16253fSmrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
68555b16253fSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
68565b16253fSmrg					         # but as the default
68575b16253fSmrg					         # location of the library.
68585b16253fSmrg            ;;
68595b16253fSmrg        esac
68605b16253fSmrg
68615b16253fSmrg        case $cc_basename in
68625b16253fSmrg          CC*)
68635b16253fSmrg	    # FIXME: insert proper C++ library support
68645b16253fSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
68655b16253fSmrg	    ;;
68665b16253fSmrg          aCC*)
68675b16253fSmrg	    case $host_cpu in
68685b16253fSmrg	      hppa*64*)
68695b16253fSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
68705b16253fSmrg	        ;;
68715b16253fSmrg	      ia64*)
68725b16253fSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
68735b16253fSmrg	        ;;
68745b16253fSmrg	      *)
68755b16253fSmrg	        _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'
68765b16253fSmrg	        ;;
68775b16253fSmrg	    esac
68785b16253fSmrg	    # Commands to make compiler produce verbose output that lists
68795b16253fSmrg	    # what "hidden" libraries, object files and flags are used when
68805b16253fSmrg	    # linking a shared library.
68815b16253fSmrg	    #
68825b16253fSmrg	    # There doesn't appear to be a way to prevent this compiler from
68835b16253fSmrg	    # explicitly linking system object files so we need to strip them
68845b16253fSmrg	    # from the output so that they don't get included in the library
68855b16253fSmrg	    # dependencies.
68865b16253fSmrg	    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"'
68875b16253fSmrg	    ;;
68885b16253fSmrg          *)
68895b16253fSmrg	    if test yes = "$GXX"; then
68905b16253fSmrg	      if test no = "$with_gnu_ld"; then
68915b16253fSmrg	        case $host_cpu in
68925b16253fSmrg	          hppa*64*)
68935b16253fSmrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
68945b16253fSmrg	            ;;
68955b16253fSmrg	          ia64*)
68965b16253fSmrg	            _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'
68975b16253fSmrg	            ;;
68985b16253fSmrg	          *)
68995b16253fSmrg	            _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'
69005b16253fSmrg	            ;;
69015b16253fSmrg	        esac
69025b16253fSmrg	      fi
69035b16253fSmrg	    else
69045b16253fSmrg	      # FIXME: insert proper C++ library support
69055b16253fSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
69065b16253fSmrg	    fi
69075b16253fSmrg	    ;;
69085b16253fSmrg        esac
69095b16253fSmrg        ;;
69105b16253fSmrg
69115b16253fSmrg      interix[[3-9]]*)
69125b16253fSmrg	_LT_TAGVAR(hardcode_direct, $1)=no
69135b16253fSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
69145b16253fSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
69155b16253fSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
69165b16253fSmrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
69175b16253fSmrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
69185b16253fSmrg	# default) and relocated if they conflict, which is a slow very memory
69195b16253fSmrg	# consuming and fragmenting process.  To avoid this, we pick a random,
69205b16253fSmrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
69215b16253fSmrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
69225b16253fSmrg	_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'
69235b16253fSmrg	_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'
69245b16253fSmrg	;;
69255b16253fSmrg      irix5* | irix6*)
69265b16253fSmrg        case $cc_basename in
69275b16253fSmrg          CC*)
69285b16253fSmrg	    # SGI C++
69295b16253fSmrg	    _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'
69305b16253fSmrg
69315b16253fSmrg	    # Archives containing C++ object files must be created using
69325b16253fSmrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
69335b16253fSmrg	    # necessary to make sure instantiated templates are included
69345b16253fSmrg	    # in the archive.
69355b16253fSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
69365b16253fSmrg	    ;;
69375b16253fSmrg          *)
69385b16253fSmrg	    if test yes = "$GXX"; then
69395b16253fSmrg	      if test no = "$with_gnu_ld"; then
69405b16253fSmrg	        _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'
69415b16253fSmrg	      else
69425b16253fSmrg	        _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'
69435b16253fSmrg	      fi
69445b16253fSmrg	    fi
69455b16253fSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
69465b16253fSmrg	    ;;
69475b16253fSmrg        esac
69485b16253fSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
69495b16253fSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
69505b16253fSmrg        _LT_TAGVAR(inherit_rpath, $1)=yes
69515b16253fSmrg        ;;
69525b16253fSmrg
69535b16253fSmrg      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
69545b16253fSmrg        case $cc_basename in
69555b16253fSmrg          KCC*)
69565b16253fSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
69575b16253fSmrg
69585b16253fSmrg	    # KCC will only create a shared library if the output file
69595b16253fSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
69605b16253fSmrg	    # to its proper name (with version) after linking.
69615b16253fSmrg	    _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'
69625b16253fSmrg	    _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'
69635b16253fSmrg	    # Commands to make compiler produce verbose output that lists
69645b16253fSmrg	    # what "hidden" libraries, object files and flags are used when
69655b16253fSmrg	    # linking a shared library.
69665b16253fSmrg	    #
69675b16253fSmrg	    # There doesn't appear to be a way to prevent this compiler from
69685b16253fSmrg	    # explicitly linking system object files so we need to strip them
69695b16253fSmrg	    # from the output so that they don't get included in the library
69705b16253fSmrg	    # dependencies.
69715b16253fSmrg	    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"'
69725b16253fSmrg
69735b16253fSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
69745b16253fSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
69755b16253fSmrg
69765b16253fSmrg	    # Archives containing C++ object files must be created using
69775b16253fSmrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
69785b16253fSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
69795b16253fSmrg	    ;;
69805b16253fSmrg	  icpc* | ecpc* )
69815b16253fSmrg	    # Intel C++
69825b16253fSmrg	    with_gnu_ld=yes
69835b16253fSmrg	    # version 8.0 and above of icpc choke on multiply defined symbols
69845b16253fSmrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
69855b16253fSmrg	    # earlier do not add the objects themselves.
69865b16253fSmrg	    case `$CC -V 2>&1` in
69875b16253fSmrg	      *"Version 7."*)
69885b16253fSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
69895b16253fSmrg		_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'
69905b16253fSmrg		;;
69915b16253fSmrg	      *)  # Version 8.0 or newer
69925b16253fSmrg	        tmp_idyn=
69935b16253fSmrg	        case $host_cpu in
69945b16253fSmrg		  ia64*) tmp_idyn=' -i_dynamic';;
69955b16253fSmrg		esac
69965b16253fSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
69975b16253fSmrg		_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'
69985b16253fSmrg		;;
69995b16253fSmrg	    esac
70005b16253fSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
70015b16253fSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
70025b16253fSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
70035b16253fSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
70045b16253fSmrg	    ;;
70055b16253fSmrg          pgCC* | pgcpp*)
70065b16253fSmrg            # Portland Group C++ compiler
70075b16253fSmrg	    case `$CC -V` in
70085b16253fSmrg	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
70095b16253fSmrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
70105b16253fSmrg               rm -rf $tpldir~
70115b16253fSmrg               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
70125b16253fSmrg               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
70135b16253fSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
70145b16253fSmrg                rm -rf $tpldir~
70155b16253fSmrg                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
70165b16253fSmrg                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
70175b16253fSmrg                $RANLIB $oldlib'
70185b16253fSmrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
70195b16253fSmrg                rm -rf $tpldir~
70205b16253fSmrg                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
70215b16253fSmrg                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
70225b16253fSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
70235b16253fSmrg                rm -rf $tpldir~
70245b16253fSmrg                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
70255b16253fSmrg                $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'
70265b16253fSmrg	      ;;
70275b16253fSmrg	    *) # Version 6 and above use weak symbols
70285b16253fSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
70295b16253fSmrg	      _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'
70305b16253fSmrg	      ;;
70315b16253fSmrg	    esac
70325b16253fSmrg
70335b16253fSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
70345b16253fSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
70355b16253fSmrg	    _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'
70365b16253fSmrg            ;;
70375b16253fSmrg	  cxx*)
70385b16253fSmrg	    # Compaq C++
70395b16253fSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
70405b16253fSmrg	    _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'
70415b16253fSmrg
70425b16253fSmrg	    runpath_var=LD_RUN_PATH
70435b16253fSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
70445b16253fSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
70455b16253fSmrg
70465b16253fSmrg	    # Commands to make compiler produce verbose output that lists
70475b16253fSmrg	    # what "hidden" libraries, object files and flags are used when
70485b16253fSmrg	    # linking a shared library.
70495b16253fSmrg	    #
70505b16253fSmrg	    # There doesn't appear to be a way to prevent this compiler from
70515b16253fSmrg	    # explicitly linking system object files so we need to strip them
70525b16253fSmrg	    # from the output so that they don't get included in the library
70535b16253fSmrg	    # dependencies.
70545b16253fSmrg	    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'
70555b16253fSmrg	    ;;
70565b16253fSmrg	  xl* | mpixl* | bgxl*)
70575b16253fSmrg	    # IBM XL 8.0 on PPC, with GNU ld
70585b16253fSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
70595b16253fSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
70605b16253fSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
70615b16253fSmrg	    if test yes = "$supports_anon_versioning"; then
70625b16253fSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
70635b16253fSmrg                cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
70645b16253fSmrg                echo "local: *; };" >> $output_objdir/$libname.ver~
70655b16253fSmrg                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
70665b16253fSmrg	    fi
70675b16253fSmrg	    ;;
70685b16253fSmrg	  *)
70695b16253fSmrg	    case `$CC -V 2>&1 | $SED 5q` in
70705b16253fSmrg	    *Sun\ C*)
70715b16253fSmrg	      # Sun C++ 5.9
70725b16253fSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
70735b16253fSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
70745b16253fSmrg	      _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'
70755b16253fSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
70765b16253fSmrg	      _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'
70775b16253fSmrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
70785b16253fSmrg
70795b16253fSmrg	      # Not sure whether something based on
70805b16253fSmrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
70815b16253fSmrg	      # would be better.
70825b16253fSmrg	      output_verbose_link_cmd='func_echo_all'
70835b16253fSmrg
70845b16253fSmrg	      # Archives containing C++ object files must be created using
70855b16253fSmrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
70865b16253fSmrg	      # necessary to make sure instantiated templates are included
70875b16253fSmrg	      # in the archive.
70885b16253fSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
70895b16253fSmrg	      ;;
70905b16253fSmrg	    esac
70915b16253fSmrg	    ;;
70925b16253fSmrg	esac
70935b16253fSmrg	;;
70945b16253fSmrg
70955b16253fSmrg      lynxos*)
70965b16253fSmrg        # FIXME: insert proper C++ library support
70975b16253fSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
70985b16253fSmrg	;;
70995b16253fSmrg
71005b16253fSmrg      m88k*)
71015b16253fSmrg        # FIXME: insert proper C++ library support
71025b16253fSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
71035b16253fSmrg	;;
71045b16253fSmrg
71055b16253fSmrg      mvs*)
71065b16253fSmrg        case $cc_basename in
71075b16253fSmrg          cxx*)
71085b16253fSmrg	    # FIXME: insert proper C++ library support
71095b16253fSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
71105b16253fSmrg	    ;;
71115b16253fSmrg	  *)
71125b16253fSmrg	    # FIXME: insert proper C++ library support
71135b16253fSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
71145b16253fSmrg	    ;;
71155b16253fSmrg	esac
71165b16253fSmrg	;;
71175b16253fSmrg
71185b16253fSmrg      netbsd*)
71195b16253fSmrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
71205b16253fSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
71215b16253fSmrg	  wlarc=
71225b16253fSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
71235b16253fSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
71245b16253fSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
71255b16253fSmrg	fi
71265b16253fSmrg	# Workaround some broken pre-1.5 toolchains
71275b16253fSmrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
71285b16253fSmrg	;;
71295b16253fSmrg
71305b16253fSmrg      *nto* | *qnx*)
71315b16253fSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
71325b16253fSmrg	;;
71335b16253fSmrg
71345b16253fSmrg      openbsd* | bitrig*)
71355b16253fSmrg	if test -f /usr/libexec/ld.so; then
71365b16253fSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
71375b16253fSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
71385b16253fSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
71395b16253fSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
71405b16253fSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
71415b16253fSmrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
71425b16253fSmrg	    _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'
71435b16253fSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
71445b16253fSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
71455b16253fSmrg	  fi
71465b16253fSmrg	  output_verbose_link_cmd=func_echo_all
71475b16253fSmrg	else
71485b16253fSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
71495b16253fSmrg	fi
71505b16253fSmrg	;;
71515b16253fSmrg
71525b16253fSmrg      osf3* | osf4* | osf5*)
71535b16253fSmrg        case $cc_basename in
71545b16253fSmrg          KCC*)
71555b16253fSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
71565b16253fSmrg
71575b16253fSmrg	    # KCC will only create a shared library if the output file
71585b16253fSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
71595b16253fSmrg	    # to its proper name (with version) after linking.
71605b16253fSmrg	    _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'
71615b16253fSmrg
71625b16253fSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
71635b16253fSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
71645b16253fSmrg
71655b16253fSmrg	    # Archives containing C++ object files must be created using
71665b16253fSmrg	    # the KAI C++ compiler.
71675b16253fSmrg	    case $host in
71685b16253fSmrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
71695b16253fSmrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
71705b16253fSmrg	    esac
71715b16253fSmrg	    ;;
71725b16253fSmrg          RCC*)
71735b16253fSmrg	    # Rational C++ 2.4.1
71745b16253fSmrg	    # FIXME: insert proper C++ library support
71755b16253fSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
71765b16253fSmrg	    ;;
71775b16253fSmrg          cxx*)
71785b16253fSmrg	    case $host in
71795b16253fSmrg	      osf3*)
71805b16253fSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
71815b16253fSmrg	        _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'
71825b16253fSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
71835b16253fSmrg		;;
71845b16253fSmrg	      *)
71855b16253fSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
71865b16253fSmrg	        _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'
71875b16253fSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
71885b16253fSmrg                  echo "-hidden">> $lib.exp~
71895b16253fSmrg                  $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~
71905b16253fSmrg                  $RM $lib.exp'
71915b16253fSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
71925b16253fSmrg		;;
71935b16253fSmrg	    esac
71945b16253fSmrg
71955b16253fSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
71965b16253fSmrg
71975b16253fSmrg	    # Commands to make compiler produce verbose output that lists
71985b16253fSmrg	    # what "hidden" libraries, object files and flags are used when
71995b16253fSmrg	    # linking a shared library.
72005b16253fSmrg	    #
72015b16253fSmrg	    # There doesn't appear to be a way to prevent this compiler from
72025b16253fSmrg	    # explicitly linking system object files so we need to strip them
72035b16253fSmrg	    # from the output so that they don't get included in the library
72045b16253fSmrg	    # dependencies.
72055b16253fSmrg	    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"'
72065b16253fSmrg	    ;;
72075b16253fSmrg	  *)
72085b16253fSmrg	    if test yes,no = "$GXX,$with_gnu_ld"; then
72095b16253fSmrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
72105b16253fSmrg	      case $host in
72115b16253fSmrg	        osf3*)
72125b16253fSmrg	          _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'
72135b16253fSmrg		  ;;
72145b16253fSmrg	        *)
72155b16253fSmrg	          _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'
72165b16253fSmrg		  ;;
72175b16253fSmrg	      esac
72185b16253fSmrg
72195b16253fSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
72205b16253fSmrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
72215b16253fSmrg
72225b16253fSmrg	      # Commands to make compiler produce verbose output that lists
72235b16253fSmrg	      # what "hidden" libraries, object files and flags are used when
72245b16253fSmrg	      # linking a shared library.
72255b16253fSmrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
72265b16253fSmrg
72275b16253fSmrg	    else
72285b16253fSmrg	      # FIXME: insert proper C++ library support
72295b16253fSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
72305b16253fSmrg	    fi
72315b16253fSmrg	    ;;
72325b16253fSmrg        esac
72335b16253fSmrg        ;;
72345b16253fSmrg
72355b16253fSmrg      psos*)
72365b16253fSmrg        # FIXME: insert proper C++ library support
72375b16253fSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
72385b16253fSmrg        ;;
72395b16253fSmrg
72405b16253fSmrg      sunos4*)
72415b16253fSmrg        case $cc_basename in
72425b16253fSmrg          CC*)
72435b16253fSmrg	    # Sun C++ 4.x
72445b16253fSmrg	    # FIXME: insert proper C++ library support
72455b16253fSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
72465b16253fSmrg	    ;;
72475b16253fSmrg          lcc*)
72485b16253fSmrg	    # Lucid
72495b16253fSmrg	    # FIXME: insert proper C++ library support
72505b16253fSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
72515b16253fSmrg	    ;;
72525b16253fSmrg          *)
72535b16253fSmrg	    # FIXME: insert proper C++ library support
72545b16253fSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
72555b16253fSmrg	    ;;
72565b16253fSmrg        esac
72575b16253fSmrg        ;;
72585b16253fSmrg
72595b16253fSmrg      solaris*)
72605b16253fSmrg        case $cc_basename in
72615b16253fSmrg          CC* | sunCC*)
72625b16253fSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
72635b16253fSmrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
72645b16253fSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
72655b16253fSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
72665b16253fSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
72675b16253fSmrg              $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'
72685b16253fSmrg
72695b16253fSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
72705b16253fSmrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
72715b16253fSmrg	    case $host_os in
72725b16253fSmrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
72735b16253fSmrg	      *)
72745b16253fSmrg		# The compiler driver will combine and reorder linker options,
72755b16253fSmrg		# but understands '-z linker_flag'.
72765b16253fSmrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
72775b16253fSmrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
72785b16253fSmrg	        ;;
72795b16253fSmrg	    esac
72805b16253fSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
72815b16253fSmrg
72825b16253fSmrg	    output_verbose_link_cmd='func_echo_all'
72835b16253fSmrg
72845b16253fSmrg	    # Archives containing C++ object files must be created using
72855b16253fSmrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
72865b16253fSmrg	    # necessary to make sure instantiated templates are included
72875b16253fSmrg	    # in the archive.
72885b16253fSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
72895b16253fSmrg	    ;;
72905b16253fSmrg          gcx*)
72915b16253fSmrg	    # Green Hills C++ Compiler
72925b16253fSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
72935b16253fSmrg
72945b16253fSmrg	    # The C++ compiler must be used to create the archive.
72955b16253fSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
72965b16253fSmrg	    ;;
72975b16253fSmrg          *)
72985b16253fSmrg	    # GNU C++ compiler with Solaris linker
72995b16253fSmrg	    if test yes,no = "$GXX,$with_gnu_ld"; then
73005b16253fSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
73015b16253fSmrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
73025b16253fSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
73035b16253fSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
73045b16253fSmrg                  $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'
73055b16253fSmrg
73065b16253fSmrg	        # Commands to make compiler produce verbose output that lists
73075b16253fSmrg	        # what "hidden" libraries, object files and flags are used when
73085b16253fSmrg	        # linking a shared library.
73095b16253fSmrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
73105b16253fSmrg	      else
73115b16253fSmrg	        # g++ 2.7 appears to require '-G' NOT '-shared' on this
73125b16253fSmrg	        # platform.
73135b16253fSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
73145b16253fSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
73155b16253fSmrg                  $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'
73165b16253fSmrg
73175b16253fSmrg	        # Commands to make compiler produce verbose output that lists
73185b16253fSmrg	        # what "hidden" libraries, object files and flags are used when
73195b16253fSmrg	        # linking a shared library.
73205b16253fSmrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
73215b16253fSmrg	      fi
73225b16253fSmrg
73235b16253fSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
73245b16253fSmrg	      case $host_os in
73255b16253fSmrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
73265b16253fSmrg		*)
73275b16253fSmrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
73285b16253fSmrg		  ;;
73295b16253fSmrg	      esac
73305b16253fSmrg	    fi
73315b16253fSmrg	    ;;
73325b16253fSmrg        esac
73335b16253fSmrg        ;;
73345b16253fSmrg
73355b16253fSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
73365b16253fSmrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
73375b16253fSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
73385b16253fSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
73395b16253fSmrg      runpath_var='LD_RUN_PATH'
73405b16253fSmrg
73415b16253fSmrg      case $cc_basename in
73425b16253fSmrg        CC*)
73435b16253fSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73445b16253fSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73455b16253fSmrg	  ;;
73465b16253fSmrg	*)
73475b16253fSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73485b16253fSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73495b16253fSmrg	  ;;
73505b16253fSmrg      esac
73515b16253fSmrg      ;;
73525b16253fSmrg
73535b16253fSmrg      sysv5* | sco3.2v5* | sco5v6*)
73545b16253fSmrg	# Note: We CANNOT use -z defs as we might desire, because we do not
73555b16253fSmrg	# link with -lc, and that would cause any symbols used from libc to
73565b16253fSmrg	# always be unresolved, which means just about no library would
73575b16253fSmrg	# ever link correctly.  If we're not using GNU ld we use -z text
73585b16253fSmrg	# though, which does catch some bad symbols but isn't as heavy-handed
73595b16253fSmrg	# as -z defs.
73605b16253fSmrg	_LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
73615b16253fSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
73625b16253fSmrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
73635b16253fSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
73645b16253fSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
73655b16253fSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
73665b16253fSmrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
73675b16253fSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
73685b16253fSmrg	runpath_var='LD_RUN_PATH'
73695b16253fSmrg
73705b16253fSmrg	case $cc_basename in
73715b16253fSmrg          CC*)
73725b16253fSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73735b16253fSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73745b16253fSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
73755b16253fSmrg              '"$_LT_TAGVAR(old_archive_cmds, $1)"
73765b16253fSmrg	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
73775b16253fSmrg              '"$_LT_TAGVAR(reload_cmds, $1)"
73785b16253fSmrg	    ;;
73795b16253fSmrg	  *)
73805b16253fSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73815b16253fSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73825b16253fSmrg	    ;;
73835b16253fSmrg	esac
73845b16253fSmrg      ;;
73855b16253fSmrg
73865b16253fSmrg      tandem*)
73875b16253fSmrg        case $cc_basename in
73885b16253fSmrg          NCC*)
73895b16253fSmrg	    # NonStop-UX NCC 3.20
73905b16253fSmrg	    # FIXME: insert proper C++ library support
73915b16253fSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
73925b16253fSmrg	    ;;
73935b16253fSmrg          *)
73945b16253fSmrg	    # FIXME: insert proper C++ library support
73955b16253fSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
73965b16253fSmrg	    ;;
73975b16253fSmrg        esac
73985b16253fSmrg        ;;
73995b16253fSmrg
74005b16253fSmrg      vxworks*)
74015b16253fSmrg        # FIXME: insert proper C++ library support
74025b16253fSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
74035b16253fSmrg        ;;
74045b16253fSmrg
74055b16253fSmrg      *)
74065b16253fSmrg        # FIXME: insert proper C++ library support
74075b16253fSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
74085b16253fSmrg        ;;
74095b16253fSmrg    esac
74105b16253fSmrg
74115b16253fSmrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
74125b16253fSmrg    test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
74135b16253fSmrg
74145b16253fSmrg    _LT_TAGVAR(GCC, $1)=$GXX
74155b16253fSmrg    _LT_TAGVAR(LD, $1)=$LD
74165b16253fSmrg
74175b16253fSmrg    ## CAVEAT EMPTOR:
74185b16253fSmrg    ## There is no encapsulation within the following macros, do not change
74195b16253fSmrg    ## the running order or otherwise move them around unless you know exactly
74205b16253fSmrg    ## what you are doing...
74215b16253fSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
74225b16253fSmrg    _LT_COMPILER_PIC($1)
74235b16253fSmrg    _LT_COMPILER_C_O($1)
74245b16253fSmrg    _LT_COMPILER_FILE_LOCKS($1)
74255b16253fSmrg    _LT_LINKER_SHLIBS($1)
74265b16253fSmrg    _LT_SYS_DYNAMIC_LINKER($1)
74275b16253fSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
74285b16253fSmrg
74295b16253fSmrg    _LT_CONFIG($1)
74305b16253fSmrg  fi # test -n "$compiler"
74315b16253fSmrg
74325b16253fSmrg  CC=$lt_save_CC
74335b16253fSmrg  CFLAGS=$lt_save_CFLAGS
74345b16253fSmrg  LDCXX=$LD
74355b16253fSmrg  LD=$lt_save_LD
74365b16253fSmrg  GCC=$lt_save_GCC
74375b16253fSmrg  with_gnu_ld=$lt_save_with_gnu_ld
74385b16253fSmrg  lt_cv_path_LDCXX=$lt_cv_path_LD
74395b16253fSmrg  lt_cv_path_LD=$lt_save_path_LD
74405b16253fSmrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
74415b16253fSmrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
74425b16253fSmrgfi # test yes != "$_lt_caught_CXX_error"
74435b16253fSmrg
74445b16253fSmrgAC_LANG_POP
74455b16253fSmrg])# _LT_LANG_CXX_CONFIG
74465b16253fSmrg
74475b16253fSmrg
74485b16253fSmrg# _LT_FUNC_STRIPNAME_CNF
74495b16253fSmrg# ----------------------
74505b16253fSmrg# func_stripname_cnf prefix suffix name
74515b16253fSmrg# strip PREFIX and SUFFIX off of NAME.
74525b16253fSmrg# PREFIX and SUFFIX must not contain globbing or regex special
74535b16253fSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading
74545b16253fSmrg# dot (in which case that matches only a dot).
74555b16253fSmrg#
74565b16253fSmrg# This function is identical to the (non-XSI) version of func_stripname,
74575b16253fSmrg# except this one can be used by m4 code that may be executed by configure,
74585b16253fSmrg# rather than the libtool script.
74595b16253fSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
74605b16253fSmrgAC_REQUIRE([_LT_DECL_SED])
74615b16253fSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
74625b16253fSmrgfunc_stripname_cnf ()
74635b16253fSmrg{
74645b16253fSmrg  case @S|@2 in
74655b16253fSmrg  .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
74665b16253fSmrg  *)  func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
74675b16253fSmrg  esac
74685b16253fSmrg} # func_stripname_cnf
74695b16253fSmrg])# _LT_FUNC_STRIPNAME_CNF
74705b16253fSmrg
74715b16253fSmrg
74725b16253fSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
74735b16253fSmrg# ---------------------------------
74745b16253fSmrg# Figure out "hidden" library dependencies from verbose
74755b16253fSmrg# compiler output when linking a shared library.
74765b16253fSmrg# Parse the compiler output and extract the necessary
74775b16253fSmrg# objects, libraries and library flags.
74785b16253fSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
74795b16253fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
74805b16253fSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
74815b16253fSmrg# Dependencies to place before and after the object being linked:
74825b16253fSmrg_LT_TAGVAR(predep_objects, $1)=
74835b16253fSmrg_LT_TAGVAR(postdep_objects, $1)=
74845b16253fSmrg_LT_TAGVAR(predeps, $1)=
74855b16253fSmrg_LT_TAGVAR(postdeps, $1)=
74865b16253fSmrg_LT_TAGVAR(compiler_lib_search_path, $1)=
74875b16253fSmrg
74885b16253fSmrgdnl we can't use the lt_simple_compile_test_code here,
74895b16253fSmrgdnl because it contains code intended for an executable,
74905b16253fSmrgdnl not a library.  It's possible we should let each
74915b16253fSmrgdnl tag define a new lt_????_link_test_code variable,
74925b16253fSmrgdnl but it's only used here...
74935b16253fSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
74945b16253fSmrgint a;
74955b16253fSmrgvoid foo (void) { a = 0; }
74965b16253fSmrg_LT_EOF
74975b16253fSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
74985b16253fSmrgclass Foo
74995b16253fSmrg{
75005b16253fSmrgpublic:
75015b16253fSmrg  Foo (void) { a = 0; }
75025b16253fSmrgprivate:
75035b16253fSmrg  int a;
75045b16253fSmrg};
75055b16253fSmrg_LT_EOF
75065b16253fSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
75075b16253fSmrg      subroutine foo
75085b16253fSmrg      implicit none
75095b16253fSmrg      integer*4 a
75105b16253fSmrg      a=0
75115b16253fSmrg      return
75125b16253fSmrg      end
75135b16253fSmrg_LT_EOF
75145b16253fSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
75155b16253fSmrg      subroutine foo
75165b16253fSmrg      implicit none
75175b16253fSmrg      integer a
75185b16253fSmrg      a=0
75195b16253fSmrg      return
75205b16253fSmrg      end
75215b16253fSmrg_LT_EOF
75225b16253fSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
75235b16253fSmrgpublic class foo {
75245b16253fSmrg  private int a;
75255b16253fSmrg  public void bar (void) {
75265b16253fSmrg    a = 0;
75275b16253fSmrg  }
75285b16253fSmrg};
75295b16253fSmrg_LT_EOF
75305b16253fSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
75315b16253fSmrgpackage foo
75325b16253fSmrgfunc foo() {
75335b16253fSmrg}
75345b16253fSmrg_LT_EOF
75355b16253fSmrg])
75365b16253fSmrg
75375b16253fSmrg_lt_libdeps_save_CFLAGS=$CFLAGS
75385b16253fSmrgcase "$CC $CFLAGS " in #(
75395b16253fSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
75405b16253fSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
75415b16253fSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
75425b16253fSmrgesac
75435b16253fSmrg
75445b16253fSmrgdnl Parse the compiler output and extract the necessary
75455b16253fSmrgdnl objects, libraries and library flags.
75465b16253fSmrgif AC_TRY_EVAL(ac_compile); then
75475b16253fSmrg  # Parse the compiler output and extract the necessary
75485b16253fSmrg  # objects, libraries and library flags.
75495b16253fSmrg
75505b16253fSmrg  # Sentinel used to keep track of whether or not we are before
75515b16253fSmrg  # the conftest object file.
75525b16253fSmrg  pre_test_object_deps_done=no
75535b16253fSmrg
75545b16253fSmrg  for p in `eval "$output_verbose_link_cmd"`; do
75555b16253fSmrg    case $prev$p in
75565b16253fSmrg
75575b16253fSmrg    -L* | -R* | -l*)
75585b16253fSmrg       # Some compilers place space between "-{L,R}" and the path.
75595b16253fSmrg       # Remove the space.
75605b16253fSmrg       if test x-L = "$p" ||
75615b16253fSmrg          test x-R = "$p"; then
75625b16253fSmrg	 prev=$p
75635b16253fSmrg	 continue
75645b16253fSmrg       fi
75655b16253fSmrg
75665b16253fSmrg       # Expand the sysroot to ease extracting the directories later.
75675b16253fSmrg       if test -z "$prev"; then
75685b16253fSmrg         case $p in
75695b16253fSmrg         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
75705b16253fSmrg         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
75715b16253fSmrg         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
75725b16253fSmrg         esac
75735b16253fSmrg       fi
75745b16253fSmrg       case $p in
75755b16253fSmrg       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
75765b16253fSmrg       esac
75775b16253fSmrg       if test no = "$pre_test_object_deps_done"; then
75785b16253fSmrg	 case $prev in
75795b16253fSmrg	 -L | -R)
75805b16253fSmrg	   # Internal compiler library paths should come after those
75815b16253fSmrg	   # provided the user.  The postdeps already come after the
75825b16253fSmrg	   # user supplied libs so there is no need to process them.
75835b16253fSmrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
75845b16253fSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
75855b16253fSmrg	   else
75865b16253fSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
75875b16253fSmrg	   fi
75885b16253fSmrg	   ;;
75895b16253fSmrg	 # The "-l" case would never come before the object being
75905b16253fSmrg	 # linked, so don't bother handling this case.
75915b16253fSmrg	 esac
75925b16253fSmrg       else
75935b16253fSmrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
75945b16253fSmrg	   _LT_TAGVAR(postdeps, $1)=$prev$p
75955b16253fSmrg	 else
75965b16253fSmrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
75975b16253fSmrg	 fi
75985b16253fSmrg       fi
75995b16253fSmrg       prev=
76005b16253fSmrg       ;;
76015b16253fSmrg
76025b16253fSmrg    *.lto.$objext) ;; # Ignore GCC LTO objects
76035b16253fSmrg    *.$objext)
76045b16253fSmrg       # This assumes that the test object file only shows up
76055b16253fSmrg       # once in the compiler output.
76065b16253fSmrg       if test "$p" = "conftest.$objext"; then
76075b16253fSmrg	 pre_test_object_deps_done=yes
76085b16253fSmrg	 continue
76095b16253fSmrg       fi
76105b16253fSmrg
76115b16253fSmrg       if test no = "$pre_test_object_deps_done"; then
76125b16253fSmrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
76135b16253fSmrg	   _LT_TAGVAR(predep_objects, $1)=$p
76145b16253fSmrg	 else
76155b16253fSmrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
76165b16253fSmrg	 fi
76175b16253fSmrg       else
76185b16253fSmrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
76195b16253fSmrg	   _LT_TAGVAR(postdep_objects, $1)=$p
76205b16253fSmrg	 else
76215b16253fSmrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
76225b16253fSmrg	 fi
76235b16253fSmrg       fi
76245b16253fSmrg       ;;
76255b16253fSmrg
76265b16253fSmrg    *) ;; # Ignore the rest.
76275b16253fSmrg
76285b16253fSmrg    esac
76295b16253fSmrg  done
76305b16253fSmrg
76315b16253fSmrg  # Clean up.
76325b16253fSmrg  rm -f a.out a.exe
76335b16253fSmrgelse
76345b16253fSmrg  echo "libtool.m4: error: problem compiling $1 test program"
76355b16253fSmrgfi
76365b16253fSmrg
76375b16253fSmrg$RM -f confest.$objext
76385b16253fSmrgCFLAGS=$_lt_libdeps_save_CFLAGS
76395b16253fSmrg
76405b16253fSmrg# PORTME: override above test on systems where it is broken
76415b16253fSmrgm4_if([$1], [CXX],
76425b16253fSmrg[case $host_os in
76435b16253fSmrginterix[[3-9]]*)
76445b16253fSmrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
76455b16253fSmrg  # hack all around it, let's just trust "g++" to DTRT.
76465b16253fSmrg  _LT_TAGVAR(predep_objects,$1)=
76475b16253fSmrg  _LT_TAGVAR(postdep_objects,$1)=
76485b16253fSmrg  _LT_TAGVAR(postdeps,$1)=
76495b16253fSmrg  ;;
76505b16253fSmrgesac
76515b16253fSmrg])
76525b16253fSmrg
76535b16253fSmrgcase " $_LT_TAGVAR(postdeps, $1) " in
76545b16253fSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
76555b16253fSmrgesac
76565b16253fSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
76575b16253fSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
76585b16253fSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
76595b16253fSmrgfi
76605b16253fSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
76615b16253fSmrg    [The directories searched by this compiler when creating a shared library])
76625b16253fSmrg_LT_TAGDECL([], [predep_objects], [1],
76635b16253fSmrg    [Dependencies to place before and after the objects being linked to
76645b16253fSmrg    create a shared library])
76655b16253fSmrg_LT_TAGDECL([], [postdep_objects], [1])
76665b16253fSmrg_LT_TAGDECL([], [predeps], [1])
76675b16253fSmrg_LT_TAGDECL([], [postdeps], [1])
76685b16253fSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
76695b16253fSmrg    [The library search path used internally by the compiler when linking
76705b16253fSmrg    a shared library])
76715b16253fSmrg])# _LT_SYS_HIDDEN_LIBDEPS
76725b16253fSmrg
76735b16253fSmrg
76745b16253fSmrg# _LT_LANG_F77_CONFIG([TAG])
76755b16253fSmrg# --------------------------
76765b16253fSmrg# Ensure that the configuration variables for a Fortran 77 compiler are
76775b16253fSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
76785b16253fSmrg# to write the compiler configuration to 'libtool'.
76795b16253fSmrgm4_defun([_LT_LANG_F77_CONFIG],
76805b16253fSmrg[AC_LANG_PUSH(Fortran 77)
76815b16253fSmrgif test -z "$F77" || test no = "$F77"; then
76825b16253fSmrg  _lt_disable_F77=yes
76835b16253fSmrgfi
76845b16253fSmrg
76855b16253fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
76865b16253fSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
76875b16253fSmrg_LT_TAGVAR(always_export_symbols, $1)=no
76885b16253fSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
76895b16253fSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
76905b16253fSmrg_LT_TAGVAR(hardcode_direct, $1)=no
76915b16253fSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
76925b16253fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
76935b16253fSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
76945b16253fSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
76955b16253fSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
76965b16253fSmrg_LT_TAGVAR(inherit_rpath, $1)=no
76975b16253fSmrg_LT_TAGVAR(module_cmds, $1)=
76985b16253fSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
76995b16253fSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
77005b16253fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
77015b16253fSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
77025b16253fSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
77035b16253fSmrg_LT_TAGVAR(no_undefined_flag, $1)=
77045b16253fSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
77055b16253fSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
77065b16253fSmrg
77075b16253fSmrg# Source file extension for f77 test sources.
77085b16253fSmrgac_ext=f
77095b16253fSmrg
77105b16253fSmrg# Object file extension for compiled f77 test sources.
77115b16253fSmrgobjext=o
77125b16253fSmrg_LT_TAGVAR(objext, $1)=$objext
77135b16253fSmrg
77145b16253fSmrg# No sense in running all these tests if we already determined that
77155b16253fSmrg# the F77 compiler isn't working.  Some variables (like enable_shared)
77165b16253fSmrg# are currently assumed to apply to all compilers on this platform,
77175b16253fSmrg# and will be corrupted by setting them based on a non-working compiler.
77185b16253fSmrgif test yes != "$_lt_disable_F77"; then
77195b16253fSmrg  # Code to be used in simple compile tests
77205b16253fSmrg  lt_simple_compile_test_code="\
77215b16253fSmrg      subroutine t
77225b16253fSmrg      return
77235b16253fSmrg      end
77245b16253fSmrg"
77255b16253fSmrg
77265b16253fSmrg  # Code to be used in simple link tests
77275b16253fSmrg  lt_simple_link_test_code="\
77285b16253fSmrg      program t
77295b16253fSmrg      end
77305b16253fSmrg"
77315b16253fSmrg
77325b16253fSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
77335b16253fSmrg  _LT_TAG_COMPILER
77345b16253fSmrg
77355b16253fSmrg  # save warnings/boilerplate of simple test code
77365b16253fSmrg  _LT_COMPILER_BOILERPLATE
77375b16253fSmrg  _LT_LINKER_BOILERPLATE
77385b16253fSmrg
77395b16253fSmrg  # Allow CC to be a program name with arguments.
77405b16253fSmrg  lt_save_CC=$CC
77415b16253fSmrg  lt_save_GCC=$GCC
77425b16253fSmrg  lt_save_CFLAGS=$CFLAGS
77435b16253fSmrg  CC=${F77-"f77"}
77445b16253fSmrg  CFLAGS=$FFLAGS
77455b16253fSmrg  compiler=$CC
77465b16253fSmrg  _LT_TAGVAR(compiler, $1)=$CC
77475b16253fSmrg  _LT_CC_BASENAME([$compiler])
77485b16253fSmrg  GCC=$G77
77495b16253fSmrg  if test -n "$compiler"; then
77505b16253fSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
77515b16253fSmrg    AC_MSG_RESULT([$can_build_shared])
77525b16253fSmrg
77535b16253fSmrg    AC_MSG_CHECKING([whether to build shared libraries])
77545b16253fSmrg    test no = "$can_build_shared" && enable_shared=no
77555b16253fSmrg
77565b16253fSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
77575b16253fSmrg    # are all built from PIC.
77585b16253fSmrg    case $host_os in
77595b16253fSmrg      aix3*)
77605b16253fSmrg        test yes = "$enable_shared" && enable_static=no
77615b16253fSmrg        if test -n "$RANLIB"; then
77625b16253fSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
77635b16253fSmrg          postinstall_cmds='$RANLIB $lib'
77645b16253fSmrg        fi
77655b16253fSmrg        ;;
77665b16253fSmrg      aix[[4-9]]*)
77675b16253fSmrg	if test ia64 != "$host_cpu"; then
77685b16253fSmrg	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
77695b16253fSmrg	  yes,aix,yes) ;;		# shared object as lib.so file only
77705b16253fSmrg	  yes,svr4,*) ;;		# shared object as lib.so archive member only
77715b16253fSmrg	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
77725b16253fSmrg	  esac
77735b16253fSmrg	fi
77745b16253fSmrg        ;;
77755b16253fSmrg    esac
77765b16253fSmrg    AC_MSG_RESULT([$enable_shared])
77775b16253fSmrg
77785b16253fSmrg    AC_MSG_CHECKING([whether to build static libraries])
77795b16253fSmrg    # Make sure either enable_shared or enable_static is yes.
77805b16253fSmrg    test yes = "$enable_shared" || enable_static=yes
77815b16253fSmrg    AC_MSG_RESULT([$enable_static])
77825b16253fSmrg
77835b16253fSmrg    _LT_TAGVAR(GCC, $1)=$G77
77845b16253fSmrg    _LT_TAGVAR(LD, $1)=$LD
77855b16253fSmrg
77865b16253fSmrg    ## CAVEAT EMPTOR:
77875b16253fSmrg    ## There is no encapsulation within the following macros, do not change
77885b16253fSmrg    ## the running order or otherwise move them around unless you know exactly
77895b16253fSmrg    ## what you are doing...
77905b16253fSmrg    _LT_COMPILER_PIC($1)
77915b16253fSmrg    _LT_COMPILER_C_O($1)
77925b16253fSmrg    _LT_COMPILER_FILE_LOCKS($1)
77935b16253fSmrg    _LT_LINKER_SHLIBS($1)
77945b16253fSmrg    _LT_SYS_DYNAMIC_LINKER($1)
77955b16253fSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
77965b16253fSmrg
77975b16253fSmrg    _LT_CONFIG($1)
77985b16253fSmrg  fi # test -n "$compiler"
77995b16253fSmrg
78005b16253fSmrg  GCC=$lt_save_GCC
78015b16253fSmrg  CC=$lt_save_CC
78025b16253fSmrg  CFLAGS=$lt_save_CFLAGS
78035b16253fSmrgfi # test yes != "$_lt_disable_F77"
78045b16253fSmrg
78055b16253fSmrgAC_LANG_POP
78065b16253fSmrg])# _LT_LANG_F77_CONFIG
78075b16253fSmrg
78085b16253fSmrg
78095b16253fSmrg# _LT_LANG_FC_CONFIG([TAG])
78105b16253fSmrg# -------------------------
78115b16253fSmrg# Ensure that the configuration variables for a Fortran compiler are
78125b16253fSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
78135b16253fSmrg# to write the compiler configuration to 'libtool'.
78145b16253fSmrgm4_defun([_LT_LANG_FC_CONFIG],
78155b16253fSmrg[AC_LANG_PUSH(Fortran)
78165b16253fSmrg
78175b16253fSmrgif test -z "$FC" || test no = "$FC"; then
78185b16253fSmrg  _lt_disable_FC=yes
78195b16253fSmrgfi
78205b16253fSmrg
78215b16253fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
78225b16253fSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
78235b16253fSmrg_LT_TAGVAR(always_export_symbols, $1)=no
78245b16253fSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
78255b16253fSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
78265b16253fSmrg_LT_TAGVAR(hardcode_direct, $1)=no
78275b16253fSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
78285b16253fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
78295b16253fSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
78305b16253fSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
78315b16253fSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
78325b16253fSmrg_LT_TAGVAR(inherit_rpath, $1)=no
78335b16253fSmrg_LT_TAGVAR(module_cmds, $1)=
78345b16253fSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
78355b16253fSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
78365b16253fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
78375b16253fSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
78385b16253fSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
78395b16253fSmrg_LT_TAGVAR(no_undefined_flag, $1)=
78405b16253fSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
78415b16253fSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
78425b16253fSmrg
78435b16253fSmrg# Source file extension for fc test sources.
78445b16253fSmrgac_ext=${ac_fc_srcext-f}
78455b16253fSmrg
78465b16253fSmrg# Object file extension for compiled fc test sources.
78475b16253fSmrgobjext=o
78485b16253fSmrg_LT_TAGVAR(objext, $1)=$objext
78495b16253fSmrg
78505b16253fSmrg# No sense in running all these tests if we already determined that
78515b16253fSmrg# the FC compiler isn't working.  Some variables (like enable_shared)
78525b16253fSmrg# are currently assumed to apply to all compilers on this platform,
78535b16253fSmrg# and will be corrupted by setting them based on a non-working compiler.
78545b16253fSmrgif test yes != "$_lt_disable_FC"; then
78555b16253fSmrg  # Code to be used in simple compile tests
78565b16253fSmrg  lt_simple_compile_test_code="\
78575b16253fSmrg      subroutine t
78585b16253fSmrg      return
78595b16253fSmrg      end
78605b16253fSmrg"
78615b16253fSmrg
78625b16253fSmrg  # Code to be used in simple link tests
78635b16253fSmrg  lt_simple_link_test_code="\
78645b16253fSmrg      program t
78655b16253fSmrg      end
78665b16253fSmrg"
78675b16253fSmrg
78685b16253fSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
78695b16253fSmrg  _LT_TAG_COMPILER
78705b16253fSmrg
78715b16253fSmrg  # save warnings/boilerplate of simple test code
78725b16253fSmrg  _LT_COMPILER_BOILERPLATE
78735b16253fSmrg  _LT_LINKER_BOILERPLATE
78745b16253fSmrg
78755b16253fSmrg  # Allow CC to be a program name with arguments.
78765b16253fSmrg  lt_save_CC=$CC
78775b16253fSmrg  lt_save_GCC=$GCC
78785b16253fSmrg  lt_save_CFLAGS=$CFLAGS
78795b16253fSmrg  CC=${FC-"f95"}
78805b16253fSmrg  CFLAGS=$FCFLAGS
78815b16253fSmrg  compiler=$CC
78825b16253fSmrg  GCC=$ac_cv_fc_compiler_gnu
78835b16253fSmrg
78845b16253fSmrg  _LT_TAGVAR(compiler, $1)=$CC
78855b16253fSmrg  _LT_CC_BASENAME([$compiler])
78865b16253fSmrg
78875b16253fSmrg  if test -n "$compiler"; then
78885b16253fSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
78895b16253fSmrg    AC_MSG_RESULT([$can_build_shared])
78905b16253fSmrg
78915b16253fSmrg    AC_MSG_CHECKING([whether to build shared libraries])
78925b16253fSmrg    test no = "$can_build_shared" && enable_shared=no
78935b16253fSmrg
78945b16253fSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
78955b16253fSmrg    # are all built from PIC.
78965b16253fSmrg    case $host_os in
78975b16253fSmrg      aix3*)
78985b16253fSmrg        test yes = "$enable_shared" && enable_static=no
78995b16253fSmrg        if test -n "$RANLIB"; then
79005b16253fSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
79015b16253fSmrg          postinstall_cmds='$RANLIB $lib'
79025b16253fSmrg        fi
79035b16253fSmrg        ;;
79045b16253fSmrg      aix[[4-9]]*)
79055b16253fSmrg	if test ia64 != "$host_cpu"; then
79065b16253fSmrg	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
79075b16253fSmrg	  yes,aix,yes) ;;		# shared object as lib.so file only
79085b16253fSmrg	  yes,svr4,*) ;;		# shared object as lib.so archive member only
79095b16253fSmrg	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
79105b16253fSmrg	  esac
79115b16253fSmrg	fi
79125b16253fSmrg        ;;
79135b16253fSmrg    esac
79145b16253fSmrg    AC_MSG_RESULT([$enable_shared])
79155b16253fSmrg
79165b16253fSmrg    AC_MSG_CHECKING([whether to build static libraries])
79175b16253fSmrg    # Make sure either enable_shared or enable_static is yes.
79185b16253fSmrg    test yes = "$enable_shared" || enable_static=yes
79195b16253fSmrg    AC_MSG_RESULT([$enable_static])
79205b16253fSmrg
79215b16253fSmrg    _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
79225b16253fSmrg    _LT_TAGVAR(LD, $1)=$LD
79235b16253fSmrg
79245b16253fSmrg    ## CAVEAT EMPTOR:
79255b16253fSmrg    ## There is no encapsulation within the following macros, do not change
79265b16253fSmrg    ## the running order or otherwise move them around unless you know exactly
79275b16253fSmrg    ## what you are doing...
79285b16253fSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
79295b16253fSmrg    _LT_COMPILER_PIC($1)
79305b16253fSmrg    _LT_COMPILER_C_O($1)
79315b16253fSmrg    _LT_COMPILER_FILE_LOCKS($1)
79325b16253fSmrg    _LT_LINKER_SHLIBS($1)
79335b16253fSmrg    _LT_SYS_DYNAMIC_LINKER($1)
79345b16253fSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
79355b16253fSmrg
79365b16253fSmrg    _LT_CONFIG($1)
79375b16253fSmrg  fi # test -n "$compiler"
79385b16253fSmrg
79395b16253fSmrg  GCC=$lt_save_GCC
79405b16253fSmrg  CC=$lt_save_CC
79415b16253fSmrg  CFLAGS=$lt_save_CFLAGS
79425b16253fSmrgfi # test yes != "$_lt_disable_FC"
79435b16253fSmrg
79445b16253fSmrgAC_LANG_POP
79455b16253fSmrg])# _LT_LANG_FC_CONFIG
79465b16253fSmrg
79475b16253fSmrg
79485b16253fSmrg# _LT_LANG_GCJ_CONFIG([TAG])
79495b16253fSmrg# --------------------------
79505b16253fSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler
79515b16253fSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
79525b16253fSmrg# to write the compiler configuration to 'libtool'.
79535b16253fSmrgm4_defun([_LT_LANG_GCJ_CONFIG],
79545b16253fSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl
79555b16253fSmrgAC_LANG_SAVE
79565b16253fSmrg
79575b16253fSmrg# Source file extension for Java test sources.
79585b16253fSmrgac_ext=java
79595b16253fSmrg
79605b16253fSmrg# Object file extension for compiled Java test sources.
79615b16253fSmrgobjext=o
79625b16253fSmrg_LT_TAGVAR(objext, $1)=$objext
79635b16253fSmrg
79645b16253fSmrg# Code to be used in simple compile tests
79655b16253fSmrglt_simple_compile_test_code="class foo {}"
79665b16253fSmrg
79675b16253fSmrg# Code to be used in simple link tests
79685b16253fSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
79695b16253fSmrg
79705b16253fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
79715b16253fSmrg_LT_TAG_COMPILER
79725b16253fSmrg
79735b16253fSmrg# save warnings/boilerplate of simple test code
79745b16253fSmrg_LT_COMPILER_BOILERPLATE
79755b16253fSmrg_LT_LINKER_BOILERPLATE
79765b16253fSmrg
79775b16253fSmrg# Allow CC to be a program name with arguments.
79785b16253fSmrglt_save_CC=$CC
79795b16253fSmrglt_save_CFLAGS=$CFLAGS
79805b16253fSmrglt_save_GCC=$GCC
79815b16253fSmrgGCC=yes
79825b16253fSmrgCC=${GCJ-"gcj"}
79835b16253fSmrgCFLAGS=$GCJFLAGS
79845b16253fSmrgcompiler=$CC
79855b16253fSmrg_LT_TAGVAR(compiler, $1)=$CC
79865b16253fSmrg_LT_TAGVAR(LD, $1)=$LD
79875b16253fSmrg_LT_CC_BASENAME([$compiler])
79885b16253fSmrg
79895b16253fSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
79905b16253fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
79915b16253fSmrg
79925b16253fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
79935b16253fSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
79945b16253fSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
79955b16253fSmrg
79965b16253fSmrg## CAVEAT EMPTOR:
79975b16253fSmrg## There is no encapsulation within the following macros, do not change
79985b16253fSmrg## the running order or otherwise move them around unless you know exactly
79995b16253fSmrg## what you are doing...
80005b16253fSmrgif test -n "$compiler"; then
80015b16253fSmrg  _LT_COMPILER_NO_RTTI($1)
80025b16253fSmrg  _LT_COMPILER_PIC($1)
80035b16253fSmrg  _LT_COMPILER_C_O($1)
80045b16253fSmrg  _LT_COMPILER_FILE_LOCKS($1)
80055b16253fSmrg  _LT_LINKER_SHLIBS($1)
80065b16253fSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
80075b16253fSmrg
80085b16253fSmrg  _LT_CONFIG($1)
80095b16253fSmrgfi
80105b16253fSmrg
80115b16253fSmrgAC_LANG_RESTORE
80125b16253fSmrg
80135b16253fSmrgGCC=$lt_save_GCC
80145b16253fSmrgCC=$lt_save_CC
80155b16253fSmrgCFLAGS=$lt_save_CFLAGS
80165b16253fSmrg])# _LT_LANG_GCJ_CONFIG
80175b16253fSmrg
80185b16253fSmrg
80195b16253fSmrg# _LT_LANG_GO_CONFIG([TAG])
80205b16253fSmrg# --------------------------
80215b16253fSmrg# Ensure that the configuration variables for the GNU Go compiler
80225b16253fSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
80235b16253fSmrg# to write the compiler configuration to 'libtool'.
80245b16253fSmrgm4_defun([_LT_LANG_GO_CONFIG],
80255b16253fSmrg[AC_REQUIRE([LT_PROG_GO])dnl
80265b16253fSmrgAC_LANG_SAVE
80275b16253fSmrg
80285b16253fSmrg# Source file extension for Go test sources.
80295b16253fSmrgac_ext=go
80305b16253fSmrg
80315b16253fSmrg# Object file extension for compiled Go test sources.
80325b16253fSmrgobjext=o
80335b16253fSmrg_LT_TAGVAR(objext, $1)=$objext
80345b16253fSmrg
80355b16253fSmrg# Code to be used in simple compile tests
80365b16253fSmrglt_simple_compile_test_code="package main; func main() { }"
80375b16253fSmrg
80385b16253fSmrg# Code to be used in simple link tests
80395b16253fSmrglt_simple_link_test_code='package main; func main() { }'
80405b16253fSmrg
80415b16253fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
80425b16253fSmrg_LT_TAG_COMPILER
80435b16253fSmrg
80445b16253fSmrg# save warnings/boilerplate of simple test code
80455b16253fSmrg_LT_COMPILER_BOILERPLATE
80465b16253fSmrg_LT_LINKER_BOILERPLATE
80475b16253fSmrg
80485b16253fSmrg# Allow CC to be a program name with arguments.
80495b16253fSmrglt_save_CC=$CC
80505b16253fSmrglt_save_CFLAGS=$CFLAGS
80515b16253fSmrglt_save_GCC=$GCC
80525b16253fSmrgGCC=yes
80535b16253fSmrgCC=${GOC-"gccgo"}
80545b16253fSmrgCFLAGS=$GOFLAGS
80555b16253fSmrgcompiler=$CC
80565b16253fSmrg_LT_TAGVAR(compiler, $1)=$CC
80575b16253fSmrg_LT_TAGVAR(LD, $1)=$LD
80585b16253fSmrg_LT_CC_BASENAME([$compiler])
80595b16253fSmrg
80605b16253fSmrg# Go did not exist at the time GCC didn't implicitly link libc in.
80615b16253fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
80625b16253fSmrg
80635b16253fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
80645b16253fSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
80655b16253fSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
80665b16253fSmrg
80675b16253fSmrg## CAVEAT EMPTOR:
80685b16253fSmrg## There is no encapsulation within the following macros, do not change
80695b16253fSmrg## the running order or otherwise move them around unless you know exactly
80705b16253fSmrg## what you are doing...
80715b16253fSmrgif test -n "$compiler"; then
80725b16253fSmrg  _LT_COMPILER_NO_RTTI($1)
80735b16253fSmrg  _LT_COMPILER_PIC($1)
80745b16253fSmrg  _LT_COMPILER_C_O($1)
80755b16253fSmrg  _LT_COMPILER_FILE_LOCKS($1)
80765b16253fSmrg  _LT_LINKER_SHLIBS($1)
80775b16253fSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
80785b16253fSmrg
80795b16253fSmrg  _LT_CONFIG($1)
80805b16253fSmrgfi
80815b16253fSmrg
80825b16253fSmrgAC_LANG_RESTORE
80835b16253fSmrg
80845b16253fSmrgGCC=$lt_save_GCC
80855b16253fSmrgCC=$lt_save_CC
80865b16253fSmrgCFLAGS=$lt_save_CFLAGS
80875b16253fSmrg])# _LT_LANG_GO_CONFIG
80885b16253fSmrg
80895b16253fSmrg
80905b16253fSmrg# _LT_LANG_RC_CONFIG([TAG])
80915b16253fSmrg# -------------------------
80925b16253fSmrg# Ensure that the configuration variables for the Windows resource compiler
80935b16253fSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
80945b16253fSmrg# to write the compiler configuration to 'libtool'.
80955b16253fSmrgm4_defun([_LT_LANG_RC_CONFIG],
80965b16253fSmrg[AC_REQUIRE([LT_PROG_RC])dnl
80975b16253fSmrgAC_LANG_SAVE
80985b16253fSmrg
80995b16253fSmrg# Source file extension for RC test sources.
81005b16253fSmrgac_ext=rc
81015b16253fSmrg
81025b16253fSmrg# Object file extension for compiled RC test sources.
81035b16253fSmrgobjext=o
81045b16253fSmrg_LT_TAGVAR(objext, $1)=$objext
81055b16253fSmrg
81065b16253fSmrg# Code to be used in simple compile tests
81075b16253fSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
81085b16253fSmrg
81095b16253fSmrg# Code to be used in simple link tests
81105b16253fSmrglt_simple_link_test_code=$lt_simple_compile_test_code
81115b16253fSmrg
81125b16253fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
81135b16253fSmrg_LT_TAG_COMPILER
81145b16253fSmrg
81155b16253fSmrg# save warnings/boilerplate of simple test code
81165b16253fSmrg_LT_COMPILER_BOILERPLATE
81175b16253fSmrg_LT_LINKER_BOILERPLATE
81185b16253fSmrg
81195b16253fSmrg# Allow CC to be a program name with arguments.
81205b16253fSmrglt_save_CC=$CC
81215b16253fSmrglt_save_CFLAGS=$CFLAGS
81225b16253fSmrglt_save_GCC=$GCC
81235b16253fSmrgGCC=
81245b16253fSmrgCC=${RC-"windres"}
81255b16253fSmrgCFLAGS=
81265b16253fSmrgcompiler=$CC
81275b16253fSmrg_LT_TAGVAR(compiler, $1)=$CC
81285b16253fSmrg_LT_CC_BASENAME([$compiler])
81295b16253fSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
81305b16253fSmrg
81315b16253fSmrgif test -n "$compiler"; then
81325b16253fSmrg  :
81335b16253fSmrg  _LT_CONFIG($1)
81345b16253fSmrgfi
81355b16253fSmrg
81365b16253fSmrgGCC=$lt_save_GCC
81375b16253fSmrgAC_LANG_RESTORE
81385b16253fSmrgCC=$lt_save_CC
81395b16253fSmrgCFLAGS=$lt_save_CFLAGS
81405b16253fSmrg])# _LT_LANG_RC_CONFIG
81415b16253fSmrg
81425b16253fSmrg
81435b16253fSmrg# LT_PROG_GCJ
81445b16253fSmrg# -----------
81455b16253fSmrgAC_DEFUN([LT_PROG_GCJ],
81465b16253fSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
81475b16253fSmrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
81485b16253fSmrg    [AC_CHECK_TOOL(GCJ, gcj,)
81495b16253fSmrg      test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
81505b16253fSmrg      AC_SUBST(GCJFLAGS)])])[]dnl
81515b16253fSmrg])
81525b16253fSmrg
81535b16253fSmrg# Old name:
81545b16253fSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
81555b16253fSmrgdnl aclocal-1.4 backwards compatibility:
81565b16253fSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
81575b16253fSmrg
81585b16253fSmrg
81595b16253fSmrg# LT_PROG_GO
81605b16253fSmrg# ----------
81615b16253fSmrgAC_DEFUN([LT_PROG_GO],
81625b16253fSmrg[AC_CHECK_TOOL(GOC, gccgo,)
81635b16253fSmrg])
81645b16253fSmrg
81655b16253fSmrg
81665b16253fSmrg# LT_PROG_RC
81675b16253fSmrg# ----------
81685b16253fSmrgAC_DEFUN([LT_PROG_RC],
81695b16253fSmrg[AC_CHECK_TOOL(RC, windres,)
81705b16253fSmrg])
81715b16253fSmrg
81725b16253fSmrg# Old name:
81735b16253fSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
81745b16253fSmrgdnl aclocal-1.4 backwards compatibility:
81755b16253fSmrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
81765b16253fSmrg
81775b16253fSmrg
81785b16253fSmrg# _LT_DECL_EGREP
81795b16253fSmrg# --------------
81805b16253fSmrg# If we don't have a new enough Autoconf to choose the best grep
81815b16253fSmrg# available, choose the one first in the user's PATH.
81825b16253fSmrgm4_defun([_LT_DECL_EGREP],
81835b16253fSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
81845b16253fSmrgAC_REQUIRE([AC_PROG_FGREP])dnl
81855b16253fSmrgtest -z "$GREP" && GREP=grep
81865b16253fSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
81875b16253fSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
81885b16253fSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
81895b16253fSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
81905b16253fSmrgAC_SUBST([GREP])
81915b16253fSmrg])
81925b16253fSmrg
81935b16253fSmrg
81945b16253fSmrg# _LT_DECL_OBJDUMP
81955b16253fSmrg# --------------
81965b16253fSmrg# If we don't have a new enough Autoconf to choose the best objdump
81975b16253fSmrg# available, choose the one first in the user's PATH.
81985b16253fSmrgm4_defun([_LT_DECL_OBJDUMP],
81995b16253fSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
82005b16253fSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
82015b16253fSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
82025b16253fSmrgAC_SUBST([OBJDUMP])
82035b16253fSmrg])
82045b16253fSmrg
82055b16253fSmrg# _LT_DECL_DLLTOOL
82065b16253fSmrg# ----------------
82075b16253fSmrg# Ensure DLLTOOL variable is set.
82085b16253fSmrgm4_defun([_LT_DECL_DLLTOOL],
82095b16253fSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
82105b16253fSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
82115b16253fSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
82125b16253fSmrgAC_SUBST([DLLTOOL])
82135b16253fSmrg])
82145b16253fSmrg
82155b16253fSmrg# _LT_DECL_FILECMD
82165b16253fSmrg# ----------------
82175b16253fSmrg# Check for a file(cmd) program that can be used to detect file type and magic
82185b16253fSmrgm4_defun([_LT_DECL_FILECMD],
82195b16253fSmrg[AC_CHECK_TOOL([FILECMD], [file], [:])
82205b16253fSmrg_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types])
82215b16253fSmrg])# _LD_DECL_FILECMD
82225b16253fSmrg
82235b16253fSmrg# _LT_DECL_SED
82245b16253fSmrg# ------------
82255b16253fSmrg# Check for a fully-functional sed program, that truncates
82265b16253fSmrg# as few characters as possible.  Prefer GNU sed if found.
82275b16253fSmrgm4_defun([_LT_DECL_SED],
82285b16253fSmrg[AC_PROG_SED
82295b16253fSmrgtest -z "$SED" && SED=sed
82305b16253fSmrgXsed="$SED -e 1s/^X//"
82315b16253fSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
82325b16253fSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
82335b16253fSmrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
82345b16253fSmrg])# _LT_DECL_SED
82355b16253fSmrg
82365b16253fSmrgm4_ifndef([AC_PROG_SED], [
82375b16253fSmrg############################################################
82385b16253fSmrg# NOTE: This macro has been submitted for inclusion into   #
82395b16253fSmrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
82405b16253fSmrg#  a released version of Autoconf we should remove this    #
82415b16253fSmrg#  macro and use it instead.                               #
82425b16253fSmrg############################################################
82435b16253fSmrg
82445b16253fSmrgm4_defun([AC_PROG_SED],
82455b16253fSmrg[AC_MSG_CHECKING([for a sed that does not truncate output])
82465b16253fSmrgAC_CACHE_VAL(lt_cv_path_SED,
82475b16253fSmrg[# Loop through the user's path and test for sed and gsed.
82485b16253fSmrg# Then use that list of sed's as ones to test for truncation.
82495b16253fSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
82505b16253fSmrgfor as_dir in $PATH
82515b16253fSmrgdo
82525b16253fSmrg  IFS=$as_save_IFS
82535b16253fSmrg  test -z "$as_dir" && as_dir=.
82545b16253fSmrg  for lt_ac_prog in sed gsed; do
82555b16253fSmrg    for ac_exec_ext in '' $ac_executable_extensions; do
82565b16253fSmrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
82575b16253fSmrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
82585b16253fSmrg      fi
82595b16253fSmrg    done
82605b16253fSmrg  done
82615b16253fSmrgdone
82625b16253fSmrgIFS=$as_save_IFS
82635b16253fSmrglt_ac_max=0
82645b16253fSmrglt_ac_count=0
82655b16253fSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
82665b16253fSmrg# along with /bin/sed that truncates output.
82675b16253fSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
82685b16253fSmrg  test ! -f "$lt_ac_sed" && continue
82695b16253fSmrg  cat /dev/null > conftest.in
82705b16253fSmrg  lt_ac_count=0
82715b16253fSmrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
82725b16253fSmrg  # Check for GNU sed and select it if it is found.
82735b16253fSmrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
82745b16253fSmrg    lt_cv_path_SED=$lt_ac_sed
82755b16253fSmrg    break
82765b16253fSmrg  fi
82775b16253fSmrg  while true; do
82785b16253fSmrg    cat conftest.in conftest.in >conftest.tmp
82795b16253fSmrg    mv conftest.tmp conftest.in
82805b16253fSmrg    cp conftest.in conftest.nl
82815b16253fSmrg    echo >>conftest.nl
82825b16253fSmrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
82835b16253fSmrg    cmp -s conftest.out conftest.nl || break
82845b16253fSmrg    # 10000 chars as input seems more than enough
82855b16253fSmrg    test 10 -lt "$lt_ac_count" && break
82865b16253fSmrg    lt_ac_count=`expr $lt_ac_count + 1`
82875b16253fSmrg    if test "$lt_ac_count" -gt "$lt_ac_max"; then
82885b16253fSmrg      lt_ac_max=$lt_ac_count
82895b16253fSmrg      lt_cv_path_SED=$lt_ac_sed
82905b16253fSmrg    fi
82915b16253fSmrg  done
82925b16253fSmrgdone
82935b16253fSmrg])
82945b16253fSmrgSED=$lt_cv_path_SED
82955b16253fSmrgAC_SUBST([SED])
82965b16253fSmrgAC_MSG_RESULT([$SED])
82975b16253fSmrg])#AC_PROG_SED
82985b16253fSmrg])#m4_ifndef
82995b16253fSmrg
83005b16253fSmrg# Old name:
83015b16253fSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
83025b16253fSmrgdnl aclocal-1.4 backwards compatibility:
83035b16253fSmrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
83045b16253fSmrg
83055b16253fSmrg
83065b16253fSmrg# _LT_CHECK_SHELL_FEATURES
83075b16253fSmrg# ------------------------
83085b16253fSmrg# Find out whether the shell is Bourne or XSI compatible,
83095b16253fSmrg# or has some other useful features.
83105b16253fSmrgm4_defun([_LT_CHECK_SHELL_FEATURES],
83115b16253fSmrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
83125b16253fSmrg  lt_unset=unset
83135b16253fSmrgelse
83145b16253fSmrg  lt_unset=false
83155b16253fSmrgfi
83165b16253fSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
83175b16253fSmrg
83185b16253fSmrg# test EBCDIC or ASCII
83195b16253fSmrgcase `echo X|tr X '\101'` in
83205b16253fSmrg A) # ASCII based system
83215b16253fSmrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
83225b16253fSmrg  lt_SP2NL='tr \040 \012'
83235b16253fSmrg  lt_NL2SP='tr \015\012 \040\040'
83245b16253fSmrg  ;;
83255b16253fSmrg *) # EBCDIC based system
83265b16253fSmrg  lt_SP2NL='tr \100 \n'
83275b16253fSmrg  lt_NL2SP='tr \r\n \100\100'
83285b16253fSmrg  ;;
83295b16253fSmrgesac
83305b16253fSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
83315b16253fSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
83325b16253fSmrg])# _LT_CHECK_SHELL_FEATURES
83335b16253fSmrg
83345b16253fSmrg
83355b16253fSmrg# _LT_PATH_CONVERSION_FUNCTIONS
83365b16253fSmrg# -----------------------------
83375b16253fSmrg# Determine what file name conversion functions should be used by
83385b16253fSmrg# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
83395b16253fSmrg# for certain cross-compile configurations and native mingw.
83405b16253fSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
83415b16253fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
83425b16253fSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
83435b16253fSmrgAC_MSG_CHECKING([how to convert $build file names to $host format])
83445b16253fSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd,
83455b16253fSmrg[case $host in
83465b16253fSmrg  *-*-mingw* )
83475b16253fSmrg    case $build in
83485b16253fSmrg      *-*-mingw* ) # actually msys
83495b16253fSmrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
83505b16253fSmrg        ;;
83515b16253fSmrg      *-*-cygwin* )
83525b16253fSmrg        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
83535b16253fSmrg        ;;
83545b16253fSmrg      * ) # otherwise, assume *nix
83555b16253fSmrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
83565b16253fSmrg        ;;
83575b16253fSmrg    esac
83585b16253fSmrg    ;;
83595b16253fSmrg  *-*-cygwin* )
83605b16253fSmrg    case $build in
83615b16253fSmrg      *-*-mingw* ) # actually msys
83625b16253fSmrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
83635b16253fSmrg        ;;
83645b16253fSmrg      *-*-cygwin* )
83655b16253fSmrg        lt_cv_to_host_file_cmd=func_convert_file_noop
83665b16253fSmrg        ;;
83675b16253fSmrg      * ) # otherwise, assume *nix
83685b16253fSmrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
83695b16253fSmrg        ;;
83705b16253fSmrg    esac
83715b16253fSmrg    ;;
83725b16253fSmrg  * ) # unhandled hosts (and "normal" native builds)
83735b16253fSmrg    lt_cv_to_host_file_cmd=func_convert_file_noop
83745b16253fSmrg    ;;
83755b16253fSmrgesac
83765b16253fSmrg])
83775b16253fSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd
83785b16253fSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd])
83795b16253fSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
83805b16253fSmrg         [0], [convert $build file names to $host format])dnl
83815b16253fSmrg
83825b16253fSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format])
83835b16253fSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd,
83845b16253fSmrg[#assume ordinary cross tools, or native build.
83855b16253fSmrglt_cv_to_tool_file_cmd=func_convert_file_noop
83865b16253fSmrgcase $host in
83875b16253fSmrg  *-*-mingw* )
83885b16253fSmrg    case $build in
83895b16253fSmrg      *-*-mingw* ) # actually msys
83905b16253fSmrg        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
83915b16253fSmrg        ;;
83925b16253fSmrg    esac
83935b16253fSmrg    ;;
83945b16253fSmrgesac
83955b16253fSmrg])
83965b16253fSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd
83975b16253fSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
83985b16253fSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
83995b16253fSmrg         [0], [convert $build files to toolchain format])dnl
84005b16253fSmrg])# _LT_PATH_CONVERSION_FUNCTIONS
8401