libtool.m4 revision 1c7386f4
11016ad83Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 21016ad83Smrg# 31016ad83Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 41016ad83Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 51016ad83Smrg# Foundation, Inc. 61016ad83Smrg# Written by Gordon Matzigkeit, 1996 71016ad83Smrg# 81016ad83Smrg# This file is free software; the Free Software Foundation gives 91016ad83Smrg# unlimited permission to copy and/or distribute it, with or without 101016ad83Smrg# modifications, as long as this notice is preserved. 111016ad83Smrg 121016ad83Smrgm4_define([_LT_COPYING], [dnl 131016ad83Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 141016ad83Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 151016ad83Smrg# Foundation, Inc. 161016ad83Smrg# Written by Gordon Matzigkeit, 1996 171016ad83Smrg# 181016ad83Smrg# This file is part of GNU Libtool. 191016ad83Smrg# 201016ad83Smrg# GNU Libtool is free software; you can redistribute it and/or 211016ad83Smrg# modify it under the terms of the GNU General Public License as 221016ad83Smrg# published by the Free Software Foundation; either version 2 of 231016ad83Smrg# the License, or (at your option) any later version. 241016ad83Smrg# 251016ad83Smrg# As a special exception to the GNU General Public License, 261016ad83Smrg# if you distribute this file as part of a program or library that 271016ad83Smrg# is built using GNU Libtool, you may include this file under the 281016ad83Smrg# same distribution terms that you use for the rest of that program. 291016ad83Smrg# 301016ad83Smrg# GNU Libtool is distributed in the hope that it will be useful, 311016ad83Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 321016ad83Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 331016ad83Smrg# GNU General Public License for more details. 341016ad83Smrg# 351016ad83Smrg# You should have received a copy of the GNU General Public License 361016ad83Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 371016ad83Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 381016ad83Smrg# obtained by writing to the Free Software Foundation, Inc., 391016ad83Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 401016ad83Smrg]) 411016ad83Smrg 421016ad83Smrg# serial 57 LT_INIT 431016ad83Smrg 441016ad83Smrg 451016ad83Smrg# LT_PREREQ(VERSION) 461016ad83Smrg# ------------------ 471016ad83Smrg# Complain and exit if this libtool version is less that VERSION. 481016ad83Smrgm4_defun([LT_PREREQ], 491016ad83Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 501016ad83Smrg [m4_default([$3], 511016ad83Smrg [m4_fatal([Libtool version $1 or higher is required], 521016ad83Smrg 63)])], 531016ad83Smrg [$2])]) 541016ad83Smrg 551016ad83Smrg 561016ad83Smrg# _LT_CHECK_BUILDDIR 571016ad83Smrg# ------------------ 581016ad83Smrg# Complain if the absolute build directory name contains unusual characters 591016ad83Smrgm4_defun([_LT_CHECK_BUILDDIR], 601016ad83Smrg[case `pwd` in 611016ad83Smrg *\ * | *\ *) 621016ad83Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 631016ad83Smrgesac 641016ad83Smrg]) 651016ad83Smrg 661016ad83Smrg 671016ad83Smrg# LT_INIT([OPTIONS]) 681016ad83Smrg# ------------------ 691016ad83SmrgAC_DEFUN([LT_INIT], 701016ad83Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 711016ad83SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 721016ad83SmrgAC_BEFORE([$0], [LT_LANG])dnl 731016ad83SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 741016ad83SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 751016ad83Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 761016ad83Smrg 771016ad83Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 781016ad83Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 791016ad83Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 801016ad83Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 811016ad83Smrgdnl unless we require an AC_DEFUNed macro: 821016ad83SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 831016ad83SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 841016ad83SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 851016ad83SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 861016ad83Smrgm4_require([_LT_PROG_LTMAIN])dnl 871016ad83Smrg 881016ad83Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 891016ad83Smrg 901016ad83Smrgdnl Parse OPTIONS 911016ad83Smrg_LT_SET_OPTIONS([$0], [$1]) 921016ad83Smrg 931016ad83Smrg# This can be used to rebuild libtool when needed 941016ad83SmrgLIBTOOL_DEPS="$ltmain" 951016ad83Smrg 961016ad83Smrg# Always use our own libtool. 971016ad83SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 981016ad83SmrgAC_SUBST(LIBTOOL)dnl 991016ad83Smrg 1001016ad83Smrg_LT_SETUP 1011016ad83Smrg 1021016ad83Smrg# Only expand once: 1031016ad83Smrgm4_define([LT_INIT]) 1041016ad83Smrg])# LT_INIT 1051016ad83Smrg 1061016ad83Smrg# Old names: 1071016ad83SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 1081016ad83SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 1091016ad83Smrgdnl aclocal-1.4 backwards compatibility: 1101016ad83Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 1111016ad83Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1121016ad83Smrg 1131016ad83Smrg 1141016ad83Smrg# _LT_CC_BASENAME(CC) 1151016ad83Smrg# ------------------- 1161016ad83Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 1171016ad83Smrgm4_defun([_LT_CC_BASENAME], 1181016ad83Smrg[for cc_temp in $1""; do 1191016ad83Smrg case $cc_temp in 1201016ad83Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 1211016ad83Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 1221016ad83Smrg \-*) ;; 1231016ad83Smrg *) break;; 1241016ad83Smrg esac 1251016ad83Smrgdone 1261016ad83Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 1271016ad83Smrg]) 1281016ad83Smrg 1291016ad83Smrg 1301016ad83Smrg# _LT_FILEUTILS_DEFAULTS 1311016ad83Smrg# ---------------------- 1321016ad83Smrg# It is okay to use these file commands and assume they have been set 1331016ad83Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 1341016ad83Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 1351016ad83Smrg[: ${CP="cp -f"} 1361016ad83Smrg: ${MV="mv -f"} 1371016ad83Smrg: ${RM="rm -f"} 1381016ad83Smrg])# _LT_FILEUTILS_DEFAULTS 1391016ad83Smrg 1401016ad83Smrg 1411016ad83Smrg# _LT_SETUP 1421016ad83Smrg# --------- 1431016ad83Smrgm4_defun([_LT_SETUP], 1441016ad83Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1451016ad83SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 1461016ad83SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 1471016ad83SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1481016ad83Smrg 1491016ad83Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 1501016ad83Smrgdnl 1511016ad83Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 1521016ad83Smrg_LT_DECL([], [host], [0])dnl 1531016ad83Smrg_LT_DECL([], [host_os], [0])dnl 1541016ad83Smrgdnl 1551016ad83Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 1561016ad83Smrg_LT_DECL([], [build], [0])dnl 1571016ad83Smrg_LT_DECL([], [build_os], [0])dnl 1581016ad83Smrgdnl 1591016ad83SmrgAC_REQUIRE([AC_PROG_CC])dnl 1601016ad83SmrgAC_REQUIRE([LT_PATH_LD])dnl 1611016ad83SmrgAC_REQUIRE([LT_PATH_NM])dnl 1621016ad83Smrgdnl 1631016ad83SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 1641016ad83Smrgtest -z "$LN_S" && LN_S="ln -s" 1651016ad83Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 1661016ad83Smrgdnl 1671016ad83SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 1681016ad83Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 1691016ad83Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 1701016ad83Smrgdnl 1711016ad83Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1721016ad83Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 1731016ad83Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 1741016ad83Smrgm4_require([_LT_CMD_RELOAD])dnl 1751016ad83Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 1761016ad83Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 1771016ad83Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 1781016ad83Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 1791016ad83Smrgm4_require([_LT_WITH_SYSROOT])dnl 1801016ad83Smrg 1811016ad83Smrg_LT_CONFIG_LIBTOOL_INIT([ 1821016ad83Smrg# See if we are running on zsh, and set the options which allow our 1831016ad83Smrg# commands through without removal of \ escapes INIT. 1841016ad83Smrgif test -n "\${ZSH_VERSION+set}" ; then 1851016ad83Smrg setopt NO_GLOB_SUBST 1861016ad83Smrgfi 1871016ad83Smrg]) 1881016ad83Smrgif test -n "${ZSH_VERSION+set}" ; then 1891016ad83Smrg setopt NO_GLOB_SUBST 1901016ad83Smrgfi 1911016ad83Smrg 1921016ad83Smrg_LT_CHECK_OBJDIR 1931016ad83Smrg 1941016ad83Smrgm4_require([_LT_TAG_COMPILER])dnl 1951016ad83Smrg 1961016ad83Smrgcase $host_os in 1971016ad83Smrgaix3*) 1981016ad83Smrg # AIX sometimes has problems with the GCC collect2 program. For some 1991016ad83Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 2001016ad83Smrg # vanish in a puff of smoke. 2011016ad83Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 2021016ad83Smrg COLLECT_NAMES= 2031016ad83Smrg export COLLECT_NAMES 2041016ad83Smrg fi 2051016ad83Smrg ;; 2061016ad83Smrgesac 2071016ad83Smrg 2081016ad83Smrg# Global variables: 2091016ad83Smrgofile=libtool 2101016ad83Smrgcan_build_shared=yes 2111016ad83Smrg 2121016ad83Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 2131016ad83Smrg# which needs '.lib'). 2141016ad83Smrglibext=a 2151016ad83Smrg 2161016ad83Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 2171016ad83Smrg 2181016ad83Smrgold_CC="$CC" 2191016ad83Smrgold_CFLAGS="$CFLAGS" 2201016ad83Smrg 2211016ad83Smrg# Set sane defaults for various variables 2221016ad83Smrgtest -z "$CC" && CC=cc 2231016ad83Smrgtest -z "$LTCC" && LTCC=$CC 2241016ad83Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 2251016ad83Smrgtest -z "$LD" && LD=ld 2261016ad83Smrgtest -z "$ac_objext" && ac_objext=o 2271016ad83Smrg 2281016ad83Smrg_LT_CC_BASENAME([$compiler]) 2291016ad83Smrg 2301016ad83Smrg# Only perform the check for file, if the check method requires it 2311016ad83Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 2321016ad83Smrgcase $deplibs_check_method in 2331016ad83Smrgfile_magic*) 2341016ad83Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2351016ad83Smrg _LT_PATH_MAGIC 2361016ad83Smrg fi 2371016ad83Smrg ;; 2381016ad83Smrgesac 2391016ad83Smrg 2401016ad83Smrg# Use C for the default configuration in the libtool script 2411016ad83SmrgLT_SUPPORTED_TAG([CC]) 2421016ad83Smrg_LT_LANG_C_CONFIG 2431016ad83Smrg_LT_LANG_DEFAULT_CONFIG 2441016ad83Smrg_LT_CONFIG_COMMANDS 2451016ad83Smrg])# _LT_SETUP 2461016ad83Smrg 2471016ad83Smrg 2481016ad83Smrg# _LT_PREPARE_SED_QUOTE_VARS 2491016ad83Smrg# -------------------------- 2501016ad83Smrg# Define a few sed substitution that help us do robust quoting. 2511016ad83Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 2521016ad83Smrg[# Backslashify metacharacters that are still active within 2531016ad83Smrg# double-quoted strings. 2541016ad83Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 2551016ad83Smrg 2561016ad83Smrg# Same as above, but do not quote variable references. 2571016ad83Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 2581016ad83Smrg 2591016ad83Smrg# Sed substitution to delay expansion of an escaped shell variable in a 2601016ad83Smrg# double_quote_subst'ed string. 2611016ad83Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 2621016ad83Smrg 2631016ad83Smrg# Sed substitution to delay expansion of an escaped single quote. 2641016ad83Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 2651016ad83Smrg 2661016ad83Smrg# Sed substitution to avoid accidental globbing in evaled expressions 2671016ad83Smrgno_glob_subst='s/\*/\\\*/g' 2681016ad83Smrg]) 2691016ad83Smrg 2701016ad83Smrg# _LT_PROG_LTMAIN 2711016ad83Smrg# --------------- 2721016ad83Smrg# Note that this code is called both from `configure', and `config.status' 2731016ad83Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 2741016ad83Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 2751016ad83Smrg# so we pass a copy along to make sure it has a sensible value anyway. 2761016ad83Smrgm4_defun([_LT_PROG_LTMAIN], 2771016ad83Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 2781016ad83Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 2791016ad83Smrgltmain="$ac_aux_dir/ltmain.sh" 2801016ad83Smrg])# _LT_PROG_LTMAIN 2811016ad83Smrg 2821016ad83Smrg 2831016ad83Smrg## ------------------------------------- ## 2841016ad83Smrg## Accumulate code for creating libtool. ## 2851016ad83Smrg## ------------------------------------- ## 2861016ad83Smrg 2871016ad83Smrg# So that we can recreate a full libtool script including additional 2881016ad83Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 2891016ad83Smrg# in macros and then make a single call at the end using the `libtool' 2901016ad83Smrg# label. 2911016ad83Smrg 2921016ad83Smrg 2931016ad83Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 2941016ad83Smrg# ---------------------------------------- 2951016ad83Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 2961016ad83Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 2971016ad83Smrg[m4_ifval([$1], 2981016ad83Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 2991016ad83Smrg [$1 3001016ad83Smrg])])]) 3011016ad83Smrg 3021016ad83Smrg# Initialize. 3031016ad83Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 3041016ad83Smrg 3051016ad83Smrg 3061016ad83Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 3071016ad83Smrg# ------------------------------ 3081016ad83Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3091016ad83Smrgm4_define([_LT_CONFIG_LIBTOOL], 3101016ad83Smrg[m4_ifval([$1], 3111016ad83Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3121016ad83Smrg [$1 3131016ad83Smrg])])]) 3141016ad83Smrg 3151016ad83Smrg# Initialize. 3161016ad83Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3171016ad83Smrg 3181016ad83Smrg 3191016ad83Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3201016ad83Smrg# ----------------------------------------------------- 3211016ad83Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 3221016ad83Smrg[_LT_CONFIG_LIBTOOL([$1]) 3231016ad83Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 3241016ad83Smrg]) 3251016ad83Smrg 3261016ad83Smrg 3271016ad83Smrg# _LT_FORMAT_COMMENT([COMMENT]) 3281016ad83Smrg# ----------------------------- 3291016ad83Smrg# Add leading comment marks to the start of each line, and a trailing 3301016ad83Smrg# full-stop to the whole comment if one is not present already. 3311016ad83Smrgm4_define([_LT_FORMAT_COMMENT], 3321016ad83Smrg[m4_ifval([$1], [ 3331016ad83Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3341016ad83Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3351016ad83Smrg)]) 3361016ad83Smrg 3371016ad83Smrg 3381016ad83Smrg 3391016ad83Smrg## ------------------------ ## 3401016ad83Smrg## FIXME: Eliminate VARNAME ## 3411016ad83Smrg## ------------------------ ## 3421016ad83Smrg 3431016ad83Smrg 3441016ad83Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3451016ad83Smrg# ------------------------------------------------------------------- 3461016ad83Smrg# CONFIGNAME is the name given to the value in the libtool script. 3471016ad83Smrg# VARNAME is the (base) name used in the configure script. 3481016ad83Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3491016ad83Smrg# VARNAME. Any other value will be used directly. 3501016ad83Smrgm4_define([_LT_DECL], 3511016ad83Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3521016ad83Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3531016ad83Smrg [m4_ifval([$1], [$1], [$2])]) 3541016ad83Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3551016ad83Smrg m4_ifval([$4], 3561016ad83Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3571016ad83Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 3581016ad83Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 3591016ad83Smrg]) 3601016ad83Smrg 3611016ad83Smrg 3621016ad83Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3631016ad83Smrg# -------------------------------------------------------- 3641016ad83Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3651016ad83Smrg 3661016ad83Smrg 3671016ad83Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3681016ad83Smrg# ------------------------------------------------ 3691016ad83Smrgm4_define([lt_decl_tag_varnames], 3701016ad83Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 3711016ad83Smrg 3721016ad83Smrg 3731016ad83Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 3741016ad83Smrg# --------------------------------------------------------- 3751016ad83Smrgm4_define([_lt_decl_filter], 3761016ad83Smrg[m4_case([$#], 3771016ad83Smrg [0], [m4_fatal([$0: too few arguments: $#])], 3781016ad83Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 3791016ad83Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 3801016ad83Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 3811016ad83Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 3821016ad83Smrg]) 3831016ad83Smrg 3841016ad83Smrg 3851016ad83Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 3861016ad83Smrg# -------------------------------------------------- 3871016ad83Smrgm4_define([lt_decl_quote_varnames], 3881016ad83Smrg[_lt_decl_filter([value], [1], $@)]) 3891016ad83Smrg 3901016ad83Smrg 3911016ad83Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 3921016ad83Smrg# --------------------------------------------------- 3931016ad83Smrgm4_define([lt_decl_dquote_varnames], 3941016ad83Smrg[_lt_decl_filter([value], [2], $@)]) 3951016ad83Smrg 3961016ad83Smrg 3971016ad83Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 3981016ad83Smrg# --------------------------------------------------- 3991016ad83Smrgm4_define([lt_decl_varnames_tagged], 4001016ad83Smrg[m4_assert([$# <= 2])dnl 4011016ad83Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 4021016ad83Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 4031016ad83Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 4041016ad83Smrgm4_define([_lt_decl_varnames_tagged], 4051016ad83Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 4061016ad83Smrg 4071016ad83Smrg 4081016ad83Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 4091016ad83Smrg# ------------------------------------------------ 4101016ad83Smrgm4_define([lt_decl_all_varnames], 4111016ad83Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 4121016ad83Smrg m4_if([$2], [], 4131016ad83Smrg m4_quote(lt_decl_varnames), 4141016ad83Smrg m4_quote(m4_shift($@))))[]dnl 4151016ad83Smrg]) 4161016ad83Smrgm4_define([_lt_decl_all_varnames], 4171016ad83Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 4181016ad83Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 4191016ad83Smrg]) 4201016ad83Smrg 4211016ad83Smrg 4221016ad83Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 4231016ad83Smrg# ------------------------------------ 4241016ad83Smrg# Quote a variable value, and forward it to `config.status' so that its 4251016ad83Smrg# declaration there will have the same value as in `configure'. VARNAME 4261016ad83Smrg# must have a single quote delimited value for this to work. 4271016ad83Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 4281016ad83Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 4291016ad83Smrg 4301016ad83Smrg 4311016ad83Smrg# _LT_CONFIG_STATUS_DECLARATIONS 4321016ad83Smrg# ------------------------------ 4331016ad83Smrg# We delimit libtool config variables with single quotes, so when 4341016ad83Smrg# we write them to config.status, we have to be sure to quote all 4351016ad83Smrg# embedded single quotes properly. In configure, this macro expands 4361016ad83Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 4371016ad83Smrg# 4381016ad83Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 4391016ad83Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 4401016ad83Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 4411016ad83Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 4421016ad83Smrg 4431016ad83Smrg 4441016ad83Smrg# _LT_LIBTOOL_TAGS 4451016ad83Smrg# ---------------- 4461016ad83Smrg# Output comment and list of tags supported by the script 4471016ad83Smrgm4_defun([_LT_LIBTOOL_TAGS], 4481016ad83Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 4491016ad83Smrgavailable_tags="_LT_TAGS"dnl 4501016ad83Smrg]) 4511016ad83Smrg 4521016ad83Smrg 4531016ad83Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 4541016ad83Smrg# ----------------------------------- 4551016ad83Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 4561016ad83Smrg# expand to a commented shell variable setting: 4571016ad83Smrg# 4581016ad83Smrg# # Some comment about what VAR is for. 4591016ad83Smrg# visible_name=$lt_internal_name 4601016ad83Smrgm4_define([_LT_LIBTOOL_DECLARE], 4611016ad83Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 4621016ad83Smrg [description])))[]dnl 4631016ad83Smrgm4_pushdef([_libtool_name], 4641016ad83Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 4651016ad83Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 4661016ad83Smrg [0], [_libtool_name=[$]$1], 4671016ad83Smrg [1], [_libtool_name=$lt_[]$1], 4681016ad83Smrg [2], [_libtool_name=$lt_[]$1], 4691016ad83Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 4701016ad83Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 4711016ad83Smrg]) 4721016ad83Smrg 4731016ad83Smrg 4741016ad83Smrg# _LT_LIBTOOL_CONFIG_VARS 4751016ad83Smrg# ----------------------- 4761016ad83Smrg# Produce commented declarations of non-tagged libtool config variables 4771016ad83Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 4781016ad83Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 4791016ad83Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 4801016ad83Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 4811016ad83Smrg[m4_foreach([_lt_var], 4821016ad83Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 4831016ad83Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 4841016ad83Smrg 4851016ad83Smrg 4861016ad83Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 4871016ad83Smrg# ------------------------- 4881016ad83Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 4891016ad83Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 4901016ad83Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 4911016ad83Smrg 4921016ad83Smrg 4931016ad83Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 4941016ad83Smrg# ------------------------------ 4951016ad83Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 4961016ad83Smrg 4971016ad83Smrg 4981016ad83Smrg# _LT_CONFIG_COMMANDS 4991016ad83Smrg# ------------------- 5001016ad83Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 5011016ad83Smrg# variables for single and double quote escaping we saved from calls 5021016ad83Smrg# to _LT_DECL, we can put quote escaped variables declarations 5031016ad83Smrg# into `config.status', and then the shell code to quote escape them in 5041016ad83Smrg# for loops in `config.status'. Finally, any additional code accumulated 5051016ad83Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 5061016ad83Smrgm4_defun([_LT_CONFIG_COMMANDS], 5071016ad83Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 5081016ad83Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 5091016ad83Smrg dnl instead of duplicating it all over again into config.status, 5101016ad83Smrg dnl then we will have config.status run $CONFIG_LT later, so it 5111016ad83Smrg dnl needs to know what name is stored there: 5121016ad83Smrg [AC_CONFIG_COMMANDS([libtool], 5131016ad83Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 5141016ad83Smrg dnl If the libtool generation code is destined for config.status, 5151016ad83Smrg dnl expand the accumulated commands and init code now: 5161016ad83Smrg [AC_CONFIG_COMMANDS([libtool], 5171016ad83Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 5181016ad83Smrg])#_LT_CONFIG_COMMANDS 5191016ad83Smrg 5201016ad83Smrg 5211016ad83Smrg# Initialize. 5221016ad83Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 5231016ad83Smrg[ 5241016ad83Smrg 5251016ad83Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 5261016ad83Smrg# if CDPATH is set. 5271016ad83Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 5281016ad83Smrg 5291016ad83Smrgsed_quote_subst='$sed_quote_subst' 5301016ad83Smrgdouble_quote_subst='$double_quote_subst' 5311016ad83Smrgdelay_variable_subst='$delay_variable_subst' 5321016ad83Smrg_LT_CONFIG_STATUS_DECLARATIONS 5331016ad83SmrgLTCC='$LTCC' 5341016ad83SmrgLTCFLAGS='$LTCFLAGS' 5351016ad83Smrgcompiler='$compiler_DEFAULT' 5361016ad83Smrg 5371016ad83Smrg# A function that is used when there is no print builtin or printf. 5381016ad83Smrgfunc_fallback_echo () 5391016ad83Smrg{ 5401016ad83Smrg eval 'cat <<_LTECHO_EOF 5411016ad83Smrg\$[]1 5421016ad83Smrg_LTECHO_EOF' 5431016ad83Smrg} 5441016ad83Smrg 5451016ad83Smrg# Quote evaled strings. 5461016ad83Smrgfor var in lt_decl_all_varnames([[ \ 5471016ad83Smrg]], lt_decl_quote_varnames); do 5481016ad83Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5491016ad83Smrg *[[\\\\\\\`\\"\\\$]]*) 5501016ad83Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 5511016ad83Smrg ;; 5521016ad83Smrg *) 5531016ad83Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5541016ad83Smrg ;; 5551016ad83Smrg esac 5561016ad83Smrgdone 5571016ad83Smrg 5581016ad83Smrg# Double-quote double-evaled strings. 5591016ad83Smrgfor var in lt_decl_all_varnames([[ \ 5601016ad83Smrg]], lt_decl_dquote_varnames); do 5611016ad83Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5621016ad83Smrg *[[\\\\\\\`\\"\\\$]]*) 5631016ad83Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 5641016ad83Smrg ;; 5651016ad83Smrg *) 5661016ad83Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5671016ad83Smrg ;; 5681016ad83Smrg esac 5691016ad83Smrgdone 5701016ad83Smrg 5711016ad83Smrg_LT_OUTPUT_LIBTOOL_INIT 5721016ad83Smrg]) 5731016ad83Smrg 5741016ad83Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 5751016ad83Smrg# ------------------------------------ 5761016ad83Smrg# Generate a child script FILE with all initialization necessary to 5771016ad83Smrg# reuse the environment learned by the parent script, and make the 5781016ad83Smrg# file executable. If COMMENT is supplied, it is inserted after the 5791016ad83Smrg# `#!' sequence but before initialization text begins. After this 5801016ad83Smrg# macro, additional text can be appended to FILE to form the body of 5811016ad83Smrg# the child script. The macro ends with non-zero status if the 5821016ad83Smrg# file could not be fully written (such as if the disk is full). 5831016ad83Smrgm4_ifdef([AS_INIT_GENERATED], 5841016ad83Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 5851016ad83Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 5861016ad83Smrg[m4_require([AS_PREPARE])]dnl 5871016ad83Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 5881016ad83Smrg[lt_write_fail=0 5891016ad83Smrgcat >$1 <<_ASEOF || lt_write_fail=1 5901016ad83Smrg#! $SHELL 5911016ad83Smrg# Generated by $as_me. 5921016ad83Smrg$2 5931016ad83SmrgSHELL=\${CONFIG_SHELL-$SHELL} 5941016ad83Smrgexport SHELL 5951016ad83Smrg_ASEOF 5961016ad83Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 5971016ad83SmrgAS_SHELL_SANITIZE 5981016ad83Smrg_AS_PREPARE 5991016ad83Smrgexec AS_MESSAGE_FD>&1 6001016ad83Smrg_ASEOF 6011016ad83Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 6021016ad83Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 6031016ad83Smrg 6041016ad83Smrg# LT_OUTPUT 6051016ad83Smrg# --------- 6061016ad83Smrg# This macro allows early generation of the libtool script (before 6071016ad83Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 6081016ad83Smrg# tests. 6091016ad83SmrgAC_DEFUN([LT_OUTPUT], 6101016ad83Smrg[: ${CONFIG_LT=./config.lt} 6111016ad83SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 6121016ad83Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 6131016ad83Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 6141016ad83Smrg 6151016ad83Smrgcat >>"$CONFIG_LT" <<\_LTEOF 6161016ad83Smrglt_cl_silent=false 6171016ad83Smrgexec AS_MESSAGE_LOG_FD>>config.log 6181016ad83Smrg{ 6191016ad83Smrg echo 6201016ad83Smrg AS_BOX([Running $as_me.]) 6211016ad83Smrg} >&AS_MESSAGE_LOG_FD 6221016ad83Smrg 6231016ad83Smrglt_cl_help="\ 6241016ad83Smrg\`$as_me' creates a local libtool stub from the current configuration, 6251016ad83Smrgfor use in further configure time tests before the real libtool is 6261016ad83Smrggenerated. 6271016ad83Smrg 6281016ad83SmrgUsage: $[0] [[OPTIONS]] 6291016ad83Smrg 6301016ad83Smrg -h, --help print this help, then exit 6311016ad83Smrg -V, --version print version number, then exit 6321016ad83Smrg -q, --quiet do not print progress messages 6331016ad83Smrg -d, --debug don't remove temporary files 6341016ad83Smrg 6351016ad83SmrgReport bugs to <bug-libtool@gnu.org>." 6361016ad83Smrg 6371016ad83Smrglt_cl_version="\ 6381016ad83Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 6391016ad83Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 6401016ad83Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 6411016ad83Smrg 6421016ad83SmrgCopyright (C) 2011 Free Software Foundation, Inc. 6431016ad83SmrgThis config.lt script is free software; the Free Software Foundation 6441016ad83Smrggives unlimited permision to copy, distribute and modify it." 6451016ad83Smrg 6461016ad83Smrgwhile test $[#] != 0 6471016ad83Smrgdo 6481016ad83Smrg case $[1] in 6491016ad83Smrg --version | --v* | -V ) 6501016ad83Smrg echo "$lt_cl_version"; exit 0 ;; 6511016ad83Smrg --help | --h* | -h ) 6521016ad83Smrg echo "$lt_cl_help"; exit 0 ;; 6531016ad83Smrg --debug | --d* | -d ) 6541016ad83Smrg debug=: ;; 6551016ad83Smrg --quiet | --q* | --silent | --s* | -q ) 6561016ad83Smrg lt_cl_silent=: ;; 6571016ad83Smrg 6581016ad83Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 6591016ad83SmrgTry \`$[0] --help' for more information.]) ;; 6601016ad83Smrg 6611016ad83Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 6621016ad83SmrgTry \`$[0] --help' for more information.]) ;; 6631016ad83Smrg esac 6641016ad83Smrg shift 6651016ad83Smrgdone 6661016ad83Smrg 6671016ad83Smrgif $lt_cl_silent; then 6681016ad83Smrg exec AS_MESSAGE_FD>/dev/null 6691016ad83Smrgfi 6701016ad83Smrg_LTEOF 6711016ad83Smrg 6721016ad83Smrgcat >>"$CONFIG_LT" <<_LTEOF 6731016ad83Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 6741016ad83Smrg_LTEOF 6751016ad83Smrg 6761016ad83Smrgcat >>"$CONFIG_LT" <<\_LTEOF 6771016ad83SmrgAC_MSG_NOTICE([creating $ofile]) 6781016ad83Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 6791016ad83SmrgAS_EXIT(0) 6801016ad83Smrg_LTEOF 6811016ad83Smrgchmod +x "$CONFIG_LT" 6821016ad83Smrg 6831016ad83Smrg# configure is writing to config.log, but config.lt does its own redirection, 6841016ad83Smrg# appending to config.log, which fails on DOS, as config.log is still kept 6851016ad83Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 6861016ad83Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 6871016ad83Smrglt_cl_success=: 6881016ad83Smrgtest "$silent" = yes && 6891016ad83Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 6901016ad83Smrgexec AS_MESSAGE_LOG_FD>/dev/null 6911016ad83Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 6921016ad83Smrgexec AS_MESSAGE_LOG_FD>>config.log 6931016ad83Smrg$lt_cl_success || AS_EXIT(1) 6941016ad83Smrg])# LT_OUTPUT 6951016ad83Smrg 6961016ad83Smrg 6971016ad83Smrg# _LT_CONFIG(TAG) 6981016ad83Smrg# --------------- 6991016ad83Smrg# If TAG is the built-in tag, create an initial libtool script with a 7001016ad83Smrg# default configuration from the untagged config vars. Otherwise add code 7011016ad83Smrg# to config.status for appending the configuration named by TAG from the 7021016ad83Smrg# matching tagged config vars. 7031016ad83Smrgm4_defun([_LT_CONFIG], 7041016ad83Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7051016ad83Smrg_LT_CONFIG_SAVE_COMMANDS([ 7061016ad83Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 7071016ad83Smrg m4_if(_LT_TAG, [C], [ 7081016ad83Smrg # See if we are running on zsh, and set the options which allow our 7091016ad83Smrg # commands through without removal of \ escapes. 7101016ad83Smrg if test -n "${ZSH_VERSION+set}" ; then 7111016ad83Smrg setopt NO_GLOB_SUBST 7121016ad83Smrg fi 7131016ad83Smrg 7141016ad83Smrg cfgfile="${ofile}T" 7151016ad83Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 7161016ad83Smrg $RM "$cfgfile" 7171016ad83Smrg 7181016ad83Smrg cat <<_LT_EOF >> "$cfgfile" 7191016ad83Smrg#! $SHELL 7201016ad83Smrg 7211016ad83Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 7221016ad83Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 7231016ad83Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 7241016ad83Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 7251016ad83Smrg# 7261016ad83Smrg_LT_COPYING 7271016ad83Smrg_LT_LIBTOOL_TAGS 7281016ad83Smrg 7291016ad83Smrg# ### BEGIN LIBTOOL CONFIG 7301016ad83Smrg_LT_LIBTOOL_CONFIG_VARS 7311016ad83Smrg_LT_LIBTOOL_TAG_VARS 7321016ad83Smrg# ### END LIBTOOL CONFIG 7331016ad83Smrg 7341016ad83Smrg_LT_EOF 7351016ad83Smrg 7361016ad83Smrg case $host_os in 7371016ad83Smrg aix3*) 7381016ad83Smrg cat <<\_LT_EOF >> "$cfgfile" 7391016ad83Smrg# AIX sometimes has problems with the GCC collect2 program. For some 7401016ad83Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 7411016ad83Smrg# vanish in a puff of smoke. 7421016ad83Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 7431016ad83Smrg COLLECT_NAMES= 7441016ad83Smrg export COLLECT_NAMES 7451016ad83Smrgfi 7461016ad83Smrg_LT_EOF 7471016ad83Smrg ;; 7481016ad83Smrg esac 7491016ad83Smrg 7501016ad83Smrg _LT_PROG_LTMAIN 7511016ad83Smrg 7521016ad83Smrg # We use sed instead of cat because bash on DJGPP gets confused if 7531016ad83Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 7541016ad83Smrg # text mode, it properly converts lines to CR/LF. This bash problem 7551016ad83Smrg # is reportedly fixed, but why not run on old versions too? 7561016ad83Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 7571016ad83Smrg || (rm -f "$cfgfile"; exit 1) 7581016ad83Smrg 7591016ad83Smrg _LT_PROG_REPLACE_SHELLFNS 7601016ad83Smrg 7611016ad83Smrg mv -f "$cfgfile" "$ofile" || 7621016ad83Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 7631016ad83Smrg chmod +x "$ofile" 7641016ad83Smrg], 7651016ad83Smrg[cat <<_LT_EOF >> "$ofile" 7661016ad83Smrg 7671016ad83Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 7681016ad83Smrgdnl in a comment (ie after a #). 7691016ad83Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 7701016ad83Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 7711016ad83Smrg# ### END LIBTOOL TAG CONFIG: $1 7721016ad83Smrg_LT_EOF 7731016ad83Smrg])dnl /m4_if 7741016ad83Smrg], 7751016ad83Smrg[m4_if([$1], [], [ 7761016ad83Smrg PACKAGE='$PACKAGE' 7771016ad83Smrg VERSION='$VERSION' 7781016ad83Smrg TIMESTAMP='$TIMESTAMP' 7791016ad83Smrg RM='$RM' 7801016ad83Smrg ofile='$ofile'], []) 7811016ad83Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 7821016ad83Smrg])# _LT_CONFIG 7831016ad83Smrg 7841016ad83Smrg 7851016ad83Smrg# LT_SUPPORTED_TAG(TAG) 7861016ad83Smrg# --------------------- 7871016ad83Smrg# Trace this macro to discover what tags are supported by the libtool 7881016ad83Smrg# --tag option, using: 7891016ad83Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 7901016ad83SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 7911016ad83Smrg 7921016ad83Smrg 7931016ad83Smrg# C support is built-in for now 7941016ad83Smrgm4_define([_LT_LANG_C_enabled], []) 7951016ad83Smrgm4_define([_LT_TAGS], []) 7961016ad83Smrg 7971016ad83Smrg 7981016ad83Smrg# LT_LANG(LANG) 7991016ad83Smrg# ------------- 8001016ad83Smrg# Enable libtool support for the given language if not already enabled. 8011016ad83SmrgAC_DEFUN([LT_LANG], 8021016ad83Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 8031016ad83Smrgm4_case([$1], 8041016ad83Smrg [C], [_LT_LANG(C)], 8051016ad83Smrg [C++], [_LT_LANG(CXX)], 8061016ad83Smrg [Go], [_LT_LANG(GO)], 8071016ad83Smrg [Java], [_LT_LANG(GCJ)], 8081016ad83Smrg [Fortran 77], [_LT_LANG(F77)], 8091016ad83Smrg [Fortran], [_LT_LANG(FC)], 8101016ad83Smrg [Windows Resource], [_LT_LANG(RC)], 8111016ad83Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 8121016ad83Smrg [_LT_LANG($1)], 8131016ad83Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 8141016ad83Smrg])# LT_LANG 8151016ad83Smrg 8161016ad83Smrg 8171016ad83Smrg# _LT_LANG(LANGNAME) 8181016ad83Smrg# ------------------ 8191016ad83Smrgm4_defun([_LT_LANG], 8201016ad83Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 8211016ad83Smrg [LT_SUPPORTED_TAG([$1])dnl 8221016ad83Smrg m4_append([_LT_TAGS], [$1 ])dnl 8231016ad83Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 8241016ad83Smrg _LT_LANG_$1_CONFIG($1)])dnl 8251016ad83Smrg])# _LT_LANG 8261016ad83Smrg 8271016ad83Smrg 8281016ad83Smrgm4_ifndef([AC_PROG_GO], [ 8291016ad83Smrg############################################################ 8301016ad83Smrg# NOTE: This macro has been submitted for inclusion into # 8311016ad83Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 8321016ad83Smrg# a released version of Autoconf we should remove this # 8331016ad83Smrg# macro and use it instead. # 8341016ad83Smrg############################################################ 8351016ad83Smrgm4_defun([AC_PROG_GO], 8361016ad83Smrg[AC_LANG_PUSH(Go)dnl 8371016ad83SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 8381016ad83SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 8391016ad83Smrg_AC_ARG_VAR_LDFLAGS()dnl 8401016ad83SmrgAC_CHECK_TOOL(GOC, gccgo) 8411016ad83Smrgif test -z "$GOC"; then 8421016ad83Smrg if test -n "$ac_tool_prefix"; then 8431016ad83Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 8441016ad83Smrg fi 8451016ad83Smrgfi 8461016ad83Smrgif test -z "$GOC"; then 8471016ad83Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 8481016ad83Smrgfi 8491016ad83Smrg])#m4_defun 8501016ad83Smrg])#m4_ifndef 8511016ad83Smrg 8521016ad83Smrg 8531016ad83Smrg# _LT_LANG_DEFAULT_CONFIG 8541016ad83Smrg# ----------------------- 8551016ad83Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 8561016ad83Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 8571016ad83Smrg [LT_LANG(CXX)], 8581016ad83Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 8591016ad83Smrg 8601016ad83SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 8611016ad83Smrg [LT_LANG(F77)], 8621016ad83Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 8631016ad83Smrg 8641016ad83SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 8651016ad83Smrg [LT_LANG(FC)], 8661016ad83Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 8671016ad83Smrg 8681016ad83Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 8691016ad83Smrgdnl pulling things in needlessly. 8701016ad83SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 8711016ad83Smrg [LT_LANG(GCJ)], 8721016ad83Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 8731016ad83Smrg [LT_LANG(GCJ)], 8741016ad83Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 8751016ad83Smrg [LT_LANG(GCJ)], 8761016ad83Smrg [m4_ifdef([AC_PROG_GCJ], 8771016ad83Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 8781016ad83Smrg m4_ifdef([A][M_PROG_GCJ], 8791016ad83Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 8801016ad83Smrg m4_ifdef([LT_PROG_GCJ], 8811016ad83Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 8821016ad83Smrg 8831016ad83SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 8841016ad83Smrg [LT_LANG(GO)], 8851016ad83Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 8861016ad83Smrg 8871016ad83SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 8881016ad83Smrg [LT_LANG(RC)], 8891016ad83Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 8901016ad83Smrg])# _LT_LANG_DEFAULT_CONFIG 8911016ad83Smrg 8921016ad83Smrg# Obsolete macros: 8931016ad83SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 8941016ad83SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 8951016ad83SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 8961016ad83SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 8971016ad83SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 8981016ad83Smrgdnl aclocal-1.4 backwards compatibility: 8991016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 9001016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 9011016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 9021016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 9031016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 9041016ad83Smrg 9051016ad83Smrg 9061016ad83Smrg# _LT_TAG_COMPILER 9071016ad83Smrg# ---------------- 9081016ad83Smrgm4_defun([_LT_TAG_COMPILER], 9091016ad83Smrg[AC_REQUIRE([AC_PROG_CC])dnl 9101016ad83Smrg 9111016ad83Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 9121016ad83Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 9131016ad83Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 9141016ad83Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 9151016ad83Smrg 9161016ad83Smrg# If no C compiler was specified, use CC. 9171016ad83SmrgLTCC=${LTCC-"$CC"} 9181016ad83Smrg 9191016ad83Smrg# If no C compiler flags were specified, use CFLAGS. 9201016ad83SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 9211016ad83Smrg 9221016ad83Smrg# Allow CC to be a program name with arguments. 9231016ad83Smrgcompiler=$CC 9241016ad83Smrg])# _LT_TAG_COMPILER 9251016ad83Smrg 9261016ad83Smrg 9271016ad83Smrg# _LT_COMPILER_BOILERPLATE 9281016ad83Smrg# ------------------------ 9291016ad83Smrg# Check for compiler boilerplate output or warnings with 9301016ad83Smrg# the simple compiler test code. 9311016ad83Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 9321016ad83Smrg[m4_require([_LT_DECL_SED])dnl 9331016ad83Smrgac_outfile=conftest.$ac_objext 9341016ad83Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 9351016ad83Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9361016ad83Smrg_lt_compiler_boilerplate=`cat conftest.err` 9371016ad83Smrg$RM conftest* 9381016ad83Smrg])# _LT_COMPILER_BOILERPLATE 9391016ad83Smrg 9401016ad83Smrg 9411016ad83Smrg# _LT_LINKER_BOILERPLATE 9421016ad83Smrg# ---------------------- 9431016ad83Smrg# Check for linker boilerplate output or warnings with 9441016ad83Smrg# the simple link test code. 9451016ad83Smrgm4_defun([_LT_LINKER_BOILERPLATE], 9461016ad83Smrg[m4_require([_LT_DECL_SED])dnl 9471016ad83Smrgac_outfile=conftest.$ac_objext 9481016ad83Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 9491016ad83Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9501016ad83Smrg_lt_linker_boilerplate=`cat conftest.err` 9511016ad83Smrg$RM -r conftest* 9521016ad83Smrg])# _LT_LINKER_BOILERPLATE 9531016ad83Smrg 9541016ad83Smrg# _LT_REQUIRED_DARWIN_CHECKS 9551016ad83Smrg# ------------------------- 9561016ad83Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 9571016ad83Smrg case $host_os in 9581016ad83Smrg rhapsody* | darwin*) 9591016ad83Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 9601016ad83Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 9611016ad83Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 9621016ad83Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 9631016ad83Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 9641016ad83Smrg _LT_DECL([], [DSYMUTIL], [1], 9651016ad83Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 9661016ad83Smrg _LT_DECL([], [NMEDIT], [1], 9671016ad83Smrg [Tool to change global to local symbols on Mac OS X]) 9681016ad83Smrg _LT_DECL([], [LIPO], [1], 9691016ad83Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 9701016ad83Smrg _LT_DECL([], [OTOOL], [1], 9711016ad83Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 9721016ad83Smrg _LT_DECL([], [OTOOL64], [1], 9731016ad83Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 9741016ad83Smrg 9751016ad83Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 9761016ad83Smrg [lt_cv_apple_cc_single_mod=no 9771016ad83Smrg if test -z "${LT_MULTI_MODULE}"; then 9781016ad83Smrg # By default we will add the -single_module flag. You can override 9791016ad83Smrg # by either setting the environment variable LT_MULTI_MODULE 9801016ad83Smrg # non-empty at configure time, or by adding -multi_module to the 9811016ad83Smrg # link flags. 9821016ad83Smrg rm -rf libconftest.dylib* 9831016ad83Smrg echo "int foo(void){return 1;}" > conftest.c 9841016ad83Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 9851016ad83Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 9861016ad83Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 9871016ad83Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 9881016ad83Smrg _lt_result=$? 9891016ad83Smrg # If there is a non-empty error log, and "single_module" 9901016ad83Smrg # appears in it, assume the flag caused a linker warning 9911016ad83Smrg if test -s conftest.err && $GREP single_module conftest.err; then 9921016ad83Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 9931016ad83Smrg # Otherwise, if the output was created with a 0 exit code from 9941016ad83Smrg # the compiler, it worked. 9951016ad83Smrg elif test -f libconftest.dylib && test $_lt_result -eq 0; then 9961016ad83Smrg lt_cv_apple_cc_single_mod=yes 9971016ad83Smrg else 9981016ad83Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 9991016ad83Smrg fi 10001016ad83Smrg rm -rf libconftest.dylib* 10011016ad83Smrg rm -f conftest.* 10021016ad83Smrg fi]) 10031016ad83Smrg 10041016ad83Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 10051016ad83Smrg [lt_cv_ld_exported_symbols_list], 10061016ad83Smrg [lt_cv_ld_exported_symbols_list=no 10071016ad83Smrg save_LDFLAGS=$LDFLAGS 10081016ad83Smrg echo "_main" > conftest.sym 10091016ad83Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 10101016ad83Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 10111016ad83Smrg [lt_cv_ld_exported_symbols_list=yes], 10121016ad83Smrg [lt_cv_ld_exported_symbols_list=no]) 10131016ad83Smrg LDFLAGS="$save_LDFLAGS" 10141016ad83Smrg ]) 10151016ad83Smrg 10161016ad83Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 10171016ad83Smrg [lt_cv_ld_force_load=no 10181016ad83Smrg cat > conftest.c << _LT_EOF 10191016ad83Smrgint forced_loaded() { return 2;} 10201016ad83Smrg_LT_EOF 10211016ad83Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 10221016ad83Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 10231016ad83Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 10241016ad83Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 10251016ad83Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 10261016ad83Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 10271016ad83Smrg cat > conftest.c << _LT_EOF 10281016ad83Smrgint main() { return 0;} 10291016ad83Smrg_LT_EOF 10301016ad83Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 10311016ad83Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 10321016ad83Smrg _lt_result=$? 10331016ad83Smrg if test -s conftest.err && $GREP force_load conftest.err; then 10341016ad83Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10351016ad83Smrg elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 10361016ad83Smrg lt_cv_ld_force_load=yes 10371016ad83Smrg else 10381016ad83Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10391016ad83Smrg fi 10401016ad83Smrg rm -f conftest.err libconftest.a conftest conftest.c 10411016ad83Smrg rm -rf conftest.dSYM 10421016ad83Smrg ]) 10431016ad83Smrg case $host_os in 10441016ad83Smrg rhapsody* | darwin1.[[012]]) 10451016ad83Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 10461016ad83Smrg darwin1.*) 10471016ad83Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10481016ad83Smrg darwin*) # darwin 5.x on 10491016ad83Smrg # if running on 10.5 or later, the deployment target defaults 10501016ad83Smrg # to the OS version, if on x86, and 10.4, the deployment 10511016ad83Smrg # target defaults to 10.4. Don't you love it? 10521016ad83Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10531016ad83Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 10541016ad83Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10551016ad83Smrg 10.[[012]]*) 10561016ad83Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10571016ad83Smrg 10.*) 10581016ad83Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10591016ad83Smrg esac 10601016ad83Smrg ;; 10611016ad83Smrg esac 10621016ad83Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 10631016ad83Smrg _lt_dar_single_mod='$single_module' 10641016ad83Smrg fi 10651016ad83Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 10661016ad83Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 10671016ad83Smrg else 10681016ad83Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 10691016ad83Smrg fi 10701016ad83Smrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 10711016ad83Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 10721016ad83Smrg else 10731016ad83Smrg _lt_dsymutil= 10741016ad83Smrg fi 10751016ad83Smrg ;; 10761016ad83Smrg esac 10771016ad83Smrg]) 10781016ad83Smrg 10791016ad83Smrg 10801016ad83Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 10811016ad83Smrg# --------------------------------- 10821016ad83Smrg# Checks for linker and compiler features on darwin 10831016ad83Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 10841016ad83Smrg[ 10851016ad83Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 10861016ad83Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10871016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=no 10881016ad83Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 10891016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 10901016ad83Smrg if test "$lt_cv_ld_force_load" = "yes"; then 10911016ad83Smrg _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\"`' 10921016ad83Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 10931016ad83Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 10941016ad83Smrg else 10951016ad83Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 10961016ad83Smrg fi 10971016ad83Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10981016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 10991016ad83Smrg case $cc_basename in 11001016ad83Smrg ifort*) _lt_dar_can_shared=yes ;; 11011016ad83Smrg *) _lt_dar_can_shared=$GCC ;; 11021016ad83Smrg esac 11031016ad83Smrg if test "$_lt_dar_can_shared" = "yes"; then 11041016ad83Smrg output_verbose_link_cmd=func_echo_all 11051016ad83Smrg _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}" 11061016ad83Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 11071016ad83Smrg _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}" 11081016ad83Smrg _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}" 11091016ad83Smrg m4_if([$1], [CXX], 11101016ad83Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 11111016ad83Smrg _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}" 11121016ad83Smrg _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}" 11131016ad83Smrg fi 11141016ad83Smrg],[]) 11151016ad83Smrg else 11161016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11171016ad83Smrg fi 11181016ad83Smrg]) 11191016ad83Smrg 11201016ad83Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 11211016ad83Smrg# ---------------------------------- 11221016ad83Smrg# Links a minimal program and checks the executable 11231016ad83Smrg# for the system default hardcoded library path. In most cases, 11241016ad83Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 11251016ad83Smrg# the location of the communication and MPI libs are included too. 11261016ad83Smrg# If we don't find anything, use the default library path according 11271016ad83Smrg# to the aix ld manual. 11281016ad83Smrg# Store the results from the different compilers for each TAGNAME. 11291016ad83Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 11301016ad83Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 11311016ad83Smrg[m4_require([_LT_DECL_SED])dnl 11321016ad83Smrgif test "${lt_cv_aix_libpath+set}" = set; then 11331016ad83Smrg aix_libpath=$lt_cv_aix_libpath 11341016ad83Smrgelse 11351016ad83Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 11361016ad83Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 11371016ad83Smrg lt_aix_libpath_sed='[ 11381016ad83Smrg /Import File Strings/,/^$/ { 11391016ad83Smrg /^0/ { 11401016ad83Smrg s/^0 *\([^ ]*\) *$/\1/ 11411016ad83Smrg p 11421016ad83Smrg } 11431016ad83Smrg }]' 11441016ad83Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 11451016ad83Smrg # Check for a 64-bit object if we didn't find anything. 11461016ad83Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 11471016ad83Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 11481016ad83Smrg fi],[]) 11491016ad83Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 11501016ad83Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 11511016ad83Smrg fi 11521016ad83Smrg ]) 11531016ad83Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 11541016ad83Smrgfi 11551016ad83Smrg])# _LT_SYS_MODULE_PATH_AIX 11561016ad83Smrg 11571016ad83Smrg 11581016ad83Smrg# _LT_SHELL_INIT(ARG) 11591016ad83Smrg# ------------------- 11601016ad83Smrgm4_define([_LT_SHELL_INIT], 11611016ad83Smrg[m4_divert_text([M4SH-INIT], [$1 11621016ad83Smrg])])# _LT_SHELL_INIT 11631016ad83Smrg 11641016ad83Smrg 11651016ad83Smrg 11661016ad83Smrg# _LT_PROG_ECHO_BACKSLASH 11671016ad83Smrg# ----------------------- 11681016ad83Smrg# Find how we can fake an echo command that does not interpret backslash. 11691016ad83Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 11701016ad83Smrg# of the generated configure script which will find a shell with a builtin 11711016ad83Smrg# printf (which we can use as an echo command). 11721016ad83Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 11731016ad83Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 11741016ad83SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 11751016ad83SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 11761016ad83Smrg 11771016ad83SmrgAC_MSG_CHECKING([how to print strings]) 11781016ad83Smrg# Test print first, because it will be a builtin if present. 11791016ad83Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 11801016ad83Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 11811016ad83Smrg ECHO='print -r --' 11821016ad83Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 11831016ad83Smrg ECHO='printf %s\n' 11841016ad83Smrgelse 11851016ad83Smrg # Use this function as a fallback that always works. 11861016ad83Smrg func_fallback_echo () 11871016ad83Smrg { 11881016ad83Smrg eval 'cat <<_LTECHO_EOF 11891016ad83Smrg$[]1 11901016ad83Smrg_LTECHO_EOF' 11911016ad83Smrg } 11921016ad83Smrg ECHO='func_fallback_echo' 11931016ad83Smrgfi 11941016ad83Smrg 11951016ad83Smrg# func_echo_all arg... 11961016ad83Smrg# Invoke $ECHO with all args, space-separated. 11971016ad83Smrgfunc_echo_all () 11981016ad83Smrg{ 11991016ad83Smrg $ECHO "$*" 12001016ad83Smrg} 12011016ad83Smrg 12021016ad83Smrgcase "$ECHO" in 12031016ad83Smrg printf*) AC_MSG_RESULT([printf]) ;; 12041016ad83Smrg print*) AC_MSG_RESULT([print -r]) ;; 12051016ad83Smrg *) AC_MSG_RESULT([cat]) ;; 12061016ad83Smrgesac 12071016ad83Smrg 12081016ad83Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 12091016ad83Smrg[_AS_DETECT_SUGGESTED([ 12101016ad83Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 12111016ad83Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 12121016ad83Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 12131016ad83Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 12141016ad83Smrg PATH=/empty FPATH=/empty; export PATH FPATH 12151016ad83Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 12161016ad83Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 12171016ad83Smrg 12181016ad83Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 12191016ad83Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 12201016ad83Smrg])# _LT_PROG_ECHO_BACKSLASH 12211016ad83Smrg 12221016ad83Smrg 12231016ad83Smrg# _LT_WITH_SYSROOT 12241016ad83Smrg# ---------------- 12251016ad83SmrgAC_DEFUN([_LT_WITH_SYSROOT], 12261016ad83Smrg[AC_MSG_CHECKING([for sysroot]) 12271016ad83SmrgAC_ARG_WITH([sysroot], 12281016ad83Smrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 12291016ad83Smrg (or the compiler's sysroot if not specified).], 12301016ad83Smrg[], [with_sysroot=no]) 12311016ad83Smrg 12321016ad83Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 12331016ad83Smrgdnl in case the user passed a directory name. 12341016ad83Smrglt_sysroot= 12351016ad83Smrgcase ${with_sysroot} in #( 12361016ad83Smrg yes) 12371016ad83Smrg if test "$GCC" = yes; then 12381016ad83Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 12391016ad83Smrg fi 12401016ad83Smrg ;; #( 12411016ad83Smrg /*) 12421016ad83Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 12431016ad83Smrg ;; #( 12441016ad83Smrg no|'') 12451016ad83Smrg ;; #( 12461016ad83Smrg *) 12471016ad83Smrg AC_MSG_RESULT([${with_sysroot}]) 12481016ad83Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 12491016ad83Smrg ;; 12501016ad83Smrgesac 12511016ad83Smrg 12521016ad83Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 12531016ad83Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 12541016ad83Smrg[dependent libraries, and in which our libraries should be installed.])]) 12551016ad83Smrg 12561016ad83Smrg# _LT_ENABLE_LOCK 12571016ad83Smrg# --------------- 12581016ad83Smrgm4_defun([_LT_ENABLE_LOCK], 12591016ad83Smrg[AC_ARG_ENABLE([libtool-lock], 12601016ad83Smrg [AS_HELP_STRING([--disable-libtool-lock], 12611016ad83Smrg [avoid locking (might break parallel builds)])]) 12621016ad83Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 12631016ad83Smrg 12641016ad83Smrg# Some flags need to be propagated to the compiler or linker for good 12651016ad83Smrg# libtool support. 12661016ad83Smrgcase $host in 12671016ad83Smrgia64-*-hpux*) 12681016ad83Smrg # Find out which ABI we are using. 12691016ad83Smrg echo 'int i;' > conftest.$ac_ext 12701016ad83Smrg if AC_TRY_EVAL(ac_compile); then 12711016ad83Smrg case `/usr/bin/file conftest.$ac_objext` in 12721016ad83Smrg *ELF-32*) 12731016ad83Smrg HPUX_IA64_MODE="32" 12741016ad83Smrg ;; 12751016ad83Smrg *ELF-64*) 12761016ad83Smrg HPUX_IA64_MODE="64" 12771016ad83Smrg ;; 12781016ad83Smrg esac 12791016ad83Smrg fi 12801016ad83Smrg rm -rf conftest* 12811016ad83Smrg ;; 12821016ad83Smrg*-*-irix6*) 12831016ad83Smrg # Find out which ABI we are using. 12841016ad83Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 12851016ad83Smrg if AC_TRY_EVAL(ac_compile); then 12861016ad83Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 12871016ad83Smrg case `/usr/bin/file conftest.$ac_objext` in 12881016ad83Smrg *32-bit*) 12891016ad83Smrg LD="${LD-ld} -melf32bsmip" 12901016ad83Smrg ;; 12911016ad83Smrg *N32*) 12921016ad83Smrg LD="${LD-ld} -melf32bmipn32" 12931016ad83Smrg ;; 12941016ad83Smrg *64-bit*) 12951016ad83Smrg LD="${LD-ld} -melf64bmip" 12961016ad83Smrg ;; 12971016ad83Smrg esac 12981016ad83Smrg else 12991016ad83Smrg case `/usr/bin/file conftest.$ac_objext` in 13001016ad83Smrg *32-bit*) 13011016ad83Smrg LD="${LD-ld} -32" 13021016ad83Smrg ;; 13031016ad83Smrg *N32*) 13041016ad83Smrg LD="${LD-ld} -n32" 13051016ad83Smrg ;; 13061016ad83Smrg *64-bit*) 13071016ad83Smrg LD="${LD-ld} -64" 13081016ad83Smrg ;; 13091016ad83Smrg esac 13101016ad83Smrg fi 13111016ad83Smrg fi 13121016ad83Smrg rm -rf conftest* 13131016ad83Smrg ;; 13141016ad83Smrg 13151c7386f4Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 13161016ad83Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 13171016ad83Smrg # Find out which ABI we are using. 13181016ad83Smrg echo 'int i;' > conftest.$ac_ext 13191016ad83Smrg if AC_TRY_EVAL(ac_compile); then 13201016ad83Smrg case `/usr/bin/file conftest.o` in 13211016ad83Smrg *32-bit*) 13221016ad83Smrg case $host in 13231016ad83Smrg x86_64-*kfreebsd*-gnu) 13241016ad83Smrg LD="${LD-ld} -m elf_i386_fbsd" 13251016ad83Smrg ;; 13261016ad83Smrg x86_64-*linux*) 13271016ad83Smrg case `/usr/bin/file conftest.o` in 13281016ad83Smrg *x86-64*) 13291016ad83Smrg LD="${LD-ld} -m elf32_x86_64" 13301016ad83Smrg ;; 13311016ad83Smrg *) 13321016ad83Smrg LD="${LD-ld} -m elf_i386" 13331016ad83Smrg ;; 13341016ad83Smrg esac 13351016ad83Smrg ;; 13361c7386f4Smrg powerpc64le-*) 13371c7386f4Smrg LD="${LD-ld} -m elf32lppclinux" 13381c7386f4Smrg ;; 13391c7386f4Smrg powerpc64-*) 13401016ad83Smrg LD="${LD-ld} -m elf32ppclinux" 13411016ad83Smrg ;; 13421016ad83Smrg s390x-*linux*) 13431016ad83Smrg LD="${LD-ld} -m elf_s390" 13441016ad83Smrg ;; 13451016ad83Smrg sparc64-*linux*) 13461016ad83Smrg LD="${LD-ld} -m elf32_sparc" 13471016ad83Smrg ;; 13481016ad83Smrg esac 13491016ad83Smrg ;; 13501016ad83Smrg *64-bit*) 13511016ad83Smrg case $host in 13521016ad83Smrg x86_64-*kfreebsd*-gnu) 13531016ad83Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 13541016ad83Smrg ;; 13551016ad83Smrg x86_64-*linux*) 13561016ad83Smrg LD="${LD-ld} -m elf_x86_64" 13571016ad83Smrg ;; 13581c7386f4Smrg powerpcle-*) 13591c7386f4Smrg LD="${LD-ld} -m elf64lppc" 13601c7386f4Smrg ;; 13611c7386f4Smrg powerpc-*) 13621016ad83Smrg LD="${LD-ld} -m elf64ppc" 13631016ad83Smrg ;; 13641016ad83Smrg s390*-*linux*|s390*-*tpf*) 13651016ad83Smrg LD="${LD-ld} -m elf64_s390" 13661016ad83Smrg ;; 13671016ad83Smrg sparc*-*linux*) 13681016ad83Smrg LD="${LD-ld} -m elf64_sparc" 13691016ad83Smrg ;; 13701016ad83Smrg esac 13711016ad83Smrg ;; 13721016ad83Smrg esac 13731016ad83Smrg fi 13741016ad83Smrg rm -rf conftest* 13751016ad83Smrg ;; 13761016ad83Smrg 13771016ad83Smrg*-*-sco3.2v5*) 13781016ad83Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 13791016ad83Smrg SAVE_CFLAGS="$CFLAGS" 13801016ad83Smrg CFLAGS="$CFLAGS -belf" 13811016ad83Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 13821016ad83Smrg [AC_LANG_PUSH(C) 13831016ad83Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 13841016ad83Smrg AC_LANG_POP]) 13851016ad83Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 13861016ad83Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 13871016ad83Smrg CFLAGS="$SAVE_CFLAGS" 13881016ad83Smrg fi 13891016ad83Smrg ;; 13901016ad83Smrg*-*solaris*) 13911016ad83Smrg # Find out which ABI we are using. 13921016ad83Smrg echo 'int i;' > conftest.$ac_ext 13931016ad83Smrg if AC_TRY_EVAL(ac_compile); then 13941016ad83Smrg case `/usr/bin/file conftest.o` in 13951016ad83Smrg *64-bit*) 13961016ad83Smrg case $lt_cv_prog_gnu_ld in 13971016ad83Smrg yes*) 13981016ad83Smrg case $host in 13991016ad83Smrg i?86-*-solaris*) 14001016ad83Smrg LD="${LD-ld} -m elf_x86_64" 14011016ad83Smrg ;; 14021016ad83Smrg sparc*-*-solaris*) 14031016ad83Smrg LD="${LD-ld} -m elf64_sparc" 14041016ad83Smrg ;; 14051016ad83Smrg esac 14061016ad83Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 14071016ad83Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 14081016ad83Smrg LD="${LD-ld}_sol2" 14091016ad83Smrg fi 14101016ad83Smrg ;; 14111016ad83Smrg *) 14121016ad83Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 14131016ad83Smrg LD="${LD-ld} -64" 14141016ad83Smrg fi 14151016ad83Smrg ;; 14161016ad83Smrg esac 14171016ad83Smrg ;; 14181016ad83Smrg esac 14191016ad83Smrg fi 14201016ad83Smrg rm -rf conftest* 14211016ad83Smrg ;; 14221016ad83Smrgesac 14231016ad83Smrg 14241016ad83Smrgneed_locks="$enable_libtool_lock" 14251016ad83Smrg])# _LT_ENABLE_LOCK 14261016ad83Smrg 14271016ad83Smrg 14281016ad83Smrg# _LT_PROG_AR 14291016ad83Smrg# ----------- 14301016ad83Smrgm4_defun([_LT_PROG_AR], 14311016ad83Smrg[AC_CHECK_TOOLS(AR, [ar], false) 14321016ad83Smrg: ${AR=ar} 14331016ad83Smrg: ${AR_FLAGS=cru} 14341016ad83Smrg_LT_DECL([], [AR], [1], [The archiver]) 14351016ad83Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 14361016ad83Smrg 14371016ad83SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 14381016ad83Smrg [lt_cv_ar_at_file=no 14391016ad83Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 14401016ad83Smrg [echo conftest.$ac_objext > conftest.lst 14411016ad83Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 14421016ad83Smrg AC_TRY_EVAL([lt_ar_try]) 14431016ad83Smrg if test "$ac_status" -eq 0; then 14441016ad83Smrg # Ensure the archiver fails upon bogus file names. 14451016ad83Smrg rm -f conftest.$ac_objext libconftest.a 14461016ad83Smrg AC_TRY_EVAL([lt_ar_try]) 14471016ad83Smrg if test "$ac_status" -ne 0; then 14481016ad83Smrg lt_cv_ar_at_file=@ 14491016ad83Smrg fi 14501016ad83Smrg fi 14511016ad83Smrg rm -f conftest.* libconftest.a 14521016ad83Smrg ]) 14531016ad83Smrg ]) 14541016ad83Smrg 14551016ad83Smrgif test "x$lt_cv_ar_at_file" = xno; then 14561016ad83Smrg archiver_list_spec= 14571016ad83Smrgelse 14581016ad83Smrg archiver_list_spec=$lt_cv_ar_at_file 14591016ad83Smrgfi 14601016ad83Smrg_LT_DECL([], [archiver_list_spec], [1], 14611016ad83Smrg [How to feed a file listing to the archiver]) 14621016ad83Smrg])# _LT_PROG_AR 14631016ad83Smrg 14641016ad83Smrg 14651016ad83Smrg# _LT_CMD_OLD_ARCHIVE 14661016ad83Smrg# ------------------- 14671016ad83Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 14681016ad83Smrg[_LT_PROG_AR 14691016ad83Smrg 14701016ad83SmrgAC_CHECK_TOOL(STRIP, strip, :) 14711016ad83Smrgtest -z "$STRIP" && STRIP=: 14721016ad83Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 14731016ad83Smrg 14741016ad83SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 14751016ad83Smrgtest -z "$RANLIB" && RANLIB=: 14761016ad83Smrg_LT_DECL([], [RANLIB], [1], 14771016ad83Smrg [Commands used to install an old-style archive]) 14781016ad83Smrg 14791016ad83Smrg# Determine commands to create old-style static archives. 14801016ad83Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 14811016ad83Smrgold_postinstall_cmds='chmod 644 $oldlib' 14821016ad83Smrgold_postuninstall_cmds= 14831016ad83Smrg 14841016ad83Smrgif test -n "$RANLIB"; then 14851016ad83Smrg case $host_os in 14861016ad83Smrg openbsd*) 14871016ad83Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 14881016ad83Smrg ;; 14891016ad83Smrg *) 14901016ad83Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 14911016ad83Smrg ;; 14921016ad83Smrg esac 14931016ad83Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 14941016ad83Smrgfi 14951016ad83Smrg 14961016ad83Smrgcase $host_os in 14971016ad83Smrg darwin*) 14981016ad83Smrg lock_old_archive_extraction=yes ;; 14991016ad83Smrg *) 15001016ad83Smrg lock_old_archive_extraction=no ;; 15011016ad83Smrgesac 15021016ad83Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 15031016ad83Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 15041016ad83Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 15051016ad83Smrg [Commands used to build an old-style archive]) 15061016ad83Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 15071016ad83Smrg [Whether to use a lock for old archive extraction]) 15081016ad83Smrg])# _LT_CMD_OLD_ARCHIVE 15091016ad83Smrg 15101016ad83Smrg 15111016ad83Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 15121016ad83Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 15131016ad83Smrg# ---------------------------------------------------------------- 15141016ad83Smrg# Check whether the given compiler option works 15151016ad83SmrgAC_DEFUN([_LT_COMPILER_OPTION], 15161016ad83Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 15171016ad83Smrgm4_require([_LT_DECL_SED])dnl 15181016ad83SmrgAC_CACHE_CHECK([$1], [$2], 15191016ad83Smrg [$2=no 15201016ad83Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 15211016ad83Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 15221016ad83Smrg lt_compiler_flag="$3" 15231016ad83Smrg # Insert the option either (1) after the last *FLAGS variable, or 15241016ad83Smrg # (2) before a word containing "conftest.", or (3) at the end. 15251016ad83Smrg # Note that $ac_compile itself does not contain backslashes and begins 15261016ad83Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 15271016ad83Smrg # The option is referenced via a variable to avoid confusing sed. 15281016ad83Smrg lt_compile=`echo "$ac_compile" | $SED \ 15291016ad83Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 15301016ad83Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 15311016ad83Smrg -e 's:$: $lt_compiler_flag:'` 15321016ad83Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 15331016ad83Smrg (eval "$lt_compile" 2>conftest.err) 15341016ad83Smrg ac_status=$? 15351016ad83Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 15361016ad83Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 15371016ad83Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 15381016ad83Smrg # The compiler can only warn and ignore the option if not recognized 15391016ad83Smrg # So say no if there are warnings other than the usual output. 15401016ad83Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 15411016ad83Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 15421016ad83Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 15431016ad83Smrg $2=yes 15441016ad83Smrg fi 15451016ad83Smrg fi 15461016ad83Smrg $RM conftest* 15471016ad83Smrg]) 15481016ad83Smrg 15491016ad83Smrgif test x"[$]$2" = xyes; then 15501016ad83Smrg m4_if([$5], , :, [$5]) 15511016ad83Smrgelse 15521016ad83Smrg m4_if([$6], , :, [$6]) 15531016ad83Smrgfi 15541016ad83Smrg])# _LT_COMPILER_OPTION 15551016ad83Smrg 15561016ad83Smrg# Old name: 15571016ad83SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 15581016ad83Smrgdnl aclocal-1.4 backwards compatibility: 15591016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 15601016ad83Smrg 15611016ad83Smrg 15621016ad83Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 15631016ad83Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 15641016ad83Smrg# ---------------------------------------------------- 15651016ad83Smrg# Check whether the given linker option works 15661016ad83SmrgAC_DEFUN([_LT_LINKER_OPTION], 15671016ad83Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 15681016ad83Smrgm4_require([_LT_DECL_SED])dnl 15691016ad83SmrgAC_CACHE_CHECK([$1], [$2], 15701016ad83Smrg [$2=no 15711016ad83Smrg save_LDFLAGS="$LDFLAGS" 15721016ad83Smrg LDFLAGS="$LDFLAGS $3" 15731016ad83Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 15741016ad83Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 15751016ad83Smrg # The linker can only warn and ignore the option if not recognized 15761016ad83Smrg # So say no if there are warnings 15771016ad83Smrg if test -s conftest.err; then 15781016ad83Smrg # Append any errors to the config.log. 15791016ad83Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 15801016ad83Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 15811016ad83Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 15821016ad83Smrg if diff conftest.exp conftest.er2 >/dev/null; then 15831016ad83Smrg $2=yes 15841016ad83Smrg fi 15851016ad83Smrg else 15861016ad83Smrg $2=yes 15871016ad83Smrg fi 15881016ad83Smrg fi 15891016ad83Smrg $RM -r conftest* 15901016ad83Smrg LDFLAGS="$save_LDFLAGS" 15911016ad83Smrg]) 15921016ad83Smrg 15931016ad83Smrgif test x"[$]$2" = xyes; then 15941016ad83Smrg m4_if([$4], , :, [$4]) 15951016ad83Smrgelse 15961016ad83Smrg m4_if([$5], , :, [$5]) 15971016ad83Smrgfi 15981016ad83Smrg])# _LT_LINKER_OPTION 15991016ad83Smrg 16001016ad83Smrg# Old name: 16011016ad83SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 16021016ad83Smrgdnl aclocal-1.4 backwards compatibility: 16031016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 16041016ad83Smrg 16051016ad83Smrg 16061016ad83Smrg# LT_CMD_MAX_LEN 16071016ad83Smrg#--------------- 16081016ad83SmrgAC_DEFUN([LT_CMD_MAX_LEN], 16091016ad83Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 16101016ad83Smrg# find the maximum length of command line arguments 16111016ad83SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 16121016ad83SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 16131016ad83Smrg i=0 16141016ad83Smrg teststring="ABCD" 16151016ad83Smrg 16161016ad83Smrg case $build_os in 16171016ad83Smrg msdosdjgpp*) 16181016ad83Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 16191016ad83Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 16201016ad83Smrg # during glob expansion). Even if it were fixed, the result of this 16211016ad83Smrg # check would be larger than it should be. 16221016ad83Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 16231016ad83Smrg ;; 16241016ad83Smrg 16251016ad83Smrg gnu*) 16261016ad83Smrg # Under GNU Hurd, this test is not required because there is 16271016ad83Smrg # no limit to the length of command line arguments. 16281016ad83Smrg # Libtool will interpret -1 as no limit whatsoever 16291016ad83Smrg lt_cv_sys_max_cmd_len=-1; 16301016ad83Smrg ;; 16311016ad83Smrg 16321016ad83Smrg cygwin* | mingw* | cegcc*) 16331016ad83Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 16341016ad83Smrg # about 5 minutes as the teststring grows exponentially. 16351016ad83Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 16361016ad83Smrg # you end up with a "frozen" computer, even though with patience 16371016ad83Smrg # the test eventually succeeds (with a max line length of 256k). 16381016ad83Smrg # Instead, let's just punt: use the minimum linelength reported by 16391016ad83Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 16401016ad83Smrg lt_cv_sys_max_cmd_len=8192; 16411016ad83Smrg ;; 16421016ad83Smrg 16431016ad83Smrg mint*) 16441016ad83Smrg # On MiNT this can take a long time and run out of memory. 16451016ad83Smrg lt_cv_sys_max_cmd_len=8192; 16461016ad83Smrg ;; 16471016ad83Smrg 16481016ad83Smrg amigaos*) 16491016ad83Smrg # On AmigaOS with pdksh, this test takes hours, literally. 16501016ad83Smrg # So we just punt and use a minimum line length of 8192. 16511016ad83Smrg lt_cv_sys_max_cmd_len=8192; 16521016ad83Smrg ;; 16531016ad83Smrg 16541016ad83Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 16551016ad83Smrg # This has been around since 386BSD, at least. Likely further. 16561016ad83Smrg if test -x /sbin/sysctl; then 16571016ad83Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 16581016ad83Smrg elif test -x /usr/sbin/sysctl; then 16591016ad83Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 16601016ad83Smrg else 16611016ad83Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 16621016ad83Smrg fi 16631016ad83Smrg # And add a safety zone 16641016ad83Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 16651016ad83Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 16661016ad83Smrg ;; 16671016ad83Smrg 16681016ad83Smrg interix*) 16691016ad83Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 16701016ad83Smrg lt_cv_sys_max_cmd_len=196608 16711016ad83Smrg ;; 16721016ad83Smrg 16731016ad83Smrg os2*) 16741016ad83Smrg # The test takes a long time on OS/2. 16751016ad83Smrg lt_cv_sys_max_cmd_len=8192 16761016ad83Smrg ;; 16771016ad83Smrg 16781016ad83Smrg osf*) 16791016ad83Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 16801016ad83Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 16811016ad83Smrg # nice to cause kernel panics so lets avoid the loop below. 16821016ad83Smrg # First set a reasonable default. 16831016ad83Smrg lt_cv_sys_max_cmd_len=16384 16841016ad83Smrg # 16851016ad83Smrg if test -x /sbin/sysconfig; then 16861016ad83Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 16871016ad83Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 16881016ad83Smrg esac 16891016ad83Smrg fi 16901016ad83Smrg ;; 16911016ad83Smrg sco3.2v5*) 16921016ad83Smrg lt_cv_sys_max_cmd_len=102400 16931016ad83Smrg ;; 16941016ad83Smrg sysv5* | sco5v6* | sysv4.2uw2*) 16951016ad83Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 16961016ad83Smrg if test -n "$kargmax"; then 16971016ad83Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 16981016ad83Smrg else 16991016ad83Smrg lt_cv_sys_max_cmd_len=32768 17001016ad83Smrg fi 17011016ad83Smrg ;; 17021016ad83Smrg *) 17031016ad83Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 17041016ad83Smrg if test -n "$lt_cv_sys_max_cmd_len" && \ 17051016ad83Smrg test undefined != "$lt_cv_sys_max_cmd_len"; then 17061016ad83Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 17071016ad83Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 17081016ad83Smrg else 17091016ad83Smrg # Make teststring a little bigger before we do anything with it. 17101016ad83Smrg # a 1K string should be a reasonable start. 17111016ad83Smrg for i in 1 2 3 4 5 6 7 8 ; do 17121016ad83Smrg teststring=$teststring$teststring 17131016ad83Smrg done 17141016ad83Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 17151016ad83Smrg # If test is not a shell built-in, we'll probably end up computing a 17161016ad83Smrg # maximum length that is only half of the actual maximum length, but 17171016ad83Smrg # we can't tell. 17181016ad83Smrg while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 17191016ad83Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 17201016ad83Smrg test $i != 17 # 1/2 MB should be enough 17211016ad83Smrg do 17221016ad83Smrg i=`expr $i + 1` 17231016ad83Smrg teststring=$teststring$teststring 17241016ad83Smrg done 17251016ad83Smrg # Only check the string length outside the loop. 17261016ad83Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 17271016ad83Smrg teststring= 17281016ad83Smrg # Add a significant safety factor because C++ compilers can tack on 17291016ad83Smrg # massive amounts of additional arguments before passing them to the 17301016ad83Smrg # linker. It appears as though 1/2 is a usable value. 17311016ad83Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 17321016ad83Smrg fi 17331016ad83Smrg ;; 17341016ad83Smrg esac 17351016ad83Smrg]) 17361016ad83Smrgif test -n $lt_cv_sys_max_cmd_len ; then 17371016ad83Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 17381016ad83Smrgelse 17391016ad83Smrg AC_MSG_RESULT(none) 17401016ad83Smrgfi 17411016ad83Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 17421016ad83Smrg_LT_DECL([], [max_cmd_len], [0], 17431016ad83Smrg [What is the maximum length of a command?]) 17441016ad83Smrg])# LT_CMD_MAX_LEN 17451016ad83Smrg 17461016ad83Smrg# Old name: 17471016ad83SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 17481016ad83Smrgdnl aclocal-1.4 backwards compatibility: 17491016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 17501016ad83Smrg 17511016ad83Smrg 17521016ad83Smrg# _LT_HEADER_DLFCN 17531016ad83Smrg# ---------------- 17541016ad83Smrgm4_defun([_LT_HEADER_DLFCN], 17551016ad83Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 17561016ad83Smrg])# _LT_HEADER_DLFCN 17571016ad83Smrg 17581016ad83Smrg 17591016ad83Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 17601016ad83Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 17611016ad83Smrg# ---------------------------------------------------------------- 17621016ad83Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 17631016ad83Smrg[m4_require([_LT_HEADER_DLFCN])dnl 17641016ad83Smrgif test "$cross_compiling" = yes; then : 17651016ad83Smrg [$4] 17661016ad83Smrgelse 17671016ad83Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 17681016ad83Smrg lt_status=$lt_dlunknown 17691016ad83Smrg cat > conftest.$ac_ext <<_LT_EOF 17701016ad83Smrg[#line $LINENO "configure" 17711016ad83Smrg#include "confdefs.h" 17721016ad83Smrg 17731016ad83Smrg#if HAVE_DLFCN_H 17741016ad83Smrg#include <dlfcn.h> 17751016ad83Smrg#endif 17761016ad83Smrg 17771016ad83Smrg#include <stdio.h> 17781016ad83Smrg 17791016ad83Smrg#ifdef RTLD_GLOBAL 17801016ad83Smrg# define LT_DLGLOBAL RTLD_GLOBAL 17811016ad83Smrg#else 17821016ad83Smrg# ifdef DL_GLOBAL 17831016ad83Smrg# define LT_DLGLOBAL DL_GLOBAL 17841016ad83Smrg# else 17851016ad83Smrg# define LT_DLGLOBAL 0 17861016ad83Smrg# endif 17871016ad83Smrg#endif 17881016ad83Smrg 17891016ad83Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 17901016ad83Smrg find out it does not work in some platform. */ 17911016ad83Smrg#ifndef LT_DLLAZY_OR_NOW 17921016ad83Smrg# ifdef RTLD_LAZY 17931016ad83Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 17941016ad83Smrg# else 17951016ad83Smrg# ifdef DL_LAZY 17961016ad83Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 17971016ad83Smrg# else 17981016ad83Smrg# ifdef RTLD_NOW 17991016ad83Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 18001016ad83Smrg# else 18011016ad83Smrg# ifdef DL_NOW 18021016ad83Smrg# define LT_DLLAZY_OR_NOW DL_NOW 18031016ad83Smrg# else 18041016ad83Smrg# define LT_DLLAZY_OR_NOW 0 18051016ad83Smrg# endif 18061016ad83Smrg# endif 18071016ad83Smrg# endif 18081016ad83Smrg# endif 18091016ad83Smrg#endif 18101016ad83Smrg 18111016ad83Smrg/* When -fvisbility=hidden is used, assume the code has been annotated 18121016ad83Smrg correspondingly for the symbols needed. */ 18131016ad83Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 18141016ad83Smrgint fnord () __attribute__((visibility("default"))); 18151016ad83Smrg#endif 18161016ad83Smrg 18171016ad83Smrgint fnord () { return 42; } 18181016ad83Smrgint main () 18191016ad83Smrg{ 18201016ad83Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 18211016ad83Smrg int status = $lt_dlunknown; 18221016ad83Smrg 18231016ad83Smrg if (self) 18241016ad83Smrg { 18251016ad83Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 18261016ad83Smrg else 18271016ad83Smrg { 18281016ad83Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 18291016ad83Smrg else puts (dlerror ()); 18301016ad83Smrg } 18311016ad83Smrg /* dlclose (self); */ 18321016ad83Smrg } 18331016ad83Smrg else 18341016ad83Smrg puts (dlerror ()); 18351016ad83Smrg 18361016ad83Smrg return status; 18371016ad83Smrg}] 18381016ad83Smrg_LT_EOF 18391016ad83Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 18401016ad83Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 18411016ad83Smrg lt_status=$? 18421016ad83Smrg case x$lt_status in 18431016ad83Smrg x$lt_dlno_uscore) $1 ;; 18441016ad83Smrg x$lt_dlneed_uscore) $2 ;; 18451016ad83Smrg x$lt_dlunknown|x*) $3 ;; 18461016ad83Smrg esac 18471016ad83Smrg else : 18481016ad83Smrg # compilation failed 18491016ad83Smrg $3 18501016ad83Smrg fi 18511016ad83Smrgfi 18521016ad83Smrgrm -fr conftest* 18531016ad83Smrg])# _LT_TRY_DLOPEN_SELF 18541016ad83Smrg 18551016ad83Smrg 18561016ad83Smrg# LT_SYS_DLOPEN_SELF 18571016ad83Smrg# ------------------ 18581016ad83SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 18591016ad83Smrg[m4_require([_LT_HEADER_DLFCN])dnl 18601016ad83Smrgif test "x$enable_dlopen" != xyes; then 18611016ad83Smrg enable_dlopen=unknown 18621016ad83Smrg enable_dlopen_self=unknown 18631016ad83Smrg enable_dlopen_self_static=unknown 18641016ad83Smrgelse 18651016ad83Smrg lt_cv_dlopen=no 18661016ad83Smrg lt_cv_dlopen_libs= 18671016ad83Smrg 18681016ad83Smrg case $host_os in 18691016ad83Smrg beos*) 18701016ad83Smrg lt_cv_dlopen="load_add_on" 18711016ad83Smrg lt_cv_dlopen_libs= 18721016ad83Smrg lt_cv_dlopen_self=yes 18731016ad83Smrg ;; 18741016ad83Smrg 18751016ad83Smrg mingw* | pw32* | cegcc*) 18761016ad83Smrg lt_cv_dlopen="LoadLibrary" 18771016ad83Smrg lt_cv_dlopen_libs= 18781016ad83Smrg ;; 18791016ad83Smrg 18801016ad83Smrg cygwin*) 18811016ad83Smrg lt_cv_dlopen="dlopen" 18821016ad83Smrg lt_cv_dlopen_libs= 18831016ad83Smrg ;; 18841016ad83Smrg 18851016ad83Smrg darwin*) 18861016ad83Smrg # if libdl is installed we need to link against it 18871016ad83Smrg AC_CHECK_LIB([dl], [dlopen], 18881016ad83Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 18891016ad83Smrg lt_cv_dlopen="dyld" 18901016ad83Smrg lt_cv_dlopen_libs= 18911016ad83Smrg lt_cv_dlopen_self=yes 18921016ad83Smrg ]) 18931016ad83Smrg ;; 18941016ad83Smrg 18951016ad83Smrg *) 18961016ad83Smrg AC_CHECK_FUNC([shl_load], 18971016ad83Smrg [lt_cv_dlopen="shl_load"], 18981016ad83Smrg [AC_CHECK_LIB([dld], [shl_load], 18991016ad83Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 19001016ad83Smrg [AC_CHECK_FUNC([dlopen], 19011016ad83Smrg [lt_cv_dlopen="dlopen"], 19021016ad83Smrg [AC_CHECK_LIB([dl], [dlopen], 19031016ad83Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 19041016ad83Smrg [AC_CHECK_LIB([svld], [dlopen], 19051016ad83Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 19061016ad83Smrg [AC_CHECK_LIB([dld], [dld_link], 19071016ad83Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 19081016ad83Smrg ]) 19091016ad83Smrg ]) 19101016ad83Smrg ]) 19111016ad83Smrg ]) 19121016ad83Smrg ]) 19131016ad83Smrg ;; 19141016ad83Smrg esac 19151016ad83Smrg 19161016ad83Smrg if test "x$lt_cv_dlopen" != xno; then 19171016ad83Smrg enable_dlopen=yes 19181016ad83Smrg else 19191016ad83Smrg enable_dlopen=no 19201016ad83Smrg fi 19211016ad83Smrg 19221016ad83Smrg case $lt_cv_dlopen in 19231016ad83Smrg dlopen) 19241016ad83Smrg save_CPPFLAGS="$CPPFLAGS" 19251016ad83Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 19261016ad83Smrg 19271016ad83Smrg save_LDFLAGS="$LDFLAGS" 19281016ad83Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 19291016ad83Smrg 19301016ad83Smrg save_LIBS="$LIBS" 19311016ad83Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 19321016ad83Smrg 19331016ad83Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 19341016ad83Smrg lt_cv_dlopen_self, [dnl 19351016ad83Smrg _LT_TRY_DLOPEN_SELF( 19361016ad83Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 19371016ad83Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 19381016ad83Smrg ]) 19391016ad83Smrg 19401016ad83Smrg if test "x$lt_cv_dlopen_self" = xyes; then 19411016ad83Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 19421016ad83Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 19431016ad83Smrg lt_cv_dlopen_self_static, [dnl 19441016ad83Smrg _LT_TRY_DLOPEN_SELF( 19451016ad83Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 19461016ad83Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 19471016ad83Smrg ]) 19481016ad83Smrg fi 19491016ad83Smrg 19501016ad83Smrg CPPFLAGS="$save_CPPFLAGS" 19511016ad83Smrg LDFLAGS="$save_LDFLAGS" 19521016ad83Smrg LIBS="$save_LIBS" 19531016ad83Smrg ;; 19541016ad83Smrg esac 19551016ad83Smrg 19561016ad83Smrg case $lt_cv_dlopen_self in 19571016ad83Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 19581016ad83Smrg *) enable_dlopen_self=unknown ;; 19591016ad83Smrg esac 19601016ad83Smrg 19611016ad83Smrg case $lt_cv_dlopen_self_static in 19621016ad83Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 19631016ad83Smrg *) enable_dlopen_self_static=unknown ;; 19641016ad83Smrg esac 19651016ad83Smrgfi 19661016ad83Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 19671016ad83Smrg [Whether dlopen is supported]) 19681016ad83Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 19691016ad83Smrg [Whether dlopen of programs is supported]) 19701016ad83Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 19711016ad83Smrg [Whether dlopen of statically linked programs is supported]) 19721016ad83Smrg])# LT_SYS_DLOPEN_SELF 19731016ad83Smrg 19741016ad83Smrg# Old name: 19751016ad83SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 19761016ad83Smrgdnl aclocal-1.4 backwards compatibility: 19771016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 19781016ad83Smrg 19791016ad83Smrg 19801016ad83Smrg# _LT_COMPILER_C_O([TAGNAME]) 19811016ad83Smrg# --------------------------- 19821016ad83Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 19831016ad83Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 19841016ad83Smrgm4_defun([_LT_COMPILER_C_O], 19851016ad83Smrg[m4_require([_LT_DECL_SED])dnl 19861016ad83Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 19871016ad83Smrgm4_require([_LT_TAG_COMPILER])dnl 19881016ad83SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 19891016ad83Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 19901016ad83Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 19911016ad83Smrg $RM -r conftest 2>/dev/null 19921016ad83Smrg mkdir conftest 19931016ad83Smrg cd conftest 19941016ad83Smrg mkdir out 19951016ad83Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 19961016ad83Smrg 19971016ad83Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 19981016ad83Smrg # Insert the option either (1) after the last *FLAGS variable, or 19991016ad83Smrg # (2) before a word containing "conftest.", or (3) at the end. 20001016ad83Smrg # Note that $ac_compile itself does not contain backslashes and begins 20011016ad83Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 20021016ad83Smrg lt_compile=`echo "$ac_compile" | $SED \ 20031016ad83Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 20041016ad83Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 20051016ad83Smrg -e 's:$: $lt_compiler_flag:'` 20061016ad83Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 20071016ad83Smrg (eval "$lt_compile" 2>out/conftest.err) 20081016ad83Smrg ac_status=$? 20091016ad83Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 20101016ad83Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 20111016ad83Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 20121016ad83Smrg then 20131016ad83Smrg # The compiler can only warn and ignore the option if not recognized 20141016ad83Smrg # So say no if there are warnings 20151016ad83Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 20161016ad83Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 20171016ad83Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 20181016ad83Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 20191016ad83Smrg fi 20201016ad83Smrg fi 20211016ad83Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 20221016ad83Smrg $RM conftest* 20231016ad83Smrg # SGI C++ compiler will create directory out/ii_files/ for 20241016ad83Smrg # template instantiation 20251016ad83Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 20261016ad83Smrg $RM out/* && rmdir out 20271016ad83Smrg cd .. 20281016ad83Smrg $RM -r conftest 20291016ad83Smrg $RM conftest* 20301016ad83Smrg]) 20311016ad83Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 20321016ad83Smrg [Does compiler simultaneously support -c and -o options?]) 20331016ad83Smrg])# _LT_COMPILER_C_O 20341016ad83Smrg 20351016ad83Smrg 20361016ad83Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 20371016ad83Smrg# ---------------------------------- 20381016ad83Smrg# Check to see if we can do hard links to lock some files if needed 20391016ad83Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 20401016ad83Smrg[m4_require([_LT_ENABLE_LOCK])dnl 20411016ad83Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 20421016ad83Smrg_LT_COMPILER_C_O([$1]) 20431016ad83Smrg 20441016ad83Smrghard_links="nottested" 20451016ad83Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 20461016ad83Smrg # do not overwrite the value of need_locks provided by the user 20471016ad83Smrg AC_MSG_CHECKING([if we can lock with hard links]) 20481016ad83Smrg hard_links=yes 20491016ad83Smrg $RM conftest* 20501016ad83Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 20511016ad83Smrg touch conftest.a 20521016ad83Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 20531016ad83Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 20541016ad83Smrg AC_MSG_RESULT([$hard_links]) 20551016ad83Smrg if test "$hard_links" = no; then 20561016ad83Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 20571016ad83Smrg need_locks=warn 20581016ad83Smrg fi 20591016ad83Smrgelse 20601016ad83Smrg need_locks=no 20611016ad83Smrgfi 20621016ad83Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 20631016ad83Smrg])# _LT_COMPILER_FILE_LOCKS 20641016ad83Smrg 20651016ad83Smrg 20661016ad83Smrg# _LT_CHECK_OBJDIR 20671016ad83Smrg# ---------------- 20681016ad83Smrgm4_defun([_LT_CHECK_OBJDIR], 20691016ad83Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 20701016ad83Smrg[rm -f .libs 2>/dev/null 20711016ad83Smrgmkdir .libs 2>/dev/null 20721016ad83Smrgif test -d .libs; then 20731016ad83Smrg lt_cv_objdir=.libs 20741016ad83Smrgelse 20751016ad83Smrg # MS-DOS does not allow filenames that begin with a dot. 20761016ad83Smrg lt_cv_objdir=_libs 20771016ad83Smrgfi 20781016ad83Smrgrmdir .libs 2>/dev/null]) 20791016ad83Smrgobjdir=$lt_cv_objdir 20801016ad83Smrg_LT_DECL([], [objdir], [0], 20811016ad83Smrg [The name of the directory that contains temporary libtool files])dnl 20821016ad83Smrgm4_pattern_allow([LT_OBJDIR])dnl 20831016ad83SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 20841016ad83Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 20851016ad83Smrg])# _LT_CHECK_OBJDIR 20861016ad83Smrg 20871016ad83Smrg 20881016ad83Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 20891016ad83Smrg# -------------------------------------- 20901016ad83Smrg# Check hardcoding attributes. 20911016ad83Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 20921016ad83Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 20931016ad83Smrg_LT_TAGVAR(hardcode_action, $1)= 20941016ad83Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 20951016ad83Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 20961016ad83Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 20971016ad83Smrg 20981016ad83Smrg # We can hardcode non-existent directories. 20991016ad83Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 21001016ad83Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 21011016ad83Smrg # have to relink, otherwise we might link with an installed library 21021016ad83Smrg # when we should be linking with a yet-to-be-installed one 21031016ad83Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 21041016ad83Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 21051016ad83Smrg # Linking always hardcodes the temporary library directory. 21061016ad83Smrg _LT_TAGVAR(hardcode_action, $1)=relink 21071016ad83Smrg else 21081016ad83Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 21091016ad83Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 21101016ad83Smrg fi 21111016ad83Smrgelse 21121016ad83Smrg # We cannot hardcode anything, or else we can only hardcode existing 21131016ad83Smrg # directories. 21141016ad83Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 21151016ad83Smrgfi 21161016ad83SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 21171016ad83Smrg 21181016ad83Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 21191016ad83Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 21201016ad83Smrg # Fast installation is not supported 21211016ad83Smrg enable_fast_install=no 21221016ad83Smrgelif test "$shlibpath_overrides_runpath" = yes || 21231016ad83Smrg test "$enable_shared" = no; then 21241016ad83Smrg # Fast installation is not necessary 21251016ad83Smrg enable_fast_install=needless 21261016ad83Smrgfi 21271016ad83Smrg_LT_TAGDECL([], [hardcode_action], [0], 21281016ad83Smrg [How to hardcode a shared library path into an executable]) 21291016ad83Smrg])# _LT_LINKER_HARDCODE_LIBPATH 21301016ad83Smrg 21311016ad83Smrg 21321016ad83Smrg# _LT_CMD_STRIPLIB 21331016ad83Smrg# ---------------- 21341016ad83Smrgm4_defun([_LT_CMD_STRIPLIB], 21351016ad83Smrg[m4_require([_LT_DECL_EGREP]) 21361016ad83Smrgstriplib= 21371016ad83Smrgold_striplib= 21381016ad83SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 21391016ad83Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 21401016ad83Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 21411016ad83Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 21421016ad83Smrg AC_MSG_RESULT([yes]) 21431016ad83Smrgelse 21441016ad83Smrg# FIXME - insert some real tests, host_os isn't really good enough 21451016ad83Smrg case $host_os in 21461016ad83Smrg darwin*) 21471016ad83Smrg if test -n "$STRIP" ; then 21481016ad83Smrg striplib="$STRIP -x" 21491016ad83Smrg old_striplib="$STRIP -S" 21501016ad83Smrg AC_MSG_RESULT([yes]) 21511016ad83Smrg else 21521016ad83Smrg AC_MSG_RESULT([no]) 21531016ad83Smrg fi 21541016ad83Smrg ;; 21551016ad83Smrg *) 21561016ad83Smrg AC_MSG_RESULT([no]) 21571016ad83Smrg ;; 21581016ad83Smrg esac 21591016ad83Smrgfi 21601016ad83Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 21611016ad83Smrg_LT_DECL([], [striplib], [1]) 21621016ad83Smrg])# _LT_CMD_STRIPLIB 21631016ad83Smrg 21641016ad83Smrg 21651016ad83Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 21661016ad83Smrg# ----------------------------- 21671016ad83Smrg# PORTME Fill in your ld.so characteristics 21681016ad83Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 21691016ad83Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 21701016ad83Smrgm4_require([_LT_DECL_EGREP])dnl 21711016ad83Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 21721016ad83Smrgm4_require([_LT_DECL_OBJDUMP])dnl 21731016ad83Smrgm4_require([_LT_DECL_SED])dnl 21741016ad83Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 21751016ad83SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 21761016ad83Smrgm4_if([$1], 21771016ad83Smrg [], [ 21781016ad83Smrgif test "$GCC" = yes; then 21791016ad83Smrg case $host_os in 21801016ad83Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 21811016ad83Smrg *) lt_awk_arg="/^libraries:/" ;; 21821016ad83Smrg esac 21831016ad83Smrg case $host_os in 21841016ad83Smrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 21851016ad83Smrg *) lt_sed_strip_eq="s,=/,/,g" ;; 21861016ad83Smrg esac 21871016ad83Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 21881016ad83Smrg case $lt_search_path_spec in 21891016ad83Smrg *\;*) 21901016ad83Smrg # if the path contains ";" then we assume it to be the separator 21911016ad83Smrg # otherwise default to the standard path separator (i.e. ":") - it is 21921016ad83Smrg # assumed that no part of a normal pathname contains ";" but that should 21931016ad83Smrg # okay in the real world where ";" in dirpaths is itself problematic. 21941016ad83Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 21951016ad83Smrg ;; 21961016ad83Smrg *) 21971016ad83Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 21981016ad83Smrg ;; 21991016ad83Smrg esac 22001016ad83Smrg # Ok, now we have the path, separated by spaces, we can step through it 22011016ad83Smrg # and add multilib dir if necessary. 22021016ad83Smrg lt_tmp_lt_search_path_spec= 22031016ad83Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 22041016ad83Smrg for lt_sys_path in $lt_search_path_spec; do 22051016ad83Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 22061016ad83Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 22071016ad83Smrg else 22081016ad83Smrg test -d "$lt_sys_path" && \ 22091016ad83Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 22101016ad83Smrg fi 22111016ad83Smrg done 22121016ad83Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 22131016ad83SmrgBEGIN {RS=" "; FS="/|\n";} { 22141016ad83Smrg lt_foo=""; 22151016ad83Smrg lt_count=0; 22161016ad83Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 22171016ad83Smrg if ($lt_i != "" && $lt_i != ".") { 22181016ad83Smrg if ($lt_i == "..") { 22191016ad83Smrg lt_count++; 22201016ad83Smrg } else { 22211016ad83Smrg if (lt_count == 0) { 22221016ad83Smrg lt_foo="/" $lt_i lt_foo; 22231016ad83Smrg } else { 22241016ad83Smrg lt_count--; 22251016ad83Smrg } 22261016ad83Smrg } 22271016ad83Smrg } 22281016ad83Smrg } 22291016ad83Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 22301016ad83Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 22311016ad83Smrg}'` 22321016ad83Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 22331016ad83Smrg # for these hosts. 22341016ad83Smrg case $host_os in 22351016ad83Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 22361016ad83Smrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 22371016ad83Smrg esac 22381016ad83Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 22391016ad83Smrgelse 22401016ad83Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 22411016ad83Smrgfi]) 22421016ad83Smrglibrary_names_spec= 22431016ad83Smrglibname_spec='lib$name' 22441016ad83Smrgsoname_spec= 22451016ad83Smrgshrext_cmds=".so" 22461016ad83Smrgpostinstall_cmds= 22471016ad83Smrgpostuninstall_cmds= 22481016ad83Smrgfinish_cmds= 22491016ad83Smrgfinish_eval= 22501016ad83Smrgshlibpath_var= 22511016ad83Smrgshlibpath_overrides_runpath=unknown 22521016ad83Smrgversion_type=none 22531016ad83Smrgdynamic_linker="$host_os ld.so" 22541016ad83Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 22551016ad83Smrgneed_lib_prefix=unknown 22561016ad83Smrghardcode_into_libs=no 22571016ad83Smrg 22581016ad83Smrg# when you set need_version to no, make sure it does not cause -set_version 22591016ad83Smrg# flags to be left without arguments 22601016ad83Smrgneed_version=unknown 22611016ad83Smrg 22621016ad83Smrgcase $host_os in 22631016ad83Smrgaix3*) 22641016ad83Smrg version_type=linux # correct to gnu/linux during the next big refactor 22651016ad83Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 22661016ad83Smrg shlibpath_var=LIBPATH 22671016ad83Smrg 22681016ad83Smrg # AIX 3 has no versioning support, so we append a major version to the name. 22691016ad83Smrg soname_spec='${libname}${release}${shared_ext}$major' 22701016ad83Smrg ;; 22711016ad83Smrg 22721016ad83Smrgaix[[4-9]]*) 22731016ad83Smrg version_type=linux # correct to gnu/linux during the next big refactor 22741016ad83Smrg need_lib_prefix=no 22751016ad83Smrg need_version=no 22761016ad83Smrg hardcode_into_libs=yes 22771016ad83Smrg if test "$host_cpu" = ia64; then 22781016ad83Smrg # AIX 5 supports IA64 22791016ad83Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 22801016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 22811016ad83Smrg else 22821016ad83Smrg # With GCC up to 2.95.x, collect2 would create an import file 22831016ad83Smrg # for dependence libraries. The import file would start with 22841016ad83Smrg # the line `#! .'. This would cause the generated library to 22851016ad83Smrg # depend on `.', always an invalid library. This was fixed in 22861016ad83Smrg # development snapshots of GCC prior to 3.0. 22871016ad83Smrg case $host_os in 22881016ad83Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 22891016ad83Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 22901016ad83Smrg echo ' yes ' 22911016ad83Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 22921016ad83Smrg : 22931016ad83Smrg else 22941016ad83Smrg can_build_shared=no 22951016ad83Smrg fi 22961016ad83Smrg ;; 22971016ad83Smrg esac 22981016ad83Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 22991016ad83Smrg # soname into executable. Probably we can add versioning support to 23001016ad83Smrg # collect2, so additional links can be useful in future. 23011016ad83Smrg if test "$aix_use_runtimelinking" = yes; then 23021016ad83Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 23031016ad83Smrg # instead of lib<name>.a to let people know that these are not 23041016ad83Smrg # typical AIX shared libraries. 23051016ad83Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 23061016ad83Smrg else 23071016ad83Smrg # We preserve .a as extension for shared libraries through AIX4.2 23081016ad83Smrg # and later when we are not doing run time linking. 23091016ad83Smrg library_names_spec='${libname}${release}.a $libname.a' 23101016ad83Smrg soname_spec='${libname}${release}${shared_ext}$major' 23111016ad83Smrg fi 23121016ad83Smrg shlibpath_var=LIBPATH 23131016ad83Smrg fi 23141016ad83Smrg ;; 23151016ad83Smrg 23161016ad83Smrgamigaos*) 23171016ad83Smrg case $host_cpu in 23181016ad83Smrg powerpc) 23191016ad83Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 23201016ad83Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 23211016ad83Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 23221016ad83Smrg ;; 23231016ad83Smrg m68k) 23241016ad83Smrg library_names_spec='$libname.ixlibrary $libname.a' 23251016ad83Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 23261016ad83Smrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $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' 23271016ad83Smrg ;; 23281016ad83Smrg esac 23291016ad83Smrg ;; 23301016ad83Smrg 23311016ad83Smrgbeos*) 23321016ad83Smrg library_names_spec='${libname}${shared_ext}' 23331016ad83Smrg dynamic_linker="$host_os ld.so" 23341016ad83Smrg shlibpath_var=LIBRARY_PATH 23351016ad83Smrg ;; 23361016ad83Smrg 23371016ad83Smrgbsdi[[45]]*) 23381016ad83Smrg version_type=linux # correct to gnu/linux during the next big refactor 23391016ad83Smrg need_version=no 23401016ad83Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 23411016ad83Smrg soname_spec='${libname}${release}${shared_ext}$major' 23421016ad83Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 23431016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 23441016ad83Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 23451016ad83Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 23461016ad83Smrg # the default ld.so.conf also contains /usr/contrib/lib and 23471016ad83Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 23481016ad83Smrg # libtool to hard-code these into programs 23491016ad83Smrg ;; 23501016ad83Smrg 23511016ad83Smrgcygwin* | mingw* | pw32* | cegcc*) 23521016ad83Smrg version_type=windows 23531016ad83Smrg shrext_cmds=".dll" 23541016ad83Smrg need_version=no 23551016ad83Smrg need_lib_prefix=no 23561016ad83Smrg 23571016ad83Smrg case $GCC,$cc_basename in 23581016ad83Smrg yes,*) 23591016ad83Smrg # gcc 23601016ad83Smrg library_names_spec='$libname.dll.a' 23611016ad83Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 23621016ad83Smrg postinstall_cmds='base_file=`basename \${file}`~ 23631016ad83Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 23641016ad83Smrg dldir=$destdir/`dirname \$dlpath`~ 23651016ad83Smrg test -d \$dldir || mkdir -p \$dldir~ 23661016ad83Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 23671016ad83Smrg chmod a+x \$dldir/$dlname~ 23681016ad83Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 23691016ad83Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 23701016ad83Smrg fi' 23711016ad83Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 23721016ad83Smrg dlpath=$dir/\$dldll~ 23731016ad83Smrg $RM \$dlpath' 23741016ad83Smrg shlibpath_overrides_runpath=yes 23751016ad83Smrg 23761016ad83Smrg case $host_os in 23771016ad83Smrg cygwin*) 23781016ad83Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 23791016ad83Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 23801016ad83Smrgm4_if([$1], [],[ 23811016ad83Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 23821016ad83Smrg ;; 23831016ad83Smrg mingw* | cegcc*) 23841016ad83Smrg # MinGW DLLs use traditional 'lib' prefix 23851016ad83Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 23861016ad83Smrg ;; 23871016ad83Smrg pw32*) 23881016ad83Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 23891016ad83Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 23901016ad83Smrg ;; 23911016ad83Smrg esac 23921016ad83Smrg dynamic_linker='Win32 ld.exe' 23931016ad83Smrg ;; 23941016ad83Smrg 23951016ad83Smrg *,cl*) 23961016ad83Smrg # Native MSVC 23971016ad83Smrg libname_spec='$name' 23981016ad83Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 23991016ad83Smrg library_names_spec='${libname}.dll.lib' 24001016ad83Smrg 24011016ad83Smrg case $build_os in 24021016ad83Smrg mingw*) 24031016ad83Smrg sys_lib_search_path_spec= 24041016ad83Smrg lt_save_ifs=$IFS 24051016ad83Smrg IFS=';' 24061016ad83Smrg for lt_path in $LIB 24071016ad83Smrg do 24081016ad83Smrg IFS=$lt_save_ifs 24091016ad83Smrg # Let DOS variable expansion print the short 8.3 style file name. 24101016ad83Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 24111016ad83Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 24121016ad83Smrg done 24131016ad83Smrg IFS=$lt_save_ifs 24141016ad83Smrg # Convert to MSYS style. 24151016ad83Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 24161016ad83Smrg ;; 24171016ad83Smrg cygwin*) 24181016ad83Smrg # Convert to unix form, then to dos form, then back to unix form 24191016ad83Smrg # but this time dos style (no spaces!) so that the unix form looks 24201016ad83Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 24211016ad83Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 24221016ad83Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 24231016ad83Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 24241016ad83Smrg ;; 24251016ad83Smrg *) 24261016ad83Smrg sys_lib_search_path_spec="$LIB" 24271016ad83Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 24281016ad83Smrg # It is most probably a Windows format PATH. 24291016ad83Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 24301016ad83Smrg else 24311016ad83Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 24321016ad83Smrg fi 24331016ad83Smrg # FIXME: find the short name or the path components, as spaces are 24341016ad83Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 24351016ad83Smrg ;; 24361016ad83Smrg esac 24371016ad83Smrg 24381016ad83Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 24391016ad83Smrg postinstall_cmds='base_file=`basename \${file}`~ 24401016ad83Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 24411016ad83Smrg dldir=$destdir/`dirname \$dlpath`~ 24421016ad83Smrg test -d \$dldir || mkdir -p \$dldir~ 24431016ad83Smrg $install_prog $dir/$dlname \$dldir/$dlname' 24441016ad83Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 24451016ad83Smrg dlpath=$dir/\$dldll~ 24461016ad83Smrg $RM \$dlpath' 24471016ad83Smrg shlibpath_overrides_runpath=yes 24481016ad83Smrg dynamic_linker='Win32 link.exe' 24491016ad83Smrg ;; 24501016ad83Smrg 24511016ad83Smrg *) 24521016ad83Smrg # Assume MSVC wrapper 24531016ad83Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 24541016ad83Smrg dynamic_linker='Win32 ld.exe' 24551016ad83Smrg ;; 24561016ad83Smrg esac 24571016ad83Smrg # FIXME: first we should search . and the directory the executable is in 24581016ad83Smrg shlibpath_var=PATH 24591016ad83Smrg ;; 24601016ad83Smrg 24611016ad83Smrgdarwin* | rhapsody*) 24621016ad83Smrg dynamic_linker="$host_os dyld" 24631016ad83Smrg version_type=darwin 24641016ad83Smrg need_lib_prefix=no 24651016ad83Smrg need_version=no 24661016ad83Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 24671016ad83Smrg soname_spec='${libname}${release}${major}$shared_ext' 24681016ad83Smrg shlibpath_overrides_runpath=yes 24691016ad83Smrg shlibpath_var=DYLD_LIBRARY_PATH 24701016ad83Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 24711016ad83Smrgm4_if([$1], [],[ 24721016ad83Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 24731016ad83Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 24741016ad83Smrg ;; 24751016ad83Smrg 24761016ad83Smrgdgux*) 24771016ad83Smrg version_type=linux # correct to gnu/linux during the next big refactor 24781016ad83Smrg need_lib_prefix=no 24791016ad83Smrg need_version=no 24801016ad83Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 24811016ad83Smrg soname_spec='${libname}${release}${shared_ext}$major' 24821016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 24831016ad83Smrg ;; 24841016ad83Smrg 24851016ad83Smrgfreebsd* | dragonfly*) 24861016ad83Smrg # DragonFly does not have aout. When/if they implement a new 24871016ad83Smrg # versioning mechanism, adjust this. 24881016ad83Smrg if test -x /usr/bin/objformat; then 24891016ad83Smrg objformat=`/usr/bin/objformat` 24901016ad83Smrg else 24911016ad83Smrg case $host_os in 24921016ad83Smrg freebsd[[23]].*) objformat=aout ;; 24931016ad83Smrg *) objformat=elf ;; 24941016ad83Smrg esac 24951016ad83Smrg fi 24961016ad83Smrg version_type=freebsd-$objformat 24971016ad83Smrg case $version_type in 24981016ad83Smrg freebsd-elf*) 24991016ad83Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 25001016ad83Smrg need_version=no 25011016ad83Smrg need_lib_prefix=no 25021016ad83Smrg ;; 25031016ad83Smrg freebsd-*) 25041016ad83Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 25051016ad83Smrg need_version=yes 25061016ad83Smrg ;; 25071016ad83Smrg esac 25081016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 25091016ad83Smrg case $host_os in 25101016ad83Smrg freebsd2.*) 25111016ad83Smrg shlibpath_overrides_runpath=yes 25121016ad83Smrg ;; 25131016ad83Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 25141016ad83Smrg shlibpath_overrides_runpath=yes 25151016ad83Smrg hardcode_into_libs=yes 25161016ad83Smrg ;; 25171016ad83Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 25181016ad83Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 25191016ad83Smrg shlibpath_overrides_runpath=no 25201016ad83Smrg hardcode_into_libs=yes 25211016ad83Smrg ;; 25221016ad83Smrg *) # from 4.6 on, and DragonFly 25231016ad83Smrg shlibpath_overrides_runpath=yes 25241016ad83Smrg hardcode_into_libs=yes 25251016ad83Smrg ;; 25261016ad83Smrg esac 25271016ad83Smrg ;; 25281016ad83Smrg 25291016ad83Smrghaiku*) 25301016ad83Smrg version_type=linux # correct to gnu/linux during the next big refactor 25311016ad83Smrg need_lib_prefix=no 25321016ad83Smrg need_version=no 25331016ad83Smrg dynamic_linker="$host_os runtime_loader" 25341016ad83Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 25351016ad83Smrg soname_spec='${libname}${release}${shared_ext}$major' 25361016ad83Smrg shlibpath_var=LIBRARY_PATH 25371016ad83Smrg shlibpath_overrides_runpath=yes 25381016ad83Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 25391016ad83Smrg hardcode_into_libs=yes 25401016ad83Smrg ;; 25411016ad83Smrg 25421016ad83Smrghpux9* | hpux10* | hpux11*) 25431016ad83Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 25441016ad83Smrg # link against other versions. 25451016ad83Smrg version_type=sunos 25461016ad83Smrg need_lib_prefix=no 25471016ad83Smrg need_version=no 25481016ad83Smrg case $host_cpu in 25491016ad83Smrg ia64*) 25501016ad83Smrg shrext_cmds='.so' 25511016ad83Smrg hardcode_into_libs=yes 25521016ad83Smrg dynamic_linker="$host_os dld.so" 25531016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 25541016ad83Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 25551016ad83Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 25561016ad83Smrg soname_spec='${libname}${release}${shared_ext}$major' 25571016ad83Smrg if test "X$HPUX_IA64_MODE" = X32; then 25581016ad83Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 25591016ad83Smrg else 25601016ad83Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 25611016ad83Smrg fi 25621016ad83Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 25631016ad83Smrg ;; 25641016ad83Smrg hppa*64*) 25651016ad83Smrg shrext_cmds='.sl' 25661016ad83Smrg hardcode_into_libs=yes 25671016ad83Smrg dynamic_linker="$host_os dld.sl" 25681016ad83Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 25691016ad83Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 25701016ad83Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 25711016ad83Smrg soname_spec='${libname}${release}${shared_ext}$major' 25721016ad83Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 25731016ad83Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 25741016ad83Smrg ;; 25751016ad83Smrg *) 25761016ad83Smrg shrext_cmds='.sl' 25771016ad83Smrg dynamic_linker="$host_os dld.sl" 25781016ad83Smrg shlibpath_var=SHLIB_PATH 25791016ad83Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 25801016ad83Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 25811016ad83Smrg soname_spec='${libname}${release}${shared_ext}$major' 25821016ad83Smrg ;; 25831016ad83Smrg esac 25841016ad83Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 25851016ad83Smrg postinstall_cmds='chmod 555 $lib' 25861016ad83Smrg # or fails outright, so override atomically: 25871016ad83Smrg install_override_mode=555 25881016ad83Smrg ;; 25891016ad83Smrg 25901016ad83Smrginterix[[3-9]]*) 25911016ad83Smrg version_type=linux # correct to gnu/linux during the next big refactor 25921016ad83Smrg need_lib_prefix=no 25931016ad83Smrg need_version=no 25941016ad83Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 25951016ad83Smrg soname_spec='${libname}${release}${shared_ext}$major' 25961016ad83Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 25971016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 25981016ad83Smrg shlibpath_overrides_runpath=no 25991016ad83Smrg hardcode_into_libs=yes 26001016ad83Smrg ;; 26011016ad83Smrg 26021016ad83Smrgirix5* | irix6* | nonstopux*) 26031016ad83Smrg case $host_os in 26041016ad83Smrg nonstopux*) version_type=nonstopux ;; 26051016ad83Smrg *) 26061016ad83Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 26071016ad83Smrg version_type=linux # correct to gnu/linux during the next big refactor 26081016ad83Smrg else 26091016ad83Smrg version_type=irix 26101016ad83Smrg fi ;; 26111016ad83Smrg esac 26121016ad83Smrg need_lib_prefix=no 26131016ad83Smrg need_version=no 26141016ad83Smrg soname_spec='${libname}${release}${shared_ext}$major' 26151016ad83Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 26161016ad83Smrg case $host_os in 26171016ad83Smrg irix5* | nonstopux*) 26181016ad83Smrg libsuff= shlibsuff= 26191016ad83Smrg ;; 26201016ad83Smrg *) 26211016ad83Smrg case $LD in # libtool.m4 will add one of these switches to LD 26221016ad83Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 26231016ad83Smrg libsuff= shlibsuff= libmagic=32-bit;; 26241016ad83Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 26251016ad83Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 26261016ad83Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 26271016ad83Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 26281016ad83Smrg *) libsuff= shlibsuff= libmagic=never-match;; 26291016ad83Smrg esac 26301016ad83Smrg ;; 26311016ad83Smrg esac 26321016ad83Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 26331016ad83Smrg shlibpath_overrides_runpath=no 26341016ad83Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 26351016ad83Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 26361016ad83Smrg hardcode_into_libs=yes 26371016ad83Smrg ;; 26381016ad83Smrg 26391016ad83Smrg# No shared lib support for Linux oldld, aout, or coff. 26401016ad83Smrglinux*oldld* | linux*aout* | linux*coff*) 26411016ad83Smrg dynamic_linker=no 26421016ad83Smrg ;; 26431016ad83Smrg 26441016ad83Smrg# This must be glibc/ELF. 26451016ad83Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 26461016ad83Smrg version_type=linux # correct to gnu/linux during the next big refactor 26471016ad83Smrg need_lib_prefix=no 26481016ad83Smrg need_version=no 26491016ad83Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 26501016ad83Smrg soname_spec='${libname}${release}${shared_ext}$major' 26511016ad83Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 26521016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 26531016ad83Smrg shlibpath_overrides_runpath=no 26541016ad83Smrg 26551016ad83Smrg # Some binutils ld are patched to set DT_RUNPATH 26561016ad83Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 26571016ad83Smrg [lt_cv_shlibpath_overrides_runpath=no 26581016ad83Smrg save_LDFLAGS=$LDFLAGS 26591016ad83Smrg save_libdir=$libdir 26601016ad83Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 26611016ad83Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 26621016ad83Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 26631016ad83Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 26641016ad83Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 26651016ad83Smrg LDFLAGS=$save_LDFLAGS 26661016ad83Smrg libdir=$save_libdir 26671016ad83Smrg ]) 26681016ad83Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 26691016ad83Smrg 26701016ad83Smrg # This implies no fast_install, which is unacceptable. 26711016ad83Smrg # Some rework will be needed to allow for fast_install 26721016ad83Smrg # before this can be enabled. 26731016ad83Smrg hardcode_into_libs=yes 26741016ad83Smrg 26751016ad83Smrg # Append ld.so.conf contents to the search path 26761016ad83Smrg if test -f /etc/ld.so.conf; then 26771016ad83Smrg 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' ' '` 26781016ad83Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 26791016ad83Smrg fi 26801016ad83Smrg 26811016ad83Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 26821016ad83Smrg # powerpc, because MkLinux only supported shared libraries with the 26831016ad83Smrg # GNU dynamic linker. Since this was broken with cross compilers, 26841016ad83Smrg # most powerpc-linux boxes support dynamic linking these days and 26851016ad83Smrg # people can always --disable-shared, the test was removed, and we 26861016ad83Smrg # assume the GNU/Linux dynamic linker is in use. 26871016ad83Smrg dynamic_linker='GNU/Linux ld.so' 26881016ad83Smrg ;; 26891016ad83Smrg 26901016ad83Smrgnetbsdelf*-gnu) 26911016ad83Smrg version_type=linux 26921016ad83Smrg need_lib_prefix=no 26931016ad83Smrg need_version=no 26941016ad83Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 26951016ad83Smrg soname_spec='${libname}${release}${shared_ext}$major' 26961016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 26971016ad83Smrg shlibpath_overrides_runpath=no 26981016ad83Smrg hardcode_into_libs=yes 26991016ad83Smrg dynamic_linker='NetBSD ld.elf_so' 27001016ad83Smrg ;; 27011016ad83Smrg 27021016ad83Smrgnetbsd*) 27031016ad83Smrg version_type=sunos 27041016ad83Smrg need_lib_prefix=no 27051016ad83Smrg need_version=no 27061016ad83Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 27071016ad83Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 27081016ad83Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 27091016ad83Smrg dynamic_linker='NetBSD (a.out) ld.so' 27101016ad83Smrg else 27111016ad83Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 27121016ad83Smrg soname_spec='${libname}${release}${shared_ext}$major' 27131016ad83Smrg dynamic_linker='NetBSD ld.elf_so' 27141016ad83Smrg fi 27151016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 27161016ad83Smrg shlibpath_overrides_runpath=yes 27171016ad83Smrg hardcode_into_libs=yes 27181016ad83Smrg ;; 27191016ad83Smrg 27201016ad83Smrgnewsos6) 27211016ad83Smrg version_type=linux # correct to gnu/linux during the next big refactor 27221016ad83Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 27231016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 27241016ad83Smrg shlibpath_overrides_runpath=yes 27251016ad83Smrg ;; 27261016ad83Smrg 27271016ad83Smrg*nto* | *qnx*) 27281016ad83Smrg version_type=qnx 27291016ad83Smrg need_lib_prefix=no 27301016ad83Smrg need_version=no 27311016ad83Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 27321016ad83Smrg soname_spec='${libname}${release}${shared_ext}$major' 27331016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 27341016ad83Smrg shlibpath_overrides_runpath=no 27351016ad83Smrg hardcode_into_libs=yes 27361016ad83Smrg dynamic_linker='ldqnx.so' 27371016ad83Smrg ;; 27381016ad83Smrg 27391016ad83Smrgopenbsd*) 27401016ad83Smrg version_type=sunos 27411016ad83Smrg sys_lib_dlsearch_path_spec="/usr/lib" 27421016ad83Smrg need_lib_prefix=no 27431016ad83Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 27441016ad83Smrg case $host_os in 27451016ad83Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 27461016ad83Smrg *) need_version=no ;; 27471016ad83Smrg esac 27481016ad83Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 27491016ad83Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 27501016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 27511016ad83Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 27521016ad83Smrg case $host_os in 27531016ad83Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 27541016ad83Smrg shlibpath_overrides_runpath=no 27551016ad83Smrg ;; 27561016ad83Smrg *) 27571016ad83Smrg shlibpath_overrides_runpath=yes 27581016ad83Smrg ;; 27591016ad83Smrg esac 27601016ad83Smrg else 27611016ad83Smrg shlibpath_overrides_runpath=yes 27621016ad83Smrg fi 27631016ad83Smrg ;; 27641016ad83Smrg 27651016ad83Smrgos2*) 27661016ad83Smrg libname_spec='$name' 27671016ad83Smrg shrext_cmds=".dll" 27681016ad83Smrg need_lib_prefix=no 27691016ad83Smrg library_names_spec='$libname${shared_ext} $libname.a' 27701016ad83Smrg dynamic_linker='OS/2 ld.exe' 27711016ad83Smrg shlibpath_var=LIBPATH 27721016ad83Smrg ;; 27731016ad83Smrg 27741016ad83Smrgosf3* | osf4* | osf5*) 27751016ad83Smrg version_type=osf 27761016ad83Smrg need_lib_prefix=no 27771016ad83Smrg need_version=no 27781016ad83Smrg soname_spec='${libname}${release}${shared_ext}$major' 27791016ad83Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 27801016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 27811016ad83Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 27821016ad83Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 27831016ad83Smrg ;; 27841016ad83Smrg 27851016ad83Smrgrdos*) 27861016ad83Smrg dynamic_linker=no 27871016ad83Smrg ;; 27881016ad83Smrg 27891016ad83Smrgsolaris*) 27901016ad83Smrg version_type=linux # correct to gnu/linux during the next big refactor 27911016ad83Smrg need_lib_prefix=no 27921016ad83Smrg need_version=no 27931016ad83Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 27941016ad83Smrg soname_spec='${libname}${release}${shared_ext}$major' 27951016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 27961016ad83Smrg shlibpath_overrides_runpath=yes 27971016ad83Smrg hardcode_into_libs=yes 27981016ad83Smrg # ldd complains unless libraries are executable 27991016ad83Smrg postinstall_cmds='chmod +x $lib' 28001016ad83Smrg ;; 28011016ad83Smrg 28021016ad83Smrgsunos4*) 28031016ad83Smrg version_type=sunos 28041016ad83Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 28051016ad83Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 28061016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 28071016ad83Smrg shlibpath_overrides_runpath=yes 28081016ad83Smrg if test "$with_gnu_ld" = yes; then 28091016ad83Smrg need_lib_prefix=no 28101016ad83Smrg fi 28111016ad83Smrg need_version=yes 28121016ad83Smrg ;; 28131016ad83Smrg 28141016ad83Smrgsysv4 | sysv4.3*) 28151016ad83Smrg version_type=linux # correct to gnu/linux during the next big refactor 28161016ad83Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 28171016ad83Smrg soname_spec='${libname}${release}${shared_ext}$major' 28181016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 28191016ad83Smrg case $host_vendor in 28201016ad83Smrg sni) 28211016ad83Smrg shlibpath_overrides_runpath=no 28221016ad83Smrg need_lib_prefix=no 28231016ad83Smrg runpath_var=LD_RUN_PATH 28241016ad83Smrg ;; 28251016ad83Smrg siemens) 28261016ad83Smrg need_lib_prefix=no 28271016ad83Smrg ;; 28281016ad83Smrg motorola) 28291016ad83Smrg need_lib_prefix=no 28301016ad83Smrg need_version=no 28311016ad83Smrg shlibpath_overrides_runpath=no 28321016ad83Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 28331016ad83Smrg ;; 28341016ad83Smrg esac 28351016ad83Smrg ;; 28361016ad83Smrg 28371016ad83Smrgsysv4*MP*) 28381016ad83Smrg if test -d /usr/nec ;then 28391016ad83Smrg version_type=linux # correct to gnu/linux during the next big refactor 28401016ad83Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 28411016ad83Smrg soname_spec='$libname${shared_ext}.$major' 28421016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 28431016ad83Smrg fi 28441016ad83Smrg ;; 28451016ad83Smrg 28461016ad83Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 28471016ad83Smrg version_type=freebsd-elf 28481016ad83Smrg need_lib_prefix=no 28491016ad83Smrg need_version=no 28501016ad83Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 28511016ad83Smrg soname_spec='${libname}${release}${shared_ext}$major' 28521016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 28531016ad83Smrg shlibpath_overrides_runpath=yes 28541016ad83Smrg hardcode_into_libs=yes 28551016ad83Smrg if test "$with_gnu_ld" = yes; then 28561016ad83Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 28571016ad83Smrg else 28581016ad83Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 28591016ad83Smrg case $host_os in 28601016ad83Smrg sco3.2v5*) 28611016ad83Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 28621016ad83Smrg ;; 28631016ad83Smrg esac 28641016ad83Smrg fi 28651016ad83Smrg sys_lib_dlsearch_path_spec='/usr/lib' 28661016ad83Smrg ;; 28671016ad83Smrg 28681016ad83Smrgtpf*) 28691016ad83Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 28701016ad83Smrg version_type=linux # correct to gnu/linux during the next big refactor 28711016ad83Smrg need_lib_prefix=no 28721016ad83Smrg need_version=no 28731016ad83Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 28741016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 28751016ad83Smrg shlibpath_overrides_runpath=no 28761016ad83Smrg hardcode_into_libs=yes 28771016ad83Smrg ;; 28781016ad83Smrg 28791016ad83Smrguts4*) 28801016ad83Smrg version_type=linux # correct to gnu/linux during the next big refactor 28811016ad83Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 28821016ad83Smrg soname_spec='${libname}${release}${shared_ext}$major' 28831016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 28841016ad83Smrg ;; 28851016ad83Smrg 28861016ad83Smrg*) 28871016ad83Smrg dynamic_linker=no 28881016ad83Smrg ;; 28891016ad83Smrgesac 28901016ad83SmrgAC_MSG_RESULT([$dynamic_linker]) 28911016ad83Smrgtest "$dynamic_linker" = no && can_build_shared=no 28921016ad83Smrg 28931016ad83Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 28941016ad83Smrgif test "$GCC" = yes; then 28951016ad83Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 28961016ad83Smrgfi 28971016ad83Smrg 28981016ad83Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 28991016ad83Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 29001016ad83Smrgfi 29011016ad83Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 29021016ad83Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 29031016ad83Smrgfi 29041016ad83Smrg 29051016ad83Smrg_LT_DECL([], [variables_saved_for_relink], [1], 29061016ad83Smrg [Variables whose values should be saved in libtool wrapper scripts and 29071016ad83Smrg restored at link time]) 29081016ad83Smrg_LT_DECL([], [need_lib_prefix], [0], 29091016ad83Smrg [Do we need the "lib" prefix for modules?]) 29101016ad83Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 29111016ad83Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 29121016ad83Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 29131016ad83Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 29141016ad83Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 29151016ad83Smrg [Is shlibpath searched before the hard-coded library search path?]) 29161016ad83Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 29171016ad83Smrg_LT_DECL([], [library_names_spec], [1], 29181016ad83Smrg [[List of archive names. First name is the real one, the rest are links. 29191016ad83Smrg The last name is the one that the linker finds with -lNAME]]) 29201016ad83Smrg_LT_DECL([], [soname_spec], [1], 29211016ad83Smrg [[The coded name of the library, if different from the real name]]) 29221016ad83Smrg_LT_DECL([], [install_override_mode], [1], 29231016ad83Smrg [Permission mode override for installation of shared libraries]) 29241016ad83Smrg_LT_DECL([], [postinstall_cmds], [2], 29251016ad83Smrg [Command to use after installation of a shared archive]) 29261016ad83Smrg_LT_DECL([], [postuninstall_cmds], [2], 29271016ad83Smrg [Command to use after uninstallation of a shared archive]) 29281016ad83Smrg_LT_DECL([], [finish_cmds], [2], 29291016ad83Smrg [Commands used to finish a libtool library installation in a directory]) 29301016ad83Smrg_LT_DECL([], [finish_eval], [1], 29311016ad83Smrg [[As "finish_cmds", except a single script fragment to be evaled but 29321016ad83Smrg not shown]]) 29331016ad83Smrg_LT_DECL([], [hardcode_into_libs], [0], 29341016ad83Smrg [Whether we should hardcode library paths into libraries]) 29351016ad83Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 29361016ad83Smrg [Compile-time system search path for libraries]) 29371016ad83Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 29381016ad83Smrg [Run-time system search path for libraries]) 29391016ad83Smrg])# _LT_SYS_DYNAMIC_LINKER 29401016ad83Smrg 29411016ad83Smrg 29421016ad83Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 29431016ad83Smrg# -------------------------- 29441016ad83Smrg# find a file program which can recognize shared library 29451016ad83SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 29461016ad83Smrg[m4_require([_LT_DECL_EGREP])dnl 29471016ad83SmrgAC_MSG_CHECKING([for $1]) 29481016ad83SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 29491016ad83Smrg[case $MAGIC_CMD in 29501016ad83Smrg[[\\/*] | ?:[\\/]*]) 29511016ad83Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 29521016ad83Smrg ;; 29531016ad83Smrg*) 29541016ad83Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 29551016ad83Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 29561016ad83Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 29571016ad83Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 29581016ad83Smrgdnl not every word. This closes a longstanding sh security hole. 29591016ad83Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 29601016ad83Smrg for ac_dir in $ac_dummy; do 29611016ad83Smrg IFS="$lt_save_ifs" 29621016ad83Smrg test -z "$ac_dir" && ac_dir=. 29631016ad83Smrg if test -f $ac_dir/$1; then 29641016ad83Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 29651016ad83Smrg if test -n "$file_magic_test_file"; then 29661016ad83Smrg case $deplibs_check_method in 29671016ad83Smrg "file_magic "*) 29681016ad83Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 29691016ad83Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 29701016ad83Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 29711016ad83Smrg $EGREP "$file_magic_regex" > /dev/null; then 29721016ad83Smrg : 29731016ad83Smrg else 29741016ad83Smrg cat <<_LT_EOF 1>&2 29751016ad83Smrg 29761016ad83Smrg*** Warning: the command libtool uses to detect shared libraries, 29771016ad83Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 29781016ad83Smrg*** The result is that libtool may fail to recognize shared libraries 29791016ad83Smrg*** as such. This will affect the creation of libtool libraries that 29801016ad83Smrg*** depend on shared libraries, but programs linked with such libtool 29811016ad83Smrg*** libraries will work regardless of this problem. Nevertheless, you 29821016ad83Smrg*** may want to report the problem to your system manager and/or to 29831016ad83Smrg*** bug-libtool@gnu.org 29841016ad83Smrg 29851016ad83Smrg_LT_EOF 29861016ad83Smrg fi ;; 29871016ad83Smrg esac 29881016ad83Smrg fi 29891016ad83Smrg break 29901016ad83Smrg fi 29911016ad83Smrg done 29921016ad83Smrg IFS="$lt_save_ifs" 29931016ad83Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 29941016ad83Smrg ;; 29951016ad83Smrgesac]) 29961016ad83SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 29971016ad83Smrgif test -n "$MAGIC_CMD"; then 29981016ad83Smrg AC_MSG_RESULT($MAGIC_CMD) 29991016ad83Smrgelse 30001016ad83Smrg AC_MSG_RESULT(no) 30011016ad83Smrgfi 30021016ad83Smrg_LT_DECL([], [MAGIC_CMD], [0], 30031016ad83Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 30041016ad83Smrg])# _LT_PATH_TOOL_PREFIX 30051016ad83Smrg 30061016ad83Smrg# Old name: 30071016ad83SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 30081016ad83Smrgdnl aclocal-1.4 backwards compatibility: 30091016ad83Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 30101016ad83Smrg 30111016ad83Smrg 30121016ad83Smrg# _LT_PATH_MAGIC 30131016ad83Smrg# -------------- 30141016ad83Smrg# find a file program which can recognize a shared library 30151016ad83Smrgm4_defun([_LT_PATH_MAGIC], 30161016ad83Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 30171016ad83Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 30181016ad83Smrg if test -n "$ac_tool_prefix"; then 30191016ad83Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 30201016ad83Smrg else 30211016ad83Smrg MAGIC_CMD=: 30221016ad83Smrg fi 30231016ad83Smrgfi 30241016ad83Smrg])# _LT_PATH_MAGIC 30251016ad83Smrg 30261016ad83Smrg 30271016ad83Smrg# LT_PATH_LD 30281016ad83Smrg# ---------- 30291016ad83Smrg# find the pathname to the GNU or non-GNU linker 30301016ad83SmrgAC_DEFUN([LT_PATH_LD], 30311016ad83Smrg[AC_REQUIRE([AC_PROG_CC])dnl 30321016ad83SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 30331016ad83SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 30341016ad83Smrgm4_require([_LT_DECL_SED])dnl 30351016ad83Smrgm4_require([_LT_DECL_EGREP])dnl 30361016ad83Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 30371016ad83Smrg 30381016ad83SmrgAC_ARG_WITH([gnu-ld], 30391016ad83Smrg [AS_HELP_STRING([--with-gnu-ld], 30401016ad83Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 30411016ad83Smrg [test "$withval" = no || with_gnu_ld=yes], 30421016ad83Smrg [with_gnu_ld=no])dnl 30431016ad83Smrg 30441016ad83Smrgac_prog=ld 30451016ad83Smrgif test "$GCC" = yes; then 30461016ad83Smrg # Check if gcc -print-prog-name=ld gives a path. 30471016ad83Smrg AC_MSG_CHECKING([for ld used by $CC]) 30481016ad83Smrg case $host in 30491016ad83Smrg *-*-mingw*) 30501016ad83Smrg # gcc leaves a trailing carriage return which upsets mingw 30511016ad83Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 30521016ad83Smrg *) 30531016ad83Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 30541016ad83Smrg esac 30551016ad83Smrg case $ac_prog in 30561016ad83Smrg # Accept absolute paths. 30571016ad83Smrg [[\\/]]* | ?:[[\\/]]*) 30581016ad83Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 30591016ad83Smrg # Canonicalize the pathname of ld 30601016ad83Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 30611016ad83Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 30621016ad83Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 30631016ad83Smrg done 30641016ad83Smrg test -z "$LD" && LD="$ac_prog" 30651016ad83Smrg ;; 30661016ad83Smrg "") 30671016ad83Smrg # If it fails, then pretend we aren't using GCC. 30681016ad83Smrg ac_prog=ld 30691016ad83Smrg ;; 30701016ad83Smrg *) 30711016ad83Smrg # If it is relative, then search for the first ld in PATH. 30721016ad83Smrg with_gnu_ld=unknown 30731016ad83Smrg ;; 30741016ad83Smrg esac 30751016ad83Smrgelif test "$with_gnu_ld" = yes; then 30761016ad83Smrg AC_MSG_CHECKING([for GNU ld]) 30771016ad83Smrgelse 30781016ad83Smrg AC_MSG_CHECKING([for non-GNU ld]) 30791016ad83Smrgfi 30801016ad83SmrgAC_CACHE_VAL(lt_cv_path_LD, 30811016ad83Smrg[if test -z "$LD"; then 30821016ad83Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 30831016ad83Smrg for ac_dir in $PATH; do 30841016ad83Smrg IFS="$lt_save_ifs" 30851016ad83Smrg test -z "$ac_dir" && ac_dir=. 30861016ad83Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 30871016ad83Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 30881016ad83Smrg # Check to see if the program is GNU ld. I'd rather use --version, 30891016ad83Smrg # but apparently some variants of GNU ld only accept -v. 30901016ad83Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 30911016ad83Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 30921016ad83Smrg *GNU* | *'with BFD'*) 30931016ad83Smrg test "$with_gnu_ld" != no && break 30941016ad83Smrg ;; 30951016ad83Smrg *) 30961016ad83Smrg test "$with_gnu_ld" != yes && break 30971016ad83Smrg ;; 30981016ad83Smrg esac 30991016ad83Smrg fi 31001016ad83Smrg done 31011016ad83Smrg IFS="$lt_save_ifs" 31021016ad83Smrgelse 31031016ad83Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 31041016ad83Smrgfi]) 31051016ad83SmrgLD="$lt_cv_path_LD" 31061016ad83Smrgif test -n "$LD"; then 31071016ad83Smrg AC_MSG_RESULT($LD) 31081016ad83Smrgelse 31091016ad83Smrg AC_MSG_RESULT(no) 31101016ad83Smrgfi 31111016ad83Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 31121016ad83Smrg_LT_PATH_LD_GNU 31131016ad83SmrgAC_SUBST([LD]) 31141016ad83Smrg 31151016ad83Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 31161016ad83Smrg])# LT_PATH_LD 31171016ad83Smrg 31181016ad83Smrg# Old names: 31191016ad83SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 31201016ad83SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 31211016ad83Smrgdnl aclocal-1.4 backwards compatibility: 31221016ad83Smrgdnl AC_DEFUN([AM_PROG_LD], []) 31231016ad83Smrgdnl AC_DEFUN([AC_PROG_LD], []) 31241016ad83Smrg 31251016ad83Smrg 31261016ad83Smrg# _LT_PATH_LD_GNU 31271016ad83Smrg#- -------------- 31281016ad83Smrgm4_defun([_LT_PATH_LD_GNU], 31291016ad83Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 31301016ad83Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 31311016ad83Smrgcase `$LD -v 2>&1 </dev/null` in 31321016ad83Smrg*GNU* | *'with BFD'*) 31331016ad83Smrg lt_cv_prog_gnu_ld=yes 31341016ad83Smrg ;; 31351016ad83Smrg*) 31361016ad83Smrg lt_cv_prog_gnu_ld=no 31371016ad83Smrg ;; 31381016ad83Smrgesac]) 31391016ad83Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 31401016ad83Smrg])# _LT_PATH_LD_GNU 31411016ad83Smrg 31421016ad83Smrg 31431016ad83Smrg# _LT_CMD_RELOAD 31441016ad83Smrg# -------------- 31451016ad83Smrg# find reload flag for linker 31461016ad83Smrg# -- PORTME Some linkers may need a different reload flag. 31471016ad83Smrgm4_defun([_LT_CMD_RELOAD], 31481016ad83Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 31491016ad83Smrg lt_cv_ld_reload_flag, 31501016ad83Smrg [lt_cv_ld_reload_flag='-r']) 31511016ad83Smrgreload_flag=$lt_cv_ld_reload_flag 31521016ad83Smrgcase $reload_flag in 31531016ad83Smrg"" | " "*) ;; 31541016ad83Smrg*) reload_flag=" $reload_flag" ;; 31551016ad83Smrgesac 31561016ad83Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 31571016ad83Smrgcase $host_os in 31581016ad83Smrg cygwin* | mingw* | pw32* | cegcc*) 31591016ad83Smrg if test "$GCC" != yes; then 31601016ad83Smrg reload_cmds=false 31611016ad83Smrg fi 31621016ad83Smrg ;; 31631016ad83Smrg darwin*) 31641016ad83Smrg if test "$GCC" = yes; then 31651016ad83Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 31661016ad83Smrg else 31671016ad83Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 31681016ad83Smrg fi 31691016ad83Smrg ;; 31701016ad83Smrgesac 31711016ad83Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 31721016ad83Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 31731016ad83Smrg])# _LT_CMD_RELOAD 31741016ad83Smrg 31751016ad83Smrg 31761016ad83Smrg# _LT_CHECK_MAGIC_METHOD 31771016ad83Smrg# ---------------------- 31781016ad83Smrg# how to check for library dependencies 31791016ad83Smrg# -- PORTME fill in with the dynamic library characteristics 31801016ad83Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 31811016ad83Smrg[m4_require([_LT_DECL_EGREP]) 31821016ad83Smrgm4_require([_LT_DECL_OBJDUMP]) 31831016ad83SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 31841016ad83Smrglt_cv_deplibs_check_method, 31851016ad83Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 31861016ad83Smrglt_cv_file_magic_test_file= 31871016ad83Smrglt_cv_deplibs_check_method='unknown' 31881016ad83Smrg# Need to set the preceding variable on all platforms that support 31891016ad83Smrg# interlibrary dependencies. 31901016ad83Smrg# 'none' -- dependencies not supported. 31911016ad83Smrg# `unknown' -- same as none, but documents that we really don't know. 31921016ad83Smrg# 'pass_all' -- all dependencies passed with no checks. 31931016ad83Smrg# 'test_compile' -- check by making test program. 31941016ad83Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 31951016ad83Smrg# which responds to the $file_magic_cmd with a given extended regex. 31961016ad83Smrg# If you have `file' or equivalent on your system and you're not sure 31971016ad83Smrg# whether `pass_all' will *always* work, you probably want this one. 31981016ad83Smrg 31991016ad83Smrgcase $host_os in 32001016ad83Smrgaix[[4-9]]*) 32011016ad83Smrg lt_cv_deplibs_check_method=pass_all 32021016ad83Smrg ;; 32031016ad83Smrg 32041016ad83Smrgbeos*) 32051016ad83Smrg lt_cv_deplibs_check_method=pass_all 32061016ad83Smrg ;; 32071016ad83Smrg 32081016ad83Smrgbsdi[[45]]*) 32091016ad83Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 32101016ad83Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 32111016ad83Smrg lt_cv_file_magic_test_file=/shlib/libc.so 32121016ad83Smrg ;; 32131016ad83Smrg 32141016ad83Smrgcygwin*) 32151016ad83Smrg # func_win32_libid is a shell function defined in ltmain.sh 32161016ad83Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 32171016ad83Smrg lt_cv_file_magic_cmd='func_win32_libid' 32181016ad83Smrg ;; 32191016ad83Smrg 32201016ad83Smrgmingw* | pw32*) 32211016ad83Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 32221016ad83Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 32231016ad83Smrg # unless we find 'file', for example because we are cross-compiling. 32241016ad83Smrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 32251016ad83Smrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 32261016ad83Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 32271016ad83Smrg lt_cv_file_magic_cmd='func_win32_libid' 32281016ad83Smrg else 32291016ad83Smrg # Keep this pattern in sync with the one in func_win32_libid. 32301016ad83Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 32311016ad83Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 32321016ad83Smrg fi 32331016ad83Smrg ;; 32341016ad83Smrg 32351016ad83Smrgcegcc*) 32361016ad83Smrg # use the weaker test based on 'objdump'. See mingw*. 32371016ad83Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 32381016ad83Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 32391016ad83Smrg ;; 32401016ad83Smrg 32411016ad83Smrgdarwin* | rhapsody*) 32421016ad83Smrg lt_cv_deplibs_check_method=pass_all 32431016ad83Smrg ;; 32441016ad83Smrg 32451016ad83Smrgfreebsd* | dragonfly*) 32461016ad83Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 32471016ad83Smrg case $host_cpu in 32481016ad83Smrg i*86 ) 32491016ad83Smrg # Not sure whether the presence of OpenBSD here was a mistake. 32501016ad83Smrg # Let's accept both of them until this is cleared up. 32511016ad83Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 32521016ad83Smrg lt_cv_file_magic_cmd=/usr/bin/file 32531016ad83Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 32541016ad83Smrg ;; 32551016ad83Smrg esac 32561016ad83Smrg else 32571016ad83Smrg lt_cv_deplibs_check_method=pass_all 32581016ad83Smrg fi 32591016ad83Smrg ;; 32601016ad83Smrg 32611016ad83Smrghaiku*) 32621016ad83Smrg lt_cv_deplibs_check_method=pass_all 32631016ad83Smrg ;; 32641016ad83Smrg 32651016ad83Smrghpux10.20* | hpux11*) 32661016ad83Smrg lt_cv_file_magic_cmd=/usr/bin/file 32671016ad83Smrg case $host_cpu in 32681016ad83Smrg ia64*) 32691016ad83Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 32701016ad83Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 32711016ad83Smrg ;; 32721016ad83Smrg hppa*64*) 32731016ad83Smrg [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]'] 32741016ad83Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 32751016ad83Smrg ;; 32761016ad83Smrg *) 32771016ad83Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 32781016ad83Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 32791016ad83Smrg ;; 32801016ad83Smrg esac 32811016ad83Smrg ;; 32821016ad83Smrg 32831016ad83Smrginterix[[3-9]]*) 32841016ad83Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 32851016ad83Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 32861016ad83Smrg ;; 32871016ad83Smrg 32881016ad83Smrgirix5* | irix6* | nonstopux*) 32891016ad83Smrg case $LD in 32901016ad83Smrg *-32|*"-32 ") libmagic=32-bit;; 32911016ad83Smrg *-n32|*"-n32 ") libmagic=N32;; 32921016ad83Smrg *-64|*"-64 ") libmagic=64-bit;; 32931016ad83Smrg *) libmagic=never-match;; 32941016ad83Smrg esac 32951016ad83Smrg lt_cv_deplibs_check_method=pass_all 32961016ad83Smrg ;; 32971016ad83Smrg 32981016ad83Smrg# This must be glibc/ELF. 32991016ad83Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 33001016ad83Smrg lt_cv_deplibs_check_method=pass_all 33011016ad83Smrg ;; 33021016ad83Smrg 33031016ad83Smrgnetbsd* | netbsdelf*-gnu) 33041016ad83Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 33051016ad83Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 33061016ad83Smrg else 33071016ad83Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 33081016ad83Smrg fi 33091016ad83Smrg ;; 33101016ad83Smrg 33111016ad83Smrgnewos6*) 33121016ad83Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 33131016ad83Smrg lt_cv_file_magic_cmd=/usr/bin/file 33141016ad83Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 33151016ad83Smrg ;; 33161016ad83Smrg 33171016ad83Smrg*nto* | *qnx*) 33181016ad83Smrg lt_cv_deplibs_check_method=pass_all 33191016ad83Smrg ;; 33201016ad83Smrg 33211016ad83Smrgopenbsd*) 33221016ad83Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 33231016ad83Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 33241016ad83Smrg else 33251016ad83Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 33261016ad83Smrg fi 33271016ad83Smrg ;; 33281016ad83Smrg 33291016ad83Smrgosf3* | osf4* | osf5*) 33301016ad83Smrg lt_cv_deplibs_check_method=pass_all 33311016ad83Smrg ;; 33321016ad83Smrg 33331016ad83Smrgrdos*) 33341016ad83Smrg lt_cv_deplibs_check_method=pass_all 33351016ad83Smrg ;; 33361016ad83Smrg 33371016ad83Smrgsolaris*) 33381016ad83Smrg lt_cv_deplibs_check_method=pass_all 33391016ad83Smrg ;; 33401016ad83Smrg 33411016ad83Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 33421016ad83Smrg lt_cv_deplibs_check_method=pass_all 33431016ad83Smrg ;; 33441016ad83Smrg 33451016ad83Smrgsysv4 | sysv4.3*) 33461016ad83Smrg case $host_vendor in 33471016ad83Smrg motorola) 33481016ad83Smrg 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]]' 33491016ad83Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 33501016ad83Smrg ;; 33511016ad83Smrg ncr) 33521016ad83Smrg lt_cv_deplibs_check_method=pass_all 33531016ad83Smrg ;; 33541016ad83Smrg sequent) 33551016ad83Smrg lt_cv_file_magic_cmd='/bin/file' 33561016ad83Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 33571016ad83Smrg ;; 33581016ad83Smrg sni) 33591016ad83Smrg lt_cv_file_magic_cmd='/bin/file' 33601016ad83Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 33611016ad83Smrg lt_cv_file_magic_test_file=/lib/libc.so 33621016ad83Smrg ;; 33631016ad83Smrg siemens) 33641016ad83Smrg lt_cv_deplibs_check_method=pass_all 33651016ad83Smrg ;; 33661016ad83Smrg pc) 33671016ad83Smrg lt_cv_deplibs_check_method=pass_all 33681016ad83Smrg ;; 33691016ad83Smrg esac 33701016ad83Smrg ;; 33711016ad83Smrg 33721016ad83Smrgtpf*) 33731016ad83Smrg lt_cv_deplibs_check_method=pass_all 33741016ad83Smrg ;; 33751016ad83Smrgesac 33761016ad83Smrg]) 33771016ad83Smrg 33781016ad83Smrgfile_magic_glob= 33791016ad83Smrgwant_nocaseglob=no 33801016ad83Smrgif test "$build" = "$host"; then 33811016ad83Smrg case $host_os in 33821016ad83Smrg mingw* | pw32*) 33831016ad83Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 33841016ad83Smrg want_nocaseglob=yes 33851016ad83Smrg else 33861016ad83Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 33871016ad83Smrg fi 33881016ad83Smrg ;; 33891016ad83Smrg esac 33901016ad83Smrgfi 33911016ad83Smrg 33921016ad83Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 33931016ad83Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 33941016ad83Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 33951016ad83Smrg 33961016ad83Smrg_LT_DECL([], [deplibs_check_method], [1], 33971016ad83Smrg [Method to check whether dependent libraries are shared objects]) 33981016ad83Smrg_LT_DECL([], [file_magic_cmd], [1], 33991016ad83Smrg [Command to use when deplibs_check_method = "file_magic"]) 34001016ad83Smrg_LT_DECL([], [file_magic_glob], [1], 34011016ad83Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 34021016ad83Smrg_LT_DECL([], [want_nocaseglob], [1], 34031016ad83Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 34041016ad83Smrg])# _LT_CHECK_MAGIC_METHOD 34051016ad83Smrg 34061016ad83Smrg 34071016ad83Smrg# LT_PATH_NM 34081016ad83Smrg# ---------- 34091016ad83Smrg# find the pathname to a BSD- or MS-compatible name lister 34101016ad83SmrgAC_DEFUN([LT_PATH_NM], 34111016ad83Smrg[AC_REQUIRE([AC_PROG_CC])dnl 34121016ad83SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 34131016ad83Smrg[if test -n "$NM"; then 34141016ad83Smrg # Let the user override the test. 34151016ad83Smrg lt_cv_path_NM="$NM" 34161016ad83Smrgelse 34171016ad83Smrg lt_nm_to_check="${ac_tool_prefix}nm" 34181016ad83Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 34191016ad83Smrg lt_nm_to_check="$lt_nm_to_check nm" 34201016ad83Smrg fi 34211016ad83Smrg for lt_tmp_nm in $lt_nm_to_check; do 34221016ad83Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 34231016ad83Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 34241016ad83Smrg IFS="$lt_save_ifs" 34251016ad83Smrg test -z "$ac_dir" && ac_dir=. 34261016ad83Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 34271016ad83Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 34281016ad83Smrg # Check to see if the nm accepts a BSD-compat flag. 34291016ad83Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 34301016ad83Smrg # nm: unknown option "B" ignored 34311016ad83Smrg # Tru64's nm complains that /dev/null is an invalid object file 34321016ad83Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 34331016ad83Smrg */dev/null* | *'Invalid file or object type'*) 34341016ad83Smrg lt_cv_path_NM="$tmp_nm -B" 34351016ad83Smrg break 34361016ad83Smrg ;; 34371016ad83Smrg *) 34381016ad83Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 34391016ad83Smrg */dev/null*) 34401016ad83Smrg lt_cv_path_NM="$tmp_nm -p" 34411016ad83Smrg break 34421016ad83Smrg ;; 34431016ad83Smrg *) 34441016ad83Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 34451016ad83Smrg continue # so that we can try to find one that supports BSD flags 34461016ad83Smrg ;; 34471016ad83Smrg esac 34481016ad83Smrg ;; 34491016ad83Smrg esac 34501016ad83Smrg fi 34511016ad83Smrg done 34521016ad83Smrg IFS="$lt_save_ifs" 34531016ad83Smrg done 34541016ad83Smrg : ${lt_cv_path_NM=no} 34551016ad83Smrgfi]) 34561016ad83Smrgif test "$lt_cv_path_NM" != "no"; then 34571016ad83Smrg NM="$lt_cv_path_NM" 34581016ad83Smrgelse 34591016ad83Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 34601016ad83Smrg if test -n "$DUMPBIN"; then : 34611016ad83Smrg # Let the user override the test. 34621016ad83Smrg else 34631016ad83Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 34641016ad83Smrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 34651016ad83Smrg *COFF*) 34661016ad83Smrg DUMPBIN="$DUMPBIN -symbols" 34671016ad83Smrg ;; 34681016ad83Smrg *) 34691016ad83Smrg DUMPBIN=: 34701016ad83Smrg ;; 34711016ad83Smrg esac 34721016ad83Smrg fi 34731016ad83Smrg AC_SUBST([DUMPBIN]) 34741016ad83Smrg if test "$DUMPBIN" != ":"; then 34751016ad83Smrg NM="$DUMPBIN" 34761016ad83Smrg fi 34771016ad83Smrgfi 34781016ad83Smrgtest -z "$NM" && NM=nm 34791016ad83SmrgAC_SUBST([NM]) 34801016ad83Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 34811016ad83Smrg 34821016ad83SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 34831016ad83Smrg [lt_cv_nm_interface="BSD nm" 34841016ad83Smrg echo "int some_variable = 0;" > conftest.$ac_ext 34851016ad83Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 34861016ad83Smrg (eval "$ac_compile" 2>conftest.err) 34871016ad83Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 34881016ad83Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 34891016ad83Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 34901016ad83Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 34911016ad83Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 34921016ad83Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 34931016ad83Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 34941016ad83Smrg lt_cv_nm_interface="MS dumpbin" 34951016ad83Smrg fi 34961016ad83Smrg rm -f conftest*]) 34971016ad83Smrg])# LT_PATH_NM 34981016ad83Smrg 34991016ad83Smrg# Old names: 35001016ad83SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 35011016ad83SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 35021016ad83Smrgdnl aclocal-1.4 backwards compatibility: 35031016ad83Smrgdnl AC_DEFUN([AM_PROG_NM], []) 35041016ad83Smrgdnl AC_DEFUN([AC_PROG_NM], []) 35051016ad83Smrg 35061016ad83Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 35071016ad83Smrg# -------------------------------- 35081016ad83Smrg# how to determine the name of the shared library 35091016ad83Smrg# associated with a specific link library. 35101016ad83Smrg# -- PORTME fill in with the dynamic library characteristics 35111016ad83Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 35121016ad83Smrg[m4_require([_LT_DECL_EGREP]) 35131016ad83Smrgm4_require([_LT_DECL_OBJDUMP]) 35141016ad83Smrgm4_require([_LT_DECL_DLLTOOL]) 35151016ad83SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 35161016ad83Smrglt_cv_sharedlib_from_linklib_cmd, 35171016ad83Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 35181016ad83Smrg 35191016ad83Smrgcase $host_os in 35201016ad83Smrgcygwin* | mingw* | pw32* | cegcc*) 35211016ad83Smrg # two different shell functions defined in ltmain.sh 35221016ad83Smrg # decide which to use based on capabilities of $DLLTOOL 35231016ad83Smrg case `$DLLTOOL --help 2>&1` in 35241016ad83Smrg *--identify-strict*) 35251016ad83Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 35261016ad83Smrg ;; 35271016ad83Smrg *) 35281016ad83Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 35291016ad83Smrg ;; 35301016ad83Smrg esac 35311016ad83Smrg ;; 35321016ad83Smrg*) 35331016ad83Smrg # fallback: assume linklib IS sharedlib 35341016ad83Smrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 35351016ad83Smrg ;; 35361016ad83Smrgesac 35371016ad83Smrg]) 35381016ad83Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 35391016ad83Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 35401016ad83Smrg 35411016ad83Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 35421016ad83Smrg [Command to associate shared and link libraries]) 35431016ad83Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 35441016ad83Smrg 35451016ad83Smrg 35461016ad83Smrg# _LT_PATH_MANIFEST_TOOL 35471016ad83Smrg# ---------------------- 35481016ad83Smrg# locate the manifest tool 35491016ad83Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 35501016ad83Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 35511016ad83Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 35521016ad83SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 35531016ad83Smrg [lt_cv_path_mainfest_tool=no 35541016ad83Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 35551016ad83Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 35561016ad83Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 35571016ad83Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 35581016ad83Smrg lt_cv_path_mainfest_tool=yes 35591016ad83Smrg fi 35601016ad83Smrg rm -f conftest*]) 35611016ad83Smrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 35621016ad83Smrg MANIFEST_TOOL=: 35631016ad83Smrgfi 35641016ad83Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 35651016ad83Smrg])# _LT_PATH_MANIFEST_TOOL 35661016ad83Smrg 35671016ad83Smrg 35681016ad83Smrg# LT_LIB_M 35691016ad83Smrg# -------- 35701016ad83Smrg# check for math library 35711016ad83SmrgAC_DEFUN([LT_LIB_M], 35721016ad83Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 35731016ad83SmrgLIBM= 35741016ad83Smrgcase $host in 35751016ad83Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 35761016ad83Smrg # These system don't have libm, or don't need it 35771016ad83Smrg ;; 35781016ad83Smrg*-ncr-sysv4.3*) 35791016ad83Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 35801016ad83Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 35811016ad83Smrg ;; 35821016ad83Smrg*) 35831016ad83Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 35841016ad83Smrg ;; 35851016ad83Smrgesac 35861016ad83SmrgAC_SUBST([LIBM]) 35871016ad83Smrg])# LT_LIB_M 35881016ad83Smrg 35891016ad83Smrg# Old name: 35901016ad83SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 35911016ad83Smrgdnl aclocal-1.4 backwards compatibility: 35921016ad83Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 35931016ad83Smrg 35941016ad83Smrg 35951016ad83Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 35961016ad83Smrg# ------------------------------- 35971016ad83Smrgm4_defun([_LT_COMPILER_NO_RTTI], 35981016ad83Smrg[m4_require([_LT_TAG_COMPILER])dnl 35991016ad83Smrg 36001016ad83Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 36011016ad83Smrg 36021016ad83Smrgif test "$GCC" = yes; then 36031016ad83Smrg case $cc_basename in 36041016ad83Smrg nvcc*) 36051016ad83Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 36061016ad83Smrg *) 36071016ad83Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 36081016ad83Smrg esac 36091016ad83Smrg 36101016ad83Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 36111016ad83Smrg lt_cv_prog_compiler_rtti_exceptions, 36121016ad83Smrg [-fno-rtti -fno-exceptions], [], 36131016ad83Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 36141016ad83Smrgfi 36151016ad83Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 36161016ad83Smrg [Compiler flag to turn off builtin functions]) 36171016ad83Smrg])# _LT_COMPILER_NO_RTTI 36181016ad83Smrg 36191016ad83Smrg 36201016ad83Smrg# _LT_CMD_GLOBAL_SYMBOLS 36211016ad83Smrg# ---------------------- 36221016ad83Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 36231016ad83Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 36241016ad83SmrgAC_REQUIRE([AC_PROG_CC])dnl 36251016ad83SmrgAC_REQUIRE([AC_PROG_AWK])dnl 36261016ad83SmrgAC_REQUIRE([LT_PATH_NM])dnl 36271016ad83SmrgAC_REQUIRE([LT_PATH_LD])dnl 36281016ad83Smrgm4_require([_LT_DECL_SED])dnl 36291016ad83Smrgm4_require([_LT_DECL_EGREP])dnl 36301016ad83Smrgm4_require([_LT_TAG_COMPILER])dnl 36311016ad83Smrg 36321016ad83Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 36331016ad83SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 36341016ad83SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 36351016ad83Smrg[ 36361016ad83Smrg# These are sane defaults that work on at least a few old systems. 36371016ad83Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 36381016ad83Smrg 36391016ad83Smrg# Character class describing NM global symbol codes. 36401016ad83Smrgsymcode='[[BCDEGRST]]' 36411016ad83Smrg 36421016ad83Smrg# Regexp to match symbols that can be accessed directly from C. 36431016ad83Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 36441016ad83Smrg 36451016ad83Smrg# Define system-specific variables. 36461016ad83Smrgcase $host_os in 36471016ad83Smrgaix*) 36481016ad83Smrg symcode='[[BCDT]]' 36491016ad83Smrg ;; 36501016ad83Smrgcygwin* | mingw* | pw32* | cegcc*) 36511016ad83Smrg symcode='[[ABCDGISTW]]' 36521016ad83Smrg ;; 36531016ad83Smrghpux*) 36541016ad83Smrg if test "$host_cpu" = ia64; then 36551016ad83Smrg symcode='[[ABCDEGRST]]' 36561016ad83Smrg fi 36571016ad83Smrg ;; 36581016ad83Smrgirix* | nonstopux*) 36591016ad83Smrg symcode='[[BCDEGRST]]' 36601016ad83Smrg ;; 36611016ad83Smrgosf*) 36621016ad83Smrg symcode='[[BCDEGQRST]]' 36631016ad83Smrg ;; 36641016ad83Smrgsolaris*) 36651016ad83Smrg symcode='[[BDRT]]' 36661016ad83Smrg ;; 36671016ad83Smrgsco3.2v5*) 36681016ad83Smrg symcode='[[DT]]' 36691016ad83Smrg ;; 36701016ad83Smrgsysv4.2uw2*) 36711016ad83Smrg symcode='[[DT]]' 36721016ad83Smrg ;; 36731016ad83Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 36741016ad83Smrg symcode='[[ABDT]]' 36751016ad83Smrg ;; 36761016ad83Smrgsysv4) 36771016ad83Smrg symcode='[[DFNSTU]]' 36781016ad83Smrg ;; 36791016ad83Smrgesac 36801016ad83Smrg 36811016ad83Smrg# If we're using GNU nm, then use its standard symbol codes. 36821016ad83Smrgcase `$NM -V 2>&1` in 36831016ad83Smrg*GNU* | *'with BFD'*) 36841016ad83Smrg symcode='[[ABCDGIRSTW]]' ;; 36851016ad83Smrgesac 36861016ad83Smrg 36871016ad83Smrg# Transform an extracted symbol line into a proper C declaration. 36881016ad83Smrg# Some systems (esp. on ia64) link data and code symbols differently, 36891016ad83Smrg# so use this general approach. 36901016ad83Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 36911016ad83Smrg 36921016ad83Smrg# Transform an extracted symbol line into symbol name and symbol address 36931016ad83Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 36941016ad83Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" 36951016ad83Smrg 36961016ad83Smrg# Handle CRLF in mingw tool chain 36971016ad83Smrgopt_cr= 36981016ad83Smrgcase $build_os in 36991016ad83Smrgmingw*) 37001016ad83Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 37011016ad83Smrg ;; 37021016ad83Smrgesac 37031016ad83Smrg 37041016ad83Smrg# Try without a prefix underscore, then with it. 37051016ad83Smrgfor ac_symprfx in "" "_"; do 37061016ad83Smrg 37071016ad83Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 37081016ad83Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 37091016ad83Smrg 37101016ad83Smrg # Write the raw and C identifiers. 37111016ad83Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 37121016ad83Smrg # Fake it for dumpbin and say T for any non-static function 37131016ad83Smrg # and D for any global variable. 37141016ad83Smrg # Also find C++ and __fastcall symbols from MSVC++, 37151016ad83Smrg # which start with @ or ?. 37161016ad83Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 37171016ad83Smrg" {last_section=section; section=\$ 3};"\ 37181016ad83Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 37191016ad83Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 37201016ad83Smrg" \$ 0!~/External *\|/{next};"\ 37211016ad83Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 37221016ad83Smrg" {if(hide[section]) next};"\ 37231016ad83Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 37241016ad83Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 37251016ad83Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 37261016ad83Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 37271016ad83Smrg" ' prfx=^$ac_symprfx]" 37281016ad83Smrg else 37291016ad83Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 37301016ad83Smrg fi 37311016ad83Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 37321016ad83Smrg 37331016ad83Smrg # Check to see that the pipe works correctly. 37341016ad83Smrg pipe_works=no 37351016ad83Smrg 37361016ad83Smrg rm -f conftest* 37371016ad83Smrg cat > conftest.$ac_ext <<_LT_EOF 37381016ad83Smrg#ifdef __cplusplus 37391016ad83Smrgextern "C" { 37401016ad83Smrg#endif 37411016ad83Smrgchar nm_test_var; 37421016ad83Smrgvoid nm_test_func(void); 37431016ad83Smrgvoid nm_test_func(void){} 37441016ad83Smrg#ifdef __cplusplus 37451016ad83Smrg} 37461016ad83Smrg#endif 37471016ad83Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 37481016ad83Smrg_LT_EOF 37491016ad83Smrg 37501016ad83Smrg if AC_TRY_EVAL(ac_compile); then 37511016ad83Smrg # Now try to grab the symbols. 37521016ad83Smrg nlist=conftest.nm 37531016ad83Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 37541016ad83Smrg # Try sorting and uniquifying the output. 37551016ad83Smrg if sort "$nlist" | uniq > "$nlist"T; then 37561016ad83Smrg mv -f "$nlist"T "$nlist" 37571016ad83Smrg else 37581016ad83Smrg rm -f "$nlist"T 37591016ad83Smrg fi 37601016ad83Smrg 37611016ad83Smrg # Make sure that we snagged all the symbols we need. 37621016ad83Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 37631016ad83Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 37641016ad83Smrg cat <<_LT_EOF > conftest.$ac_ext 37651016ad83Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 37661016ad83Smrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 37671016ad83Smrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 37681016ad83Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 37691016ad83Smrg# define LT@&t@_DLSYM_CONST 37701016ad83Smrg#elif defined(__osf__) 37711016ad83Smrg/* This system does not cope well with relocations in const data. */ 37721016ad83Smrg# define LT@&t@_DLSYM_CONST 37731016ad83Smrg#else 37741016ad83Smrg# define LT@&t@_DLSYM_CONST const 37751016ad83Smrg#endif 37761016ad83Smrg 37771016ad83Smrg#ifdef __cplusplus 37781016ad83Smrgextern "C" { 37791016ad83Smrg#endif 37801016ad83Smrg 37811016ad83Smrg_LT_EOF 37821016ad83Smrg # Now generate the symbol file. 37831016ad83Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 37841016ad83Smrg 37851016ad83Smrg cat <<_LT_EOF >> conftest.$ac_ext 37861016ad83Smrg 37871016ad83Smrg/* The mapping between symbol names and symbols. */ 37881016ad83SmrgLT@&t@_DLSYM_CONST struct { 37891016ad83Smrg const char *name; 37901016ad83Smrg void *address; 37911016ad83Smrg} 37921016ad83Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 37931016ad83Smrg{ 37941016ad83Smrg { "@PROGRAM@", (void *) 0 }, 37951016ad83Smrg_LT_EOF 37961016ad83Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 37971016ad83Smrg cat <<\_LT_EOF >> conftest.$ac_ext 37981016ad83Smrg {0, (void *) 0} 37991016ad83Smrg}; 38001016ad83Smrg 38011016ad83Smrg/* This works around a problem in FreeBSD linker */ 38021016ad83Smrg#ifdef FREEBSD_WORKAROUND 38031016ad83Smrgstatic const void *lt_preloaded_setup() { 38041016ad83Smrg return lt__PROGRAM__LTX_preloaded_symbols; 38051016ad83Smrg} 38061016ad83Smrg#endif 38071016ad83Smrg 38081016ad83Smrg#ifdef __cplusplus 38091016ad83Smrg} 38101016ad83Smrg#endif 38111016ad83Smrg_LT_EOF 38121016ad83Smrg # Now try linking the two files. 38131016ad83Smrg mv conftest.$ac_objext conftstm.$ac_objext 38141016ad83Smrg lt_globsym_save_LIBS=$LIBS 38151016ad83Smrg lt_globsym_save_CFLAGS=$CFLAGS 38161016ad83Smrg LIBS="conftstm.$ac_objext" 38171016ad83Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 38181016ad83Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 38191016ad83Smrg pipe_works=yes 38201016ad83Smrg fi 38211016ad83Smrg LIBS=$lt_globsym_save_LIBS 38221016ad83Smrg CFLAGS=$lt_globsym_save_CFLAGS 38231016ad83Smrg else 38241016ad83Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 38251016ad83Smrg fi 38261016ad83Smrg else 38271016ad83Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 38281016ad83Smrg fi 38291016ad83Smrg else 38301016ad83Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 38311016ad83Smrg fi 38321016ad83Smrg else 38331016ad83Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 38341016ad83Smrg cat conftest.$ac_ext >&5 38351016ad83Smrg fi 38361016ad83Smrg rm -rf conftest* conftst* 38371016ad83Smrg 38381016ad83Smrg # Do not use the global_symbol_pipe unless it works. 38391016ad83Smrg if test "$pipe_works" = yes; then 38401016ad83Smrg break 38411016ad83Smrg else 38421016ad83Smrg lt_cv_sys_global_symbol_pipe= 38431016ad83Smrg fi 38441016ad83Smrgdone 38451016ad83Smrg]) 38461016ad83Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 38471016ad83Smrg lt_cv_sys_global_symbol_to_cdecl= 38481016ad83Smrgfi 38491016ad83Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 38501016ad83Smrg AC_MSG_RESULT(failed) 38511016ad83Smrgelse 38521016ad83Smrg AC_MSG_RESULT(ok) 38531016ad83Smrgfi 38541016ad83Smrg 38551016ad83Smrg# Response file support. 38561016ad83Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 38571016ad83Smrg nm_file_list_spec='@' 38581016ad83Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 38591016ad83Smrg nm_file_list_spec='@' 38601016ad83Smrgfi 38611016ad83Smrg 38621016ad83Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 38631016ad83Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 38641016ad83Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 38651016ad83Smrg [Transform the output of nm in a proper C declaration]) 38661016ad83Smrg_LT_DECL([global_symbol_to_c_name_address], 38671016ad83Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 38681016ad83Smrg [Transform the output of nm in a C name address pair]) 38691016ad83Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 38701016ad83Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 38711016ad83Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 38721016ad83Smrg_LT_DECL([], [nm_file_list_spec], [1], 38731016ad83Smrg [Specify filename containing input files for $NM]) 38741016ad83Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 38751016ad83Smrg 38761016ad83Smrg 38771016ad83Smrg# _LT_COMPILER_PIC([TAGNAME]) 38781016ad83Smrg# --------------------------- 38791016ad83Smrgm4_defun([_LT_COMPILER_PIC], 38801016ad83Smrg[m4_require([_LT_TAG_COMPILER])dnl 38811016ad83Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 38821016ad83Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 38831016ad83Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 38841016ad83Smrg 38851016ad83Smrgm4_if([$1], [CXX], [ 38861016ad83Smrg # C++ specific cases for pic, static, wl, etc. 38871016ad83Smrg if test "$GXX" = yes; then 38881016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 38891016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 38901016ad83Smrg 38911016ad83Smrg case $host_os in 38921016ad83Smrg aix*) 38931016ad83Smrg # All AIX code is PIC. 38941016ad83Smrg if test "$host_cpu" = ia64; then 38951016ad83Smrg # AIX 5 now supports IA64 processor 38961016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 38971016ad83Smrg fi 38981016ad83Smrg ;; 38991016ad83Smrg 39001016ad83Smrg amigaos*) 39011016ad83Smrg case $host_cpu in 39021016ad83Smrg powerpc) 39031016ad83Smrg # see comment about AmigaOS4 .so support 39041016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 39051016ad83Smrg ;; 39061016ad83Smrg m68k) 39071016ad83Smrg # FIXME: we need at least 68020 code to build shared libraries, but 39081016ad83Smrg # adding the `-m68020' flag to GCC prevents building anything better, 39091016ad83Smrg # like `-m68040'. 39101016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 39111016ad83Smrg ;; 39121016ad83Smrg esac 39131016ad83Smrg ;; 39141016ad83Smrg 39151016ad83Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 39161016ad83Smrg # PIC is the default for these OSes. 39171016ad83Smrg ;; 39181016ad83Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 39191016ad83Smrg # This hack is so that the source file can tell whether it is being 39201016ad83Smrg # built for inclusion in a dll (and should export symbols for example). 39211016ad83Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 39221016ad83Smrg # (--disable-auto-import) libraries 39231016ad83Smrg m4_if([$1], [GCJ], [], 39241016ad83Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 39251016ad83Smrg ;; 39261016ad83Smrg darwin* | rhapsody*) 39271016ad83Smrg # PIC is the default on this platform 39281016ad83Smrg # Common symbols not allowed in MH_DYLIB files 39291016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 39301016ad83Smrg ;; 39311016ad83Smrg *djgpp*) 39321016ad83Smrg # DJGPP does not support shared libraries at all 39331016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 39341016ad83Smrg ;; 39351016ad83Smrg haiku*) 39361016ad83Smrg # PIC is the default for Haiku. 39371016ad83Smrg # The "-static" flag exists, but is broken. 39381016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 39391016ad83Smrg ;; 39401016ad83Smrg interix[[3-9]]*) 39411016ad83Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 39421016ad83Smrg # Instead, we relocate shared libraries at runtime. 39431016ad83Smrg ;; 39441016ad83Smrg sysv4*MP*) 39451016ad83Smrg if test -d /usr/nec; then 39461016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 39471016ad83Smrg fi 39481016ad83Smrg ;; 39491016ad83Smrg hpux*) 39501016ad83Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 39511016ad83Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 39521016ad83Smrg # sets the default TLS model and affects inlining. 39531016ad83Smrg case $host_cpu in 39541016ad83Smrg hppa*64*) 39551016ad83Smrg ;; 39561016ad83Smrg *) 39571016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 39581016ad83Smrg ;; 39591016ad83Smrg esac 39601016ad83Smrg ;; 39611016ad83Smrg *qnx* | *nto*) 39621016ad83Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 39631016ad83Smrg # it will coredump. 39641016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 39651016ad83Smrg ;; 39661016ad83Smrg *) 39671016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 39681016ad83Smrg ;; 39691016ad83Smrg esac 39701016ad83Smrg else 39711016ad83Smrg case $host_os in 39721016ad83Smrg aix[[4-9]]*) 39731016ad83Smrg # All AIX code is PIC. 39741016ad83Smrg if test "$host_cpu" = ia64; then 39751016ad83Smrg # AIX 5 now supports IA64 processor 39761016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 39771016ad83Smrg else 39781016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 39791016ad83Smrg fi 39801016ad83Smrg ;; 39811016ad83Smrg chorus*) 39821016ad83Smrg case $cc_basename in 39831016ad83Smrg cxch68*) 39841016ad83Smrg # Green Hills C++ Compiler 39851016ad83Smrg # _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" 39861016ad83Smrg ;; 39871016ad83Smrg esac 39881016ad83Smrg ;; 39891016ad83Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 39901016ad83Smrg # This hack is so that the source file can tell whether it is being 39911016ad83Smrg # built for inclusion in a dll (and should export symbols for example). 39921016ad83Smrg m4_if([$1], [GCJ], [], 39931016ad83Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 39941016ad83Smrg ;; 39951016ad83Smrg dgux*) 39961016ad83Smrg case $cc_basename in 39971016ad83Smrg ec++*) 39981016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 39991016ad83Smrg ;; 40001016ad83Smrg ghcx*) 40011016ad83Smrg # Green Hills C++ Compiler 40021016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 40031016ad83Smrg ;; 40041016ad83Smrg *) 40051016ad83Smrg ;; 40061016ad83Smrg esac 40071016ad83Smrg ;; 40081016ad83Smrg freebsd* | dragonfly*) 40091016ad83Smrg # FreeBSD uses GNU C++ 40101016ad83Smrg ;; 40111016ad83Smrg hpux9* | hpux10* | hpux11*) 40121016ad83Smrg case $cc_basename in 40131016ad83Smrg CC*) 40141016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40151016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 40161016ad83Smrg if test "$host_cpu" != ia64; then 40171016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 40181016ad83Smrg fi 40191016ad83Smrg ;; 40201016ad83Smrg aCC*) 40211016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40221016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 40231016ad83Smrg case $host_cpu in 40241016ad83Smrg hppa*64*|ia64*) 40251016ad83Smrg # +Z the default 40261016ad83Smrg ;; 40271016ad83Smrg *) 40281016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 40291016ad83Smrg ;; 40301016ad83Smrg esac 40311016ad83Smrg ;; 40321016ad83Smrg *) 40331016ad83Smrg ;; 40341016ad83Smrg esac 40351016ad83Smrg ;; 40361016ad83Smrg interix*) 40371016ad83Smrg # This is c89, which is MS Visual C++ (no shared libs) 40381016ad83Smrg # Anyone wants to do a port? 40391016ad83Smrg ;; 40401016ad83Smrg irix5* | irix6* | nonstopux*) 40411016ad83Smrg case $cc_basename in 40421016ad83Smrg CC*) 40431016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40441016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 40451016ad83Smrg # CC pic flag -KPIC is the default. 40461016ad83Smrg ;; 40471016ad83Smrg *) 40481016ad83Smrg ;; 40491016ad83Smrg esac 40501016ad83Smrg ;; 40511016ad83Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 40521016ad83Smrg case $cc_basename in 40531016ad83Smrg KCC*) 40541016ad83Smrg # KAI C++ Compiler 40551016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 40561016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 40571016ad83Smrg ;; 40581016ad83Smrg ecpc* ) 40591016ad83Smrg # old Intel C++ for x86_64 which still supported -KPIC. 40601016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40611016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40621016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 40631016ad83Smrg ;; 40641016ad83Smrg icpc* ) 40651016ad83Smrg # Intel C++, used to be incompatible with GCC. 40661016ad83Smrg # ICC 10 doesn't accept -KPIC any more. 40671016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40681016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 40691016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 40701016ad83Smrg ;; 40711016ad83Smrg pgCC* | pgcpp*) 40721016ad83Smrg # Portland Group C++ compiler 40731016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40741016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 40751016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40761016ad83Smrg ;; 40771016ad83Smrg cxx*) 40781016ad83Smrg # Compaq C++ 40791016ad83Smrg # Make sure the PIC flag is empty. It appears that all Alpha 40801016ad83Smrg # Linux and Compaq Tru64 Unix objects are PIC. 40811016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 40821016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 40831016ad83Smrg ;; 40841016ad83Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 40851016ad83Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 40861016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40871016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 40881016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 40891016ad83Smrg ;; 40901016ad83Smrg *) 40911016ad83Smrg case `$CC -V 2>&1 | sed 5q` in 40921016ad83Smrg *Sun\ C*) 40931016ad83Smrg # Sun C++ 5.9 40941016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40951016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40961016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 40971016ad83Smrg ;; 40981016ad83Smrg esac 40991016ad83Smrg ;; 41001016ad83Smrg esac 41011016ad83Smrg ;; 41021016ad83Smrg lynxos*) 41031016ad83Smrg ;; 41041016ad83Smrg m88k*) 41051016ad83Smrg ;; 41061016ad83Smrg mvs*) 41071016ad83Smrg case $cc_basename in 41081016ad83Smrg cxx*) 41091016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 41101016ad83Smrg ;; 41111016ad83Smrg *) 41121016ad83Smrg ;; 41131016ad83Smrg esac 41141016ad83Smrg ;; 41151016ad83Smrg netbsd* | netbsdelf*-gnu) 41161016ad83Smrg ;; 41171016ad83Smrg *qnx* | *nto*) 41181016ad83Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 41191016ad83Smrg # it will coredump. 41201016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 41211016ad83Smrg ;; 41221016ad83Smrg osf3* | osf4* | osf5*) 41231016ad83Smrg case $cc_basename in 41241016ad83Smrg KCC*) 41251016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 41261016ad83Smrg ;; 41271016ad83Smrg RCC*) 41281016ad83Smrg # Rational C++ 2.4.1 41291016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 41301016ad83Smrg ;; 41311016ad83Smrg cxx*) 41321016ad83Smrg # Digital/Compaq C++ 41331016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 41341016ad83Smrg # Make sure the PIC flag is empty. It appears that all Alpha 41351016ad83Smrg # Linux and Compaq Tru64 Unix objects are PIC. 41361016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 41371016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 41381016ad83Smrg ;; 41391016ad83Smrg *) 41401016ad83Smrg ;; 41411016ad83Smrg esac 41421016ad83Smrg ;; 41431016ad83Smrg psos*) 41441016ad83Smrg ;; 41451016ad83Smrg solaris*) 41461016ad83Smrg case $cc_basename in 41471016ad83Smrg CC* | sunCC*) 41481016ad83Smrg # Sun C++ 4.2, 5.x and Centerline C++ 41491016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41501016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41511016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 41521016ad83Smrg ;; 41531016ad83Smrg gcx*) 41541016ad83Smrg # Green Hills C++ Compiler 41551016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 41561016ad83Smrg ;; 41571016ad83Smrg *) 41581016ad83Smrg ;; 41591016ad83Smrg esac 41601016ad83Smrg ;; 41611016ad83Smrg sunos4*) 41621016ad83Smrg case $cc_basename in 41631016ad83Smrg CC*) 41641016ad83Smrg # Sun C++ 4.x 41651016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 41661016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41671016ad83Smrg ;; 41681016ad83Smrg lcc*) 41691016ad83Smrg # Lucid 41701016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 41711016ad83Smrg ;; 41721016ad83Smrg *) 41731016ad83Smrg ;; 41741016ad83Smrg esac 41751016ad83Smrg ;; 41761016ad83Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 41771016ad83Smrg case $cc_basename in 41781016ad83Smrg CC*) 41791016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 41801016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41811016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41821016ad83Smrg ;; 41831016ad83Smrg esac 41841016ad83Smrg ;; 41851016ad83Smrg tandem*) 41861016ad83Smrg case $cc_basename in 41871016ad83Smrg NCC*) 41881016ad83Smrg # NonStop-UX NCC 3.20 41891016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41901016ad83Smrg ;; 41911016ad83Smrg *) 41921016ad83Smrg ;; 41931016ad83Smrg esac 41941016ad83Smrg ;; 41951016ad83Smrg vxworks*) 41961016ad83Smrg ;; 41971016ad83Smrg *) 41981016ad83Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 41991016ad83Smrg ;; 42001016ad83Smrg esac 42011016ad83Smrg fi 42021016ad83Smrg], 42031016ad83Smrg[ 42041016ad83Smrg if test "$GCC" = yes; then 42051016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 42061016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 42071016ad83Smrg 42081016ad83Smrg case $host_os in 42091016ad83Smrg aix*) 42101016ad83Smrg # All AIX code is PIC. 42111016ad83Smrg if test "$host_cpu" = ia64; then 42121016ad83Smrg # AIX 5 now supports IA64 processor 42131016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 42141016ad83Smrg fi 42151016ad83Smrg ;; 42161016ad83Smrg 42171016ad83Smrg amigaos*) 42181016ad83Smrg case $host_cpu in 42191016ad83Smrg powerpc) 42201016ad83Smrg # see comment about AmigaOS4 .so support 42211016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42221016ad83Smrg ;; 42231016ad83Smrg m68k) 42241016ad83Smrg # FIXME: we need at least 68020 code to build shared libraries, but 42251016ad83Smrg # adding the `-m68020' flag to GCC prevents building anything better, 42261016ad83Smrg # like `-m68040'. 42271016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 42281016ad83Smrg ;; 42291016ad83Smrg esac 42301016ad83Smrg ;; 42311016ad83Smrg 42321016ad83Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 42331016ad83Smrg # PIC is the default for these OSes. 42341016ad83Smrg ;; 42351016ad83Smrg 42361016ad83Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 42371016ad83Smrg # This hack is so that the source file can tell whether it is being 42381016ad83Smrg # built for inclusion in a dll (and should export symbols for example). 42391016ad83Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 42401016ad83Smrg # (--disable-auto-import) libraries 42411016ad83Smrg m4_if([$1], [GCJ], [], 42421016ad83Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 42431016ad83Smrg ;; 42441016ad83Smrg 42451016ad83Smrg darwin* | rhapsody*) 42461016ad83Smrg # PIC is the default on this platform 42471016ad83Smrg # Common symbols not allowed in MH_DYLIB files 42481016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 42491016ad83Smrg ;; 42501016ad83Smrg 42511016ad83Smrg haiku*) 42521016ad83Smrg # PIC is the default for Haiku. 42531016ad83Smrg # The "-static" flag exists, but is broken. 42541016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 42551016ad83Smrg ;; 42561016ad83Smrg 42571016ad83Smrg hpux*) 42581016ad83Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 42591016ad83Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 42601016ad83Smrg # sets the default TLS model and affects inlining. 42611016ad83Smrg case $host_cpu in 42621016ad83Smrg hppa*64*) 42631016ad83Smrg # +Z the default 42641016ad83Smrg ;; 42651016ad83Smrg *) 42661016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42671016ad83Smrg ;; 42681016ad83Smrg esac 42691016ad83Smrg ;; 42701016ad83Smrg 42711016ad83Smrg interix[[3-9]]*) 42721016ad83Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 42731016ad83Smrg # Instead, we relocate shared libraries at runtime. 42741016ad83Smrg ;; 42751016ad83Smrg 42761016ad83Smrg msdosdjgpp*) 42771016ad83Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 42781016ad83Smrg # on systems that don't support them. 42791016ad83Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 42801016ad83Smrg enable_shared=no 42811016ad83Smrg ;; 42821016ad83Smrg 42831016ad83Smrg *nto* | *qnx*) 42841016ad83Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 42851016ad83Smrg # it will coredump. 42861016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 42871016ad83Smrg ;; 42881016ad83Smrg 42891016ad83Smrg sysv4*MP*) 42901016ad83Smrg if test -d /usr/nec; then 42911016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 42921016ad83Smrg fi 42931016ad83Smrg ;; 42941016ad83Smrg 42951016ad83Smrg *) 42961016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42971016ad83Smrg ;; 42981016ad83Smrg esac 42991016ad83Smrg 43001016ad83Smrg case $cc_basename in 43011016ad83Smrg nvcc*) # Cuda Compiler Driver 2.2 43021016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 43031016ad83Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 43041016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 43051016ad83Smrg fi 43061016ad83Smrg ;; 43071016ad83Smrg esac 43081016ad83Smrg else 43091016ad83Smrg # PORTME Check for flag to pass linker flags through the system compiler. 43101016ad83Smrg case $host_os in 43111016ad83Smrg aix*) 43121016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43131016ad83Smrg if test "$host_cpu" = ia64; then 43141016ad83Smrg # AIX 5 now supports IA64 processor 43151016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43161016ad83Smrg else 43171016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 43181016ad83Smrg fi 43191016ad83Smrg ;; 43201016ad83Smrg 43211016ad83Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 43221016ad83Smrg # This hack is so that the source file can tell whether it is being 43231016ad83Smrg # built for inclusion in a dll (and should export symbols for example). 43241016ad83Smrg m4_if([$1], [GCJ], [], 43251016ad83Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 43261016ad83Smrg ;; 43271016ad83Smrg 43281016ad83Smrg hpux9* | hpux10* | hpux11*) 43291016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43301016ad83Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 43311016ad83Smrg # not for PA HP-UX. 43321016ad83Smrg case $host_cpu in 43331016ad83Smrg hppa*64*|ia64*) 43341016ad83Smrg # +Z the default 43351016ad83Smrg ;; 43361016ad83Smrg *) 43371016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 43381016ad83Smrg ;; 43391016ad83Smrg esac 43401016ad83Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 43411016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 43421016ad83Smrg ;; 43431016ad83Smrg 43441016ad83Smrg irix5* | irix6* | nonstopux*) 43451016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43461016ad83Smrg # PIC (with -KPIC) is the default. 43471016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 43481016ad83Smrg ;; 43491016ad83Smrg 43501016ad83Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 43511016ad83Smrg case $cc_basename in 43521016ad83Smrg # old Intel for x86_64 which still supported -KPIC. 43531016ad83Smrg ecc*) 43541016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43551016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 43561016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 43571016ad83Smrg ;; 43581016ad83Smrg # icc used to be incompatible with GCC. 43591016ad83Smrg # ICC 10 doesn't accept -KPIC any more. 43601016ad83Smrg icc* | ifort*) 43611016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43621016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43631016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 43641016ad83Smrg ;; 43651016ad83Smrg # Lahey Fortran 8.1. 43661016ad83Smrg lf95*) 43671016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43681016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 43691016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 43701016ad83Smrg ;; 43711016ad83Smrg nagfor*) 43721016ad83Smrg # NAG Fortran compiler 43731016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 43741016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 43751016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43761016ad83Smrg ;; 43771016ad83Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 43781016ad83Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 43791016ad83Smrg # which looks to be a dead project) 43801016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43811016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 43821016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43831016ad83Smrg ;; 43841016ad83Smrg ccc*) 43851016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43861016ad83Smrg # All Alpha code is PIC. 43871016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 43881016ad83Smrg ;; 43891016ad83Smrg xl* | bgxl* | bgf* | mpixl*) 43901016ad83Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 43911016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43921016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 43931016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 43941016ad83Smrg ;; 43951016ad83Smrg *) 43961016ad83Smrg case `$CC -V 2>&1 | sed 5q` in 43971016ad83Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 43981016ad83Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 43991016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44001016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44011016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 44021016ad83Smrg ;; 44031016ad83Smrg *Sun\ F* | *Sun*Fortran*) 44041016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44051016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44061016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44071016ad83Smrg ;; 44081016ad83Smrg *Sun\ C*) 44091016ad83Smrg # Sun C 5.9 44101016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44111016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44121016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44131016ad83Smrg ;; 44141016ad83Smrg *Intel*\ [[CF]]*Compiler*) 44151016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44161016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 44171016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 44181016ad83Smrg ;; 44191016ad83Smrg *Portland\ Group*) 44201016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44211016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 44221016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44231016ad83Smrg ;; 44241016ad83Smrg esac 44251016ad83Smrg ;; 44261016ad83Smrg esac 44271016ad83Smrg ;; 44281016ad83Smrg 44291016ad83Smrg newsos6) 44301016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44311016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44321016ad83Smrg ;; 44331016ad83Smrg 44341016ad83Smrg *nto* | *qnx*) 44351016ad83Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 44361016ad83Smrg # it will coredump. 44371016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 44381016ad83Smrg ;; 44391016ad83Smrg 44401016ad83Smrg osf3* | osf4* | osf5*) 44411016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44421016ad83Smrg # All OSF/1 code is PIC. 44431016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44441016ad83Smrg ;; 44451016ad83Smrg 44461016ad83Smrg rdos*) 44471016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44481016ad83Smrg ;; 44491016ad83Smrg 44501016ad83Smrg solaris*) 44511016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44521016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44531016ad83Smrg case $cc_basename in 44541016ad83Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 44551016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 44561016ad83Smrg *) 44571016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 44581016ad83Smrg esac 44591016ad83Smrg ;; 44601016ad83Smrg 44611016ad83Smrg sunos4*) 44621016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44631016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 44641016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44651016ad83Smrg ;; 44661016ad83Smrg 44671016ad83Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 44681016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44691016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44701016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44711016ad83Smrg ;; 44721016ad83Smrg 44731016ad83Smrg sysv4*MP*) 44741016ad83Smrg if test -d /usr/nec ;then 44751016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 44761016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44771016ad83Smrg fi 44781016ad83Smrg ;; 44791016ad83Smrg 44801016ad83Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 44811016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44821016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44831016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44841016ad83Smrg ;; 44851016ad83Smrg 44861016ad83Smrg unicos*) 44871016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44881016ad83Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 44891016ad83Smrg ;; 44901016ad83Smrg 44911016ad83Smrg uts4*) 44921016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 44931016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44941016ad83Smrg ;; 44951016ad83Smrg 44961016ad83Smrg *) 44971016ad83Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 44981016ad83Smrg ;; 44991016ad83Smrg esac 45001016ad83Smrg fi 45011016ad83Smrg]) 45021016ad83Smrgcase $host_os in 45031016ad83Smrg # For platforms which do not support PIC, -DPIC is meaningless: 45041016ad83Smrg *djgpp*) 45051016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 45061016ad83Smrg ;; 45071016ad83Smrg *) 45081016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 45091016ad83Smrg ;; 45101016ad83Smrgesac 45111016ad83Smrg 45121016ad83SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 45131016ad83Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 45141016ad83Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 45151016ad83Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 45161016ad83Smrg 45171016ad83Smrg# 45181016ad83Smrg# Check to make sure the PIC flag actually works. 45191016ad83Smrg# 45201016ad83Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 45211016ad83Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 45221016ad83Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 45231016ad83Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 45241016ad83Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 45251016ad83Smrg "" | " "*) ;; 45261016ad83Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 45271016ad83Smrg esac], 45281016ad83Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 45291016ad83Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 45301016ad83Smrgfi 45311016ad83Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 45321016ad83Smrg [Additional compiler flags for building library objects]) 45331016ad83Smrg 45341016ad83Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 45351016ad83Smrg [How to pass a linker flag through the compiler]) 45361016ad83Smrg# 45371016ad83Smrg# Check to make sure the static flag actually works. 45381016ad83Smrg# 45391016ad83Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 45401016ad83Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 45411016ad83Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 45421016ad83Smrg $lt_tmp_static_flag, 45431016ad83Smrg [], 45441016ad83Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 45451016ad83Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 45461016ad83Smrg [Compiler flag to prevent dynamic linking]) 45471016ad83Smrg])# _LT_COMPILER_PIC 45481016ad83Smrg 45491016ad83Smrg 45501016ad83Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 45511016ad83Smrg# ---------------------------- 45521016ad83Smrg# See if the linker supports building shared libraries. 45531016ad83Smrgm4_defun([_LT_LINKER_SHLIBS], 45541016ad83Smrg[AC_REQUIRE([LT_PATH_LD])dnl 45551016ad83SmrgAC_REQUIRE([LT_PATH_NM])dnl 45561016ad83Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 45571016ad83Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 45581016ad83Smrgm4_require([_LT_DECL_EGREP])dnl 45591016ad83Smrgm4_require([_LT_DECL_SED])dnl 45601016ad83Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 45611016ad83Smrgm4_require([_LT_TAG_COMPILER])dnl 45621016ad83SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 45631016ad83Smrgm4_if([$1], [CXX], [ 45641016ad83Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 45651016ad83Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 45661016ad83Smrg case $host_os in 45671016ad83Smrg aix[[4-9]]*) 45681016ad83Smrg # If we're using GNU nm, then we don't want the "-C" option. 45691016ad83Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 45701016ad83Smrg # Also, AIX nm treats weak defined symbols like other global defined 45711016ad83Smrg # symbols, whereas GNU nm marks them as "W". 45721016ad83Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 45731016ad83Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 45741016ad83Smrg else 45751016ad83Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 45761016ad83Smrg fi 45771016ad83Smrg ;; 45781016ad83Smrg pw32*) 45791016ad83Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 45801016ad83Smrg ;; 45811016ad83Smrg cygwin* | mingw* | cegcc*) 45821016ad83Smrg case $cc_basename in 45831016ad83Smrg cl*) 45841016ad83Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 45851016ad83Smrg ;; 45861016ad83Smrg *) 45871016ad83Smrg _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' 45881016ad83Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 45891016ad83Smrg ;; 45901016ad83Smrg esac 45911016ad83Smrg ;; 45921016ad83Smrg linux* | k*bsd*-gnu | gnu*) 45931016ad83Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 45941016ad83Smrg ;; 45951016ad83Smrg *) 45961016ad83Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 45971016ad83Smrg ;; 45981016ad83Smrg esac 45991016ad83Smrg], [ 46001016ad83Smrg runpath_var= 46011016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 46021016ad83Smrg _LT_TAGVAR(always_export_symbols, $1)=no 46031016ad83Smrg _LT_TAGVAR(archive_cmds, $1)= 46041016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 46051016ad83Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 46061016ad83Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 46071016ad83Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 46081016ad83Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 46091016ad83Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 46101016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=no 46111016ad83Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 46121016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 46131016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 46141016ad83Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 46151016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 46161016ad83Smrg _LT_TAGVAR(inherit_rpath, $1)=no 46171016ad83Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 46181016ad83Smrg _LT_TAGVAR(module_cmds, $1)= 46191016ad83Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 46201016ad83Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 46211016ad83Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 46221016ad83Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 46231016ad83Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 46241016ad83Smrg # include_expsyms should be a list of space-separated symbols to be *always* 46251016ad83Smrg # included in the symbol list 46261016ad83Smrg _LT_TAGVAR(include_expsyms, $1)= 46271016ad83Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 46281016ad83Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 46291016ad83Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 46301016ad83Smrg # as well as any symbol that contains `d'. 46311016ad83Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 46321016ad83Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 46331016ad83Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 46341016ad83Smrg # the symbol is explicitly referenced. Since portable code cannot 46351016ad83Smrg # rely on this symbol name, it's probably fine to never include it in 46361016ad83Smrg # preloaded symbol tables. 46371016ad83Smrg # Exclude shared library initialization/finalization symbols. 46381016ad83Smrgdnl Note also adjust exclude_expsyms for C++ above. 46391016ad83Smrg extract_expsyms_cmds= 46401016ad83Smrg 46411016ad83Smrg case $host_os in 46421016ad83Smrg cygwin* | mingw* | pw32* | cegcc*) 46431016ad83Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 46441016ad83Smrg # When not using gcc, we currently assume that we are using 46451016ad83Smrg # Microsoft Visual C++. 46461016ad83Smrg if test "$GCC" != yes; then 46471016ad83Smrg with_gnu_ld=no 46481016ad83Smrg fi 46491016ad83Smrg ;; 46501016ad83Smrg interix*) 46511016ad83Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 46521016ad83Smrg with_gnu_ld=yes 46531016ad83Smrg ;; 46541016ad83Smrg openbsd*) 46551016ad83Smrg with_gnu_ld=no 46561016ad83Smrg ;; 46571016ad83Smrg linux* | k*bsd*-gnu | gnu*) 46581016ad83Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 46591016ad83Smrg ;; 46601016ad83Smrg esac 46611016ad83Smrg 46621016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 46631016ad83Smrg 46641016ad83Smrg # On some targets, GNU ld is compatible enough with the native linker 46651016ad83Smrg # that we're better off using the native interface for both. 46661016ad83Smrg lt_use_gnu_ld_interface=no 46671016ad83Smrg if test "$with_gnu_ld" = yes; then 46681016ad83Smrg case $host_os in 46691016ad83Smrg aix*) 46701016ad83Smrg # The AIX port of GNU ld has always aspired to compatibility 46711016ad83Smrg # with the native linker. However, as the warning in the GNU ld 46721016ad83Smrg # block says, versions before 2.19.5* couldn't really create working 46731016ad83Smrg # shared libraries, regardless of the interface used. 46741016ad83Smrg case `$LD -v 2>&1` in 46751016ad83Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 46761016ad83Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 46771016ad83Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 46781016ad83Smrg *) 46791016ad83Smrg lt_use_gnu_ld_interface=yes 46801016ad83Smrg ;; 46811016ad83Smrg esac 46821016ad83Smrg ;; 46831016ad83Smrg *) 46841016ad83Smrg lt_use_gnu_ld_interface=yes 46851016ad83Smrg ;; 46861016ad83Smrg esac 46871016ad83Smrg fi 46881016ad83Smrg 46891016ad83Smrg if test "$lt_use_gnu_ld_interface" = yes; then 46901016ad83Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 46911016ad83Smrg wlarc='${wl}' 46921016ad83Smrg 46931016ad83Smrg # Set some defaults for GNU ld with shared library support. These 46941016ad83Smrg # are reset later if shared libraries are not supported. Putting them 46951016ad83Smrg # here allows them to be overridden if necessary. 46961016ad83Smrg runpath_var=LD_RUN_PATH 46971016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 46981016ad83Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 46991016ad83Smrg # ancient GNU ld didn't support --whole-archive et. al. 47001016ad83Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 47011016ad83Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 47021016ad83Smrg else 47031016ad83Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 47041016ad83Smrg fi 47051016ad83Smrg supports_anon_versioning=no 47061016ad83Smrg case `$LD -v 2>&1` in 47071016ad83Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 47081016ad83Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 47091016ad83Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 47101016ad83Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 47111016ad83Smrg *\ 2.11.*) ;; # other 2.11 versions 47121016ad83Smrg *) supports_anon_versioning=yes ;; 47131016ad83Smrg esac 47141016ad83Smrg 47151016ad83Smrg # See if GNU ld supports shared libraries. 47161016ad83Smrg case $host_os in 47171016ad83Smrg aix[[3-9]]*) 47181016ad83Smrg # On AIX/PPC, the GNU linker is very broken 47191016ad83Smrg if test "$host_cpu" != ia64; then 47201016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 47211016ad83Smrg cat <<_LT_EOF 1>&2 47221016ad83Smrg 47231016ad83Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 47241016ad83Smrg*** to be unable to reliably create shared libraries on AIX. 47251016ad83Smrg*** Therefore, libtool is disabling shared libraries support. If you 47261016ad83Smrg*** really care for shared libraries, you may want to install binutils 47271016ad83Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 47281016ad83Smrg*** You will then need to restart the configuration process. 47291016ad83Smrg 47301016ad83Smrg_LT_EOF 47311016ad83Smrg fi 47321016ad83Smrg ;; 47331016ad83Smrg 47341016ad83Smrg amigaos*) 47351016ad83Smrg case $host_cpu in 47361016ad83Smrg powerpc) 47371016ad83Smrg # see comment about AmigaOS4 .so support 47381016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 47391016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 47401016ad83Smrg ;; 47411016ad83Smrg m68k) 47421016ad83Smrg _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)' 47431016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 47441016ad83Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 47451016ad83Smrg ;; 47461016ad83Smrg esac 47471016ad83Smrg ;; 47481016ad83Smrg 47491016ad83Smrg beos*) 47501016ad83Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 47511016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 47521016ad83Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 47531016ad83Smrg # support --undefined. This deserves some investigation. FIXME 47541016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 47551016ad83Smrg else 47561016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 47571016ad83Smrg fi 47581016ad83Smrg ;; 47591016ad83Smrg 47601016ad83Smrg cygwin* | mingw* | pw32* | cegcc*) 47611016ad83Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 47621016ad83Smrg # as there is no search path for DLLs. 47631016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 47641016ad83Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 47651016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 47661016ad83Smrg _LT_TAGVAR(always_export_symbols, $1)=no 47671016ad83Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 47681016ad83Smrg _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' 47691016ad83Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 47701016ad83Smrg 47711016ad83Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 47721016ad83Smrg _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' 47731016ad83Smrg # If the export-symbols file already is a .def file (1st line 47741016ad83Smrg # is EXPORTS), use it as is; otherwise, prepend... 47751016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 47761016ad83Smrg cp $export_symbols $output_objdir/$soname.def; 47771016ad83Smrg else 47781016ad83Smrg echo EXPORTS > $output_objdir/$soname.def; 47791016ad83Smrg cat $export_symbols >> $output_objdir/$soname.def; 47801016ad83Smrg fi~ 47811016ad83Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 47821016ad83Smrg else 47831016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 47841016ad83Smrg fi 47851016ad83Smrg ;; 47861016ad83Smrg 47871016ad83Smrg haiku*) 47881016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 47891016ad83Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 47901016ad83Smrg ;; 47911016ad83Smrg 47921016ad83Smrg interix[[3-9]]*) 47931016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=no 47941016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 47951016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 47961016ad83Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 47971016ad83Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 47981016ad83Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 47991016ad83Smrg # default) and relocated if they conflict, which is a slow very memory 48001016ad83Smrg # consuming and fragmenting process. To avoid this, we pick a random, 48011016ad83Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 48021016ad83Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 48031016ad83Smrg _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' 48041016ad83Smrg _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' 48051016ad83Smrg ;; 48061016ad83Smrg 48071016ad83Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 48081016ad83Smrg tmp_diet=no 48091016ad83Smrg if test "$host_os" = linux-dietlibc; then 48101016ad83Smrg case $cc_basename in 48111016ad83Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 48121016ad83Smrg esac 48131016ad83Smrg fi 48141016ad83Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 48151016ad83Smrg && test "$tmp_diet" = no 48161016ad83Smrg then 48171016ad83Smrg tmp_addflag=' $pic_flag' 48181016ad83Smrg tmp_sharedflag='-shared' 48191016ad83Smrg case $cc_basename,$host_cpu in 48201016ad83Smrg pgcc*) # Portland Group C compiler 48211016ad83Smrg _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' 48221016ad83Smrg tmp_addflag=' $pic_flag' 48231016ad83Smrg ;; 48241016ad83Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 48251016ad83Smrg # Portland Group f77 and f90 compilers 48261016ad83Smrg _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' 48271016ad83Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 48281016ad83Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 48291016ad83Smrg tmp_addflag=' -i_dynamic' ;; 48301016ad83Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 48311016ad83Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 48321016ad83Smrg ifc* | ifort*) # Intel Fortran compiler 48331016ad83Smrg tmp_addflag=' -nofor_main' ;; 48341016ad83Smrg lf95*) # Lahey Fortran 8.1 48351016ad83Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 48361016ad83Smrg tmp_sharedflag='--shared' ;; 48371016ad83Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 48381016ad83Smrg tmp_sharedflag='-qmkshrobj' 48391016ad83Smrg tmp_addflag= ;; 48401016ad83Smrg nvcc*) # Cuda Compiler Driver 2.2 48411016ad83Smrg _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' 48421016ad83Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 48431016ad83Smrg ;; 48441016ad83Smrg esac 48451016ad83Smrg case `$CC -V 2>&1 | sed 5q` in 48461016ad83Smrg *Sun\ C*) # Sun C 5.9 48471016ad83Smrg _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' 48481016ad83Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 48491016ad83Smrg tmp_sharedflag='-G' ;; 48501016ad83Smrg *Sun\ F*) # Sun Fortran 8.3 48511016ad83Smrg tmp_sharedflag='-G' ;; 48521016ad83Smrg esac 48531016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 48541016ad83Smrg 48551016ad83Smrg if test "x$supports_anon_versioning" = xyes; then 48561016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 48571016ad83Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 48581016ad83Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 48591016ad83Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 48601016ad83Smrg fi 48611016ad83Smrg 48621016ad83Smrg case $cc_basename in 48631016ad83Smrg xlf* | bgf* | bgxlf* | mpixlf*) 48641016ad83Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 48651016ad83Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 48661016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 48671016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 48681016ad83Smrg if test "x$supports_anon_versioning" = xyes; then 48691016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 48701016ad83Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 48711016ad83Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 48721016ad83Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 48731016ad83Smrg fi 48741016ad83Smrg ;; 48751016ad83Smrg esac 48761016ad83Smrg else 48771016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 48781016ad83Smrg fi 48791016ad83Smrg ;; 48801016ad83Smrg 48811016ad83Smrg netbsd* | netbsdelf*-gnu) 48821016ad83Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 48831016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 48841016ad83Smrg wlarc= 48851016ad83Smrg else 48861016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 48871016ad83Smrg _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' 48881016ad83Smrg fi 48891016ad83Smrg ;; 48901016ad83Smrg 48911016ad83Smrg solaris*) 48921016ad83Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 48931016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 48941016ad83Smrg cat <<_LT_EOF 1>&2 48951016ad83Smrg 48961016ad83Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 48971016ad83Smrg*** create shared libraries on Solaris systems. Therefore, libtool 48981016ad83Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 48991016ad83Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 49001016ad83Smrg*** your PATH or compiler configuration so that the native linker is 49011016ad83Smrg*** used, and then restart. 49021016ad83Smrg 49031016ad83Smrg_LT_EOF 49041016ad83Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 49051016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 49061016ad83Smrg _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' 49071016ad83Smrg else 49081016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 49091016ad83Smrg fi 49101016ad83Smrg ;; 49111016ad83Smrg 49121016ad83Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 49131016ad83Smrg case `$LD -v 2>&1` in 49141016ad83Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 49151016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 49161016ad83Smrg cat <<_LT_EOF 1>&2 49171016ad83Smrg 49181016ad83Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 49191016ad83Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 49201016ad83Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 49211016ad83Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 49221016ad83Smrg*** your PATH or compiler configuration so that the native linker is 49231016ad83Smrg*** used, and then restart. 49241016ad83Smrg 49251016ad83Smrg_LT_EOF 49261016ad83Smrg ;; 49271016ad83Smrg *) 49281016ad83Smrg # For security reasons, it is highly recommended that you always 49291016ad83Smrg # use absolute paths for naming shared libraries, and exclude the 49301016ad83Smrg # DT_RUNPATH tag from executables and libraries. But doing so 49311016ad83Smrg # requires that you compile everything twice, which is a pain. 49321016ad83Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 49331016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 49341016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 49351016ad83Smrg _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' 49361016ad83Smrg else 49371016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 49381016ad83Smrg fi 49391016ad83Smrg ;; 49401016ad83Smrg esac 49411016ad83Smrg ;; 49421016ad83Smrg 49431016ad83Smrg sunos4*) 49441016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 49451016ad83Smrg wlarc= 49461016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 49471016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 49481016ad83Smrg ;; 49491016ad83Smrg 49501016ad83Smrg *) 49511016ad83Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 49521016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 49531016ad83Smrg _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' 49541016ad83Smrg else 49551016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 49561016ad83Smrg fi 49571016ad83Smrg ;; 49581016ad83Smrg esac 49591016ad83Smrg 49601016ad83Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 49611016ad83Smrg runpath_var= 49621016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 49631016ad83Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 49641016ad83Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 49651016ad83Smrg fi 49661016ad83Smrg else 49671016ad83Smrg # PORTME fill in a description of your system's linker (not GNU ld) 49681016ad83Smrg case $host_os in 49691016ad83Smrg aix3*) 49701016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 49711016ad83Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 49721016ad83Smrg _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' 49731016ad83Smrg # Note: this linker hardcodes the directories in LIBPATH if there 49741016ad83Smrg # are no directories specified by -L. 49751016ad83Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 49761016ad83Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 49771016ad83Smrg # Neither direct hardcoding nor static linking is supported with a 49781016ad83Smrg # broken collect2. 49791016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 49801016ad83Smrg fi 49811016ad83Smrg ;; 49821016ad83Smrg 49831016ad83Smrg aix[[4-9]]*) 49841016ad83Smrg if test "$host_cpu" = ia64; then 49851016ad83Smrg # On IA64, the linker does run time linking by default, so we don't 49861016ad83Smrg # have to do anything special. 49871016ad83Smrg aix_use_runtimelinking=no 49881016ad83Smrg exp_sym_flag='-Bexport' 49891016ad83Smrg no_entry_flag="" 49901016ad83Smrg else 49911016ad83Smrg # If we're using GNU nm, then we don't want the "-C" option. 49921016ad83Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 49931016ad83Smrg # Also, AIX nm treats weak defined symbols like other global 49941016ad83Smrg # defined symbols, whereas GNU nm marks them as "W". 49951016ad83Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 49961016ad83Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 49971016ad83Smrg else 49981016ad83Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 49991016ad83Smrg fi 50001016ad83Smrg aix_use_runtimelinking=no 50011016ad83Smrg 50021016ad83Smrg # Test if we are trying to use run time linking or normal 50031016ad83Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 50041016ad83Smrg # need to do runtime linking. 50051016ad83Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 50061016ad83Smrg for ld_flag in $LDFLAGS; do 50071016ad83Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 50081016ad83Smrg aix_use_runtimelinking=yes 50091016ad83Smrg break 50101016ad83Smrg fi 50111016ad83Smrg done 50121016ad83Smrg ;; 50131016ad83Smrg esac 50141016ad83Smrg 50151016ad83Smrg exp_sym_flag='-bexport' 50161016ad83Smrg no_entry_flag='-bnoentry' 50171016ad83Smrg fi 50181016ad83Smrg 50191016ad83Smrg # When large executables or shared objects are built, AIX ld can 50201016ad83Smrg # have problems creating the table of contents. If linking a library 50211016ad83Smrg # or program results in "error TOC overflow" add -mminimal-toc to 50221016ad83Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 50231016ad83Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 50241016ad83Smrg 50251016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='' 50261016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 50271016ad83Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 50281016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 50291016ad83Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 50301016ad83Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 50311016ad83Smrg 50321016ad83Smrg if test "$GCC" = yes; then 50331016ad83Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 50341016ad83Smrg # We only want to do this on AIX 4.2 and lower, the check 50351016ad83Smrg # below for broken collect2 doesn't work under 4.3+ 50361016ad83Smrg collect2name=`${CC} -print-prog-name=collect2` 50371016ad83Smrg if test -f "$collect2name" && 50381016ad83Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 50391016ad83Smrg then 50401016ad83Smrg # We have reworked collect2 50411016ad83Smrg : 50421016ad83Smrg else 50431016ad83Smrg # We have old collect2 50441016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 50451016ad83Smrg # It fails to find uninstalled libraries when the uninstalled 50461016ad83Smrg # path is not listed in the libpath. Setting hardcode_minus_L 50471016ad83Smrg # to unsupported forces relinking 50481016ad83Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 50491016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 50501016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 50511016ad83Smrg fi 50521016ad83Smrg ;; 50531016ad83Smrg esac 50541016ad83Smrg shared_flag='-shared' 50551016ad83Smrg if test "$aix_use_runtimelinking" = yes; then 50561016ad83Smrg shared_flag="$shared_flag "'${wl}-G' 50571016ad83Smrg fi 50581016ad83Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 50591016ad83Smrg else 50601016ad83Smrg # not using gcc 50611016ad83Smrg if test "$host_cpu" = ia64; then 50621016ad83Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 50631016ad83Smrg # chokes on -Wl,-G. The following line is correct: 50641016ad83Smrg shared_flag='-G' 50651016ad83Smrg else 50661016ad83Smrg if test "$aix_use_runtimelinking" = yes; then 50671016ad83Smrg shared_flag='${wl}-G' 50681016ad83Smrg else 50691016ad83Smrg shared_flag='${wl}-bM:SRE' 50701016ad83Smrg fi 50711016ad83Smrg fi 50721016ad83Smrg fi 50731016ad83Smrg 50741016ad83Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 50751016ad83Smrg # It seems that -bexpall does not export symbols beginning with 50761016ad83Smrg # underscore (_), so it is better to generate a list of symbols to export. 50771016ad83Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 50781016ad83Smrg if test "$aix_use_runtimelinking" = yes; then 50791016ad83Smrg # Warning - without using the other runtime loading flags (-brtl), 50801016ad83Smrg # -berok will link without error, but may produce a broken library. 50811016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 50821016ad83Smrg # Determine the default libpath from the value encoded in an 50831016ad83Smrg # empty executable. 50841016ad83Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 50851016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 50861016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 50871016ad83Smrg else 50881016ad83Smrg if test "$host_cpu" = ia64; then 50891016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 50901016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 50911016ad83Smrg _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" 50921016ad83Smrg else 50931016ad83Smrg # Determine the default libpath from the value encoded in an 50941016ad83Smrg # empty executable. 50951016ad83Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 50961016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 50971016ad83Smrg # Warning - without using the other run time loading flags, 50981016ad83Smrg # -berok will link without error, but may produce a broken library. 50991016ad83Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 51001016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 51011016ad83Smrg if test "$with_gnu_ld" = yes; then 51021016ad83Smrg # We only use this code for GNU lds that support --whole-archive. 51031016ad83Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 51041016ad83Smrg else 51051016ad83Smrg # Exported symbols can be pulled into shared objects from archives 51061016ad83Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 51071016ad83Smrg fi 51081016ad83Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 51091016ad83Smrg # This is similar to how AIX traditionally builds its shared libraries. 51101016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 51111016ad83Smrg fi 51121016ad83Smrg fi 51131016ad83Smrg ;; 51141016ad83Smrg 51151016ad83Smrg amigaos*) 51161016ad83Smrg case $host_cpu in 51171016ad83Smrg powerpc) 51181016ad83Smrg # see comment about AmigaOS4 .so support 51191016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 51201016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 51211016ad83Smrg ;; 51221016ad83Smrg m68k) 51231016ad83Smrg _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)' 51241016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51251016ad83Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 51261016ad83Smrg ;; 51271016ad83Smrg esac 51281016ad83Smrg ;; 51291016ad83Smrg 51301016ad83Smrg bsdi[[45]]*) 51311016ad83Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 51321016ad83Smrg ;; 51331016ad83Smrg 51341016ad83Smrg cygwin* | mingw* | pw32* | cegcc*) 51351016ad83Smrg # When not using gcc, we currently assume that we are using 51361016ad83Smrg # Microsoft Visual C++. 51371016ad83Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 51381016ad83Smrg # no search path for DLLs. 51391016ad83Smrg case $cc_basename in 51401016ad83Smrg cl*) 51411016ad83Smrg # Native MSVC 51421016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 51431016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51441016ad83Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 51451016ad83Smrg _LT_TAGVAR(file_list_spec, $1)='@' 51461016ad83Smrg # Tell ltmain to make .lib files, not .a files. 51471016ad83Smrg libext=lib 51481016ad83Smrg # Tell ltmain to make .dll files, not .so files. 51491016ad83Smrg shrext_cmds=".dll" 51501016ad83Smrg # FIXME: Setting linknames here is a bad hack. 51511016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 51521016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 51531016ad83Smrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 51541016ad83Smrg else 51551016ad83Smrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 51561016ad83Smrg fi~ 51571016ad83Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 51581016ad83Smrg linknames=' 51591016ad83Smrg # The linker will not automatically build a static lib if we build a DLL. 51601016ad83Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 51611016ad83Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 51621016ad83Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 51631016ad83Smrg _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' 51641016ad83Smrg # Don't use ranlib 51651016ad83Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 51661016ad83Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 51671016ad83Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 51681016ad83Smrg case $lt_outputfile in 51691016ad83Smrg *.exe|*.EXE) ;; 51701016ad83Smrg *) 51711016ad83Smrg lt_outputfile="$lt_outputfile.exe" 51721016ad83Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 51731016ad83Smrg ;; 51741016ad83Smrg esac~ 51751016ad83Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 51761016ad83Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 51771016ad83Smrg $RM "$lt_outputfile.manifest"; 51781016ad83Smrg fi' 51791016ad83Smrg ;; 51801016ad83Smrg *) 51811016ad83Smrg # Assume MSVC wrapper 51821016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 51831016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51841016ad83Smrg # Tell ltmain to make .lib files, not .a files. 51851016ad83Smrg libext=lib 51861016ad83Smrg # Tell ltmain to make .dll files, not .so files. 51871016ad83Smrg shrext_cmds=".dll" 51881016ad83Smrg # FIXME: Setting linknames here is a bad hack. 51891016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 51901016ad83Smrg # The linker will automatically build a .lib file if we build a DLL. 51911016ad83Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 51921016ad83Smrg # FIXME: Should let the user specify the lib program. 51931016ad83Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 51941016ad83Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 51951016ad83Smrg ;; 51961016ad83Smrg esac 51971016ad83Smrg ;; 51981016ad83Smrg 51991016ad83Smrg darwin* | rhapsody*) 52001016ad83Smrg _LT_DARWIN_LINKER_FEATURES($1) 52011016ad83Smrg ;; 52021016ad83Smrg 52031016ad83Smrg dgux*) 52041016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 52051016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 52061016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52071016ad83Smrg ;; 52081016ad83Smrg 52091016ad83Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 52101016ad83Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 52111016ad83Smrg # does not break anything, and helps significantly (at the cost of a little 52121016ad83Smrg # extra space). 52131016ad83Smrg freebsd2.2*) 52141016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 52151016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 52161016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 52171016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52181016ad83Smrg ;; 52191016ad83Smrg 52201016ad83Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 52211016ad83Smrg freebsd2.*) 52221016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 52231016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 52241016ad83Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 52251016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52261016ad83Smrg ;; 52271016ad83Smrg 52281016ad83Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 52291016ad83Smrg freebsd* | dragonfly*) 52301016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 52311016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 52321016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 52331016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52341016ad83Smrg ;; 52351016ad83Smrg 52361016ad83Smrg hpux9*) 52371016ad83Smrg if test "$GCC" = yes; then 52381016ad83Smrg _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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 52391016ad83Smrg else 52401016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 52411016ad83Smrg fi 52421016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 52431016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 52441016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 52451016ad83Smrg 52461016ad83Smrg # hardcode_minus_L: Not really in the search PATH, 52471016ad83Smrg # but as the default location of the library. 52481016ad83Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 52491016ad83Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 52501016ad83Smrg ;; 52511016ad83Smrg 52521016ad83Smrg hpux10*) 52531016ad83Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 52541016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 52551016ad83Smrg else 52561016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 52571016ad83Smrg fi 52581016ad83Smrg if test "$with_gnu_ld" = no; then 52591016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 52601016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 52611016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 52621016ad83Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 52631016ad83Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 52641016ad83Smrg # hardcode_minus_L: Not really in the search PATH, 52651016ad83Smrg # but as the default location of the library. 52661016ad83Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 52671016ad83Smrg fi 52681016ad83Smrg ;; 52691016ad83Smrg 52701016ad83Smrg hpux11*) 52711016ad83Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 52721016ad83Smrg case $host_cpu in 52731016ad83Smrg hppa*64*) 52741016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 52751016ad83Smrg ;; 52761016ad83Smrg ia64*) 52771016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 52781016ad83Smrg ;; 52791016ad83Smrg *) 52801016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 52811016ad83Smrg ;; 52821016ad83Smrg esac 52831016ad83Smrg else 52841016ad83Smrg case $host_cpu in 52851016ad83Smrg hppa*64*) 52861016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 52871016ad83Smrg ;; 52881016ad83Smrg ia64*) 52891016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 52901016ad83Smrg ;; 52911016ad83Smrg *) 52921016ad83Smrg m4_if($1, [], [ 52931016ad83Smrg # Older versions of the 11.00 compiler do not understand -b yet 52941016ad83Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 52951016ad83Smrg _LT_LINKER_OPTION([if $CC understands -b], 52961016ad83Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 52971016ad83Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 52981016ad83Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 52991016ad83Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 53001016ad83Smrg ;; 53011016ad83Smrg esac 53021016ad83Smrg fi 53031016ad83Smrg if test "$with_gnu_ld" = no; then 53041016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 53051016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 53061016ad83Smrg 53071016ad83Smrg case $host_cpu in 53081016ad83Smrg hppa*64*|ia64*) 53091016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=no 53101016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53111016ad83Smrg ;; 53121016ad83Smrg *) 53131016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 53141016ad83Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 53151016ad83Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 53161016ad83Smrg 53171016ad83Smrg # hardcode_minus_L: Not really in the search PATH, 53181016ad83Smrg # but as the default location of the library. 53191016ad83Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 53201016ad83Smrg ;; 53211016ad83Smrg esac 53221016ad83Smrg fi 53231016ad83Smrg ;; 53241016ad83Smrg 53251016ad83Smrg irix5* | irix6* | nonstopux*) 53261016ad83Smrg if test "$GCC" = yes; then 53271016ad83Smrg _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' 53281016ad83Smrg # Try to use the -exported_symbol ld option, if it does not 53291016ad83Smrg # work, assume that -exports_file does not work either and 53301016ad83Smrg # implicitly export all symbols. 53311016ad83Smrg # This should be the same for all languages, so no per-tag cache variable. 53321016ad83Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 53331016ad83Smrg [lt_cv_irix_exported_symbol], 53341016ad83Smrg [save_LDFLAGS="$LDFLAGS" 53351016ad83Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 53361016ad83Smrg AC_LINK_IFELSE( 53371016ad83Smrg [AC_LANG_SOURCE( 53381016ad83Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 53391016ad83Smrg [C++], [[int foo (void) { return 0; }]], 53401016ad83Smrg [Fortran 77], [[ 53411016ad83Smrg subroutine foo 53421016ad83Smrg end]], 53431016ad83Smrg [Fortran], [[ 53441016ad83Smrg subroutine foo 53451016ad83Smrg end]])])], 53461016ad83Smrg [lt_cv_irix_exported_symbol=yes], 53471016ad83Smrg [lt_cv_irix_exported_symbol=no]) 53481016ad83Smrg LDFLAGS="$save_LDFLAGS"]) 53491016ad83Smrg if test "$lt_cv_irix_exported_symbol" = yes; then 53501016ad83Smrg _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' 53511016ad83Smrg fi 53521016ad83Smrg else 53531016ad83Smrg _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' 53541016ad83Smrg _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' 53551016ad83Smrg fi 53561016ad83Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 53571016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 53581016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 53591016ad83Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 53601016ad83Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 53611016ad83Smrg ;; 53621016ad83Smrg 53631016ad83Smrg netbsd* | netbsdelf*-gnu) 53641016ad83Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 53651016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 53661016ad83Smrg else 53671016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 53681016ad83Smrg fi 53691016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 53701016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 53711016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53721016ad83Smrg ;; 53731016ad83Smrg 53741016ad83Smrg newsos6) 53751016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 53761016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 53771016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 53781016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 53791016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53801016ad83Smrg ;; 53811016ad83Smrg 53821016ad83Smrg *nto* | *qnx*) 53831016ad83Smrg ;; 53841016ad83Smrg 53851016ad83Smrg openbsd*) 53861016ad83Smrg if test -f /usr/libexec/ld.so; then 53871016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 53881016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53891016ad83Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 53901016ad83Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 53911016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 53921016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 53931016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 53941016ad83Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 53951016ad83Smrg else 53961016ad83Smrg case $host_os in 53971016ad83Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 53981016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 53991016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 54001016ad83Smrg ;; 54011016ad83Smrg *) 54021016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 54031016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 54041016ad83Smrg ;; 54051016ad83Smrg esac 54061016ad83Smrg fi 54071016ad83Smrg else 54081016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 54091016ad83Smrg fi 54101016ad83Smrg ;; 54111016ad83Smrg 54121016ad83Smrg os2*) 54131016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 54141016ad83Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 54151016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 54161016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' 54171016ad83Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 54181016ad83Smrg ;; 54191016ad83Smrg 54201016ad83Smrg osf3*) 54211016ad83Smrg if test "$GCC" = yes; then 54221016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 54231016ad83Smrg _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' 54241016ad83Smrg else 54251016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 54261016ad83Smrg _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' 54271016ad83Smrg fi 54281016ad83Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 54291016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 54301016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 54311016ad83Smrg ;; 54321016ad83Smrg 54331016ad83Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 54341016ad83Smrg if test "$GCC" = yes; then 54351016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 54361016ad83Smrg _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' 54371016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 54381016ad83Smrg else 54391016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 54401016ad83Smrg _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' 54411016ad83Smrg _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~ 54421016ad83Smrg $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' 54431016ad83Smrg 54441016ad83Smrg # Both c and cxx compiler support -rpath directly 54451016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 54461016ad83Smrg fi 54471016ad83Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 54481016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 54491016ad83Smrg ;; 54501016ad83Smrg 54511016ad83Smrg solaris*) 54521016ad83Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 54531016ad83Smrg if test "$GCC" = yes; then 54541016ad83Smrg wlarc='${wl}' 54551016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 54561016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 54571016ad83Smrg $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' 54581016ad83Smrg else 54591016ad83Smrg case `$CC -V 2>&1` in 54601016ad83Smrg *"Compilers 5.0"*) 54611016ad83Smrg wlarc='' 54621016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 54631016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 54641016ad83Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 54651016ad83Smrg ;; 54661016ad83Smrg *) 54671016ad83Smrg wlarc='${wl}' 54681016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 54691016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 54701016ad83Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 54711016ad83Smrg ;; 54721016ad83Smrg esac 54731016ad83Smrg fi 54741016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 54751016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 54761016ad83Smrg case $host_os in 54771016ad83Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 54781016ad83Smrg *) 54791016ad83Smrg # The compiler driver will combine and reorder linker options, 54801016ad83Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 54811016ad83Smrg # but is careful enough not to reorder. 54821016ad83Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 54831016ad83Smrg if test "$GCC" = yes; then 54841016ad83Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 54851016ad83Smrg else 54861016ad83Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 54871016ad83Smrg fi 54881016ad83Smrg ;; 54891016ad83Smrg esac 54901016ad83Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 54911016ad83Smrg ;; 54921016ad83Smrg 54931016ad83Smrg sunos4*) 54941016ad83Smrg if test "x$host_vendor" = xsequent; then 54951016ad83Smrg # Use $CC to link under sequent, because it throws in some extra .o 54961016ad83Smrg # files that make .init and .fini sections work. 54971016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 54981016ad83Smrg else 54991016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 55001016ad83Smrg fi 55011016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 55021016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 55031016ad83Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 55041016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55051016ad83Smrg ;; 55061016ad83Smrg 55071016ad83Smrg sysv4) 55081016ad83Smrg case $host_vendor in 55091016ad83Smrg sni) 55101016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55111016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 55121016ad83Smrg ;; 55131016ad83Smrg siemens) 55141016ad83Smrg ## LD is ld it makes a PLAMLIB 55151016ad83Smrg ## CC just makes a GrossModule. 55161016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 55171016ad83Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 55181016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=no 55191016ad83Smrg ;; 55201016ad83Smrg motorola) 55211016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55221016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 55231016ad83Smrg ;; 55241016ad83Smrg esac 55251016ad83Smrg runpath_var='LD_RUN_PATH' 55261016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55271016ad83Smrg ;; 55281016ad83Smrg 55291016ad83Smrg sysv4.3*) 55301016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55311016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55321016ad83Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 55331016ad83Smrg ;; 55341016ad83Smrg 55351016ad83Smrg sysv4*MP*) 55361016ad83Smrg if test -d /usr/nec; then 55371016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55381016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55391016ad83Smrg runpath_var=LD_RUN_PATH 55401016ad83Smrg hardcode_runpath_var=yes 55411016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 55421016ad83Smrg fi 55431016ad83Smrg ;; 55441016ad83Smrg 55451016ad83Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 55461016ad83Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 55471016ad83Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 55481016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55491016ad83Smrg runpath_var='LD_RUN_PATH' 55501016ad83Smrg 55511016ad83Smrg if test "$GCC" = yes; then 55521016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55531016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55541016ad83Smrg else 55551016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55561016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55571016ad83Smrg fi 55581016ad83Smrg ;; 55591016ad83Smrg 55601016ad83Smrg sysv5* | sco3.2v5* | sco5v6*) 55611016ad83Smrg # Note: We can NOT use -z defs as we might desire, because we do not 55621016ad83Smrg # link with -lc, and that would cause any symbols used from libc to 55631016ad83Smrg # always be unresolved, which means just about no library would 55641016ad83Smrg # ever link correctly. If we're not using GNU ld we use -z text 55651016ad83Smrg # though, which does catch some bad symbols but isn't as heavy-handed 55661016ad83Smrg # as -z defs. 55671016ad83Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 55681016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 55691016ad83Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 55701016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55711016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 55721016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 55731016ad83Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 55741016ad83Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 55751016ad83Smrg runpath_var='LD_RUN_PATH' 55761016ad83Smrg 55771016ad83Smrg if test "$GCC" = yes; then 55781016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55791016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55801016ad83Smrg else 55811016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55821016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55831016ad83Smrg fi 55841016ad83Smrg ;; 55851016ad83Smrg 55861016ad83Smrg uts4*) 55871016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55881016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 55891016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55901016ad83Smrg ;; 55911016ad83Smrg 55921016ad83Smrg *) 55931016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 55941016ad83Smrg ;; 55951016ad83Smrg esac 55961016ad83Smrg 55971016ad83Smrg if test x$host_vendor = xsni; then 55981016ad83Smrg case $host in 55991016ad83Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 56001016ad83Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 56011016ad83Smrg ;; 56021016ad83Smrg esac 56031016ad83Smrg fi 56041016ad83Smrg fi 56051016ad83Smrg]) 56061016ad83SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 56071016ad83Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 56081016ad83Smrg 56091016ad83Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 56101016ad83Smrg 56111016ad83Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 56121016ad83Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 56131016ad83Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 56141016ad83Smrg [The commands to extract the exported symbol list from a shared archive]) 56151016ad83Smrg 56161016ad83Smrg# 56171016ad83Smrg# Do we need to explicitly link libc? 56181016ad83Smrg# 56191016ad83Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 56201016ad83Smrgx|xyes) 56211016ad83Smrg # Assume -lc should be added 56221016ad83Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 56231016ad83Smrg 56241016ad83Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 56251016ad83Smrg case $_LT_TAGVAR(archive_cmds, $1) in 56261016ad83Smrg *'~'*) 56271016ad83Smrg # FIXME: we may have to deal with multi-command sequences. 56281016ad83Smrg ;; 56291016ad83Smrg '$CC '*) 56301016ad83Smrg # Test whether the compiler implicitly links with -lc since on some 56311016ad83Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 56321016ad83Smrg # to ld, don't add -lc before -lgcc. 56331016ad83Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 56341016ad83Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 56351016ad83Smrg [$RM conftest* 56361016ad83Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 56371016ad83Smrg 56381016ad83Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 56391016ad83Smrg soname=conftest 56401016ad83Smrg lib=conftest 56411016ad83Smrg libobjs=conftest.$ac_objext 56421016ad83Smrg deplibs= 56431016ad83Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 56441016ad83Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 56451016ad83Smrg compiler_flags=-v 56461016ad83Smrg linker_flags=-v 56471016ad83Smrg verstring= 56481016ad83Smrg output_objdir=. 56491016ad83Smrg libname=conftest 56501016ad83Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 56511016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 56521016ad83Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 56531016ad83Smrg then 56541016ad83Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 56551016ad83Smrg else 56561016ad83Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 56571016ad83Smrg fi 56581016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 56591016ad83Smrg else 56601016ad83Smrg cat conftest.err 1>&5 56611016ad83Smrg fi 56621016ad83Smrg $RM conftest* 56631016ad83Smrg ]) 56641016ad83Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 56651016ad83Smrg ;; 56661016ad83Smrg esac 56671016ad83Smrg fi 56681016ad83Smrg ;; 56691016ad83Smrgesac 56701016ad83Smrg 56711016ad83Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 56721016ad83Smrg [Whether or not to add -lc for building shared libraries]) 56731016ad83Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 56741016ad83Smrg [enable_shared_with_static_runtimes], [0], 56751016ad83Smrg [Whether or not to disallow shared libs when runtime libs are static]) 56761016ad83Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 56771016ad83Smrg [Compiler flag to allow reflexive dlopens]) 56781016ad83Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 56791016ad83Smrg [Compiler flag to generate shared objects directly from archives]) 56801016ad83Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 56811016ad83Smrg [Whether the compiler copes with passing no objects directly]) 56821016ad83Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 56831016ad83Smrg [Create an old-style archive from a shared archive]) 56841016ad83Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 56851016ad83Smrg [Create a temporary old-style archive to link instead of a shared archive]) 56861016ad83Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 56871016ad83Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 56881016ad83Smrg_LT_TAGDECL([], [module_cmds], [2], 56891016ad83Smrg [Commands used to build a loadable module if different from building 56901016ad83Smrg a shared archive.]) 56911016ad83Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 56921016ad83Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 56931016ad83Smrg [Whether we are building with GNU ld or not]) 56941016ad83Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 56951016ad83Smrg [Flag that allows shared libraries with undefined symbols to be built]) 56961016ad83Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 56971016ad83Smrg [Flag that enforces no undefined symbols]) 56981016ad83Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 56991016ad83Smrg [Flag to hardcode $libdir into a binary during linking. 57001016ad83Smrg This must work even if $libdir does not exist]) 57011016ad83Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 57021016ad83Smrg [Whether we need a single "-rpath" flag with a separated argument]) 57031016ad83Smrg_LT_TAGDECL([], [hardcode_direct], [0], 57041016ad83Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 57051016ad83Smrg DIR into the resulting binary]) 57061016ad83Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 57071016ad83Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 57081016ad83Smrg DIR into the resulting binary and the resulting library dependency is 57091016ad83Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 57101016ad83Smrg library is relocated]) 57111016ad83Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 57121016ad83Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 57131016ad83Smrg into the resulting binary]) 57141016ad83Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 57151016ad83Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 57161016ad83Smrg into the resulting binary]) 57171016ad83Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 57181016ad83Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 57191016ad83Smrg into the library and all subsequent libraries and executables linked 57201016ad83Smrg against it]) 57211016ad83Smrg_LT_TAGDECL([], [inherit_rpath], [0], 57221016ad83Smrg [Set to yes if linker adds runtime paths of dependent libraries 57231016ad83Smrg to runtime path list]) 57241016ad83Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 57251016ad83Smrg [Whether libtool must link a program against all its dependency libraries]) 57261016ad83Smrg_LT_TAGDECL([], [always_export_symbols], [0], 57271016ad83Smrg [Set to "yes" if exported symbols are required]) 57281016ad83Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 57291016ad83Smrg [The commands to list exported symbols]) 57301016ad83Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 57311016ad83Smrg [Symbols that should not be listed in the preloaded symbols]) 57321016ad83Smrg_LT_TAGDECL([], [include_expsyms], [1], 57331016ad83Smrg [Symbols that must always be exported]) 57341016ad83Smrg_LT_TAGDECL([], [prelink_cmds], [2], 57351016ad83Smrg [Commands necessary for linking programs (against libraries) with templates]) 57361016ad83Smrg_LT_TAGDECL([], [postlink_cmds], [2], 57371016ad83Smrg [Commands necessary for finishing linking programs]) 57381016ad83Smrg_LT_TAGDECL([], [file_list_spec], [1], 57391016ad83Smrg [Specify filename containing input files]) 57401016ad83Smrgdnl FIXME: Not yet implemented 57411016ad83Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 57421016ad83Smrgdnl [Compiler flag to generate thread safe objects]) 57431016ad83Smrg])# _LT_LINKER_SHLIBS 57441016ad83Smrg 57451016ad83Smrg 57461016ad83Smrg# _LT_LANG_C_CONFIG([TAG]) 57471016ad83Smrg# ------------------------ 57481016ad83Smrg# Ensure that the configuration variables for a C compiler are suitably 57491016ad83Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 57501016ad83Smrg# the compiler configuration to `libtool'. 57511016ad83Smrgm4_defun([_LT_LANG_C_CONFIG], 57521016ad83Smrg[m4_require([_LT_DECL_EGREP])dnl 57531016ad83Smrglt_save_CC="$CC" 57541016ad83SmrgAC_LANG_PUSH(C) 57551016ad83Smrg 57561016ad83Smrg# Source file extension for C test sources. 57571016ad83Smrgac_ext=c 57581016ad83Smrg 57591016ad83Smrg# Object file extension for compiled C test sources. 57601016ad83Smrgobjext=o 57611016ad83Smrg_LT_TAGVAR(objext, $1)=$objext 57621016ad83Smrg 57631016ad83Smrg# Code to be used in simple compile tests 57641016ad83Smrglt_simple_compile_test_code="int some_variable = 0;" 57651016ad83Smrg 57661016ad83Smrg# Code to be used in simple link tests 57671016ad83Smrglt_simple_link_test_code='int main(){return(0);}' 57681016ad83Smrg 57691016ad83Smrg_LT_TAG_COMPILER 57701016ad83Smrg# Save the default compiler, since it gets overwritten when the other 57711016ad83Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 57721016ad83Smrgcompiler_DEFAULT=$CC 57731016ad83Smrg 57741016ad83Smrg# save warnings/boilerplate of simple test code 57751016ad83Smrg_LT_COMPILER_BOILERPLATE 57761016ad83Smrg_LT_LINKER_BOILERPLATE 57771016ad83Smrg 57781016ad83Smrg## CAVEAT EMPTOR: 57791016ad83Smrg## There is no encapsulation within the following macros, do not change 57801016ad83Smrg## the running order or otherwise move them around unless you know exactly 57811016ad83Smrg## what you are doing... 57821016ad83Smrgif test -n "$compiler"; then 57831016ad83Smrg _LT_COMPILER_NO_RTTI($1) 57841016ad83Smrg _LT_COMPILER_PIC($1) 57851016ad83Smrg _LT_COMPILER_C_O($1) 57861016ad83Smrg _LT_COMPILER_FILE_LOCKS($1) 57871016ad83Smrg _LT_LINKER_SHLIBS($1) 57881016ad83Smrg _LT_SYS_DYNAMIC_LINKER($1) 57891016ad83Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 57901016ad83Smrg LT_SYS_DLOPEN_SELF 57911016ad83Smrg _LT_CMD_STRIPLIB 57921016ad83Smrg 57931016ad83Smrg # Report which library types will actually be built 57941016ad83Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 57951016ad83Smrg AC_MSG_RESULT([$can_build_shared]) 57961016ad83Smrg 57971016ad83Smrg AC_MSG_CHECKING([whether to build shared libraries]) 57981016ad83Smrg test "$can_build_shared" = "no" && enable_shared=no 57991016ad83Smrg 58001016ad83Smrg # On AIX, shared libraries and static libraries use the same namespace, and 58011016ad83Smrg # are all built from PIC. 58021016ad83Smrg case $host_os in 58031016ad83Smrg aix3*) 58041016ad83Smrg test "$enable_shared" = yes && enable_static=no 58051016ad83Smrg if test -n "$RANLIB"; then 58061016ad83Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 58071016ad83Smrg postinstall_cmds='$RANLIB $lib' 58081016ad83Smrg fi 58091016ad83Smrg ;; 58101016ad83Smrg 58111016ad83Smrg aix[[4-9]]*) 58121016ad83Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 58131016ad83Smrg test "$enable_shared" = yes && enable_static=no 58141016ad83Smrg fi 58151016ad83Smrg ;; 58161016ad83Smrg esac 58171016ad83Smrg AC_MSG_RESULT([$enable_shared]) 58181016ad83Smrg 58191016ad83Smrg AC_MSG_CHECKING([whether to build static libraries]) 58201016ad83Smrg # Make sure either enable_shared or enable_static is yes. 58211016ad83Smrg test "$enable_shared" = yes || enable_static=yes 58221016ad83Smrg AC_MSG_RESULT([$enable_static]) 58231016ad83Smrg 58241016ad83Smrg _LT_CONFIG($1) 58251016ad83Smrgfi 58261016ad83SmrgAC_LANG_POP 58271016ad83SmrgCC="$lt_save_CC" 58281016ad83Smrg])# _LT_LANG_C_CONFIG 58291016ad83Smrg 58301016ad83Smrg 58311016ad83Smrg# _LT_LANG_CXX_CONFIG([TAG]) 58321016ad83Smrg# -------------------------- 58331016ad83Smrg# Ensure that the configuration variables for a C++ compiler are suitably 58341016ad83Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 58351016ad83Smrg# the compiler configuration to `libtool'. 58361016ad83Smrgm4_defun([_LT_LANG_CXX_CONFIG], 58371016ad83Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 58381016ad83Smrgm4_require([_LT_DECL_EGREP])dnl 58391016ad83Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 58401016ad83Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 58411016ad83Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 58421016ad83Smrg (test "X$CXX" != "Xg++"))) ; then 58431016ad83Smrg AC_PROG_CXXCPP 58441016ad83Smrgelse 58451016ad83Smrg _lt_caught_CXX_error=yes 58461016ad83Smrgfi 58471016ad83Smrg 58481016ad83SmrgAC_LANG_PUSH(C++) 58491016ad83Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 58501016ad83Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 58511016ad83Smrg_LT_TAGVAR(always_export_symbols, $1)=no 58521016ad83Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 58531016ad83Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 58541016ad83Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 58551016ad83Smrg_LT_TAGVAR(hardcode_direct, $1)=no 58561016ad83Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 58571016ad83Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 58581016ad83Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 58591016ad83Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 58601016ad83Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 58611016ad83Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 58621016ad83Smrg_LT_TAGVAR(inherit_rpath, $1)=no 58631016ad83Smrg_LT_TAGVAR(module_cmds, $1)= 58641016ad83Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 58651016ad83Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 58661016ad83Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 58671016ad83Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 58681016ad83Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 58691016ad83Smrg_LT_TAGVAR(no_undefined_flag, $1)= 58701016ad83Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 58711016ad83Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 58721016ad83Smrg 58731016ad83Smrg# Source file extension for C++ test sources. 58741016ad83Smrgac_ext=cpp 58751016ad83Smrg 58761016ad83Smrg# Object file extension for compiled C++ test sources. 58771016ad83Smrgobjext=o 58781016ad83Smrg_LT_TAGVAR(objext, $1)=$objext 58791016ad83Smrg 58801016ad83Smrg# No sense in running all these tests if we already determined that 58811016ad83Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 58821016ad83Smrg# are currently assumed to apply to all compilers on this platform, 58831016ad83Smrg# and will be corrupted by setting them based on a non-working compiler. 58841016ad83Smrgif test "$_lt_caught_CXX_error" != yes; then 58851016ad83Smrg # Code to be used in simple compile tests 58861016ad83Smrg lt_simple_compile_test_code="int some_variable = 0;" 58871016ad83Smrg 58881016ad83Smrg # Code to be used in simple link tests 58891016ad83Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 58901016ad83Smrg 58911016ad83Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 58921016ad83Smrg _LT_TAG_COMPILER 58931016ad83Smrg 58941016ad83Smrg # save warnings/boilerplate of simple test code 58951016ad83Smrg _LT_COMPILER_BOILERPLATE 58961016ad83Smrg _LT_LINKER_BOILERPLATE 58971016ad83Smrg 58981016ad83Smrg # Allow CC to be a program name with arguments. 58991016ad83Smrg lt_save_CC=$CC 59001016ad83Smrg lt_save_CFLAGS=$CFLAGS 59011016ad83Smrg lt_save_LD=$LD 59021016ad83Smrg lt_save_GCC=$GCC 59031016ad83Smrg GCC=$GXX 59041016ad83Smrg lt_save_with_gnu_ld=$with_gnu_ld 59051016ad83Smrg lt_save_path_LD=$lt_cv_path_LD 59061016ad83Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 59071016ad83Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 59081016ad83Smrg else 59091016ad83Smrg $as_unset lt_cv_prog_gnu_ld 59101016ad83Smrg fi 59111016ad83Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 59121016ad83Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 59131016ad83Smrg else 59141016ad83Smrg $as_unset lt_cv_path_LD 59151016ad83Smrg fi 59161016ad83Smrg test -z "${LDCXX+set}" || LD=$LDCXX 59171016ad83Smrg CC=${CXX-"c++"} 59181016ad83Smrg CFLAGS=$CXXFLAGS 59191016ad83Smrg compiler=$CC 59201016ad83Smrg _LT_TAGVAR(compiler, $1)=$CC 59211016ad83Smrg _LT_CC_BASENAME([$compiler]) 59221016ad83Smrg 59231016ad83Smrg if test -n "$compiler"; then 59241016ad83Smrg # We don't want -fno-exception when compiling C++ code, so set the 59251016ad83Smrg # no_builtin_flag separately 59261016ad83Smrg if test "$GXX" = yes; then 59271016ad83Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 59281016ad83Smrg else 59291016ad83Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 59301016ad83Smrg fi 59311016ad83Smrg 59321016ad83Smrg if test "$GXX" = yes; then 59331016ad83Smrg # Set up default GNU C++ configuration 59341016ad83Smrg 59351016ad83Smrg LT_PATH_LD 59361016ad83Smrg 59371016ad83Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 59381016ad83Smrg # archiving commands below assume that GNU ld is being used. 59391016ad83Smrg if test "$with_gnu_ld" = yes; then 59401016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 59411016ad83Smrg _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' 59421016ad83Smrg 59431016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 59441016ad83Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 59451016ad83Smrg 59461016ad83Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 59471016ad83Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 59481016ad83Smrg # investigate it a little bit more. (MM) 59491016ad83Smrg wlarc='${wl}' 59501016ad83Smrg 59511016ad83Smrg # ancient GNU ld didn't support --whole-archive et. al. 59521016ad83Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 59531016ad83Smrg $GREP 'no-whole-archive' > /dev/null; then 59541016ad83Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 59551016ad83Smrg else 59561016ad83Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 59571016ad83Smrg fi 59581016ad83Smrg else 59591016ad83Smrg with_gnu_ld=no 59601016ad83Smrg wlarc= 59611016ad83Smrg 59621016ad83Smrg # A generic and very simple default shared library creation 59631016ad83Smrg # command for GNU C++ for the case where it uses the native 59641016ad83Smrg # linker, instead of GNU ld. If possible, this setting should 59651016ad83Smrg # overridden to take advantage of the native linker features on 59661016ad83Smrg # the platform it is being used on. 59671016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 59681016ad83Smrg fi 59691016ad83Smrg 59701016ad83Smrg # Commands to make compiler produce verbose output that lists 59711016ad83Smrg # what "hidden" libraries, object files and flags are used when 59721016ad83Smrg # linking a shared library. 59731016ad83Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 59741016ad83Smrg 59751016ad83Smrg else 59761016ad83Smrg GXX=no 59771016ad83Smrg with_gnu_ld=no 59781016ad83Smrg wlarc= 59791016ad83Smrg fi 59801016ad83Smrg 59811016ad83Smrg # PORTME: fill in a description of your system's C++ link characteristics 59821016ad83Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 59831016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 59841016ad83Smrg case $host_os in 59851016ad83Smrg aix3*) 59861016ad83Smrg # FIXME: insert proper C++ library support 59871016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 59881016ad83Smrg ;; 59891016ad83Smrg aix[[4-9]]*) 59901016ad83Smrg if test "$host_cpu" = ia64; then 59911016ad83Smrg # On IA64, the linker does run time linking by default, so we don't 59921016ad83Smrg # have to do anything special. 59931016ad83Smrg aix_use_runtimelinking=no 59941016ad83Smrg exp_sym_flag='-Bexport' 59951016ad83Smrg no_entry_flag="" 59961016ad83Smrg else 59971016ad83Smrg aix_use_runtimelinking=no 59981016ad83Smrg 59991016ad83Smrg # Test if we are trying to use run time linking or normal 60001016ad83Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 60011016ad83Smrg # need to do runtime linking. 60021016ad83Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 60031016ad83Smrg for ld_flag in $LDFLAGS; do 60041016ad83Smrg case $ld_flag in 60051016ad83Smrg *-brtl*) 60061016ad83Smrg aix_use_runtimelinking=yes 60071016ad83Smrg break 60081016ad83Smrg ;; 60091016ad83Smrg esac 60101016ad83Smrg done 60111016ad83Smrg ;; 60121016ad83Smrg esac 60131016ad83Smrg 60141016ad83Smrg exp_sym_flag='-bexport' 60151016ad83Smrg no_entry_flag='-bnoentry' 60161016ad83Smrg fi 60171016ad83Smrg 60181016ad83Smrg # When large executables or shared objects are built, AIX ld can 60191016ad83Smrg # have problems creating the table of contents. If linking a library 60201016ad83Smrg # or program results in "error TOC overflow" add -mminimal-toc to 60211016ad83Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 60221016ad83Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 60231016ad83Smrg 60241016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='' 60251016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 60261016ad83Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 60271016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 60281016ad83Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 60291016ad83Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 60301016ad83Smrg 60311016ad83Smrg if test "$GXX" = yes; then 60321016ad83Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 60331016ad83Smrg # We only want to do this on AIX 4.2 and lower, the check 60341016ad83Smrg # below for broken collect2 doesn't work under 4.3+ 60351016ad83Smrg collect2name=`${CC} -print-prog-name=collect2` 60361016ad83Smrg if test -f "$collect2name" && 60371016ad83Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 60381016ad83Smrg then 60391016ad83Smrg # We have reworked collect2 60401016ad83Smrg : 60411016ad83Smrg else 60421016ad83Smrg # We have old collect2 60431016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 60441016ad83Smrg # It fails to find uninstalled libraries when the uninstalled 60451016ad83Smrg # path is not listed in the libpath. Setting hardcode_minus_L 60461016ad83Smrg # to unsupported forces relinking 60471016ad83Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 60481016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 60491016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 60501016ad83Smrg fi 60511016ad83Smrg esac 60521016ad83Smrg shared_flag='-shared' 60531016ad83Smrg if test "$aix_use_runtimelinking" = yes; then 60541016ad83Smrg shared_flag="$shared_flag "'${wl}-G' 60551016ad83Smrg fi 60561016ad83Smrg else 60571016ad83Smrg # not using gcc 60581016ad83Smrg if test "$host_cpu" = ia64; then 60591016ad83Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 60601016ad83Smrg # chokes on -Wl,-G. The following line is correct: 60611016ad83Smrg shared_flag='-G' 60621016ad83Smrg else 60631016ad83Smrg if test "$aix_use_runtimelinking" = yes; then 60641016ad83Smrg shared_flag='${wl}-G' 60651016ad83Smrg else 60661016ad83Smrg shared_flag='${wl}-bM:SRE' 60671016ad83Smrg fi 60681016ad83Smrg fi 60691016ad83Smrg fi 60701016ad83Smrg 60711016ad83Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 60721016ad83Smrg # It seems that -bexpall does not export symbols beginning with 60731016ad83Smrg # underscore (_), so it is better to generate a list of symbols to 60741016ad83Smrg # export. 60751016ad83Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 60761016ad83Smrg if test "$aix_use_runtimelinking" = yes; then 60771016ad83Smrg # Warning - without using the other runtime loading flags (-brtl), 60781016ad83Smrg # -berok will link without error, but may produce a broken library. 60791016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 60801016ad83Smrg # Determine the default libpath from the value encoded in an empty 60811016ad83Smrg # executable. 60821016ad83Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 60831016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 60841016ad83Smrg 60851016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 60861016ad83Smrg else 60871016ad83Smrg if test "$host_cpu" = ia64; then 60881016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 60891016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 60901016ad83Smrg _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" 60911016ad83Smrg else 60921016ad83Smrg # Determine the default libpath from the value encoded in an 60931016ad83Smrg # empty executable. 60941016ad83Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 60951016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 60961016ad83Smrg # Warning - without using the other run time loading flags, 60971016ad83Smrg # -berok will link without error, but may produce a broken library. 60981016ad83Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 60991016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 61001016ad83Smrg if test "$with_gnu_ld" = yes; then 61011016ad83Smrg # We only use this code for GNU lds that support --whole-archive. 61021016ad83Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 61031016ad83Smrg else 61041016ad83Smrg # Exported symbols can be pulled into shared objects from archives 61051016ad83Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 61061016ad83Smrg fi 61071016ad83Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 61081016ad83Smrg # This is similar to how AIX traditionally builds its shared 61091016ad83Smrg # libraries. 61101016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 61111016ad83Smrg fi 61121016ad83Smrg fi 61131016ad83Smrg ;; 61141016ad83Smrg 61151016ad83Smrg beos*) 61161016ad83Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 61171016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 61181016ad83Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 61191016ad83Smrg # support --undefined. This deserves some investigation. FIXME 61201016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 61211016ad83Smrg else 61221016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 61231016ad83Smrg fi 61241016ad83Smrg ;; 61251016ad83Smrg 61261016ad83Smrg chorus*) 61271016ad83Smrg case $cc_basename in 61281016ad83Smrg *) 61291016ad83Smrg # FIXME: insert proper C++ library support 61301016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 61311016ad83Smrg ;; 61321016ad83Smrg esac 61331016ad83Smrg ;; 61341016ad83Smrg 61351016ad83Smrg cygwin* | mingw* | pw32* | cegcc*) 61361016ad83Smrg case $GXX,$cc_basename in 61371016ad83Smrg ,cl* | no,cl*) 61381016ad83Smrg # Native MSVC 61391016ad83Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 61401016ad83Smrg # no search path for DLLs. 61411016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 61421016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 61431016ad83Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 61441016ad83Smrg _LT_TAGVAR(file_list_spec, $1)='@' 61451016ad83Smrg # Tell ltmain to make .lib files, not .a files. 61461016ad83Smrg libext=lib 61471016ad83Smrg # Tell ltmain to make .dll files, not .so files. 61481016ad83Smrg shrext_cmds=".dll" 61491016ad83Smrg # FIXME: Setting linknames here is a bad hack. 61501016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 61511016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 61521016ad83Smrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 61531016ad83Smrg else 61541016ad83Smrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 61551016ad83Smrg fi~ 61561016ad83Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 61571016ad83Smrg linknames=' 61581016ad83Smrg # The linker will not automatically build a static lib if we build a DLL. 61591016ad83Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 61601016ad83Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 61611016ad83Smrg # Don't use ranlib 61621016ad83Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 61631016ad83Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 61641016ad83Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 61651016ad83Smrg case $lt_outputfile in 61661016ad83Smrg *.exe|*.EXE) ;; 61671016ad83Smrg *) 61681016ad83Smrg lt_outputfile="$lt_outputfile.exe" 61691016ad83Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 61701016ad83Smrg ;; 61711016ad83Smrg esac~ 61721016ad83Smrg func_to_tool_file "$lt_outputfile"~ 61731016ad83Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 61741016ad83Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 61751016ad83Smrg $RM "$lt_outputfile.manifest"; 61761016ad83Smrg fi' 61771016ad83Smrg ;; 61781016ad83Smrg *) 61791016ad83Smrg # g++ 61801016ad83Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 61811016ad83Smrg # as there is no search path for DLLs. 61821016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 61831016ad83Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 61841016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 61851016ad83Smrg _LT_TAGVAR(always_export_symbols, $1)=no 61861016ad83Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 61871016ad83Smrg 61881016ad83Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 61891016ad83Smrg _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' 61901016ad83Smrg # If the export-symbols file already is a .def file (1st line 61911016ad83Smrg # is EXPORTS), use it as is; otherwise, prepend... 61921016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 61931016ad83Smrg cp $export_symbols $output_objdir/$soname.def; 61941016ad83Smrg else 61951016ad83Smrg echo EXPORTS > $output_objdir/$soname.def; 61961016ad83Smrg cat $export_symbols >> $output_objdir/$soname.def; 61971016ad83Smrg fi~ 61981016ad83Smrg $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' 61991016ad83Smrg else 62001016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62011016ad83Smrg fi 62021016ad83Smrg ;; 62031016ad83Smrg esac 62041016ad83Smrg ;; 62051016ad83Smrg darwin* | rhapsody*) 62061016ad83Smrg _LT_DARWIN_LINKER_FEATURES($1) 62071016ad83Smrg ;; 62081016ad83Smrg 62091016ad83Smrg dgux*) 62101016ad83Smrg case $cc_basename in 62111016ad83Smrg ec++*) 62121016ad83Smrg # FIXME: insert proper C++ library support 62131016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62141016ad83Smrg ;; 62151016ad83Smrg ghcx*) 62161016ad83Smrg # Green Hills C++ Compiler 62171016ad83Smrg # FIXME: insert proper C++ library support 62181016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62191016ad83Smrg ;; 62201016ad83Smrg *) 62211016ad83Smrg # FIXME: insert proper C++ library support 62221016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62231016ad83Smrg ;; 62241016ad83Smrg esac 62251016ad83Smrg ;; 62261016ad83Smrg 62271016ad83Smrg freebsd2.*) 62281016ad83Smrg # C++ shared libraries reported to be fairly broken before 62291016ad83Smrg # switch to ELF 62301016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62311016ad83Smrg ;; 62321016ad83Smrg 62331016ad83Smrg freebsd-elf*) 62341016ad83Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 62351016ad83Smrg ;; 62361016ad83Smrg 62371016ad83Smrg freebsd* | dragonfly*) 62381016ad83Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 62391016ad83Smrg # conventions 62401016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 62411016ad83Smrg ;; 62421016ad83Smrg 62431016ad83Smrg haiku*) 62441016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 62451016ad83Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 62461016ad83Smrg ;; 62471016ad83Smrg 62481016ad83Smrg hpux9*) 62491016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 62501016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 62511016ad83Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 62521016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 62531016ad83Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 62541016ad83Smrg # but as the default 62551016ad83Smrg # location of the library. 62561016ad83Smrg 62571016ad83Smrg case $cc_basename in 62581016ad83Smrg CC*) 62591016ad83Smrg # FIXME: insert proper C++ library support 62601016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62611016ad83Smrg ;; 62621016ad83Smrg aCC*) 62631016ad83Smrg _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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 62641016ad83Smrg # Commands to make compiler produce verbose output that lists 62651016ad83Smrg # what "hidden" libraries, object files and flags are used when 62661016ad83Smrg # linking a shared library. 62671016ad83Smrg # 62681016ad83Smrg # There doesn't appear to be a way to prevent this compiler from 62691016ad83Smrg # explicitly linking system object files so we need to strip them 62701016ad83Smrg # from the output so that they don't get included in the library 62711016ad83Smrg # dependencies. 62721016ad83Smrg 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"' 62731016ad83Smrg ;; 62741016ad83Smrg *) 62751016ad83Smrg if test "$GXX" = yes; then 62761016ad83Smrg _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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 62771016ad83Smrg else 62781016ad83Smrg # FIXME: insert proper C++ library support 62791016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62801016ad83Smrg fi 62811016ad83Smrg ;; 62821016ad83Smrg esac 62831016ad83Smrg ;; 62841016ad83Smrg 62851016ad83Smrg hpux10*|hpux11*) 62861016ad83Smrg if test $with_gnu_ld = no; then 62871016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 62881016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 62891016ad83Smrg 62901016ad83Smrg case $host_cpu in 62911016ad83Smrg hppa*64*|ia64*) 62921016ad83Smrg ;; 62931016ad83Smrg *) 62941016ad83Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 62951016ad83Smrg ;; 62961016ad83Smrg esac 62971016ad83Smrg fi 62981016ad83Smrg case $host_cpu in 62991016ad83Smrg hppa*64*|ia64*) 63001016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=no 63011016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63021016ad83Smrg ;; 63031016ad83Smrg *) 63041016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63051016ad83Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 63061016ad83Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 63071016ad83Smrg # but as the default 63081016ad83Smrg # location of the library. 63091016ad83Smrg ;; 63101016ad83Smrg esac 63111016ad83Smrg 63121016ad83Smrg case $cc_basename in 63131016ad83Smrg CC*) 63141016ad83Smrg # FIXME: insert proper C++ library support 63151016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 63161016ad83Smrg ;; 63171016ad83Smrg aCC*) 63181016ad83Smrg case $host_cpu in 63191016ad83Smrg hppa*64*) 63201016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 63211016ad83Smrg ;; 63221016ad83Smrg ia64*) 63231016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 63241016ad83Smrg ;; 63251016ad83Smrg *) 63261016ad83Smrg _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' 63271016ad83Smrg ;; 63281016ad83Smrg esac 63291016ad83Smrg # Commands to make compiler produce verbose output that lists 63301016ad83Smrg # what "hidden" libraries, object files and flags are used when 63311016ad83Smrg # linking a shared library. 63321016ad83Smrg # 63331016ad83Smrg # There doesn't appear to be a way to prevent this compiler from 63341016ad83Smrg # explicitly linking system object files so we need to strip them 63351016ad83Smrg # from the output so that they don't get included in the library 63361016ad83Smrg # dependencies. 63371016ad83Smrg 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"' 63381016ad83Smrg ;; 63391016ad83Smrg *) 63401016ad83Smrg if test "$GXX" = yes; then 63411016ad83Smrg if test $with_gnu_ld = no; then 63421016ad83Smrg case $host_cpu in 63431016ad83Smrg hppa*64*) 63441016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 63451016ad83Smrg ;; 63461016ad83Smrg ia64*) 63471016ad83Smrg _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' 63481016ad83Smrg ;; 63491016ad83Smrg *) 63501016ad83Smrg _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' 63511016ad83Smrg ;; 63521016ad83Smrg esac 63531016ad83Smrg fi 63541016ad83Smrg else 63551016ad83Smrg # FIXME: insert proper C++ library support 63561016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 63571016ad83Smrg fi 63581016ad83Smrg ;; 63591016ad83Smrg esac 63601016ad83Smrg ;; 63611016ad83Smrg 63621016ad83Smrg interix[[3-9]]*) 63631016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=no 63641016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63651016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 63661016ad83Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 63671016ad83Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 63681016ad83Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 63691016ad83Smrg # default) and relocated if they conflict, which is a slow very memory 63701016ad83Smrg # consuming and fragmenting process. To avoid this, we pick a random, 63711016ad83Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 63721016ad83Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 63731016ad83Smrg _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' 63741016ad83Smrg _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' 63751016ad83Smrg ;; 63761016ad83Smrg irix5* | irix6*) 63771016ad83Smrg case $cc_basename in 63781016ad83Smrg CC*) 63791016ad83Smrg # SGI C++ 63801016ad83Smrg _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' 63811016ad83Smrg 63821016ad83Smrg # Archives containing C++ object files must be created using 63831016ad83Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 63841016ad83Smrg # necessary to make sure instantiated templates are included 63851016ad83Smrg # in the archive. 63861016ad83Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 63871016ad83Smrg ;; 63881016ad83Smrg *) 63891016ad83Smrg if test "$GXX" = yes; then 63901016ad83Smrg if test "$with_gnu_ld" = no; then 63911016ad83Smrg _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' 63921016ad83Smrg else 63931016ad83Smrg _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' 63941016ad83Smrg fi 63951016ad83Smrg fi 63961016ad83Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 63971016ad83Smrg ;; 63981016ad83Smrg esac 63991016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 64001016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 64011016ad83Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 64021016ad83Smrg ;; 64031016ad83Smrg 64041016ad83Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 64051016ad83Smrg case $cc_basename in 64061016ad83Smrg KCC*) 64071016ad83Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 64081016ad83Smrg 64091016ad83Smrg # KCC will only create a shared library if the output file 64101016ad83Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 64111016ad83Smrg # to its proper name (with version) after linking. 64121016ad83Smrg _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' 64131016ad83Smrg _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' 64141016ad83Smrg # Commands to make compiler produce verbose output that lists 64151016ad83Smrg # what "hidden" libraries, object files and flags are used when 64161016ad83Smrg # linking a shared library. 64171016ad83Smrg # 64181016ad83Smrg # There doesn't appear to be a way to prevent this compiler from 64191016ad83Smrg # explicitly linking system object files so we need to strip them 64201016ad83Smrg # from the output so that they don't get included in the library 64211016ad83Smrg # dependencies. 64221016ad83Smrg 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"' 64231016ad83Smrg 64241016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 64251016ad83Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 64261016ad83Smrg 64271016ad83Smrg # Archives containing C++ object files must be created using 64281016ad83Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 64291016ad83Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 64301016ad83Smrg ;; 64311016ad83Smrg icpc* | ecpc* ) 64321016ad83Smrg # Intel C++ 64331016ad83Smrg with_gnu_ld=yes 64341016ad83Smrg # version 8.0 and above of icpc choke on multiply defined symbols 64351016ad83Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 64361016ad83Smrg # earlier do not add the objects themselves. 64371016ad83Smrg case `$CC -V 2>&1` in 64381016ad83Smrg *"Version 7."*) 64391016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 64401016ad83Smrg _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' 64411016ad83Smrg ;; 64421016ad83Smrg *) # Version 8.0 or newer 64431016ad83Smrg tmp_idyn= 64441016ad83Smrg case $host_cpu in 64451016ad83Smrg ia64*) tmp_idyn=' -i_dynamic';; 64461016ad83Smrg esac 64471016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 64481016ad83Smrg _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' 64491016ad83Smrg ;; 64501016ad83Smrg esac 64511016ad83Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 64521016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 64531016ad83Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 64541016ad83Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 64551016ad83Smrg ;; 64561016ad83Smrg pgCC* | pgcpp*) 64571016ad83Smrg # Portland Group C++ compiler 64581016ad83Smrg case `$CC -V` in 64591016ad83Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 64601016ad83Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 64611016ad83Smrg rm -rf $tpldir~ 64621016ad83Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 64631016ad83Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 64641016ad83Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 64651016ad83Smrg rm -rf $tpldir~ 64661016ad83Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 64671016ad83Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 64681016ad83Smrg $RANLIB $oldlib' 64691016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 64701016ad83Smrg rm -rf $tpldir~ 64711016ad83Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 64721016ad83Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 64731016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 64741016ad83Smrg rm -rf $tpldir~ 64751016ad83Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 64761016ad83Smrg $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' 64771016ad83Smrg ;; 64781016ad83Smrg *) # Version 6 and above use weak symbols 64791016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 64801016ad83Smrg _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' 64811016ad83Smrg ;; 64821016ad83Smrg esac 64831016ad83Smrg 64841016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 64851016ad83Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 64861016ad83Smrg _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' 64871016ad83Smrg ;; 64881016ad83Smrg cxx*) 64891016ad83Smrg # Compaq C++ 64901016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 64911016ad83Smrg _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' 64921016ad83Smrg 64931016ad83Smrg runpath_var=LD_RUN_PATH 64941016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 64951016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 64961016ad83Smrg 64971016ad83Smrg # Commands to make compiler produce verbose output that lists 64981016ad83Smrg # what "hidden" libraries, object files and flags are used when 64991016ad83Smrg # linking a shared library. 65001016ad83Smrg # 65011016ad83Smrg # There doesn't appear to be a way to prevent this compiler from 65021016ad83Smrg # explicitly linking system object files so we need to strip them 65031016ad83Smrg # from the output so that they don't get included in the library 65041016ad83Smrg # dependencies. 65051016ad83Smrg 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' 65061016ad83Smrg ;; 65071016ad83Smrg xl* | mpixl* | bgxl*) 65081016ad83Smrg # IBM XL 8.0 on PPC, with GNU ld 65091016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 65101016ad83Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 65111016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 65121016ad83Smrg if test "x$supports_anon_versioning" = xyes; then 65131016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 65141016ad83Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 65151016ad83Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 65161016ad83Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 65171016ad83Smrg fi 65181016ad83Smrg ;; 65191016ad83Smrg *) 65201016ad83Smrg case `$CC -V 2>&1 | sed 5q` in 65211016ad83Smrg *Sun\ C*) 65221016ad83Smrg # Sun C++ 5.9 65231016ad83Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 65241016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 65251016ad83Smrg _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' 65261016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 65271016ad83Smrg _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' 65281016ad83Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 65291016ad83Smrg 65301016ad83Smrg # Not sure whether something based on 65311016ad83Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 65321016ad83Smrg # would be better. 65331016ad83Smrg output_verbose_link_cmd='func_echo_all' 65341016ad83Smrg 65351016ad83Smrg # Archives containing C++ object files must be created using 65361016ad83Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 65371016ad83Smrg # necessary to make sure instantiated templates are included 65381016ad83Smrg # in the archive. 65391016ad83Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 65401016ad83Smrg ;; 65411016ad83Smrg esac 65421016ad83Smrg ;; 65431016ad83Smrg esac 65441016ad83Smrg ;; 65451016ad83Smrg 65461016ad83Smrg lynxos*) 65471016ad83Smrg # FIXME: insert proper C++ library support 65481016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 65491016ad83Smrg ;; 65501016ad83Smrg 65511016ad83Smrg m88k*) 65521016ad83Smrg # FIXME: insert proper C++ library support 65531016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 65541016ad83Smrg ;; 65551016ad83Smrg 65561016ad83Smrg mvs*) 65571016ad83Smrg case $cc_basename in 65581016ad83Smrg cxx*) 65591016ad83Smrg # FIXME: insert proper C++ library support 65601016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 65611016ad83Smrg ;; 65621016ad83Smrg *) 65631016ad83Smrg # FIXME: insert proper C++ library support 65641016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 65651016ad83Smrg ;; 65661016ad83Smrg esac 65671016ad83Smrg ;; 65681016ad83Smrg 65691016ad83Smrg netbsd*) 65701016ad83Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 65711016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 65721016ad83Smrg wlarc= 65731016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 65741016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 65751016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65761016ad83Smrg fi 65771016ad83Smrg # Workaround some broken pre-1.5 toolchains 65781016ad83Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 65791016ad83Smrg ;; 65801016ad83Smrg 65811016ad83Smrg *nto* | *qnx*) 65821016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 65831016ad83Smrg ;; 65841016ad83Smrg 65851016ad83Smrg openbsd2*) 65861016ad83Smrg # C++ shared libraries are fairly broken 65871016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 65881016ad83Smrg ;; 65891016ad83Smrg 65901016ad83Smrg openbsd*) 65911016ad83Smrg if test -f /usr/libexec/ld.so; then 65921016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 65931016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65941016ad83Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 65951016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 65961016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 65971016ad83Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 65981016ad83Smrg _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' 65991016ad83Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 66001016ad83Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 66011016ad83Smrg fi 66021016ad83Smrg output_verbose_link_cmd=func_echo_all 66031016ad83Smrg else 66041016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66051016ad83Smrg fi 66061016ad83Smrg ;; 66071016ad83Smrg 66081016ad83Smrg osf3* | osf4* | osf5*) 66091016ad83Smrg case $cc_basename in 66101016ad83Smrg KCC*) 66111016ad83Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 66121016ad83Smrg 66131016ad83Smrg # KCC will only create a shared library if the output file 66141016ad83Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 66151016ad83Smrg # to its proper name (with version) after linking. 66161016ad83Smrg _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' 66171016ad83Smrg 66181016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 66191016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 66201016ad83Smrg 66211016ad83Smrg # Archives containing C++ object files must be created using 66221016ad83Smrg # the KAI C++ compiler. 66231016ad83Smrg case $host in 66241016ad83Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 66251016ad83Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 66261016ad83Smrg esac 66271016ad83Smrg ;; 66281016ad83Smrg RCC*) 66291016ad83Smrg # Rational C++ 2.4.1 66301016ad83Smrg # FIXME: insert proper C++ library support 66311016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66321016ad83Smrg ;; 66331016ad83Smrg cxx*) 66341016ad83Smrg case $host in 66351016ad83Smrg osf3*) 66361016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 66371016ad83Smrg _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' 66381016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 66391016ad83Smrg ;; 66401016ad83Smrg *) 66411016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 66421016ad83Smrg _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' 66431016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 66441016ad83Smrg echo "-hidden">> $lib.exp~ 66451016ad83Smrg $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~ 66461016ad83Smrg $RM $lib.exp' 66471016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 66481016ad83Smrg ;; 66491016ad83Smrg esac 66501016ad83Smrg 66511016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 66521016ad83Smrg 66531016ad83Smrg # Commands to make compiler produce verbose output that lists 66541016ad83Smrg # what "hidden" libraries, object files and flags are used when 66551016ad83Smrg # linking a shared library. 66561016ad83Smrg # 66571016ad83Smrg # There doesn't appear to be a way to prevent this compiler from 66581016ad83Smrg # explicitly linking system object files so we need to strip them 66591016ad83Smrg # from the output so that they don't get included in the library 66601016ad83Smrg # dependencies. 66611016ad83Smrg 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"' 66621016ad83Smrg ;; 66631016ad83Smrg *) 66641016ad83Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 66651016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 66661016ad83Smrg case $host in 66671016ad83Smrg osf3*) 66681016ad83Smrg _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' 66691016ad83Smrg ;; 66701016ad83Smrg *) 66711016ad83Smrg _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' 66721016ad83Smrg ;; 66731016ad83Smrg esac 66741016ad83Smrg 66751016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 66761016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 66771016ad83Smrg 66781016ad83Smrg # Commands to make compiler produce verbose output that lists 66791016ad83Smrg # what "hidden" libraries, object files and flags are used when 66801016ad83Smrg # linking a shared library. 66811016ad83Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 66821016ad83Smrg 66831016ad83Smrg else 66841016ad83Smrg # FIXME: insert proper C++ library support 66851016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66861016ad83Smrg fi 66871016ad83Smrg ;; 66881016ad83Smrg esac 66891016ad83Smrg ;; 66901016ad83Smrg 66911016ad83Smrg psos*) 66921016ad83Smrg # FIXME: insert proper C++ library support 66931016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66941016ad83Smrg ;; 66951016ad83Smrg 66961016ad83Smrg sunos4*) 66971016ad83Smrg case $cc_basename in 66981016ad83Smrg CC*) 66991016ad83Smrg # Sun C++ 4.x 67001016ad83Smrg # FIXME: insert proper C++ library support 67011016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67021016ad83Smrg ;; 67031016ad83Smrg lcc*) 67041016ad83Smrg # Lucid 67051016ad83Smrg # FIXME: insert proper C++ library support 67061016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67071016ad83Smrg ;; 67081016ad83Smrg *) 67091016ad83Smrg # FIXME: insert proper C++ library support 67101016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67111016ad83Smrg ;; 67121016ad83Smrg esac 67131016ad83Smrg ;; 67141016ad83Smrg 67151016ad83Smrg solaris*) 67161016ad83Smrg case $cc_basename in 67171016ad83Smrg CC* | sunCC*) 67181016ad83Smrg # Sun C++ 4.2, 5.x and Centerline C++ 67191016ad83Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 67201016ad83Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 67211016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 67221016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 67231016ad83Smrg $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' 67241016ad83Smrg 67251016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 67261016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 67271016ad83Smrg case $host_os in 67281016ad83Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 67291016ad83Smrg *) 67301016ad83Smrg # The compiler driver will combine and reorder linker options, 67311016ad83Smrg # but understands `-z linker_flag'. 67321016ad83Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 67331016ad83Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 67341016ad83Smrg ;; 67351016ad83Smrg esac 67361016ad83Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 67371016ad83Smrg 67381016ad83Smrg output_verbose_link_cmd='func_echo_all' 67391016ad83Smrg 67401016ad83Smrg # Archives containing C++ object files must be created using 67411016ad83Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 67421016ad83Smrg # necessary to make sure instantiated templates are included 67431016ad83Smrg # in the archive. 67441016ad83Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 67451016ad83Smrg ;; 67461016ad83Smrg gcx*) 67471016ad83Smrg # Green Hills C++ Compiler 67481016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 67491016ad83Smrg 67501016ad83Smrg # The C++ compiler must be used to create the archive. 67511016ad83Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 67521016ad83Smrg ;; 67531016ad83Smrg *) 67541016ad83Smrg # GNU C++ compiler with Solaris linker 67551016ad83Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 67561016ad83Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 67571016ad83Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 67581016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 67591016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 67601016ad83Smrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 67611016ad83Smrg 67621016ad83Smrg # Commands to make compiler produce verbose output that lists 67631016ad83Smrg # what "hidden" libraries, object files and flags are used when 67641016ad83Smrg # linking a shared library. 67651016ad83Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 67661016ad83Smrg else 67671016ad83Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 67681016ad83Smrg # platform. 67691016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 67701016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 67711016ad83Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 67721016ad83Smrg 67731016ad83Smrg # Commands to make compiler produce verbose output that lists 67741016ad83Smrg # what "hidden" libraries, object files and flags are used when 67751016ad83Smrg # linking a shared library. 67761016ad83Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 67771016ad83Smrg fi 67781016ad83Smrg 67791016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 67801016ad83Smrg case $host_os in 67811016ad83Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 67821016ad83Smrg *) 67831016ad83Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 67841016ad83Smrg ;; 67851016ad83Smrg esac 67861016ad83Smrg fi 67871016ad83Smrg ;; 67881016ad83Smrg esac 67891016ad83Smrg ;; 67901016ad83Smrg 67911016ad83Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 67921016ad83Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 67931016ad83Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 67941016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 67951016ad83Smrg runpath_var='LD_RUN_PATH' 67961016ad83Smrg 67971016ad83Smrg case $cc_basename in 67981016ad83Smrg CC*) 67991016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68001016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68011016ad83Smrg ;; 68021016ad83Smrg *) 68031016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68041016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68051016ad83Smrg ;; 68061016ad83Smrg esac 68071016ad83Smrg ;; 68081016ad83Smrg 68091016ad83Smrg sysv5* | sco3.2v5* | sco5v6*) 68101016ad83Smrg # Note: We can NOT use -z defs as we might desire, because we do not 68111016ad83Smrg # link with -lc, and that would cause any symbols used from libc to 68121016ad83Smrg # always be unresolved, which means just about no library would 68131016ad83Smrg # ever link correctly. If we're not using GNU ld we use -z text 68141016ad83Smrg # though, which does catch some bad symbols but isn't as heavy-handed 68151016ad83Smrg # as -z defs. 68161016ad83Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 68171016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 68181016ad83Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 68191016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 68201016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 68211016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 68221016ad83Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 68231016ad83Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 68241016ad83Smrg runpath_var='LD_RUN_PATH' 68251016ad83Smrg 68261016ad83Smrg case $cc_basename in 68271016ad83Smrg CC*) 68281016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68291016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68301016ad83Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 68311016ad83Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 68321016ad83Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 68331016ad83Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 68341016ad83Smrg ;; 68351016ad83Smrg *) 68361016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68371016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68381016ad83Smrg ;; 68391016ad83Smrg esac 68401016ad83Smrg ;; 68411016ad83Smrg 68421016ad83Smrg tandem*) 68431016ad83Smrg case $cc_basename in 68441016ad83Smrg NCC*) 68451016ad83Smrg # NonStop-UX NCC 3.20 68461016ad83Smrg # FIXME: insert proper C++ library support 68471016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68481016ad83Smrg ;; 68491016ad83Smrg *) 68501016ad83Smrg # FIXME: insert proper C++ library support 68511016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68521016ad83Smrg ;; 68531016ad83Smrg esac 68541016ad83Smrg ;; 68551016ad83Smrg 68561016ad83Smrg vxworks*) 68571016ad83Smrg # FIXME: insert proper C++ library support 68581016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68591016ad83Smrg ;; 68601016ad83Smrg 68611016ad83Smrg *) 68621016ad83Smrg # FIXME: insert proper C++ library support 68631016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68641016ad83Smrg ;; 68651016ad83Smrg esac 68661016ad83Smrg 68671016ad83Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 68681016ad83Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 68691016ad83Smrg 68701016ad83Smrg _LT_TAGVAR(GCC, $1)="$GXX" 68711016ad83Smrg _LT_TAGVAR(LD, $1)="$LD" 68721016ad83Smrg 68731016ad83Smrg ## CAVEAT EMPTOR: 68741016ad83Smrg ## There is no encapsulation within the following macros, do not change 68751016ad83Smrg ## the running order or otherwise move them around unless you know exactly 68761016ad83Smrg ## what you are doing... 68771016ad83Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 68781016ad83Smrg _LT_COMPILER_PIC($1) 68791016ad83Smrg _LT_COMPILER_C_O($1) 68801016ad83Smrg _LT_COMPILER_FILE_LOCKS($1) 68811016ad83Smrg _LT_LINKER_SHLIBS($1) 68821016ad83Smrg _LT_SYS_DYNAMIC_LINKER($1) 68831016ad83Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 68841016ad83Smrg 68851016ad83Smrg _LT_CONFIG($1) 68861016ad83Smrg fi # test -n "$compiler" 68871016ad83Smrg 68881016ad83Smrg CC=$lt_save_CC 68891016ad83Smrg CFLAGS=$lt_save_CFLAGS 68901016ad83Smrg LDCXX=$LD 68911016ad83Smrg LD=$lt_save_LD 68921016ad83Smrg GCC=$lt_save_GCC 68931016ad83Smrg with_gnu_ld=$lt_save_with_gnu_ld 68941016ad83Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 68951016ad83Smrg lt_cv_path_LD=$lt_save_path_LD 68961016ad83Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 68971016ad83Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 68981016ad83Smrgfi # test "$_lt_caught_CXX_error" != yes 68991016ad83Smrg 69001016ad83SmrgAC_LANG_POP 69011016ad83Smrg])# _LT_LANG_CXX_CONFIG 69021016ad83Smrg 69031016ad83Smrg 69041016ad83Smrg# _LT_FUNC_STRIPNAME_CNF 69051016ad83Smrg# ---------------------- 69061016ad83Smrg# func_stripname_cnf prefix suffix name 69071016ad83Smrg# strip PREFIX and SUFFIX off of NAME. 69081016ad83Smrg# PREFIX and SUFFIX must not contain globbing or regex special 69091016ad83Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 69101016ad83Smrg# dot (in which case that matches only a dot). 69111016ad83Smrg# 69121016ad83Smrg# This function is identical to the (non-XSI) version of func_stripname, 69131016ad83Smrg# except this one can be used by m4 code that may be executed by configure, 69141016ad83Smrg# rather than the libtool script. 69151016ad83Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 69161016ad83SmrgAC_REQUIRE([_LT_DECL_SED]) 69171016ad83SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 69181016ad83Smrgfunc_stripname_cnf () 69191016ad83Smrg{ 69201016ad83Smrg case ${2} in 69211016ad83Smrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 69221016ad83Smrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 69231016ad83Smrg esac 69241016ad83Smrg} # func_stripname_cnf 69251016ad83Smrg])# _LT_FUNC_STRIPNAME_CNF 69261016ad83Smrg 69271016ad83Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 69281016ad83Smrg# --------------------------------- 69291016ad83Smrg# Figure out "hidden" library dependencies from verbose 69301016ad83Smrg# compiler output when linking a shared library. 69311016ad83Smrg# Parse the compiler output and extract the necessary 69321016ad83Smrg# objects, libraries and library flags. 69331016ad83Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 69341016ad83Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 69351016ad83SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 69361016ad83Smrg# Dependencies to place before and after the object being linked: 69371016ad83Smrg_LT_TAGVAR(predep_objects, $1)= 69381016ad83Smrg_LT_TAGVAR(postdep_objects, $1)= 69391016ad83Smrg_LT_TAGVAR(predeps, $1)= 69401016ad83Smrg_LT_TAGVAR(postdeps, $1)= 69411016ad83Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 69421016ad83Smrg 69431016ad83Smrgdnl we can't use the lt_simple_compile_test_code here, 69441016ad83Smrgdnl because it contains code intended for an executable, 69451016ad83Smrgdnl not a library. It's possible we should let each 69461016ad83Smrgdnl tag define a new lt_????_link_test_code variable, 69471016ad83Smrgdnl but it's only used here... 69481016ad83Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 69491016ad83Smrgint a; 69501016ad83Smrgvoid foo (void) { a = 0; } 69511016ad83Smrg_LT_EOF 69521016ad83Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 69531016ad83Smrgclass Foo 69541016ad83Smrg{ 69551016ad83Smrgpublic: 69561016ad83Smrg Foo (void) { a = 0; } 69571016ad83Smrgprivate: 69581016ad83Smrg int a; 69591016ad83Smrg}; 69601016ad83Smrg_LT_EOF 69611016ad83Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 69621016ad83Smrg subroutine foo 69631016ad83Smrg implicit none 69641016ad83Smrg integer*4 a 69651016ad83Smrg a=0 69661016ad83Smrg return 69671016ad83Smrg end 69681016ad83Smrg_LT_EOF 69691016ad83Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 69701016ad83Smrg subroutine foo 69711016ad83Smrg implicit none 69721016ad83Smrg integer a 69731016ad83Smrg a=0 69741016ad83Smrg return 69751016ad83Smrg end 69761016ad83Smrg_LT_EOF 69771016ad83Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 69781016ad83Smrgpublic class foo { 69791016ad83Smrg private int a; 69801016ad83Smrg public void bar (void) { 69811016ad83Smrg a = 0; 69821016ad83Smrg } 69831016ad83Smrg}; 69841016ad83Smrg_LT_EOF 69851016ad83Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 69861016ad83Smrgpackage foo 69871016ad83Smrgfunc foo() { 69881016ad83Smrg} 69891016ad83Smrg_LT_EOF 69901016ad83Smrg]) 69911016ad83Smrg 69921016ad83Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 69931016ad83Smrgcase "$CC $CFLAGS " in #( 69941016ad83Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 69951016ad83Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 69961016ad83Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 69971016ad83Smrgesac 69981016ad83Smrg 69991016ad83Smrgdnl Parse the compiler output and extract the necessary 70001016ad83Smrgdnl objects, libraries and library flags. 70011016ad83Smrgif AC_TRY_EVAL(ac_compile); then 70021016ad83Smrg # Parse the compiler output and extract the necessary 70031016ad83Smrg # objects, libraries and library flags. 70041016ad83Smrg 70051016ad83Smrg # Sentinel used to keep track of whether or not we are before 70061016ad83Smrg # the conftest object file. 70071016ad83Smrg pre_test_object_deps_done=no 70081016ad83Smrg 70091016ad83Smrg for p in `eval "$output_verbose_link_cmd"`; do 70101016ad83Smrg case ${prev}${p} in 70111016ad83Smrg 70121016ad83Smrg -L* | -R* | -l*) 70131016ad83Smrg # Some compilers place space between "-{L,R}" and the path. 70141016ad83Smrg # Remove the space. 70151016ad83Smrg if test $p = "-L" || 70161016ad83Smrg test $p = "-R"; then 70171016ad83Smrg prev=$p 70181016ad83Smrg continue 70191016ad83Smrg fi 70201016ad83Smrg 70211016ad83Smrg # Expand the sysroot to ease extracting the directories later. 70221016ad83Smrg if test -z "$prev"; then 70231016ad83Smrg case $p in 70241016ad83Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 70251016ad83Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 70261016ad83Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 70271016ad83Smrg esac 70281016ad83Smrg fi 70291016ad83Smrg case $p in 70301016ad83Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 70311016ad83Smrg esac 70321016ad83Smrg if test "$pre_test_object_deps_done" = no; then 70331016ad83Smrg case ${prev} in 70341016ad83Smrg -L | -R) 70351016ad83Smrg # Internal compiler library paths should come after those 70361016ad83Smrg # provided the user. The postdeps already come after the 70371016ad83Smrg # user supplied libs so there is no need to process them. 70381016ad83Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 70391016ad83Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 70401016ad83Smrg else 70411016ad83Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 70421016ad83Smrg fi 70431016ad83Smrg ;; 70441016ad83Smrg # The "-l" case would never come before the object being 70451016ad83Smrg # linked, so don't bother handling this case. 70461016ad83Smrg esac 70471016ad83Smrg else 70481016ad83Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 70491016ad83Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 70501016ad83Smrg else 70511016ad83Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 70521016ad83Smrg fi 70531016ad83Smrg fi 70541016ad83Smrg prev= 70551016ad83Smrg ;; 70561016ad83Smrg 70571016ad83Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 70581016ad83Smrg *.$objext) 70591016ad83Smrg # This assumes that the test object file only shows up 70601016ad83Smrg # once in the compiler output. 70611016ad83Smrg if test "$p" = "conftest.$objext"; then 70621016ad83Smrg pre_test_object_deps_done=yes 70631016ad83Smrg continue 70641016ad83Smrg fi 70651016ad83Smrg 70661016ad83Smrg if test "$pre_test_object_deps_done" = no; then 70671016ad83Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 70681016ad83Smrg _LT_TAGVAR(predep_objects, $1)="$p" 70691016ad83Smrg else 70701016ad83Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 70711016ad83Smrg fi 70721016ad83Smrg else 70731016ad83Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 70741016ad83Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 70751016ad83Smrg else 70761016ad83Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 70771016ad83Smrg fi 70781016ad83Smrg fi 70791016ad83Smrg ;; 70801016ad83Smrg 70811016ad83Smrg *) ;; # Ignore the rest. 70821016ad83Smrg 70831016ad83Smrg esac 70841016ad83Smrg done 70851016ad83Smrg 70861016ad83Smrg # Clean up. 70871016ad83Smrg rm -f a.out a.exe 70881016ad83Smrgelse 70891016ad83Smrg echo "libtool.m4: error: problem compiling $1 test program" 70901016ad83Smrgfi 70911016ad83Smrg 70921016ad83Smrg$RM -f confest.$objext 70931016ad83SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 70941016ad83Smrg 70951016ad83Smrg# PORTME: override above test on systems where it is broken 70961016ad83Smrgm4_if([$1], [CXX], 70971016ad83Smrg[case $host_os in 70981016ad83Smrginterix[[3-9]]*) 70991016ad83Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 71001016ad83Smrg # hack all around it, let's just trust "g++" to DTRT. 71011016ad83Smrg _LT_TAGVAR(predep_objects,$1)= 71021016ad83Smrg _LT_TAGVAR(postdep_objects,$1)= 71031016ad83Smrg _LT_TAGVAR(postdeps,$1)= 71041016ad83Smrg ;; 71051016ad83Smrg 71061016ad83Smrglinux*) 71071016ad83Smrg case `$CC -V 2>&1 | sed 5q` in 71081016ad83Smrg *Sun\ C*) 71091016ad83Smrg # Sun C++ 5.9 71101016ad83Smrg 71111016ad83Smrg # The more standards-conforming stlport4 library is 71121016ad83Smrg # incompatible with the Cstd library. Avoid specifying 71131016ad83Smrg # it if it's in CXXFLAGS. Ignore libCrun as 71141016ad83Smrg # -library=stlport4 depends on it. 71151016ad83Smrg case " $CXX $CXXFLAGS " in 71161016ad83Smrg *" -library=stlport4 "*) 71171016ad83Smrg solaris_use_stlport4=yes 71181016ad83Smrg ;; 71191016ad83Smrg esac 71201016ad83Smrg 71211016ad83Smrg if test "$solaris_use_stlport4" != yes; then 71221016ad83Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 71231016ad83Smrg fi 71241016ad83Smrg ;; 71251016ad83Smrg esac 71261016ad83Smrg ;; 71271016ad83Smrg 71281016ad83Smrgsolaris*) 71291016ad83Smrg case $cc_basename in 71301016ad83Smrg CC* | sunCC*) 71311016ad83Smrg # The more standards-conforming stlport4 library is 71321016ad83Smrg # incompatible with the Cstd library. Avoid specifying 71331016ad83Smrg # it if it's in CXXFLAGS. Ignore libCrun as 71341016ad83Smrg # -library=stlport4 depends on it. 71351016ad83Smrg case " $CXX $CXXFLAGS " in 71361016ad83Smrg *" -library=stlport4 "*) 71371016ad83Smrg solaris_use_stlport4=yes 71381016ad83Smrg ;; 71391016ad83Smrg esac 71401016ad83Smrg 71411016ad83Smrg # Adding this requires a known-good setup of shared libraries for 71421016ad83Smrg # Sun compiler versions before 5.6, else PIC objects from an old 71431016ad83Smrg # archive will be linked into the output, leading to subtle bugs. 71441016ad83Smrg if test "$solaris_use_stlport4" != yes; then 71451016ad83Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 71461016ad83Smrg fi 71471016ad83Smrg ;; 71481016ad83Smrg esac 71491016ad83Smrg ;; 71501016ad83Smrgesac 71511016ad83Smrg]) 71521016ad83Smrg 71531016ad83Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 71541016ad83Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 71551016ad83Smrgesac 71561016ad83Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 71571016ad83Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 71581016ad83Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 71591016ad83Smrgfi 71601016ad83Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 71611016ad83Smrg [The directories searched by this compiler when creating a shared library]) 71621016ad83Smrg_LT_TAGDECL([], [predep_objects], [1], 71631016ad83Smrg [Dependencies to place before and after the objects being linked to 71641016ad83Smrg create a shared library]) 71651016ad83Smrg_LT_TAGDECL([], [postdep_objects], [1]) 71661016ad83Smrg_LT_TAGDECL([], [predeps], [1]) 71671016ad83Smrg_LT_TAGDECL([], [postdeps], [1]) 71681016ad83Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 71691016ad83Smrg [The library search path used internally by the compiler when linking 71701016ad83Smrg a shared library]) 71711016ad83Smrg])# _LT_SYS_HIDDEN_LIBDEPS 71721016ad83Smrg 71731016ad83Smrg 71741016ad83Smrg# _LT_LANG_F77_CONFIG([TAG]) 71751016ad83Smrg# -------------------------- 71761016ad83Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 71771016ad83Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 71781016ad83Smrg# to write the compiler configuration to `libtool'. 71791016ad83Smrgm4_defun([_LT_LANG_F77_CONFIG], 71801016ad83Smrg[AC_LANG_PUSH(Fortran 77) 71811016ad83Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 71821016ad83Smrg _lt_disable_F77=yes 71831016ad83Smrgfi 71841016ad83Smrg 71851016ad83Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 71861016ad83Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 71871016ad83Smrg_LT_TAGVAR(always_export_symbols, $1)=no 71881016ad83Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 71891016ad83Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 71901016ad83Smrg_LT_TAGVAR(hardcode_direct, $1)=no 71911016ad83Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 71921016ad83Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 71931016ad83Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 71941016ad83Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 71951016ad83Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 71961016ad83Smrg_LT_TAGVAR(inherit_rpath, $1)=no 71971016ad83Smrg_LT_TAGVAR(module_cmds, $1)= 71981016ad83Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 71991016ad83Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 72001016ad83Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 72011016ad83Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 72021016ad83Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 72031016ad83Smrg_LT_TAGVAR(no_undefined_flag, $1)= 72041016ad83Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 72051016ad83Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 72061016ad83Smrg 72071016ad83Smrg# Source file extension for f77 test sources. 72081016ad83Smrgac_ext=f 72091016ad83Smrg 72101016ad83Smrg# Object file extension for compiled f77 test sources. 72111016ad83Smrgobjext=o 72121016ad83Smrg_LT_TAGVAR(objext, $1)=$objext 72131016ad83Smrg 72141016ad83Smrg# No sense in running all these tests if we already determined that 72151016ad83Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 72161016ad83Smrg# are currently assumed to apply to all compilers on this platform, 72171016ad83Smrg# and will be corrupted by setting them based on a non-working compiler. 72181016ad83Smrgif test "$_lt_disable_F77" != yes; then 72191016ad83Smrg # Code to be used in simple compile tests 72201016ad83Smrg lt_simple_compile_test_code="\ 72211016ad83Smrg subroutine t 72221016ad83Smrg return 72231016ad83Smrg end 72241016ad83Smrg" 72251016ad83Smrg 72261016ad83Smrg # Code to be used in simple link tests 72271016ad83Smrg lt_simple_link_test_code="\ 72281016ad83Smrg program t 72291016ad83Smrg end 72301016ad83Smrg" 72311016ad83Smrg 72321016ad83Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 72331016ad83Smrg _LT_TAG_COMPILER 72341016ad83Smrg 72351016ad83Smrg # save warnings/boilerplate of simple test code 72361016ad83Smrg _LT_COMPILER_BOILERPLATE 72371016ad83Smrg _LT_LINKER_BOILERPLATE 72381016ad83Smrg 72391016ad83Smrg # Allow CC to be a program name with arguments. 72401016ad83Smrg lt_save_CC="$CC" 72411016ad83Smrg lt_save_GCC=$GCC 72421016ad83Smrg lt_save_CFLAGS=$CFLAGS 72431016ad83Smrg CC=${F77-"f77"} 72441016ad83Smrg CFLAGS=$FFLAGS 72451016ad83Smrg compiler=$CC 72461016ad83Smrg _LT_TAGVAR(compiler, $1)=$CC 72471016ad83Smrg _LT_CC_BASENAME([$compiler]) 72481016ad83Smrg GCC=$G77 72491016ad83Smrg if test -n "$compiler"; then 72501016ad83Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 72511016ad83Smrg AC_MSG_RESULT([$can_build_shared]) 72521016ad83Smrg 72531016ad83Smrg AC_MSG_CHECKING([whether to build shared libraries]) 72541016ad83Smrg test "$can_build_shared" = "no" && enable_shared=no 72551016ad83Smrg 72561016ad83Smrg # On AIX, shared libraries and static libraries use the same namespace, and 72571016ad83Smrg # are all built from PIC. 72581016ad83Smrg case $host_os in 72591016ad83Smrg aix3*) 72601016ad83Smrg test "$enable_shared" = yes && enable_static=no 72611016ad83Smrg if test -n "$RANLIB"; then 72621016ad83Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 72631016ad83Smrg postinstall_cmds='$RANLIB $lib' 72641016ad83Smrg fi 72651016ad83Smrg ;; 72661016ad83Smrg aix[[4-9]]*) 72671016ad83Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 72681016ad83Smrg test "$enable_shared" = yes && enable_static=no 72691016ad83Smrg fi 72701016ad83Smrg ;; 72711016ad83Smrg esac 72721016ad83Smrg AC_MSG_RESULT([$enable_shared]) 72731016ad83Smrg 72741016ad83Smrg AC_MSG_CHECKING([whether to build static libraries]) 72751016ad83Smrg # Make sure either enable_shared or enable_static is yes. 72761016ad83Smrg test "$enable_shared" = yes || enable_static=yes 72771016ad83Smrg AC_MSG_RESULT([$enable_static]) 72781016ad83Smrg 72791016ad83Smrg _LT_TAGVAR(GCC, $1)="$G77" 72801016ad83Smrg _LT_TAGVAR(LD, $1)="$LD" 72811016ad83Smrg 72821016ad83Smrg ## CAVEAT EMPTOR: 72831016ad83Smrg ## There is no encapsulation within the following macros, do not change 72841016ad83Smrg ## the running order or otherwise move them around unless you know exactly 72851016ad83Smrg ## what you are doing... 72861016ad83Smrg _LT_COMPILER_PIC($1) 72871016ad83Smrg _LT_COMPILER_C_O($1) 72881016ad83Smrg _LT_COMPILER_FILE_LOCKS($1) 72891016ad83Smrg _LT_LINKER_SHLIBS($1) 72901016ad83Smrg _LT_SYS_DYNAMIC_LINKER($1) 72911016ad83Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 72921016ad83Smrg 72931016ad83Smrg _LT_CONFIG($1) 72941016ad83Smrg fi # test -n "$compiler" 72951016ad83Smrg 72961016ad83Smrg GCC=$lt_save_GCC 72971016ad83Smrg CC="$lt_save_CC" 72981016ad83Smrg CFLAGS="$lt_save_CFLAGS" 72991016ad83Smrgfi # test "$_lt_disable_F77" != yes 73001016ad83Smrg 73011016ad83SmrgAC_LANG_POP 73021016ad83Smrg])# _LT_LANG_F77_CONFIG 73031016ad83Smrg 73041016ad83Smrg 73051016ad83Smrg# _LT_LANG_FC_CONFIG([TAG]) 73061016ad83Smrg# ------------------------- 73071016ad83Smrg# Ensure that the configuration variables for a Fortran compiler are 73081016ad83Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 73091016ad83Smrg# to write the compiler configuration to `libtool'. 73101016ad83Smrgm4_defun([_LT_LANG_FC_CONFIG], 73111016ad83Smrg[AC_LANG_PUSH(Fortran) 73121016ad83Smrg 73131016ad83Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 73141016ad83Smrg _lt_disable_FC=yes 73151016ad83Smrgfi 73161016ad83Smrg 73171016ad83Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 73181016ad83Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 73191016ad83Smrg_LT_TAGVAR(always_export_symbols, $1)=no 73201016ad83Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 73211016ad83Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 73221016ad83Smrg_LT_TAGVAR(hardcode_direct, $1)=no 73231016ad83Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 73241016ad83Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 73251016ad83Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 73261016ad83Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 73271016ad83Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 73281016ad83Smrg_LT_TAGVAR(inherit_rpath, $1)=no 73291016ad83Smrg_LT_TAGVAR(module_cmds, $1)= 73301016ad83Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 73311016ad83Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 73321016ad83Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 73331016ad83Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 73341016ad83Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 73351016ad83Smrg_LT_TAGVAR(no_undefined_flag, $1)= 73361016ad83Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 73371016ad83Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 73381016ad83Smrg 73391016ad83Smrg# Source file extension for fc test sources. 73401016ad83Smrgac_ext=${ac_fc_srcext-f} 73411016ad83Smrg 73421016ad83Smrg# Object file extension for compiled fc test sources. 73431016ad83Smrgobjext=o 73441016ad83Smrg_LT_TAGVAR(objext, $1)=$objext 73451016ad83Smrg 73461016ad83Smrg# No sense in running all these tests if we already determined that 73471016ad83Smrg# the FC compiler isn't working. Some variables (like enable_shared) 73481016ad83Smrg# are currently assumed to apply to all compilers on this platform, 73491016ad83Smrg# and will be corrupted by setting them based on a non-working compiler. 73501016ad83Smrgif test "$_lt_disable_FC" != yes; then 73511016ad83Smrg # Code to be used in simple compile tests 73521016ad83Smrg lt_simple_compile_test_code="\ 73531016ad83Smrg subroutine t 73541016ad83Smrg return 73551016ad83Smrg end 73561016ad83Smrg" 73571016ad83Smrg 73581016ad83Smrg # Code to be used in simple link tests 73591016ad83Smrg lt_simple_link_test_code="\ 73601016ad83Smrg program t 73611016ad83Smrg end 73621016ad83Smrg" 73631016ad83Smrg 73641016ad83Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 73651016ad83Smrg _LT_TAG_COMPILER 73661016ad83Smrg 73671016ad83Smrg # save warnings/boilerplate of simple test code 73681016ad83Smrg _LT_COMPILER_BOILERPLATE 73691016ad83Smrg _LT_LINKER_BOILERPLATE 73701016ad83Smrg 73711016ad83Smrg # Allow CC to be a program name with arguments. 73721016ad83Smrg lt_save_CC="$CC" 73731016ad83Smrg lt_save_GCC=$GCC 73741016ad83Smrg lt_save_CFLAGS=$CFLAGS 73751016ad83Smrg CC=${FC-"f95"} 73761016ad83Smrg CFLAGS=$FCFLAGS 73771016ad83Smrg compiler=$CC 73781016ad83Smrg GCC=$ac_cv_fc_compiler_gnu 73791016ad83Smrg 73801016ad83Smrg _LT_TAGVAR(compiler, $1)=$CC 73811016ad83Smrg _LT_CC_BASENAME([$compiler]) 73821016ad83Smrg 73831016ad83Smrg if test -n "$compiler"; then 73841016ad83Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 73851016ad83Smrg AC_MSG_RESULT([$can_build_shared]) 73861016ad83Smrg 73871016ad83Smrg AC_MSG_CHECKING([whether to build shared libraries]) 73881016ad83Smrg test "$can_build_shared" = "no" && enable_shared=no 73891016ad83Smrg 73901016ad83Smrg # On AIX, shared libraries and static libraries use the same namespace, and 73911016ad83Smrg # are all built from PIC. 73921016ad83Smrg case $host_os in 73931016ad83Smrg aix3*) 73941016ad83Smrg test "$enable_shared" = yes && enable_static=no 73951016ad83Smrg if test -n "$RANLIB"; then 73961016ad83Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 73971016ad83Smrg postinstall_cmds='$RANLIB $lib' 73981016ad83Smrg fi 73991016ad83Smrg ;; 74001016ad83Smrg aix[[4-9]]*) 74011016ad83Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 74021016ad83Smrg test "$enable_shared" = yes && enable_static=no 74031016ad83Smrg fi 74041016ad83Smrg ;; 74051016ad83Smrg esac 74061016ad83Smrg AC_MSG_RESULT([$enable_shared]) 74071016ad83Smrg 74081016ad83Smrg AC_MSG_CHECKING([whether to build static libraries]) 74091016ad83Smrg # Make sure either enable_shared or enable_static is yes. 74101016ad83Smrg test "$enable_shared" = yes || enable_static=yes 74111016ad83Smrg AC_MSG_RESULT([$enable_static]) 74121016ad83Smrg 74131016ad83Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 74141016ad83Smrg _LT_TAGVAR(LD, $1)="$LD" 74151016ad83Smrg 74161016ad83Smrg ## CAVEAT EMPTOR: 74171016ad83Smrg ## There is no encapsulation within the following macros, do not change 74181016ad83Smrg ## the running order or otherwise move them around unless you know exactly 74191016ad83Smrg ## what you are doing... 74201016ad83Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 74211016ad83Smrg _LT_COMPILER_PIC($1) 74221016ad83Smrg _LT_COMPILER_C_O($1) 74231016ad83Smrg _LT_COMPILER_FILE_LOCKS($1) 74241016ad83Smrg _LT_LINKER_SHLIBS($1) 74251016ad83Smrg _LT_SYS_DYNAMIC_LINKER($1) 74261016ad83Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 74271016ad83Smrg 74281016ad83Smrg _LT_CONFIG($1) 74291016ad83Smrg fi # test -n "$compiler" 74301016ad83Smrg 74311016ad83Smrg GCC=$lt_save_GCC 74321016ad83Smrg CC=$lt_save_CC 74331016ad83Smrg CFLAGS=$lt_save_CFLAGS 74341016ad83Smrgfi # test "$_lt_disable_FC" != yes 74351016ad83Smrg 74361016ad83SmrgAC_LANG_POP 74371016ad83Smrg])# _LT_LANG_FC_CONFIG 74381016ad83Smrg 74391016ad83Smrg 74401016ad83Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 74411016ad83Smrg# -------------------------- 74421016ad83Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 74431016ad83Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 74441016ad83Smrg# to write the compiler configuration to `libtool'. 74451016ad83Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 74461016ad83Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 74471016ad83SmrgAC_LANG_SAVE 74481016ad83Smrg 74491016ad83Smrg# Source file extension for Java test sources. 74501016ad83Smrgac_ext=java 74511016ad83Smrg 74521016ad83Smrg# Object file extension for compiled Java test sources. 74531016ad83Smrgobjext=o 74541016ad83Smrg_LT_TAGVAR(objext, $1)=$objext 74551016ad83Smrg 74561016ad83Smrg# Code to be used in simple compile tests 74571016ad83Smrglt_simple_compile_test_code="class foo {}" 74581016ad83Smrg 74591016ad83Smrg# Code to be used in simple link tests 74601016ad83Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 74611016ad83Smrg 74621016ad83Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 74631016ad83Smrg_LT_TAG_COMPILER 74641016ad83Smrg 74651016ad83Smrg# save warnings/boilerplate of simple test code 74661016ad83Smrg_LT_COMPILER_BOILERPLATE 74671016ad83Smrg_LT_LINKER_BOILERPLATE 74681016ad83Smrg 74691016ad83Smrg# Allow CC to be a program name with arguments. 74701016ad83Smrglt_save_CC=$CC 74711016ad83Smrglt_save_CFLAGS=$CFLAGS 74721016ad83Smrglt_save_GCC=$GCC 74731016ad83SmrgGCC=yes 74741016ad83SmrgCC=${GCJ-"gcj"} 74751016ad83SmrgCFLAGS=$GCJFLAGS 74761016ad83Smrgcompiler=$CC 74771016ad83Smrg_LT_TAGVAR(compiler, $1)=$CC 74781016ad83Smrg_LT_TAGVAR(LD, $1)="$LD" 74791016ad83Smrg_LT_CC_BASENAME([$compiler]) 74801016ad83Smrg 74811016ad83Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 74821016ad83Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 74831016ad83Smrg 74841016ad83Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 74851016ad83Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 74861016ad83Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 74871016ad83Smrg 74881016ad83Smrg## CAVEAT EMPTOR: 74891016ad83Smrg## There is no encapsulation within the following macros, do not change 74901016ad83Smrg## the running order or otherwise move them around unless you know exactly 74911016ad83Smrg## what you are doing... 74921016ad83Smrgif test -n "$compiler"; then 74931016ad83Smrg _LT_COMPILER_NO_RTTI($1) 74941016ad83Smrg _LT_COMPILER_PIC($1) 74951016ad83Smrg _LT_COMPILER_C_O($1) 74961016ad83Smrg _LT_COMPILER_FILE_LOCKS($1) 74971016ad83Smrg _LT_LINKER_SHLIBS($1) 74981016ad83Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 74991016ad83Smrg 75001016ad83Smrg _LT_CONFIG($1) 75011016ad83Smrgfi 75021016ad83Smrg 75031016ad83SmrgAC_LANG_RESTORE 75041016ad83Smrg 75051016ad83SmrgGCC=$lt_save_GCC 75061016ad83SmrgCC=$lt_save_CC 75071016ad83SmrgCFLAGS=$lt_save_CFLAGS 75081016ad83Smrg])# _LT_LANG_GCJ_CONFIG 75091016ad83Smrg 75101016ad83Smrg 75111016ad83Smrg# _LT_LANG_GO_CONFIG([TAG]) 75121016ad83Smrg# -------------------------- 75131016ad83Smrg# Ensure that the configuration variables for the GNU Go compiler 75141016ad83Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 75151016ad83Smrg# to write the compiler configuration to `libtool'. 75161016ad83Smrgm4_defun([_LT_LANG_GO_CONFIG], 75171016ad83Smrg[AC_REQUIRE([LT_PROG_GO])dnl 75181016ad83SmrgAC_LANG_SAVE 75191016ad83Smrg 75201016ad83Smrg# Source file extension for Go test sources. 75211016ad83Smrgac_ext=go 75221016ad83Smrg 75231016ad83Smrg# Object file extension for compiled Go test sources. 75241016ad83Smrgobjext=o 75251016ad83Smrg_LT_TAGVAR(objext, $1)=$objext 75261016ad83Smrg 75271016ad83Smrg# Code to be used in simple compile tests 75281016ad83Smrglt_simple_compile_test_code="package main; func main() { }" 75291016ad83Smrg 75301016ad83Smrg# Code to be used in simple link tests 75311016ad83Smrglt_simple_link_test_code='package main; func main() { }' 75321016ad83Smrg 75331016ad83Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 75341016ad83Smrg_LT_TAG_COMPILER 75351016ad83Smrg 75361016ad83Smrg# save warnings/boilerplate of simple test code 75371016ad83Smrg_LT_COMPILER_BOILERPLATE 75381016ad83Smrg_LT_LINKER_BOILERPLATE 75391016ad83Smrg 75401016ad83Smrg# Allow CC to be a program name with arguments. 75411016ad83Smrglt_save_CC=$CC 75421016ad83Smrglt_save_CFLAGS=$CFLAGS 75431016ad83Smrglt_save_GCC=$GCC 75441016ad83SmrgGCC=yes 75451016ad83SmrgCC=${GOC-"gccgo"} 75461016ad83SmrgCFLAGS=$GOFLAGS 75471016ad83Smrgcompiler=$CC 75481016ad83Smrg_LT_TAGVAR(compiler, $1)=$CC 75491016ad83Smrg_LT_TAGVAR(LD, $1)="$LD" 75501016ad83Smrg_LT_CC_BASENAME([$compiler]) 75511016ad83Smrg 75521016ad83Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 75531016ad83Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 75541016ad83Smrg 75551016ad83Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 75561016ad83Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 75571016ad83Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 75581016ad83Smrg 75591016ad83Smrg## CAVEAT EMPTOR: 75601016ad83Smrg## There is no encapsulation within the following macros, do not change 75611016ad83Smrg## the running order or otherwise move them around unless you know exactly 75621016ad83Smrg## what you are doing... 75631016ad83Smrgif test -n "$compiler"; then 75641016ad83Smrg _LT_COMPILER_NO_RTTI($1) 75651016ad83Smrg _LT_COMPILER_PIC($1) 75661016ad83Smrg _LT_COMPILER_C_O($1) 75671016ad83Smrg _LT_COMPILER_FILE_LOCKS($1) 75681016ad83Smrg _LT_LINKER_SHLIBS($1) 75691016ad83Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 75701016ad83Smrg 75711016ad83Smrg _LT_CONFIG($1) 75721016ad83Smrgfi 75731016ad83Smrg 75741016ad83SmrgAC_LANG_RESTORE 75751016ad83Smrg 75761016ad83SmrgGCC=$lt_save_GCC 75771016ad83SmrgCC=$lt_save_CC 75781016ad83SmrgCFLAGS=$lt_save_CFLAGS 75791016ad83Smrg])# _LT_LANG_GO_CONFIG 75801016ad83Smrg 75811016ad83Smrg 75821016ad83Smrg# _LT_LANG_RC_CONFIG([TAG]) 75831016ad83Smrg# ------------------------- 75841016ad83Smrg# Ensure that the configuration variables for the Windows resource compiler 75851016ad83Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 75861016ad83Smrg# to write the compiler configuration to `libtool'. 75871016ad83Smrgm4_defun([_LT_LANG_RC_CONFIG], 75881016ad83Smrg[AC_REQUIRE([LT_PROG_RC])dnl 75891016ad83SmrgAC_LANG_SAVE 75901016ad83Smrg 75911016ad83Smrg# Source file extension for RC test sources. 75921016ad83Smrgac_ext=rc 75931016ad83Smrg 75941016ad83Smrg# Object file extension for compiled RC test sources. 75951016ad83Smrgobjext=o 75961016ad83Smrg_LT_TAGVAR(objext, $1)=$objext 75971016ad83Smrg 75981016ad83Smrg# Code to be used in simple compile tests 75991016ad83Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 76001016ad83Smrg 76011016ad83Smrg# Code to be used in simple link tests 76021016ad83Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 76031016ad83Smrg 76041016ad83Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 76051016ad83Smrg_LT_TAG_COMPILER 76061016ad83Smrg 76071016ad83Smrg# save warnings/boilerplate of simple test code 76081016ad83Smrg_LT_COMPILER_BOILERPLATE 76091016ad83Smrg_LT_LINKER_BOILERPLATE 76101016ad83Smrg 76111016ad83Smrg# Allow CC to be a program name with arguments. 76121016ad83Smrglt_save_CC="$CC" 76131016ad83Smrglt_save_CFLAGS=$CFLAGS 76141016ad83Smrglt_save_GCC=$GCC 76151016ad83SmrgGCC= 76161016ad83SmrgCC=${RC-"windres"} 76171016ad83SmrgCFLAGS= 76181016ad83Smrgcompiler=$CC 76191016ad83Smrg_LT_TAGVAR(compiler, $1)=$CC 76201016ad83Smrg_LT_CC_BASENAME([$compiler]) 76211016ad83Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 76221016ad83Smrg 76231016ad83Smrgif test -n "$compiler"; then 76241016ad83Smrg : 76251016ad83Smrg _LT_CONFIG($1) 76261016ad83Smrgfi 76271016ad83Smrg 76281016ad83SmrgGCC=$lt_save_GCC 76291016ad83SmrgAC_LANG_RESTORE 76301016ad83SmrgCC=$lt_save_CC 76311016ad83SmrgCFLAGS=$lt_save_CFLAGS 76321016ad83Smrg])# _LT_LANG_RC_CONFIG 76331016ad83Smrg 76341016ad83Smrg 76351016ad83Smrg# LT_PROG_GCJ 76361016ad83Smrg# ----------- 76371016ad83SmrgAC_DEFUN([LT_PROG_GCJ], 76381016ad83Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 76391016ad83Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 76401016ad83Smrg [AC_CHECK_TOOL(GCJ, gcj,) 76411016ad83Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 76421016ad83Smrg AC_SUBST(GCJFLAGS)])])[]dnl 76431016ad83Smrg]) 76441016ad83Smrg 76451016ad83Smrg# Old name: 76461016ad83SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 76471016ad83Smrgdnl aclocal-1.4 backwards compatibility: 76481016ad83Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 76491016ad83Smrg 76501016ad83Smrg 76511016ad83Smrg# LT_PROG_GO 76521016ad83Smrg# ---------- 76531016ad83SmrgAC_DEFUN([LT_PROG_GO], 76541016ad83Smrg[AC_CHECK_TOOL(GOC, gccgo,) 76551016ad83Smrg]) 76561016ad83Smrg 76571016ad83Smrg 76581016ad83Smrg# LT_PROG_RC 76591016ad83Smrg# ---------- 76601016ad83SmrgAC_DEFUN([LT_PROG_RC], 76611016ad83Smrg[AC_CHECK_TOOL(RC, windres,) 76621016ad83Smrg]) 76631016ad83Smrg 76641016ad83Smrg# Old name: 76651016ad83SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 76661016ad83Smrgdnl aclocal-1.4 backwards compatibility: 76671016ad83Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 76681016ad83Smrg 76691016ad83Smrg 76701016ad83Smrg# _LT_DECL_EGREP 76711016ad83Smrg# -------------- 76721016ad83Smrg# If we don't have a new enough Autoconf to choose the best grep 76731016ad83Smrg# available, choose the one first in the user's PATH. 76741016ad83Smrgm4_defun([_LT_DECL_EGREP], 76751016ad83Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 76761016ad83SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 76771016ad83Smrgtest -z "$GREP" && GREP=grep 76781016ad83Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 76791016ad83Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 76801016ad83Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 76811016ad83Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 76821016ad83SmrgAC_SUBST([GREP]) 76831016ad83Smrg]) 76841016ad83Smrg 76851016ad83Smrg 76861016ad83Smrg# _LT_DECL_OBJDUMP 76871016ad83Smrg# -------------- 76881016ad83Smrg# If we don't have a new enough Autoconf to choose the best objdump 76891016ad83Smrg# available, choose the one first in the user's PATH. 76901016ad83Smrgm4_defun([_LT_DECL_OBJDUMP], 76911016ad83Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 76921016ad83Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 76931016ad83Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 76941016ad83SmrgAC_SUBST([OBJDUMP]) 76951016ad83Smrg]) 76961016ad83Smrg 76971016ad83Smrg# _LT_DECL_DLLTOOL 76981016ad83Smrg# ---------------- 76991016ad83Smrg# Ensure DLLTOOL variable is set. 77001016ad83Smrgm4_defun([_LT_DECL_DLLTOOL], 77011016ad83Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 77021016ad83Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 77031016ad83Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 77041016ad83SmrgAC_SUBST([DLLTOOL]) 77051016ad83Smrg]) 77061016ad83Smrg 77071016ad83Smrg# _LT_DECL_SED 77081016ad83Smrg# ------------ 77091016ad83Smrg# Check for a fully-functional sed program, that truncates 77101016ad83Smrg# as few characters as possible. Prefer GNU sed if found. 77111016ad83Smrgm4_defun([_LT_DECL_SED], 77121016ad83Smrg[AC_PROG_SED 77131016ad83Smrgtest -z "$SED" && SED=sed 77141016ad83SmrgXsed="$SED -e 1s/^X//" 77151016ad83Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 77161016ad83Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 77171016ad83Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 77181016ad83Smrg])# _LT_DECL_SED 77191016ad83Smrg 77201016ad83Smrgm4_ifndef([AC_PROG_SED], [ 77211016ad83Smrg############################################################ 77221016ad83Smrg# NOTE: This macro has been submitted for inclusion into # 77231016ad83Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 77241016ad83Smrg# a released version of Autoconf we should remove this # 77251016ad83Smrg# macro and use it instead. # 77261016ad83Smrg############################################################ 77271016ad83Smrg 77281016ad83Smrgm4_defun([AC_PROG_SED], 77291016ad83Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 77301016ad83SmrgAC_CACHE_VAL(lt_cv_path_SED, 77311016ad83Smrg[# Loop through the user's path and test for sed and gsed. 77321016ad83Smrg# Then use that list of sed's as ones to test for truncation. 77331016ad83Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 77341016ad83Smrgfor as_dir in $PATH 77351016ad83Smrgdo 77361016ad83Smrg IFS=$as_save_IFS 77371016ad83Smrg test -z "$as_dir" && as_dir=. 77381016ad83Smrg for lt_ac_prog in sed gsed; do 77391016ad83Smrg for ac_exec_ext in '' $ac_executable_extensions; do 77401016ad83Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 77411016ad83Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 77421016ad83Smrg fi 77431016ad83Smrg done 77441016ad83Smrg done 77451016ad83Smrgdone 77461016ad83SmrgIFS=$as_save_IFS 77471016ad83Smrglt_ac_max=0 77481016ad83Smrglt_ac_count=0 77491016ad83Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 77501016ad83Smrg# along with /bin/sed that truncates output. 77511016ad83Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 77521016ad83Smrg test ! -f $lt_ac_sed && continue 77531016ad83Smrg cat /dev/null > conftest.in 77541016ad83Smrg lt_ac_count=0 77551016ad83Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 77561016ad83Smrg # Check for GNU sed and select it if it is found. 77571016ad83Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 77581016ad83Smrg lt_cv_path_SED=$lt_ac_sed 77591016ad83Smrg break 77601016ad83Smrg fi 77611016ad83Smrg while true; do 77621016ad83Smrg cat conftest.in conftest.in >conftest.tmp 77631016ad83Smrg mv conftest.tmp conftest.in 77641016ad83Smrg cp conftest.in conftest.nl 77651016ad83Smrg echo >>conftest.nl 77661016ad83Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 77671016ad83Smrg cmp -s conftest.out conftest.nl || break 77681016ad83Smrg # 10000 chars as input seems more than enough 77691016ad83Smrg test $lt_ac_count -gt 10 && break 77701016ad83Smrg lt_ac_count=`expr $lt_ac_count + 1` 77711016ad83Smrg if test $lt_ac_count -gt $lt_ac_max; then 77721016ad83Smrg lt_ac_max=$lt_ac_count 77731016ad83Smrg lt_cv_path_SED=$lt_ac_sed 77741016ad83Smrg fi 77751016ad83Smrg done 77761016ad83Smrgdone 77771016ad83Smrg]) 77781016ad83SmrgSED=$lt_cv_path_SED 77791016ad83SmrgAC_SUBST([SED]) 77801016ad83SmrgAC_MSG_RESULT([$SED]) 77811016ad83Smrg])#AC_PROG_SED 77821016ad83Smrg])#m4_ifndef 77831016ad83Smrg 77841016ad83Smrg# Old name: 77851016ad83SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 77861016ad83Smrgdnl aclocal-1.4 backwards compatibility: 77871016ad83Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 77881016ad83Smrg 77891016ad83Smrg 77901016ad83Smrg# _LT_CHECK_SHELL_FEATURES 77911016ad83Smrg# ------------------------ 77921016ad83Smrg# Find out whether the shell is Bourne or XSI compatible, 77931016ad83Smrg# or has some other useful features. 77941016ad83Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 77951016ad83Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 77961016ad83Smrg# Try some XSI features 77971016ad83Smrgxsi_shell=no 77981016ad83Smrg( _lt_dummy="a/b/c" 77991016ad83Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 78001016ad83Smrg = c,a/b,b/c, \ 78011016ad83Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 78021016ad83Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 78031016ad83Smrg && xsi_shell=yes 78041016ad83SmrgAC_MSG_RESULT([$xsi_shell]) 78051016ad83Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 78061016ad83Smrg 78071016ad83SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 78081016ad83Smrglt_shell_append=no 78091016ad83Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 78101016ad83Smrg >/dev/null 2>&1 \ 78111016ad83Smrg && lt_shell_append=yes 78121016ad83SmrgAC_MSG_RESULT([$lt_shell_append]) 78131016ad83Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 78141016ad83Smrg 78151016ad83Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 78161016ad83Smrg lt_unset=unset 78171016ad83Smrgelse 78181016ad83Smrg lt_unset=false 78191016ad83Smrgfi 78201016ad83Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 78211016ad83Smrg 78221016ad83Smrg# test EBCDIC or ASCII 78231016ad83Smrgcase `echo X|tr X '\101'` in 78241016ad83Smrg A) # ASCII based system 78251016ad83Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 78261016ad83Smrg lt_SP2NL='tr \040 \012' 78271016ad83Smrg lt_NL2SP='tr \015\012 \040\040' 78281016ad83Smrg ;; 78291016ad83Smrg *) # EBCDIC based system 78301016ad83Smrg lt_SP2NL='tr \100 \n' 78311016ad83Smrg lt_NL2SP='tr \r\n \100\100' 78321016ad83Smrg ;; 78331016ad83Smrgesac 78341016ad83Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 78351016ad83Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 78361016ad83Smrg])# _LT_CHECK_SHELL_FEATURES 78371016ad83Smrg 78381016ad83Smrg 78391016ad83Smrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 78401016ad83Smrg# ------------------------------------------------------ 78411016ad83Smrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 78421016ad83Smrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 78431016ad83Smrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 78441016ad83Smrg[dnl { 78451016ad83Smrgsed -e '/^$1 ()$/,/^} # $1 /c\ 78461016ad83Smrg$1 ()\ 78471016ad83Smrg{\ 78481016ad83Smrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 78491016ad83Smrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 78501016ad83Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 78511016ad83Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 78521016ad83Smrgtest 0 -eq $? || _lt_function_replace_fail=: 78531016ad83Smrg]) 78541016ad83Smrg 78551016ad83Smrg 78561016ad83Smrg# _LT_PROG_REPLACE_SHELLFNS 78571016ad83Smrg# ------------------------- 78581016ad83Smrg# Replace existing portable implementations of several shell functions with 78591016ad83Smrg# equivalent extended shell implementations where those features are available.. 78601016ad83Smrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 78611016ad83Smrg[if test x"$xsi_shell" = xyes; then 78621016ad83Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 78631016ad83Smrg case ${1} in 78641016ad83Smrg */*) func_dirname_result="${1%/*}${2}" ;; 78651016ad83Smrg * ) func_dirname_result="${3}" ;; 78661016ad83Smrg esac]) 78671016ad83Smrg 78681016ad83Smrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 78691016ad83Smrg func_basename_result="${1##*/}"]) 78701016ad83Smrg 78711016ad83Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 78721016ad83Smrg case ${1} in 78731016ad83Smrg */*) func_dirname_result="${1%/*}${2}" ;; 78741016ad83Smrg * ) func_dirname_result="${3}" ;; 78751016ad83Smrg esac 78761016ad83Smrg func_basename_result="${1##*/}"]) 78771016ad83Smrg 78781016ad83Smrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 78791016ad83Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 78801016ad83Smrg # positional parameters, so assign one to ordinary parameter first. 78811016ad83Smrg func_stripname_result=${3} 78821016ad83Smrg func_stripname_result=${func_stripname_result#"${1}"} 78831016ad83Smrg func_stripname_result=${func_stripname_result%"${2}"}]) 78841016ad83Smrg 78851016ad83Smrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 78861016ad83Smrg func_split_long_opt_name=${1%%=*} 78871016ad83Smrg func_split_long_opt_arg=${1#*=}]) 78881016ad83Smrg 78891016ad83Smrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 78901016ad83Smrg func_split_short_opt_arg=${1#??} 78911016ad83Smrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 78921016ad83Smrg 78931016ad83Smrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 78941016ad83Smrg case ${1} in 78951016ad83Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 78961016ad83Smrg *) func_lo2o_result=${1} ;; 78971016ad83Smrg esac]) 78981016ad83Smrg 78991016ad83Smrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 79001016ad83Smrg 79011016ad83Smrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 79021016ad83Smrg 79031016ad83Smrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 79041016ad83Smrgfi 79051016ad83Smrg 79061016ad83Smrgif test x"$lt_shell_append" = xyes; then 79071016ad83Smrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 79081016ad83Smrg 79091016ad83Smrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 79101016ad83Smrg func_quote_for_eval "${2}" 79111016ad83Smrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 79121016ad83Smrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 79131016ad83Smrg 79141016ad83Smrg # Save a `func_append' function call where possible by direct use of '+=' 79151016ad83Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 79161016ad83Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 79171016ad83Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 79181016ad83Smrg test 0 -eq $? || _lt_function_replace_fail=: 79191016ad83Smrgelse 79201016ad83Smrg # Save a `func_append' function call even when '+=' is not available 79211016ad83Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 79221016ad83Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 79231016ad83Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 79241016ad83Smrg test 0 -eq $? || _lt_function_replace_fail=: 79251016ad83Smrgfi 79261016ad83Smrg 79271016ad83Smrgif test x"$_lt_function_replace_fail" = x":"; then 79281016ad83Smrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 79291016ad83Smrgfi 79301016ad83Smrg]) 79311016ad83Smrg 79321016ad83Smrg# _LT_PATH_CONVERSION_FUNCTIONS 79331016ad83Smrg# ----------------------------- 79341016ad83Smrg# Determine which file name conversion functions should be used by 79351016ad83Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 79361016ad83Smrg# for certain cross-compile configurations and native mingw. 79371016ad83Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 79381016ad83Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 79391016ad83SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 79401016ad83SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 79411016ad83SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 79421016ad83Smrg[case $host in 79431016ad83Smrg *-*-mingw* ) 79441016ad83Smrg case $build in 79451016ad83Smrg *-*-mingw* ) # actually msys 79461016ad83Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 79471016ad83Smrg ;; 79481016ad83Smrg *-*-cygwin* ) 79491016ad83Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 79501016ad83Smrg ;; 79511016ad83Smrg * ) # otherwise, assume *nix 79521016ad83Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 79531016ad83Smrg ;; 79541016ad83Smrg esac 79551016ad83Smrg ;; 79561016ad83Smrg *-*-cygwin* ) 79571016ad83Smrg case $build in 79581016ad83Smrg *-*-mingw* ) # actually msys 79591016ad83Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 79601016ad83Smrg ;; 79611016ad83Smrg *-*-cygwin* ) 79621016ad83Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 79631016ad83Smrg ;; 79641016ad83Smrg * ) # otherwise, assume *nix 79651016ad83Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 79661016ad83Smrg ;; 79671016ad83Smrg esac 79681016ad83Smrg ;; 79691016ad83Smrg * ) # unhandled hosts (and "normal" native builds) 79701016ad83Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 79711016ad83Smrg ;; 79721016ad83Smrgesac 79731016ad83Smrg]) 79741016ad83Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 79751016ad83SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 79761016ad83Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 79771016ad83Smrg [0], [convert $build file names to $host format])dnl 79781016ad83Smrg 79791016ad83SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 79801016ad83SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 79811016ad83Smrg[#assume ordinary cross tools, or native build. 79821016ad83Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 79831016ad83Smrgcase $host in 79841016ad83Smrg *-*-mingw* ) 79851016ad83Smrg case $build in 79861016ad83Smrg *-*-mingw* ) # actually msys 79871016ad83Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 79881016ad83Smrg ;; 79891016ad83Smrg esac 79901016ad83Smrg ;; 79911016ad83Smrgesac 79921016ad83Smrg]) 79931016ad83Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 79941016ad83SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 79951016ad83Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 79961016ad83Smrg [0], [convert $build files to toolchain format])dnl 79971016ad83Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 7998