132001f49Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
232001f49Smrg#
37ec3b29aSmrg#   Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
432001f49Smrg#   Written by Gordon Matzigkeit, 1996
532001f49Smrg#
632001f49Smrg# This file is free software; the Free Software Foundation gives
732001f49Smrg# unlimited permission to copy and/or distribute it, with or without
832001f49Smrg# modifications, as long as this notice is preserved.
932001f49Smrg
1032001f49Smrgm4_define([_LT_COPYING], [dnl
117ec3b29aSmrg# Copyright (C) 2014 Free Software Foundation, Inc.
127ec3b29aSmrg# This is free software; see the source for copying conditions.  There is NO
137ec3b29aSmrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
147ec3b29aSmrg
157ec3b29aSmrg# GNU Libtool is free software; you can redistribute it and/or modify
167ec3b29aSmrg# it under the terms of the GNU General Public License as published by
177ec3b29aSmrg# the Free Software Foundation; either version 2 of of the License, or
187ec3b29aSmrg# (at your option) any later version.
1932001f49Smrg#
207ec3b29aSmrg# As a special exception to the GNU General Public License, if you
217ec3b29aSmrg# distribute this file as part of a program or library that is built
227ec3b29aSmrg# using GNU Libtool, you may include this file under the  same
237ec3b29aSmrg# distribution terms that you use for the rest of that program.
2432001f49Smrg#
257ec3b29aSmrg# GNU Libtool is distributed in the hope that it will be useful, but
267ec3b29aSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
2732001f49Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2832001f49Smrg# GNU General Public License for more details.
2932001f49Smrg#
3032001f49Smrg# You should have received a copy of the GNU General Public License
317ec3b29aSmrg# along with this program.  If not, see <http://www.gnu.org/licenses/>.
3232001f49Smrg])
3332001f49Smrg
347ec3b29aSmrg# serial 58 LT_INIT
3532001f49Smrg
3632001f49Smrg
3732001f49Smrg# LT_PREREQ(VERSION)
3832001f49Smrg# ------------------
3932001f49Smrg# Complain and exit if this libtool version is less that VERSION.
4032001f49Smrgm4_defun([LT_PREREQ],
4132001f49Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
4232001f49Smrg       [m4_default([$3],
4332001f49Smrg		   [m4_fatal([Libtool version $1 or higher is required],
4432001f49Smrg		             63)])],
4532001f49Smrg       [$2])])
4632001f49Smrg
4732001f49Smrg
4832001f49Smrg# _LT_CHECK_BUILDDIR
4932001f49Smrg# ------------------
5032001f49Smrg# Complain if the absolute build directory name contains unusual characters
5132001f49Smrgm4_defun([_LT_CHECK_BUILDDIR],
5232001f49Smrg[case `pwd` in
5332001f49Smrg  *\ * | *\	*)
5432001f49Smrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
5532001f49Smrgesac
5632001f49Smrg])
5732001f49Smrg
5832001f49Smrg
5932001f49Smrg# LT_INIT([OPTIONS])
6032001f49Smrg# ------------------
6132001f49SmrgAC_DEFUN([LT_INIT],
627ec3b29aSmrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
6332001f49SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
6432001f49SmrgAC_BEFORE([$0], [LT_LANG])dnl
6532001f49SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
6632001f49SmrgAC_BEFORE([$0], [LTDL_INIT])dnl
6732001f49Smrgm4_require([_LT_CHECK_BUILDDIR])dnl
6832001f49Smrg
6932001f49Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
7032001f49Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
7132001f49Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
7232001f49Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
7332001f49Smrgdnl unless we require an AC_DEFUNed macro:
7432001f49SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
7532001f49SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
7632001f49SmrgAC_REQUIRE([LTVERSION_VERSION])dnl
7732001f49SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
7832001f49Smrgm4_require([_LT_PROG_LTMAIN])dnl
7932001f49Smrg
8032001f49Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
8132001f49Smrg
8232001f49Smrgdnl Parse OPTIONS
8332001f49Smrg_LT_SET_OPTIONS([$0], [$1])
8432001f49Smrg
8532001f49Smrg# This can be used to rebuild libtool when needed
867ec3b29aSmrgLIBTOOL_DEPS=$ltmain
8732001f49Smrg
8832001f49Smrg# Always use our own libtool.
8932001f49SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
9032001f49SmrgAC_SUBST(LIBTOOL)dnl
9132001f49Smrg
9232001f49Smrg_LT_SETUP
9332001f49Smrg
9432001f49Smrg# Only expand once:
9532001f49Smrgm4_define([LT_INIT])
9632001f49Smrg])# LT_INIT
9732001f49Smrg
9832001f49Smrg# Old names:
9932001f49SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
10032001f49SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
10132001f49Smrgdnl aclocal-1.4 backwards compatibility:
10232001f49Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
10332001f49Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
10432001f49Smrg
10532001f49Smrg
1067ec3b29aSmrg# _LT_PREPARE_CC_BASENAME
1077ec3b29aSmrg# -----------------------
1087ec3b29aSmrgm4_defun([_LT_PREPARE_CC_BASENAME], [
1097ec3b29aSmrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1107ec3b29aSmrgfunc_cc_basename ()
1117ec3b29aSmrg{
1127ec3b29aSmrg    for cc_temp in @S|@*""; do
1137ec3b29aSmrg      case $cc_temp in
1147ec3b29aSmrg        compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1157ec3b29aSmrg        distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1167ec3b29aSmrg        \-*) ;;
1177ec3b29aSmrg        *) break;;
1187ec3b29aSmrg      esac
1197ec3b29aSmrg    done
1207ec3b29aSmrg    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
1217ec3b29aSmrg}
1227ec3b29aSmrg])# _LT_PREPARE_CC_BASENAME
1237ec3b29aSmrg
1247ec3b29aSmrg
12532001f49Smrg# _LT_CC_BASENAME(CC)
12632001f49Smrg# -------------------
1277ec3b29aSmrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
1287ec3b29aSmrg# but that macro is also expanded into generated libtool script, which
1297ec3b29aSmrg# arranges for $SED and $ECHO to be set by different means.
13032001f49Smrgm4_defun([_LT_CC_BASENAME],
1317ec3b29aSmrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl
1327ec3b29aSmrgAC_REQUIRE([_LT_DECL_SED])dnl
1337ec3b29aSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1347ec3b29aSmrgfunc_cc_basename $1
1357ec3b29aSmrgcc_basename=$func_cc_basename_result
13632001f49Smrg])
13732001f49Smrg
13832001f49Smrg
13932001f49Smrg# _LT_FILEUTILS_DEFAULTS
14032001f49Smrg# ----------------------
14132001f49Smrg# It is okay to use these file commands and assume they have been set
1427ec3b29aSmrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
14332001f49Smrgm4_defun([_LT_FILEUTILS_DEFAULTS],
14432001f49Smrg[: ${CP="cp -f"}
14532001f49Smrg: ${MV="mv -f"}
14632001f49Smrg: ${RM="rm -f"}
14732001f49Smrg])# _LT_FILEUTILS_DEFAULTS
14832001f49Smrg
14932001f49Smrg
15032001f49Smrg# _LT_SETUP
15132001f49Smrg# ---------
15232001f49Smrgm4_defun([_LT_SETUP],
15332001f49Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
15432001f49SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
15532001f49SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
15632001f49SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
15732001f49Smrg
15832001f49Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
15932001f49Smrgdnl
16032001f49Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl
16132001f49Smrg_LT_DECL([], [host], [0])dnl
16232001f49Smrg_LT_DECL([], [host_os], [0])dnl
16332001f49Smrgdnl
16432001f49Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl
16532001f49Smrg_LT_DECL([], [build], [0])dnl
16632001f49Smrg_LT_DECL([], [build_os], [0])dnl
16732001f49Smrgdnl
16832001f49SmrgAC_REQUIRE([AC_PROG_CC])dnl
16932001f49SmrgAC_REQUIRE([LT_PATH_LD])dnl
17032001f49SmrgAC_REQUIRE([LT_PATH_NM])dnl
17132001f49Smrgdnl
17232001f49SmrgAC_REQUIRE([AC_PROG_LN_S])dnl
17332001f49Smrgtest -z "$LN_S" && LN_S="ln -s"
17432001f49Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
17532001f49Smrgdnl
17632001f49SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
17732001f49Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
17832001f49Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
17932001f49Smrgdnl
18032001f49Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
18132001f49Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
18232001f49Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
18332001f49Smrgm4_require([_LT_CMD_RELOAD])dnl
18432001f49Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
18532001f49Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
18632001f49Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
18732001f49Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
18832001f49Smrgm4_require([_LT_WITH_SYSROOT])dnl
1897ec3b29aSmrgm4_require([_LT_CMD_TRUNCATE])dnl
19032001f49Smrg
19132001f49Smrg_LT_CONFIG_LIBTOOL_INIT([
1927ec3b29aSmrg# See if we are running on zsh, and set the options that allow our
19332001f49Smrg# commands through without removal of \ escapes INIT.
1947ec3b29aSmrgif test -n "\${ZSH_VERSION+set}"; then
19532001f49Smrg   setopt NO_GLOB_SUBST
19632001f49Smrgfi
19732001f49Smrg])
1987ec3b29aSmrgif test -n "${ZSH_VERSION+set}"; then
19932001f49Smrg   setopt NO_GLOB_SUBST
20032001f49Smrgfi
20132001f49Smrg
20232001f49Smrg_LT_CHECK_OBJDIR
20332001f49Smrg
20432001f49Smrgm4_require([_LT_TAG_COMPILER])dnl
20532001f49Smrg
20632001f49Smrgcase $host_os in
20732001f49Smrgaix3*)
20832001f49Smrg  # AIX sometimes has problems with the GCC collect2 program.  For some
20932001f49Smrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
21032001f49Smrg  # vanish in a puff of smoke.
2117ec3b29aSmrg  if test set != "${COLLECT_NAMES+set}"; then
21232001f49Smrg    COLLECT_NAMES=
21332001f49Smrg    export COLLECT_NAMES
21432001f49Smrg  fi
21532001f49Smrg  ;;
21632001f49Smrgesac
21732001f49Smrg
21832001f49Smrg# Global variables:
21932001f49Smrgofile=libtool
22032001f49Smrgcan_build_shared=yes
22132001f49Smrg
2227ec3b29aSmrg# All known linkers require a '.a' archive for static linking (except MSVC,
22332001f49Smrg# which needs '.lib').
22432001f49Smrglibext=a
22532001f49Smrg
2267ec3b29aSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
22732001f49Smrg
2287ec3b29aSmrgold_CC=$CC
2297ec3b29aSmrgold_CFLAGS=$CFLAGS
23032001f49Smrg
23132001f49Smrg# Set sane defaults for various variables
23232001f49Smrgtest -z "$CC" && CC=cc
23332001f49Smrgtest -z "$LTCC" && LTCC=$CC
23432001f49Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
23532001f49Smrgtest -z "$LD" && LD=ld
23632001f49Smrgtest -z "$ac_objext" && ac_objext=o
23732001f49Smrg
23832001f49Smrg_LT_CC_BASENAME([$compiler])
23932001f49Smrg
24032001f49Smrg# Only perform the check for file, if the check method requires it
24132001f49Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
24232001f49Smrgcase $deplibs_check_method in
24332001f49Smrgfile_magic*)
24432001f49Smrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
24532001f49Smrg    _LT_PATH_MAGIC
24632001f49Smrg  fi
24732001f49Smrg  ;;
24832001f49Smrgesac
24932001f49Smrg
25032001f49Smrg# Use C for the default configuration in the libtool script
25132001f49SmrgLT_SUPPORTED_TAG([CC])
25232001f49Smrg_LT_LANG_C_CONFIG
25332001f49Smrg_LT_LANG_DEFAULT_CONFIG
25432001f49Smrg_LT_CONFIG_COMMANDS
25532001f49Smrg])# _LT_SETUP
25632001f49Smrg
25732001f49Smrg
25832001f49Smrg# _LT_PREPARE_SED_QUOTE_VARS
25932001f49Smrg# --------------------------
26032001f49Smrg# Define a few sed substitution that help us do robust quoting.
26132001f49Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS],
26232001f49Smrg[# Backslashify metacharacters that are still active within
26332001f49Smrg# double-quoted strings.
26432001f49Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
26532001f49Smrg
26632001f49Smrg# Same as above, but do not quote variable references.
26732001f49Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
26832001f49Smrg
26932001f49Smrg# Sed substitution to delay expansion of an escaped shell variable in a
27032001f49Smrg# double_quote_subst'ed string.
27132001f49Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
27232001f49Smrg
27332001f49Smrg# Sed substitution to delay expansion of an escaped single quote.
27432001f49Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
27532001f49Smrg
27632001f49Smrg# Sed substitution to avoid accidental globbing in evaled expressions
27732001f49Smrgno_glob_subst='s/\*/\\\*/g'
27832001f49Smrg])
27932001f49Smrg
28032001f49Smrg# _LT_PROG_LTMAIN
28132001f49Smrg# ---------------
2827ec3b29aSmrg# Note that this code is called both from 'configure', and 'config.status'
28332001f49Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
2847ec3b29aSmrg# 'config.status' has no value for ac_aux_dir unless we are using Automake,
28532001f49Smrg# so we pass a copy along to make sure it has a sensible value anyway.
28632001f49Smrgm4_defun([_LT_PROG_LTMAIN],
28732001f49Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
28832001f49Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
2897ec3b29aSmrgltmain=$ac_aux_dir/ltmain.sh
29032001f49Smrg])# _LT_PROG_LTMAIN
29132001f49Smrg
29232001f49Smrg
29332001f49Smrg## ------------------------------------- ##
29432001f49Smrg## Accumulate code for creating libtool. ##
29532001f49Smrg## ------------------------------------- ##
29632001f49Smrg
29732001f49Smrg# So that we can recreate a full libtool script including additional
29832001f49Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
2997ec3b29aSmrg# in macros and then make a single call at the end using the 'libtool'
30032001f49Smrg# label.
30132001f49Smrg
30232001f49Smrg
30332001f49Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
30432001f49Smrg# ----------------------------------------
30532001f49Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
30632001f49Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
30732001f49Smrg[m4_ifval([$1],
30832001f49Smrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
30932001f49Smrg                     [$1
31032001f49Smrg])])])
31132001f49Smrg
31232001f49Smrg# Initialize.
31332001f49Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
31432001f49Smrg
31532001f49Smrg
31632001f49Smrg# _LT_CONFIG_LIBTOOL([COMMANDS])
31732001f49Smrg# ------------------------------
31832001f49Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
31932001f49Smrgm4_define([_LT_CONFIG_LIBTOOL],
32032001f49Smrg[m4_ifval([$1],
32132001f49Smrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
32232001f49Smrg                     [$1
32332001f49Smrg])])])
32432001f49Smrg
32532001f49Smrg# Initialize.
32632001f49Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
32732001f49Smrg
32832001f49Smrg
32932001f49Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
33032001f49Smrg# -----------------------------------------------------
33132001f49Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
33232001f49Smrg[_LT_CONFIG_LIBTOOL([$1])
33332001f49Smrg_LT_CONFIG_LIBTOOL_INIT([$2])
33432001f49Smrg])
33532001f49Smrg
33632001f49Smrg
33732001f49Smrg# _LT_FORMAT_COMMENT([COMMENT])
33832001f49Smrg# -----------------------------
33932001f49Smrg# Add leading comment marks to the start of each line, and a trailing
34032001f49Smrg# full-stop to the whole comment if one is not present already.
34132001f49Smrgm4_define([_LT_FORMAT_COMMENT],
34232001f49Smrg[m4_ifval([$1], [
34332001f49Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
34432001f49Smrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
34532001f49Smrg)])
34632001f49Smrg
34732001f49Smrg
34832001f49Smrg
34932001f49Smrg## ------------------------ ##
35032001f49Smrg## FIXME: Eliminate VARNAME ##
35132001f49Smrg## ------------------------ ##
35232001f49Smrg
35332001f49Smrg
35432001f49Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
35532001f49Smrg# -------------------------------------------------------------------
35632001f49Smrg# CONFIGNAME is the name given to the value in the libtool script.
35732001f49Smrg# VARNAME is the (base) name used in the configure script.
35832001f49Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
35932001f49Smrg# VARNAME.  Any other value will be used directly.
36032001f49Smrgm4_define([_LT_DECL],
36132001f49Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
36232001f49Smrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
36332001f49Smrg	[m4_ifval([$1], [$1], [$2])])
36432001f49Smrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
36532001f49Smrg    m4_ifval([$4],
36632001f49Smrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
36732001f49Smrg    lt_dict_add_subkey([lt_decl_dict], [$2],
36832001f49Smrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
36932001f49Smrg])
37032001f49Smrg
37132001f49Smrg
37232001f49Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
37332001f49Smrg# --------------------------------------------------------
37432001f49Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
37532001f49Smrg
37632001f49Smrg
37732001f49Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
37832001f49Smrg# ------------------------------------------------
37932001f49Smrgm4_define([lt_decl_tag_varnames],
38032001f49Smrg[_lt_decl_filter([tagged?], [yes], $@)])
38132001f49Smrg
38232001f49Smrg
38332001f49Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
38432001f49Smrg# ---------------------------------------------------------
38532001f49Smrgm4_define([_lt_decl_filter],
38632001f49Smrg[m4_case([$#],
38732001f49Smrg  [0], [m4_fatal([$0: too few arguments: $#])],
38832001f49Smrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
38932001f49Smrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
39032001f49Smrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
39132001f49Smrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
39232001f49Smrg])
39332001f49Smrg
39432001f49Smrg
39532001f49Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
39632001f49Smrg# --------------------------------------------------
39732001f49Smrgm4_define([lt_decl_quote_varnames],
39832001f49Smrg[_lt_decl_filter([value], [1], $@)])
39932001f49Smrg
40032001f49Smrg
40132001f49Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
40232001f49Smrg# ---------------------------------------------------
40332001f49Smrgm4_define([lt_decl_dquote_varnames],
40432001f49Smrg[_lt_decl_filter([value], [2], $@)])
40532001f49Smrg
40632001f49Smrg
40732001f49Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
40832001f49Smrg# ---------------------------------------------------
40932001f49Smrgm4_define([lt_decl_varnames_tagged],
41032001f49Smrg[m4_assert([$# <= 2])dnl
41132001f49Smrg_$0(m4_quote(m4_default([$1], [[, ]])),
41232001f49Smrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
41332001f49Smrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
41432001f49Smrgm4_define([_lt_decl_varnames_tagged],
41532001f49Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
41632001f49Smrg
41732001f49Smrg
41832001f49Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
41932001f49Smrg# ------------------------------------------------
42032001f49Smrgm4_define([lt_decl_all_varnames],
42132001f49Smrg[_$0(m4_quote(m4_default([$1], [[, ]])),
42232001f49Smrg     m4_if([$2], [],
42332001f49Smrg	   m4_quote(lt_decl_varnames),
42432001f49Smrg	m4_quote(m4_shift($@))))[]dnl
42532001f49Smrg])
42632001f49Smrgm4_define([_lt_decl_all_varnames],
42732001f49Smrg[lt_join($@, lt_decl_varnames_tagged([$1],
42832001f49Smrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
42932001f49Smrg])
43032001f49Smrg
43132001f49Smrg
43232001f49Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
43332001f49Smrg# ------------------------------------
4347ec3b29aSmrg# Quote a variable value, and forward it to 'config.status' so that its
4357ec3b29aSmrg# declaration there will have the same value as in 'configure'.  VARNAME
43632001f49Smrg# must have a single quote delimited value for this to work.
43732001f49Smrgm4_define([_LT_CONFIG_STATUS_DECLARE],
43832001f49Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
43932001f49Smrg
44032001f49Smrg
44132001f49Smrg# _LT_CONFIG_STATUS_DECLARATIONS
44232001f49Smrg# ------------------------------
44332001f49Smrg# We delimit libtool config variables with single quotes, so when
44432001f49Smrg# we write them to config.status, we have to be sure to quote all
44532001f49Smrg# embedded single quotes properly.  In configure, this macro expands
44632001f49Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
44732001f49Smrg#
44832001f49Smrg#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
44932001f49Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
45032001f49Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
45132001f49Smrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
45232001f49Smrg
45332001f49Smrg
45432001f49Smrg# _LT_LIBTOOL_TAGS
45532001f49Smrg# ----------------
45632001f49Smrg# Output comment and list of tags supported by the script
45732001f49Smrgm4_defun([_LT_LIBTOOL_TAGS],
45832001f49Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
4597ec3b29aSmrgavailable_tags='_LT_TAGS'dnl
46032001f49Smrg])
46132001f49Smrg
46232001f49Smrg
46332001f49Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
46432001f49Smrg# -----------------------------------
46532001f49Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and
46632001f49Smrg# expand to a commented shell variable setting:
46732001f49Smrg#
46832001f49Smrg#    # Some comment about what VAR is for.
46932001f49Smrg#    visible_name=$lt_internal_name
47032001f49Smrgm4_define([_LT_LIBTOOL_DECLARE],
47132001f49Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
47232001f49Smrg					   [description])))[]dnl
47332001f49Smrgm4_pushdef([_libtool_name],
47432001f49Smrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
47532001f49Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
47632001f49Smrg    [0], [_libtool_name=[$]$1],
47732001f49Smrg    [1], [_libtool_name=$lt_[]$1],
47832001f49Smrg    [2], [_libtool_name=$lt_[]$1],
47932001f49Smrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
48032001f49Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
48132001f49Smrg])
48232001f49Smrg
48332001f49Smrg
48432001f49Smrg# _LT_LIBTOOL_CONFIG_VARS
48532001f49Smrg# -----------------------
48632001f49Smrg# Produce commented declarations of non-tagged libtool config variables
4877ec3b29aSmrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
48832001f49Smrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
48932001f49Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
49032001f49Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
49132001f49Smrg[m4_foreach([_lt_var],
49232001f49Smrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
49332001f49Smrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
49432001f49Smrg
49532001f49Smrg
49632001f49Smrg# _LT_LIBTOOL_TAG_VARS(TAG)
49732001f49Smrg# -------------------------
49832001f49Smrgm4_define([_LT_LIBTOOL_TAG_VARS],
49932001f49Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
50032001f49Smrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
50132001f49Smrg
50232001f49Smrg
50332001f49Smrg# _LT_TAGVAR(VARNAME, [TAGNAME])
50432001f49Smrg# ------------------------------
50532001f49Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
50632001f49Smrg
50732001f49Smrg
50832001f49Smrg# _LT_CONFIG_COMMANDS
50932001f49Smrg# -------------------
51032001f49Smrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
51132001f49Smrg# variables for single and double quote escaping we saved from calls
51232001f49Smrg# to _LT_DECL, we can put quote escaped variables declarations
5137ec3b29aSmrg# into 'config.status', and then the shell code to quote escape them in
5147ec3b29aSmrg# for loops in 'config.status'.  Finally, any additional code accumulated
51532001f49Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
51632001f49Smrgm4_defun([_LT_CONFIG_COMMANDS],
51732001f49Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
51832001f49Smrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
51932001f49Smrg	dnl instead of duplicating it all over again into config.status,
52032001f49Smrg	dnl then we will have config.status run $CONFIG_LT later, so it
52132001f49Smrg	dnl needs to know what name is stored there:
52232001f49Smrg        [AC_CONFIG_COMMANDS([libtool],
52332001f49Smrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
52432001f49Smrg    dnl If the libtool generation code is destined for config.status,
52532001f49Smrg    dnl expand the accumulated commands and init code now:
52632001f49Smrg    [AC_CONFIG_COMMANDS([libtool],
52732001f49Smrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
52832001f49Smrg])#_LT_CONFIG_COMMANDS
52932001f49Smrg
53032001f49Smrg
53132001f49Smrg# Initialize.
53232001f49Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
53332001f49Smrg[
53432001f49Smrg
53532001f49Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
53632001f49Smrg# if CDPATH is set.
53732001f49Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
53832001f49Smrg
53932001f49Smrgsed_quote_subst='$sed_quote_subst'
54032001f49Smrgdouble_quote_subst='$double_quote_subst'
54132001f49Smrgdelay_variable_subst='$delay_variable_subst'
54232001f49Smrg_LT_CONFIG_STATUS_DECLARATIONS
54332001f49SmrgLTCC='$LTCC'
54432001f49SmrgLTCFLAGS='$LTCFLAGS'
54532001f49Smrgcompiler='$compiler_DEFAULT'
54632001f49Smrg
54732001f49Smrg# A function that is used when there is no print builtin or printf.
54832001f49Smrgfunc_fallback_echo ()
54932001f49Smrg{
55032001f49Smrg  eval 'cat <<_LTECHO_EOF
55132001f49Smrg\$[]1
55232001f49Smrg_LTECHO_EOF'
55332001f49Smrg}
55432001f49Smrg
55532001f49Smrg# Quote evaled strings.
55632001f49Smrgfor var in lt_decl_all_varnames([[ \
55732001f49Smrg]], lt_decl_quote_varnames); do
55832001f49Smrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
55932001f49Smrg    *[[\\\\\\\`\\"\\\$]]*)
5607ec3b29aSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
56132001f49Smrg      ;;
56232001f49Smrg    *)
56332001f49Smrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
56432001f49Smrg      ;;
56532001f49Smrg    esac
56632001f49Smrgdone
56732001f49Smrg
56832001f49Smrg# Double-quote double-evaled strings.
56932001f49Smrgfor var in lt_decl_all_varnames([[ \
57032001f49Smrg]], lt_decl_dquote_varnames); do
57132001f49Smrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
57232001f49Smrg    *[[\\\\\\\`\\"\\\$]]*)
5737ec3b29aSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
57432001f49Smrg      ;;
57532001f49Smrg    *)
57632001f49Smrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
57732001f49Smrg      ;;
57832001f49Smrg    esac
57932001f49Smrgdone
58032001f49Smrg
58132001f49Smrg_LT_OUTPUT_LIBTOOL_INIT
58232001f49Smrg])
58332001f49Smrg
58432001f49Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
58532001f49Smrg# ------------------------------------
58632001f49Smrg# Generate a child script FILE with all initialization necessary to
58732001f49Smrg# reuse the environment learned by the parent script, and make the
58832001f49Smrg# file executable.  If COMMENT is supplied, it is inserted after the
5897ec3b29aSmrg# '#!' sequence but before initialization text begins.  After this
59032001f49Smrg# macro, additional text can be appended to FILE to form the body of
59132001f49Smrg# the child script.  The macro ends with non-zero status if the
59232001f49Smrg# file could not be fully written (such as if the disk is full).
59332001f49Smrgm4_ifdef([AS_INIT_GENERATED],
59432001f49Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
59532001f49Smrg[m4_defun([_LT_GENERATED_FILE_INIT],
59632001f49Smrg[m4_require([AS_PREPARE])]dnl
59732001f49Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
59832001f49Smrg[lt_write_fail=0
59932001f49Smrgcat >$1 <<_ASEOF || lt_write_fail=1
60032001f49Smrg#! $SHELL
60132001f49Smrg# Generated by $as_me.
60232001f49Smrg$2
60332001f49SmrgSHELL=\${CONFIG_SHELL-$SHELL}
60432001f49Smrgexport SHELL
60532001f49Smrg_ASEOF
60632001f49Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1
60732001f49SmrgAS_SHELL_SANITIZE
60832001f49Smrg_AS_PREPARE
60932001f49Smrgexec AS_MESSAGE_FD>&1
61032001f49Smrg_ASEOF
6117ec3b29aSmrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl
61232001f49Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
61332001f49Smrg
61432001f49Smrg# LT_OUTPUT
61532001f49Smrg# ---------
61632001f49Smrg# This macro allows early generation of the libtool script (before
61732001f49Smrg# AC_OUTPUT is called), incase it is used in configure for compilation
61832001f49Smrg# tests.
61932001f49SmrgAC_DEFUN([LT_OUTPUT],
62032001f49Smrg[: ${CONFIG_LT=./config.lt}
62132001f49SmrgAC_MSG_NOTICE([creating $CONFIG_LT])
62232001f49Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
62332001f49Smrg[# Run this file to recreate a libtool stub with the current configuration.])
62432001f49Smrg
62532001f49Smrgcat >>"$CONFIG_LT" <<\_LTEOF
62632001f49Smrglt_cl_silent=false
62732001f49Smrgexec AS_MESSAGE_LOG_FD>>config.log
62832001f49Smrg{
62932001f49Smrg  echo
63032001f49Smrg  AS_BOX([Running $as_me.])
63132001f49Smrg} >&AS_MESSAGE_LOG_FD
63232001f49Smrg
63332001f49Smrglt_cl_help="\
6347ec3b29aSmrg'$as_me' creates a local libtool stub from the current configuration,
63532001f49Smrgfor use in further configure time tests before the real libtool is
63632001f49Smrggenerated.
63732001f49Smrg
63832001f49SmrgUsage: $[0] [[OPTIONS]]
63932001f49Smrg
64032001f49Smrg  -h, --help      print this help, then exit
64132001f49Smrg  -V, --version   print version number, then exit
64232001f49Smrg  -q, --quiet     do not print progress messages
64332001f49Smrg  -d, --debug     don't remove temporary files
64432001f49Smrg
64532001f49SmrgReport bugs to <bug-libtool@gnu.org>."
64632001f49Smrg
64732001f49Smrglt_cl_version="\
64832001f49Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
64932001f49Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
65032001f49Smrgconfigured by $[0], generated by m4_PACKAGE_STRING.
65132001f49Smrg
65232001f49SmrgCopyright (C) 2011 Free Software Foundation, Inc.
65332001f49SmrgThis config.lt script is free software; the Free Software Foundation
65432001f49Smrggives unlimited permision to copy, distribute and modify it."
65532001f49Smrg
6567ec3b29aSmrgwhile test 0 != $[#]
65732001f49Smrgdo
65832001f49Smrg  case $[1] in
65932001f49Smrg    --version | --v* | -V )
66032001f49Smrg      echo "$lt_cl_version"; exit 0 ;;
66132001f49Smrg    --help | --h* | -h )
66232001f49Smrg      echo "$lt_cl_help"; exit 0 ;;
66332001f49Smrg    --debug | --d* | -d )
66432001f49Smrg      debug=: ;;
66532001f49Smrg    --quiet | --q* | --silent | --s* | -q )
66632001f49Smrg      lt_cl_silent=: ;;
66732001f49Smrg
66832001f49Smrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
6697ec3b29aSmrgTry '$[0] --help' for more information.]) ;;
67032001f49Smrg
67132001f49Smrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
6727ec3b29aSmrgTry '$[0] --help' for more information.]) ;;
67332001f49Smrg  esac
67432001f49Smrg  shift
67532001f49Smrgdone
67632001f49Smrg
67732001f49Smrgif $lt_cl_silent; then
67832001f49Smrg  exec AS_MESSAGE_FD>/dev/null
67932001f49Smrgfi
68032001f49Smrg_LTEOF
68132001f49Smrg
68232001f49Smrgcat >>"$CONFIG_LT" <<_LTEOF
68332001f49Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
68432001f49Smrg_LTEOF
68532001f49Smrg
68632001f49Smrgcat >>"$CONFIG_LT" <<\_LTEOF
68732001f49SmrgAC_MSG_NOTICE([creating $ofile])
68832001f49Smrg_LT_OUTPUT_LIBTOOL_COMMANDS
68932001f49SmrgAS_EXIT(0)
69032001f49Smrg_LTEOF
69132001f49Smrgchmod +x "$CONFIG_LT"
69232001f49Smrg
69332001f49Smrg# configure is writing to config.log, but config.lt does its own redirection,
69432001f49Smrg# appending to config.log, which fails on DOS, as config.log is still kept
69532001f49Smrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
69632001f49Smrg# config.log, so it can be properly (re)opened and appended to by config.lt.
69732001f49Smrglt_cl_success=:
6987ec3b29aSmrgtest yes = "$silent" &&
69932001f49Smrg  lt_config_lt_args="$lt_config_lt_args --quiet"
70032001f49Smrgexec AS_MESSAGE_LOG_FD>/dev/null
70132001f49Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
70232001f49Smrgexec AS_MESSAGE_LOG_FD>>config.log
70332001f49Smrg$lt_cl_success || AS_EXIT(1)
70432001f49Smrg])# LT_OUTPUT
70532001f49Smrg
70632001f49Smrg
70732001f49Smrg# _LT_CONFIG(TAG)
70832001f49Smrg# ---------------
70932001f49Smrg# If TAG is the built-in tag, create an initial libtool script with a
71032001f49Smrg# default configuration from the untagged config vars.  Otherwise add code
71132001f49Smrg# to config.status for appending the configuration named by TAG from the
71232001f49Smrg# matching tagged config vars.
71332001f49Smrgm4_defun([_LT_CONFIG],
71432001f49Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
71532001f49Smrg_LT_CONFIG_SAVE_COMMANDS([
71632001f49Smrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
71732001f49Smrg  m4_if(_LT_TAG, [C], [
7187ec3b29aSmrg    # See if we are running on zsh, and set the options that allow our
71932001f49Smrg    # commands through without removal of \ escapes.
7207ec3b29aSmrg    if test -n "${ZSH_VERSION+set}"; then
72132001f49Smrg      setopt NO_GLOB_SUBST
72232001f49Smrg    fi
72332001f49Smrg
7247ec3b29aSmrg    cfgfile=${ofile}T
72532001f49Smrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
72632001f49Smrg    $RM "$cfgfile"
72732001f49Smrg
72832001f49Smrg    cat <<_LT_EOF >> "$cfgfile"
72932001f49Smrg#! $SHELL
7307ec3b29aSmrg# Generated automatically by $as_me ($PACKAGE) $VERSION
73132001f49Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
7327ec3b29aSmrg
7337ec3b29aSmrg# Provide generalized library-building support services.
7347ec3b29aSmrg# Written by Gordon Matzigkeit, 1996
7357ec3b29aSmrg
73632001f49Smrg_LT_COPYING
73732001f49Smrg_LT_LIBTOOL_TAGS
73832001f49Smrg
7397ec3b29aSmrg# Configured defaults for sys_lib_dlsearch_path munging.
7407ec3b29aSmrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
7417ec3b29aSmrg
74232001f49Smrg# ### BEGIN LIBTOOL CONFIG
74332001f49Smrg_LT_LIBTOOL_CONFIG_VARS
74432001f49Smrg_LT_LIBTOOL_TAG_VARS
74532001f49Smrg# ### END LIBTOOL CONFIG
74632001f49Smrg
7477ec3b29aSmrg_LT_EOF
7487ec3b29aSmrg
7497ec3b29aSmrg    cat <<'_LT_EOF' >> "$cfgfile"
7507ec3b29aSmrg
7517ec3b29aSmrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
7527ec3b29aSmrg
7537ec3b29aSmrg_LT_PREPARE_MUNGE_PATH_LIST
7547ec3b29aSmrg_LT_PREPARE_CC_BASENAME
7557ec3b29aSmrg
7567ec3b29aSmrg# ### END FUNCTIONS SHARED WITH CONFIGURE
7577ec3b29aSmrg
75832001f49Smrg_LT_EOF
75932001f49Smrg
76032001f49Smrg  case $host_os in
76132001f49Smrg  aix3*)
76232001f49Smrg    cat <<\_LT_EOF >> "$cfgfile"
76332001f49Smrg# AIX sometimes has problems with the GCC collect2 program.  For some
76432001f49Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems
76532001f49Smrg# vanish in a puff of smoke.
7667ec3b29aSmrgif test set != "${COLLECT_NAMES+set}"; then
76732001f49Smrg  COLLECT_NAMES=
76832001f49Smrg  export COLLECT_NAMES
76932001f49Smrgfi
77032001f49Smrg_LT_EOF
77132001f49Smrg    ;;
77232001f49Smrg  esac
77332001f49Smrg
77432001f49Smrg  _LT_PROG_LTMAIN
77532001f49Smrg
77632001f49Smrg  # We use sed instead of cat because bash on DJGPP gets confused if
77732001f49Smrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
77832001f49Smrg  # text mode, it properly converts lines to CR/LF.  This bash problem
77932001f49Smrg  # is reportedly fixed, but why not run on old versions too?
78032001f49Smrg  sed '$q' "$ltmain" >> "$cfgfile" \
78132001f49Smrg     || (rm -f "$cfgfile"; exit 1)
78232001f49Smrg
78332001f49Smrg   mv -f "$cfgfile" "$ofile" ||
78432001f49Smrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
78532001f49Smrg  chmod +x "$ofile"
78632001f49Smrg],
78732001f49Smrg[cat <<_LT_EOF >> "$ofile"
78832001f49Smrg
78932001f49Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
79032001f49Smrgdnl in a comment (ie after a #).
79132001f49Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1
79232001f49Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
79332001f49Smrg# ### END LIBTOOL TAG CONFIG: $1
79432001f49Smrg_LT_EOF
79532001f49Smrg])dnl /m4_if
79632001f49Smrg],
79732001f49Smrg[m4_if([$1], [], [
79832001f49Smrg    PACKAGE='$PACKAGE'
79932001f49Smrg    VERSION='$VERSION'
80032001f49Smrg    RM='$RM'
80132001f49Smrg    ofile='$ofile'], [])
80232001f49Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS
80332001f49Smrg])# _LT_CONFIG
80432001f49Smrg
80532001f49Smrg
80632001f49Smrg# LT_SUPPORTED_TAG(TAG)
80732001f49Smrg# ---------------------
80832001f49Smrg# Trace this macro to discover what tags are supported by the libtool
80932001f49Smrg# --tag option, using:
81032001f49Smrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
81132001f49SmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
81232001f49Smrg
81332001f49Smrg
81432001f49Smrg# C support is built-in for now
81532001f49Smrgm4_define([_LT_LANG_C_enabled], [])
81632001f49Smrgm4_define([_LT_TAGS], [])
81732001f49Smrg
81832001f49Smrg
81932001f49Smrg# LT_LANG(LANG)
82032001f49Smrg# -------------
82132001f49Smrg# Enable libtool support for the given language if not already enabled.
82232001f49SmrgAC_DEFUN([LT_LANG],
82332001f49Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
82432001f49Smrgm4_case([$1],
82532001f49Smrg  [C],			[_LT_LANG(C)],
82632001f49Smrg  [C++],		[_LT_LANG(CXX)],
82732001f49Smrg  [Go],			[_LT_LANG(GO)],
82832001f49Smrg  [Java],		[_LT_LANG(GCJ)],
82932001f49Smrg  [Fortran 77],		[_LT_LANG(F77)],
83032001f49Smrg  [Fortran],		[_LT_LANG(FC)],
83132001f49Smrg  [Windows Resource],	[_LT_LANG(RC)],
83232001f49Smrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
83332001f49Smrg    [_LT_LANG($1)],
83432001f49Smrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
83532001f49Smrg])# LT_LANG
83632001f49Smrg
83732001f49Smrg
83832001f49Smrg# _LT_LANG(LANGNAME)
83932001f49Smrg# ------------------
84032001f49Smrgm4_defun([_LT_LANG],
84132001f49Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
84232001f49Smrg  [LT_SUPPORTED_TAG([$1])dnl
84332001f49Smrg  m4_append([_LT_TAGS], [$1 ])dnl
84432001f49Smrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
84532001f49Smrg  _LT_LANG_$1_CONFIG($1)])dnl
84632001f49Smrg])# _LT_LANG
84732001f49Smrg
84832001f49Smrg
84932001f49Smrgm4_ifndef([AC_PROG_GO], [
85032001f49Smrg############################################################
85132001f49Smrg# NOTE: This macro has been submitted for inclusion into   #
85232001f49Smrg#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
85332001f49Smrg#  a released version of Autoconf we should remove this    #
85432001f49Smrg#  macro and use it instead.                               #
85532001f49Smrg############################################################
85632001f49Smrgm4_defun([AC_PROG_GO],
85732001f49Smrg[AC_LANG_PUSH(Go)dnl
85832001f49SmrgAC_ARG_VAR([GOC],     [Go compiler command])dnl
85932001f49SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
86032001f49Smrg_AC_ARG_VAR_LDFLAGS()dnl
86132001f49SmrgAC_CHECK_TOOL(GOC, gccgo)
86232001f49Smrgif test -z "$GOC"; then
86332001f49Smrg  if test -n "$ac_tool_prefix"; then
86432001f49Smrg    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
86532001f49Smrg  fi
86632001f49Smrgfi
86732001f49Smrgif test -z "$GOC"; then
86832001f49Smrg  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
86932001f49Smrgfi
87032001f49Smrg])#m4_defun
87132001f49Smrg])#m4_ifndef
87232001f49Smrg
87332001f49Smrg
87432001f49Smrg# _LT_LANG_DEFAULT_CONFIG
87532001f49Smrg# -----------------------
87632001f49Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
87732001f49Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
87832001f49Smrg  [LT_LANG(CXX)],
87932001f49Smrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
88032001f49Smrg
88132001f49SmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
88232001f49Smrg  [LT_LANG(F77)],
88332001f49Smrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
88432001f49Smrg
88532001f49SmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
88632001f49Smrg  [LT_LANG(FC)],
88732001f49Smrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
88832001f49Smrg
88932001f49Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
89032001f49Smrgdnl pulling things in needlessly.
89132001f49SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
89232001f49Smrg  [LT_LANG(GCJ)],
89332001f49Smrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
89432001f49Smrg    [LT_LANG(GCJ)],
89532001f49Smrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
89632001f49Smrg      [LT_LANG(GCJ)],
89732001f49Smrg      [m4_ifdef([AC_PROG_GCJ],
89832001f49Smrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
89932001f49Smrg       m4_ifdef([A][M_PROG_GCJ],
90032001f49Smrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
90132001f49Smrg       m4_ifdef([LT_PROG_GCJ],
90232001f49Smrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
90332001f49Smrg
90432001f49SmrgAC_PROVIDE_IFELSE([AC_PROG_GO],
90532001f49Smrg  [LT_LANG(GO)],
90632001f49Smrg  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
90732001f49Smrg
90832001f49SmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
90932001f49Smrg  [LT_LANG(RC)],
91032001f49Smrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
91132001f49Smrg])# _LT_LANG_DEFAULT_CONFIG
91232001f49Smrg
91332001f49Smrg# Obsolete macros:
91432001f49SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
91532001f49SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
91632001f49SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
91732001f49SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
91832001f49SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
91932001f49Smrgdnl aclocal-1.4 backwards compatibility:
92032001f49Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
92132001f49Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
92232001f49Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
92332001f49Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
92432001f49Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], [])
92532001f49Smrg
92632001f49Smrg
92732001f49Smrg# _LT_TAG_COMPILER
92832001f49Smrg# ----------------
92932001f49Smrgm4_defun([_LT_TAG_COMPILER],
93032001f49Smrg[AC_REQUIRE([AC_PROG_CC])dnl
93132001f49Smrg
93232001f49Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
93332001f49Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
93432001f49Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
93532001f49Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
93632001f49Smrg
93732001f49Smrg# If no C compiler was specified, use CC.
93832001f49SmrgLTCC=${LTCC-"$CC"}
93932001f49Smrg
94032001f49Smrg# If no C compiler flags were specified, use CFLAGS.
94132001f49SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
94232001f49Smrg
94332001f49Smrg# Allow CC to be a program name with arguments.
94432001f49Smrgcompiler=$CC
94532001f49Smrg])# _LT_TAG_COMPILER
94632001f49Smrg
94732001f49Smrg
94832001f49Smrg# _LT_COMPILER_BOILERPLATE
94932001f49Smrg# ------------------------
95032001f49Smrg# Check for compiler boilerplate output or warnings with
95132001f49Smrg# the simple compiler test code.
95232001f49Smrgm4_defun([_LT_COMPILER_BOILERPLATE],
95332001f49Smrg[m4_require([_LT_DECL_SED])dnl
95432001f49Smrgac_outfile=conftest.$ac_objext
95532001f49Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
95632001f49Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
95732001f49Smrg_lt_compiler_boilerplate=`cat conftest.err`
95832001f49Smrg$RM conftest*
95932001f49Smrg])# _LT_COMPILER_BOILERPLATE
96032001f49Smrg
96132001f49Smrg
96232001f49Smrg# _LT_LINKER_BOILERPLATE
96332001f49Smrg# ----------------------
96432001f49Smrg# Check for linker boilerplate output or warnings with
96532001f49Smrg# the simple link test code.
96632001f49Smrgm4_defun([_LT_LINKER_BOILERPLATE],
96732001f49Smrg[m4_require([_LT_DECL_SED])dnl
96832001f49Smrgac_outfile=conftest.$ac_objext
96932001f49Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
97032001f49Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
97132001f49Smrg_lt_linker_boilerplate=`cat conftest.err`
97232001f49Smrg$RM -r conftest*
97332001f49Smrg])# _LT_LINKER_BOILERPLATE
97432001f49Smrg
97532001f49Smrg# _LT_REQUIRED_DARWIN_CHECKS
97632001f49Smrg# -------------------------
97732001f49Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
97832001f49Smrg  case $host_os in
97932001f49Smrg    rhapsody* | darwin*)
98032001f49Smrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
98132001f49Smrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
98232001f49Smrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
98332001f49Smrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
98432001f49Smrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
98532001f49Smrg    _LT_DECL([], [DSYMUTIL], [1],
98632001f49Smrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
98732001f49Smrg    _LT_DECL([], [NMEDIT], [1],
98832001f49Smrg      [Tool to change global to local symbols on Mac OS X])
98932001f49Smrg    _LT_DECL([], [LIPO], [1],
99032001f49Smrg      [Tool to manipulate fat objects and archives on Mac OS X])
99132001f49Smrg    _LT_DECL([], [OTOOL], [1],
99232001f49Smrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
99332001f49Smrg    _LT_DECL([], [OTOOL64], [1],
99432001f49Smrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
99532001f49Smrg
99632001f49Smrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
99732001f49Smrg      [lt_cv_apple_cc_single_mod=no
9987ec3b29aSmrg      if test -z "$LT_MULTI_MODULE"; then
99932001f49Smrg	# By default we will add the -single_module flag. You can override
100032001f49Smrg	# by either setting the environment variable LT_MULTI_MODULE
100132001f49Smrg	# non-empty at configure time, or by adding -multi_module to the
100232001f49Smrg	# link flags.
100332001f49Smrg	rm -rf libconftest.dylib*
100432001f49Smrg	echo "int foo(void){return 1;}" > conftest.c
100532001f49Smrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
100632001f49Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
100732001f49Smrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
100832001f49Smrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
100932001f49Smrg        _lt_result=$?
101032001f49Smrg	# If there is a non-empty error log, and "single_module"
101132001f49Smrg	# appears in it, assume the flag caused a linker warning
101232001f49Smrg        if test -s conftest.err && $GREP single_module conftest.err; then
101332001f49Smrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
101432001f49Smrg	# Otherwise, if the output was created with a 0 exit code from
101532001f49Smrg	# the compiler, it worked.
10167ec3b29aSmrg	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
101732001f49Smrg	  lt_cv_apple_cc_single_mod=yes
101832001f49Smrg	else
101932001f49Smrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
102032001f49Smrg	fi
102132001f49Smrg	rm -rf libconftest.dylib*
102232001f49Smrg	rm -f conftest.*
102332001f49Smrg      fi])
102432001f49Smrg
102532001f49Smrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
102632001f49Smrg      [lt_cv_ld_exported_symbols_list],
102732001f49Smrg      [lt_cv_ld_exported_symbols_list=no
102832001f49Smrg      save_LDFLAGS=$LDFLAGS
102932001f49Smrg      echo "_main" > conftest.sym
103032001f49Smrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
103132001f49Smrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
103232001f49Smrg	[lt_cv_ld_exported_symbols_list=yes],
103332001f49Smrg	[lt_cv_ld_exported_symbols_list=no])
10347ec3b29aSmrg	LDFLAGS=$save_LDFLAGS
103532001f49Smrg    ])
103632001f49Smrg
103732001f49Smrg    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
103832001f49Smrg      [lt_cv_ld_force_load=no
103932001f49Smrg      cat > conftest.c << _LT_EOF
104032001f49Smrgint forced_loaded() { return 2;}
104132001f49Smrg_LT_EOF
104232001f49Smrg      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
104332001f49Smrg      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
104432001f49Smrg      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
104532001f49Smrg      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
104632001f49Smrg      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
104732001f49Smrg      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
104832001f49Smrg      cat > conftest.c << _LT_EOF
104932001f49Smrgint main() { return 0;}
105032001f49Smrg_LT_EOF
105132001f49Smrg      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
105232001f49Smrg      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
105332001f49Smrg      _lt_result=$?
105432001f49Smrg      if test -s conftest.err && $GREP force_load conftest.err; then
105532001f49Smrg	cat conftest.err >&AS_MESSAGE_LOG_FD
10567ec3b29aSmrg      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
105732001f49Smrg	lt_cv_ld_force_load=yes
105832001f49Smrg      else
105932001f49Smrg	cat conftest.err >&AS_MESSAGE_LOG_FD
106032001f49Smrg      fi
106132001f49Smrg        rm -f conftest.err libconftest.a conftest conftest.c
106232001f49Smrg        rm -rf conftest.dSYM
106332001f49Smrg    ])
106432001f49Smrg    case $host_os in
106532001f49Smrg    rhapsody* | darwin1.[[012]])
10667ec3b29aSmrg      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
106732001f49Smrg    darwin1.*)
10687ec3b29aSmrg      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
106932001f49Smrg    darwin*) # darwin 5.x on
107032001f49Smrg      # if running on 10.5 or later, the deployment target defaults
107132001f49Smrg      # to the OS version, if on x86, and 10.4, the deployment
107232001f49Smrg      # target defaults to 10.4. Don't you love it?
107332001f49Smrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
107432001f49Smrg	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
10757ec3b29aSmrg	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10767ec3b29aSmrg	10.[[012]][[,.]]*)
10777ec3b29aSmrg	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
107832001f49Smrg	10.*)
10797ec3b29aSmrg	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
108032001f49Smrg      esac
108132001f49Smrg    ;;
108232001f49Smrg  esac
10837ec3b29aSmrg    if test yes = "$lt_cv_apple_cc_single_mod"; then
108432001f49Smrg      _lt_dar_single_mod='$single_module'
108532001f49Smrg    fi
10867ec3b29aSmrg    if test yes = "$lt_cv_ld_exported_symbols_list"; then
10877ec3b29aSmrg      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
108832001f49Smrg    else
10897ec3b29aSmrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
109032001f49Smrg    fi
10917ec3b29aSmrg    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
109232001f49Smrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
109332001f49Smrg    else
109432001f49Smrg      _lt_dsymutil=
109532001f49Smrg    fi
109632001f49Smrg    ;;
109732001f49Smrg  esac
109832001f49Smrg])
109932001f49Smrg
110032001f49Smrg
110132001f49Smrg# _LT_DARWIN_LINKER_FEATURES([TAG])
110232001f49Smrg# ---------------------------------
110332001f49Smrg# Checks for linker and compiler features on darwin
110432001f49Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
110532001f49Smrg[
110632001f49Smrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
110732001f49Smrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
110832001f49Smrg  _LT_TAGVAR(hardcode_direct, $1)=no
110932001f49Smrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
111032001f49Smrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
11117ec3b29aSmrg  if test yes = "$lt_cv_ld_force_load"; then
11127ec3b29aSmrg    _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\"`'
111332001f49Smrg    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
111432001f49Smrg                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
111532001f49Smrg  else
111632001f49Smrg    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
111732001f49Smrg  fi
111832001f49Smrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
11197ec3b29aSmrg  _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
112032001f49Smrg  case $cc_basename in
11217ec3b29aSmrg     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
112232001f49Smrg     *) _lt_dar_can_shared=$GCC ;;
112332001f49Smrg  esac
11247ec3b29aSmrg  if test yes = "$_lt_dar_can_shared"; then
112532001f49Smrg    output_verbose_link_cmd=func_echo_all
11267ec3b29aSmrg    _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"
11277ec3b29aSmrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
11287ec3b29aSmrg    _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"
11297ec3b29aSmrg    _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"
113032001f49Smrg    m4_if([$1], [CXX],
11317ec3b29aSmrg[   if test yes != "$lt_cv_apple_cc_single_mod"; then
11327ec3b29aSmrg      _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"
11337ec3b29aSmrg      _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"
113432001f49Smrg    fi
113532001f49Smrg],[])
113632001f49Smrg  else
113732001f49Smrg  _LT_TAGVAR(ld_shlibs, $1)=no
113832001f49Smrg  fi
113932001f49Smrg])
114032001f49Smrg
114132001f49Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
114232001f49Smrg# ----------------------------------
114332001f49Smrg# Links a minimal program and checks the executable
114432001f49Smrg# for the system default hardcoded library path. In most cases,
114532001f49Smrg# this is /usr/lib:/lib, but when the MPI compilers are used
114632001f49Smrg# the location of the communication and MPI libs are included too.
114732001f49Smrg# If we don't find anything, use the default library path according
114832001f49Smrg# to the aix ld manual.
114932001f49Smrg# Store the results from the different compilers for each TAGNAME.
115032001f49Smrg# Allow to override them for all tags through lt_cv_aix_libpath.
115132001f49Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
115232001f49Smrg[m4_require([_LT_DECL_SED])dnl
11537ec3b29aSmrgif test set = "${lt_cv_aix_libpath+set}"; then
115432001f49Smrg  aix_libpath=$lt_cv_aix_libpath
115532001f49Smrgelse
115632001f49Smrg  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
115732001f49Smrg  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
115832001f49Smrg  lt_aix_libpath_sed='[
115932001f49Smrg      /Import File Strings/,/^$/ {
116032001f49Smrg	  /^0/ {
116132001f49Smrg	      s/^0  *\([^ ]*\) *$/\1/
116232001f49Smrg	      p
116332001f49Smrg	  }
116432001f49Smrg      }]'
116532001f49Smrg  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
116632001f49Smrg  # Check for a 64-bit object if we didn't find anything.
116732001f49Smrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
116832001f49Smrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
116932001f49Smrg  fi],[])
117032001f49Smrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
11717ec3b29aSmrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
117232001f49Smrg  fi
117332001f49Smrg  ])
117432001f49Smrg  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
117532001f49Smrgfi
117632001f49Smrg])# _LT_SYS_MODULE_PATH_AIX
117732001f49Smrg
117832001f49Smrg
117932001f49Smrg# _LT_SHELL_INIT(ARG)
118032001f49Smrg# -------------------
118132001f49Smrgm4_define([_LT_SHELL_INIT],
118232001f49Smrg[m4_divert_text([M4SH-INIT], [$1
118332001f49Smrg])])# _LT_SHELL_INIT
118432001f49Smrg
118532001f49Smrg
118632001f49Smrg
118732001f49Smrg# _LT_PROG_ECHO_BACKSLASH
118832001f49Smrg# -----------------------
118932001f49Smrg# Find how we can fake an echo command that does not interpret backslash.
119032001f49Smrg# In particular, with Autoconf 2.60 or later we add some code to the start
11917ec3b29aSmrg# of the generated configure script that will find a shell with a builtin
11927ec3b29aSmrg# printf (that we can use as an echo command).
119332001f49Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
119432001f49Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
119532001f49SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
119632001f49SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
119732001f49Smrg
119832001f49SmrgAC_MSG_CHECKING([how to print strings])
119932001f49Smrg# Test print first, because it will be a builtin if present.
120032001f49Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
120132001f49Smrg   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
120232001f49Smrg  ECHO='print -r --'
120332001f49Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
120432001f49Smrg  ECHO='printf %s\n'
120532001f49Smrgelse
120632001f49Smrg  # Use this function as a fallback that always works.
120732001f49Smrg  func_fallback_echo ()
120832001f49Smrg  {
120932001f49Smrg    eval 'cat <<_LTECHO_EOF
121032001f49Smrg$[]1
121132001f49Smrg_LTECHO_EOF'
121232001f49Smrg  }
121332001f49Smrg  ECHO='func_fallback_echo'
121432001f49Smrgfi
121532001f49Smrg
121632001f49Smrg# func_echo_all arg...
121732001f49Smrg# Invoke $ECHO with all args, space-separated.
121832001f49Smrgfunc_echo_all ()
121932001f49Smrg{
12207ec3b29aSmrg    $ECHO "$*"
122132001f49Smrg}
122232001f49Smrg
12237ec3b29aSmrgcase $ECHO in
122432001f49Smrg  printf*) AC_MSG_RESULT([printf]) ;;
122532001f49Smrg  print*) AC_MSG_RESULT([print -r]) ;;
122632001f49Smrg  *) AC_MSG_RESULT([cat]) ;;
122732001f49Smrgesac
122832001f49Smrg
122932001f49Smrgm4_ifdef([_AS_DETECT_SUGGESTED],
123032001f49Smrg[_AS_DETECT_SUGGESTED([
123132001f49Smrg  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
123232001f49Smrg    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
123332001f49Smrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
123432001f49Smrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
123532001f49Smrg    PATH=/empty FPATH=/empty; export PATH FPATH
123632001f49Smrg    test "X`printf %s $ECHO`" = "X$ECHO" \
123732001f49Smrg      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
123832001f49Smrg
123932001f49Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
124032001f49Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
124132001f49Smrg])# _LT_PROG_ECHO_BACKSLASH
124232001f49Smrg
124332001f49Smrg
124432001f49Smrg# _LT_WITH_SYSROOT
124532001f49Smrg# ----------------
124632001f49SmrgAC_DEFUN([_LT_WITH_SYSROOT],
124732001f49Smrg[AC_MSG_CHECKING([for sysroot])
124832001f49SmrgAC_ARG_WITH([sysroot],
12497ec3b29aSmrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
12507ec3b29aSmrg  [Search for dependent libraries within DIR (or the compiler's sysroot
12517ec3b29aSmrg   if not specified).])],
125232001f49Smrg[], [with_sysroot=no])
125332001f49Smrg
125432001f49Smrgdnl lt_sysroot will always be passed unquoted.  We quote it here
125532001f49Smrgdnl in case the user passed a directory name.
125632001f49Smrglt_sysroot=
12577ec3b29aSmrgcase $with_sysroot in #(
125832001f49Smrg yes)
12597ec3b29aSmrg   if test yes = "$GCC"; then
126032001f49Smrg     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
126132001f49Smrg   fi
126232001f49Smrg   ;; #(
126332001f49Smrg /*)
126432001f49Smrg   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
126532001f49Smrg   ;; #(
126632001f49Smrg no|'')
126732001f49Smrg   ;; #(
126832001f49Smrg *)
12697ec3b29aSmrg   AC_MSG_RESULT([$with_sysroot])
127032001f49Smrg   AC_MSG_ERROR([The sysroot must be an absolute path.])
127132001f49Smrg   ;;
127232001f49Smrgesac
127332001f49Smrg
127432001f49Smrg AC_MSG_RESULT([${lt_sysroot:-no}])
127532001f49Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
12767ec3b29aSmrg[dependent libraries, and where our libraries should be installed.])])
127732001f49Smrg
127832001f49Smrg# _LT_ENABLE_LOCK
127932001f49Smrg# ---------------
128032001f49Smrgm4_defun([_LT_ENABLE_LOCK],
128132001f49Smrg[AC_ARG_ENABLE([libtool-lock],
128232001f49Smrg  [AS_HELP_STRING([--disable-libtool-lock],
128332001f49Smrg    [avoid locking (might break parallel builds)])])
12847ec3b29aSmrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes
128532001f49Smrg
128632001f49Smrg# Some flags need to be propagated to the compiler or linker for good
128732001f49Smrg# libtool support.
128832001f49Smrgcase $host in
128932001f49Smrgia64-*-hpux*)
12907ec3b29aSmrg  # Find out what ABI is being produced by ac_compile, and set mode
12917ec3b29aSmrg  # options accordingly.
129232001f49Smrg  echo 'int i;' > conftest.$ac_ext
129332001f49Smrg  if AC_TRY_EVAL(ac_compile); then
129432001f49Smrg    case `/usr/bin/file conftest.$ac_objext` in
129532001f49Smrg      *ELF-32*)
12967ec3b29aSmrg	HPUX_IA64_MODE=32
129732001f49Smrg	;;
129832001f49Smrg      *ELF-64*)
12997ec3b29aSmrg	HPUX_IA64_MODE=64
130032001f49Smrg	;;
130132001f49Smrg    esac
130232001f49Smrg  fi
130332001f49Smrg  rm -rf conftest*
130432001f49Smrg  ;;
130532001f49Smrg*-*-irix6*)
13067ec3b29aSmrg  # Find out what ABI is being produced by ac_compile, and set linker
13077ec3b29aSmrg  # options accordingly.
130832001f49Smrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
130932001f49Smrg  if AC_TRY_EVAL(ac_compile); then
13107ec3b29aSmrg    if test yes = "$lt_cv_prog_gnu_ld"; then
131132001f49Smrg      case `/usr/bin/file conftest.$ac_objext` in
131232001f49Smrg	*32-bit*)
131332001f49Smrg	  LD="${LD-ld} -melf32bsmip"
131432001f49Smrg	  ;;
131532001f49Smrg	*N32*)
131632001f49Smrg	  LD="${LD-ld} -melf32bmipn32"
131732001f49Smrg	  ;;
131832001f49Smrg	*64-bit*)
131932001f49Smrg	  LD="${LD-ld} -melf64bmip"
132032001f49Smrg	;;
132132001f49Smrg      esac
132232001f49Smrg    else
132332001f49Smrg      case `/usr/bin/file conftest.$ac_objext` in
132432001f49Smrg	*32-bit*)
132532001f49Smrg	  LD="${LD-ld} -32"
132632001f49Smrg	  ;;
132732001f49Smrg	*N32*)
132832001f49Smrg	  LD="${LD-ld} -n32"
132932001f49Smrg	  ;;
133032001f49Smrg	*64-bit*)
133132001f49Smrg	  LD="${LD-ld} -64"
133232001f49Smrg	  ;;
133332001f49Smrg      esac
133432001f49Smrg    fi
133532001f49Smrg  fi
133632001f49Smrg  rm -rf conftest*
133732001f49Smrg  ;;
133832001f49Smrg
13397ec3b29aSmrgmips64*-*linux*)
13407ec3b29aSmrg  # Find out what ABI is being produced by ac_compile, and set linker
13417ec3b29aSmrg  # options accordingly.
13427ec3b29aSmrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
13437ec3b29aSmrg  if AC_TRY_EVAL(ac_compile); then
13447ec3b29aSmrg    emul=elf
13457ec3b29aSmrg    case `/usr/bin/file conftest.$ac_objext` in
13467ec3b29aSmrg      *32-bit*)
13477ec3b29aSmrg	emul="${emul}32"
13487ec3b29aSmrg	;;
13497ec3b29aSmrg      *64-bit*)
13507ec3b29aSmrg	emul="${emul}64"
13517ec3b29aSmrg	;;
13527ec3b29aSmrg    esac
13537ec3b29aSmrg    case `/usr/bin/file conftest.$ac_objext` in
13547ec3b29aSmrg      *MSB*)
13557ec3b29aSmrg	emul="${emul}btsmip"
13567ec3b29aSmrg	;;
13577ec3b29aSmrg      *LSB*)
13587ec3b29aSmrg	emul="${emul}ltsmip"
13597ec3b29aSmrg	;;
13607ec3b29aSmrg    esac
13617ec3b29aSmrg    case `/usr/bin/file conftest.$ac_objext` in
13627ec3b29aSmrg      *N32*)
13637ec3b29aSmrg	emul="${emul}n32"
13647ec3b29aSmrg	;;
13657ec3b29aSmrg    esac
13667ec3b29aSmrg    LD="${LD-ld} -m $emul"
13677ec3b29aSmrg  fi
13687ec3b29aSmrg  rm -rf conftest*
13697ec3b29aSmrg  ;;
13707ec3b29aSmrg
137132001f49Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
137232001f49Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
13737ec3b29aSmrg  # Find out what ABI is being produced by ac_compile, and set linker
13747ec3b29aSmrg  # options accordingly.  Note that the listed cases only cover the
13757ec3b29aSmrg  # situations where additional linker options are needed (such as when
13767ec3b29aSmrg  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
13777ec3b29aSmrg  # vice versa); the common cases where no linker options are needed do
13787ec3b29aSmrg  # not appear in the list.
137932001f49Smrg  echo 'int i;' > conftest.$ac_ext
138032001f49Smrg  if AC_TRY_EVAL(ac_compile); then
138132001f49Smrg    case `/usr/bin/file conftest.o` in
138232001f49Smrg      *32-bit*)
138332001f49Smrg	case $host in
138432001f49Smrg	  x86_64-*kfreebsd*-gnu)
138532001f49Smrg	    LD="${LD-ld} -m elf_i386_fbsd"
138632001f49Smrg	    ;;
138732001f49Smrg	  x86_64-*linux*)
138832001f49Smrg	    case `/usr/bin/file conftest.o` in
138932001f49Smrg	      *x86-64*)
139032001f49Smrg		LD="${LD-ld} -m elf32_x86_64"
139132001f49Smrg		;;
139232001f49Smrg	      *)
139332001f49Smrg		LD="${LD-ld} -m elf_i386"
139432001f49Smrg		;;
139532001f49Smrg	    esac
139632001f49Smrg	    ;;
13977ec3b29aSmrg	  powerpc64le-*linux*)
139832001f49Smrg	    LD="${LD-ld} -m elf32lppclinux"
139932001f49Smrg	    ;;
14007ec3b29aSmrg	  powerpc64-*linux*)
140132001f49Smrg	    LD="${LD-ld} -m elf32ppclinux"
140232001f49Smrg	    ;;
140332001f49Smrg	  s390x-*linux*)
140432001f49Smrg	    LD="${LD-ld} -m elf_s390"
140532001f49Smrg	    ;;
140632001f49Smrg	  sparc64-*linux*)
140732001f49Smrg	    LD="${LD-ld} -m elf32_sparc"
140832001f49Smrg	    ;;
140932001f49Smrg	esac
141032001f49Smrg	;;
141132001f49Smrg      *64-bit*)
141232001f49Smrg	case $host in
141332001f49Smrg	  x86_64-*kfreebsd*-gnu)
141432001f49Smrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
141532001f49Smrg	    ;;
141632001f49Smrg	  x86_64-*linux*)
141732001f49Smrg	    LD="${LD-ld} -m elf_x86_64"
141832001f49Smrg	    ;;
14197ec3b29aSmrg	  powerpcle-*linux*)
142032001f49Smrg	    LD="${LD-ld} -m elf64lppc"
142132001f49Smrg	    ;;
14227ec3b29aSmrg	  powerpc-*linux*)
142332001f49Smrg	    LD="${LD-ld} -m elf64ppc"
142432001f49Smrg	    ;;
142532001f49Smrg	  s390*-*linux*|s390*-*tpf*)
142632001f49Smrg	    LD="${LD-ld} -m elf64_s390"
142732001f49Smrg	    ;;
142832001f49Smrg	  sparc*-*linux*)
142932001f49Smrg	    LD="${LD-ld} -m elf64_sparc"
143032001f49Smrg	    ;;
143132001f49Smrg	esac
143232001f49Smrg	;;
143332001f49Smrg    esac
143432001f49Smrg  fi
143532001f49Smrg  rm -rf conftest*
143632001f49Smrg  ;;
143732001f49Smrg
143832001f49Smrg*-*-sco3.2v5*)
143932001f49Smrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
14407ec3b29aSmrg  SAVE_CFLAGS=$CFLAGS
144132001f49Smrg  CFLAGS="$CFLAGS -belf"
144232001f49Smrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
144332001f49Smrg    [AC_LANG_PUSH(C)
144432001f49Smrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
144532001f49Smrg     AC_LANG_POP])
14467ec3b29aSmrg  if test yes != "$lt_cv_cc_needs_belf"; then
144732001f49Smrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
14487ec3b29aSmrg    CFLAGS=$SAVE_CFLAGS
144932001f49Smrg  fi
145032001f49Smrg  ;;
145132001f49Smrg*-*solaris*)
14527ec3b29aSmrg  # Find out what ABI is being produced by ac_compile, and set linker
14537ec3b29aSmrg  # options accordingly.
145432001f49Smrg  echo 'int i;' > conftest.$ac_ext
145532001f49Smrg  if AC_TRY_EVAL(ac_compile); then
145632001f49Smrg    case `/usr/bin/file conftest.o` in
145732001f49Smrg    *64-bit*)
145832001f49Smrg      case $lt_cv_prog_gnu_ld in
145932001f49Smrg      yes*)
146032001f49Smrg        case $host in
14617ec3b29aSmrg        i?86-*-solaris*|x86_64-*-solaris*)
146232001f49Smrg          LD="${LD-ld} -m elf_x86_64"
146332001f49Smrg          ;;
146432001f49Smrg        sparc*-*-solaris*)
146532001f49Smrg          LD="${LD-ld} -m elf64_sparc"
146632001f49Smrg          ;;
146732001f49Smrg        esac
146832001f49Smrg        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
146932001f49Smrg        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
14707ec3b29aSmrg          LD=${LD-ld}_sol2
147132001f49Smrg        fi
147232001f49Smrg        ;;
147332001f49Smrg      *)
147432001f49Smrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
147532001f49Smrg	  LD="${LD-ld} -64"
147632001f49Smrg	fi
147732001f49Smrg	;;
147832001f49Smrg      esac
147932001f49Smrg      ;;
148032001f49Smrg    esac
148132001f49Smrg  fi
148232001f49Smrg  rm -rf conftest*
148332001f49Smrg  ;;
148432001f49Smrgesac
148532001f49Smrg
14867ec3b29aSmrgneed_locks=$enable_libtool_lock
148732001f49Smrg])# _LT_ENABLE_LOCK
148832001f49Smrg
148932001f49Smrg
149032001f49Smrg# _LT_PROG_AR
149132001f49Smrg# -----------
149232001f49Smrgm4_defun([_LT_PROG_AR],
149332001f49Smrg[AC_CHECK_TOOLS(AR, [ar], false)
149432001f49Smrg: ${AR=ar}
149532001f49Smrg: ${AR_FLAGS=cru}
149632001f49Smrg_LT_DECL([], [AR], [1], [The archiver])
149732001f49Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
149832001f49Smrg
149932001f49SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
150032001f49Smrg  [lt_cv_ar_at_file=no
150132001f49Smrg   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
150232001f49Smrg     [echo conftest.$ac_objext > conftest.lst
150332001f49Smrg      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
150432001f49Smrg      AC_TRY_EVAL([lt_ar_try])
15057ec3b29aSmrg      if test 0 -eq "$ac_status"; then
150632001f49Smrg	# Ensure the archiver fails upon bogus file names.
150732001f49Smrg	rm -f conftest.$ac_objext libconftest.a
150832001f49Smrg	AC_TRY_EVAL([lt_ar_try])
15097ec3b29aSmrg	if test 0 -ne "$ac_status"; then
151032001f49Smrg          lt_cv_ar_at_file=@
151132001f49Smrg        fi
151232001f49Smrg      fi
151332001f49Smrg      rm -f conftest.* libconftest.a
151432001f49Smrg     ])
151532001f49Smrg  ])
151632001f49Smrg
15177ec3b29aSmrgif test no = "$lt_cv_ar_at_file"; then
151832001f49Smrg  archiver_list_spec=
151932001f49Smrgelse
152032001f49Smrg  archiver_list_spec=$lt_cv_ar_at_file
152132001f49Smrgfi
152232001f49Smrg_LT_DECL([], [archiver_list_spec], [1],
152332001f49Smrg  [How to feed a file listing to the archiver])
152432001f49Smrg])# _LT_PROG_AR
152532001f49Smrg
152632001f49Smrg
152732001f49Smrg# _LT_CMD_OLD_ARCHIVE
152832001f49Smrg# -------------------
152932001f49Smrgm4_defun([_LT_CMD_OLD_ARCHIVE],
153032001f49Smrg[_LT_PROG_AR
153132001f49Smrg
153232001f49SmrgAC_CHECK_TOOL(STRIP, strip, :)
153332001f49Smrgtest -z "$STRIP" && STRIP=:
153432001f49Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
153532001f49Smrg
153632001f49SmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
153732001f49Smrgtest -z "$RANLIB" && RANLIB=:
153832001f49Smrg_LT_DECL([], [RANLIB], [1],
153932001f49Smrg    [Commands used to install an old-style archive])
154032001f49Smrg
154132001f49Smrg# Determine commands to create old-style static archives.
154232001f49Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
154332001f49Smrgold_postinstall_cmds='chmod 644 $oldlib'
154432001f49Smrgold_postuninstall_cmds=
154532001f49Smrg
154632001f49Smrgif test -n "$RANLIB"; then
154732001f49Smrg  case $host_os in
15487ec3b29aSmrg  bitrig* | openbsd*)
154932001f49Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
155032001f49Smrg    ;;
155132001f49Smrg  *)
155232001f49Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
155332001f49Smrg    ;;
155432001f49Smrg  esac
155532001f49Smrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
155632001f49Smrgfi
155732001f49Smrg
155832001f49Smrgcase $host_os in
155932001f49Smrg  darwin*)
156032001f49Smrg    lock_old_archive_extraction=yes ;;
156132001f49Smrg  *)
156232001f49Smrg    lock_old_archive_extraction=no ;;
156332001f49Smrgesac
156432001f49Smrg_LT_DECL([], [old_postinstall_cmds], [2])
156532001f49Smrg_LT_DECL([], [old_postuninstall_cmds], [2])
156632001f49Smrg_LT_TAGDECL([], [old_archive_cmds], [2],
156732001f49Smrg    [Commands used to build an old-style archive])
156832001f49Smrg_LT_DECL([], [lock_old_archive_extraction], [0],
156932001f49Smrg    [Whether to use a lock for old archive extraction])
157032001f49Smrg])# _LT_CMD_OLD_ARCHIVE
157132001f49Smrg
157232001f49Smrg
157332001f49Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
157432001f49Smrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
157532001f49Smrg# ----------------------------------------------------------------
157632001f49Smrg# Check whether the given compiler option works
157732001f49SmrgAC_DEFUN([_LT_COMPILER_OPTION],
157832001f49Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
157932001f49Smrgm4_require([_LT_DECL_SED])dnl
158032001f49SmrgAC_CACHE_CHECK([$1], [$2],
158132001f49Smrg  [$2=no
158232001f49Smrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
158332001f49Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
15847ec3b29aSmrg   lt_compiler_flag="$3"  ## exclude from sc_useless_quotes_in_assignment
158532001f49Smrg   # Insert the option either (1) after the last *FLAGS variable, or
158632001f49Smrg   # (2) before a word containing "conftest.", or (3) at the end.
158732001f49Smrg   # Note that $ac_compile itself does not contain backslashes and begins
158832001f49Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
158932001f49Smrg   # The option is referenced via a variable to avoid confusing sed.
159032001f49Smrg   lt_compile=`echo "$ac_compile" | $SED \
159132001f49Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
159232001f49Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
159332001f49Smrg   -e 's:$: $lt_compiler_flag:'`
159432001f49Smrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
159532001f49Smrg   (eval "$lt_compile" 2>conftest.err)
159632001f49Smrg   ac_status=$?
159732001f49Smrg   cat conftest.err >&AS_MESSAGE_LOG_FD
159832001f49Smrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
159932001f49Smrg   if (exit $ac_status) && test -s "$ac_outfile"; then
160032001f49Smrg     # The compiler can only warn and ignore the option if not recognized
160132001f49Smrg     # So say no if there are warnings other than the usual output.
160232001f49Smrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
160332001f49Smrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
160432001f49Smrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
160532001f49Smrg       $2=yes
160632001f49Smrg     fi
160732001f49Smrg   fi
160832001f49Smrg   $RM conftest*
160932001f49Smrg])
161032001f49Smrg
16117ec3b29aSmrgif test yes = "[$]$2"; then
161232001f49Smrg    m4_if([$5], , :, [$5])
161332001f49Smrgelse
161432001f49Smrg    m4_if([$6], , :, [$6])
161532001f49Smrgfi
161632001f49Smrg])# _LT_COMPILER_OPTION
161732001f49Smrg
161832001f49Smrg# Old name:
161932001f49SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
162032001f49Smrgdnl aclocal-1.4 backwards compatibility:
162132001f49Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
162232001f49Smrg
162332001f49Smrg
162432001f49Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
162532001f49Smrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
162632001f49Smrg# ----------------------------------------------------
162732001f49Smrg# Check whether the given linker option works
162832001f49SmrgAC_DEFUN([_LT_LINKER_OPTION],
162932001f49Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
163032001f49Smrgm4_require([_LT_DECL_SED])dnl
163132001f49SmrgAC_CACHE_CHECK([$1], [$2],
163232001f49Smrg  [$2=no
16337ec3b29aSmrg   save_LDFLAGS=$LDFLAGS
163432001f49Smrg   LDFLAGS="$LDFLAGS $3"
163532001f49Smrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
163632001f49Smrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
163732001f49Smrg     # The linker can only warn and ignore the option if not recognized
163832001f49Smrg     # So say no if there are warnings
163932001f49Smrg     if test -s conftest.err; then
164032001f49Smrg       # Append any errors to the config.log.
164132001f49Smrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
164232001f49Smrg       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
164332001f49Smrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
164432001f49Smrg       if diff conftest.exp conftest.er2 >/dev/null; then
164532001f49Smrg         $2=yes
164632001f49Smrg       fi
164732001f49Smrg     else
164832001f49Smrg       $2=yes
164932001f49Smrg     fi
165032001f49Smrg   fi
165132001f49Smrg   $RM -r conftest*
16527ec3b29aSmrg   LDFLAGS=$save_LDFLAGS
165332001f49Smrg])
165432001f49Smrg
16557ec3b29aSmrgif test yes = "[$]$2"; then
165632001f49Smrg    m4_if([$4], , :, [$4])
165732001f49Smrgelse
165832001f49Smrg    m4_if([$5], , :, [$5])
165932001f49Smrgfi
166032001f49Smrg])# _LT_LINKER_OPTION
166132001f49Smrg
166232001f49Smrg# Old name:
166332001f49SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
166432001f49Smrgdnl aclocal-1.4 backwards compatibility:
166532001f49Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
166632001f49Smrg
166732001f49Smrg
166832001f49Smrg# LT_CMD_MAX_LEN
166932001f49Smrg#---------------
167032001f49SmrgAC_DEFUN([LT_CMD_MAX_LEN],
167132001f49Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
167232001f49Smrg# find the maximum length of command line arguments
167332001f49SmrgAC_MSG_CHECKING([the maximum length of command line arguments])
167432001f49SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
167532001f49Smrg  i=0
16767ec3b29aSmrg  teststring=ABCD
167732001f49Smrg
167832001f49Smrg  case $build_os in
167932001f49Smrg  msdosdjgpp*)
168032001f49Smrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
168132001f49Smrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
168232001f49Smrg    # during glob expansion).  Even if it were fixed, the result of this
168332001f49Smrg    # check would be larger than it should be.
168432001f49Smrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
168532001f49Smrg    ;;
168632001f49Smrg
168732001f49Smrg  gnu*)
168832001f49Smrg    # Under GNU Hurd, this test is not required because there is
168932001f49Smrg    # no limit to the length of command line arguments.
169032001f49Smrg    # Libtool will interpret -1 as no limit whatsoever
169132001f49Smrg    lt_cv_sys_max_cmd_len=-1;
169232001f49Smrg    ;;
169332001f49Smrg
169432001f49Smrg  cygwin* | mingw* | cegcc*)
169532001f49Smrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
169632001f49Smrg    # about 5 minutes as the teststring grows exponentially.
169732001f49Smrg    # Worse, since 9x/ME are not pre-emptively multitasking,
169832001f49Smrg    # you end up with a "frozen" computer, even though with patience
169932001f49Smrg    # the test eventually succeeds (with a max line length of 256k).
170032001f49Smrg    # Instead, let's just punt: use the minimum linelength reported by
170132001f49Smrg    # all of the supported platforms: 8192 (on NT/2K/XP).
170232001f49Smrg    lt_cv_sys_max_cmd_len=8192;
170332001f49Smrg    ;;
170432001f49Smrg
170532001f49Smrg  mint*)
170632001f49Smrg    # On MiNT this can take a long time and run out of memory.
170732001f49Smrg    lt_cv_sys_max_cmd_len=8192;
170832001f49Smrg    ;;
170932001f49Smrg
171032001f49Smrg  amigaos*)
171132001f49Smrg    # On AmigaOS with pdksh, this test takes hours, literally.
171232001f49Smrg    # So we just punt and use a minimum line length of 8192.
171332001f49Smrg    lt_cv_sys_max_cmd_len=8192;
171432001f49Smrg    ;;
171532001f49Smrg
17167ec3b29aSmrg  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
171732001f49Smrg    # This has been around since 386BSD, at least.  Likely further.
171832001f49Smrg    if test -x /sbin/sysctl; then
171932001f49Smrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
172032001f49Smrg    elif test -x /usr/sbin/sysctl; then
172132001f49Smrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
172232001f49Smrg    else
172332001f49Smrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
172432001f49Smrg    fi
172532001f49Smrg    # And add a safety zone
172632001f49Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
172732001f49Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
172832001f49Smrg    ;;
172932001f49Smrg
173032001f49Smrg  interix*)
173132001f49Smrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
173232001f49Smrg    lt_cv_sys_max_cmd_len=196608
173332001f49Smrg    ;;
173432001f49Smrg
173532001f49Smrg  os2*)
173632001f49Smrg    # The test takes a long time on OS/2.
173732001f49Smrg    lt_cv_sys_max_cmd_len=8192
173832001f49Smrg    ;;
173932001f49Smrg
174032001f49Smrg  osf*)
174132001f49Smrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
174232001f49Smrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
174332001f49Smrg    # nice to cause kernel panics so lets avoid the loop below.
174432001f49Smrg    # First set a reasonable default.
174532001f49Smrg    lt_cv_sys_max_cmd_len=16384
174632001f49Smrg    #
174732001f49Smrg    if test -x /sbin/sysconfig; then
174832001f49Smrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
174932001f49Smrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
175032001f49Smrg      esac
175132001f49Smrg    fi
175232001f49Smrg    ;;
175332001f49Smrg  sco3.2v5*)
175432001f49Smrg    lt_cv_sys_max_cmd_len=102400
175532001f49Smrg    ;;
175632001f49Smrg  sysv5* | sco5v6* | sysv4.2uw2*)
175732001f49Smrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
175832001f49Smrg    if test -n "$kargmax"; then
175932001f49Smrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
176032001f49Smrg    else
176132001f49Smrg      lt_cv_sys_max_cmd_len=32768
176232001f49Smrg    fi
176332001f49Smrg    ;;
176432001f49Smrg  *)
176532001f49Smrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
176632001f49Smrg    if test -n "$lt_cv_sys_max_cmd_len" && \
17677ec3b29aSmrg       test undefined != "$lt_cv_sys_max_cmd_len"; then
176832001f49Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
176932001f49Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
177032001f49Smrg    else
177132001f49Smrg      # Make teststring a little bigger before we do anything with it.
177232001f49Smrg      # a 1K string should be a reasonable start.
17737ec3b29aSmrg      for i in 1 2 3 4 5 6 7 8; do
177432001f49Smrg        teststring=$teststring$teststring
177532001f49Smrg      done
177632001f49Smrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
177732001f49Smrg      # If test is not a shell built-in, we'll probably end up computing a
177832001f49Smrg      # maximum length that is only half of the actual maximum length, but
177932001f49Smrg      # we can't tell.
17807ec3b29aSmrg      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
178132001f49Smrg	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
17827ec3b29aSmrg	      test 17 != "$i" # 1/2 MB should be enough
178332001f49Smrg      do
178432001f49Smrg        i=`expr $i + 1`
178532001f49Smrg        teststring=$teststring$teststring
178632001f49Smrg      done
178732001f49Smrg      # Only check the string length outside the loop.
178832001f49Smrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
178932001f49Smrg      teststring=
179032001f49Smrg      # Add a significant safety factor because C++ compilers can tack on
179132001f49Smrg      # massive amounts of additional arguments before passing them to the
179232001f49Smrg      # linker.  It appears as though 1/2 is a usable value.
179332001f49Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
179432001f49Smrg    fi
179532001f49Smrg    ;;
179632001f49Smrg  esac
179732001f49Smrg])
17987ec3b29aSmrgif test -n "$lt_cv_sys_max_cmd_len"; then
179932001f49Smrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
180032001f49Smrgelse
180132001f49Smrg  AC_MSG_RESULT(none)
180232001f49Smrgfi
180332001f49Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len
180432001f49Smrg_LT_DECL([], [max_cmd_len], [0],
180532001f49Smrg    [What is the maximum length of a command?])
180632001f49Smrg])# LT_CMD_MAX_LEN
180732001f49Smrg
180832001f49Smrg# Old name:
180932001f49SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
181032001f49Smrgdnl aclocal-1.4 backwards compatibility:
181132001f49Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
181232001f49Smrg
181332001f49Smrg
181432001f49Smrg# _LT_HEADER_DLFCN
181532001f49Smrg# ----------------
181632001f49Smrgm4_defun([_LT_HEADER_DLFCN],
181732001f49Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
181832001f49Smrg])# _LT_HEADER_DLFCN
181932001f49Smrg
182032001f49Smrg
182132001f49Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
182232001f49Smrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
182332001f49Smrg# ----------------------------------------------------------------
182432001f49Smrgm4_defun([_LT_TRY_DLOPEN_SELF],
182532001f49Smrg[m4_require([_LT_HEADER_DLFCN])dnl
18267ec3b29aSmrgif test yes = "$cross_compiling"; then :
182732001f49Smrg  [$4]
182832001f49Smrgelse
182932001f49Smrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
183032001f49Smrg  lt_status=$lt_dlunknown
183132001f49Smrg  cat > conftest.$ac_ext <<_LT_EOF
183232001f49Smrg[#line $LINENO "configure"
183332001f49Smrg#include "confdefs.h"
183432001f49Smrg
183532001f49Smrg#if HAVE_DLFCN_H
183632001f49Smrg#include <dlfcn.h>
183732001f49Smrg#endif
183832001f49Smrg
183932001f49Smrg#include <stdio.h>
184032001f49Smrg
184132001f49Smrg#ifdef RTLD_GLOBAL
184232001f49Smrg#  define LT_DLGLOBAL		RTLD_GLOBAL
184332001f49Smrg#else
184432001f49Smrg#  ifdef DL_GLOBAL
184532001f49Smrg#    define LT_DLGLOBAL		DL_GLOBAL
184632001f49Smrg#  else
184732001f49Smrg#    define LT_DLGLOBAL		0
184832001f49Smrg#  endif
184932001f49Smrg#endif
185032001f49Smrg
185132001f49Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
185232001f49Smrg   find out it does not work in some platform. */
185332001f49Smrg#ifndef LT_DLLAZY_OR_NOW
185432001f49Smrg#  ifdef RTLD_LAZY
185532001f49Smrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
185632001f49Smrg#  else
185732001f49Smrg#    ifdef DL_LAZY
185832001f49Smrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
185932001f49Smrg#    else
186032001f49Smrg#      ifdef RTLD_NOW
186132001f49Smrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
186232001f49Smrg#      else
186332001f49Smrg#        ifdef DL_NOW
186432001f49Smrg#          define LT_DLLAZY_OR_NOW	DL_NOW
186532001f49Smrg#        else
186632001f49Smrg#          define LT_DLLAZY_OR_NOW	0
186732001f49Smrg#        endif
186832001f49Smrg#      endif
186932001f49Smrg#    endif
187032001f49Smrg#  endif
187132001f49Smrg#endif
187232001f49Smrg
18737ec3b29aSmrg/* When -fvisibility=hidden is used, assume the code has been annotated
187432001f49Smrg   correspondingly for the symbols needed.  */
18757ec3b29aSmrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
187632001f49Smrgint fnord () __attribute__((visibility("default")));
187732001f49Smrg#endif
187832001f49Smrg
187932001f49Smrgint fnord () { return 42; }
188032001f49Smrgint main ()
188132001f49Smrg{
188232001f49Smrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
188332001f49Smrg  int status = $lt_dlunknown;
188432001f49Smrg
188532001f49Smrg  if (self)
188632001f49Smrg    {
188732001f49Smrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
188832001f49Smrg      else
188932001f49Smrg        {
189032001f49Smrg	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
189132001f49Smrg          else puts (dlerror ());
189232001f49Smrg	}
189332001f49Smrg      /* dlclose (self); */
189432001f49Smrg    }
189532001f49Smrg  else
189632001f49Smrg    puts (dlerror ());
189732001f49Smrg
189832001f49Smrg  return status;
189932001f49Smrg}]
190032001f49Smrg_LT_EOF
19017ec3b29aSmrg  if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
190232001f49Smrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
190332001f49Smrg    lt_status=$?
190432001f49Smrg    case x$lt_status in
190532001f49Smrg      x$lt_dlno_uscore) $1 ;;
190632001f49Smrg      x$lt_dlneed_uscore) $2 ;;
190732001f49Smrg      x$lt_dlunknown|x*) $3 ;;
190832001f49Smrg    esac
190932001f49Smrg  else :
191032001f49Smrg    # compilation failed
191132001f49Smrg    $3
191232001f49Smrg  fi
191332001f49Smrgfi
191432001f49Smrgrm -fr conftest*
191532001f49Smrg])# _LT_TRY_DLOPEN_SELF
191632001f49Smrg
191732001f49Smrg
191832001f49Smrg# LT_SYS_DLOPEN_SELF
191932001f49Smrg# ------------------
192032001f49SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
192132001f49Smrg[m4_require([_LT_HEADER_DLFCN])dnl
19227ec3b29aSmrgif test yes != "$enable_dlopen"; then
192332001f49Smrg  enable_dlopen=unknown
192432001f49Smrg  enable_dlopen_self=unknown
192532001f49Smrg  enable_dlopen_self_static=unknown
192632001f49Smrgelse
192732001f49Smrg  lt_cv_dlopen=no
192832001f49Smrg  lt_cv_dlopen_libs=
192932001f49Smrg
193032001f49Smrg  case $host_os in
193132001f49Smrg  beos*)
19327ec3b29aSmrg    lt_cv_dlopen=load_add_on
193332001f49Smrg    lt_cv_dlopen_libs=
193432001f49Smrg    lt_cv_dlopen_self=yes
193532001f49Smrg    ;;
193632001f49Smrg
193732001f49Smrg  mingw* | pw32* | cegcc*)
19387ec3b29aSmrg    lt_cv_dlopen=LoadLibrary
193932001f49Smrg    lt_cv_dlopen_libs=
194032001f49Smrg    ;;
194132001f49Smrg
194232001f49Smrg  cygwin*)
19437ec3b29aSmrg    lt_cv_dlopen=dlopen
194432001f49Smrg    lt_cv_dlopen_libs=
194532001f49Smrg    ;;
194632001f49Smrg
194732001f49Smrg  darwin*)
19487ec3b29aSmrg    # if libdl is installed we need to link against it
194932001f49Smrg    AC_CHECK_LIB([dl], [dlopen],
19507ec3b29aSmrg		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
19517ec3b29aSmrg    lt_cv_dlopen=dyld
195232001f49Smrg    lt_cv_dlopen_libs=
195332001f49Smrg    lt_cv_dlopen_self=yes
195432001f49Smrg    ])
195532001f49Smrg    ;;
195632001f49Smrg
19577ec3b29aSmrg  tpf*)
19587ec3b29aSmrg    # Don't try to run any link tests for TPF.  We know it's impossible
19597ec3b29aSmrg    # because TPF is a cross-compiler, and we know how we open DSOs.
19607ec3b29aSmrg    lt_cv_dlopen=dlopen
19617ec3b29aSmrg    lt_cv_dlopen_libs=
19627ec3b29aSmrg    lt_cv_dlopen_self=no
19637ec3b29aSmrg    ;;
19647ec3b29aSmrg
196532001f49Smrg  *)
196632001f49Smrg    AC_CHECK_FUNC([shl_load],
19677ec3b29aSmrg	  [lt_cv_dlopen=shl_load],
196832001f49Smrg      [AC_CHECK_LIB([dld], [shl_load],
19697ec3b29aSmrg	    [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
197032001f49Smrg	[AC_CHECK_FUNC([dlopen],
19717ec3b29aSmrg	      [lt_cv_dlopen=dlopen],
197232001f49Smrg	  [AC_CHECK_LIB([dl], [dlopen],
19737ec3b29aSmrg		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
197432001f49Smrg	    [AC_CHECK_LIB([svld], [dlopen],
19757ec3b29aSmrg		  [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
197632001f49Smrg	      [AC_CHECK_LIB([dld], [dld_link],
19777ec3b29aSmrg		    [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
197832001f49Smrg	      ])
197932001f49Smrg	    ])
198032001f49Smrg	  ])
198132001f49Smrg	])
198232001f49Smrg      ])
198332001f49Smrg    ;;
198432001f49Smrg  esac
198532001f49Smrg
19867ec3b29aSmrg  if test no = "$lt_cv_dlopen"; then
198732001f49Smrg    enable_dlopen=no
19887ec3b29aSmrg  else
19897ec3b29aSmrg    enable_dlopen=yes
199032001f49Smrg  fi
199132001f49Smrg
199232001f49Smrg  case $lt_cv_dlopen in
199332001f49Smrg  dlopen)
19947ec3b29aSmrg    save_CPPFLAGS=$CPPFLAGS
19957ec3b29aSmrg    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
199632001f49Smrg
19977ec3b29aSmrg    save_LDFLAGS=$LDFLAGS
199832001f49Smrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
199932001f49Smrg
20007ec3b29aSmrg    save_LIBS=$LIBS
200132001f49Smrg    LIBS="$lt_cv_dlopen_libs $LIBS"
200232001f49Smrg
200332001f49Smrg    AC_CACHE_CHECK([whether a program can dlopen itself],
200432001f49Smrg	  lt_cv_dlopen_self, [dnl
200532001f49Smrg	  _LT_TRY_DLOPEN_SELF(
200632001f49Smrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
200732001f49Smrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
200832001f49Smrg    ])
200932001f49Smrg
20107ec3b29aSmrg    if test yes = "$lt_cv_dlopen_self"; then
201132001f49Smrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
201232001f49Smrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
201332001f49Smrg	  lt_cv_dlopen_self_static, [dnl
201432001f49Smrg	  _LT_TRY_DLOPEN_SELF(
201532001f49Smrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
201632001f49Smrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
201732001f49Smrg      ])
201832001f49Smrg    fi
201932001f49Smrg
20207ec3b29aSmrg    CPPFLAGS=$save_CPPFLAGS
20217ec3b29aSmrg    LDFLAGS=$save_LDFLAGS
20227ec3b29aSmrg    LIBS=$save_LIBS
202332001f49Smrg    ;;
202432001f49Smrg  esac
202532001f49Smrg
202632001f49Smrg  case $lt_cv_dlopen_self in
202732001f49Smrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
202832001f49Smrg  *) enable_dlopen_self=unknown ;;
202932001f49Smrg  esac
203032001f49Smrg
203132001f49Smrg  case $lt_cv_dlopen_self_static in
203232001f49Smrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
203332001f49Smrg  *) enable_dlopen_self_static=unknown ;;
203432001f49Smrg  esac
203532001f49Smrgfi
203632001f49Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
203732001f49Smrg	 [Whether dlopen is supported])
203832001f49Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
203932001f49Smrg	 [Whether dlopen of programs is supported])
204032001f49Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
204132001f49Smrg	 [Whether dlopen of statically linked programs is supported])
204232001f49Smrg])# LT_SYS_DLOPEN_SELF
204332001f49Smrg
204432001f49Smrg# Old name:
204532001f49SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
204632001f49Smrgdnl aclocal-1.4 backwards compatibility:
204732001f49Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
204832001f49Smrg
204932001f49Smrg
205032001f49Smrg# _LT_COMPILER_C_O([TAGNAME])
205132001f49Smrg# ---------------------------
205232001f49Smrg# Check to see if options -c and -o are simultaneously supported by compiler.
205332001f49Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
205432001f49Smrgm4_defun([_LT_COMPILER_C_O],
205532001f49Smrg[m4_require([_LT_DECL_SED])dnl
205632001f49Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
205732001f49Smrgm4_require([_LT_TAG_COMPILER])dnl
205832001f49SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
205932001f49Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
206032001f49Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
206132001f49Smrg   $RM -r conftest 2>/dev/null
206232001f49Smrg   mkdir conftest
206332001f49Smrg   cd conftest
206432001f49Smrg   mkdir out
206532001f49Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
206632001f49Smrg
206732001f49Smrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
206832001f49Smrg   # Insert the option either (1) after the last *FLAGS variable, or
206932001f49Smrg   # (2) before a word containing "conftest.", or (3) at the end.
207032001f49Smrg   # Note that $ac_compile itself does not contain backslashes and begins
207132001f49Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
207232001f49Smrg   lt_compile=`echo "$ac_compile" | $SED \
207332001f49Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
207432001f49Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
207532001f49Smrg   -e 's:$: $lt_compiler_flag:'`
207632001f49Smrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
207732001f49Smrg   (eval "$lt_compile" 2>out/conftest.err)
207832001f49Smrg   ac_status=$?
207932001f49Smrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
208032001f49Smrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
208132001f49Smrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
208232001f49Smrg   then
208332001f49Smrg     # The compiler can only warn and ignore the option if not recognized
208432001f49Smrg     # So say no if there are warnings
208532001f49Smrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
208632001f49Smrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
208732001f49Smrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
208832001f49Smrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
208932001f49Smrg     fi
209032001f49Smrg   fi
209132001f49Smrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
209232001f49Smrg   $RM conftest*
209332001f49Smrg   # SGI C++ compiler will create directory out/ii_files/ for
209432001f49Smrg   # template instantiation
209532001f49Smrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
209632001f49Smrg   $RM out/* && rmdir out
209732001f49Smrg   cd ..
209832001f49Smrg   $RM -r conftest
209932001f49Smrg   $RM conftest*
210032001f49Smrg])
210132001f49Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
210232001f49Smrg	[Does compiler simultaneously support -c and -o options?])
210332001f49Smrg])# _LT_COMPILER_C_O
210432001f49Smrg
210532001f49Smrg
210632001f49Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
210732001f49Smrg# ----------------------------------
210832001f49Smrg# Check to see if we can do hard links to lock some files if needed
210932001f49Smrgm4_defun([_LT_COMPILER_FILE_LOCKS],
211032001f49Smrg[m4_require([_LT_ENABLE_LOCK])dnl
211132001f49Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
211232001f49Smrg_LT_COMPILER_C_O([$1])
211332001f49Smrg
21147ec3b29aSmrghard_links=nottested
21157ec3b29aSmrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
211632001f49Smrg  # do not overwrite the value of need_locks provided by the user
211732001f49Smrg  AC_MSG_CHECKING([if we can lock with hard links])
211832001f49Smrg  hard_links=yes
211932001f49Smrg  $RM conftest*
212032001f49Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
212132001f49Smrg  touch conftest.a
212232001f49Smrg  ln conftest.a conftest.b 2>&5 || hard_links=no
212332001f49Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
212432001f49Smrg  AC_MSG_RESULT([$hard_links])
21257ec3b29aSmrg  if test no = "$hard_links"; then
21267ec3b29aSmrg    AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
212732001f49Smrg    need_locks=warn
212832001f49Smrg  fi
212932001f49Smrgelse
213032001f49Smrg  need_locks=no
213132001f49Smrgfi
213232001f49Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
213332001f49Smrg])# _LT_COMPILER_FILE_LOCKS
213432001f49Smrg
213532001f49Smrg
213632001f49Smrg# _LT_CHECK_OBJDIR
213732001f49Smrg# ----------------
213832001f49Smrgm4_defun([_LT_CHECK_OBJDIR],
213932001f49Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
214032001f49Smrg[rm -f .libs 2>/dev/null
214132001f49Smrgmkdir .libs 2>/dev/null
214232001f49Smrgif test -d .libs; then
214332001f49Smrg  lt_cv_objdir=.libs
214432001f49Smrgelse
214532001f49Smrg  # MS-DOS does not allow filenames that begin with a dot.
214632001f49Smrg  lt_cv_objdir=_libs
214732001f49Smrgfi
214832001f49Smrgrmdir .libs 2>/dev/null])
214932001f49Smrgobjdir=$lt_cv_objdir
215032001f49Smrg_LT_DECL([], [objdir], [0],
215132001f49Smrg         [The name of the directory that contains temporary libtool files])dnl
215232001f49Smrgm4_pattern_allow([LT_OBJDIR])dnl
21537ec3b29aSmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
21547ec3b29aSmrg  [Define to the sub-directory where libtool stores uninstalled libraries.])
215532001f49Smrg])# _LT_CHECK_OBJDIR
215632001f49Smrg
215732001f49Smrg
215832001f49Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
215932001f49Smrg# --------------------------------------
216032001f49Smrg# Check hardcoding attributes.
216132001f49Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
216232001f49Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
216332001f49Smrg_LT_TAGVAR(hardcode_action, $1)=
216432001f49Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
216532001f49Smrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
21667ec3b29aSmrg   test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
216732001f49Smrg
216832001f49Smrg  # We can hardcode non-existent directories.
21697ec3b29aSmrg  if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
217032001f49Smrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
217132001f49Smrg     # have to relink, otherwise we might link with an installed library
217232001f49Smrg     # when we should be linking with a yet-to-be-installed one
21737ec3b29aSmrg     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
21747ec3b29aSmrg     test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
217532001f49Smrg    # Linking always hardcodes the temporary library directory.
217632001f49Smrg    _LT_TAGVAR(hardcode_action, $1)=relink
217732001f49Smrg  else
217832001f49Smrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
217932001f49Smrg    _LT_TAGVAR(hardcode_action, $1)=immediate
218032001f49Smrg  fi
218132001f49Smrgelse
218232001f49Smrg  # We cannot hardcode anything, or else we can only hardcode existing
218332001f49Smrg  # directories.
218432001f49Smrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
218532001f49Smrgfi
218632001f49SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
218732001f49Smrg
21887ec3b29aSmrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
21897ec3b29aSmrg   test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
219032001f49Smrg  # Fast installation is not supported
219132001f49Smrg  enable_fast_install=no
21927ec3b29aSmrgelif test yes = "$shlibpath_overrides_runpath" ||
21937ec3b29aSmrg     test no = "$enable_shared"; then
219432001f49Smrg  # Fast installation is not necessary
219532001f49Smrg  enable_fast_install=needless
219632001f49Smrgfi
219732001f49Smrg_LT_TAGDECL([], [hardcode_action], [0],
219832001f49Smrg    [How to hardcode a shared library path into an executable])
219932001f49Smrg])# _LT_LINKER_HARDCODE_LIBPATH
220032001f49Smrg
220132001f49Smrg
220232001f49Smrg# _LT_CMD_STRIPLIB
220332001f49Smrg# ----------------
220432001f49Smrgm4_defun([_LT_CMD_STRIPLIB],
220532001f49Smrg[m4_require([_LT_DECL_EGREP])
220632001f49Smrgstriplib=
220732001f49Smrgold_striplib=
220832001f49SmrgAC_MSG_CHECKING([whether stripping libraries is possible])
220932001f49Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
221032001f49Smrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
221132001f49Smrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
221232001f49Smrg  AC_MSG_RESULT([yes])
221332001f49Smrgelse
221432001f49Smrg# FIXME - insert some real tests, host_os isn't really good enough
221532001f49Smrg  case $host_os in
221632001f49Smrg  darwin*)
22177ec3b29aSmrg    if test -n "$STRIP"; then
221832001f49Smrg      striplib="$STRIP -x"
221932001f49Smrg      old_striplib="$STRIP -S"
222032001f49Smrg      AC_MSG_RESULT([yes])
222132001f49Smrg    else
222232001f49Smrg      AC_MSG_RESULT([no])
222332001f49Smrg    fi
222432001f49Smrg    ;;
222532001f49Smrg  *)
222632001f49Smrg    AC_MSG_RESULT([no])
222732001f49Smrg    ;;
222832001f49Smrg  esac
222932001f49Smrgfi
223032001f49Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
223132001f49Smrg_LT_DECL([], [striplib], [1])
223232001f49Smrg])# _LT_CMD_STRIPLIB
223332001f49Smrg
223432001f49Smrg
22357ec3b29aSmrg# _LT_PREPARE_MUNGE_PATH_LIST
22367ec3b29aSmrg# ---------------------------
22377ec3b29aSmrg# Make sure func_munge_path_list() is defined correctly.
22387ec3b29aSmrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
22397ec3b29aSmrg[[# func_munge_path_list VARIABLE PATH
22407ec3b29aSmrg# -----------------------------------
22417ec3b29aSmrg# VARIABLE is name of variable containing _space_ separated list of
22427ec3b29aSmrg# directories to be munged by the contents of PATH, which is string
22437ec3b29aSmrg# having a format:
22447ec3b29aSmrg# "DIR[:DIR]:"
22457ec3b29aSmrg#       string "DIR[ DIR]" will be prepended to VARIABLE
22467ec3b29aSmrg# ":DIR[:DIR]"
22477ec3b29aSmrg#       string "DIR[ DIR]" will be appended to VARIABLE
22487ec3b29aSmrg# "DIRP[:DIRP]::[DIRA:]DIRA"
22497ec3b29aSmrg#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
22507ec3b29aSmrg#       "DIRA[ DIRA]" will be appended to VARIABLE
22517ec3b29aSmrg# "DIR[:DIR]"
22527ec3b29aSmrg#       VARIABLE will be replaced by "DIR[ DIR]"
22537ec3b29aSmrgfunc_munge_path_list ()
22547ec3b29aSmrg{
22557ec3b29aSmrg    case x@S|@2 in
22567ec3b29aSmrg    x)
22577ec3b29aSmrg        ;;
22587ec3b29aSmrg    *:)
22597ec3b29aSmrg        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
22607ec3b29aSmrg        ;;
22617ec3b29aSmrg    x:*)
22627ec3b29aSmrg        eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
22637ec3b29aSmrg        ;;
22647ec3b29aSmrg    *::*)
22657ec3b29aSmrg        eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
22667ec3b29aSmrg        eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
22677ec3b29aSmrg        ;;
22687ec3b29aSmrg    *)
22697ec3b29aSmrg        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
22707ec3b29aSmrg        ;;
22717ec3b29aSmrg    esac
22727ec3b29aSmrg}
22737ec3b29aSmrg]])# _LT_PREPARE_PATH_LIST
22747ec3b29aSmrg
22757ec3b29aSmrg
227632001f49Smrg# _LT_SYS_DYNAMIC_LINKER([TAG])
227732001f49Smrg# -----------------------------
227832001f49Smrg# PORTME Fill in your ld.so characteristics
227932001f49Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
228032001f49Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
228132001f49Smrgm4_require([_LT_DECL_EGREP])dnl
228232001f49Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
228332001f49Smrgm4_require([_LT_DECL_OBJDUMP])dnl
228432001f49Smrgm4_require([_LT_DECL_SED])dnl
228532001f49Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
22867ec3b29aSmrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
228732001f49SmrgAC_MSG_CHECKING([dynamic linker characteristics])
228832001f49Smrgm4_if([$1],
228932001f49Smrg	[], [
22907ec3b29aSmrgif test yes = "$GCC"; then
229132001f49Smrg  case $host_os in
22927ec3b29aSmrg    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
22937ec3b29aSmrg    *) lt_awk_arg='/^libraries:/' ;;
229432001f49Smrg  esac
229532001f49Smrg  case $host_os in
22967ec3b29aSmrg    mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
22977ec3b29aSmrg    *) lt_sed_strip_eq='s|=/|/|g' ;;
229832001f49Smrg  esac
229932001f49Smrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
230032001f49Smrg  case $lt_search_path_spec in
230132001f49Smrg  *\;*)
230232001f49Smrg    # if the path contains ";" then we assume it to be the separator
230332001f49Smrg    # otherwise default to the standard path separator (i.e. ":") - it is
230432001f49Smrg    # assumed that no part of a normal pathname contains ";" but that should
230532001f49Smrg    # okay in the real world where ";" in dirpaths is itself problematic.
230632001f49Smrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
230732001f49Smrg    ;;
230832001f49Smrg  *)
230932001f49Smrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
231032001f49Smrg    ;;
231132001f49Smrg  esac
231232001f49Smrg  # Ok, now we have the path, separated by spaces, we can step through it
23137ec3b29aSmrg  # and add multilib dir if necessary...
231432001f49Smrg  lt_tmp_lt_search_path_spec=
23157ec3b29aSmrg  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
23167ec3b29aSmrg  # ...but if some path component already ends with the multilib dir we assume
23177ec3b29aSmrg  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
23187ec3b29aSmrg  case "$lt_multi_os_dir; $lt_search_path_spec " in
23197ec3b29aSmrg  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
23207ec3b29aSmrg    lt_multi_os_dir=
23217ec3b29aSmrg    ;;
23227ec3b29aSmrg  esac
232332001f49Smrg  for lt_sys_path in $lt_search_path_spec; do
23247ec3b29aSmrg    if test -d "$lt_sys_path$lt_multi_os_dir"; then
23257ec3b29aSmrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
23267ec3b29aSmrg    elif test -n "$lt_multi_os_dir"; then
232732001f49Smrg      test -d "$lt_sys_path" && \
232832001f49Smrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
232932001f49Smrg    fi
233032001f49Smrg  done
233132001f49Smrg  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
23327ec3b29aSmrgBEGIN {RS = " "; FS = "/|\n";} {
23337ec3b29aSmrg  lt_foo = "";
23347ec3b29aSmrg  lt_count = 0;
233532001f49Smrg  for (lt_i = NF; lt_i > 0; lt_i--) {
233632001f49Smrg    if ($lt_i != "" && $lt_i != ".") {
233732001f49Smrg      if ($lt_i == "..") {
233832001f49Smrg        lt_count++;
233932001f49Smrg      } else {
234032001f49Smrg        if (lt_count == 0) {
23417ec3b29aSmrg          lt_foo = "/" $lt_i lt_foo;
234232001f49Smrg        } else {
234332001f49Smrg          lt_count--;
234432001f49Smrg        }
234532001f49Smrg      }
234632001f49Smrg    }
234732001f49Smrg  }
234832001f49Smrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
234932001f49Smrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
235032001f49Smrg}'`
235132001f49Smrg  # AWK program above erroneously prepends '/' to C:/dos/paths
235232001f49Smrg  # for these hosts.
235332001f49Smrg  case $host_os in
235432001f49Smrg    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
23557ec3b29aSmrg      $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
235632001f49Smrg  esac
235732001f49Smrg  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
235832001f49Smrgelse
235932001f49Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
236032001f49Smrgfi])
236132001f49Smrglibrary_names_spec=
236232001f49Smrglibname_spec='lib$name'
236332001f49Smrgsoname_spec=
23647ec3b29aSmrgshrext_cmds=.so
236532001f49Smrgpostinstall_cmds=
236632001f49Smrgpostuninstall_cmds=
236732001f49Smrgfinish_cmds=
236832001f49Smrgfinish_eval=
236932001f49Smrgshlibpath_var=
237032001f49Smrgshlibpath_overrides_runpath=unknown
237132001f49Smrgversion_type=none
237232001f49Smrgdynamic_linker="$host_os ld.so"
237332001f49Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
237432001f49Smrgneed_lib_prefix=unknown
237532001f49Smrghardcode_into_libs=no
237632001f49Smrg
237732001f49Smrg# when you set need_version to no, make sure it does not cause -set_version
237832001f49Smrg# flags to be left without arguments
237932001f49Smrgneed_version=unknown
238032001f49Smrg
23817ec3b29aSmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH],
23827ec3b29aSmrg[User-defined run-time library search path.])
23837ec3b29aSmrg
238432001f49Smrgcase $host_os in
238532001f49Smrgaix3*)
238632001f49Smrg  version_type=linux # correct to gnu/linux during the next big refactor
23877ec3b29aSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
238832001f49Smrg  shlibpath_var=LIBPATH
238932001f49Smrg
239032001f49Smrg  # AIX 3 has no versioning support, so we append a major version to the name.
23917ec3b29aSmrg  soname_spec='$libname$release$shared_ext$major'
239232001f49Smrg  ;;
239332001f49Smrg
239432001f49Smrgaix[[4-9]]*)
239532001f49Smrg  version_type=linux # correct to gnu/linux during the next big refactor
239632001f49Smrg  need_lib_prefix=no
239732001f49Smrg  need_version=no
239832001f49Smrg  hardcode_into_libs=yes
23997ec3b29aSmrg  if test ia64 = "$host_cpu"; then
240032001f49Smrg    # AIX 5 supports IA64
24017ec3b29aSmrg    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
240232001f49Smrg    shlibpath_var=LD_LIBRARY_PATH
240332001f49Smrg  else
240432001f49Smrg    # With GCC up to 2.95.x, collect2 would create an import file
240532001f49Smrg    # for dependence libraries.  The import file would start with
24067ec3b29aSmrg    # the line '#! .'.  This would cause the generated library to
24077ec3b29aSmrg    # depend on '.', always an invalid library.  This was fixed in
240832001f49Smrg    # development snapshots of GCC prior to 3.0.
240932001f49Smrg    case $host_os in
241032001f49Smrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
241132001f49Smrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
241232001f49Smrg	   echo ' yes '
24137ec3b29aSmrg	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
241432001f49Smrg	:
241532001f49Smrg      else
241632001f49Smrg	can_build_shared=no
241732001f49Smrg      fi
241832001f49Smrg      ;;
241932001f49Smrg    esac
24207ec3b29aSmrg    # Using Import Files as archive members, it is possible to support
24217ec3b29aSmrg    # filename-based versioning of shared library archives on AIX. While
24227ec3b29aSmrg    # this would work for both with and without runtime linking, it will
24237ec3b29aSmrg    # prevent static linking of such archives. So we do filename-based
24247ec3b29aSmrg    # shared library versioning with .so extension only, which is used
24257ec3b29aSmrg    # when both runtime linking and shared linking is enabled.
24267ec3b29aSmrg    # Unfortunately, runtime linking may impact performance, so we do
24277ec3b29aSmrg    # not want this to be the default eventually. Also, we use the
24287ec3b29aSmrg    # versioned .so libs for executables only if there is the -brtl
24297ec3b29aSmrg    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
24307ec3b29aSmrg    # To allow for filename-based versioning support, we need to create
24317ec3b29aSmrg    # libNAME.so.V as an archive file, containing:
24327ec3b29aSmrg    # *) an Import File, referring to the versioned filename of the
24337ec3b29aSmrg    #    archive as well as the shared archive member, telling the
24347ec3b29aSmrg    #    bitwidth (32 or 64) of that shared object, and providing the
24357ec3b29aSmrg    #    list of exported symbols of that shared object, eventually
24367ec3b29aSmrg    #    decorated with the 'weak' keyword
24377ec3b29aSmrg    # *) the shared object with the F_LOADONLY flag set, to really avoid
24387ec3b29aSmrg    #    it being seen by the linker.
24397ec3b29aSmrg    # At run time we better use the real file rather than another symlink,
24407ec3b29aSmrg    # but for link time we create the symlink libNAME.so -> libNAME.so.V
24417ec3b29aSmrg
24427ec3b29aSmrg    case $with_aix_soname,$aix_use_runtimelinking in
24437ec3b29aSmrg    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
244432001f49Smrg    # soname into executable. Probably we can add versioning support to
244532001f49Smrg    # collect2, so additional links can be useful in future.
24467ec3b29aSmrg    aix,yes) # traditional libtool
24477ec3b29aSmrg      dynamic_linker='AIX unversionable lib.so'
244832001f49Smrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
244932001f49Smrg      # instead of lib<name>.a to let people know that these are not
245032001f49Smrg      # typical AIX shared libraries.
24517ec3b29aSmrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
24527ec3b29aSmrg      ;;
24537ec3b29aSmrg    aix,no) # traditional AIX only
24547ec3b29aSmrg      dynamic_linker='AIX lib.a[(]lib.so.V[)]'
245532001f49Smrg      # We preserve .a as extension for shared libraries through AIX4.2
245632001f49Smrg      # and later when we are not doing run time linking.
24577ec3b29aSmrg      library_names_spec='$libname$release.a $libname.a'
24587ec3b29aSmrg      soname_spec='$libname$release$shared_ext$major'
24597ec3b29aSmrg      ;;
24607ec3b29aSmrg    svr4,*) # full svr4 only
24617ec3b29aSmrg      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
24627ec3b29aSmrg      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
24637ec3b29aSmrg      # We do not specify a path in Import Files, so LIBPATH fires.
24647ec3b29aSmrg      shlibpath_overrides_runpath=yes
24657ec3b29aSmrg      ;;
24667ec3b29aSmrg    *,yes) # both, prefer svr4
24677ec3b29aSmrg      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
24687ec3b29aSmrg      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
24697ec3b29aSmrg      # unpreferred sharedlib libNAME.a needs extra handling
24707ec3b29aSmrg      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"'
24717ec3b29aSmrg      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"'
24727ec3b29aSmrg      # We do not specify a path in Import Files, so LIBPATH fires.
24737ec3b29aSmrg      shlibpath_overrides_runpath=yes
24747ec3b29aSmrg      ;;
24757ec3b29aSmrg    *,no) # both, prefer aix
24767ec3b29aSmrg      dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
24777ec3b29aSmrg      library_names_spec='$libname$release.a $libname.a'
24787ec3b29aSmrg      soname_spec='$libname$release$shared_ext$major'
24797ec3b29aSmrg      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
24807ec3b29aSmrg      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)'
24817ec3b29aSmrg      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"'
24827ec3b29aSmrg      ;;
24837ec3b29aSmrg    esac
248432001f49Smrg    shlibpath_var=LIBPATH
248532001f49Smrg  fi
248632001f49Smrg  ;;
248732001f49Smrg
248832001f49Smrgamigaos*)
248932001f49Smrg  case $host_cpu in
249032001f49Smrg  powerpc)
249132001f49Smrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
249232001f49Smrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
24937ec3b29aSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
249432001f49Smrg    ;;
249532001f49Smrg  m68k)
249632001f49Smrg    library_names_spec='$libname.ixlibrary $libname.a'
249732001f49Smrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
24987ec3b29aSmrg    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'
249932001f49Smrg    ;;
250032001f49Smrg  esac
250132001f49Smrg  ;;
250232001f49Smrg
250332001f49Smrgbeos*)
25047ec3b29aSmrg  library_names_spec='$libname$shared_ext'
250532001f49Smrg  dynamic_linker="$host_os ld.so"
250632001f49Smrg  shlibpath_var=LIBRARY_PATH
250732001f49Smrg  ;;
250832001f49Smrg
250932001f49Smrgbsdi[[45]]*)
251032001f49Smrg  version_type=linux # correct to gnu/linux during the next big refactor
251132001f49Smrg  need_version=no
25127ec3b29aSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
25137ec3b29aSmrg  soname_spec='$libname$release$shared_ext$major'
251432001f49Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
251532001f49Smrg  shlibpath_var=LD_LIBRARY_PATH
251632001f49Smrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
251732001f49Smrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
251832001f49Smrg  # the default ld.so.conf also contains /usr/contrib/lib and
251932001f49Smrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
252032001f49Smrg  # libtool to hard-code these into programs
252132001f49Smrg  ;;
252232001f49Smrg
252332001f49Smrgcygwin* | mingw* | pw32* | cegcc*)
252432001f49Smrg  version_type=windows
25257ec3b29aSmrg  shrext_cmds=.dll
252632001f49Smrg  need_version=no
252732001f49Smrg  need_lib_prefix=no
252832001f49Smrg
252932001f49Smrg  case $GCC,$cc_basename in
253032001f49Smrg  yes,*)
253132001f49Smrg    # gcc
253232001f49Smrg    library_names_spec='$libname.dll.a'
253332001f49Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
25347ec3b29aSmrg    postinstall_cmds='base_file=`basename \$file`~
25357ec3b29aSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
253632001f49Smrg      dldir=$destdir/`dirname \$dlpath`~
253732001f49Smrg      test -d \$dldir || mkdir -p \$dldir~
253832001f49Smrg      $install_prog $dir/$dlname \$dldir/$dlname~
253932001f49Smrg      chmod a+x \$dldir/$dlname~
254032001f49Smrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
254132001f49Smrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
254232001f49Smrg      fi'
254332001f49Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
254432001f49Smrg      dlpath=$dir/\$dldll~
254532001f49Smrg       $RM \$dlpath'
254632001f49Smrg    shlibpath_overrides_runpath=yes
254732001f49Smrg
254832001f49Smrg    case $host_os in
254932001f49Smrg    cygwin*)
255032001f49Smrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
25517ec3b29aSmrg      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
255232001f49Smrgm4_if([$1], [],[
255332001f49Smrg      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
255432001f49Smrg      ;;
255532001f49Smrg    mingw* | cegcc*)
255632001f49Smrg      # MinGW DLLs use traditional 'lib' prefix
25577ec3b29aSmrg      soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
255832001f49Smrg      ;;
255932001f49Smrg    pw32*)
256032001f49Smrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
25617ec3b29aSmrg      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
256232001f49Smrg      ;;
256332001f49Smrg    esac
256432001f49Smrg    dynamic_linker='Win32 ld.exe'
256532001f49Smrg    ;;
256632001f49Smrg
256732001f49Smrg  *,cl*)
256832001f49Smrg    # Native MSVC
256932001f49Smrg    libname_spec='$name'
25707ec3b29aSmrg    soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
25717ec3b29aSmrg    library_names_spec='$libname.dll.lib'
257232001f49Smrg
257332001f49Smrg    case $build_os in
257432001f49Smrg    mingw*)
257532001f49Smrg      sys_lib_search_path_spec=
257632001f49Smrg      lt_save_ifs=$IFS
257732001f49Smrg      IFS=';'
257832001f49Smrg      for lt_path in $LIB
257932001f49Smrg      do
258032001f49Smrg        IFS=$lt_save_ifs
258132001f49Smrg        # Let DOS variable expansion print the short 8.3 style file name.
258232001f49Smrg        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
258332001f49Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
258432001f49Smrg      done
258532001f49Smrg      IFS=$lt_save_ifs
258632001f49Smrg      # Convert to MSYS style.
258732001f49Smrg      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
258832001f49Smrg      ;;
258932001f49Smrg    cygwin*)
259032001f49Smrg      # Convert to unix form, then to dos form, then back to unix form
259132001f49Smrg      # but this time dos style (no spaces!) so that the unix form looks
259232001f49Smrg      # like /cygdrive/c/PROGRA~1:/cygdr...
259332001f49Smrg      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
259432001f49Smrg      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
259532001f49Smrg      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
259632001f49Smrg      ;;
259732001f49Smrg    *)
25987ec3b29aSmrg      sys_lib_search_path_spec=$LIB
259932001f49Smrg      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
260032001f49Smrg        # It is most probably a Windows format PATH.
260132001f49Smrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
260232001f49Smrg      else
260332001f49Smrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
260432001f49Smrg      fi
260532001f49Smrg      # FIXME: find the short name or the path components, as spaces are
260632001f49Smrg      # common. (e.g. "Program Files" -> "PROGRA~1")
260732001f49Smrg      ;;
260832001f49Smrg    esac
260932001f49Smrg
261032001f49Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
26117ec3b29aSmrg    postinstall_cmds='base_file=`basename \$file`~
26127ec3b29aSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
261332001f49Smrg      dldir=$destdir/`dirname \$dlpath`~
261432001f49Smrg      test -d \$dldir || mkdir -p \$dldir~
261532001f49Smrg      $install_prog $dir/$dlname \$dldir/$dlname'
261632001f49Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
261732001f49Smrg      dlpath=$dir/\$dldll~
261832001f49Smrg       $RM \$dlpath'
261932001f49Smrg    shlibpath_overrides_runpath=yes
262032001f49Smrg    dynamic_linker='Win32 link.exe'
262132001f49Smrg    ;;
262232001f49Smrg
262332001f49Smrg  *)
262432001f49Smrg    # Assume MSVC wrapper
26257ec3b29aSmrg    library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
262632001f49Smrg    dynamic_linker='Win32 ld.exe'
262732001f49Smrg    ;;
262832001f49Smrg  esac
262932001f49Smrg  # FIXME: first we should search . and the directory the executable is in
263032001f49Smrg  shlibpath_var=PATH
263132001f49Smrg  ;;
263232001f49Smrg
263332001f49Smrgdarwin* | rhapsody*)
263432001f49Smrg  dynamic_linker="$host_os dyld"
263532001f49Smrg  version_type=darwin
263632001f49Smrg  need_lib_prefix=no
263732001f49Smrg  need_version=no
26387ec3b29aSmrg  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
26397ec3b29aSmrg  soname_spec='$libname$release$major$shared_ext'
264032001f49Smrg  shlibpath_overrides_runpath=yes
264132001f49Smrg  shlibpath_var=DYLD_LIBRARY_PATH
264232001f49Smrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
264332001f49Smrgm4_if([$1], [],[
264432001f49Smrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
264532001f49Smrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
264632001f49Smrg  ;;
264732001f49Smrg
264832001f49Smrgdgux*)
264932001f49Smrg  version_type=linux # correct to gnu/linux during the next big refactor
265032001f49Smrg  need_lib_prefix=no
265132001f49Smrg  need_version=no
26527ec3b29aSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
26537ec3b29aSmrg  soname_spec='$libname$release$shared_ext$major'
265432001f49Smrg  shlibpath_var=LD_LIBRARY_PATH
265532001f49Smrg  ;;
265632001f49Smrg
265732001f49Smrgfreebsd* | dragonfly*)
265832001f49Smrg  # DragonFly does not have aout.  When/if they implement a new
265932001f49Smrg  # versioning mechanism, adjust this.
266032001f49Smrg  if test -x /usr/bin/objformat; then
266132001f49Smrg    objformat=`/usr/bin/objformat`
266232001f49Smrg  else
266332001f49Smrg    case $host_os in
266432001f49Smrg    freebsd[[23]].*) objformat=aout ;;
266532001f49Smrg    *) objformat=elf ;;
266632001f49Smrg    esac
266732001f49Smrg  fi
266832001f49Smrg  version_type=freebsd-$objformat
266932001f49Smrg  case $version_type in
267032001f49Smrg    freebsd-elf*)
26717ec3b29aSmrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
26727ec3b29aSmrg      soname_spec='$libname$release$shared_ext$major'
267332001f49Smrg      need_version=no
267432001f49Smrg      need_lib_prefix=no
267532001f49Smrg      ;;
267632001f49Smrg    freebsd-*)
26777ec3b29aSmrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
267832001f49Smrg      need_version=yes
267932001f49Smrg      ;;
268032001f49Smrg  esac
268132001f49Smrg  shlibpath_var=LD_LIBRARY_PATH
268232001f49Smrg  case $host_os in
268332001f49Smrg  freebsd2.*)
268432001f49Smrg    shlibpath_overrides_runpath=yes
268532001f49Smrg    ;;
268632001f49Smrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
268732001f49Smrg    shlibpath_overrides_runpath=yes
268832001f49Smrg    hardcode_into_libs=yes
268932001f49Smrg    ;;
269032001f49Smrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
269132001f49Smrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
269232001f49Smrg    shlibpath_overrides_runpath=no
269332001f49Smrg    hardcode_into_libs=yes
269432001f49Smrg    ;;
269532001f49Smrg  *) # from 4.6 on, and DragonFly
269632001f49Smrg    shlibpath_overrides_runpath=yes
269732001f49Smrg    hardcode_into_libs=yes
269832001f49Smrg    ;;
269932001f49Smrg  esac
270032001f49Smrg  ;;
270132001f49Smrg
270232001f49Smrghaiku*)
270332001f49Smrg  version_type=linux # correct to gnu/linux during the next big refactor
270432001f49Smrg  need_lib_prefix=no
270532001f49Smrg  need_version=no
270632001f49Smrg  dynamic_linker="$host_os runtime_loader"
27077ec3b29aSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
27087ec3b29aSmrg  soname_spec='$libname$release$shared_ext$major'
270932001f49Smrg  shlibpath_var=LIBRARY_PATH
27107ec3b29aSmrg  shlibpath_overrides_runpath=no
271132001f49Smrg  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
271232001f49Smrg  hardcode_into_libs=yes
271332001f49Smrg  ;;
271432001f49Smrg
271532001f49Smrghpux9* | hpux10* | hpux11*)
271632001f49Smrg  # Give a soname corresponding to the major version so that dld.sl refuses to
271732001f49Smrg  # link against other versions.
271832001f49Smrg  version_type=sunos
271932001f49Smrg  need_lib_prefix=no
272032001f49Smrg  need_version=no
272132001f49Smrg  case $host_cpu in
272232001f49Smrg  ia64*)
272332001f49Smrg    shrext_cmds='.so'
272432001f49Smrg    hardcode_into_libs=yes
272532001f49Smrg    dynamic_linker="$host_os dld.so"
272632001f49Smrg    shlibpath_var=LD_LIBRARY_PATH
272732001f49Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
27287ec3b29aSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
27297ec3b29aSmrg    soname_spec='$libname$release$shared_ext$major'
27307ec3b29aSmrg    if test 32 = "$HPUX_IA64_MODE"; then
273132001f49Smrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
27327ec3b29aSmrg      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
273332001f49Smrg    else
273432001f49Smrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
27357ec3b29aSmrg      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
273632001f49Smrg    fi
273732001f49Smrg    ;;
273832001f49Smrg  hppa*64*)
273932001f49Smrg    shrext_cmds='.sl'
274032001f49Smrg    hardcode_into_libs=yes
274132001f49Smrg    dynamic_linker="$host_os dld.sl"
274232001f49Smrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
274332001f49Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
27447ec3b29aSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
27457ec3b29aSmrg    soname_spec='$libname$release$shared_ext$major'
274632001f49Smrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
274732001f49Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
274832001f49Smrg    ;;
274932001f49Smrg  *)
275032001f49Smrg    shrext_cmds='.sl'
275132001f49Smrg    dynamic_linker="$host_os dld.sl"
275232001f49Smrg    shlibpath_var=SHLIB_PATH
275332001f49Smrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
27547ec3b29aSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
27557ec3b29aSmrg    soname_spec='$libname$release$shared_ext$major'
275632001f49Smrg    ;;
275732001f49Smrg  esac
275832001f49Smrg  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
275932001f49Smrg  postinstall_cmds='chmod 555 $lib'
276032001f49Smrg  # or fails outright, so override atomically:
276132001f49Smrg  install_override_mode=555
276232001f49Smrg  ;;
276332001f49Smrg
276432001f49Smrginterix[[3-9]]*)
276532001f49Smrg  version_type=linux # correct to gnu/linux during the next big refactor
276632001f49Smrg  need_lib_prefix=no
276732001f49Smrg  need_version=no
27687ec3b29aSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
27697ec3b29aSmrg  soname_spec='$libname$release$shared_ext$major'
277032001f49Smrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
277132001f49Smrg  shlibpath_var=LD_LIBRARY_PATH
277232001f49Smrg  shlibpath_overrides_runpath=no
277332001f49Smrg  hardcode_into_libs=yes
277432001f49Smrg  ;;
277532001f49Smrg
277632001f49Smrgirix5* | irix6* | nonstopux*)
277732001f49Smrg  case $host_os in
277832001f49Smrg    nonstopux*) version_type=nonstopux ;;
277932001f49Smrg    *)
27807ec3b29aSmrg	if test yes = "$lt_cv_prog_gnu_ld"; then
278132001f49Smrg		version_type=linux # correct to gnu/linux during the next big refactor
278232001f49Smrg	else
278332001f49Smrg		version_type=irix
278432001f49Smrg	fi ;;
278532001f49Smrg  esac
278632001f49Smrg  need_lib_prefix=no
278732001f49Smrg  need_version=no
27887ec3b29aSmrg  soname_spec='$libname$release$shared_ext$major'
27897ec3b29aSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
279032001f49Smrg  case $host_os in
279132001f49Smrg  irix5* | nonstopux*)
279232001f49Smrg    libsuff= shlibsuff=
279332001f49Smrg    ;;
279432001f49Smrg  *)
279532001f49Smrg    case $LD in # libtool.m4 will add one of these switches to LD
279632001f49Smrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
279732001f49Smrg      libsuff= shlibsuff= libmagic=32-bit;;
279832001f49Smrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
279932001f49Smrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
280032001f49Smrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
280132001f49Smrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
280232001f49Smrg    *) libsuff= shlibsuff= libmagic=never-match;;
280332001f49Smrg    esac
280432001f49Smrg    ;;
280532001f49Smrg  esac
280632001f49Smrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
280732001f49Smrg  shlibpath_overrides_runpath=no
28087ec3b29aSmrg  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
28097ec3b29aSmrg  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
281032001f49Smrg  hardcode_into_libs=yes
281132001f49Smrg  ;;
281232001f49Smrg
281332001f49Smrg# No shared lib support for Linux oldld, aout, or coff.
281432001f49Smrglinux*oldld* | linux*aout* | linux*coff*)
281532001f49Smrg  dynamic_linker=no
281632001f49Smrg  ;;
281732001f49Smrg
28187ec3b29aSmrglinux*android*)
28197ec3b29aSmrg  version_type=none # Android doesn't support versioned libraries.
28207ec3b29aSmrg  need_lib_prefix=no
28217ec3b29aSmrg  need_version=no
28227ec3b29aSmrg  library_names_spec='$libname$release$shared_ext'
28237ec3b29aSmrg  soname_spec='$libname$release$shared_ext'
28247ec3b29aSmrg  finish_cmds=
28257ec3b29aSmrg  shlibpath_var=LD_LIBRARY_PATH
28267ec3b29aSmrg  shlibpath_overrides_runpath=yes
28277ec3b29aSmrg
28287ec3b29aSmrg  # This implies no fast_install, which is unacceptable.
28297ec3b29aSmrg  # Some rework will be needed to allow for fast_install
28307ec3b29aSmrg  # before this can be enabled.
28317ec3b29aSmrg  hardcode_into_libs=yes
28327ec3b29aSmrg
28337ec3b29aSmrg  dynamic_linker='Android linker'
28347ec3b29aSmrg  # Don't embed -rpath directories since the linker doesn't support them.
28357ec3b29aSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
28367ec3b29aSmrg  ;;
28377ec3b29aSmrg
283832001f49Smrg# This must be glibc/ELF.
283932001f49Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
284032001f49Smrg  version_type=linux # correct to gnu/linux during the next big refactor
284132001f49Smrg  need_lib_prefix=no
284232001f49Smrg  need_version=no
28437ec3b29aSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
28447ec3b29aSmrg  soname_spec='$libname$release$shared_ext$major'
284532001f49Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
284632001f49Smrg  shlibpath_var=LD_LIBRARY_PATH
284732001f49Smrg  shlibpath_overrides_runpath=no
284832001f49Smrg
284932001f49Smrg  # Some binutils ld are patched to set DT_RUNPATH
285032001f49Smrg  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
285132001f49Smrg    [lt_cv_shlibpath_overrides_runpath=no
285232001f49Smrg    save_LDFLAGS=$LDFLAGS
285332001f49Smrg    save_libdir=$libdir
285432001f49Smrg    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
285532001f49Smrg	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
285632001f49Smrg    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
285732001f49Smrg      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
285832001f49Smrg	 [lt_cv_shlibpath_overrides_runpath=yes])])
285932001f49Smrg    LDFLAGS=$save_LDFLAGS
286032001f49Smrg    libdir=$save_libdir
286132001f49Smrg    ])
286232001f49Smrg  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
286332001f49Smrg
286432001f49Smrg  # This implies no fast_install, which is unacceptable.
286532001f49Smrg  # Some rework will be needed to allow for fast_install
286632001f49Smrg  # before this can be enabled.
286732001f49Smrg  hardcode_into_libs=yes
286832001f49Smrg
28697ec3b29aSmrg  # Ideally, we could use ldconfig to report *all* directores which are
28707ec3b29aSmrg  # searched for libraries, however this is still not possible.  Aside from not
28717ec3b29aSmrg  # being certain /sbin/ldconfig is available, command
28727ec3b29aSmrg  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
28737ec3b29aSmrg  # even though it is searched at run-time.  Try to do the best guess by
28747ec3b29aSmrg  # appending ld.so.conf contents (and includes) to the search path.
287532001f49Smrg  if test -f /etc/ld.so.conf; then
287632001f49Smrg    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' ' '`
287732001f49Smrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
287832001f49Smrg  fi
287932001f49Smrg
288032001f49Smrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
288132001f49Smrg  # powerpc, because MkLinux only supported shared libraries with the
288232001f49Smrg  # GNU dynamic linker.  Since this was broken with cross compilers,
288332001f49Smrg  # most powerpc-linux boxes support dynamic linking these days and
288432001f49Smrg  # people can always --disable-shared, the test was removed, and we
288532001f49Smrg  # assume the GNU/Linux dynamic linker is in use.
288632001f49Smrg  dynamic_linker='GNU/Linux ld.so'
288732001f49Smrg  ;;
288832001f49Smrg
288932001f49Smrgnetbsdelf*-gnu)
289032001f49Smrg  version_type=linux
289132001f49Smrg  need_lib_prefix=no
289232001f49Smrg  need_version=no
289332001f49Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
289432001f49Smrg  soname_spec='${libname}${release}${shared_ext}$major'
289532001f49Smrg  shlibpath_var=LD_LIBRARY_PATH
289632001f49Smrg  shlibpath_overrides_runpath=no
289732001f49Smrg  hardcode_into_libs=yes
289832001f49Smrg  dynamic_linker='NetBSD ld.elf_so'
289932001f49Smrg  ;;
290032001f49Smrg
290132001f49Smrgnetbsd*)
290232001f49Smrg  version_type=sunos
290332001f49Smrg  need_lib_prefix=no
290432001f49Smrg  need_version=no
290532001f49Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
29067ec3b29aSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
290732001f49Smrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
290832001f49Smrg    dynamic_linker='NetBSD (a.out) ld.so'
290932001f49Smrg  else
29107ec3b29aSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
29117ec3b29aSmrg    soname_spec='$libname$release$shared_ext$major'
291232001f49Smrg    dynamic_linker='NetBSD ld.elf_so'
291332001f49Smrg  fi
291432001f49Smrg  shlibpath_var=LD_LIBRARY_PATH
291532001f49Smrg  shlibpath_overrides_runpath=yes
291632001f49Smrg  hardcode_into_libs=yes
291732001f49Smrg  ;;
291832001f49Smrg
291932001f49Smrgnewsos6)
292032001f49Smrg  version_type=linux # correct to gnu/linux during the next big refactor
29217ec3b29aSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
292232001f49Smrg  shlibpath_var=LD_LIBRARY_PATH
292332001f49Smrg  shlibpath_overrides_runpath=yes
292432001f49Smrg  ;;
292532001f49Smrg
292632001f49Smrg*nto* | *qnx*)
292732001f49Smrg  version_type=qnx
292832001f49Smrg  need_lib_prefix=no
292932001f49Smrg  need_version=no
29307ec3b29aSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
29317ec3b29aSmrg  soname_spec='$libname$release$shared_ext$major'
293232001f49Smrg  shlibpath_var=LD_LIBRARY_PATH
293332001f49Smrg  shlibpath_overrides_runpath=no
293432001f49Smrg  hardcode_into_libs=yes
293532001f49Smrg  dynamic_linker='ldqnx.so'
293632001f49Smrg  ;;
293732001f49Smrg
29387ec3b29aSmrgopenbsd* | bitrig*)
293932001f49Smrg  version_type=sunos
29407ec3b29aSmrg  sys_lib_dlsearch_path_spec=/usr/lib
294132001f49Smrg  need_lib_prefix=no
29427ec3b29aSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
29437ec3b29aSmrg    need_version=no
294432001f49Smrg  else
29457ec3b29aSmrg    need_version=yes
294632001f49Smrg  fi
29477ec3b29aSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
29487ec3b29aSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
29497ec3b29aSmrg  shlibpath_var=LD_LIBRARY_PATH
29507ec3b29aSmrg  shlibpath_overrides_runpath=yes
295132001f49Smrg  ;;
295232001f49Smrg
295332001f49Smrgos2*)
295432001f49Smrg  libname_spec='$name'
29557ec3b29aSmrg  version_type=windows
29567ec3b29aSmrg  shrext_cmds=.dll
29577ec3b29aSmrg  need_version=no
295832001f49Smrg  need_lib_prefix=no
29597ec3b29aSmrg  # OS/2 can only load a DLL with a base name of 8 characters or less.
29607ec3b29aSmrg  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
29617ec3b29aSmrg    v=$($ECHO $release$versuffix | tr -d .-);
29627ec3b29aSmrg    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
29637ec3b29aSmrg    $ECHO $n$v`$shared_ext'
29647ec3b29aSmrg  library_names_spec='${libname}_dll.$libext'
296532001f49Smrg  dynamic_linker='OS/2 ld.exe'
29667ec3b29aSmrg  shlibpath_var=BEGINLIBPATH
29677ec3b29aSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
29687ec3b29aSmrg  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
29697ec3b29aSmrg  postinstall_cmds='base_file=`basename \$file`~
29707ec3b29aSmrg    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
29717ec3b29aSmrg    dldir=$destdir/`dirname \$dlpath`~
29727ec3b29aSmrg    test -d \$dldir || mkdir -p \$dldir~
29737ec3b29aSmrg    $install_prog $dir/$dlname \$dldir/$dlname~
29747ec3b29aSmrg    chmod a+x \$dldir/$dlname~
29757ec3b29aSmrg    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
29767ec3b29aSmrg      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
29777ec3b29aSmrg    fi'
29787ec3b29aSmrg  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
29797ec3b29aSmrg    dlpath=$dir/\$dldll~
29807ec3b29aSmrg    $RM \$dlpath'
298132001f49Smrg  ;;
298232001f49Smrg
298332001f49Smrgosf3* | osf4* | osf5*)
298432001f49Smrg  version_type=osf
298532001f49Smrg  need_lib_prefix=no
298632001f49Smrg  need_version=no
29877ec3b29aSmrg  soname_spec='$libname$release$shared_ext$major'
29887ec3b29aSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
298932001f49Smrg  shlibpath_var=LD_LIBRARY_PATH
299032001f49Smrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
29917ec3b29aSmrg  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
299232001f49Smrg  ;;
299332001f49Smrg
299432001f49Smrgrdos*)
299532001f49Smrg  dynamic_linker=no
299632001f49Smrg  ;;
299732001f49Smrg
299832001f49Smrgsolaris*)
299932001f49Smrg  version_type=linux # correct to gnu/linux during the next big refactor
300032001f49Smrg  need_lib_prefix=no
300132001f49Smrg  need_version=no
30027ec3b29aSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
30037ec3b29aSmrg  soname_spec='$libname$release$shared_ext$major'
300432001f49Smrg  shlibpath_var=LD_LIBRARY_PATH
300532001f49Smrg  shlibpath_overrides_runpath=yes
300632001f49Smrg  hardcode_into_libs=yes
300732001f49Smrg  # ldd complains unless libraries are executable
300832001f49Smrg  postinstall_cmds='chmod +x $lib'
300932001f49Smrg  ;;
301032001f49Smrg
301132001f49Smrgsunos4*)
301232001f49Smrg  version_type=sunos
30137ec3b29aSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
301432001f49Smrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
301532001f49Smrg  shlibpath_var=LD_LIBRARY_PATH
301632001f49Smrg  shlibpath_overrides_runpath=yes
30177ec3b29aSmrg  if test yes = "$with_gnu_ld"; then
301832001f49Smrg    need_lib_prefix=no
301932001f49Smrg  fi
302032001f49Smrg  need_version=yes
302132001f49Smrg  ;;
302232001f49Smrg
302332001f49Smrgsysv4 | sysv4.3*)
302432001f49Smrg  version_type=linux # correct to gnu/linux during the next big refactor
30257ec3b29aSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
30267ec3b29aSmrg  soname_spec='$libname$release$shared_ext$major'
302732001f49Smrg  shlibpath_var=LD_LIBRARY_PATH
302832001f49Smrg  case $host_vendor in
302932001f49Smrg    sni)
303032001f49Smrg      shlibpath_overrides_runpath=no
303132001f49Smrg      need_lib_prefix=no
303232001f49Smrg      runpath_var=LD_RUN_PATH
303332001f49Smrg      ;;
303432001f49Smrg    siemens)
303532001f49Smrg      need_lib_prefix=no
303632001f49Smrg      ;;
303732001f49Smrg    motorola)
303832001f49Smrg      need_lib_prefix=no
303932001f49Smrg      need_version=no
304032001f49Smrg      shlibpath_overrides_runpath=no
304132001f49Smrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
304232001f49Smrg      ;;
304332001f49Smrg  esac
304432001f49Smrg  ;;
304532001f49Smrg
304632001f49Smrgsysv4*MP*)
30477ec3b29aSmrg  if test -d /usr/nec; then
304832001f49Smrg    version_type=linux # correct to gnu/linux during the next big refactor
30497ec3b29aSmrg    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
30507ec3b29aSmrg    soname_spec='$libname$shared_ext.$major'
305132001f49Smrg    shlibpath_var=LD_LIBRARY_PATH
305232001f49Smrg  fi
305332001f49Smrg  ;;
305432001f49Smrg
305532001f49Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
30567ec3b29aSmrg  version_type=sco
305732001f49Smrg  need_lib_prefix=no
305832001f49Smrg  need_version=no
30597ec3b29aSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
30607ec3b29aSmrg  soname_spec='$libname$release$shared_ext$major'
306132001f49Smrg  shlibpath_var=LD_LIBRARY_PATH
306232001f49Smrg  shlibpath_overrides_runpath=yes
306332001f49Smrg  hardcode_into_libs=yes
30647ec3b29aSmrg  if test yes = "$with_gnu_ld"; then
306532001f49Smrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
306632001f49Smrg  else
306732001f49Smrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
306832001f49Smrg    case $host_os in
306932001f49Smrg      sco3.2v5*)
307032001f49Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
307132001f49Smrg	;;
307232001f49Smrg    esac
307332001f49Smrg  fi
307432001f49Smrg  sys_lib_dlsearch_path_spec='/usr/lib'
307532001f49Smrg  ;;
307632001f49Smrg
307732001f49Smrgtpf*)
307832001f49Smrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
307932001f49Smrg  version_type=linux # correct to gnu/linux during the next big refactor
308032001f49Smrg  need_lib_prefix=no
308132001f49Smrg  need_version=no
30827ec3b29aSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
308332001f49Smrg  shlibpath_var=LD_LIBRARY_PATH
308432001f49Smrg  shlibpath_overrides_runpath=no
308532001f49Smrg  hardcode_into_libs=yes
308632001f49Smrg  ;;
308732001f49Smrg
308832001f49Smrguts4*)
308932001f49Smrg  version_type=linux # correct to gnu/linux during the next big refactor
30907ec3b29aSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
30917ec3b29aSmrg  soname_spec='$libname$release$shared_ext$major'
309232001f49Smrg  shlibpath_var=LD_LIBRARY_PATH
309332001f49Smrg  ;;
309432001f49Smrg
309532001f49Smrg*)
309632001f49Smrg  dynamic_linker=no
309732001f49Smrg  ;;
309832001f49Smrgesac
309932001f49SmrgAC_MSG_RESULT([$dynamic_linker])
31007ec3b29aSmrgtest no = "$dynamic_linker" && can_build_shared=no
310132001f49Smrg
310232001f49Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
31037ec3b29aSmrgif test yes = "$GCC"; then
310432001f49Smrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
310532001f49Smrgfi
310632001f49Smrg
31077ec3b29aSmrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
31087ec3b29aSmrg  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
310932001f49Smrgfi
31107ec3b29aSmrg
31117ec3b29aSmrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
31127ec3b29aSmrg  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
311332001f49Smrgfi
311432001f49Smrg
31157ec3b29aSmrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
31167ec3b29aSmrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
31177ec3b29aSmrg
31187ec3b29aSmrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
31197ec3b29aSmrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
31207ec3b29aSmrg
31217ec3b29aSmrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
31227ec3b29aSmrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
31237ec3b29aSmrg
312432001f49Smrg_LT_DECL([], [variables_saved_for_relink], [1],
312532001f49Smrg    [Variables whose values should be saved in libtool wrapper scripts and
312632001f49Smrg    restored at link time])
312732001f49Smrg_LT_DECL([], [need_lib_prefix], [0],
312832001f49Smrg    [Do we need the "lib" prefix for modules?])
312932001f49Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
313032001f49Smrg_LT_DECL([], [version_type], [0], [Library versioning type])
313132001f49Smrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
313232001f49Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
313332001f49Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
313432001f49Smrg    [Is shlibpath searched before the hard-coded library search path?])
313532001f49Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
313632001f49Smrg_LT_DECL([], [library_names_spec], [1],
313732001f49Smrg    [[List of archive names.  First name is the real one, the rest are links.
313832001f49Smrg    The last name is the one that the linker finds with -lNAME]])
313932001f49Smrg_LT_DECL([], [soname_spec], [1],
314032001f49Smrg    [[The coded name of the library, if different from the real name]])
314132001f49Smrg_LT_DECL([], [install_override_mode], [1],
314232001f49Smrg    [Permission mode override for installation of shared libraries])
314332001f49Smrg_LT_DECL([], [postinstall_cmds], [2],
314432001f49Smrg    [Command to use after installation of a shared archive])
314532001f49Smrg_LT_DECL([], [postuninstall_cmds], [2],
314632001f49Smrg    [Command to use after uninstallation of a shared archive])
314732001f49Smrg_LT_DECL([], [finish_cmds], [2],
314832001f49Smrg    [Commands used to finish a libtool library installation in a directory])
314932001f49Smrg_LT_DECL([], [finish_eval], [1],
315032001f49Smrg    [[As "finish_cmds", except a single script fragment to be evaled but
315132001f49Smrg    not shown]])
315232001f49Smrg_LT_DECL([], [hardcode_into_libs], [0],
315332001f49Smrg    [Whether we should hardcode library paths into libraries])
315432001f49Smrg_LT_DECL([], [sys_lib_search_path_spec], [2],
315532001f49Smrg    [Compile-time system search path for libraries])
31567ec3b29aSmrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
31577ec3b29aSmrg    [Detected run-time system search path for libraries])
31587ec3b29aSmrg_LT_DECL([], [configure_time_lt_sys_library_path], [2],
31597ec3b29aSmrg    [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
316032001f49Smrg])# _LT_SYS_DYNAMIC_LINKER
316132001f49Smrg
316232001f49Smrg
316332001f49Smrg# _LT_PATH_TOOL_PREFIX(TOOL)
316432001f49Smrg# --------------------------
31657ec3b29aSmrg# find a file program that can recognize shared library
316632001f49SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
316732001f49Smrg[m4_require([_LT_DECL_EGREP])dnl
316832001f49SmrgAC_MSG_CHECKING([for $1])
316932001f49SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
317032001f49Smrg[case $MAGIC_CMD in
317132001f49Smrg[[\\/*] |  ?:[\\/]*])
31727ec3b29aSmrg  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
317332001f49Smrg  ;;
317432001f49Smrg*)
31757ec3b29aSmrg  lt_save_MAGIC_CMD=$MAGIC_CMD
31767ec3b29aSmrg  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
317732001f49Smrgdnl $ac_dummy forces splitting on constant user-supplied paths.
317832001f49Smrgdnl POSIX.2 word splitting is done only on the output of word expansions,
317932001f49Smrgdnl not every word.  This closes a longstanding sh security hole.
318032001f49Smrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
318132001f49Smrg  for ac_dir in $ac_dummy; do
31827ec3b29aSmrg    IFS=$lt_save_ifs
318332001f49Smrg    test -z "$ac_dir" && ac_dir=.
31847ec3b29aSmrg    if test -f "$ac_dir/$1"; then
31857ec3b29aSmrg      lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
318632001f49Smrg      if test -n "$file_magic_test_file"; then
318732001f49Smrg	case $deplibs_check_method in
318832001f49Smrg	"file_magic "*)
318932001f49Smrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
31907ec3b29aSmrg	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
319132001f49Smrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
319232001f49Smrg	    $EGREP "$file_magic_regex" > /dev/null; then
319332001f49Smrg	    :
319432001f49Smrg	  else
319532001f49Smrg	    cat <<_LT_EOF 1>&2
319632001f49Smrg
319732001f49Smrg*** Warning: the command libtool uses to detect shared libraries,
319832001f49Smrg*** $file_magic_cmd, produces output that libtool cannot recognize.
319932001f49Smrg*** The result is that libtool may fail to recognize shared libraries
320032001f49Smrg*** as such.  This will affect the creation of libtool libraries that
320132001f49Smrg*** depend on shared libraries, but programs linked with such libtool
320232001f49Smrg*** libraries will work regardless of this problem.  Nevertheless, you
320332001f49Smrg*** may want to report the problem to your system manager and/or to
320432001f49Smrg*** bug-libtool@gnu.org
320532001f49Smrg
320632001f49Smrg_LT_EOF
320732001f49Smrg	  fi ;;
320832001f49Smrg	esac
320932001f49Smrg      fi
321032001f49Smrg      break
321132001f49Smrg    fi
321232001f49Smrg  done
32137ec3b29aSmrg  IFS=$lt_save_ifs
32147ec3b29aSmrg  MAGIC_CMD=$lt_save_MAGIC_CMD
321532001f49Smrg  ;;
321632001f49Smrgesac])
32177ec3b29aSmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD
321832001f49Smrgif test -n "$MAGIC_CMD"; then
321932001f49Smrg  AC_MSG_RESULT($MAGIC_CMD)
322032001f49Smrgelse
322132001f49Smrg  AC_MSG_RESULT(no)
322232001f49Smrgfi
322332001f49Smrg_LT_DECL([], [MAGIC_CMD], [0],
322432001f49Smrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
322532001f49Smrg])# _LT_PATH_TOOL_PREFIX
322632001f49Smrg
322732001f49Smrg# Old name:
322832001f49SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
322932001f49Smrgdnl aclocal-1.4 backwards compatibility:
323032001f49Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
323132001f49Smrg
323232001f49Smrg
323332001f49Smrg# _LT_PATH_MAGIC
323432001f49Smrg# --------------
32357ec3b29aSmrg# find a file program that can recognize a shared library
323632001f49Smrgm4_defun([_LT_PATH_MAGIC],
323732001f49Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
323832001f49Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then
323932001f49Smrg  if test -n "$ac_tool_prefix"; then
324032001f49Smrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
324132001f49Smrg  else
324232001f49Smrg    MAGIC_CMD=:
324332001f49Smrg  fi
324432001f49Smrgfi
324532001f49Smrg])# _LT_PATH_MAGIC
324632001f49Smrg
324732001f49Smrg
324832001f49Smrg# LT_PATH_LD
324932001f49Smrg# ----------
325032001f49Smrg# find the pathname to the GNU or non-GNU linker
325132001f49SmrgAC_DEFUN([LT_PATH_LD],
325232001f49Smrg[AC_REQUIRE([AC_PROG_CC])dnl
325332001f49SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
325432001f49SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
325532001f49Smrgm4_require([_LT_DECL_SED])dnl
325632001f49Smrgm4_require([_LT_DECL_EGREP])dnl
325732001f49Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl
325832001f49Smrg
325932001f49SmrgAC_ARG_WITH([gnu-ld],
326032001f49Smrg    [AS_HELP_STRING([--with-gnu-ld],
326132001f49Smrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
32627ec3b29aSmrg    [test no = "$withval" || with_gnu_ld=yes],
326332001f49Smrg    [with_gnu_ld=no])dnl
326432001f49Smrg
326532001f49Smrgac_prog=ld
32667ec3b29aSmrgif test yes = "$GCC"; then
326732001f49Smrg  # Check if gcc -print-prog-name=ld gives a path.
326832001f49Smrg  AC_MSG_CHECKING([for ld used by $CC])
326932001f49Smrg  case $host in
327032001f49Smrg  *-*-mingw*)
32717ec3b29aSmrg    # gcc leaves a trailing carriage return, which upsets mingw
327232001f49Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
327332001f49Smrg  *)
327432001f49Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
327532001f49Smrg  esac
327632001f49Smrg  case $ac_prog in
327732001f49Smrg    # Accept absolute paths.
327832001f49Smrg    [[\\/]]* | ?:[[\\/]]*)
327932001f49Smrg      re_direlt='/[[^/]][[^/]]*/\.\./'
328032001f49Smrg      # Canonicalize the pathname of ld
328132001f49Smrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
328232001f49Smrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
328332001f49Smrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
328432001f49Smrg      done
32857ec3b29aSmrg      test -z "$LD" && LD=$ac_prog
328632001f49Smrg      ;;
328732001f49Smrg  "")
328832001f49Smrg    # If it fails, then pretend we aren't using GCC.
328932001f49Smrg    ac_prog=ld
329032001f49Smrg    ;;
329132001f49Smrg  *)
329232001f49Smrg    # If it is relative, then search for the first ld in PATH.
329332001f49Smrg    with_gnu_ld=unknown
329432001f49Smrg    ;;
329532001f49Smrg  esac
32967ec3b29aSmrgelif test yes = "$with_gnu_ld"; then
329732001f49Smrg  AC_MSG_CHECKING([for GNU ld])
329832001f49Smrgelse
329932001f49Smrg  AC_MSG_CHECKING([for non-GNU ld])
330032001f49Smrgfi
330132001f49SmrgAC_CACHE_VAL(lt_cv_path_LD,
330232001f49Smrg[if test -z "$LD"; then
33037ec3b29aSmrg  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
330432001f49Smrg  for ac_dir in $PATH; do
33057ec3b29aSmrg    IFS=$lt_save_ifs
330632001f49Smrg    test -z "$ac_dir" && ac_dir=.
330732001f49Smrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
33087ec3b29aSmrg      lt_cv_path_LD=$ac_dir/$ac_prog
330932001f49Smrg      # Check to see if the program is GNU ld.  I'd rather use --version,
331032001f49Smrg      # but apparently some variants of GNU ld only accept -v.
331132001f49Smrg      # Break only if it was the GNU/non-GNU ld that we prefer.
331232001f49Smrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
331332001f49Smrg      *GNU* | *'with BFD'*)
33147ec3b29aSmrg	test no != "$with_gnu_ld" && break
331532001f49Smrg	;;
331632001f49Smrg      *)
33177ec3b29aSmrg	test yes != "$with_gnu_ld" && break
331832001f49Smrg	;;
331932001f49Smrg      esac
332032001f49Smrg    fi
332132001f49Smrg  done
33227ec3b29aSmrg  IFS=$lt_save_ifs
332332001f49Smrgelse
33247ec3b29aSmrg  lt_cv_path_LD=$LD # Let the user override the test with a path.
332532001f49Smrgfi])
33267ec3b29aSmrgLD=$lt_cv_path_LD
332732001f49Smrgif test -n "$LD"; then
332832001f49Smrg  AC_MSG_RESULT($LD)
332932001f49Smrgelse
333032001f49Smrg  AC_MSG_RESULT(no)
333132001f49Smrgfi
333232001f49Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
333332001f49Smrg_LT_PATH_LD_GNU
333432001f49SmrgAC_SUBST([LD])
333532001f49Smrg
333632001f49Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
333732001f49Smrg])# LT_PATH_LD
333832001f49Smrg
333932001f49Smrg# Old names:
334032001f49SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
334132001f49SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
334232001f49Smrgdnl aclocal-1.4 backwards compatibility:
334332001f49Smrgdnl AC_DEFUN([AM_PROG_LD], [])
334432001f49Smrgdnl AC_DEFUN([AC_PROG_LD], [])
334532001f49Smrg
334632001f49Smrg
334732001f49Smrg# _LT_PATH_LD_GNU
334832001f49Smrg#- --------------
334932001f49Smrgm4_defun([_LT_PATH_LD_GNU],
335032001f49Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
335132001f49Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
335232001f49Smrgcase `$LD -v 2>&1 </dev/null` in
335332001f49Smrg*GNU* | *'with BFD'*)
335432001f49Smrg  lt_cv_prog_gnu_ld=yes
335532001f49Smrg  ;;
335632001f49Smrg*)
335732001f49Smrg  lt_cv_prog_gnu_ld=no
335832001f49Smrg  ;;
335932001f49Smrgesac])
336032001f49Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
336132001f49Smrg])# _LT_PATH_LD_GNU
336232001f49Smrg
336332001f49Smrg
336432001f49Smrg# _LT_CMD_RELOAD
336532001f49Smrg# --------------
336632001f49Smrg# find reload flag for linker
336732001f49Smrg#   -- PORTME Some linkers may need a different reload flag.
336832001f49Smrgm4_defun([_LT_CMD_RELOAD],
336932001f49Smrg[AC_CACHE_CHECK([for $LD option to reload object files],
337032001f49Smrg  lt_cv_ld_reload_flag,
337132001f49Smrg  [lt_cv_ld_reload_flag='-r'])
337232001f49Smrgreload_flag=$lt_cv_ld_reload_flag
337332001f49Smrgcase $reload_flag in
337432001f49Smrg"" | " "*) ;;
337532001f49Smrg*) reload_flag=" $reload_flag" ;;
337632001f49Smrgesac
337732001f49Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
337832001f49Smrgcase $host_os in
337932001f49Smrg  cygwin* | mingw* | pw32* | cegcc*)
33807ec3b29aSmrg    if test yes != "$GCC"; then
338132001f49Smrg      reload_cmds=false
338232001f49Smrg    fi
338332001f49Smrg    ;;
338432001f49Smrg  darwin*)
33857ec3b29aSmrg    if test yes = "$GCC"; then
33867ec3b29aSmrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
338732001f49Smrg    else
338832001f49Smrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
338932001f49Smrg    fi
339032001f49Smrg    ;;
339132001f49Smrgesac
339232001f49Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
339332001f49Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl
339432001f49Smrg])# _LT_CMD_RELOAD
339532001f49Smrg
339632001f49Smrg
33977ec3b29aSmrg# _LT_PATH_DD
33987ec3b29aSmrg# -----------
33997ec3b29aSmrg# find a working dd
34007ec3b29aSmrgm4_defun([_LT_PATH_DD],
34017ec3b29aSmrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
34027ec3b29aSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i
34037ec3b29aSmrgcat conftest.i conftest.i >conftest2.i
34047ec3b29aSmrg: ${lt_DD:=$DD}
34057ec3b29aSmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
34067ec3b29aSmrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
34077ec3b29aSmrg  cmp -s conftest.i conftest.out \
34087ec3b29aSmrg  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
34097ec3b29aSmrgfi])
34107ec3b29aSmrgrm -f conftest.i conftest2.i conftest.out])
34117ec3b29aSmrg])# _LT_PATH_DD
34127ec3b29aSmrg
34137ec3b29aSmrg
34147ec3b29aSmrg# _LT_CMD_TRUNCATE
34157ec3b29aSmrg# ----------------
34167ec3b29aSmrg# find command to truncate a binary pipe
34177ec3b29aSmrgm4_defun([_LT_CMD_TRUNCATE],
34187ec3b29aSmrg[m4_require([_LT_PATH_DD])
34197ec3b29aSmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
34207ec3b29aSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i
34217ec3b29aSmrgcat conftest.i conftest.i >conftest2.i
34227ec3b29aSmrglt_cv_truncate_bin=
34237ec3b29aSmrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
34247ec3b29aSmrg  cmp -s conftest.i conftest.out \
34257ec3b29aSmrg  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
34267ec3b29aSmrgfi
34277ec3b29aSmrgrm -f conftest.i conftest2.i conftest.out
34287ec3b29aSmrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
34297ec3b29aSmrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
34307ec3b29aSmrg  [Command to truncate a binary pipe])
34317ec3b29aSmrg])# _LT_CMD_TRUNCATE
34327ec3b29aSmrg
34337ec3b29aSmrg
343432001f49Smrg# _LT_CHECK_MAGIC_METHOD
343532001f49Smrg# ----------------------
343632001f49Smrg# how to check for library dependencies
343732001f49Smrg#  -- PORTME fill in with the dynamic library characteristics
343832001f49Smrgm4_defun([_LT_CHECK_MAGIC_METHOD],
343932001f49Smrg[m4_require([_LT_DECL_EGREP])
344032001f49Smrgm4_require([_LT_DECL_OBJDUMP])
344132001f49SmrgAC_CACHE_CHECK([how to recognize dependent libraries],
344232001f49Smrglt_cv_deplibs_check_method,
344332001f49Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
344432001f49Smrglt_cv_file_magic_test_file=
344532001f49Smrglt_cv_deplibs_check_method='unknown'
344632001f49Smrg# Need to set the preceding variable on all platforms that support
344732001f49Smrg# interlibrary dependencies.
344832001f49Smrg# 'none' -- dependencies not supported.
34497ec3b29aSmrg# 'unknown' -- same as none, but documents that we really don't know.
345032001f49Smrg# 'pass_all' -- all dependencies passed with no checks.
345132001f49Smrg# 'test_compile' -- check by making test program.
345232001f49Smrg# 'file_magic [[regex]]' -- check by looking for files in library path
34537ec3b29aSmrg# that responds to the $file_magic_cmd with a given extended regex.
34547ec3b29aSmrg# If you have 'file' or equivalent on your system and you're not sure
34557ec3b29aSmrg# whether 'pass_all' will *always* work, you probably want this one.
345632001f49Smrg
345732001f49Smrgcase $host_os in
345832001f49Smrgaix[[4-9]]*)
345932001f49Smrg  lt_cv_deplibs_check_method=pass_all
346032001f49Smrg  ;;
346132001f49Smrg
346232001f49Smrgbeos*)
346332001f49Smrg  lt_cv_deplibs_check_method=pass_all
346432001f49Smrg  ;;
346532001f49Smrg
346632001f49Smrgbsdi[[45]]*)
346732001f49Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
346832001f49Smrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
346932001f49Smrg  lt_cv_file_magic_test_file=/shlib/libc.so
347032001f49Smrg  ;;
347132001f49Smrg
347232001f49Smrgcygwin*)
347332001f49Smrg  # func_win32_libid is a shell function defined in ltmain.sh
347432001f49Smrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
347532001f49Smrg  lt_cv_file_magic_cmd='func_win32_libid'
347632001f49Smrg  ;;
347732001f49Smrg
347832001f49Smrgmingw* | pw32*)
347932001f49Smrg  # Base MSYS/MinGW do not provide the 'file' command needed by
348032001f49Smrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
348132001f49Smrg  # unless we find 'file', for example because we are cross-compiling.
34827ec3b29aSmrg  if ( file / ) >/dev/null 2>&1; then
348332001f49Smrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
348432001f49Smrg    lt_cv_file_magic_cmd='func_win32_libid'
348532001f49Smrg  else
348632001f49Smrg    # Keep this pattern in sync with the one in func_win32_libid.
348732001f49Smrg    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
348832001f49Smrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
348932001f49Smrg  fi
349032001f49Smrg  ;;
349132001f49Smrg
349232001f49Smrgcegcc*)
349332001f49Smrg  # use the weaker test based on 'objdump'. See mingw*.
349432001f49Smrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
349532001f49Smrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
349632001f49Smrg  ;;
349732001f49Smrg
349832001f49Smrgdarwin* | rhapsody*)
349932001f49Smrg  lt_cv_deplibs_check_method=pass_all
350032001f49Smrg  ;;
350132001f49Smrg
350232001f49Smrgfreebsd* | dragonfly*)
350332001f49Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
350432001f49Smrg    case $host_cpu in
350532001f49Smrg    i*86 )
350632001f49Smrg      # Not sure whether the presence of OpenBSD here was a mistake.
350732001f49Smrg      # Let's accept both of them until this is cleared up.
350832001f49Smrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
350932001f49Smrg      lt_cv_file_magic_cmd=/usr/bin/file
351032001f49Smrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
351132001f49Smrg      ;;
351232001f49Smrg    esac
351332001f49Smrg  else
351432001f49Smrg    lt_cv_deplibs_check_method=pass_all
351532001f49Smrg  fi
351632001f49Smrg  ;;
351732001f49Smrg
351832001f49Smrghaiku*)
351932001f49Smrg  lt_cv_deplibs_check_method=pass_all
352032001f49Smrg  ;;
352132001f49Smrg
352232001f49Smrghpux10.20* | hpux11*)
352332001f49Smrg  lt_cv_file_magic_cmd=/usr/bin/file
352432001f49Smrg  case $host_cpu in
352532001f49Smrg  ia64*)
352632001f49Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
352732001f49Smrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
352832001f49Smrg    ;;
352932001f49Smrg  hppa*64*)
353032001f49Smrg    [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]']
353132001f49Smrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
353232001f49Smrg    ;;
353332001f49Smrg  *)
353432001f49Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
353532001f49Smrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
353632001f49Smrg    ;;
353732001f49Smrg  esac
353832001f49Smrg  ;;
353932001f49Smrg
354032001f49Smrginterix[[3-9]]*)
354132001f49Smrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
354232001f49Smrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
354332001f49Smrg  ;;
354432001f49Smrg
354532001f49Smrgirix5* | irix6* | nonstopux*)
354632001f49Smrg  case $LD in
354732001f49Smrg  *-32|*"-32 ") libmagic=32-bit;;
354832001f49Smrg  *-n32|*"-n32 ") libmagic=N32;;
354932001f49Smrg  *-64|*"-64 ") libmagic=64-bit;;
355032001f49Smrg  *) libmagic=never-match;;
355132001f49Smrg  esac
355232001f49Smrg  lt_cv_deplibs_check_method=pass_all
355332001f49Smrg  ;;
355432001f49Smrg
355532001f49Smrg# This must be glibc/ELF.
355632001f49Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
355732001f49Smrg  lt_cv_deplibs_check_method=pass_all
355832001f49Smrg  ;;
355932001f49Smrg
356032001f49Smrgnetbsd* | netbsdelf*-gnu)
356132001f49Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
356232001f49Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
356332001f49Smrg  else
356432001f49Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
356532001f49Smrg  fi
356632001f49Smrg  ;;
356732001f49Smrg
356832001f49Smrgnewos6*)
356932001f49Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
357032001f49Smrg  lt_cv_file_magic_cmd=/usr/bin/file
357132001f49Smrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
357232001f49Smrg  ;;
357332001f49Smrg
357432001f49Smrg*nto* | *qnx*)
357532001f49Smrg  lt_cv_deplibs_check_method=pass_all
357632001f49Smrg  ;;
357732001f49Smrg
35787ec3b29aSmrgopenbsd* | bitrig*)
35797ec3b29aSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
358032001f49Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
358132001f49Smrg  else
358232001f49Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
358332001f49Smrg  fi
358432001f49Smrg  ;;
358532001f49Smrg
358632001f49Smrgosf3* | osf4* | osf5*)
358732001f49Smrg  lt_cv_deplibs_check_method=pass_all
358832001f49Smrg  ;;
358932001f49Smrg
359032001f49Smrgrdos*)
359132001f49Smrg  lt_cv_deplibs_check_method=pass_all
359232001f49Smrg  ;;
359332001f49Smrg
359432001f49Smrgsolaris*)
359532001f49Smrg  lt_cv_deplibs_check_method=pass_all
359632001f49Smrg  ;;
359732001f49Smrg
359832001f49Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
359932001f49Smrg  lt_cv_deplibs_check_method=pass_all
360032001f49Smrg  ;;
360132001f49Smrg
360232001f49Smrgsysv4 | sysv4.3*)
360332001f49Smrg  case $host_vendor in
360432001f49Smrg  motorola)
360532001f49Smrg    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]]'
360632001f49Smrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
360732001f49Smrg    ;;
360832001f49Smrg  ncr)
360932001f49Smrg    lt_cv_deplibs_check_method=pass_all
361032001f49Smrg    ;;
361132001f49Smrg  sequent)
361232001f49Smrg    lt_cv_file_magic_cmd='/bin/file'
361332001f49Smrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
361432001f49Smrg    ;;
361532001f49Smrg  sni)
361632001f49Smrg    lt_cv_file_magic_cmd='/bin/file'
361732001f49Smrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
361832001f49Smrg    lt_cv_file_magic_test_file=/lib/libc.so
361932001f49Smrg    ;;
362032001f49Smrg  siemens)
362132001f49Smrg    lt_cv_deplibs_check_method=pass_all
362232001f49Smrg    ;;
362332001f49Smrg  pc)
362432001f49Smrg    lt_cv_deplibs_check_method=pass_all
362532001f49Smrg    ;;
362632001f49Smrg  esac
362732001f49Smrg  ;;
362832001f49Smrg
362932001f49Smrgtpf*)
363032001f49Smrg  lt_cv_deplibs_check_method=pass_all
363132001f49Smrg  ;;
36327ec3b29aSmrgos2*)
36337ec3b29aSmrg  lt_cv_deplibs_check_method=pass_all
36347ec3b29aSmrg  ;;
363532001f49Smrgesac
363632001f49Smrg])
363732001f49Smrg
363832001f49Smrgfile_magic_glob=
363932001f49Smrgwant_nocaseglob=no
364032001f49Smrgif test "$build" = "$host"; then
364132001f49Smrg  case $host_os in
364232001f49Smrg  mingw* | pw32*)
364332001f49Smrg    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
364432001f49Smrg      want_nocaseglob=yes
364532001f49Smrg    else
364632001f49Smrg      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
364732001f49Smrg    fi
364832001f49Smrg    ;;
364932001f49Smrg  esac
365032001f49Smrgfi
365132001f49Smrg
365232001f49Smrgfile_magic_cmd=$lt_cv_file_magic_cmd
365332001f49Smrgdeplibs_check_method=$lt_cv_deplibs_check_method
365432001f49Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
365532001f49Smrg
365632001f49Smrg_LT_DECL([], [deplibs_check_method], [1],
365732001f49Smrg    [Method to check whether dependent libraries are shared objects])
365832001f49Smrg_LT_DECL([], [file_magic_cmd], [1],
365932001f49Smrg    [Command to use when deplibs_check_method = "file_magic"])
366032001f49Smrg_LT_DECL([], [file_magic_glob], [1],
366132001f49Smrg    [How to find potential files when deplibs_check_method = "file_magic"])
366232001f49Smrg_LT_DECL([], [want_nocaseglob], [1],
366332001f49Smrg    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
366432001f49Smrg])# _LT_CHECK_MAGIC_METHOD
366532001f49Smrg
366632001f49Smrg
366732001f49Smrg# LT_PATH_NM
366832001f49Smrg# ----------
366932001f49Smrg# find the pathname to a BSD- or MS-compatible name lister
367032001f49SmrgAC_DEFUN([LT_PATH_NM],
367132001f49Smrg[AC_REQUIRE([AC_PROG_CC])dnl
367232001f49SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
367332001f49Smrg[if test -n "$NM"; then
367432001f49Smrg  # Let the user override the test.
36757ec3b29aSmrg  lt_cv_path_NM=$NM
367632001f49Smrgelse
36777ec3b29aSmrg  lt_nm_to_check=${ac_tool_prefix}nm
367832001f49Smrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
367932001f49Smrg    lt_nm_to_check="$lt_nm_to_check nm"
368032001f49Smrg  fi
368132001f49Smrg  for lt_tmp_nm in $lt_nm_to_check; do
36827ec3b29aSmrg    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
368332001f49Smrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
36847ec3b29aSmrg      IFS=$lt_save_ifs
368532001f49Smrg      test -z "$ac_dir" && ac_dir=.
36867ec3b29aSmrg      tmp_nm=$ac_dir/$lt_tmp_nm
36877ec3b29aSmrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
368832001f49Smrg	# Check to see if the nm accepts a BSD-compat flag.
36897ec3b29aSmrg	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
369032001f49Smrg	#   nm: unknown option "B" ignored
369132001f49Smrg	# Tru64's nm complains that /dev/null is an invalid object file
36927ec3b29aSmrg	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
36937ec3b29aSmrg	case $build_os in
36947ec3b29aSmrg	mingw*) lt_bad_file=conftest.nm/nofile ;;
36957ec3b29aSmrg	*) lt_bad_file=/dev/null ;;
36967ec3b29aSmrg	esac
36977ec3b29aSmrg	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
36987ec3b29aSmrg	*$lt_bad_file* | *'Invalid file or object type'*)
369932001f49Smrg	  lt_cv_path_NM="$tmp_nm -B"
37007ec3b29aSmrg	  break 2
370132001f49Smrg	  ;;
370232001f49Smrg	*)
370332001f49Smrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
370432001f49Smrg	  */dev/null*)
370532001f49Smrg	    lt_cv_path_NM="$tmp_nm -p"
37067ec3b29aSmrg	    break 2
370732001f49Smrg	    ;;
370832001f49Smrg	  *)
370932001f49Smrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
371032001f49Smrg	    continue # so that we can try to find one that supports BSD flags
371132001f49Smrg	    ;;
371232001f49Smrg	  esac
371332001f49Smrg	  ;;
371432001f49Smrg	esac
371532001f49Smrg      fi
371632001f49Smrg    done
37177ec3b29aSmrg    IFS=$lt_save_ifs
371832001f49Smrg  done
371932001f49Smrg  : ${lt_cv_path_NM=no}
372032001f49Smrgfi])
37217ec3b29aSmrgif test no != "$lt_cv_path_NM"; then
37227ec3b29aSmrg  NM=$lt_cv_path_NM
372332001f49Smrgelse
372432001f49Smrg  # Didn't find any BSD compatible name lister, look for dumpbin.
372532001f49Smrg  if test -n "$DUMPBIN"; then :
372632001f49Smrg    # Let the user override the test.
372732001f49Smrg  else
372832001f49Smrg    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
37297ec3b29aSmrg    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
373032001f49Smrg    *COFF*)
37317ec3b29aSmrg      DUMPBIN="$DUMPBIN -symbols -headers"
373232001f49Smrg      ;;
373332001f49Smrg    *)
373432001f49Smrg      DUMPBIN=:
373532001f49Smrg      ;;
373632001f49Smrg    esac
373732001f49Smrg  fi
373832001f49Smrg  AC_SUBST([DUMPBIN])
37397ec3b29aSmrg  if test : != "$DUMPBIN"; then
37407ec3b29aSmrg    NM=$DUMPBIN
374132001f49Smrg  fi
374232001f49Smrgfi
374332001f49Smrgtest -z "$NM" && NM=nm
374432001f49SmrgAC_SUBST([NM])
374532001f49Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
374632001f49Smrg
374732001f49SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
374832001f49Smrg  [lt_cv_nm_interface="BSD nm"
374932001f49Smrg  echo "int some_variable = 0;" > conftest.$ac_ext
375032001f49Smrg  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
375132001f49Smrg  (eval "$ac_compile" 2>conftest.err)
375232001f49Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
375332001f49Smrg  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
375432001f49Smrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
375532001f49Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
375632001f49Smrg  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
375732001f49Smrg  cat conftest.out >&AS_MESSAGE_LOG_FD
375832001f49Smrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
375932001f49Smrg    lt_cv_nm_interface="MS dumpbin"
376032001f49Smrg  fi
376132001f49Smrg  rm -f conftest*])
376232001f49Smrg])# LT_PATH_NM
376332001f49Smrg
376432001f49Smrg# Old names:
376532001f49SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
376632001f49SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
376732001f49Smrgdnl aclocal-1.4 backwards compatibility:
376832001f49Smrgdnl AC_DEFUN([AM_PROG_NM], [])
376932001f49Smrgdnl AC_DEFUN([AC_PROG_NM], [])
377032001f49Smrg
377132001f49Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
377232001f49Smrg# --------------------------------
377332001f49Smrg# how to determine the name of the shared library
377432001f49Smrg# associated with a specific link library.
377532001f49Smrg#  -- PORTME fill in with the dynamic library characteristics
377632001f49Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
377732001f49Smrg[m4_require([_LT_DECL_EGREP])
377832001f49Smrgm4_require([_LT_DECL_OBJDUMP])
377932001f49Smrgm4_require([_LT_DECL_DLLTOOL])
378032001f49SmrgAC_CACHE_CHECK([how to associate runtime and link libraries],
378132001f49Smrglt_cv_sharedlib_from_linklib_cmd,
378232001f49Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown'
378332001f49Smrg
378432001f49Smrgcase $host_os in
378532001f49Smrgcygwin* | mingw* | pw32* | cegcc*)
37867ec3b29aSmrg  # two different shell functions defined in ltmain.sh;
37877ec3b29aSmrg  # decide which one to use based on capabilities of $DLLTOOL
378832001f49Smrg  case `$DLLTOOL --help 2>&1` in
378932001f49Smrg  *--identify-strict*)
379032001f49Smrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
379132001f49Smrg    ;;
379232001f49Smrg  *)
379332001f49Smrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
379432001f49Smrg    ;;
379532001f49Smrg  esac
379632001f49Smrg  ;;
379732001f49Smrg*)
379832001f49Smrg  # fallback: assume linklib IS sharedlib
37997ec3b29aSmrg  lt_cv_sharedlib_from_linklib_cmd=$ECHO
380032001f49Smrg  ;;
380132001f49Smrgesac
380232001f49Smrg])
380332001f49Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
380432001f49Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
380532001f49Smrg
380632001f49Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
380732001f49Smrg    [Command to associate shared and link libraries])
380832001f49Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
380932001f49Smrg
381032001f49Smrg
381132001f49Smrg# _LT_PATH_MANIFEST_TOOL
381232001f49Smrg# ----------------------
381332001f49Smrg# locate the manifest tool
381432001f49Smrgm4_defun([_LT_PATH_MANIFEST_TOOL],
381532001f49Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
381632001f49Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
381732001f49SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
381832001f49Smrg  [lt_cv_path_mainfest_tool=no
381932001f49Smrg  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
382032001f49Smrg  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
382132001f49Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
382232001f49Smrg  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
382332001f49Smrg    lt_cv_path_mainfest_tool=yes
382432001f49Smrg  fi
382532001f49Smrg  rm -f conftest*])
38267ec3b29aSmrgif test yes != "$lt_cv_path_mainfest_tool"; then
382732001f49Smrg  MANIFEST_TOOL=:
382832001f49Smrgfi
382932001f49Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
383032001f49Smrg])# _LT_PATH_MANIFEST_TOOL
383132001f49Smrg
383232001f49Smrg
38337ec3b29aSmrg# _LT_DLL_DEF_P([FILE])
38347ec3b29aSmrg# ---------------------
38357ec3b29aSmrg# True iff FILE is a Windows DLL '.def' file.
38367ec3b29aSmrg# Keep in sync with func_dll_def_p in the libtool script
38377ec3b29aSmrgAC_DEFUN([_LT_DLL_DEF_P],
38387ec3b29aSmrg[dnl
38397ec3b29aSmrg  test DEF = "`$SED -n dnl
38407ec3b29aSmrg    -e '\''s/^[[	 ]]*//'\'' dnl Strip leading whitespace
38417ec3b29aSmrg    -e '\''/^\(;.*\)*$/d'\'' dnl      Delete empty lines and comments
38427ec3b29aSmrg    -e '\''s/^\(EXPORTS\|LIBRARY\)\([[	 ]].*\)*$/DEF/p'\'' dnl
38437ec3b29aSmrg    -e q dnl                          Only consider the first "real" line
38447ec3b29aSmrg    $1`" dnl
38457ec3b29aSmrg])# _LT_DLL_DEF_P
38467ec3b29aSmrg
38477ec3b29aSmrg
384832001f49Smrg# LT_LIB_M
384932001f49Smrg# --------
385032001f49Smrg# check for math library
385132001f49SmrgAC_DEFUN([LT_LIB_M],
385232001f49Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
385332001f49SmrgLIBM=
385432001f49Smrgcase $host in
385532001f49Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
385632001f49Smrg  # These system don't have libm, or don't need it
385732001f49Smrg  ;;
385832001f49Smrg*-ncr-sysv4.3*)
38597ec3b29aSmrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
386032001f49Smrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
386132001f49Smrg  ;;
386232001f49Smrg*)
38637ec3b29aSmrg  AC_CHECK_LIB(m, cos, LIBM=-lm)
386432001f49Smrg  ;;
386532001f49Smrgesac
386632001f49SmrgAC_SUBST([LIBM])
386732001f49Smrg])# LT_LIB_M
386832001f49Smrg
386932001f49Smrg# Old name:
387032001f49SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
387132001f49Smrgdnl aclocal-1.4 backwards compatibility:
387232001f49Smrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
387332001f49Smrg
387432001f49Smrg
387532001f49Smrg# _LT_COMPILER_NO_RTTI([TAGNAME])
387632001f49Smrg# -------------------------------
387732001f49Smrgm4_defun([_LT_COMPILER_NO_RTTI],
387832001f49Smrg[m4_require([_LT_TAG_COMPILER])dnl
387932001f49Smrg
388032001f49Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
388132001f49Smrg
38827ec3b29aSmrgif test yes = "$GCC"; then
388332001f49Smrg  case $cc_basename in
388432001f49Smrg  nvcc*)
388532001f49Smrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
388632001f49Smrg  *)
388732001f49Smrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
388832001f49Smrg  esac
388932001f49Smrg
389032001f49Smrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
389132001f49Smrg    lt_cv_prog_compiler_rtti_exceptions,
389232001f49Smrg    [-fno-rtti -fno-exceptions], [],
389332001f49Smrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
389432001f49Smrgfi
389532001f49Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
389632001f49Smrg	[Compiler flag to turn off builtin functions])
389732001f49Smrg])# _LT_COMPILER_NO_RTTI
389832001f49Smrg
389932001f49Smrg
390032001f49Smrg# _LT_CMD_GLOBAL_SYMBOLS
390132001f49Smrg# ----------------------
390232001f49Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
390332001f49Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
390432001f49SmrgAC_REQUIRE([AC_PROG_CC])dnl
390532001f49SmrgAC_REQUIRE([AC_PROG_AWK])dnl
390632001f49SmrgAC_REQUIRE([LT_PATH_NM])dnl
390732001f49SmrgAC_REQUIRE([LT_PATH_LD])dnl
390832001f49Smrgm4_require([_LT_DECL_SED])dnl
390932001f49Smrgm4_require([_LT_DECL_EGREP])dnl
391032001f49Smrgm4_require([_LT_TAG_COMPILER])dnl
391132001f49Smrg
391232001f49Smrg# Check for command to grab the raw symbol name followed by C symbol from nm.
391332001f49SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
391432001f49SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
391532001f49Smrg[
391632001f49Smrg# These are sane defaults that work on at least a few old systems.
391732001f49Smrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
391832001f49Smrg
391932001f49Smrg# Character class describing NM global symbol codes.
392032001f49Smrgsymcode='[[BCDEGRST]]'
392132001f49Smrg
392232001f49Smrg# Regexp to match symbols that can be accessed directly from C.
392332001f49Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
392432001f49Smrg
392532001f49Smrg# Define system-specific variables.
392632001f49Smrgcase $host_os in
392732001f49Smrgaix*)
392832001f49Smrg  symcode='[[BCDT]]'
392932001f49Smrg  ;;
393032001f49Smrgcygwin* | mingw* | pw32* | cegcc*)
393132001f49Smrg  symcode='[[ABCDGISTW]]'
393232001f49Smrg  ;;
393332001f49Smrghpux*)
39347ec3b29aSmrg  if test ia64 = "$host_cpu"; then
393532001f49Smrg    symcode='[[ABCDEGRST]]'
393632001f49Smrg  fi
393732001f49Smrg  ;;
393832001f49Smrgirix* | nonstopux*)
393932001f49Smrg  symcode='[[BCDEGRST]]'
394032001f49Smrg  ;;
394132001f49Smrgosf*)
394232001f49Smrg  symcode='[[BCDEGQRST]]'
394332001f49Smrg  ;;
394432001f49Smrgsolaris*)
394532001f49Smrg  symcode='[[BDRT]]'
394632001f49Smrg  ;;
394732001f49Smrgsco3.2v5*)
394832001f49Smrg  symcode='[[DT]]'
394932001f49Smrg  ;;
395032001f49Smrgsysv4.2uw2*)
395132001f49Smrg  symcode='[[DT]]'
395232001f49Smrg  ;;
395332001f49Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
395432001f49Smrg  symcode='[[ABDT]]'
395532001f49Smrg  ;;
395632001f49Smrgsysv4)
395732001f49Smrg  symcode='[[DFNSTU]]'
395832001f49Smrg  ;;
395932001f49Smrgesac
396032001f49Smrg
396132001f49Smrg# If we're using GNU nm, then use its standard symbol codes.
396232001f49Smrgcase `$NM -V 2>&1` in
396332001f49Smrg*GNU* | *'with BFD'*)
396432001f49Smrg  symcode='[[ABCDGIRSTW]]' ;;
396532001f49Smrgesac
396632001f49Smrg
39677ec3b29aSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
39687ec3b29aSmrg  # Gets list of data symbols to import.
39697ec3b29aSmrg  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
39707ec3b29aSmrg  # Adjust the below global symbol transforms to fixup imported variables.
39717ec3b29aSmrg  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
39727ec3b29aSmrg  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
39737ec3b29aSmrg  lt_c_name_lib_hook="\
39747ec3b29aSmrg  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
39757ec3b29aSmrg  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
39767ec3b29aSmrgelse
39777ec3b29aSmrg  # Disable hooks by default.
39787ec3b29aSmrg  lt_cv_sys_global_symbol_to_import=
39797ec3b29aSmrg  lt_cdecl_hook=
39807ec3b29aSmrg  lt_c_name_hook=
39817ec3b29aSmrg  lt_c_name_lib_hook=
39827ec3b29aSmrgfi
39837ec3b29aSmrg
398432001f49Smrg# Transform an extracted symbol line into a proper C declaration.
398532001f49Smrg# Some systems (esp. on ia64) link data and code symbols differently,
398632001f49Smrg# so use this general approach.
39877ec3b29aSmrglt_cv_sys_global_symbol_to_cdecl="sed -n"\
39887ec3b29aSmrg$lt_cdecl_hook\
39897ec3b29aSmrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
39907ec3b29aSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
399132001f49Smrg
399232001f49Smrg# Transform an extracted symbol line into symbol name and symbol address
39937ec3b29aSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n"\
39947ec3b29aSmrg$lt_c_name_hook\
39957ec3b29aSmrg" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
39967ec3b29aSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
39977ec3b29aSmrg
39987ec3b29aSmrg# Transform an extracted symbol line into symbol name with lib prefix and
39997ec3b29aSmrg# symbol address.
40007ec3b29aSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
40017ec3b29aSmrg$lt_c_name_lib_hook\
40027ec3b29aSmrg" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
40037ec3b29aSmrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
40047ec3b29aSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
400532001f49Smrg
400632001f49Smrg# Handle CRLF in mingw tool chain
400732001f49Smrgopt_cr=
400832001f49Smrgcase $build_os in
400932001f49Smrgmingw*)
401032001f49Smrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
401132001f49Smrg  ;;
401232001f49Smrgesac
401332001f49Smrg
401432001f49Smrg# Try without a prefix underscore, then with it.
401532001f49Smrgfor ac_symprfx in "" "_"; do
401632001f49Smrg
401732001f49Smrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
401832001f49Smrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
401932001f49Smrg
402032001f49Smrg  # Write the raw and C identifiers.
402132001f49Smrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
40227ec3b29aSmrg    # Fake it for dumpbin and say T for any non-static function,
40237ec3b29aSmrg    # D for any global variable and I for any imported variable.
402432001f49Smrg    # Also find C++ and __fastcall symbols from MSVC++,
402532001f49Smrg    # which start with @ or ?.
402632001f49Smrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
402732001f49Smrg"     {last_section=section; section=\$ 3};"\
402832001f49Smrg"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
402932001f49Smrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
40307ec3b29aSmrg"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
40317ec3b29aSmrg"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
40327ec3b29aSmrg"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
403332001f49Smrg"     \$ 0!~/External *\|/{next};"\
403432001f49Smrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
403532001f49Smrg"     {if(hide[section]) next};"\
40367ec3b29aSmrg"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
40377ec3b29aSmrg"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
40387ec3b29aSmrg"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
40397ec3b29aSmrg"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
404032001f49Smrg"     ' prfx=^$ac_symprfx]"
404132001f49Smrg  else
404232001f49Smrg    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
404332001f49Smrg  fi
404432001f49Smrg  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
404532001f49Smrg
404632001f49Smrg  # Check to see that the pipe works correctly.
404732001f49Smrg  pipe_works=no
404832001f49Smrg
404932001f49Smrg  rm -f conftest*
405032001f49Smrg  cat > conftest.$ac_ext <<_LT_EOF
405132001f49Smrg#ifdef __cplusplus
405232001f49Smrgextern "C" {
405332001f49Smrg#endif
405432001f49Smrgchar nm_test_var;
405532001f49Smrgvoid nm_test_func(void);
405632001f49Smrgvoid nm_test_func(void){}
405732001f49Smrg#ifdef __cplusplus
405832001f49Smrg}
405932001f49Smrg#endif
406032001f49Smrgint main(){nm_test_var='a';nm_test_func();return(0);}
406132001f49Smrg_LT_EOF
406232001f49Smrg
406332001f49Smrg  if AC_TRY_EVAL(ac_compile); then
406432001f49Smrg    # Now try to grab the symbols.
406532001f49Smrg    nlist=conftest.nm
406632001f49Smrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
406732001f49Smrg      # Try sorting and uniquifying the output.
406832001f49Smrg      if sort "$nlist" | uniq > "$nlist"T; then
406932001f49Smrg	mv -f "$nlist"T "$nlist"
407032001f49Smrg      else
407132001f49Smrg	rm -f "$nlist"T
407232001f49Smrg      fi
407332001f49Smrg
407432001f49Smrg      # Make sure that we snagged all the symbols we need.
407532001f49Smrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
407632001f49Smrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
407732001f49Smrg	  cat <<_LT_EOF > conftest.$ac_ext
407832001f49Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
40797ec3b29aSmrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
40807ec3b29aSmrg/* DATA imports from DLLs on WIN32 can't be const, because runtime
408132001f49Smrg   relocations are performed -- see ld's documentation on pseudo-relocs.  */
408232001f49Smrg# define LT@&t@_DLSYM_CONST
40837ec3b29aSmrg#elif defined __osf__
408432001f49Smrg/* This system does not cope well with relocations in const data.  */
408532001f49Smrg# define LT@&t@_DLSYM_CONST
408632001f49Smrg#else
408732001f49Smrg# define LT@&t@_DLSYM_CONST const
408832001f49Smrg#endif
408932001f49Smrg
409032001f49Smrg#ifdef __cplusplus
409132001f49Smrgextern "C" {
409232001f49Smrg#endif
409332001f49Smrg
409432001f49Smrg_LT_EOF
409532001f49Smrg	  # Now generate the symbol file.
409632001f49Smrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
409732001f49Smrg
409832001f49Smrg	  cat <<_LT_EOF >> conftest.$ac_ext
409932001f49Smrg
410032001f49Smrg/* The mapping between symbol names and symbols.  */
410132001f49SmrgLT@&t@_DLSYM_CONST struct {
410232001f49Smrg  const char *name;
410332001f49Smrg  void       *address;
410432001f49Smrg}
410532001f49Smrglt__PROGRAM__LTX_preloaded_symbols[[]] =
410632001f49Smrg{
410732001f49Smrg  { "@PROGRAM@", (void *) 0 },
410832001f49Smrg_LT_EOF
41097ec3b29aSmrg	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
411032001f49Smrg	  cat <<\_LT_EOF >> conftest.$ac_ext
411132001f49Smrg  {0, (void *) 0}
411232001f49Smrg};
411332001f49Smrg
411432001f49Smrg/* This works around a problem in FreeBSD linker */
411532001f49Smrg#ifdef FREEBSD_WORKAROUND
411632001f49Smrgstatic const void *lt_preloaded_setup() {
411732001f49Smrg  return lt__PROGRAM__LTX_preloaded_symbols;
411832001f49Smrg}
411932001f49Smrg#endif
412032001f49Smrg
412132001f49Smrg#ifdef __cplusplus
412232001f49Smrg}
412332001f49Smrg#endif
412432001f49Smrg_LT_EOF
412532001f49Smrg	  # Now try linking the two files.
412632001f49Smrg	  mv conftest.$ac_objext conftstm.$ac_objext
412732001f49Smrg	  lt_globsym_save_LIBS=$LIBS
412832001f49Smrg	  lt_globsym_save_CFLAGS=$CFLAGS
41297ec3b29aSmrg	  LIBS=conftstm.$ac_objext
413032001f49Smrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
41317ec3b29aSmrg	  if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
413232001f49Smrg	    pipe_works=yes
413332001f49Smrg	  fi
413432001f49Smrg	  LIBS=$lt_globsym_save_LIBS
413532001f49Smrg	  CFLAGS=$lt_globsym_save_CFLAGS
413632001f49Smrg	else
413732001f49Smrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
413832001f49Smrg	fi
413932001f49Smrg      else
414032001f49Smrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
414132001f49Smrg      fi
414232001f49Smrg    else
414332001f49Smrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
414432001f49Smrg    fi
414532001f49Smrg  else
414632001f49Smrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
414732001f49Smrg    cat conftest.$ac_ext >&5
414832001f49Smrg  fi
414932001f49Smrg  rm -rf conftest* conftst*
415032001f49Smrg
415132001f49Smrg  # Do not use the global_symbol_pipe unless it works.
41527ec3b29aSmrg  if test yes = "$pipe_works"; then
415332001f49Smrg    break
415432001f49Smrg  else
415532001f49Smrg    lt_cv_sys_global_symbol_pipe=
415632001f49Smrg  fi
415732001f49Smrgdone
415832001f49Smrg])
415932001f49Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
416032001f49Smrg  lt_cv_sys_global_symbol_to_cdecl=
416132001f49Smrgfi
416232001f49Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
416332001f49Smrg  AC_MSG_RESULT(failed)
416432001f49Smrgelse
416532001f49Smrg  AC_MSG_RESULT(ok)
416632001f49Smrgfi
416732001f49Smrg
416832001f49Smrg# Response file support.
416932001f49Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
417032001f49Smrg  nm_file_list_spec='@'
417132001f49Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
417232001f49Smrg  nm_file_list_spec='@'
417332001f49Smrgfi
417432001f49Smrg
417532001f49Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
417632001f49Smrg    [Take the output of nm and produce a listing of raw symbols and C names])
417732001f49Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
417832001f49Smrg    [Transform the output of nm in a proper C declaration])
41797ec3b29aSmrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
41807ec3b29aSmrg    [Transform the output of nm into a list of symbols to manually relocate])
418132001f49Smrg_LT_DECL([global_symbol_to_c_name_address],
418232001f49Smrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
418332001f49Smrg    [Transform the output of nm in a C name address pair])
418432001f49Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
418532001f49Smrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
418632001f49Smrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
41877ec3b29aSmrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
41887ec3b29aSmrg    [The name lister interface])
418932001f49Smrg_LT_DECL([], [nm_file_list_spec], [1],
419032001f49Smrg    [Specify filename containing input files for $NM])
419132001f49Smrg]) # _LT_CMD_GLOBAL_SYMBOLS
419232001f49Smrg
419332001f49Smrg
419432001f49Smrg# _LT_COMPILER_PIC([TAGNAME])
419532001f49Smrg# ---------------------------
419632001f49Smrgm4_defun([_LT_COMPILER_PIC],
419732001f49Smrg[m4_require([_LT_TAG_COMPILER])dnl
419832001f49Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
419932001f49Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
420032001f49Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
420132001f49Smrg
420232001f49Smrgm4_if([$1], [CXX], [
420332001f49Smrg  # C++ specific cases for pic, static, wl, etc.
42047ec3b29aSmrg  if test yes = "$GXX"; then
420532001f49Smrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
420632001f49Smrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
420732001f49Smrg
420832001f49Smrg    case $host_os in
420932001f49Smrg    aix*)
421032001f49Smrg      # All AIX code is PIC.
42117ec3b29aSmrg      if test ia64 = "$host_cpu"; then
421232001f49Smrg	# AIX 5 now supports IA64 processor
421332001f49Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
421432001f49Smrg      fi
42157ec3b29aSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
421632001f49Smrg      ;;
421732001f49Smrg
421832001f49Smrg    amigaos*)
421932001f49Smrg      case $host_cpu in
422032001f49Smrg      powerpc)
422132001f49Smrg            # see comment about AmigaOS4 .so support
422232001f49Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
422332001f49Smrg        ;;
422432001f49Smrg      m68k)
422532001f49Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
42267ec3b29aSmrg            # adding the '-m68020' flag to GCC prevents building anything better,
42277ec3b29aSmrg            # like '-m68040'.
422832001f49Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
422932001f49Smrg        ;;
423032001f49Smrg      esac
423132001f49Smrg      ;;
423232001f49Smrg
423332001f49Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
423432001f49Smrg      # PIC is the default for these OSes.
423532001f49Smrg      ;;
423632001f49Smrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
423732001f49Smrg      # This hack is so that the source file can tell whether it is being
423832001f49Smrg      # built for inclusion in a dll (and should export symbols for example).
423932001f49Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
424032001f49Smrg      # (--disable-auto-import) libraries
424132001f49Smrg      m4_if([$1], [GCJ], [],
424232001f49Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
42437ec3b29aSmrg      case $host_os in
42447ec3b29aSmrg      os2*)
42457ec3b29aSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
42467ec3b29aSmrg	;;
42477ec3b29aSmrg      esac
424832001f49Smrg      ;;
424932001f49Smrg    darwin* | rhapsody*)
425032001f49Smrg      # PIC is the default on this platform
425132001f49Smrg      # Common symbols not allowed in MH_DYLIB files
425232001f49Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
425332001f49Smrg      ;;
425432001f49Smrg    *djgpp*)
425532001f49Smrg      # DJGPP does not support shared libraries at all
425632001f49Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
425732001f49Smrg      ;;
425832001f49Smrg    haiku*)
425932001f49Smrg      # PIC is the default for Haiku.
426032001f49Smrg      # The "-static" flag exists, but is broken.
426132001f49Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
426232001f49Smrg      ;;
426332001f49Smrg    interix[[3-9]]*)
426432001f49Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
426532001f49Smrg      # Instead, we relocate shared libraries at runtime.
426632001f49Smrg      ;;
426732001f49Smrg    sysv4*MP*)
426832001f49Smrg      if test -d /usr/nec; then
426932001f49Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
427032001f49Smrg      fi
427132001f49Smrg      ;;
427232001f49Smrg    hpux*)
427332001f49Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
427432001f49Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
427532001f49Smrg      # sets the default TLS model and affects inlining.
427632001f49Smrg      case $host_cpu in
427732001f49Smrg      hppa*64*)
427832001f49Smrg	;;
427932001f49Smrg      *)
428032001f49Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
428132001f49Smrg	;;
428232001f49Smrg      esac
428332001f49Smrg      ;;
428432001f49Smrg    *qnx* | *nto*)
428532001f49Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
428632001f49Smrg      # it will coredump.
428732001f49Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
428832001f49Smrg      ;;
428932001f49Smrg    *)
429032001f49Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
429132001f49Smrg      ;;
429232001f49Smrg    esac
429332001f49Smrg  else
429432001f49Smrg    case $host_os in
429532001f49Smrg      aix[[4-9]]*)
429632001f49Smrg	# All AIX code is PIC.
42977ec3b29aSmrg	if test ia64 = "$host_cpu"; then
429832001f49Smrg	  # AIX 5 now supports IA64 processor
429932001f49Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
430032001f49Smrg	else
430132001f49Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
430232001f49Smrg	fi
430332001f49Smrg	;;
430432001f49Smrg      chorus*)
430532001f49Smrg	case $cc_basename in
430632001f49Smrg	cxch68*)
430732001f49Smrg	  # Green Hills C++ Compiler
430832001f49Smrg	  # _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"
430932001f49Smrg	  ;;
431032001f49Smrg	esac
431132001f49Smrg	;;
431232001f49Smrg      mingw* | cygwin* | os2* | pw32* | cegcc*)
431332001f49Smrg	# This hack is so that the source file can tell whether it is being
431432001f49Smrg	# built for inclusion in a dll (and should export symbols for example).
431532001f49Smrg	m4_if([$1], [GCJ], [],
431632001f49Smrg	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
431732001f49Smrg	;;
431832001f49Smrg      dgux*)
431932001f49Smrg	case $cc_basename in
432032001f49Smrg	  ec++*)
432132001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
432232001f49Smrg	    ;;
432332001f49Smrg	  ghcx*)
432432001f49Smrg	    # Green Hills C++ Compiler
432532001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
432632001f49Smrg	    ;;
432732001f49Smrg	  *)
432832001f49Smrg	    ;;
432932001f49Smrg	esac
433032001f49Smrg	;;
433132001f49Smrg      freebsd* | dragonfly*)
433232001f49Smrg	# FreeBSD uses GNU C++
433332001f49Smrg	;;
433432001f49Smrg      hpux9* | hpux10* | hpux11*)
433532001f49Smrg	case $cc_basename in
433632001f49Smrg	  CC*)
433732001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43387ec3b29aSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
43397ec3b29aSmrg	    if test ia64 != "$host_cpu"; then
434032001f49Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
434132001f49Smrg	    fi
434232001f49Smrg	    ;;
434332001f49Smrg	  aCC*)
434432001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43457ec3b29aSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
434632001f49Smrg	    case $host_cpu in
434732001f49Smrg	    hppa*64*|ia64*)
434832001f49Smrg	      # +Z the default
434932001f49Smrg	      ;;
435032001f49Smrg	    *)
435132001f49Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
435232001f49Smrg	      ;;
435332001f49Smrg	    esac
435432001f49Smrg	    ;;
435532001f49Smrg	  *)
435632001f49Smrg	    ;;
435732001f49Smrg	esac
435832001f49Smrg	;;
435932001f49Smrg      interix*)
436032001f49Smrg	# This is c89, which is MS Visual C++ (no shared libs)
436132001f49Smrg	# Anyone wants to do a port?
436232001f49Smrg	;;
436332001f49Smrg      irix5* | irix6* | nonstopux*)
436432001f49Smrg	case $cc_basename in
436532001f49Smrg	  CC*)
436632001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
436732001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
436832001f49Smrg	    # CC pic flag -KPIC is the default.
436932001f49Smrg	    ;;
437032001f49Smrg	  *)
437132001f49Smrg	    ;;
437232001f49Smrg	esac
437332001f49Smrg	;;
437432001f49Smrg      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
437532001f49Smrg	case $cc_basename in
437632001f49Smrg	  KCC*)
437732001f49Smrg	    # KAI C++ Compiler
437832001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
437932001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
438032001f49Smrg	    ;;
438132001f49Smrg	  ecpc* )
43827ec3b29aSmrg	    # old Intel C++ for x86_64, which still supported -KPIC.
438332001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
438432001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
438532001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
438632001f49Smrg	    ;;
438732001f49Smrg	  icpc* )
438832001f49Smrg	    # Intel C++, used to be incompatible with GCC.
438932001f49Smrg	    # ICC 10 doesn't accept -KPIC any more.
439032001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
439132001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
439232001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
439332001f49Smrg	    ;;
439432001f49Smrg	  pgCC* | pgcpp*)
439532001f49Smrg	    # Portland Group C++ compiler
439632001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
439732001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
439832001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
439932001f49Smrg	    ;;
440032001f49Smrg	  cxx*)
440132001f49Smrg	    # Compaq C++
440232001f49Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
440332001f49Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
440432001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
440532001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
440632001f49Smrg	    ;;
440732001f49Smrg	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
440832001f49Smrg	    # IBM XL 8.0, 9.0 on PPC and BlueGene
440932001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
441032001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
441132001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
441232001f49Smrg	    ;;
441332001f49Smrg	  *)
441432001f49Smrg	    case `$CC -V 2>&1 | sed 5q` in
441532001f49Smrg	    *Sun\ C*)
441632001f49Smrg	      # Sun C++ 5.9
441732001f49Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
441832001f49Smrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
441932001f49Smrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
442032001f49Smrg	      ;;
442132001f49Smrg	    esac
442232001f49Smrg	    ;;
442332001f49Smrg	esac
442432001f49Smrg	;;
442532001f49Smrg      lynxos*)
442632001f49Smrg	;;
442732001f49Smrg      m88k*)
442832001f49Smrg	;;
442932001f49Smrg      mvs*)
443032001f49Smrg	case $cc_basename in
443132001f49Smrg	  cxx*)
443232001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
443332001f49Smrg	    ;;
443432001f49Smrg	  *)
443532001f49Smrg	    ;;
443632001f49Smrg	esac
443732001f49Smrg	;;
443832001f49Smrg      netbsd* | netbsdelf*-gnu)
443932001f49Smrg	;;
444032001f49Smrg      *qnx* | *nto*)
444132001f49Smrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
444232001f49Smrg        # it will coredump.
444332001f49Smrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
444432001f49Smrg        ;;
444532001f49Smrg      osf3* | osf4* | osf5*)
444632001f49Smrg	case $cc_basename in
444732001f49Smrg	  KCC*)
444832001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
444932001f49Smrg	    ;;
445032001f49Smrg	  RCC*)
445132001f49Smrg	    # Rational C++ 2.4.1
445232001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
445332001f49Smrg	    ;;
445432001f49Smrg	  cxx*)
445532001f49Smrg	    # Digital/Compaq C++
445632001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
445732001f49Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
445832001f49Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
445932001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
446032001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
446132001f49Smrg	    ;;
446232001f49Smrg	  *)
446332001f49Smrg	    ;;
446432001f49Smrg	esac
446532001f49Smrg	;;
446632001f49Smrg      psos*)
446732001f49Smrg	;;
446832001f49Smrg      solaris*)
446932001f49Smrg	case $cc_basename in
447032001f49Smrg	  CC* | sunCC*)
447132001f49Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
447232001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
447332001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
447432001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
447532001f49Smrg	    ;;
447632001f49Smrg	  gcx*)
447732001f49Smrg	    # Green Hills C++ Compiler
447832001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
447932001f49Smrg	    ;;
448032001f49Smrg	  *)
448132001f49Smrg	    ;;
448232001f49Smrg	esac
448332001f49Smrg	;;
448432001f49Smrg      sunos4*)
448532001f49Smrg	case $cc_basename in
448632001f49Smrg	  CC*)
448732001f49Smrg	    # Sun C++ 4.x
448832001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
448932001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
449032001f49Smrg	    ;;
449132001f49Smrg	  lcc*)
449232001f49Smrg	    # Lucid
449332001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
449432001f49Smrg	    ;;
449532001f49Smrg	  *)
449632001f49Smrg	    ;;
449732001f49Smrg	esac
449832001f49Smrg	;;
449932001f49Smrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
450032001f49Smrg	case $cc_basename in
450132001f49Smrg	  CC*)
450232001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
450332001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
450432001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
450532001f49Smrg	    ;;
450632001f49Smrg	esac
450732001f49Smrg	;;
450832001f49Smrg      tandem*)
450932001f49Smrg	case $cc_basename in
451032001f49Smrg	  NCC*)
451132001f49Smrg	    # NonStop-UX NCC 3.20
451232001f49Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
451332001f49Smrg	    ;;
451432001f49Smrg	  *)
451532001f49Smrg	    ;;
451632001f49Smrg	esac
451732001f49Smrg	;;
451832001f49Smrg      vxworks*)
451932001f49Smrg	;;
452032001f49Smrg      *)
452132001f49Smrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
452232001f49Smrg	;;
452332001f49Smrg    esac
452432001f49Smrg  fi
452532001f49Smrg],
452632001f49Smrg[
45277ec3b29aSmrg  if test yes = "$GCC"; then
452832001f49Smrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
452932001f49Smrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
453032001f49Smrg
453132001f49Smrg    case $host_os in
453232001f49Smrg      aix*)
453332001f49Smrg      # All AIX code is PIC.
45347ec3b29aSmrg      if test ia64 = "$host_cpu"; then
453532001f49Smrg	# AIX 5 now supports IA64 processor
453632001f49Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
453732001f49Smrg      fi
45387ec3b29aSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
453932001f49Smrg      ;;
454032001f49Smrg
454132001f49Smrg    amigaos*)
454232001f49Smrg      case $host_cpu in
454332001f49Smrg      powerpc)
454432001f49Smrg            # see comment about AmigaOS4 .so support
454532001f49Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
454632001f49Smrg        ;;
454732001f49Smrg      m68k)
454832001f49Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
45497ec3b29aSmrg            # adding the '-m68020' flag to GCC prevents building anything better,
45507ec3b29aSmrg            # like '-m68040'.
455132001f49Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
455232001f49Smrg        ;;
455332001f49Smrg      esac
455432001f49Smrg      ;;
455532001f49Smrg
455632001f49Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
455732001f49Smrg      # PIC is the default for these OSes.
455832001f49Smrg      ;;
455932001f49Smrg
456032001f49Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
456132001f49Smrg      # This hack is so that the source file can tell whether it is being
456232001f49Smrg      # built for inclusion in a dll (and should export symbols for example).
456332001f49Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
456432001f49Smrg      # (--disable-auto-import) libraries
456532001f49Smrg      m4_if([$1], [GCJ], [],
456632001f49Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
45677ec3b29aSmrg      case $host_os in
45687ec3b29aSmrg      os2*)
45697ec3b29aSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
45707ec3b29aSmrg	;;
45717ec3b29aSmrg      esac
457232001f49Smrg      ;;
457332001f49Smrg
457432001f49Smrg    darwin* | rhapsody*)
457532001f49Smrg      # PIC is the default on this platform
457632001f49Smrg      # Common symbols not allowed in MH_DYLIB files
457732001f49Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
457832001f49Smrg      ;;
457932001f49Smrg
458032001f49Smrg    haiku*)
458132001f49Smrg      # PIC is the default for Haiku.
458232001f49Smrg      # The "-static" flag exists, but is broken.
458332001f49Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
458432001f49Smrg      ;;
458532001f49Smrg
458632001f49Smrg    hpux*)
458732001f49Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
458832001f49Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
458932001f49Smrg      # sets the default TLS model and affects inlining.
459032001f49Smrg      case $host_cpu in
459132001f49Smrg      hppa*64*)
459232001f49Smrg	# +Z the default
459332001f49Smrg	;;
459432001f49Smrg      *)
459532001f49Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
459632001f49Smrg	;;
459732001f49Smrg      esac
459832001f49Smrg      ;;
459932001f49Smrg
460032001f49Smrg    interix[[3-9]]*)
460132001f49Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
460232001f49Smrg      # Instead, we relocate shared libraries at runtime.
460332001f49Smrg      ;;
460432001f49Smrg
460532001f49Smrg    msdosdjgpp*)
460632001f49Smrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
460732001f49Smrg      # on systems that don't support them.
460832001f49Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
460932001f49Smrg      enable_shared=no
461032001f49Smrg      ;;
461132001f49Smrg
461232001f49Smrg    *nto* | *qnx*)
461332001f49Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
461432001f49Smrg      # it will coredump.
461532001f49Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
461632001f49Smrg      ;;
461732001f49Smrg
461832001f49Smrg    sysv4*MP*)
461932001f49Smrg      if test -d /usr/nec; then
462032001f49Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
462132001f49Smrg      fi
462232001f49Smrg      ;;
462332001f49Smrg
462432001f49Smrg    *)
462532001f49Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
462632001f49Smrg      ;;
462732001f49Smrg    esac
462832001f49Smrg
462932001f49Smrg    case $cc_basename in
463032001f49Smrg    nvcc*) # Cuda Compiler Driver 2.2
463132001f49Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
463232001f49Smrg      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
463332001f49Smrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
463432001f49Smrg      fi
463532001f49Smrg      ;;
463632001f49Smrg    esac
463732001f49Smrg  else
463832001f49Smrg    # PORTME Check for flag to pass linker flags through the system compiler.
463932001f49Smrg    case $host_os in
464032001f49Smrg    aix*)
464132001f49Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
46427ec3b29aSmrg      if test ia64 = "$host_cpu"; then
464332001f49Smrg	# AIX 5 now supports IA64 processor
464432001f49Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
464532001f49Smrg      else
464632001f49Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
464732001f49Smrg      fi
464832001f49Smrg      ;;
464932001f49Smrg
46507ec3b29aSmrg    darwin* | rhapsody*)
46517ec3b29aSmrg      # PIC is the default on this platform
46527ec3b29aSmrg      # Common symbols not allowed in MH_DYLIB files
46537ec3b29aSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
46547ec3b29aSmrg      case $cc_basename in
46557ec3b29aSmrg      nagfor*)
46567ec3b29aSmrg        # NAG Fortran compiler
46577ec3b29aSmrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
46587ec3b29aSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
46597ec3b29aSmrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
46607ec3b29aSmrg        ;;
46617ec3b29aSmrg      esac
46627ec3b29aSmrg      ;;
46637ec3b29aSmrg
466432001f49Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
466532001f49Smrg      # This hack is so that the source file can tell whether it is being
466632001f49Smrg      # built for inclusion in a dll (and should export symbols for example).
466732001f49Smrg      m4_if([$1], [GCJ], [],
466832001f49Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
46697ec3b29aSmrg      case $host_os in
46707ec3b29aSmrg      os2*)
46717ec3b29aSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
46727ec3b29aSmrg	;;
46737ec3b29aSmrg      esac
467432001f49Smrg      ;;
467532001f49Smrg
467632001f49Smrg    hpux9* | hpux10* | hpux11*)
467732001f49Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
467832001f49Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
467932001f49Smrg      # not for PA HP-UX.
468032001f49Smrg      case $host_cpu in
468132001f49Smrg      hppa*64*|ia64*)
468232001f49Smrg	# +Z the default
468332001f49Smrg	;;
468432001f49Smrg      *)
468532001f49Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
468632001f49Smrg	;;
468732001f49Smrg      esac
468832001f49Smrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
46897ec3b29aSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
469032001f49Smrg      ;;
469132001f49Smrg
469232001f49Smrg    irix5* | irix6* | nonstopux*)
469332001f49Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
469432001f49Smrg      # PIC (with -KPIC) is the default.
469532001f49Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
469632001f49Smrg      ;;
469732001f49Smrg
469832001f49Smrg    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
469932001f49Smrg      case $cc_basename in
47007ec3b29aSmrg      # old Intel for x86_64, which still supported -KPIC.
470132001f49Smrg      ecc*)
470232001f49Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
470332001f49Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
470432001f49Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
470532001f49Smrg        ;;
470632001f49Smrg      # icc used to be incompatible with GCC.
470732001f49Smrg      # ICC 10 doesn't accept -KPIC any more.
470832001f49Smrg      icc* | ifort*)
470932001f49Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
471032001f49Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
471132001f49Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
471232001f49Smrg        ;;
471332001f49Smrg      # Lahey Fortran 8.1.
471432001f49Smrg      lf95*)
471532001f49Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
471632001f49Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
471732001f49Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
471832001f49Smrg	;;
471932001f49Smrg      nagfor*)
472032001f49Smrg	# NAG Fortran compiler
472132001f49Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
472232001f49Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
472332001f49Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
472432001f49Smrg	;;
47257ec3b29aSmrg      tcc*)
47267ec3b29aSmrg	# Fabrice Bellard et al's Tiny C Compiler
47277ec3b29aSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
47287ec3b29aSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
47297ec3b29aSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
47307ec3b29aSmrg	;;
473132001f49Smrg      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
473232001f49Smrg        # Portland Group compilers (*not* the Pentium gcc compiler,
473332001f49Smrg	# which looks to be a dead project)
473432001f49Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
473532001f49Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
473632001f49Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
473732001f49Smrg        ;;
473832001f49Smrg      ccc*)
473932001f49Smrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
474032001f49Smrg        # All Alpha code is PIC.
474132001f49Smrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
474232001f49Smrg        ;;
474332001f49Smrg      xl* | bgxl* | bgf* | mpixl*)
474432001f49Smrg	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
474532001f49Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
474632001f49Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
474732001f49Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
474832001f49Smrg	;;
474932001f49Smrg      *)
475032001f49Smrg	case `$CC -V 2>&1 | sed 5q` in
475132001f49Smrg	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
475232001f49Smrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
475332001f49Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
475432001f49Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
475532001f49Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
475632001f49Smrg	  ;;
475732001f49Smrg	*Sun\ F* | *Sun*Fortran*)
475832001f49Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
475932001f49Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
476032001f49Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
476132001f49Smrg	  ;;
476232001f49Smrg	*Sun\ C*)
476332001f49Smrg	  # Sun C 5.9
476432001f49Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
476532001f49Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
476632001f49Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
476732001f49Smrg	  ;;
476832001f49Smrg        *Intel*\ [[CF]]*Compiler*)
476932001f49Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
477032001f49Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
477132001f49Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
477232001f49Smrg	  ;;
477332001f49Smrg	*Portland\ Group*)
477432001f49Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
477532001f49Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
477632001f49Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
477732001f49Smrg	  ;;
477832001f49Smrg	esac
477932001f49Smrg	;;
478032001f49Smrg      esac
478132001f49Smrg      ;;
478232001f49Smrg
478332001f49Smrg    newsos6)
478432001f49Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
478532001f49Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
478632001f49Smrg      ;;
478732001f49Smrg
478832001f49Smrg    *nto* | *qnx*)
478932001f49Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
479032001f49Smrg      # it will coredump.
479132001f49Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
479232001f49Smrg      ;;
479332001f49Smrg
479432001f49Smrg    osf3* | osf4* | osf5*)
479532001f49Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
479632001f49Smrg      # All OSF/1 code is PIC.
479732001f49Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
479832001f49Smrg      ;;
479932001f49Smrg
480032001f49Smrg    rdos*)
480132001f49Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
480232001f49Smrg      ;;
480332001f49Smrg
480432001f49Smrg    solaris*)
480532001f49Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
480632001f49Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
480732001f49Smrg      case $cc_basename in
480832001f49Smrg      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
480932001f49Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
481032001f49Smrg      *)
481132001f49Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
481232001f49Smrg      esac
481332001f49Smrg      ;;
481432001f49Smrg
481532001f49Smrg    sunos4*)
481632001f49Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
481732001f49Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
481832001f49Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
481932001f49Smrg      ;;
482032001f49Smrg
482132001f49Smrg    sysv4 | sysv4.2uw2* | sysv4.3*)
482232001f49Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
482332001f49Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
482432001f49Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
482532001f49Smrg      ;;
482632001f49Smrg
482732001f49Smrg    sysv4*MP*)
48287ec3b29aSmrg      if test -d /usr/nec; then
482932001f49Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
483032001f49Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
483132001f49Smrg      fi
483232001f49Smrg      ;;
483332001f49Smrg
483432001f49Smrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
483532001f49Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
483632001f49Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
483732001f49Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
483832001f49Smrg      ;;
483932001f49Smrg
484032001f49Smrg    unicos*)
484132001f49Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
484232001f49Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
484332001f49Smrg      ;;
484432001f49Smrg
484532001f49Smrg    uts4*)
484632001f49Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
484732001f49Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
484832001f49Smrg      ;;
484932001f49Smrg
485032001f49Smrg    *)
485132001f49Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
485232001f49Smrg      ;;
485332001f49Smrg    esac
485432001f49Smrg  fi
485532001f49Smrg])
485632001f49Smrgcase $host_os in
48577ec3b29aSmrg  # For platforms that do not support PIC, -DPIC is meaningless:
485832001f49Smrg  *djgpp*)
485932001f49Smrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
486032001f49Smrg    ;;
486132001f49Smrg  *)
486232001f49Smrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
486332001f49Smrg    ;;
486432001f49Smrgesac
486532001f49Smrg
486632001f49SmrgAC_CACHE_CHECK([for $compiler option to produce PIC],
486732001f49Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
486832001f49Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
486932001f49Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
487032001f49Smrg
487132001f49Smrg#
487232001f49Smrg# Check to make sure the PIC flag actually works.
487332001f49Smrg#
487432001f49Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
487532001f49Smrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
487632001f49Smrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
487732001f49Smrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
487832001f49Smrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
487932001f49Smrg     "" | " "*) ;;
488032001f49Smrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
488132001f49Smrg     esac],
488232001f49Smrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
488332001f49Smrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
488432001f49Smrgfi
488532001f49Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
488632001f49Smrg	[Additional compiler flags for building library objects])
488732001f49Smrg
488832001f49Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
488932001f49Smrg	[How to pass a linker flag through the compiler])
489032001f49Smrg#
489132001f49Smrg# Check to make sure the static flag actually works.
489232001f49Smrg#
489332001f49Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
489432001f49Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
489532001f49Smrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
489632001f49Smrg  $lt_tmp_static_flag,
489732001f49Smrg  [],
489832001f49Smrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
489932001f49Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
490032001f49Smrg	[Compiler flag to prevent dynamic linking])
490132001f49Smrg])# _LT_COMPILER_PIC
490232001f49Smrg
490332001f49Smrg
490432001f49Smrg# _LT_LINKER_SHLIBS([TAGNAME])
490532001f49Smrg# ----------------------------
490632001f49Smrg# See if the linker supports building shared libraries.
490732001f49Smrgm4_defun([_LT_LINKER_SHLIBS],
490832001f49Smrg[AC_REQUIRE([LT_PATH_LD])dnl
490932001f49SmrgAC_REQUIRE([LT_PATH_NM])dnl
491032001f49Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
491132001f49Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
491232001f49Smrgm4_require([_LT_DECL_EGREP])dnl
491332001f49Smrgm4_require([_LT_DECL_SED])dnl
491432001f49Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
491532001f49Smrgm4_require([_LT_TAG_COMPILER])dnl
491632001f49SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
491732001f49Smrgm4_if([$1], [CXX], [
491832001f49Smrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
491932001f49Smrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
492032001f49Smrg  case $host_os in
492132001f49Smrg  aix[[4-9]]*)
492232001f49Smrg    # If we're using GNU nm, then we don't want the "-C" option.
49237ec3b29aSmrg    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
49247ec3b29aSmrg    # Without the "-l" option, or with the "-B" option, AIX nm treats
49257ec3b29aSmrg    # weak defined symbols like other global defined symbols, whereas
49267ec3b29aSmrg    # GNU nm marks them as "W".
49277ec3b29aSmrg    # While the 'weak' keyword is ignored in the Export File, we need
49287ec3b29aSmrg    # it in the Import File for the 'aix-soname' feature, so we have
49297ec3b29aSmrg    # to replace the "-B" option with "-P" for AIX nm.
493032001f49Smrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
49317ec3b29aSmrg      _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'
493232001f49Smrg    else
49337ec3b29aSmrg      _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
493432001f49Smrg    fi
493532001f49Smrg    ;;
493632001f49Smrg  pw32*)
49377ec3b29aSmrg    _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
493832001f49Smrg    ;;
493932001f49Smrg  cygwin* | mingw* | cegcc*)
494032001f49Smrg    case $cc_basename in
494132001f49Smrg    cl*)
494232001f49Smrg      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
494332001f49Smrg      ;;
494432001f49Smrg    *)
494532001f49Smrg      _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'
494632001f49Smrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
494732001f49Smrg      ;;
494832001f49Smrg    esac
494932001f49Smrg    ;;
495032001f49Smrg  linux* | k*bsd*-gnu | gnu*)
495132001f49Smrg    _LT_TAGVAR(link_all_deplibs, $1)=no
495232001f49Smrg    ;;
495332001f49Smrg  *)
495432001f49Smrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
495532001f49Smrg    ;;
495632001f49Smrg  esac
495732001f49Smrg], [
495832001f49Smrg  runpath_var=
495932001f49Smrg  _LT_TAGVAR(allow_undefined_flag, $1)=
496032001f49Smrg  _LT_TAGVAR(always_export_symbols, $1)=no
496132001f49Smrg  _LT_TAGVAR(archive_cmds, $1)=
496232001f49Smrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
496332001f49Smrg  _LT_TAGVAR(compiler_needs_object, $1)=no
496432001f49Smrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
496532001f49Smrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
496632001f49Smrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
496732001f49Smrg  _LT_TAGVAR(hardcode_automatic, $1)=no
496832001f49Smrg  _LT_TAGVAR(hardcode_direct, $1)=no
496932001f49Smrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
497032001f49Smrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
497132001f49Smrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
497232001f49Smrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
497332001f49Smrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
497432001f49Smrg  _LT_TAGVAR(inherit_rpath, $1)=no
497532001f49Smrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
497632001f49Smrg  _LT_TAGVAR(module_cmds, $1)=
497732001f49Smrg  _LT_TAGVAR(module_expsym_cmds, $1)=
497832001f49Smrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
497932001f49Smrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
498032001f49Smrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
498132001f49Smrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
498232001f49Smrg  # include_expsyms should be a list of space-separated symbols to be *always*
498332001f49Smrg  # included in the symbol list
498432001f49Smrg  _LT_TAGVAR(include_expsyms, $1)=
498532001f49Smrg  # exclude_expsyms can be an extended regexp of symbols to exclude
49867ec3b29aSmrg  # it will be wrapped by ' (' and ')$', so one must not match beginning or
49877ec3b29aSmrg  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
49887ec3b29aSmrg  # as well as any symbol that contains 'd'.
498932001f49Smrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
499032001f49Smrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
499132001f49Smrg  # platforms (ab)use it in PIC code, but their linkers get confused if
499232001f49Smrg  # the symbol is explicitly referenced.  Since portable code cannot
499332001f49Smrg  # rely on this symbol name, it's probably fine to never include it in
499432001f49Smrg  # preloaded symbol tables.
499532001f49Smrg  # Exclude shared library initialization/finalization symbols.
499632001f49Smrgdnl Note also adjust exclude_expsyms for C++ above.
499732001f49Smrg  extract_expsyms_cmds=
499832001f49Smrg
499932001f49Smrg  case $host_os in
500032001f49Smrg  cygwin* | mingw* | pw32* | cegcc*)
500132001f49Smrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
500232001f49Smrg    # When not using gcc, we currently assume that we are using
500332001f49Smrg    # Microsoft Visual C++.
50047ec3b29aSmrg    if test yes != "$GCC"; then
500532001f49Smrg      with_gnu_ld=no
500632001f49Smrg    fi
500732001f49Smrg    ;;
500832001f49Smrg  interix*)
500932001f49Smrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
501032001f49Smrg    with_gnu_ld=yes
501132001f49Smrg    ;;
50127ec3b29aSmrg  openbsd* | bitrig*)
501332001f49Smrg    with_gnu_ld=no
501432001f49Smrg    ;;
501532001f49Smrg  linux* | k*bsd*-gnu | gnu*)
501632001f49Smrg    _LT_TAGVAR(link_all_deplibs, $1)=no
501732001f49Smrg    ;;
501832001f49Smrg  esac
501932001f49Smrg
502032001f49Smrg  _LT_TAGVAR(ld_shlibs, $1)=yes
502132001f49Smrg
502232001f49Smrg  # On some targets, GNU ld is compatible enough with the native linker
502332001f49Smrg  # that we're better off using the native interface for both.
502432001f49Smrg  lt_use_gnu_ld_interface=no
50257ec3b29aSmrg  if test yes = "$with_gnu_ld"; then
502632001f49Smrg    case $host_os in
502732001f49Smrg      aix*)
502832001f49Smrg	# The AIX port of GNU ld has always aspired to compatibility
502932001f49Smrg	# with the native linker.  However, as the warning in the GNU ld
503032001f49Smrg	# block says, versions before 2.19.5* couldn't really create working
503132001f49Smrg	# shared libraries, regardless of the interface used.
503232001f49Smrg	case `$LD -v 2>&1` in
503332001f49Smrg	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
503432001f49Smrg	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
503532001f49Smrg	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
503632001f49Smrg	  *)
503732001f49Smrg	    lt_use_gnu_ld_interface=yes
503832001f49Smrg	    ;;
503932001f49Smrg	esac
504032001f49Smrg	;;
504132001f49Smrg      *)
504232001f49Smrg	lt_use_gnu_ld_interface=yes
504332001f49Smrg	;;
504432001f49Smrg    esac
504532001f49Smrg  fi
504632001f49Smrg
50477ec3b29aSmrg  if test yes = "$lt_use_gnu_ld_interface"; then
504832001f49Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
50497ec3b29aSmrg    wlarc='$wl'
505032001f49Smrg
505132001f49Smrg    # Set some defaults for GNU ld with shared library support. These
505232001f49Smrg    # are reset later if shared libraries are not supported. Putting them
505332001f49Smrg    # here allows them to be overridden if necessary.
505432001f49Smrg    runpath_var=LD_RUN_PATH
50557ec3b29aSmrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
50567ec3b29aSmrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
505732001f49Smrg    # ancient GNU ld didn't support --whole-archive et. al.
505832001f49Smrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
50597ec3b29aSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
506032001f49Smrg    else
506132001f49Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
506232001f49Smrg    fi
506332001f49Smrg    supports_anon_versioning=no
50647ec3b29aSmrg    case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
506532001f49Smrg      *GNU\ gold*) supports_anon_versioning=yes ;;
506632001f49Smrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
506732001f49Smrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
506832001f49Smrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
506932001f49Smrg      *\ 2.11.*) ;; # other 2.11 versions
507032001f49Smrg      *) supports_anon_versioning=yes ;;
507132001f49Smrg    esac
507232001f49Smrg
507332001f49Smrg    # See if GNU ld supports shared libraries.
507432001f49Smrg    case $host_os in
507532001f49Smrg    aix[[3-9]]*)
507632001f49Smrg      # On AIX/PPC, the GNU linker is very broken
50777ec3b29aSmrg      if test ia64 != "$host_cpu"; then
507832001f49Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
507932001f49Smrg	cat <<_LT_EOF 1>&2
508032001f49Smrg
508132001f49Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported
508232001f49Smrg*** to be unable to reliably create shared libraries on AIX.
508332001f49Smrg*** Therefore, libtool is disabling shared libraries support.  If you
508432001f49Smrg*** really care for shared libraries, you may want to install binutils
508532001f49Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
508632001f49Smrg*** You will then need to restart the configuration process.
508732001f49Smrg
508832001f49Smrg_LT_EOF
508932001f49Smrg      fi
509032001f49Smrg      ;;
509132001f49Smrg
509232001f49Smrg    amigaos*)
509332001f49Smrg      case $host_cpu in
509432001f49Smrg      powerpc)
509532001f49Smrg            # see comment about AmigaOS4 .so support
50967ec3b29aSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
509732001f49Smrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
509832001f49Smrg        ;;
509932001f49Smrg      m68k)
510032001f49Smrg            _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)'
510132001f49Smrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
510232001f49Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
510332001f49Smrg        ;;
510432001f49Smrg      esac
510532001f49Smrg      ;;
510632001f49Smrg
510732001f49Smrg    beos*)
510832001f49Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
510932001f49Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
511032001f49Smrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
511132001f49Smrg	# support --undefined.  This deserves some investigation.  FIXME
51127ec3b29aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
511332001f49Smrg      else
511432001f49Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
511532001f49Smrg      fi
511632001f49Smrg      ;;
511732001f49Smrg
511832001f49Smrg    cygwin* | mingw* | pw32* | cegcc*)
511932001f49Smrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
512032001f49Smrg      # as there is no search path for DLLs.
512132001f49Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
51227ec3b29aSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
512332001f49Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
512432001f49Smrg      _LT_TAGVAR(always_export_symbols, $1)=no
512532001f49Smrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
512632001f49Smrg      _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'
512732001f49Smrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
512832001f49Smrg
512932001f49Smrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
51307ec3b29aSmrg        _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'
51317ec3b29aSmrg	# If the export-symbols file already is a .def file, use it as
51327ec3b29aSmrg	# is; otherwise, prepend EXPORTS...
51337ec3b29aSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
51347ec3b29aSmrg          cp $export_symbols $output_objdir/$soname.def;
51357ec3b29aSmrg        else
51367ec3b29aSmrg          echo EXPORTS > $output_objdir/$soname.def;
51377ec3b29aSmrg          cat $export_symbols >> $output_objdir/$soname.def;
51387ec3b29aSmrg        fi~
51397ec3b29aSmrg        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
514032001f49Smrg      else
514132001f49Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
514232001f49Smrg      fi
514332001f49Smrg      ;;
514432001f49Smrg
514532001f49Smrg    haiku*)
51467ec3b29aSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
514732001f49Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
514832001f49Smrg      ;;
514932001f49Smrg
51507ec3b29aSmrg    os2*)
51517ec3b29aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
51527ec3b29aSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
51537ec3b29aSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
51547ec3b29aSmrg      shrext_cmds=.dll
51557ec3b29aSmrg      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
51567ec3b29aSmrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
51577ec3b29aSmrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
51587ec3b29aSmrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
51597ec3b29aSmrg	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
51607ec3b29aSmrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
51617ec3b29aSmrg	emximp -o $lib $output_objdir/$libname.def'
51627ec3b29aSmrg      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
51637ec3b29aSmrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
51647ec3b29aSmrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
51657ec3b29aSmrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
51667ec3b29aSmrg	prefix_cmds="$SED"~
51677ec3b29aSmrg	if test EXPORTS = "`$SED 1q $export_symbols`"; then
51687ec3b29aSmrg	  prefix_cmds="$prefix_cmds -e 1d";
51697ec3b29aSmrg	fi~
51707ec3b29aSmrg	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
51717ec3b29aSmrg	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
51727ec3b29aSmrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
51737ec3b29aSmrg	emximp -o $lib $output_objdir/$libname.def'
51747ec3b29aSmrg      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
51757ec3b29aSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
51767ec3b29aSmrg      ;;
51777ec3b29aSmrg
517832001f49Smrg    interix[[3-9]]*)
517932001f49Smrg      _LT_TAGVAR(hardcode_direct, $1)=no
518032001f49Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
51817ec3b29aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
51827ec3b29aSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
518332001f49Smrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
518432001f49Smrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
518532001f49Smrg      # default) and relocated if they conflict, which is a slow very memory
518632001f49Smrg      # consuming and fragmenting process.  To avoid this, we pick a random,
518732001f49Smrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
518832001f49Smrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
51897ec3b29aSmrg      _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'
51907ec3b29aSmrg      _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'
519132001f49Smrg      ;;
519232001f49Smrg
519332001f49Smrg    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
519432001f49Smrg      tmp_diet=no
51957ec3b29aSmrg      if test linux-dietlibc = "$host_os"; then
519632001f49Smrg	case $cc_basename in
519732001f49Smrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
519832001f49Smrg	esac
519932001f49Smrg      fi
520032001f49Smrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
52017ec3b29aSmrg	 && test no = "$tmp_diet"
520232001f49Smrg      then
520332001f49Smrg	tmp_addflag=' $pic_flag'
520432001f49Smrg	tmp_sharedflag='-shared'
520532001f49Smrg	case $cc_basename,$host_cpu in
520632001f49Smrg        pgcc*)				# Portland Group C compiler
52077ec3b29aSmrg	  _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'
520832001f49Smrg	  tmp_addflag=' $pic_flag'
520932001f49Smrg	  ;;
521032001f49Smrg	pgf77* | pgf90* | pgf95* | pgfortran*)
521132001f49Smrg					# Portland Group f77 and f90 compilers
52127ec3b29aSmrg	  _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'
521332001f49Smrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
521432001f49Smrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
521532001f49Smrg	  tmp_addflag=' -i_dynamic' ;;
521632001f49Smrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
521732001f49Smrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
521832001f49Smrg	ifc* | ifort*)			# Intel Fortran compiler
521932001f49Smrg	  tmp_addflag=' -nofor_main' ;;
522032001f49Smrg	lf95*)				# Lahey Fortran 8.1
522132001f49Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
522232001f49Smrg	  tmp_sharedflag='--shared' ;;
52237ec3b29aSmrg        nagfor*)                        # NAGFOR 5.3
52247ec3b29aSmrg          tmp_sharedflag='-Wl,-shared' ;;
522532001f49Smrg	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
522632001f49Smrg	  tmp_sharedflag='-qmkshrobj'
522732001f49Smrg	  tmp_addflag= ;;
522832001f49Smrg	nvcc*)	# Cuda Compiler Driver 2.2
52297ec3b29aSmrg	  _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'
523032001f49Smrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
523132001f49Smrg	  ;;
523232001f49Smrg	esac
523332001f49Smrg	case `$CC -V 2>&1 | sed 5q` in
523432001f49Smrg	*Sun\ C*)			# Sun C 5.9
52357ec3b29aSmrg	  _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'
523632001f49Smrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
523732001f49Smrg	  tmp_sharedflag='-G' ;;
523832001f49Smrg	*Sun\ F*)			# Sun Fortran 8.3
523932001f49Smrg	  tmp_sharedflag='-G' ;;
524032001f49Smrg	esac
52417ec3b29aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
524232001f49Smrg
52437ec3b29aSmrg        if test yes = "$supports_anon_versioning"; then
524432001f49Smrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
52457ec3b29aSmrg            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
52467ec3b29aSmrg            echo "local: *; };" >> $output_objdir/$libname.ver~
52477ec3b29aSmrg            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
524832001f49Smrg        fi
524932001f49Smrg
525032001f49Smrg	case $cc_basename in
52517ec3b29aSmrg	tcc*)
52527ec3b29aSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
52537ec3b29aSmrg	  ;;
525432001f49Smrg	xlf* | bgf* | bgxlf* | mpixlf*)
525532001f49Smrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
525632001f49Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
52577ec3b29aSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
525832001f49Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
52597ec3b29aSmrg	  if test yes = "$supports_anon_versioning"; then
526032001f49Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
52617ec3b29aSmrg              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
52627ec3b29aSmrg              echo "local: *; };" >> $output_objdir/$libname.ver~
52637ec3b29aSmrg              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
526432001f49Smrg	  fi
526532001f49Smrg	  ;;
526632001f49Smrg	esac
526732001f49Smrg      else
526832001f49Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
526932001f49Smrg      fi
527032001f49Smrg      ;;
527132001f49Smrg
527232001f49Smrg    netbsd* | netbsdelf*-gnu)
527332001f49Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
527432001f49Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
527532001f49Smrg	wlarc=
527632001f49Smrg      else
52777ec3b29aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
52787ec3b29aSmrg	_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'
527932001f49Smrg      fi
528032001f49Smrg      ;;
528132001f49Smrg
528232001f49Smrg    solaris*)
528332001f49Smrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
528432001f49Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
528532001f49Smrg	cat <<_LT_EOF 1>&2
528632001f49Smrg
528732001f49Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
528832001f49Smrg*** create shared libraries on Solaris systems.  Therefore, libtool
528932001f49Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
529032001f49Smrg*** binutils to release 2.9.1 or newer.  Another option is to modify
529132001f49Smrg*** your PATH or compiler configuration so that the native linker is
529232001f49Smrg*** used, and then restart.
529332001f49Smrg
529432001f49Smrg_LT_EOF
529532001f49Smrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
52967ec3b29aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
52977ec3b29aSmrg	_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'
529832001f49Smrg      else
529932001f49Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
530032001f49Smrg      fi
530132001f49Smrg      ;;
530232001f49Smrg
530332001f49Smrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
530432001f49Smrg      case `$LD -v 2>&1` in
530532001f49Smrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
530632001f49Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
530732001f49Smrg	cat <<_LT_EOF 1>&2
530832001f49Smrg
53097ec3b29aSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
531032001f49Smrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
531132001f49Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
531232001f49Smrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
531332001f49Smrg*** your PATH or compiler configuration so that the native linker is
531432001f49Smrg*** used, and then restart.
531532001f49Smrg
531632001f49Smrg_LT_EOF
531732001f49Smrg	;;
531832001f49Smrg	*)
531932001f49Smrg	  # For security reasons, it is highly recommended that you always
532032001f49Smrg	  # use absolute paths for naming shared libraries, and exclude the
532132001f49Smrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
532232001f49Smrg	  # requires that you compile everything twice, which is a pain.
532332001f49Smrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
53247ec3b29aSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
53257ec3b29aSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
53267ec3b29aSmrg	    _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'
532732001f49Smrg	  else
532832001f49Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
532932001f49Smrg	  fi
533032001f49Smrg	;;
533132001f49Smrg      esac
533232001f49Smrg      ;;
533332001f49Smrg
533432001f49Smrg    sunos4*)
533532001f49Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
533632001f49Smrg      wlarc=
533732001f49Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
533832001f49Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
533932001f49Smrg      ;;
534032001f49Smrg
534132001f49Smrg    *)
534232001f49Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
53437ec3b29aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
53447ec3b29aSmrg	_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'
534532001f49Smrg      else
534632001f49Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
534732001f49Smrg      fi
534832001f49Smrg      ;;
534932001f49Smrg    esac
535032001f49Smrg
53517ec3b29aSmrg    if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
535232001f49Smrg      runpath_var=
535332001f49Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
535432001f49Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
535532001f49Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
535632001f49Smrg    fi
535732001f49Smrg  else
535832001f49Smrg    # PORTME fill in a description of your system's linker (not GNU ld)
535932001f49Smrg    case $host_os in
536032001f49Smrg    aix3*)
536132001f49Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
536232001f49Smrg      _LT_TAGVAR(always_export_symbols, $1)=yes
536332001f49Smrg      _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'
536432001f49Smrg      # Note: this linker hardcodes the directories in LIBPATH if there
536532001f49Smrg      # are no directories specified by -L.
536632001f49Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
53677ec3b29aSmrg      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
536832001f49Smrg	# Neither direct hardcoding nor static linking is supported with a
536932001f49Smrg	# broken collect2.
537032001f49Smrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
537132001f49Smrg      fi
537232001f49Smrg      ;;
537332001f49Smrg
537432001f49Smrg    aix[[4-9]]*)
53757ec3b29aSmrg      if test ia64 = "$host_cpu"; then
537632001f49Smrg	# On IA64, the linker does run time linking by default, so we don't
537732001f49Smrg	# have to do anything special.
537832001f49Smrg	aix_use_runtimelinking=no
537932001f49Smrg	exp_sym_flag='-Bexport'
53807ec3b29aSmrg	no_entry_flag=
538132001f49Smrg      else
538232001f49Smrg	# If we're using GNU nm, then we don't want the "-C" option.
53837ec3b29aSmrg	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
53847ec3b29aSmrg	# Without the "-l" option, or with the "-B" option, AIX nm treats
53857ec3b29aSmrg	# weak defined symbols like other global defined symbols, whereas
53867ec3b29aSmrg	# GNU nm marks them as "W".
53877ec3b29aSmrg	# While the 'weak' keyword is ignored in the Export File, we need
53887ec3b29aSmrg	# it in the Import File for the 'aix-soname' feature, so we have
53897ec3b29aSmrg	# to replace the "-B" option with "-P" for AIX nm.
539032001f49Smrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
53917ec3b29aSmrg	  _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'
539232001f49Smrg	else
53937ec3b29aSmrg	  _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
539432001f49Smrg	fi
539532001f49Smrg	aix_use_runtimelinking=no
539632001f49Smrg
539732001f49Smrg	# Test if we are trying to use run time linking or normal
539832001f49Smrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
53997ec3b29aSmrg	# have runtime linking enabled, and use it for executables.
54007ec3b29aSmrg	# For shared libraries, we enable/disable runtime linking
54017ec3b29aSmrg	# depending on the kind of the shared library created -
54027ec3b29aSmrg	# when "with_aix_soname,aix_use_runtimelinking" is:
54037ec3b29aSmrg	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
54047ec3b29aSmrg	# "aix,yes"  lib.so          shared, rtl:yes, for executables
54057ec3b29aSmrg	#            lib.a           static archive
54067ec3b29aSmrg	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
54077ec3b29aSmrg	#            lib.a(lib.so.V) shared, rtl:no,  for executables
54087ec3b29aSmrg	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
54097ec3b29aSmrg	#            lib.a(lib.so.V) shared, rtl:no
54107ec3b29aSmrg	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
54117ec3b29aSmrg	#            lib.a           static archive
541232001f49Smrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
541332001f49Smrg	  for ld_flag in $LDFLAGS; do
54147ec3b29aSmrg	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
541532001f49Smrg	    aix_use_runtimelinking=yes
541632001f49Smrg	    break
541732001f49Smrg	  fi
541832001f49Smrg	  done
54197ec3b29aSmrg	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
54207ec3b29aSmrg	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
54217ec3b29aSmrg	    # so we don't have lib.a shared libs to link our executables.
54227ec3b29aSmrg	    # We have to force runtime linking in this case.
54237ec3b29aSmrg	    aix_use_runtimelinking=yes
54247ec3b29aSmrg	    LDFLAGS="$LDFLAGS -Wl,-brtl"
54257ec3b29aSmrg	  fi
542632001f49Smrg	  ;;
542732001f49Smrg	esac
542832001f49Smrg
542932001f49Smrg	exp_sym_flag='-bexport'
543032001f49Smrg	no_entry_flag='-bnoentry'
543132001f49Smrg      fi
543232001f49Smrg
543332001f49Smrg      # When large executables or shared objects are built, AIX ld can
543432001f49Smrg      # have problems creating the table of contents.  If linking a library
543532001f49Smrg      # or program results in "error TOC overflow" add -mminimal-toc to
543632001f49Smrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
543732001f49Smrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
543832001f49Smrg
543932001f49Smrg      _LT_TAGVAR(archive_cmds, $1)=''
544032001f49Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
544132001f49Smrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
544232001f49Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
544332001f49Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
54447ec3b29aSmrg      _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
54457ec3b29aSmrg      case $with_aix_soname,$aix_use_runtimelinking in
54467ec3b29aSmrg      aix,*) ;; # traditional, no import file
54477ec3b29aSmrg      svr4,* | *,yes) # use import file
54487ec3b29aSmrg	# The Import File defines what to hardcode.
54497ec3b29aSmrg	_LT_TAGVAR(hardcode_direct, $1)=no
54507ec3b29aSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=no
54517ec3b29aSmrg	;;
54527ec3b29aSmrg      esac
545332001f49Smrg
54547ec3b29aSmrg      if test yes = "$GCC"; then
545532001f49Smrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
545632001f49Smrg	# We only want to do this on AIX 4.2 and lower, the check
545732001f49Smrg	# below for broken collect2 doesn't work under 4.3+
54587ec3b29aSmrg	  collect2name=`$CC -print-prog-name=collect2`
545932001f49Smrg	  if test -f "$collect2name" &&
546032001f49Smrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
546132001f49Smrg	  then
546232001f49Smrg	  # We have reworked collect2
546332001f49Smrg	  :
546432001f49Smrg	  else
546532001f49Smrg	  # We have old collect2
546632001f49Smrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
546732001f49Smrg	  # It fails to find uninstalled libraries when the uninstalled
546832001f49Smrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
546932001f49Smrg	  # to unsupported forces relinking
547032001f49Smrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
547132001f49Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
547232001f49Smrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
547332001f49Smrg	  fi
547432001f49Smrg	  ;;
547532001f49Smrg	esac
547632001f49Smrg	shared_flag='-shared'
54777ec3b29aSmrg	if test yes = "$aix_use_runtimelinking"; then
54787ec3b29aSmrg	  shared_flag="$shared_flag "'$wl-G'
547932001f49Smrg	fi
54807ec3b29aSmrg	# Need to ensure runtime linking is disabled for the traditional
54817ec3b29aSmrg	# shared library, or the linker may eventually find shared libraries
54827ec3b29aSmrg	# /with/ Import File - we do not want to mix them.
54837ec3b29aSmrg	shared_flag_aix='-shared'
54847ec3b29aSmrg	shared_flag_svr4='-shared $wl-G'
548532001f49Smrg      else
548632001f49Smrg	# not using gcc
54877ec3b29aSmrg	if test ia64 = "$host_cpu"; then
548832001f49Smrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
548932001f49Smrg	# chokes on -Wl,-G. The following line is correct:
549032001f49Smrg	  shared_flag='-G'
549132001f49Smrg	else
54927ec3b29aSmrg	  if test yes = "$aix_use_runtimelinking"; then
54937ec3b29aSmrg	    shared_flag='$wl-G'
549432001f49Smrg	  else
54957ec3b29aSmrg	    shared_flag='$wl-bM:SRE'
549632001f49Smrg	  fi
54977ec3b29aSmrg	  shared_flag_aix='$wl-bM:SRE'
54987ec3b29aSmrg	  shared_flag_svr4='$wl-G'
549932001f49Smrg	fi
550032001f49Smrg      fi
550132001f49Smrg
55027ec3b29aSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
550332001f49Smrg      # It seems that -bexpall does not export symbols beginning with
550432001f49Smrg      # underscore (_), so it is better to generate a list of symbols to export.
550532001f49Smrg      _LT_TAGVAR(always_export_symbols, $1)=yes
55067ec3b29aSmrg      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
550732001f49Smrg	# Warning - without using the other runtime loading flags (-brtl),
550832001f49Smrg	# -berok will link without error, but may produce a broken library.
550932001f49Smrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
551032001f49Smrg        # Determine the default libpath from the value encoded in an
551132001f49Smrg        # empty executable.
551232001f49Smrg        _LT_SYS_MODULE_PATH_AIX([$1])
55137ec3b29aSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
55147ec3b29aSmrg        _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
551532001f49Smrg      else
55167ec3b29aSmrg	if test ia64 = "$host_cpu"; then
55177ec3b29aSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
551832001f49Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
55197ec3b29aSmrg	  _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"
552032001f49Smrg	else
552132001f49Smrg	 # Determine the default libpath from the value encoded in an
552232001f49Smrg	 # empty executable.
552332001f49Smrg	 _LT_SYS_MODULE_PATH_AIX([$1])
55247ec3b29aSmrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
552532001f49Smrg	  # Warning - without using the other run time loading flags,
552632001f49Smrg	  # -berok will link without error, but may produce a broken library.
55277ec3b29aSmrg	  _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
55287ec3b29aSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
55297ec3b29aSmrg	  if test yes = "$with_gnu_ld"; then
553032001f49Smrg	    # We only use this code for GNU lds that support --whole-archive.
55317ec3b29aSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
553232001f49Smrg	  else
553332001f49Smrg	    # Exported symbols can be pulled into shared objects from archives
553432001f49Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
553532001f49Smrg	  fi
553632001f49Smrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
55377ec3b29aSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
55387ec3b29aSmrg	  # -brtl affects multiple linker settings, -berok does not and is overridden later
55397ec3b29aSmrg	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
55407ec3b29aSmrg	  if test svr4 != "$with_aix_soname"; then
55417ec3b29aSmrg	    # This is similar to how AIX traditionally builds its shared libraries.
55427ec3b29aSmrg	    _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'
55437ec3b29aSmrg	  fi
55447ec3b29aSmrg	  if test aix != "$with_aix_soname"; then
55457ec3b29aSmrg	    _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'
55467ec3b29aSmrg	  else
55477ec3b29aSmrg	    # used by -dlpreopen to get the symbols
55487ec3b29aSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
55497ec3b29aSmrg	  fi
55507ec3b29aSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
555132001f49Smrg	fi
555232001f49Smrg      fi
555332001f49Smrg      ;;
555432001f49Smrg
555532001f49Smrg    amigaos*)
555632001f49Smrg      case $host_cpu in
555732001f49Smrg      powerpc)
555832001f49Smrg            # see comment about AmigaOS4 .so support
55597ec3b29aSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
556032001f49Smrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
556132001f49Smrg        ;;
556232001f49Smrg      m68k)
556332001f49Smrg            _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)'
556432001f49Smrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
556532001f49Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
556632001f49Smrg        ;;
556732001f49Smrg      esac
556832001f49Smrg      ;;
556932001f49Smrg
557032001f49Smrg    bsdi[[45]]*)
557132001f49Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
557232001f49Smrg      ;;
557332001f49Smrg
557432001f49Smrg    cygwin* | mingw* | pw32* | cegcc*)
557532001f49Smrg      # When not using gcc, we currently assume that we are using
557632001f49Smrg      # Microsoft Visual C++.
557732001f49Smrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
557832001f49Smrg      # no search path for DLLs.
557932001f49Smrg      case $cc_basename in
558032001f49Smrg      cl*)
558132001f49Smrg	# Native MSVC
558232001f49Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
558332001f49Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
558432001f49Smrg	_LT_TAGVAR(always_export_symbols, $1)=yes
558532001f49Smrg	_LT_TAGVAR(file_list_spec, $1)='@'
558632001f49Smrg	# Tell ltmain to make .lib files, not .a files.
558732001f49Smrg	libext=lib
558832001f49Smrg	# Tell ltmain to make .dll files, not .so files.
55897ec3b29aSmrg	shrext_cmds=.dll
559032001f49Smrg	# FIXME: Setting linknames here is a bad hack.
55917ec3b29aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
55927ec3b29aSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
55937ec3b29aSmrg            cp "$export_symbols" "$output_objdir/$soname.def";
55947ec3b29aSmrg            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
55957ec3b29aSmrg          else
55967ec3b29aSmrg            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
55977ec3b29aSmrg          fi~
55987ec3b29aSmrg          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
55997ec3b29aSmrg          linknames='
560032001f49Smrg	# The linker will not automatically build a static lib if we build a DLL.
560132001f49Smrg	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
560232001f49Smrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
560332001f49Smrg	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
560432001f49Smrg	_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'
560532001f49Smrg	# Don't use ranlib
560632001f49Smrg	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
560732001f49Smrg	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
56087ec3b29aSmrg          lt_tool_outputfile="@TOOL_OUTPUT@"~
56097ec3b29aSmrg          case $lt_outputfile in
56107ec3b29aSmrg            *.exe|*.EXE) ;;
56117ec3b29aSmrg            *)
56127ec3b29aSmrg              lt_outputfile=$lt_outputfile.exe
56137ec3b29aSmrg              lt_tool_outputfile=$lt_tool_outputfile.exe
56147ec3b29aSmrg              ;;
56157ec3b29aSmrg          esac~
56167ec3b29aSmrg          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
56177ec3b29aSmrg            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
56187ec3b29aSmrg            $RM "$lt_outputfile.manifest";
56197ec3b29aSmrg          fi'
562032001f49Smrg	;;
562132001f49Smrg      *)
562232001f49Smrg	# Assume MSVC wrapper
562332001f49Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
562432001f49Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
562532001f49Smrg	# Tell ltmain to make .lib files, not .a files.
562632001f49Smrg	libext=lib
562732001f49Smrg	# Tell ltmain to make .dll files, not .so files.
56287ec3b29aSmrg	shrext_cmds=.dll
562932001f49Smrg	# FIXME: Setting linknames here is a bad hack.
563032001f49Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
563132001f49Smrg	# The linker will automatically build a .lib file if we build a DLL.
563232001f49Smrg	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
563332001f49Smrg	# FIXME: Should let the user specify the lib program.
563432001f49Smrg	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
563532001f49Smrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
563632001f49Smrg	;;
563732001f49Smrg      esac
563832001f49Smrg      ;;
563932001f49Smrg
564032001f49Smrg    darwin* | rhapsody*)
564132001f49Smrg      _LT_DARWIN_LINKER_FEATURES($1)
564232001f49Smrg      ;;
564332001f49Smrg
564432001f49Smrg    dgux*)
564532001f49Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
564632001f49Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
564732001f49Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
564832001f49Smrg      ;;
564932001f49Smrg
565032001f49Smrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
565132001f49Smrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
565232001f49Smrg    # does not break anything, and helps significantly (at the cost of a little
565332001f49Smrg    # extra space).
565432001f49Smrg    freebsd2.2*)
565532001f49Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
565632001f49Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
565732001f49Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
565832001f49Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
565932001f49Smrg      ;;
566032001f49Smrg
566132001f49Smrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
566232001f49Smrg    freebsd2.*)
566332001f49Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
566432001f49Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
566532001f49Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
566632001f49Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
566732001f49Smrg      ;;
566832001f49Smrg
566932001f49Smrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
567032001f49Smrg    freebsd* | dragonfly*)
567132001f49Smrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
567232001f49Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
567332001f49Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
567432001f49Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
567532001f49Smrg      ;;
567632001f49Smrg
567732001f49Smrg    hpux9*)
56787ec3b29aSmrg      if test yes = "$GCC"; then
56797ec3b29aSmrg	_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'
568032001f49Smrg      else
56817ec3b29aSmrg	_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'
568232001f49Smrg      fi
56837ec3b29aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
568432001f49Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
568532001f49Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
568632001f49Smrg
568732001f49Smrg      # hardcode_minus_L: Not really in the search PATH,
568832001f49Smrg      # but as the default location of the library.
568932001f49Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
56907ec3b29aSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
569132001f49Smrg      ;;
569232001f49Smrg
569332001f49Smrg    hpux10*)
56947ec3b29aSmrg      if test yes,no = "$GCC,$with_gnu_ld"; then
56957ec3b29aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
569632001f49Smrg      else
569732001f49Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
569832001f49Smrg      fi
56997ec3b29aSmrg      if test no = "$with_gnu_ld"; then
57007ec3b29aSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
570132001f49Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
570232001f49Smrg	_LT_TAGVAR(hardcode_direct, $1)=yes
570332001f49Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
57047ec3b29aSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
570532001f49Smrg	# hardcode_minus_L: Not really in the search PATH,
570632001f49Smrg	# but as the default location of the library.
570732001f49Smrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
570832001f49Smrg      fi
570932001f49Smrg      ;;
571032001f49Smrg
571132001f49Smrg    hpux11*)
57127ec3b29aSmrg      if test yes,no = "$GCC,$with_gnu_ld"; then
571332001f49Smrg	case $host_cpu in
571432001f49Smrg	hppa*64*)
57157ec3b29aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
571632001f49Smrg	  ;;
571732001f49Smrg	ia64*)
57187ec3b29aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
571932001f49Smrg	  ;;
572032001f49Smrg	*)
57217ec3b29aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
572232001f49Smrg	  ;;
572332001f49Smrg	esac
572432001f49Smrg      else
572532001f49Smrg	case $host_cpu in
572632001f49Smrg	hppa*64*)
57277ec3b29aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
572832001f49Smrg	  ;;
572932001f49Smrg	ia64*)
57307ec3b29aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
573132001f49Smrg	  ;;
573232001f49Smrg	*)
573332001f49Smrg	m4_if($1, [], [
573432001f49Smrg	  # Older versions of the 11.00 compiler do not understand -b yet
573532001f49Smrg	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
573632001f49Smrg	  _LT_LINKER_OPTION([if $CC understands -b],
573732001f49Smrg	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
57387ec3b29aSmrg	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
573932001f49Smrg	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
57407ec3b29aSmrg	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
574132001f49Smrg	  ;;
574232001f49Smrg	esac
574332001f49Smrg      fi
57447ec3b29aSmrg      if test no = "$with_gnu_ld"; then
57457ec3b29aSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
574632001f49Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
574732001f49Smrg
574832001f49Smrg	case $host_cpu in
574932001f49Smrg	hppa*64*|ia64*)
575032001f49Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no
575132001f49Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
575232001f49Smrg	  ;;
575332001f49Smrg	*)
575432001f49Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
575532001f49Smrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
57567ec3b29aSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
575732001f49Smrg
575832001f49Smrg	  # hardcode_minus_L: Not really in the search PATH,
575932001f49Smrg	  # but as the default location of the library.
576032001f49Smrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
576132001f49Smrg	  ;;
576232001f49Smrg	esac
576332001f49Smrg      fi
576432001f49Smrg      ;;
576532001f49Smrg
576632001f49Smrg    irix5* | irix6* | nonstopux*)
57677ec3b29aSmrg      if test yes = "$GCC"; then
57687ec3b29aSmrg	_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'
576932001f49Smrg	# Try to use the -exported_symbol ld option, if it does not
577032001f49Smrg	# work, assume that -exports_file does not work either and
577132001f49Smrg	# implicitly export all symbols.
577232001f49Smrg	# This should be the same for all languages, so no per-tag cache variable.
577332001f49Smrg	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
577432001f49Smrg	  [lt_cv_irix_exported_symbol],
57757ec3b29aSmrg	  [save_LDFLAGS=$LDFLAGS
57767ec3b29aSmrg	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
577732001f49Smrg	   AC_LINK_IFELSE(
577832001f49Smrg	     [AC_LANG_SOURCE(
577932001f49Smrg	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
578032001f49Smrg			      [C++], [[int foo (void) { return 0; }]],
578132001f49Smrg			      [Fortran 77], [[
578232001f49Smrg      subroutine foo
578332001f49Smrg      end]],
578432001f49Smrg			      [Fortran], [[
578532001f49Smrg      subroutine foo
578632001f49Smrg      end]])])],
578732001f49Smrg	      [lt_cv_irix_exported_symbol=yes],
578832001f49Smrg	      [lt_cv_irix_exported_symbol=no])
57897ec3b29aSmrg           LDFLAGS=$save_LDFLAGS])
57907ec3b29aSmrg	if test yes = "$lt_cv_irix_exported_symbol"; then
57917ec3b29aSmrg          _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'
579232001f49Smrg	fi
57937ec3b29aSmrg	_LT_TAGVAR(link_all_deplibs, $1)=no
579432001f49Smrg      else
57957ec3b29aSmrg	_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'
57967ec3b29aSmrg	_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'
579732001f49Smrg      fi
579832001f49Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
57997ec3b29aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
580032001f49Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
580132001f49Smrg      _LT_TAGVAR(inherit_rpath, $1)=yes
580232001f49Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
580332001f49Smrg      ;;
580432001f49Smrg
58057ec3b29aSmrg    linux*)
58067ec3b29aSmrg      case $cc_basename in
58077ec3b29aSmrg      tcc*)
58087ec3b29aSmrg	# Fabrice Bellard et al's Tiny C Compiler
58097ec3b29aSmrg	_LT_TAGVAR(ld_shlibs, $1)=yes
58107ec3b29aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
58117ec3b29aSmrg	;;
58127ec3b29aSmrg      esac
58137ec3b29aSmrg      ;;
58147ec3b29aSmrg
581532001f49Smrg    netbsd* | netbsdelf*-gnu)
581632001f49Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
581732001f49Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
581832001f49Smrg      else
581932001f49Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
582032001f49Smrg      fi
582132001f49Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
582232001f49Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
582332001f49Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
582432001f49Smrg      ;;
582532001f49Smrg
582632001f49Smrg    newsos6)
582732001f49Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
582832001f49Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
58297ec3b29aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
583032001f49Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
583132001f49Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
583232001f49Smrg      ;;
583332001f49Smrg
583432001f49Smrg    *nto* | *qnx*)
583532001f49Smrg      ;;
583632001f49Smrg
58377ec3b29aSmrg    openbsd* | bitrig*)
583832001f49Smrg      if test -f /usr/libexec/ld.so; then
583932001f49Smrg	_LT_TAGVAR(hardcode_direct, $1)=yes
584032001f49Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
584132001f49Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
58427ec3b29aSmrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
584332001f49Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
58447ec3b29aSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
58457ec3b29aSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
58467ec3b29aSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
584732001f49Smrg	else
58487ec3b29aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
58497ec3b29aSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
585032001f49Smrg	fi
585132001f49Smrg      else
585232001f49Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
585332001f49Smrg      fi
585432001f49Smrg      ;;
585532001f49Smrg
585632001f49Smrg    os2*)
585732001f49Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
585832001f49Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
585932001f49Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
58607ec3b29aSmrg      shrext_cmds=.dll
58617ec3b29aSmrg      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
58627ec3b29aSmrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
58637ec3b29aSmrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
58647ec3b29aSmrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
58657ec3b29aSmrg	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
58667ec3b29aSmrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
58677ec3b29aSmrg	emximp -o $lib $output_objdir/$libname.def'
58687ec3b29aSmrg      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
58697ec3b29aSmrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
58707ec3b29aSmrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
58717ec3b29aSmrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
58727ec3b29aSmrg	prefix_cmds="$SED"~
58737ec3b29aSmrg	if test EXPORTS = "`$SED 1q $export_symbols`"; then
58747ec3b29aSmrg	  prefix_cmds="$prefix_cmds -e 1d";
58757ec3b29aSmrg	fi~
58767ec3b29aSmrg	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
58777ec3b29aSmrg	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
58787ec3b29aSmrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
58797ec3b29aSmrg	emximp -o $lib $output_objdir/$libname.def'
58807ec3b29aSmrg      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
58817ec3b29aSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
588232001f49Smrg      ;;
588332001f49Smrg
588432001f49Smrg    osf3*)
58857ec3b29aSmrg      if test yes = "$GCC"; then
58867ec3b29aSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
58877ec3b29aSmrg	_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'
588832001f49Smrg      else
588932001f49Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
58907ec3b29aSmrg	_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'
589132001f49Smrg      fi
589232001f49Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
58937ec3b29aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
589432001f49Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
589532001f49Smrg      ;;
589632001f49Smrg
589732001f49Smrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
58987ec3b29aSmrg      if test yes = "$GCC"; then
58997ec3b29aSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
59007ec3b29aSmrg	_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'
59017ec3b29aSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
590232001f49Smrg      else
590332001f49Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
59047ec3b29aSmrg	_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'
590532001f49Smrg	_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~
59067ec3b29aSmrg          $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'
590732001f49Smrg
590832001f49Smrg	# Both c and cxx compiler support -rpath directly
590932001f49Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
591032001f49Smrg      fi
591132001f49Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
591232001f49Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
591332001f49Smrg      ;;
591432001f49Smrg
591532001f49Smrg    solaris*)
591632001f49Smrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
59177ec3b29aSmrg      if test yes = "$GCC"; then
59187ec3b29aSmrg	wlarc='$wl'
59197ec3b29aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
592032001f49Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
59217ec3b29aSmrg          $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'
592232001f49Smrg      else
592332001f49Smrg	case `$CC -V 2>&1` in
592432001f49Smrg	*"Compilers 5.0"*)
592532001f49Smrg	  wlarc=''
59267ec3b29aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
592732001f49Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
59287ec3b29aSmrg            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
592932001f49Smrg	  ;;
593032001f49Smrg	*)
59317ec3b29aSmrg	  wlarc='$wl'
59327ec3b29aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
593332001f49Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
59347ec3b29aSmrg            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
593532001f49Smrg	  ;;
593632001f49Smrg	esac
593732001f49Smrg      fi
593832001f49Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
593932001f49Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
594032001f49Smrg      case $host_os in
594132001f49Smrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
594232001f49Smrg      *)
594332001f49Smrg	# The compiler driver will combine and reorder linker options,
59447ec3b29aSmrg	# but understands '-z linker_flag'.  GCC discards it without '$wl',
594532001f49Smrg	# but is careful enough not to reorder.
594632001f49Smrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
59477ec3b29aSmrg	if test yes = "$GCC"; then
59487ec3b29aSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
594932001f49Smrg	else
595032001f49Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
595132001f49Smrg	fi
595232001f49Smrg	;;
595332001f49Smrg      esac
595432001f49Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
595532001f49Smrg      ;;
595632001f49Smrg
595732001f49Smrg    sunos4*)
59587ec3b29aSmrg      if test sequent = "$host_vendor"; then
595932001f49Smrg	# Use $CC to link under sequent, because it throws in some extra .o
596032001f49Smrg	# files that make .init and .fini sections work.
59617ec3b29aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
596232001f49Smrg      else
596332001f49Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
596432001f49Smrg      fi
596532001f49Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
596632001f49Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
596732001f49Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
596832001f49Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
596932001f49Smrg      ;;
597032001f49Smrg
597132001f49Smrg    sysv4)
597232001f49Smrg      case $host_vendor in
597332001f49Smrg	sni)
597432001f49Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
597532001f49Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
597632001f49Smrg	;;
597732001f49Smrg	siemens)
597832001f49Smrg	  ## LD is ld it makes a PLAMLIB
597932001f49Smrg	  ## CC just makes a GrossModule.
598032001f49Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
598132001f49Smrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
598232001f49Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no
598332001f49Smrg        ;;
598432001f49Smrg	motorola)
598532001f49Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
598632001f49Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
598732001f49Smrg	;;
598832001f49Smrg      esac
598932001f49Smrg      runpath_var='LD_RUN_PATH'
599032001f49Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
599132001f49Smrg      ;;
599232001f49Smrg
599332001f49Smrg    sysv4.3*)
599432001f49Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
599532001f49Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
599632001f49Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
599732001f49Smrg      ;;
599832001f49Smrg
599932001f49Smrg    sysv4*MP*)
600032001f49Smrg      if test -d /usr/nec; then
600132001f49Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
600232001f49Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
600332001f49Smrg	runpath_var=LD_RUN_PATH
600432001f49Smrg	hardcode_runpath_var=yes
600532001f49Smrg	_LT_TAGVAR(ld_shlibs, $1)=yes
600632001f49Smrg      fi
600732001f49Smrg      ;;
600832001f49Smrg
600932001f49Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
60107ec3b29aSmrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
601132001f49Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
601232001f49Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
601332001f49Smrg      runpath_var='LD_RUN_PATH'
601432001f49Smrg
60157ec3b29aSmrg      if test yes = "$GCC"; then
60167ec3b29aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60177ec3b29aSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
601832001f49Smrg      else
60197ec3b29aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60207ec3b29aSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
602132001f49Smrg      fi
602232001f49Smrg      ;;
602332001f49Smrg
602432001f49Smrg    sysv5* | sco3.2v5* | sco5v6*)
60257ec3b29aSmrg      # Note: We CANNOT use -z defs as we might desire, because we do not
602632001f49Smrg      # link with -lc, and that would cause any symbols used from libc to
602732001f49Smrg      # always be unresolved, which means just about no library would
602832001f49Smrg      # ever link correctly.  If we're not using GNU ld we use -z text
602932001f49Smrg      # though, which does catch some bad symbols but isn't as heavy-handed
603032001f49Smrg      # as -z defs.
60317ec3b29aSmrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
60327ec3b29aSmrg      _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
603332001f49Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
603432001f49Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60357ec3b29aSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
603632001f49Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
603732001f49Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
60387ec3b29aSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
603932001f49Smrg      runpath_var='LD_RUN_PATH'
604032001f49Smrg
60417ec3b29aSmrg      if test yes = "$GCC"; then
60427ec3b29aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60437ec3b29aSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
604432001f49Smrg      else
60457ec3b29aSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
60467ec3b29aSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
604732001f49Smrg      fi
604832001f49Smrg      ;;
604932001f49Smrg
605032001f49Smrg    uts4*)
605132001f49Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
605232001f49Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
605332001f49Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
605432001f49Smrg      ;;
605532001f49Smrg
605632001f49Smrg    *)
605732001f49Smrg      _LT_TAGVAR(ld_shlibs, $1)=no
605832001f49Smrg      ;;
605932001f49Smrg    esac
606032001f49Smrg
60617ec3b29aSmrg    if test sni = "$host_vendor"; then
606232001f49Smrg      case $host in
606332001f49Smrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
60647ec3b29aSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
606532001f49Smrg	;;
606632001f49Smrg      esac
606732001f49Smrg    fi
606832001f49Smrg  fi
606932001f49Smrg])
607032001f49SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
60717ec3b29aSmrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
607232001f49Smrg
607332001f49Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
607432001f49Smrg
607532001f49Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
607632001f49Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
607732001f49Smrg_LT_DECL([], [extract_expsyms_cmds], [2],
607832001f49Smrg    [The commands to extract the exported symbol list from a shared archive])
607932001f49Smrg
608032001f49Smrg#
608132001f49Smrg# Do we need to explicitly link libc?
608232001f49Smrg#
608332001f49Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
608432001f49Smrgx|xyes)
608532001f49Smrg  # Assume -lc should be added
608632001f49Smrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
608732001f49Smrg
60887ec3b29aSmrg  if test yes,yes = "$GCC,$enable_shared"; then
608932001f49Smrg    case $_LT_TAGVAR(archive_cmds, $1) in
609032001f49Smrg    *'~'*)
609132001f49Smrg      # FIXME: we may have to deal with multi-command sequences.
609232001f49Smrg      ;;
609332001f49Smrg    '$CC '*)
609432001f49Smrg      # Test whether the compiler implicitly links with -lc since on some
609532001f49Smrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
609632001f49Smrg      # to ld, don't add -lc before -lgcc.
609732001f49Smrg      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
609832001f49Smrg	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
609932001f49Smrg	[$RM conftest*
610032001f49Smrg	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
610132001f49Smrg
610232001f49Smrg	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
610332001f49Smrg	  soname=conftest
610432001f49Smrg	  lib=conftest
610532001f49Smrg	  libobjs=conftest.$ac_objext
610632001f49Smrg	  deplibs=
610732001f49Smrg	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
610832001f49Smrg	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
610932001f49Smrg	  compiler_flags=-v
611032001f49Smrg	  linker_flags=-v
611132001f49Smrg	  verstring=
611232001f49Smrg	  output_objdir=.
611332001f49Smrg	  libname=conftest
611432001f49Smrg	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
611532001f49Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=
611632001f49Smrg	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
611732001f49Smrg	  then
611832001f49Smrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
611932001f49Smrg	  else
612032001f49Smrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
612132001f49Smrg	  fi
612232001f49Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
612332001f49Smrg	else
612432001f49Smrg	  cat conftest.err 1>&5
612532001f49Smrg	fi
612632001f49Smrg	$RM conftest*
612732001f49Smrg	])
612832001f49Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
612932001f49Smrg      ;;
613032001f49Smrg    esac
613132001f49Smrg  fi
613232001f49Smrg  ;;
613332001f49Smrgesac
613432001f49Smrg
613532001f49Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
613632001f49Smrg    [Whether or not to add -lc for building shared libraries])
613732001f49Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
613832001f49Smrg    [enable_shared_with_static_runtimes], [0],
613932001f49Smrg    [Whether or not to disallow shared libs when runtime libs are static])
614032001f49Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
614132001f49Smrg    [Compiler flag to allow reflexive dlopens])
614232001f49Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
614332001f49Smrg    [Compiler flag to generate shared objects directly from archives])
614432001f49Smrg_LT_TAGDECL([], [compiler_needs_object], [1],
614532001f49Smrg    [Whether the compiler copes with passing no objects directly])
614632001f49Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
614732001f49Smrg    [Create an old-style archive from a shared archive])
614832001f49Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
614932001f49Smrg    [Create a temporary old-style archive to link instead of a shared archive])
615032001f49Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
615132001f49Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
615232001f49Smrg_LT_TAGDECL([], [module_cmds], [2],
615332001f49Smrg    [Commands used to build a loadable module if different from building
615432001f49Smrg    a shared archive.])
615532001f49Smrg_LT_TAGDECL([], [module_expsym_cmds], [2])
615632001f49Smrg_LT_TAGDECL([], [with_gnu_ld], [1],
615732001f49Smrg    [Whether we are building with GNU ld or not])
615832001f49Smrg_LT_TAGDECL([], [allow_undefined_flag], [1],
615932001f49Smrg    [Flag that allows shared libraries with undefined symbols to be built])
616032001f49Smrg_LT_TAGDECL([], [no_undefined_flag], [1],
616132001f49Smrg    [Flag that enforces no undefined symbols])
616232001f49Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
616332001f49Smrg    [Flag to hardcode $libdir into a binary during linking.
616432001f49Smrg    This must work even if $libdir does not exist])
616532001f49Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
616632001f49Smrg    [Whether we need a single "-rpath" flag with a separated argument])
616732001f49Smrg_LT_TAGDECL([], [hardcode_direct], [0],
61687ec3b29aSmrg    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
616932001f49Smrg    DIR into the resulting binary])
617032001f49Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
61717ec3b29aSmrg    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
617232001f49Smrg    DIR into the resulting binary and the resulting library dependency is
61737ec3b29aSmrg    "absolute", i.e impossible to change by setting $shlibpath_var if the
617432001f49Smrg    library is relocated])
617532001f49Smrg_LT_TAGDECL([], [hardcode_minus_L], [0],
617632001f49Smrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
617732001f49Smrg    into the resulting binary])
617832001f49Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
617932001f49Smrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
618032001f49Smrg    into the resulting binary])
618132001f49Smrg_LT_TAGDECL([], [hardcode_automatic], [0],
618232001f49Smrg    [Set to "yes" if building a shared library automatically hardcodes DIR
618332001f49Smrg    into the library and all subsequent libraries and executables linked
618432001f49Smrg    against it])
618532001f49Smrg_LT_TAGDECL([], [inherit_rpath], [0],
618632001f49Smrg    [Set to yes if linker adds runtime paths of dependent libraries
618732001f49Smrg    to runtime path list])
618832001f49Smrg_LT_TAGDECL([], [link_all_deplibs], [0],
618932001f49Smrg    [Whether libtool must link a program against all its dependency libraries])
619032001f49Smrg_LT_TAGDECL([], [always_export_symbols], [0],
619132001f49Smrg    [Set to "yes" if exported symbols are required])
619232001f49Smrg_LT_TAGDECL([], [export_symbols_cmds], [2],
619332001f49Smrg    [The commands to list exported symbols])
619432001f49Smrg_LT_TAGDECL([], [exclude_expsyms], [1],
619532001f49Smrg    [Symbols that should not be listed in the preloaded symbols])
619632001f49Smrg_LT_TAGDECL([], [include_expsyms], [1],
619732001f49Smrg    [Symbols that must always be exported])
619832001f49Smrg_LT_TAGDECL([], [prelink_cmds], [2],
619932001f49Smrg    [Commands necessary for linking programs (against libraries) with templates])
620032001f49Smrg_LT_TAGDECL([], [postlink_cmds], [2],
620132001f49Smrg    [Commands necessary for finishing linking programs])
620232001f49Smrg_LT_TAGDECL([], [file_list_spec], [1],
620332001f49Smrg    [Specify filename containing input files])
620432001f49Smrgdnl FIXME: Not yet implemented
620532001f49Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
620632001f49Smrgdnl    [Compiler flag to generate thread safe objects])
620732001f49Smrg])# _LT_LINKER_SHLIBS
620832001f49Smrg
620932001f49Smrg
621032001f49Smrg# _LT_LANG_C_CONFIG([TAG])
621132001f49Smrg# ------------------------
621232001f49Smrg# Ensure that the configuration variables for a C compiler are suitably
621332001f49Smrg# defined.  These variables are subsequently used by _LT_CONFIG to write
62147ec3b29aSmrg# the compiler configuration to 'libtool'.
621532001f49Smrgm4_defun([_LT_LANG_C_CONFIG],
621632001f49Smrg[m4_require([_LT_DECL_EGREP])dnl
62177ec3b29aSmrglt_save_CC=$CC
621832001f49SmrgAC_LANG_PUSH(C)
621932001f49Smrg
622032001f49Smrg# Source file extension for C test sources.
622132001f49Smrgac_ext=c
622232001f49Smrg
622332001f49Smrg# Object file extension for compiled C test sources.
622432001f49Smrgobjext=o
622532001f49Smrg_LT_TAGVAR(objext, $1)=$objext
622632001f49Smrg
622732001f49Smrg# Code to be used in simple compile tests
622832001f49Smrglt_simple_compile_test_code="int some_variable = 0;"
622932001f49Smrg
623032001f49Smrg# Code to be used in simple link tests
623132001f49Smrglt_simple_link_test_code='int main(){return(0);}'
623232001f49Smrg
623332001f49Smrg_LT_TAG_COMPILER
623432001f49Smrg# Save the default compiler, since it gets overwritten when the other
623532001f49Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
623632001f49Smrgcompiler_DEFAULT=$CC
623732001f49Smrg
623832001f49Smrg# save warnings/boilerplate of simple test code
623932001f49Smrg_LT_COMPILER_BOILERPLATE
624032001f49Smrg_LT_LINKER_BOILERPLATE
624132001f49Smrg
624232001f49Smrg## CAVEAT EMPTOR:
624332001f49Smrg## There is no encapsulation within the following macros, do not change
624432001f49Smrg## the running order or otherwise move them around unless you know exactly
624532001f49Smrg## what you are doing...
624632001f49Smrgif test -n "$compiler"; then
624732001f49Smrg  _LT_COMPILER_NO_RTTI($1)
624832001f49Smrg  _LT_COMPILER_PIC($1)
624932001f49Smrg  _LT_COMPILER_C_O($1)
625032001f49Smrg  _LT_COMPILER_FILE_LOCKS($1)
625132001f49Smrg  _LT_LINKER_SHLIBS($1)
625232001f49Smrg  _LT_SYS_DYNAMIC_LINKER($1)
625332001f49Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
625432001f49Smrg  LT_SYS_DLOPEN_SELF
625532001f49Smrg  _LT_CMD_STRIPLIB
625632001f49Smrg
62577ec3b29aSmrg  # Report what library types will actually be built
625832001f49Smrg  AC_MSG_CHECKING([if libtool supports shared libraries])
625932001f49Smrg  AC_MSG_RESULT([$can_build_shared])
626032001f49Smrg
626132001f49Smrg  AC_MSG_CHECKING([whether to build shared libraries])
62627ec3b29aSmrg  test no = "$can_build_shared" && enable_shared=no
626332001f49Smrg
626432001f49Smrg  # On AIX, shared libraries and static libraries use the same namespace, and
626532001f49Smrg  # are all built from PIC.
626632001f49Smrg  case $host_os in
626732001f49Smrg  aix3*)
62687ec3b29aSmrg    test yes = "$enable_shared" && enable_static=no
626932001f49Smrg    if test -n "$RANLIB"; then
627032001f49Smrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
627132001f49Smrg      postinstall_cmds='$RANLIB $lib'
627232001f49Smrg    fi
627332001f49Smrg    ;;
627432001f49Smrg
627532001f49Smrg  aix[[4-9]]*)
62767ec3b29aSmrg    if test ia64 != "$host_cpu"; then
62777ec3b29aSmrg      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
62787ec3b29aSmrg      yes,aix,yes) ;;			# shared object as lib.so file only
62797ec3b29aSmrg      yes,svr4,*) ;;			# shared object as lib.so archive member only
62807ec3b29aSmrg      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
62817ec3b29aSmrg      esac
628232001f49Smrg    fi
628332001f49Smrg    ;;
628432001f49Smrg  esac
628532001f49Smrg  AC_MSG_RESULT([$enable_shared])
628632001f49Smrg
628732001f49Smrg  AC_MSG_CHECKING([whether to build static libraries])
628832001f49Smrg  # Make sure either enable_shared or enable_static is yes.
62897ec3b29aSmrg  test yes = "$enable_shared" || enable_static=yes
629032001f49Smrg  AC_MSG_RESULT([$enable_static])
629132001f49Smrg
629232001f49Smrg  _LT_CONFIG($1)
629332001f49Smrgfi
629432001f49SmrgAC_LANG_POP
62957ec3b29aSmrgCC=$lt_save_CC
629632001f49Smrg])# _LT_LANG_C_CONFIG
629732001f49Smrg
629832001f49Smrg
629932001f49Smrg# _LT_LANG_CXX_CONFIG([TAG])
630032001f49Smrg# --------------------------
630132001f49Smrg# Ensure that the configuration variables for a C++ compiler are suitably
630232001f49Smrg# defined.  These variables are subsequently used by _LT_CONFIG to write
63037ec3b29aSmrg# the compiler configuration to 'libtool'.
630432001f49Smrgm4_defun([_LT_LANG_CXX_CONFIG],
630532001f49Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
630632001f49Smrgm4_require([_LT_DECL_EGREP])dnl
630732001f49Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
63087ec3b29aSmrgif test -n "$CXX" && ( test no != "$CXX" &&
63097ec3b29aSmrg    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
63107ec3b29aSmrg    (test g++ != "$CXX"))); then
631132001f49Smrg  AC_PROG_CXXCPP
631232001f49Smrgelse
631332001f49Smrg  _lt_caught_CXX_error=yes
631432001f49Smrgfi
631532001f49Smrg
631632001f49SmrgAC_LANG_PUSH(C++)
631732001f49Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
631832001f49Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
631932001f49Smrg_LT_TAGVAR(always_export_symbols, $1)=no
632032001f49Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
632132001f49Smrg_LT_TAGVAR(compiler_needs_object, $1)=no
632232001f49Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
632332001f49Smrg_LT_TAGVAR(hardcode_direct, $1)=no
632432001f49Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
632532001f49Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
632632001f49Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
632732001f49Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
632832001f49Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
632932001f49Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
633032001f49Smrg_LT_TAGVAR(inherit_rpath, $1)=no
633132001f49Smrg_LT_TAGVAR(module_cmds, $1)=
633232001f49Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
633332001f49Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
633432001f49Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
633532001f49Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
633632001f49Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
633732001f49Smrg_LT_TAGVAR(no_undefined_flag, $1)=
633832001f49Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
633932001f49Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
634032001f49Smrg
634132001f49Smrg# Source file extension for C++ test sources.
634232001f49Smrgac_ext=cpp
634332001f49Smrg
634432001f49Smrg# Object file extension for compiled C++ test sources.
634532001f49Smrgobjext=o
634632001f49Smrg_LT_TAGVAR(objext, $1)=$objext
634732001f49Smrg
634832001f49Smrg# No sense in running all these tests if we already determined that
634932001f49Smrg# the CXX compiler isn't working.  Some variables (like enable_shared)
635032001f49Smrg# are currently assumed to apply to all compilers on this platform,
635132001f49Smrg# and will be corrupted by setting them based on a non-working compiler.
63527ec3b29aSmrgif test yes != "$_lt_caught_CXX_error"; then
635332001f49Smrg  # Code to be used in simple compile tests
635432001f49Smrg  lt_simple_compile_test_code="int some_variable = 0;"
635532001f49Smrg
635632001f49Smrg  # Code to be used in simple link tests
635732001f49Smrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
635832001f49Smrg
635932001f49Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
636032001f49Smrg  _LT_TAG_COMPILER
636132001f49Smrg
636232001f49Smrg  # save warnings/boilerplate of simple test code
636332001f49Smrg  _LT_COMPILER_BOILERPLATE
636432001f49Smrg  _LT_LINKER_BOILERPLATE
636532001f49Smrg
636632001f49Smrg  # Allow CC to be a program name with arguments.
636732001f49Smrg  lt_save_CC=$CC
636832001f49Smrg  lt_save_CFLAGS=$CFLAGS
636932001f49Smrg  lt_save_LD=$LD
637032001f49Smrg  lt_save_GCC=$GCC
637132001f49Smrg  GCC=$GXX
637232001f49Smrg  lt_save_with_gnu_ld=$with_gnu_ld
637332001f49Smrg  lt_save_path_LD=$lt_cv_path_LD
637432001f49Smrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
637532001f49Smrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
637632001f49Smrg  else
637732001f49Smrg    $as_unset lt_cv_prog_gnu_ld
637832001f49Smrg  fi
637932001f49Smrg  if test -n "${lt_cv_path_LDCXX+set}"; then
638032001f49Smrg    lt_cv_path_LD=$lt_cv_path_LDCXX
638132001f49Smrg  else
638232001f49Smrg    $as_unset lt_cv_path_LD
638332001f49Smrg  fi
638432001f49Smrg  test -z "${LDCXX+set}" || LD=$LDCXX
638532001f49Smrg  CC=${CXX-"c++"}
638632001f49Smrg  CFLAGS=$CXXFLAGS
638732001f49Smrg  compiler=$CC
638832001f49Smrg  _LT_TAGVAR(compiler, $1)=$CC
638932001f49Smrg  _LT_CC_BASENAME([$compiler])
639032001f49Smrg
639132001f49Smrg  if test -n "$compiler"; then
639232001f49Smrg    # We don't want -fno-exception when compiling C++ code, so set the
639332001f49Smrg    # no_builtin_flag separately
63947ec3b29aSmrg    if test yes = "$GXX"; then
639532001f49Smrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
639632001f49Smrg    else
639732001f49Smrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
639832001f49Smrg    fi
639932001f49Smrg
64007ec3b29aSmrg    if test yes = "$GXX"; then
640132001f49Smrg      # Set up default GNU C++ configuration
640232001f49Smrg
640332001f49Smrg      LT_PATH_LD
640432001f49Smrg
640532001f49Smrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
640632001f49Smrg      # archiving commands below assume that GNU ld is being used.
64077ec3b29aSmrg      if test yes = "$with_gnu_ld"; then
64087ec3b29aSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
64097ec3b29aSmrg        _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'
641032001f49Smrg
64117ec3b29aSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
64127ec3b29aSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
641332001f49Smrg
641432001f49Smrg        # If archive_cmds runs LD, not CC, wlarc should be empty
641532001f49Smrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
641632001f49Smrg        #     investigate it a little bit more. (MM)
64177ec3b29aSmrg        wlarc='$wl'
641832001f49Smrg
641932001f49Smrg        # ancient GNU ld didn't support --whole-archive et. al.
642032001f49Smrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
642132001f49Smrg	  $GREP 'no-whole-archive' > /dev/null; then
64227ec3b29aSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
642332001f49Smrg        else
642432001f49Smrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
642532001f49Smrg        fi
642632001f49Smrg      else
642732001f49Smrg        with_gnu_ld=no
642832001f49Smrg        wlarc=
642932001f49Smrg
643032001f49Smrg        # A generic and very simple default shared library creation
643132001f49Smrg        # command for GNU C++ for the case where it uses the native
643232001f49Smrg        # linker, instead of GNU ld.  If possible, this setting should
643332001f49Smrg        # overridden to take advantage of the native linker features on
643432001f49Smrg        # the platform it is being used on.
643532001f49Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
643632001f49Smrg      fi
643732001f49Smrg
643832001f49Smrg      # Commands to make compiler produce verbose output that lists
643932001f49Smrg      # what "hidden" libraries, object files and flags are used when
644032001f49Smrg      # linking a shared library.
644132001f49Smrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
644232001f49Smrg
644332001f49Smrg    else
644432001f49Smrg      GXX=no
644532001f49Smrg      with_gnu_ld=no
644632001f49Smrg      wlarc=
644732001f49Smrg    fi
644832001f49Smrg
644932001f49Smrg    # PORTME: fill in a description of your system's C++ link characteristics
645032001f49Smrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
645132001f49Smrg    _LT_TAGVAR(ld_shlibs, $1)=yes
645232001f49Smrg    case $host_os in
645332001f49Smrg      aix3*)
645432001f49Smrg        # FIXME: insert proper C++ library support
645532001f49Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
645632001f49Smrg        ;;
645732001f49Smrg      aix[[4-9]]*)
64587ec3b29aSmrg        if test ia64 = "$host_cpu"; then
645932001f49Smrg          # On IA64, the linker does run time linking by default, so we don't
646032001f49Smrg          # have to do anything special.
646132001f49Smrg          aix_use_runtimelinking=no
646232001f49Smrg          exp_sym_flag='-Bexport'
64637ec3b29aSmrg          no_entry_flag=
646432001f49Smrg        else
646532001f49Smrg          aix_use_runtimelinking=no
646632001f49Smrg
646732001f49Smrg          # Test if we are trying to use run time linking or normal
646832001f49Smrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
64697ec3b29aSmrg          # have runtime linking enabled, and use it for executables.
64707ec3b29aSmrg          # For shared libraries, we enable/disable runtime linking
64717ec3b29aSmrg          # depending on the kind of the shared library created -
64727ec3b29aSmrg          # when "with_aix_soname,aix_use_runtimelinking" is:
64737ec3b29aSmrg          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
64747ec3b29aSmrg          # "aix,yes"  lib.so          shared, rtl:yes, for executables
64757ec3b29aSmrg          #            lib.a           static archive
64767ec3b29aSmrg          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
64777ec3b29aSmrg          #            lib.a(lib.so.V) shared, rtl:no,  for executables
64787ec3b29aSmrg          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
64797ec3b29aSmrg          #            lib.a(lib.so.V) shared, rtl:no
64807ec3b29aSmrg          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
64817ec3b29aSmrg          #            lib.a           static archive
648232001f49Smrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
648332001f49Smrg	    for ld_flag in $LDFLAGS; do
648432001f49Smrg	      case $ld_flag in
648532001f49Smrg	      *-brtl*)
648632001f49Smrg	        aix_use_runtimelinking=yes
648732001f49Smrg	        break
648832001f49Smrg	        ;;
648932001f49Smrg	      esac
649032001f49Smrg	    done
64917ec3b29aSmrg	    if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
64927ec3b29aSmrg	      # With aix-soname=svr4, we create the lib.so.V shared archives only,
64937ec3b29aSmrg	      # so we don't have lib.a shared libs to link our executables.
64947ec3b29aSmrg	      # We have to force runtime linking in this case.
64957ec3b29aSmrg	      aix_use_runtimelinking=yes
64967ec3b29aSmrg	      LDFLAGS="$LDFLAGS -Wl,-brtl"
64977ec3b29aSmrg	    fi
649832001f49Smrg	    ;;
649932001f49Smrg          esac
650032001f49Smrg
650132001f49Smrg          exp_sym_flag='-bexport'
650232001f49Smrg          no_entry_flag='-bnoentry'
650332001f49Smrg        fi
650432001f49Smrg
650532001f49Smrg        # When large executables or shared objects are built, AIX ld can
650632001f49Smrg        # have problems creating the table of contents.  If linking a library
650732001f49Smrg        # or program results in "error TOC overflow" add -mminimal-toc to
650832001f49Smrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
650932001f49Smrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
651032001f49Smrg
651132001f49Smrg        _LT_TAGVAR(archive_cmds, $1)=''
651232001f49Smrg        _LT_TAGVAR(hardcode_direct, $1)=yes
651332001f49Smrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
651432001f49Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
651532001f49Smrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
65167ec3b29aSmrg        _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
65177ec3b29aSmrg        case $with_aix_soname,$aix_use_runtimelinking in
65187ec3b29aSmrg        aix,*) ;;	# no import file
65197ec3b29aSmrg        svr4,* | *,yes) # use import file
65207ec3b29aSmrg          # The Import File defines what to hardcode.
65217ec3b29aSmrg          _LT_TAGVAR(hardcode_direct, $1)=no
65227ec3b29aSmrg          _LT_TAGVAR(hardcode_direct_absolute, $1)=no
65237ec3b29aSmrg          ;;
65247ec3b29aSmrg        esac
652532001f49Smrg
65267ec3b29aSmrg        if test yes = "$GXX"; then
652732001f49Smrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
652832001f49Smrg          # We only want to do this on AIX 4.2 and lower, the check
652932001f49Smrg          # below for broken collect2 doesn't work under 4.3+
65307ec3b29aSmrg	  collect2name=`$CC -print-prog-name=collect2`
653132001f49Smrg	  if test -f "$collect2name" &&
653232001f49Smrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
653332001f49Smrg	  then
653432001f49Smrg	    # We have reworked collect2
653532001f49Smrg	    :
653632001f49Smrg	  else
653732001f49Smrg	    # We have old collect2
653832001f49Smrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
653932001f49Smrg	    # It fails to find uninstalled libraries when the uninstalled
654032001f49Smrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
654132001f49Smrg	    # to unsupported forces relinking
654232001f49Smrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
654332001f49Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
654432001f49Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
654532001f49Smrg	  fi
654632001f49Smrg          esac
654732001f49Smrg          shared_flag='-shared'
65487ec3b29aSmrg	  if test yes = "$aix_use_runtimelinking"; then
65497ec3b29aSmrg	    shared_flag=$shared_flag' $wl-G'
655032001f49Smrg	  fi
65517ec3b29aSmrg	  # Need to ensure runtime linking is disabled for the traditional
65527ec3b29aSmrg	  # shared library, or the linker may eventually find shared libraries
65537ec3b29aSmrg	  # /with/ Import File - we do not want to mix them.
65547ec3b29aSmrg	  shared_flag_aix='-shared'
65557ec3b29aSmrg	  shared_flag_svr4='-shared $wl-G'
655632001f49Smrg        else
655732001f49Smrg          # not using gcc
65587ec3b29aSmrg          if test ia64 = "$host_cpu"; then
655932001f49Smrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
656032001f49Smrg	  # chokes on -Wl,-G. The following line is correct:
656132001f49Smrg	  shared_flag='-G'
656232001f49Smrg          else
65637ec3b29aSmrg	    if test yes = "$aix_use_runtimelinking"; then
65647ec3b29aSmrg	      shared_flag='$wl-G'
656532001f49Smrg	    else
65667ec3b29aSmrg	      shared_flag='$wl-bM:SRE'
656732001f49Smrg	    fi
65687ec3b29aSmrg	    shared_flag_aix='$wl-bM:SRE'
65697ec3b29aSmrg	    shared_flag_svr4='$wl-G'
657032001f49Smrg          fi
657132001f49Smrg        fi
657232001f49Smrg
65737ec3b29aSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
657432001f49Smrg        # It seems that -bexpall does not export symbols beginning with
657532001f49Smrg        # underscore (_), so it is better to generate a list of symbols to
657632001f49Smrg	# export.
657732001f49Smrg        _LT_TAGVAR(always_export_symbols, $1)=yes
65787ec3b29aSmrg	if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
657932001f49Smrg          # Warning - without using the other runtime loading flags (-brtl),
658032001f49Smrg          # -berok will link without error, but may produce a broken library.
65817ec3b29aSmrg          # The "-G" linker flag allows undefined symbols.
65827ec3b29aSmrg          _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
658332001f49Smrg          # Determine the default libpath from the value encoded in an empty
658432001f49Smrg          # executable.
658532001f49Smrg          _LT_SYS_MODULE_PATH_AIX([$1])
65867ec3b29aSmrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
658732001f49Smrg
65887ec3b29aSmrg          _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
658932001f49Smrg        else
65907ec3b29aSmrg          if test ia64 = "$host_cpu"; then
65917ec3b29aSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
659232001f49Smrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
65937ec3b29aSmrg	    _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"
659432001f49Smrg          else
659532001f49Smrg	    # Determine the default libpath from the value encoded in an
659632001f49Smrg	    # empty executable.
659732001f49Smrg	    _LT_SYS_MODULE_PATH_AIX([$1])
65987ec3b29aSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
659932001f49Smrg	    # Warning - without using the other run time loading flags,
660032001f49Smrg	    # -berok will link without error, but may produce a broken library.
66017ec3b29aSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
66027ec3b29aSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
66037ec3b29aSmrg	    if test yes = "$with_gnu_ld"; then
660432001f49Smrg	      # We only use this code for GNU lds that support --whole-archive.
66057ec3b29aSmrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
660632001f49Smrg	    else
660732001f49Smrg	      # Exported symbols can be pulled into shared objects from archives
660832001f49Smrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
660932001f49Smrg	    fi
661032001f49Smrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
66117ec3b29aSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
66127ec3b29aSmrg	    # -brtl affects multiple linker settings, -berok does not and is overridden later
66137ec3b29aSmrg	    compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
66147ec3b29aSmrg	    if test svr4 != "$with_aix_soname"; then
66157ec3b29aSmrg	      # This is similar to how AIX traditionally builds its shared
66167ec3b29aSmrg	      # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
66177ec3b29aSmrg	      _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'
66187ec3b29aSmrg	    fi
66197ec3b29aSmrg	    if test aix != "$with_aix_soname"; then
66207ec3b29aSmrg	      _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'
66217ec3b29aSmrg	    else
66227ec3b29aSmrg	      # used by -dlpreopen to get the symbols
66237ec3b29aSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
66247ec3b29aSmrg	    fi
66257ec3b29aSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
662632001f49Smrg          fi
662732001f49Smrg        fi
662832001f49Smrg        ;;
662932001f49Smrg
663032001f49Smrg      beos*)
663132001f49Smrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
663232001f49Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
663332001f49Smrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
663432001f49Smrg	  # support --undefined.  This deserves some investigation.  FIXME
66357ec3b29aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
663632001f49Smrg	else
663732001f49Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
663832001f49Smrg	fi
663932001f49Smrg	;;
664032001f49Smrg
664132001f49Smrg      chorus*)
664232001f49Smrg        case $cc_basename in
664332001f49Smrg          *)
664432001f49Smrg	  # FIXME: insert proper C++ library support
664532001f49Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
664632001f49Smrg	  ;;
664732001f49Smrg        esac
664832001f49Smrg        ;;
664932001f49Smrg
665032001f49Smrg      cygwin* | mingw* | pw32* | cegcc*)
665132001f49Smrg	case $GXX,$cc_basename in
665232001f49Smrg	,cl* | no,cl*)
665332001f49Smrg	  # Native MSVC
665432001f49Smrg	  # hardcode_libdir_flag_spec is actually meaningless, as there is
665532001f49Smrg	  # no search path for DLLs.
665632001f49Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
665732001f49Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
665832001f49Smrg	  _LT_TAGVAR(always_export_symbols, $1)=yes
665932001f49Smrg	  _LT_TAGVAR(file_list_spec, $1)='@'
666032001f49Smrg	  # Tell ltmain to make .lib files, not .a files.
666132001f49Smrg	  libext=lib
666232001f49Smrg	  # Tell ltmain to make .dll files, not .so files.
66637ec3b29aSmrg	  shrext_cmds=.dll
666432001f49Smrg	  # FIXME: Setting linknames here is a bad hack.
66657ec3b29aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
66667ec3b29aSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
66677ec3b29aSmrg              cp "$export_symbols" "$output_objdir/$soname.def";
66687ec3b29aSmrg              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
66697ec3b29aSmrg            else
66707ec3b29aSmrg              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
66717ec3b29aSmrg            fi~
66727ec3b29aSmrg            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
66737ec3b29aSmrg            linknames='
667432001f49Smrg	  # The linker will not automatically build a static lib if we build a DLL.
667532001f49Smrg	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
667632001f49Smrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
667732001f49Smrg	  # Don't use ranlib
667832001f49Smrg	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
667932001f49Smrg	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
66807ec3b29aSmrg            lt_tool_outputfile="@TOOL_OUTPUT@"~
66817ec3b29aSmrg            case $lt_outputfile in
66827ec3b29aSmrg              *.exe|*.EXE) ;;
66837ec3b29aSmrg              *)
66847ec3b29aSmrg                lt_outputfile=$lt_outputfile.exe
66857ec3b29aSmrg                lt_tool_outputfile=$lt_tool_outputfile.exe
66867ec3b29aSmrg                ;;
66877ec3b29aSmrg            esac~
66887ec3b29aSmrg            func_to_tool_file "$lt_outputfile"~
66897ec3b29aSmrg            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
66907ec3b29aSmrg              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
66917ec3b29aSmrg              $RM "$lt_outputfile.manifest";
66927ec3b29aSmrg            fi'
669332001f49Smrg	  ;;
669432001f49Smrg	*)
669532001f49Smrg	  # g++
669632001f49Smrg	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
669732001f49Smrg	  # as there is no search path for DLLs.
669832001f49Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
66997ec3b29aSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
670032001f49Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
670132001f49Smrg	  _LT_TAGVAR(always_export_symbols, $1)=no
670232001f49Smrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
670332001f49Smrg
670432001f49Smrg	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
67057ec3b29aSmrg	    _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'
67067ec3b29aSmrg	    # If the export-symbols file already is a .def file, use it as
67077ec3b29aSmrg	    # is; otherwise, prepend EXPORTS...
67087ec3b29aSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
67097ec3b29aSmrg              cp $export_symbols $output_objdir/$soname.def;
67107ec3b29aSmrg            else
67117ec3b29aSmrg              echo EXPORTS > $output_objdir/$soname.def;
67127ec3b29aSmrg              cat $export_symbols >> $output_objdir/$soname.def;
67137ec3b29aSmrg            fi~
67147ec3b29aSmrg            $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'
671532001f49Smrg	  else
671632001f49Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
671732001f49Smrg	  fi
671832001f49Smrg	  ;;
671932001f49Smrg	esac
672032001f49Smrg	;;
672132001f49Smrg      darwin* | rhapsody*)
672232001f49Smrg        _LT_DARWIN_LINKER_FEATURES($1)
672332001f49Smrg	;;
672432001f49Smrg
67257ec3b29aSmrg      os2*)
67267ec3b29aSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
67277ec3b29aSmrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
67287ec3b29aSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
67297ec3b29aSmrg	shrext_cmds=.dll
67307ec3b29aSmrg	_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
67317ec3b29aSmrg	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
67327ec3b29aSmrg	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
67337ec3b29aSmrg	  $ECHO EXPORTS >> $output_objdir/$libname.def~
67347ec3b29aSmrg	  emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
67357ec3b29aSmrg	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
67367ec3b29aSmrg	  emximp -o $lib $output_objdir/$libname.def'
67377ec3b29aSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
67387ec3b29aSmrg	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
67397ec3b29aSmrg	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
67407ec3b29aSmrg	  $ECHO EXPORTS >> $output_objdir/$libname.def~
67417ec3b29aSmrg	  prefix_cmds="$SED"~
67427ec3b29aSmrg	  if test EXPORTS = "`$SED 1q $export_symbols`"; then
67437ec3b29aSmrg	    prefix_cmds="$prefix_cmds -e 1d";
67447ec3b29aSmrg	  fi~
67457ec3b29aSmrg	  prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
67467ec3b29aSmrg	  cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
67477ec3b29aSmrg	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
67487ec3b29aSmrg	  emximp -o $lib $output_objdir/$libname.def'
67497ec3b29aSmrg	_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
67507ec3b29aSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
67517ec3b29aSmrg	;;
67527ec3b29aSmrg
675332001f49Smrg      dgux*)
675432001f49Smrg        case $cc_basename in
675532001f49Smrg          ec++*)
675632001f49Smrg	    # FIXME: insert proper C++ library support
675732001f49Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
675832001f49Smrg	    ;;
675932001f49Smrg          ghcx*)
676032001f49Smrg	    # Green Hills C++ Compiler
676132001f49Smrg	    # FIXME: insert proper C++ library support
676232001f49Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
676332001f49Smrg	    ;;
676432001f49Smrg          *)
676532001f49Smrg	    # FIXME: insert proper C++ library support
676632001f49Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
676732001f49Smrg	    ;;
676832001f49Smrg        esac
676932001f49Smrg        ;;
677032001f49Smrg
677132001f49Smrg      freebsd2.*)
677232001f49Smrg        # C++ shared libraries reported to be fairly broken before
677332001f49Smrg	# switch to ELF
677432001f49Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
677532001f49Smrg        ;;
677632001f49Smrg
677732001f49Smrg      freebsd-elf*)
677832001f49Smrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
677932001f49Smrg        ;;
678032001f49Smrg
678132001f49Smrg      freebsd* | dragonfly*)
678232001f49Smrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
678332001f49Smrg        # conventions
678432001f49Smrg        _LT_TAGVAR(ld_shlibs, $1)=yes
678532001f49Smrg        ;;
678632001f49Smrg
678732001f49Smrg      haiku*)
67887ec3b29aSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
678932001f49Smrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
679032001f49Smrg        ;;
679132001f49Smrg
679232001f49Smrg      hpux9*)
67937ec3b29aSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
679432001f49Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
67957ec3b29aSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
679632001f49Smrg        _LT_TAGVAR(hardcode_direct, $1)=yes
679732001f49Smrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
679832001f49Smrg				             # but as the default
679932001f49Smrg				             # location of the library.
680032001f49Smrg
680132001f49Smrg        case $cc_basename in
680232001f49Smrg          CC*)
680332001f49Smrg            # FIXME: insert proper C++ library support
680432001f49Smrg            _LT_TAGVAR(ld_shlibs, $1)=no
680532001f49Smrg            ;;
680632001f49Smrg          aCC*)
68077ec3b29aSmrg            _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'
680832001f49Smrg            # Commands to make compiler produce verbose output that lists
680932001f49Smrg            # what "hidden" libraries, object files and flags are used when
681032001f49Smrg            # linking a shared library.
681132001f49Smrg            #
681232001f49Smrg            # There doesn't appear to be a way to prevent this compiler from
681332001f49Smrg            # explicitly linking system object files so we need to strip them
681432001f49Smrg            # from the output so that they don't get included in the library
681532001f49Smrg            # dependencies.
68167ec3b29aSmrg            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"'
681732001f49Smrg            ;;
681832001f49Smrg          *)
68197ec3b29aSmrg            if test yes = "$GXX"; then
68207ec3b29aSmrg              _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'
682132001f49Smrg            else
682232001f49Smrg              # FIXME: insert proper C++ library support
682332001f49Smrg              _LT_TAGVAR(ld_shlibs, $1)=no
682432001f49Smrg            fi
682532001f49Smrg            ;;
682632001f49Smrg        esac
682732001f49Smrg        ;;
682832001f49Smrg
682932001f49Smrg      hpux10*|hpux11*)
68307ec3b29aSmrg        if test no = "$with_gnu_ld"; then
68317ec3b29aSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
683232001f49Smrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
683332001f49Smrg
683432001f49Smrg          case $host_cpu in
683532001f49Smrg            hppa*64*|ia64*)
683632001f49Smrg              ;;
683732001f49Smrg            *)
68387ec3b29aSmrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
683932001f49Smrg              ;;
684032001f49Smrg          esac
684132001f49Smrg        fi
684232001f49Smrg        case $host_cpu in
684332001f49Smrg          hppa*64*|ia64*)
684432001f49Smrg            _LT_TAGVAR(hardcode_direct, $1)=no
684532001f49Smrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
684632001f49Smrg            ;;
684732001f49Smrg          *)
684832001f49Smrg            _LT_TAGVAR(hardcode_direct, $1)=yes
684932001f49Smrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
685032001f49Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
685132001f49Smrg					         # but as the default
685232001f49Smrg					         # location of the library.
685332001f49Smrg            ;;
685432001f49Smrg        esac
685532001f49Smrg
685632001f49Smrg        case $cc_basename in
685732001f49Smrg          CC*)
685832001f49Smrg	    # FIXME: insert proper C++ library support
685932001f49Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
686032001f49Smrg	    ;;
686132001f49Smrg          aCC*)
686232001f49Smrg	    case $host_cpu in
686332001f49Smrg	      hppa*64*)
68647ec3b29aSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
686532001f49Smrg	        ;;
686632001f49Smrg	      ia64*)
68677ec3b29aSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
686832001f49Smrg	        ;;
686932001f49Smrg	      *)
68707ec3b29aSmrg	        _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'
687132001f49Smrg	        ;;
687232001f49Smrg	    esac
687332001f49Smrg	    # Commands to make compiler produce verbose output that lists
687432001f49Smrg	    # what "hidden" libraries, object files and flags are used when
687532001f49Smrg	    # linking a shared library.
687632001f49Smrg	    #
687732001f49Smrg	    # There doesn't appear to be a way to prevent this compiler from
687832001f49Smrg	    # explicitly linking system object files so we need to strip them
687932001f49Smrg	    # from the output so that they don't get included in the library
688032001f49Smrg	    # dependencies.
68817ec3b29aSmrg	    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"'
688232001f49Smrg	    ;;
688332001f49Smrg          *)
68847ec3b29aSmrg	    if test yes = "$GXX"; then
68857ec3b29aSmrg	      if test no = "$with_gnu_ld"; then
688632001f49Smrg	        case $host_cpu in
688732001f49Smrg	          hppa*64*)
68887ec3b29aSmrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
688932001f49Smrg	            ;;
689032001f49Smrg	          ia64*)
68917ec3b29aSmrg	            _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'
689232001f49Smrg	            ;;
689332001f49Smrg	          *)
68947ec3b29aSmrg	            _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'
689532001f49Smrg	            ;;
689632001f49Smrg	        esac
689732001f49Smrg	      fi
689832001f49Smrg	    else
689932001f49Smrg	      # FIXME: insert proper C++ library support
690032001f49Smrg	      _LT_TAGVAR(ld_shlibs, $1)=no
690132001f49Smrg	    fi
690232001f49Smrg	    ;;
690332001f49Smrg        esac
690432001f49Smrg        ;;
690532001f49Smrg
690632001f49Smrg      interix[[3-9]]*)
690732001f49Smrg	_LT_TAGVAR(hardcode_direct, $1)=no
690832001f49Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
69097ec3b29aSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
69107ec3b29aSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
691132001f49Smrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
691232001f49Smrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
691332001f49Smrg	# default) and relocated if they conflict, which is a slow very memory
691432001f49Smrg	# consuming and fragmenting process.  To avoid this, we pick a random,
691532001f49Smrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
691632001f49Smrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
69177ec3b29aSmrg	_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'
69187ec3b29aSmrg	_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'
691932001f49Smrg	;;
692032001f49Smrg      irix5* | irix6*)
692132001f49Smrg        case $cc_basename in
692232001f49Smrg          CC*)
692332001f49Smrg	    # SGI C++
69247ec3b29aSmrg	    _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'
692532001f49Smrg
692632001f49Smrg	    # Archives containing C++ object files must be created using
692732001f49Smrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
692832001f49Smrg	    # necessary to make sure instantiated templates are included
692932001f49Smrg	    # in the archive.
693032001f49Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
693132001f49Smrg	    ;;
693232001f49Smrg          *)
69337ec3b29aSmrg	    if test yes = "$GXX"; then
69347ec3b29aSmrg	      if test no = "$with_gnu_ld"; then
69357ec3b29aSmrg	        _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'
693632001f49Smrg	      else
69377ec3b29aSmrg	        _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'
693832001f49Smrg	      fi
693932001f49Smrg	    fi
694032001f49Smrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
694132001f49Smrg	    ;;
694232001f49Smrg        esac
69437ec3b29aSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
694432001f49Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
694532001f49Smrg        _LT_TAGVAR(inherit_rpath, $1)=yes
694632001f49Smrg        ;;
694732001f49Smrg
694832001f49Smrg      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
694932001f49Smrg        case $cc_basename in
695032001f49Smrg          KCC*)
695132001f49Smrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
695232001f49Smrg
695332001f49Smrg	    # KCC will only create a shared library if the output file
695432001f49Smrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
695532001f49Smrg	    # to its proper name (with version) after linking.
69567ec3b29aSmrg	    _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'
69577ec3b29aSmrg	    _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'
695832001f49Smrg	    # Commands to make compiler produce verbose output that lists
695932001f49Smrg	    # what "hidden" libraries, object files and flags are used when
696032001f49Smrg	    # linking a shared library.
696132001f49Smrg	    #
696232001f49Smrg	    # There doesn't appear to be a way to prevent this compiler from
696332001f49Smrg	    # explicitly linking system object files so we need to strip them
696432001f49Smrg	    # from the output so that they don't get included in the library
696532001f49Smrg	    # dependencies.
69667ec3b29aSmrg	    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"'
696732001f49Smrg
69687ec3b29aSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
69697ec3b29aSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
697032001f49Smrg
697132001f49Smrg	    # Archives containing C++ object files must be created using
697232001f49Smrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
697332001f49Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
697432001f49Smrg	    ;;
697532001f49Smrg	  icpc* | ecpc* )
697632001f49Smrg	    # Intel C++
697732001f49Smrg	    with_gnu_ld=yes
697832001f49Smrg	    # version 8.0 and above of icpc choke on multiply defined symbols
697932001f49Smrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
698032001f49Smrg	    # earlier do not add the objects themselves.
698132001f49Smrg	    case `$CC -V 2>&1` in
698232001f49Smrg	      *"Version 7."*)
69837ec3b29aSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
69847ec3b29aSmrg		_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'
698532001f49Smrg		;;
698632001f49Smrg	      *)  # Version 8.0 or newer
698732001f49Smrg	        tmp_idyn=
698832001f49Smrg	        case $host_cpu in
698932001f49Smrg		  ia64*) tmp_idyn=' -i_dynamic';;
699032001f49Smrg		esac
69917ec3b29aSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
69927ec3b29aSmrg		_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'
699332001f49Smrg		;;
699432001f49Smrg	    esac
699532001f49Smrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
69967ec3b29aSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
69977ec3b29aSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
69987ec3b29aSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
699932001f49Smrg	    ;;
700032001f49Smrg          pgCC* | pgcpp*)
700132001f49Smrg            # Portland Group C++ compiler
700232001f49Smrg	    case `$CC -V` in
700332001f49Smrg	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
700432001f49Smrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
70057ec3b29aSmrg               rm -rf $tpldir~
70067ec3b29aSmrg               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
70077ec3b29aSmrg               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
700832001f49Smrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
70097ec3b29aSmrg                rm -rf $tpldir~
70107ec3b29aSmrg                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
70117ec3b29aSmrg                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
70127ec3b29aSmrg                $RANLIB $oldlib'
701332001f49Smrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
70147ec3b29aSmrg                rm -rf $tpldir~
70157ec3b29aSmrg                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
70167ec3b29aSmrg                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
701732001f49Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
70187ec3b29aSmrg                rm -rf $tpldir~
70197ec3b29aSmrg                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
70207ec3b29aSmrg                $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'
702132001f49Smrg	      ;;
702232001f49Smrg	    *) # Version 6 and above use weak symbols
70237ec3b29aSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
70247ec3b29aSmrg	      _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'
702532001f49Smrg	      ;;
702632001f49Smrg	    esac
702732001f49Smrg
70287ec3b29aSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
70297ec3b29aSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
70307ec3b29aSmrg	    _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'
703132001f49Smrg            ;;
703232001f49Smrg	  cxx*)
703332001f49Smrg	    # Compaq C++
70347ec3b29aSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
70357ec3b29aSmrg	    _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'
703632001f49Smrg
703732001f49Smrg	    runpath_var=LD_RUN_PATH
703832001f49Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
703932001f49Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
704032001f49Smrg
704132001f49Smrg	    # Commands to make compiler produce verbose output that lists
704232001f49Smrg	    # what "hidden" libraries, object files and flags are used when
704332001f49Smrg	    # linking a shared library.
704432001f49Smrg	    #
704532001f49Smrg	    # There doesn't appear to be a way to prevent this compiler from
704632001f49Smrg	    # explicitly linking system object files so we need to strip them
704732001f49Smrg	    # from the output so that they don't get included in the library
704832001f49Smrg	    # dependencies.
70497ec3b29aSmrg	    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'
705032001f49Smrg	    ;;
705132001f49Smrg	  xl* | mpixl* | bgxl*)
705232001f49Smrg	    # IBM XL 8.0 on PPC, with GNU ld
70537ec3b29aSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
70547ec3b29aSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
70557ec3b29aSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
70567ec3b29aSmrg	    if test yes = "$supports_anon_versioning"; then
705732001f49Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
70587ec3b29aSmrg                cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
70597ec3b29aSmrg                echo "local: *; };" >> $output_objdir/$libname.ver~
70607ec3b29aSmrg                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
706132001f49Smrg	    fi
706232001f49Smrg	    ;;
706332001f49Smrg	  *)
706432001f49Smrg	    case `$CC -V 2>&1 | sed 5q` in
706532001f49Smrg	    *Sun\ C*)
706632001f49Smrg	      # Sun C++ 5.9
706732001f49Smrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
70687ec3b29aSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
70697ec3b29aSmrg	      _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'
707032001f49Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
70717ec3b29aSmrg	      _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'
707232001f49Smrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
707332001f49Smrg
707432001f49Smrg	      # Not sure whether something based on
707532001f49Smrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
707632001f49Smrg	      # would be better.
707732001f49Smrg	      output_verbose_link_cmd='func_echo_all'
707832001f49Smrg
707932001f49Smrg	      # Archives containing C++ object files must be created using
708032001f49Smrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
708132001f49Smrg	      # necessary to make sure instantiated templates are included
708232001f49Smrg	      # in the archive.
708332001f49Smrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
708432001f49Smrg	      ;;
708532001f49Smrg	    esac
708632001f49Smrg	    ;;
708732001f49Smrg	esac
708832001f49Smrg	;;
708932001f49Smrg
709032001f49Smrg      lynxos*)
709132001f49Smrg        # FIXME: insert proper C++ library support
709232001f49Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
709332001f49Smrg	;;
709432001f49Smrg
709532001f49Smrg      m88k*)
709632001f49Smrg        # FIXME: insert proper C++ library support
709732001f49Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
709832001f49Smrg	;;
709932001f49Smrg
710032001f49Smrg      mvs*)
710132001f49Smrg        case $cc_basename in
710232001f49Smrg          cxx*)
710332001f49Smrg	    # FIXME: insert proper C++ library support
710432001f49Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
710532001f49Smrg	    ;;
710632001f49Smrg	  *)
710732001f49Smrg	    # FIXME: insert proper C++ library support
710832001f49Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
710932001f49Smrg	    ;;
711032001f49Smrg	esac
711132001f49Smrg	;;
711232001f49Smrg
711332001f49Smrg      netbsd*)
711432001f49Smrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
711532001f49Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
711632001f49Smrg	  wlarc=
711732001f49Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
711832001f49Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
711932001f49Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
712032001f49Smrg	fi
712132001f49Smrg	# Workaround some broken pre-1.5 toolchains
712232001f49Smrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
712332001f49Smrg	;;
712432001f49Smrg
712532001f49Smrg      *nto* | *qnx*)
712632001f49Smrg        _LT_TAGVAR(ld_shlibs, $1)=yes
712732001f49Smrg	;;
712832001f49Smrg
71297ec3b29aSmrg      openbsd* | bitrig*)
713032001f49Smrg	if test -f /usr/libexec/ld.so; then
713132001f49Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
713232001f49Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
713332001f49Smrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
713432001f49Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
71357ec3b29aSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
71367ec3b29aSmrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
71377ec3b29aSmrg	    _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'
71387ec3b29aSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
71397ec3b29aSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
714032001f49Smrg	  fi
714132001f49Smrg	  output_verbose_link_cmd=func_echo_all
714232001f49Smrg	else
714332001f49Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
714432001f49Smrg	fi
714532001f49Smrg	;;
714632001f49Smrg
714732001f49Smrg      osf3* | osf4* | osf5*)
714832001f49Smrg        case $cc_basename in
714932001f49Smrg          KCC*)
715032001f49Smrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
715132001f49Smrg
715232001f49Smrg	    # KCC will only create a shared library if the output file
715332001f49Smrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
715432001f49Smrg	    # to its proper name (with version) after linking.
71557ec3b29aSmrg	    _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'
715632001f49Smrg
71577ec3b29aSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
715832001f49Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
715932001f49Smrg
716032001f49Smrg	    # Archives containing C++ object files must be created using
716132001f49Smrg	    # the KAI C++ compiler.
716232001f49Smrg	    case $host in
716332001f49Smrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
716432001f49Smrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
716532001f49Smrg	    esac
716632001f49Smrg	    ;;
716732001f49Smrg          RCC*)
716832001f49Smrg	    # Rational C++ 2.4.1
716932001f49Smrg	    # FIXME: insert proper C++ library support
717032001f49Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
717132001f49Smrg	    ;;
717232001f49Smrg          cxx*)
717332001f49Smrg	    case $host in
717432001f49Smrg	      osf3*)
71757ec3b29aSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
71767ec3b29aSmrg	        _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'
71777ec3b29aSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
717832001f49Smrg		;;
717932001f49Smrg	      *)
718032001f49Smrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
71817ec3b29aSmrg	        _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'
718232001f49Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
71837ec3b29aSmrg                  echo "-hidden">> $lib.exp~
71847ec3b29aSmrg                  $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~
71857ec3b29aSmrg                  $RM $lib.exp'
718632001f49Smrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
718732001f49Smrg		;;
718832001f49Smrg	    esac
718932001f49Smrg
719032001f49Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
719132001f49Smrg
719232001f49Smrg	    # Commands to make compiler produce verbose output that lists
719332001f49Smrg	    # what "hidden" libraries, object files and flags are used when
719432001f49Smrg	    # linking a shared library.
719532001f49Smrg	    #
719632001f49Smrg	    # There doesn't appear to be a way to prevent this compiler from
719732001f49Smrg	    # explicitly linking system object files so we need to strip them
719832001f49Smrg	    # from the output so that they don't get included in the library
719932001f49Smrg	    # dependencies.
72007ec3b29aSmrg	    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"'
720132001f49Smrg	    ;;
720232001f49Smrg	  *)
72037ec3b29aSmrg	    if test yes,no = "$GXX,$with_gnu_ld"; then
72047ec3b29aSmrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
720532001f49Smrg	      case $host in
720632001f49Smrg	        osf3*)
72077ec3b29aSmrg	          _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'
720832001f49Smrg		  ;;
720932001f49Smrg	        *)
72107ec3b29aSmrg	          _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'
721132001f49Smrg		  ;;
721232001f49Smrg	      esac
721332001f49Smrg
72147ec3b29aSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
721532001f49Smrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
721632001f49Smrg
721732001f49Smrg	      # Commands to make compiler produce verbose output that lists
721832001f49Smrg	      # what "hidden" libraries, object files and flags are used when
721932001f49Smrg	      # linking a shared library.
722032001f49Smrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
722132001f49Smrg
722232001f49Smrg	    else
722332001f49Smrg	      # FIXME: insert proper C++ library support
722432001f49Smrg	      _LT_TAGVAR(ld_shlibs, $1)=no
722532001f49Smrg	    fi
722632001f49Smrg	    ;;
722732001f49Smrg        esac
722832001f49Smrg        ;;
722932001f49Smrg
723032001f49Smrg      psos*)
723132001f49Smrg        # FIXME: insert proper C++ library support
723232001f49Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
723332001f49Smrg        ;;
723432001f49Smrg
723532001f49Smrg      sunos4*)
723632001f49Smrg        case $cc_basename in
723732001f49Smrg          CC*)
723832001f49Smrg	    # Sun C++ 4.x
723932001f49Smrg	    # FIXME: insert proper C++ library support
724032001f49Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
724132001f49Smrg	    ;;
724232001f49Smrg          lcc*)
724332001f49Smrg	    # Lucid
724432001f49Smrg	    # FIXME: insert proper C++ library support
724532001f49Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
724632001f49Smrg	    ;;
724732001f49Smrg          *)
724832001f49Smrg	    # FIXME: insert proper C++ library support
724932001f49Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
725032001f49Smrg	    ;;
725132001f49Smrg        esac
725232001f49Smrg        ;;
725332001f49Smrg
725432001f49Smrg      solaris*)
725532001f49Smrg        case $cc_basename in
725632001f49Smrg          CC* | sunCC*)
725732001f49Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
725832001f49Smrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
725932001f49Smrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
72607ec3b29aSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
726132001f49Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
72627ec3b29aSmrg              $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'
726332001f49Smrg
726432001f49Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
726532001f49Smrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
726632001f49Smrg	    case $host_os in
726732001f49Smrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
726832001f49Smrg	      *)
726932001f49Smrg		# The compiler driver will combine and reorder linker options,
72707ec3b29aSmrg		# but understands '-z linker_flag'.
727132001f49Smrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
727232001f49Smrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
727332001f49Smrg	        ;;
727432001f49Smrg	    esac
727532001f49Smrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
727632001f49Smrg
727732001f49Smrg	    output_verbose_link_cmd='func_echo_all'
727832001f49Smrg
727932001f49Smrg	    # Archives containing C++ object files must be created using
728032001f49Smrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
728132001f49Smrg	    # necessary to make sure instantiated templates are included
728232001f49Smrg	    # in the archive.
728332001f49Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
728432001f49Smrg	    ;;
728532001f49Smrg          gcx*)
728632001f49Smrg	    # Green Hills C++ Compiler
72877ec3b29aSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
728832001f49Smrg
728932001f49Smrg	    # The C++ compiler must be used to create the archive.
729032001f49Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
729132001f49Smrg	    ;;
729232001f49Smrg          *)
729332001f49Smrg	    # GNU C++ compiler with Solaris linker
72947ec3b29aSmrg	    if test yes,no = "$GXX,$with_gnu_ld"; then
72957ec3b29aSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
729632001f49Smrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
72977ec3b29aSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
729832001f49Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
72997ec3b29aSmrg                  $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'
730032001f49Smrg
730132001f49Smrg	        # Commands to make compiler produce verbose output that lists
730232001f49Smrg	        # what "hidden" libraries, object files and flags are used when
730332001f49Smrg	        # linking a shared library.
730432001f49Smrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
730532001f49Smrg	      else
73067ec3b29aSmrg	        # g++ 2.7 appears to require '-G' NOT '-shared' on this
730732001f49Smrg	        # platform.
73087ec3b29aSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
730932001f49Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
73107ec3b29aSmrg                  $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'
731132001f49Smrg
731232001f49Smrg	        # Commands to make compiler produce verbose output that lists
731332001f49Smrg	        # what "hidden" libraries, object files and flags are used when
731432001f49Smrg	        # linking a shared library.
731532001f49Smrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
731632001f49Smrg	      fi
731732001f49Smrg
73187ec3b29aSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
731932001f49Smrg	      case $host_os in
732032001f49Smrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
732132001f49Smrg		*)
73227ec3b29aSmrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
732332001f49Smrg		  ;;
732432001f49Smrg	      esac
732532001f49Smrg	    fi
732632001f49Smrg	    ;;
732732001f49Smrg        esac
732832001f49Smrg        ;;
732932001f49Smrg
733032001f49Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
73317ec3b29aSmrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
733232001f49Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
733332001f49Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
733432001f49Smrg      runpath_var='LD_RUN_PATH'
733532001f49Smrg
733632001f49Smrg      case $cc_basename in
733732001f49Smrg        CC*)
73387ec3b29aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73397ec3b29aSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
734032001f49Smrg	  ;;
734132001f49Smrg	*)
73427ec3b29aSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73437ec3b29aSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
734432001f49Smrg	  ;;
734532001f49Smrg      esac
734632001f49Smrg      ;;
734732001f49Smrg
734832001f49Smrg      sysv5* | sco3.2v5* | sco5v6*)
73497ec3b29aSmrg	# Note: We CANNOT use -z defs as we might desire, because we do not
735032001f49Smrg	# link with -lc, and that would cause any symbols used from libc to
735132001f49Smrg	# always be unresolved, which means just about no library would
735232001f49Smrg	# ever link correctly.  If we're not using GNU ld we use -z text
735332001f49Smrg	# though, which does catch some bad symbols but isn't as heavy-handed
735432001f49Smrg	# as -z defs.
73557ec3b29aSmrg	_LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
73567ec3b29aSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
735732001f49Smrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
735832001f49Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
73597ec3b29aSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
736032001f49Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
736132001f49Smrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
73627ec3b29aSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
736332001f49Smrg	runpath_var='LD_RUN_PATH'
736432001f49Smrg
736532001f49Smrg	case $cc_basename in
736632001f49Smrg          CC*)
73677ec3b29aSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73687ec3b29aSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
736932001f49Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
73707ec3b29aSmrg              '"$_LT_TAGVAR(old_archive_cmds, $1)"
737132001f49Smrg	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
73727ec3b29aSmrg              '"$_LT_TAGVAR(reload_cmds, $1)"
737332001f49Smrg	    ;;
737432001f49Smrg	  *)
73757ec3b29aSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
73767ec3b29aSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
737732001f49Smrg	    ;;
737832001f49Smrg	esac
737932001f49Smrg      ;;
738032001f49Smrg
738132001f49Smrg      tandem*)
738232001f49Smrg        case $cc_basename in
738332001f49Smrg          NCC*)
738432001f49Smrg	    # NonStop-UX NCC 3.20
738532001f49Smrg	    # FIXME: insert proper C++ library support
738632001f49Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
738732001f49Smrg	    ;;
738832001f49Smrg          *)
738932001f49Smrg	    # FIXME: insert proper C++ library support
739032001f49Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
739132001f49Smrg	    ;;
739232001f49Smrg        esac
739332001f49Smrg        ;;
739432001f49Smrg
739532001f49Smrg      vxworks*)
739632001f49Smrg        # FIXME: insert proper C++ library support
739732001f49Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
739832001f49Smrg        ;;
739932001f49Smrg
740032001f49Smrg      *)
740132001f49Smrg        # FIXME: insert proper C++ library support
740232001f49Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
740332001f49Smrg        ;;
740432001f49Smrg    esac
740532001f49Smrg
740632001f49Smrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
74077ec3b29aSmrg    test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
740832001f49Smrg
74097ec3b29aSmrg    _LT_TAGVAR(GCC, $1)=$GXX
74107ec3b29aSmrg    _LT_TAGVAR(LD, $1)=$LD
741132001f49Smrg
741232001f49Smrg    ## CAVEAT EMPTOR:
741332001f49Smrg    ## There is no encapsulation within the following macros, do not change
741432001f49Smrg    ## the running order or otherwise move them around unless you know exactly
741532001f49Smrg    ## what you are doing...
741632001f49Smrg    _LT_SYS_HIDDEN_LIBDEPS($1)
741732001f49Smrg    _LT_COMPILER_PIC($1)
741832001f49Smrg    _LT_COMPILER_C_O($1)
741932001f49Smrg    _LT_COMPILER_FILE_LOCKS($1)
742032001f49Smrg    _LT_LINKER_SHLIBS($1)
742132001f49Smrg    _LT_SYS_DYNAMIC_LINKER($1)
742232001f49Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
742332001f49Smrg
742432001f49Smrg    _LT_CONFIG($1)
742532001f49Smrg  fi # test -n "$compiler"
742632001f49Smrg
742732001f49Smrg  CC=$lt_save_CC
742832001f49Smrg  CFLAGS=$lt_save_CFLAGS
742932001f49Smrg  LDCXX=$LD
743032001f49Smrg  LD=$lt_save_LD
743132001f49Smrg  GCC=$lt_save_GCC
743232001f49Smrg  with_gnu_ld=$lt_save_with_gnu_ld
743332001f49Smrg  lt_cv_path_LDCXX=$lt_cv_path_LD
743432001f49Smrg  lt_cv_path_LD=$lt_save_path_LD
743532001f49Smrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
743632001f49Smrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
74377ec3b29aSmrgfi # test yes != "$_lt_caught_CXX_error"
743832001f49Smrg
743932001f49SmrgAC_LANG_POP
744032001f49Smrg])# _LT_LANG_CXX_CONFIG
744132001f49Smrg
744232001f49Smrg
744332001f49Smrg# _LT_FUNC_STRIPNAME_CNF
744432001f49Smrg# ----------------------
744532001f49Smrg# func_stripname_cnf prefix suffix name
744632001f49Smrg# strip PREFIX and SUFFIX off of NAME.
744732001f49Smrg# PREFIX and SUFFIX must not contain globbing or regex special
744832001f49Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading
744932001f49Smrg# dot (in which case that matches only a dot).
745032001f49Smrg#
745132001f49Smrg# This function is identical to the (non-XSI) version of func_stripname,
745232001f49Smrg# except this one can be used by m4 code that may be executed by configure,
745332001f49Smrg# rather than the libtool script.
745432001f49Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
745532001f49SmrgAC_REQUIRE([_LT_DECL_SED])
745632001f49SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
745732001f49Smrgfunc_stripname_cnf ()
745832001f49Smrg{
74597ec3b29aSmrg  case @S|@2 in
74607ec3b29aSmrg  .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
74617ec3b29aSmrg  *)  func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
746232001f49Smrg  esac
746332001f49Smrg} # func_stripname_cnf
746432001f49Smrg])# _LT_FUNC_STRIPNAME_CNF
746532001f49Smrg
74667ec3b29aSmrg
746732001f49Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
746832001f49Smrg# ---------------------------------
746932001f49Smrg# Figure out "hidden" library dependencies from verbose
747032001f49Smrg# compiler output when linking a shared library.
747132001f49Smrg# Parse the compiler output and extract the necessary
747232001f49Smrg# objects, libraries and library flags.
747332001f49Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
747432001f49Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
747532001f49SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
747632001f49Smrg# Dependencies to place before and after the object being linked:
747732001f49Smrg_LT_TAGVAR(predep_objects, $1)=
747832001f49Smrg_LT_TAGVAR(postdep_objects, $1)=
747932001f49Smrg_LT_TAGVAR(predeps, $1)=
748032001f49Smrg_LT_TAGVAR(postdeps, $1)=
748132001f49Smrg_LT_TAGVAR(compiler_lib_search_path, $1)=
748232001f49Smrg
748332001f49Smrgdnl we can't use the lt_simple_compile_test_code here,
748432001f49Smrgdnl because it contains code intended for an executable,
748532001f49Smrgdnl not a library.  It's possible we should let each
748632001f49Smrgdnl tag define a new lt_????_link_test_code variable,
748732001f49Smrgdnl but it's only used here...
748832001f49Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
748932001f49Smrgint a;
749032001f49Smrgvoid foo (void) { a = 0; }
749132001f49Smrg_LT_EOF
749232001f49Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
749332001f49Smrgclass Foo
749432001f49Smrg{
749532001f49Smrgpublic:
749632001f49Smrg  Foo (void) { a = 0; }
749732001f49Smrgprivate:
749832001f49Smrg  int a;
749932001f49Smrg};
750032001f49Smrg_LT_EOF
750132001f49Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
750232001f49Smrg      subroutine foo
750332001f49Smrg      implicit none
750432001f49Smrg      integer*4 a
750532001f49Smrg      a=0
750632001f49Smrg      return
750732001f49Smrg      end
750832001f49Smrg_LT_EOF
750932001f49Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
751032001f49Smrg      subroutine foo
751132001f49Smrg      implicit none
751232001f49Smrg      integer a
751332001f49Smrg      a=0
751432001f49Smrg      return
751532001f49Smrg      end
751632001f49Smrg_LT_EOF
751732001f49Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
751832001f49Smrgpublic class foo {
751932001f49Smrg  private int a;
752032001f49Smrg  public void bar (void) {
752132001f49Smrg    a = 0;
752232001f49Smrg  }
752332001f49Smrg};
752432001f49Smrg_LT_EOF
752532001f49Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
752632001f49Smrgpackage foo
752732001f49Smrgfunc foo() {
752832001f49Smrg}
752932001f49Smrg_LT_EOF
753032001f49Smrg])
753132001f49Smrg
753232001f49Smrg_lt_libdeps_save_CFLAGS=$CFLAGS
753332001f49Smrgcase "$CC $CFLAGS " in #(
753432001f49Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
753532001f49Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
753632001f49Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
753732001f49Smrgesac
753832001f49Smrg
753932001f49Smrgdnl Parse the compiler output and extract the necessary
754032001f49Smrgdnl objects, libraries and library flags.
754132001f49Smrgif AC_TRY_EVAL(ac_compile); then
754232001f49Smrg  # Parse the compiler output and extract the necessary
754332001f49Smrg  # objects, libraries and library flags.
754432001f49Smrg
754532001f49Smrg  # Sentinel used to keep track of whether or not we are before
754632001f49Smrg  # the conftest object file.
754732001f49Smrg  pre_test_object_deps_done=no
754832001f49Smrg
754932001f49Smrg  for p in `eval "$output_verbose_link_cmd"`; do
75507ec3b29aSmrg    case $prev$p in
755132001f49Smrg
755232001f49Smrg    -L* | -R* | -l*)
755332001f49Smrg       # Some compilers place space between "-{L,R}" and the path.
755432001f49Smrg       # Remove the space.
75557ec3b29aSmrg       if test x-L = "$p" ||
75567ec3b29aSmrg          test x-R = "$p"; then
755732001f49Smrg	 prev=$p
755832001f49Smrg	 continue
755932001f49Smrg       fi
756032001f49Smrg
756132001f49Smrg       # Expand the sysroot to ease extracting the directories later.
756232001f49Smrg       if test -z "$prev"; then
756332001f49Smrg         case $p in
756432001f49Smrg         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
756532001f49Smrg         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
756632001f49Smrg         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
756732001f49Smrg         esac
756832001f49Smrg       fi
756932001f49Smrg       case $p in
757032001f49Smrg       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
757132001f49Smrg       esac
75727ec3b29aSmrg       if test no = "$pre_test_object_deps_done"; then
75737ec3b29aSmrg	 case $prev in
757432001f49Smrg	 -L | -R)
757532001f49Smrg	   # Internal compiler library paths should come after those
757632001f49Smrg	   # provided the user.  The postdeps already come after the
757732001f49Smrg	   # user supplied libs so there is no need to process them.
757832001f49Smrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
75797ec3b29aSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
758032001f49Smrg	   else
75817ec3b29aSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
758232001f49Smrg	   fi
758332001f49Smrg	   ;;
758432001f49Smrg	 # The "-l" case would never come before the object being
758532001f49Smrg	 # linked, so don't bother handling this case.
758632001f49Smrg	 esac
758732001f49Smrg       else
758832001f49Smrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
75897ec3b29aSmrg	   _LT_TAGVAR(postdeps, $1)=$prev$p
759032001f49Smrg	 else
75917ec3b29aSmrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
759232001f49Smrg	 fi
759332001f49Smrg       fi
759432001f49Smrg       prev=
759532001f49Smrg       ;;
759632001f49Smrg
759732001f49Smrg    *.lto.$objext) ;; # Ignore GCC LTO objects
759832001f49Smrg    *.$objext)
759932001f49Smrg       # This assumes that the test object file only shows up
760032001f49Smrg       # once in the compiler output.
760132001f49Smrg       if test "$p" = "conftest.$objext"; then
760232001f49Smrg	 pre_test_object_deps_done=yes
760332001f49Smrg	 continue
760432001f49Smrg       fi
760532001f49Smrg
76067ec3b29aSmrg       if test no = "$pre_test_object_deps_done"; then
760732001f49Smrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
76087ec3b29aSmrg	   _LT_TAGVAR(predep_objects, $1)=$p
760932001f49Smrg	 else
761032001f49Smrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
761132001f49Smrg	 fi
761232001f49Smrg       else
761332001f49Smrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
76147ec3b29aSmrg	   _LT_TAGVAR(postdep_objects, $1)=$p
761532001f49Smrg	 else
761632001f49Smrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
761732001f49Smrg	 fi
761832001f49Smrg       fi
761932001f49Smrg       ;;
762032001f49Smrg
762132001f49Smrg    *) ;; # Ignore the rest.
762232001f49Smrg
762332001f49Smrg    esac
762432001f49Smrg  done
762532001f49Smrg
762632001f49Smrg  # Clean up.
762732001f49Smrg  rm -f a.out a.exe
762832001f49Smrgelse
762932001f49Smrg  echo "libtool.m4: error: problem compiling $1 test program"
763032001f49Smrgfi
763132001f49Smrg
763232001f49Smrg$RM -f confest.$objext
763332001f49SmrgCFLAGS=$_lt_libdeps_save_CFLAGS
763432001f49Smrg
763532001f49Smrg# PORTME: override above test on systems where it is broken
763632001f49Smrgm4_if([$1], [CXX],
763732001f49Smrg[case $host_os in
763832001f49Smrginterix[[3-9]]*)
763932001f49Smrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
764032001f49Smrg  # hack all around it, let's just trust "g++" to DTRT.
764132001f49Smrg  _LT_TAGVAR(predep_objects,$1)=
764232001f49Smrg  _LT_TAGVAR(postdep_objects,$1)=
764332001f49Smrg  _LT_TAGVAR(postdeps,$1)=
764432001f49Smrg  ;;
764532001f49Smrgesac
764632001f49Smrg])
764732001f49Smrg
764832001f49Smrgcase " $_LT_TAGVAR(postdeps, $1) " in
764932001f49Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
765032001f49Smrgesac
765132001f49Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
765232001f49Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
76537ec3b29aSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
765432001f49Smrgfi
765532001f49Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
765632001f49Smrg    [The directories searched by this compiler when creating a shared library])
765732001f49Smrg_LT_TAGDECL([], [predep_objects], [1],
765832001f49Smrg    [Dependencies to place before and after the objects being linked to
765932001f49Smrg    create a shared library])
766032001f49Smrg_LT_TAGDECL([], [postdep_objects], [1])
766132001f49Smrg_LT_TAGDECL([], [predeps], [1])
766232001f49Smrg_LT_TAGDECL([], [postdeps], [1])
766332001f49Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
766432001f49Smrg    [The library search path used internally by the compiler when linking
766532001f49Smrg    a shared library])
766632001f49Smrg])# _LT_SYS_HIDDEN_LIBDEPS
766732001f49Smrg
766832001f49Smrg
766932001f49Smrg# _LT_LANG_F77_CONFIG([TAG])
767032001f49Smrg# --------------------------
767132001f49Smrg# Ensure that the configuration variables for a Fortran 77 compiler are
767232001f49Smrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
76737ec3b29aSmrg# to write the compiler configuration to 'libtool'.
767432001f49Smrgm4_defun([_LT_LANG_F77_CONFIG],
767532001f49Smrg[AC_LANG_PUSH(Fortran 77)
76767ec3b29aSmrgif test -z "$F77" || test no = "$F77"; then
767732001f49Smrg  _lt_disable_F77=yes
767832001f49Smrgfi
767932001f49Smrg
768032001f49Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
768132001f49Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
768232001f49Smrg_LT_TAGVAR(always_export_symbols, $1)=no
768332001f49Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
768432001f49Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
768532001f49Smrg_LT_TAGVAR(hardcode_direct, $1)=no
768632001f49Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
768732001f49Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
768832001f49Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
768932001f49Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
769032001f49Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
769132001f49Smrg_LT_TAGVAR(inherit_rpath, $1)=no
769232001f49Smrg_LT_TAGVAR(module_cmds, $1)=
769332001f49Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
769432001f49Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
769532001f49Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
769632001f49Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
769732001f49Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
769832001f49Smrg_LT_TAGVAR(no_undefined_flag, $1)=
769932001f49Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
770032001f49Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
770132001f49Smrg
770232001f49Smrg# Source file extension for f77 test sources.
770332001f49Smrgac_ext=f
770432001f49Smrg
770532001f49Smrg# Object file extension for compiled f77 test sources.
770632001f49Smrgobjext=o
770732001f49Smrg_LT_TAGVAR(objext, $1)=$objext
770832001f49Smrg
770932001f49Smrg# No sense in running all these tests if we already determined that
771032001f49Smrg# the F77 compiler isn't working.  Some variables (like enable_shared)
771132001f49Smrg# are currently assumed to apply to all compilers on this platform,
771232001f49Smrg# and will be corrupted by setting them based on a non-working compiler.
77137ec3b29aSmrgif test yes != "$_lt_disable_F77"; then
771432001f49Smrg  # Code to be used in simple compile tests
771532001f49Smrg  lt_simple_compile_test_code="\
771632001f49Smrg      subroutine t
771732001f49Smrg      return
771832001f49Smrg      end
771932001f49Smrg"
772032001f49Smrg
772132001f49Smrg  # Code to be used in simple link tests
772232001f49Smrg  lt_simple_link_test_code="\
772332001f49Smrg      program t
772432001f49Smrg      end
772532001f49Smrg"
772632001f49Smrg
772732001f49Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
772832001f49Smrg  _LT_TAG_COMPILER
772932001f49Smrg
773032001f49Smrg  # save warnings/boilerplate of simple test code
773132001f49Smrg  _LT_COMPILER_BOILERPLATE
773232001f49Smrg  _LT_LINKER_BOILERPLATE
773332001f49Smrg
773432001f49Smrg  # Allow CC to be a program name with arguments.
77357ec3b29aSmrg  lt_save_CC=$CC
773632001f49Smrg  lt_save_GCC=$GCC
773732001f49Smrg  lt_save_CFLAGS=$CFLAGS
773832001f49Smrg  CC=${F77-"f77"}
773932001f49Smrg  CFLAGS=$FFLAGS
774032001f49Smrg  compiler=$CC
774132001f49Smrg  _LT_TAGVAR(compiler, $1)=$CC
774232001f49Smrg  _LT_CC_BASENAME([$compiler])
774332001f49Smrg  GCC=$G77
774432001f49Smrg  if test -n "$compiler"; then
774532001f49Smrg    AC_MSG_CHECKING([if libtool supports shared libraries])
774632001f49Smrg    AC_MSG_RESULT([$can_build_shared])
774732001f49Smrg
774832001f49Smrg    AC_MSG_CHECKING([whether to build shared libraries])
77497ec3b29aSmrg    test no = "$can_build_shared" && enable_shared=no
775032001f49Smrg
775132001f49Smrg    # On AIX, shared libraries and static libraries use the same namespace, and
775232001f49Smrg    # are all built from PIC.
775332001f49Smrg    case $host_os in
775432001f49Smrg      aix3*)
77557ec3b29aSmrg        test yes = "$enable_shared" && enable_static=no
775632001f49Smrg        if test -n "$RANLIB"; then
775732001f49Smrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
775832001f49Smrg          postinstall_cmds='$RANLIB $lib'
775932001f49Smrg        fi
776032001f49Smrg        ;;
776132001f49Smrg      aix[[4-9]]*)
77627ec3b29aSmrg	if test ia64 != "$host_cpu"; then
77637ec3b29aSmrg	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
77647ec3b29aSmrg	  yes,aix,yes) ;;		# shared object as lib.so file only
77657ec3b29aSmrg	  yes,svr4,*) ;;		# shared object as lib.so archive member only
77667ec3b29aSmrg	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
77677ec3b29aSmrg	  esac
776832001f49Smrg	fi
776932001f49Smrg        ;;
777032001f49Smrg    esac
777132001f49Smrg    AC_MSG_RESULT([$enable_shared])
777232001f49Smrg
777332001f49Smrg    AC_MSG_CHECKING([whether to build static libraries])
777432001f49Smrg    # Make sure either enable_shared or enable_static is yes.
77757ec3b29aSmrg    test yes = "$enable_shared" || enable_static=yes
777632001f49Smrg    AC_MSG_RESULT([$enable_static])
777732001f49Smrg
77787ec3b29aSmrg    _LT_TAGVAR(GCC, $1)=$G77
77797ec3b29aSmrg    _LT_TAGVAR(LD, $1)=$LD
778032001f49Smrg
778132001f49Smrg    ## CAVEAT EMPTOR:
778232001f49Smrg    ## There is no encapsulation within the following macros, do not change
778332001f49Smrg    ## the running order or otherwise move them around unless you know exactly
778432001f49Smrg    ## what you are doing...
778532001f49Smrg    _LT_COMPILER_PIC($1)
778632001f49Smrg    _LT_COMPILER_C_O($1)
778732001f49Smrg    _LT_COMPILER_FILE_LOCKS($1)
778832001f49Smrg    _LT_LINKER_SHLIBS($1)
778932001f49Smrg    _LT_SYS_DYNAMIC_LINKER($1)
779032001f49Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
779132001f49Smrg
779232001f49Smrg    _LT_CONFIG($1)
779332001f49Smrg  fi # test -n "$compiler"
779432001f49Smrg
779532001f49Smrg  GCC=$lt_save_GCC
77967ec3b29aSmrg  CC=$lt_save_CC
77977ec3b29aSmrg  CFLAGS=$lt_save_CFLAGS
77987ec3b29aSmrgfi # test yes != "$_lt_disable_F77"
779932001f49Smrg
780032001f49SmrgAC_LANG_POP
780132001f49Smrg])# _LT_LANG_F77_CONFIG
780232001f49Smrg
780332001f49Smrg
780432001f49Smrg# _LT_LANG_FC_CONFIG([TAG])
780532001f49Smrg# -------------------------
780632001f49Smrg# Ensure that the configuration variables for a Fortran compiler are
780732001f49Smrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
78087ec3b29aSmrg# to write the compiler configuration to 'libtool'.
780932001f49Smrgm4_defun([_LT_LANG_FC_CONFIG],
781032001f49Smrg[AC_LANG_PUSH(Fortran)
781132001f49Smrg
78127ec3b29aSmrgif test -z "$FC" || test no = "$FC"; then
781332001f49Smrg  _lt_disable_FC=yes
781432001f49Smrgfi
781532001f49Smrg
781632001f49Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
781732001f49Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
781832001f49Smrg_LT_TAGVAR(always_export_symbols, $1)=no
781932001f49Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
782032001f49Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
782132001f49Smrg_LT_TAGVAR(hardcode_direct, $1)=no
782232001f49Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
782332001f49Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
782432001f49Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
782532001f49Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
782632001f49Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
782732001f49Smrg_LT_TAGVAR(inherit_rpath, $1)=no
782832001f49Smrg_LT_TAGVAR(module_cmds, $1)=
782932001f49Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
783032001f49Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
783132001f49Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
783232001f49Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
783332001f49Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
783432001f49Smrg_LT_TAGVAR(no_undefined_flag, $1)=
783532001f49Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
783632001f49Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
783732001f49Smrg
783832001f49Smrg# Source file extension for fc test sources.
783932001f49Smrgac_ext=${ac_fc_srcext-f}
784032001f49Smrg
784132001f49Smrg# Object file extension for compiled fc test sources.
784232001f49Smrgobjext=o
784332001f49Smrg_LT_TAGVAR(objext, $1)=$objext
784432001f49Smrg
784532001f49Smrg# No sense in running all these tests if we already determined that
784632001f49Smrg# the FC compiler isn't working.  Some variables (like enable_shared)
784732001f49Smrg# are currently assumed to apply to all compilers on this platform,
784832001f49Smrg# and will be corrupted by setting them based on a non-working compiler.
78497ec3b29aSmrgif test yes != "$_lt_disable_FC"; then
785032001f49Smrg  # Code to be used in simple compile tests
785132001f49Smrg  lt_simple_compile_test_code="\
785232001f49Smrg      subroutine t
785332001f49Smrg      return
785432001f49Smrg      end
785532001f49Smrg"
785632001f49Smrg
785732001f49Smrg  # Code to be used in simple link tests
785832001f49Smrg  lt_simple_link_test_code="\
785932001f49Smrg      program t
786032001f49Smrg      end
786132001f49Smrg"
786232001f49Smrg
786332001f49Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
786432001f49Smrg  _LT_TAG_COMPILER
786532001f49Smrg
786632001f49Smrg  # save warnings/boilerplate of simple test code
786732001f49Smrg  _LT_COMPILER_BOILERPLATE
786832001f49Smrg  _LT_LINKER_BOILERPLATE
786932001f49Smrg
787032001f49Smrg  # Allow CC to be a program name with arguments.
78717ec3b29aSmrg  lt_save_CC=$CC
787232001f49Smrg  lt_save_GCC=$GCC
787332001f49Smrg  lt_save_CFLAGS=$CFLAGS
787432001f49Smrg  CC=${FC-"f95"}
787532001f49Smrg  CFLAGS=$FCFLAGS
787632001f49Smrg  compiler=$CC
787732001f49Smrg  GCC=$ac_cv_fc_compiler_gnu
787832001f49Smrg
787932001f49Smrg  _LT_TAGVAR(compiler, $1)=$CC
788032001f49Smrg  _LT_CC_BASENAME([$compiler])
788132001f49Smrg
788232001f49Smrg  if test -n "$compiler"; then
788332001f49Smrg    AC_MSG_CHECKING([if libtool supports shared libraries])
788432001f49Smrg    AC_MSG_RESULT([$can_build_shared])
788532001f49Smrg
788632001f49Smrg    AC_MSG_CHECKING([whether to build shared libraries])
78877ec3b29aSmrg    test no = "$can_build_shared" && enable_shared=no
788832001f49Smrg
788932001f49Smrg    # On AIX, shared libraries and static libraries use the same namespace, and
789032001f49Smrg    # are all built from PIC.
789132001f49Smrg    case $host_os in
789232001f49Smrg      aix3*)
78937ec3b29aSmrg        test yes = "$enable_shared" && enable_static=no
789432001f49Smrg        if test -n "$RANLIB"; then
789532001f49Smrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
789632001f49Smrg          postinstall_cmds='$RANLIB $lib'
789732001f49Smrg        fi
789832001f49Smrg        ;;
789932001f49Smrg      aix[[4-9]]*)
79007ec3b29aSmrg	if test ia64 != "$host_cpu"; then
79017ec3b29aSmrg	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
79027ec3b29aSmrg	  yes,aix,yes) ;;		# shared object as lib.so file only
79037ec3b29aSmrg	  yes,svr4,*) ;;		# shared object as lib.so archive member only
79047ec3b29aSmrg	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
79057ec3b29aSmrg	  esac
790632001f49Smrg	fi
790732001f49Smrg        ;;
790832001f49Smrg    esac
790932001f49Smrg    AC_MSG_RESULT([$enable_shared])
791032001f49Smrg
791132001f49Smrg    AC_MSG_CHECKING([whether to build static libraries])
791232001f49Smrg    # Make sure either enable_shared or enable_static is yes.
79137ec3b29aSmrg    test yes = "$enable_shared" || enable_static=yes
791432001f49Smrg    AC_MSG_RESULT([$enable_static])
791532001f49Smrg
79167ec3b29aSmrg    _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
79177ec3b29aSmrg    _LT_TAGVAR(LD, $1)=$LD
791832001f49Smrg
791932001f49Smrg    ## CAVEAT EMPTOR:
792032001f49Smrg    ## There is no encapsulation within the following macros, do not change
792132001f49Smrg    ## the running order or otherwise move them around unless you know exactly
792232001f49Smrg    ## what you are doing...
792332001f49Smrg    _LT_SYS_HIDDEN_LIBDEPS($1)
792432001f49Smrg    _LT_COMPILER_PIC($1)
792532001f49Smrg    _LT_COMPILER_C_O($1)
792632001f49Smrg    _LT_COMPILER_FILE_LOCKS($1)
792732001f49Smrg    _LT_LINKER_SHLIBS($1)
792832001f49Smrg    _LT_SYS_DYNAMIC_LINKER($1)
792932001f49Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
793032001f49Smrg
793132001f49Smrg    _LT_CONFIG($1)
793232001f49Smrg  fi # test -n "$compiler"
793332001f49Smrg
793432001f49Smrg  GCC=$lt_save_GCC
793532001f49Smrg  CC=$lt_save_CC
793632001f49Smrg  CFLAGS=$lt_save_CFLAGS
79377ec3b29aSmrgfi # test yes != "$_lt_disable_FC"
793832001f49Smrg
793932001f49SmrgAC_LANG_POP
794032001f49Smrg])# _LT_LANG_FC_CONFIG
794132001f49Smrg
794232001f49Smrg
794332001f49Smrg# _LT_LANG_GCJ_CONFIG([TAG])
794432001f49Smrg# --------------------------
794532001f49Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler
794632001f49Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
79477ec3b29aSmrg# to write the compiler configuration to 'libtool'.
794832001f49Smrgm4_defun([_LT_LANG_GCJ_CONFIG],
794932001f49Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl
795032001f49SmrgAC_LANG_SAVE
795132001f49Smrg
795232001f49Smrg# Source file extension for Java test sources.
795332001f49Smrgac_ext=java
795432001f49Smrg
795532001f49Smrg# Object file extension for compiled Java test sources.
795632001f49Smrgobjext=o
795732001f49Smrg_LT_TAGVAR(objext, $1)=$objext
795832001f49Smrg
795932001f49Smrg# Code to be used in simple compile tests
796032001f49Smrglt_simple_compile_test_code="class foo {}"
796132001f49Smrg
796232001f49Smrg# Code to be used in simple link tests
796332001f49Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
796432001f49Smrg
796532001f49Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
796632001f49Smrg_LT_TAG_COMPILER
796732001f49Smrg
796832001f49Smrg# save warnings/boilerplate of simple test code
796932001f49Smrg_LT_COMPILER_BOILERPLATE
797032001f49Smrg_LT_LINKER_BOILERPLATE
797132001f49Smrg
797232001f49Smrg# Allow CC to be a program name with arguments.
797332001f49Smrglt_save_CC=$CC
797432001f49Smrglt_save_CFLAGS=$CFLAGS
797532001f49Smrglt_save_GCC=$GCC
797632001f49SmrgGCC=yes
797732001f49SmrgCC=${GCJ-"gcj"}
797832001f49SmrgCFLAGS=$GCJFLAGS
797932001f49Smrgcompiler=$CC
798032001f49Smrg_LT_TAGVAR(compiler, $1)=$CC
79817ec3b29aSmrg_LT_TAGVAR(LD, $1)=$LD
798232001f49Smrg_LT_CC_BASENAME([$compiler])
798332001f49Smrg
798432001f49Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
798532001f49Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
798632001f49Smrg
798732001f49Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
798832001f49Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
798932001f49Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
799032001f49Smrg
799132001f49Smrg## CAVEAT EMPTOR:
799232001f49Smrg## There is no encapsulation within the following macros, do not change
799332001f49Smrg## the running order or otherwise move them around unless you know exactly
799432001f49Smrg## what you are doing...
799532001f49Smrgif test -n "$compiler"; then
799632001f49Smrg  _LT_COMPILER_NO_RTTI($1)
799732001f49Smrg  _LT_COMPILER_PIC($1)
799832001f49Smrg  _LT_COMPILER_C_O($1)
799932001f49Smrg  _LT_COMPILER_FILE_LOCKS($1)
800032001f49Smrg  _LT_LINKER_SHLIBS($1)
800132001f49Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
800232001f49Smrg
800332001f49Smrg  _LT_CONFIG($1)
800432001f49Smrgfi
800532001f49Smrg
800632001f49SmrgAC_LANG_RESTORE
800732001f49Smrg
800832001f49SmrgGCC=$lt_save_GCC
800932001f49SmrgCC=$lt_save_CC
801032001f49SmrgCFLAGS=$lt_save_CFLAGS
801132001f49Smrg])# _LT_LANG_GCJ_CONFIG
801232001f49Smrg
801332001f49Smrg
801432001f49Smrg# _LT_LANG_GO_CONFIG([TAG])
801532001f49Smrg# --------------------------
801632001f49Smrg# Ensure that the configuration variables for the GNU Go compiler
801732001f49Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
80187ec3b29aSmrg# to write the compiler configuration to 'libtool'.
801932001f49Smrgm4_defun([_LT_LANG_GO_CONFIG],
802032001f49Smrg[AC_REQUIRE([LT_PROG_GO])dnl
802132001f49SmrgAC_LANG_SAVE
802232001f49Smrg
802332001f49Smrg# Source file extension for Go test sources.
802432001f49Smrgac_ext=go
802532001f49Smrg
802632001f49Smrg# Object file extension for compiled Go test sources.
802732001f49Smrgobjext=o
802832001f49Smrg_LT_TAGVAR(objext, $1)=$objext
802932001f49Smrg
803032001f49Smrg# Code to be used in simple compile tests
803132001f49Smrglt_simple_compile_test_code="package main; func main() { }"
803232001f49Smrg
803332001f49Smrg# Code to be used in simple link tests
803432001f49Smrglt_simple_link_test_code='package main; func main() { }'
803532001f49Smrg
803632001f49Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
803732001f49Smrg_LT_TAG_COMPILER
803832001f49Smrg
803932001f49Smrg# save warnings/boilerplate of simple test code
804032001f49Smrg_LT_COMPILER_BOILERPLATE
804132001f49Smrg_LT_LINKER_BOILERPLATE
804232001f49Smrg
804332001f49Smrg# Allow CC to be a program name with arguments.
804432001f49Smrglt_save_CC=$CC
804532001f49Smrglt_save_CFLAGS=$CFLAGS
804632001f49Smrglt_save_GCC=$GCC
804732001f49SmrgGCC=yes
804832001f49SmrgCC=${GOC-"gccgo"}
804932001f49SmrgCFLAGS=$GOFLAGS
805032001f49Smrgcompiler=$CC
805132001f49Smrg_LT_TAGVAR(compiler, $1)=$CC
80527ec3b29aSmrg_LT_TAGVAR(LD, $1)=$LD
805332001f49Smrg_LT_CC_BASENAME([$compiler])
805432001f49Smrg
805532001f49Smrg# Go did not exist at the time GCC didn't implicitly link libc in.
805632001f49Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
805732001f49Smrg
805832001f49Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
805932001f49Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
806032001f49Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
806132001f49Smrg
806232001f49Smrg## CAVEAT EMPTOR:
806332001f49Smrg## There is no encapsulation within the following macros, do not change
806432001f49Smrg## the running order or otherwise move them around unless you know exactly
806532001f49Smrg## what you are doing...
806632001f49Smrgif test -n "$compiler"; then
806732001f49Smrg  _LT_COMPILER_NO_RTTI($1)
806832001f49Smrg  _LT_COMPILER_PIC($1)
806932001f49Smrg  _LT_COMPILER_C_O($1)
807032001f49Smrg  _LT_COMPILER_FILE_LOCKS($1)
807132001f49Smrg  _LT_LINKER_SHLIBS($1)
807232001f49Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
807332001f49Smrg
807432001f49Smrg  _LT_CONFIG($1)
807532001f49Smrgfi
807632001f49Smrg
807732001f49SmrgAC_LANG_RESTORE
807832001f49Smrg
807932001f49SmrgGCC=$lt_save_GCC
808032001f49SmrgCC=$lt_save_CC
808132001f49SmrgCFLAGS=$lt_save_CFLAGS
808232001f49Smrg])# _LT_LANG_GO_CONFIG
808332001f49Smrg
808432001f49Smrg
808532001f49Smrg# _LT_LANG_RC_CONFIG([TAG])
808632001f49Smrg# -------------------------
808732001f49Smrg# Ensure that the configuration variables for the Windows resource compiler
808832001f49Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
80897ec3b29aSmrg# to write the compiler configuration to 'libtool'.
809032001f49Smrgm4_defun([_LT_LANG_RC_CONFIG],
809132001f49Smrg[AC_REQUIRE([LT_PROG_RC])dnl
809232001f49SmrgAC_LANG_SAVE
809332001f49Smrg
809432001f49Smrg# Source file extension for RC test sources.
809532001f49Smrgac_ext=rc
809632001f49Smrg
809732001f49Smrg# Object file extension for compiled RC test sources.
809832001f49Smrgobjext=o
809932001f49Smrg_LT_TAGVAR(objext, $1)=$objext
810032001f49Smrg
810132001f49Smrg# Code to be used in simple compile tests
810232001f49Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
810332001f49Smrg
810432001f49Smrg# Code to be used in simple link tests
81057ec3b29aSmrglt_simple_link_test_code=$lt_simple_compile_test_code
810632001f49Smrg
810732001f49Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
810832001f49Smrg_LT_TAG_COMPILER
810932001f49Smrg
811032001f49Smrg# save warnings/boilerplate of simple test code
811132001f49Smrg_LT_COMPILER_BOILERPLATE
811232001f49Smrg_LT_LINKER_BOILERPLATE
811332001f49Smrg
811432001f49Smrg# Allow CC to be a program name with arguments.
81157ec3b29aSmrglt_save_CC=$CC
811632001f49Smrglt_save_CFLAGS=$CFLAGS
811732001f49Smrglt_save_GCC=$GCC
811832001f49SmrgGCC=
811932001f49SmrgCC=${RC-"windres"}
812032001f49SmrgCFLAGS=
812132001f49Smrgcompiler=$CC
812232001f49Smrg_LT_TAGVAR(compiler, $1)=$CC
812332001f49Smrg_LT_CC_BASENAME([$compiler])
812432001f49Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
812532001f49Smrg
812632001f49Smrgif test -n "$compiler"; then
812732001f49Smrg  :
812832001f49Smrg  _LT_CONFIG($1)
812932001f49Smrgfi
813032001f49Smrg
813132001f49SmrgGCC=$lt_save_GCC
813232001f49SmrgAC_LANG_RESTORE
813332001f49SmrgCC=$lt_save_CC
813432001f49SmrgCFLAGS=$lt_save_CFLAGS
813532001f49Smrg])# _LT_LANG_RC_CONFIG
813632001f49Smrg
813732001f49Smrg
813832001f49Smrg# LT_PROG_GCJ
813932001f49Smrg# -----------
814032001f49SmrgAC_DEFUN([LT_PROG_GCJ],
814132001f49Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
814232001f49Smrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
814332001f49Smrg    [AC_CHECK_TOOL(GCJ, gcj,)
81447ec3b29aSmrg      test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
814532001f49Smrg      AC_SUBST(GCJFLAGS)])])[]dnl
814632001f49Smrg])
814732001f49Smrg
814832001f49Smrg# Old name:
814932001f49SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
815032001f49Smrgdnl aclocal-1.4 backwards compatibility:
815132001f49Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
815232001f49Smrg
815332001f49Smrg
815432001f49Smrg# LT_PROG_GO
815532001f49Smrg# ----------
815632001f49SmrgAC_DEFUN([LT_PROG_GO],
815732001f49Smrg[AC_CHECK_TOOL(GOC, gccgo,)
815832001f49Smrg])
815932001f49Smrg
816032001f49Smrg
816132001f49Smrg# LT_PROG_RC
816232001f49Smrg# ----------
816332001f49SmrgAC_DEFUN([LT_PROG_RC],
816432001f49Smrg[AC_CHECK_TOOL(RC, windres,)
816532001f49Smrg])
816632001f49Smrg
816732001f49Smrg# Old name:
816832001f49SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
816932001f49Smrgdnl aclocal-1.4 backwards compatibility:
817032001f49Smrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
817132001f49Smrg
817232001f49Smrg
817332001f49Smrg# _LT_DECL_EGREP
817432001f49Smrg# --------------
817532001f49Smrg# If we don't have a new enough Autoconf to choose the best grep
817632001f49Smrg# available, choose the one first in the user's PATH.
817732001f49Smrgm4_defun([_LT_DECL_EGREP],
817832001f49Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
817932001f49SmrgAC_REQUIRE([AC_PROG_FGREP])dnl
818032001f49Smrgtest -z "$GREP" && GREP=grep
818132001f49Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
818232001f49Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
818332001f49Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
818432001f49Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
818532001f49SmrgAC_SUBST([GREP])
818632001f49Smrg])
818732001f49Smrg
818832001f49Smrg
818932001f49Smrg# _LT_DECL_OBJDUMP
819032001f49Smrg# --------------
819132001f49Smrg# If we don't have a new enough Autoconf to choose the best objdump
819232001f49Smrg# available, choose the one first in the user's PATH.
819332001f49Smrgm4_defun([_LT_DECL_OBJDUMP],
819432001f49Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
819532001f49Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
819632001f49Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
819732001f49SmrgAC_SUBST([OBJDUMP])
819832001f49Smrg])
819932001f49Smrg
820032001f49Smrg# _LT_DECL_DLLTOOL
820132001f49Smrg# ----------------
820232001f49Smrg# Ensure DLLTOOL variable is set.
820332001f49Smrgm4_defun([_LT_DECL_DLLTOOL],
820432001f49Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
820532001f49Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
820632001f49Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
820732001f49SmrgAC_SUBST([DLLTOOL])
820832001f49Smrg])
820932001f49Smrg
821032001f49Smrg# _LT_DECL_SED
821132001f49Smrg# ------------
821232001f49Smrg# Check for a fully-functional sed program, that truncates
821332001f49Smrg# as few characters as possible.  Prefer GNU sed if found.
821432001f49Smrgm4_defun([_LT_DECL_SED],
821532001f49Smrg[AC_PROG_SED
821632001f49Smrgtest -z "$SED" && SED=sed
821732001f49SmrgXsed="$SED -e 1s/^X//"
821832001f49Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
821932001f49Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
822032001f49Smrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
822132001f49Smrg])# _LT_DECL_SED
822232001f49Smrg
822332001f49Smrgm4_ifndef([AC_PROG_SED], [
822432001f49Smrg############################################################
822532001f49Smrg# NOTE: This macro has been submitted for inclusion into   #
822632001f49Smrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
822732001f49Smrg#  a released version of Autoconf we should remove this    #
822832001f49Smrg#  macro and use it instead.                               #
822932001f49Smrg############################################################
823032001f49Smrg
823132001f49Smrgm4_defun([AC_PROG_SED],
823232001f49Smrg[AC_MSG_CHECKING([for a sed that does not truncate output])
823332001f49SmrgAC_CACHE_VAL(lt_cv_path_SED,
823432001f49Smrg[# Loop through the user's path and test for sed and gsed.
823532001f49Smrg# Then use that list of sed's as ones to test for truncation.
823632001f49Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
823732001f49Smrgfor as_dir in $PATH
823832001f49Smrgdo
823932001f49Smrg  IFS=$as_save_IFS
824032001f49Smrg  test -z "$as_dir" && as_dir=.
824132001f49Smrg  for lt_ac_prog in sed gsed; do
824232001f49Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
824332001f49Smrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
824432001f49Smrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
824532001f49Smrg      fi
824632001f49Smrg    done
824732001f49Smrg  done
824832001f49Smrgdone
824932001f49SmrgIFS=$as_save_IFS
825032001f49Smrglt_ac_max=0
825132001f49Smrglt_ac_count=0
825232001f49Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
825332001f49Smrg# along with /bin/sed that truncates output.
825432001f49Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
82557ec3b29aSmrg  test ! -f "$lt_ac_sed" && continue
825632001f49Smrg  cat /dev/null > conftest.in
825732001f49Smrg  lt_ac_count=0
825832001f49Smrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
825932001f49Smrg  # Check for GNU sed and select it if it is found.
826032001f49Smrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
826132001f49Smrg    lt_cv_path_SED=$lt_ac_sed
826232001f49Smrg    break
826332001f49Smrg  fi
826432001f49Smrg  while true; do
826532001f49Smrg    cat conftest.in conftest.in >conftest.tmp
826632001f49Smrg    mv conftest.tmp conftest.in
826732001f49Smrg    cp conftest.in conftest.nl
826832001f49Smrg    echo >>conftest.nl
826932001f49Smrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
827032001f49Smrg    cmp -s conftest.out conftest.nl || break
827132001f49Smrg    # 10000 chars as input seems more than enough
82727ec3b29aSmrg    test 10 -lt "$lt_ac_count" && break
827332001f49Smrg    lt_ac_count=`expr $lt_ac_count + 1`
82747ec3b29aSmrg    if test "$lt_ac_count" -gt "$lt_ac_max"; then
827532001f49Smrg      lt_ac_max=$lt_ac_count
827632001f49Smrg      lt_cv_path_SED=$lt_ac_sed
827732001f49Smrg    fi
827832001f49Smrg  done
827932001f49Smrgdone
828032001f49Smrg])
828132001f49SmrgSED=$lt_cv_path_SED
828232001f49SmrgAC_SUBST([SED])
828332001f49SmrgAC_MSG_RESULT([$SED])
828432001f49Smrg])#AC_PROG_SED
828532001f49Smrg])#m4_ifndef
828632001f49Smrg
828732001f49Smrg# Old name:
828832001f49SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
828932001f49Smrgdnl aclocal-1.4 backwards compatibility:
829032001f49Smrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
829132001f49Smrg
829232001f49Smrg
829332001f49Smrg# _LT_CHECK_SHELL_FEATURES
829432001f49Smrg# ------------------------
829532001f49Smrg# Find out whether the shell is Bourne or XSI compatible,
829632001f49Smrg# or has some other useful features.
829732001f49Smrgm4_defun([_LT_CHECK_SHELL_FEATURES],
82987ec3b29aSmrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
829932001f49Smrg  lt_unset=unset
830032001f49Smrgelse
830132001f49Smrg  lt_unset=false
830232001f49Smrgfi
830332001f49Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
830432001f49Smrg
830532001f49Smrg# test EBCDIC or ASCII
830632001f49Smrgcase `echo X|tr X '\101'` in
830732001f49Smrg A) # ASCII based system
830832001f49Smrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
830932001f49Smrg  lt_SP2NL='tr \040 \012'
831032001f49Smrg  lt_NL2SP='tr \015\012 \040\040'
831132001f49Smrg  ;;
831232001f49Smrg *) # EBCDIC based system
831332001f49Smrg  lt_SP2NL='tr \100 \n'
831432001f49Smrg  lt_NL2SP='tr \r\n \100\100'
831532001f49Smrg  ;;
831632001f49Smrgesac
831732001f49Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
831832001f49Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
831932001f49Smrg])# _LT_CHECK_SHELL_FEATURES
832032001f49Smrg
832132001f49Smrg
832232001f49Smrg# _LT_PATH_CONVERSION_FUNCTIONS
832332001f49Smrg# -----------------------------
83247ec3b29aSmrg# Determine what file name conversion functions should be used by
832532001f49Smrg# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
832632001f49Smrg# for certain cross-compile configurations and native mingw.
832732001f49Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
832832001f49Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
832932001f49SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
833032001f49SmrgAC_MSG_CHECKING([how to convert $build file names to $host format])
833132001f49SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd,
833232001f49Smrg[case $host in
833332001f49Smrg  *-*-mingw* )
833432001f49Smrg    case $build in
833532001f49Smrg      *-*-mingw* ) # actually msys
833632001f49Smrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
833732001f49Smrg        ;;
833832001f49Smrg      *-*-cygwin* )
833932001f49Smrg        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
834032001f49Smrg        ;;
834132001f49Smrg      * ) # otherwise, assume *nix
834232001f49Smrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
834332001f49Smrg        ;;
834432001f49Smrg    esac
834532001f49Smrg    ;;
834632001f49Smrg  *-*-cygwin* )
834732001f49Smrg    case $build in
834832001f49Smrg      *-*-mingw* ) # actually msys
834932001f49Smrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
835032001f49Smrg        ;;
835132001f49Smrg      *-*-cygwin* )
835232001f49Smrg        lt_cv_to_host_file_cmd=func_convert_file_noop
835332001f49Smrg        ;;
835432001f49Smrg      * ) # otherwise, assume *nix
835532001f49Smrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
835632001f49Smrg        ;;
835732001f49Smrg    esac
835832001f49Smrg    ;;
835932001f49Smrg  * ) # unhandled hosts (and "normal" native builds)
836032001f49Smrg    lt_cv_to_host_file_cmd=func_convert_file_noop
836132001f49Smrg    ;;
836232001f49Smrgesac
836332001f49Smrg])
836432001f49Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd
836532001f49SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd])
836632001f49Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
836732001f49Smrg         [0], [convert $build file names to $host format])dnl
836832001f49Smrg
836932001f49SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format])
837032001f49SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd,
837132001f49Smrg[#assume ordinary cross tools, or native build.
837232001f49Smrglt_cv_to_tool_file_cmd=func_convert_file_noop
837332001f49Smrgcase $host in
837432001f49Smrg  *-*-mingw* )
837532001f49Smrg    case $build in
837632001f49Smrg      *-*-mingw* ) # actually msys
837732001f49Smrg        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
837832001f49Smrg        ;;
837932001f49Smrg    esac
838032001f49Smrg    ;;
838132001f49Smrgesac
838232001f49Smrg])
838332001f49Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd
838432001f49SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
838532001f49Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
838632001f49Smrg         [0], [convert $build files to toolchain format])dnl
838732001f49Smrg])# _LT_PATH_CONVERSION_FUNCTIONS
8388