11016ad83Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 21016ad83Smrg# 3b9526c6aSmrg# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software 4b9526c6aSmrg# Foundation, Inc. 51016ad83Smrg# Written by Gordon Matzigkeit, 1996 61016ad83Smrg# 71016ad83Smrg# This file is free software; the Free Software Foundation gives 81016ad83Smrg# unlimited permission to copy and/or distribute it, with or without 91016ad83Smrg# modifications, as long as this notice is preserved. 101016ad83Smrg 111016ad83Smrgm4_define([_LT_COPYING], [dnl 127204935cSmrg# Copyright (C) 2014 Free Software Foundation, Inc. 137204935cSmrg# This is free software; see the source for copying conditions. There is NO 147204935cSmrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 157204935cSmrg 167204935cSmrg# GNU Libtool is free software; you can redistribute it and/or modify 177204935cSmrg# it under the terms of the GNU General Public License as published by 187204935cSmrg# the Free Software Foundation; either version 2 of of the License, or 197204935cSmrg# (at your option) any later version. 201016ad83Smrg# 217204935cSmrg# As a special exception to the GNU General Public License, if you 227204935cSmrg# distribute this file as part of a program or library that is built 237204935cSmrg# using GNU Libtool, you may include this file under the same 247204935cSmrg# distribution terms that you use for the rest of that program. 251016ad83Smrg# 267204935cSmrg# GNU Libtool is distributed in the hope that it will be useful, but 277204935cSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 281016ad83Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 291016ad83Smrg# GNU General Public License for more details. 301016ad83Smrg# 311016ad83Smrg# You should have received a copy of the GNU General Public License 327204935cSmrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 331016ad83Smrg]) 341016ad83Smrg 35b9526c6aSmrg# serial 59 LT_INIT 361016ad83Smrg 371016ad83Smrg 381016ad83Smrg# LT_PREREQ(VERSION) 391016ad83Smrg# ------------------ 401016ad83Smrg# Complain and exit if this libtool version is less that VERSION. 411016ad83Smrgm4_defun([LT_PREREQ], 421016ad83Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 431016ad83Smrg [m4_default([$3], 441016ad83Smrg [m4_fatal([Libtool version $1 or higher is required], 451016ad83Smrg 63)])], 461016ad83Smrg [$2])]) 471016ad83Smrg 481016ad83Smrg 491016ad83Smrg# _LT_CHECK_BUILDDIR 501016ad83Smrg# ------------------ 511016ad83Smrg# Complain if the absolute build directory name contains unusual characters 521016ad83Smrgm4_defun([_LT_CHECK_BUILDDIR], 531016ad83Smrg[case `pwd` in 541016ad83Smrg *\ * | *\ *) 551016ad83Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 561016ad83Smrgesac 571016ad83Smrg]) 581016ad83Smrg 591016ad83Smrg 601016ad83Smrg# LT_INIT([OPTIONS]) 611016ad83Smrg# ------------------ 621016ad83SmrgAC_DEFUN([LT_INIT], 637204935cSmrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 641016ad83SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 651016ad83SmrgAC_BEFORE([$0], [LT_LANG])dnl 661016ad83SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 671016ad83SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 681016ad83Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 691016ad83Smrg 701016ad83Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 711016ad83Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 721016ad83Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 731016ad83Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 741016ad83Smrgdnl unless we require an AC_DEFUNed macro: 751016ad83SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 761016ad83SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 771016ad83SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 781016ad83SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 791016ad83Smrgm4_require([_LT_PROG_LTMAIN])dnl 801016ad83Smrg 811016ad83Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 821016ad83Smrg 831016ad83Smrgdnl Parse OPTIONS 841016ad83Smrg_LT_SET_OPTIONS([$0], [$1]) 851016ad83Smrg 861016ad83Smrg# This can be used to rebuild libtool when needed 877204935cSmrgLIBTOOL_DEPS=$ltmain 881016ad83Smrg 891016ad83Smrg# Always use our own libtool. 901016ad83SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 911016ad83SmrgAC_SUBST(LIBTOOL)dnl 921016ad83Smrg 931016ad83Smrg_LT_SETUP 941016ad83Smrg 951016ad83Smrg# Only expand once: 961016ad83Smrgm4_define([LT_INIT]) 971016ad83Smrg])# LT_INIT 981016ad83Smrg 991016ad83Smrg# Old names: 1001016ad83SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 1011016ad83SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 1021016ad83Smrgdnl aclocal-1.4 backwards compatibility: 1031016ad83Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 1041016ad83Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1051016ad83Smrg 1061016ad83Smrg 1077204935cSmrg# _LT_PREPARE_CC_BASENAME 1087204935cSmrg# ----------------------- 1097204935cSmrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 1107204935cSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 1117204935cSmrgfunc_cc_basename () 1127204935cSmrg{ 1137204935cSmrg for cc_temp in @S|@*""; do 1147204935cSmrg case $cc_temp in 1157204935cSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 1167204935cSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 1177204935cSmrg \-*) ;; 1187204935cSmrg *) break;; 1197204935cSmrg esac 1207204935cSmrg done 1217204935cSmrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 1227204935cSmrg} 1237204935cSmrg])# _LT_PREPARE_CC_BASENAME 1247204935cSmrg 1257204935cSmrg 1261016ad83Smrg# _LT_CC_BASENAME(CC) 1271016ad83Smrg# ------------------- 1287204935cSmrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 1297204935cSmrg# but that macro is also expanded into generated libtool script, which 1307204935cSmrg# arranges for $SED and $ECHO to be set by different means. 1311016ad83Smrgm4_defun([_LT_CC_BASENAME], 1327204935cSmrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 1337204935cSmrgAC_REQUIRE([_LT_DECL_SED])dnl 1347204935cSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1357204935cSmrgfunc_cc_basename $1 1367204935cSmrgcc_basename=$func_cc_basename_result 1371016ad83Smrg]) 1381016ad83Smrg 1391016ad83Smrg 1401016ad83Smrg# _LT_FILEUTILS_DEFAULTS 1411016ad83Smrg# ---------------------- 1421016ad83Smrg# It is okay to use these file commands and assume they have been set 1437204935cSmrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 1441016ad83Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 1451016ad83Smrg[: ${CP="cp -f"} 1461016ad83Smrg: ${MV="mv -f"} 1471016ad83Smrg: ${RM="rm -f"} 1481016ad83Smrg])# _LT_FILEUTILS_DEFAULTS 1491016ad83Smrg 1501016ad83Smrg 1511016ad83Smrg# _LT_SETUP 1521016ad83Smrg# --------- 1531016ad83Smrgm4_defun([_LT_SETUP], 1541016ad83Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1551016ad83SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 1561016ad83SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 1571016ad83SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1581016ad83Smrg 1591016ad83Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 1601016ad83Smrgdnl 1611016ad83Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 1621016ad83Smrg_LT_DECL([], [host], [0])dnl 1631016ad83Smrg_LT_DECL([], [host_os], [0])dnl 1641016ad83Smrgdnl 1651016ad83Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 1661016ad83Smrg_LT_DECL([], [build], [0])dnl 1671016ad83Smrg_LT_DECL([], [build_os], [0])dnl 1681016ad83Smrgdnl 1691016ad83SmrgAC_REQUIRE([AC_PROG_CC])dnl 1701016ad83SmrgAC_REQUIRE([LT_PATH_LD])dnl 1711016ad83SmrgAC_REQUIRE([LT_PATH_NM])dnl 1721016ad83Smrgdnl 1731016ad83SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 1741016ad83Smrgtest -z "$LN_S" && LN_S="ln -s" 1751016ad83Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 1761016ad83Smrgdnl 1771016ad83SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 1781016ad83Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 1791016ad83Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 1801016ad83Smrgdnl 1811016ad83Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1821016ad83Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 1831016ad83Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 1841016ad83Smrgm4_require([_LT_CMD_RELOAD])dnl 185b9526c6aSmrgm4_require([_LT_DECL_FILECMD])dnl 1861016ad83Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 1871016ad83Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 1881016ad83Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 1891016ad83Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 1901016ad83Smrgm4_require([_LT_WITH_SYSROOT])dnl 1917204935cSmrgm4_require([_LT_CMD_TRUNCATE])dnl 1921016ad83Smrg 1931016ad83Smrg_LT_CONFIG_LIBTOOL_INIT([ 1947204935cSmrg# See if we are running on zsh, and set the options that allow our 1951016ad83Smrg# commands through without removal of \ escapes INIT. 1967204935cSmrgif test -n "\${ZSH_VERSION+set}"; then 1971016ad83Smrg setopt NO_GLOB_SUBST 1981016ad83Smrgfi 1991016ad83Smrg]) 2007204935cSmrgif test -n "${ZSH_VERSION+set}"; then 2011016ad83Smrg setopt NO_GLOB_SUBST 2021016ad83Smrgfi 2031016ad83Smrg 2041016ad83Smrg_LT_CHECK_OBJDIR 2051016ad83Smrg 2061016ad83Smrgm4_require([_LT_TAG_COMPILER])dnl 2071016ad83Smrg 2081016ad83Smrgcase $host_os in 2091016ad83Smrgaix3*) 2101016ad83Smrg # AIX sometimes has problems with the GCC collect2 program. For some 2111016ad83Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 2121016ad83Smrg # vanish in a puff of smoke. 2137204935cSmrg if test set != "${COLLECT_NAMES+set}"; then 2141016ad83Smrg COLLECT_NAMES= 2151016ad83Smrg export COLLECT_NAMES 2161016ad83Smrg fi 2171016ad83Smrg ;; 2181016ad83Smrgesac 2191016ad83Smrg 2201016ad83Smrg# Global variables: 2211016ad83Smrgofile=libtool 2221016ad83Smrgcan_build_shared=yes 2231016ad83Smrg 224b9526c6aSmrg# All known linkers require a '.a' archive for static linking (except MSVC and 225b9526c6aSmrg# ICC, which need '.lib'). 2261016ad83Smrglibext=a 2271016ad83Smrg 2287204935cSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 2291016ad83Smrg 2307204935cSmrgold_CC=$CC 2317204935cSmrgold_CFLAGS=$CFLAGS 2321016ad83Smrg 2331016ad83Smrg# Set sane defaults for various variables 2341016ad83Smrgtest -z "$CC" && CC=cc 2351016ad83Smrgtest -z "$LTCC" && LTCC=$CC 2361016ad83Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 2371016ad83Smrgtest -z "$LD" && LD=ld 2381016ad83Smrgtest -z "$ac_objext" && ac_objext=o 2391016ad83Smrg 2401016ad83Smrg_LT_CC_BASENAME([$compiler]) 2411016ad83Smrg 2421016ad83Smrg# Only perform the check for file, if the check method requires it 2431016ad83Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 2441016ad83Smrgcase $deplibs_check_method in 2451016ad83Smrgfile_magic*) 2461016ad83Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2471016ad83Smrg _LT_PATH_MAGIC 2481016ad83Smrg fi 2491016ad83Smrg ;; 2501016ad83Smrgesac 2511016ad83Smrg 2521016ad83Smrg# Use C for the default configuration in the libtool script 2531016ad83SmrgLT_SUPPORTED_TAG([CC]) 2541016ad83Smrg_LT_LANG_C_CONFIG 2551016ad83Smrg_LT_LANG_DEFAULT_CONFIG 2561016ad83Smrg_LT_CONFIG_COMMANDS 2571016ad83Smrg])# _LT_SETUP 2581016ad83Smrg 2591016ad83Smrg 2601016ad83Smrg# _LT_PREPARE_SED_QUOTE_VARS 2611016ad83Smrg# -------------------------- 2621016ad83Smrg# Define a few sed substitution that help us do robust quoting. 2631016ad83Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 2641016ad83Smrg[# Backslashify metacharacters that are still active within 2651016ad83Smrg# double-quoted strings. 2661016ad83Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 2671016ad83Smrg 2681016ad83Smrg# Same as above, but do not quote variable references. 2691016ad83Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 2701016ad83Smrg 2711016ad83Smrg# Sed substitution to delay expansion of an escaped shell variable in a 2721016ad83Smrg# double_quote_subst'ed string. 2731016ad83Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 2741016ad83Smrg 2751016ad83Smrg# Sed substitution to delay expansion of an escaped single quote. 2761016ad83Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 2771016ad83Smrg 2781016ad83Smrg# Sed substitution to avoid accidental globbing in evaled expressions 2791016ad83Smrgno_glob_subst='s/\*/\\\*/g' 2801016ad83Smrg]) 2811016ad83Smrg 2821016ad83Smrg# _LT_PROG_LTMAIN 2831016ad83Smrg# --------------- 2847204935cSmrg# Note that this code is called both from 'configure', and 'config.status' 2851016ad83Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 2867204935cSmrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 2871016ad83Smrg# so we pass a copy along to make sure it has a sensible value anyway. 2881016ad83Smrgm4_defun([_LT_PROG_LTMAIN], 2891016ad83Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 2901016ad83Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 2917204935cSmrgltmain=$ac_aux_dir/ltmain.sh 2921016ad83Smrg])# _LT_PROG_LTMAIN 2931016ad83Smrg 2941016ad83Smrg 2951016ad83Smrg## ------------------------------------- ## 2961016ad83Smrg## Accumulate code for creating libtool. ## 2971016ad83Smrg## ------------------------------------- ## 2981016ad83Smrg 2991016ad83Smrg# So that we can recreate a full libtool script including additional 3001016ad83Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 3017204935cSmrg# in macros and then make a single call at the end using the 'libtool' 3021016ad83Smrg# label. 3031016ad83Smrg 3041016ad83Smrg 3051016ad83Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 3061016ad83Smrg# ---------------------------------------- 3071016ad83Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3081016ad83Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 3091016ad83Smrg[m4_ifval([$1], 3101016ad83Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3111016ad83Smrg [$1 3121016ad83Smrg])])]) 3131016ad83Smrg 3141016ad83Smrg# Initialize. 3151016ad83Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 3161016ad83Smrg 3171016ad83Smrg 3181016ad83Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 3191016ad83Smrg# ------------------------------ 3201016ad83Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3211016ad83Smrgm4_define([_LT_CONFIG_LIBTOOL], 3221016ad83Smrg[m4_ifval([$1], 3231016ad83Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3241016ad83Smrg [$1 3251016ad83Smrg])])]) 3261016ad83Smrg 3271016ad83Smrg# Initialize. 3281016ad83Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3291016ad83Smrg 3301016ad83Smrg 3311016ad83Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3321016ad83Smrg# ----------------------------------------------------- 3331016ad83Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 3341016ad83Smrg[_LT_CONFIG_LIBTOOL([$1]) 3351016ad83Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 3361016ad83Smrg]) 3371016ad83Smrg 3381016ad83Smrg 3391016ad83Smrg# _LT_FORMAT_COMMENT([COMMENT]) 3401016ad83Smrg# ----------------------------- 3411016ad83Smrg# Add leading comment marks to the start of each line, and a trailing 3421016ad83Smrg# full-stop to the whole comment if one is not present already. 3431016ad83Smrgm4_define([_LT_FORMAT_COMMENT], 3441016ad83Smrg[m4_ifval([$1], [ 3451016ad83Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3461016ad83Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3471016ad83Smrg)]) 3481016ad83Smrg 3491016ad83Smrg 3501016ad83Smrg 3511016ad83Smrg## ------------------------ ## 3521016ad83Smrg## FIXME: Eliminate VARNAME ## 3531016ad83Smrg## ------------------------ ## 3541016ad83Smrg 3551016ad83Smrg 3561016ad83Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3571016ad83Smrg# ------------------------------------------------------------------- 3581016ad83Smrg# CONFIGNAME is the name given to the value in the libtool script. 3591016ad83Smrg# VARNAME is the (base) name used in the configure script. 3601016ad83Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3611016ad83Smrg# VARNAME. Any other value will be used directly. 3621016ad83Smrgm4_define([_LT_DECL], 3631016ad83Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3641016ad83Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3651016ad83Smrg [m4_ifval([$1], [$1], [$2])]) 3661016ad83Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3671016ad83Smrg m4_ifval([$4], 3681016ad83Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3691016ad83Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 3701016ad83Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 3711016ad83Smrg]) 3721016ad83Smrg 3731016ad83Smrg 3741016ad83Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3751016ad83Smrg# -------------------------------------------------------- 3761016ad83Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3771016ad83Smrg 3781016ad83Smrg 3791016ad83Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3801016ad83Smrg# ------------------------------------------------ 3811016ad83Smrgm4_define([lt_decl_tag_varnames], 3821016ad83Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 3831016ad83Smrg 3841016ad83Smrg 3851016ad83Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 3861016ad83Smrg# --------------------------------------------------------- 3871016ad83Smrgm4_define([_lt_decl_filter], 3881016ad83Smrg[m4_case([$#], 3891016ad83Smrg [0], [m4_fatal([$0: too few arguments: $#])], 3901016ad83Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 3911016ad83Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 3921016ad83Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 3931016ad83Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 3941016ad83Smrg]) 3951016ad83Smrg 3961016ad83Smrg 3971016ad83Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 3981016ad83Smrg# -------------------------------------------------- 3991016ad83Smrgm4_define([lt_decl_quote_varnames], 4001016ad83Smrg[_lt_decl_filter([value], [1], $@)]) 4011016ad83Smrg 4021016ad83Smrg 4031016ad83Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 4041016ad83Smrg# --------------------------------------------------- 4051016ad83Smrgm4_define([lt_decl_dquote_varnames], 4061016ad83Smrg[_lt_decl_filter([value], [2], $@)]) 4071016ad83Smrg 4081016ad83Smrg 4091016ad83Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 4101016ad83Smrg# --------------------------------------------------- 4111016ad83Smrgm4_define([lt_decl_varnames_tagged], 4121016ad83Smrg[m4_assert([$# <= 2])dnl 4131016ad83Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 4141016ad83Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 4151016ad83Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 4161016ad83Smrgm4_define([_lt_decl_varnames_tagged], 4171016ad83Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 4181016ad83Smrg 4191016ad83Smrg 4201016ad83Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 4211016ad83Smrg# ------------------------------------------------ 4221016ad83Smrgm4_define([lt_decl_all_varnames], 4231016ad83Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 4241016ad83Smrg m4_if([$2], [], 4251016ad83Smrg m4_quote(lt_decl_varnames), 4261016ad83Smrg m4_quote(m4_shift($@))))[]dnl 4271016ad83Smrg]) 4281016ad83Smrgm4_define([_lt_decl_all_varnames], 4291016ad83Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 4301016ad83Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 4311016ad83Smrg]) 4321016ad83Smrg 4331016ad83Smrg 4341016ad83Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 4351016ad83Smrg# ------------------------------------ 4367204935cSmrg# Quote a variable value, and forward it to 'config.status' so that its 4377204935cSmrg# declaration there will have the same value as in 'configure'. VARNAME 4381016ad83Smrg# must have a single quote delimited value for this to work. 4391016ad83Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 4401016ad83Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 4411016ad83Smrg 4421016ad83Smrg 4431016ad83Smrg# _LT_CONFIG_STATUS_DECLARATIONS 4441016ad83Smrg# ------------------------------ 4451016ad83Smrg# We delimit libtool config variables with single quotes, so when 4461016ad83Smrg# we write them to config.status, we have to be sure to quote all 4471016ad83Smrg# embedded single quotes properly. In configure, this macro expands 4481016ad83Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 4491016ad83Smrg# 4501016ad83Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 4511016ad83Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 4521016ad83Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 4531016ad83Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 4541016ad83Smrg 4551016ad83Smrg 4561016ad83Smrg# _LT_LIBTOOL_TAGS 4571016ad83Smrg# ---------------- 4581016ad83Smrg# Output comment and list of tags supported by the script 4591016ad83Smrgm4_defun([_LT_LIBTOOL_TAGS], 4601016ad83Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 4617204935cSmrgavailable_tags='_LT_TAGS'dnl 4621016ad83Smrg]) 4631016ad83Smrg 4641016ad83Smrg 4651016ad83Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 4661016ad83Smrg# ----------------------------------- 4671016ad83Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 4681016ad83Smrg# expand to a commented shell variable setting: 4691016ad83Smrg# 4701016ad83Smrg# # Some comment about what VAR is for. 4711016ad83Smrg# visible_name=$lt_internal_name 4721016ad83Smrgm4_define([_LT_LIBTOOL_DECLARE], 4731016ad83Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 4741016ad83Smrg [description])))[]dnl 4751016ad83Smrgm4_pushdef([_libtool_name], 4761016ad83Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 4771016ad83Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 4781016ad83Smrg [0], [_libtool_name=[$]$1], 4791016ad83Smrg [1], [_libtool_name=$lt_[]$1], 4801016ad83Smrg [2], [_libtool_name=$lt_[]$1], 4811016ad83Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 4821016ad83Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 4831016ad83Smrg]) 4841016ad83Smrg 4851016ad83Smrg 4861016ad83Smrg# _LT_LIBTOOL_CONFIG_VARS 4871016ad83Smrg# ----------------------- 4881016ad83Smrg# Produce commented declarations of non-tagged libtool config variables 4897204935cSmrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 4901016ad83Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 4911016ad83Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 4921016ad83Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 4931016ad83Smrg[m4_foreach([_lt_var], 4941016ad83Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 4951016ad83Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 4961016ad83Smrg 4971016ad83Smrg 4981016ad83Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 4991016ad83Smrg# ------------------------- 5001016ad83Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 5011016ad83Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 5021016ad83Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 5031016ad83Smrg 5041016ad83Smrg 5051016ad83Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 5061016ad83Smrg# ------------------------------ 5071016ad83Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 5081016ad83Smrg 5091016ad83Smrg 5101016ad83Smrg# _LT_CONFIG_COMMANDS 5111016ad83Smrg# ------------------- 5121016ad83Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 5131016ad83Smrg# variables for single and double quote escaping we saved from calls 5141016ad83Smrg# to _LT_DECL, we can put quote escaped variables declarations 5157204935cSmrg# into 'config.status', and then the shell code to quote escape them in 5167204935cSmrg# for loops in 'config.status'. Finally, any additional code accumulated 5171016ad83Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 5181016ad83Smrgm4_defun([_LT_CONFIG_COMMANDS], 5191016ad83Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 5201016ad83Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 5211016ad83Smrg dnl instead of duplicating it all over again into config.status, 5221016ad83Smrg dnl then we will have config.status run $CONFIG_LT later, so it 5231016ad83Smrg dnl needs to know what name is stored there: 5241016ad83Smrg [AC_CONFIG_COMMANDS([libtool], 5251016ad83Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 5261016ad83Smrg dnl If the libtool generation code is destined for config.status, 5271016ad83Smrg dnl expand the accumulated commands and init code now: 5281016ad83Smrg [AC_CONFIG_COMMANDS([libtool], 5291016ad83Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 5301016ad83Smrg])#_LT_CONFIG_COMMANDS 5311016ad83Smrg 5321016ad83Smrg 5331016ad83Smrg# Initialize. 5341016ad83Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 5351016ad83Smrg[ 5361016ad83Smrg 5371016ad83Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 5381016ad83Smrg# if CDPATH is set. 5391016ad83Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 5401016ad83Smrg 5411016ad83Smrgsed_quote_subst='$sed_quote_subst' 5421016ad83Smrgdouble_quote_subst='$double_quote_subst' 5431016ad83Smrgdelay_variable_subst='$delay_variable_subst' 5441016ad83Smrg_LT_CONFIG_STATUS_DECLARATIONS 5451016ad83SmrgLTCC='$LTCC' 5461016ad83SmrgLTCFLAGS='$LTCFLAGS' 5471016ad83Smrgcompiler='$compiler_DEFAULT' 5481016ad83Smrg 5491016ad83Smrg# A function that is used when there is no print builtin or printf. 5501016ad83Smrgfunc_fallback_echo () 5511016ad83Smrg{ 5521016ad83Smrg eval 'cat <<_LTECHO_EOF 5531016ad83Smrg\$[]1 5541016ad83Smrg_LTECHO_EOF' 5551016ad83Smrg} 5561016ad83Smrg 5571016ad83Smrg# Quote evaled strings. 5581016ad83Smrgfor var in lt_decl_all_varnames([[ \ 5591016ad83Smrg]], lt_decl_quote_varnames); do 5601016ad83Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5611016ad83Smrg *[[\\\\\\\`\\"\\\$]]*) 5627204935cSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 5631016ad83Smrg ;; 5641016ad83Smrg *) 5651016ad83Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5661016ad83Smrg ;; 5671016ad83Smrg esac 5681016ad83Smrgdone 5691016ad83Smrg 5701016ad83Smrg# Double-quote double-evaled strings. 5711016ad83Smrgfor var in lt_decl_all_varnames([[ \ 5721016ad83Smrg]], lt_decl_dquote_varnames); do 5731016ad83Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5741016ad83Smrg *[[\\\\\\\`\\"\\\$]]*) 5757204935cSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 5761016ad83Smrg ;; 5771016ad83Smrg *) 5781016ad83Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5791016ad83Smrg ;; 5801016ad83Smrg esac 5811016ad83Smrgdone 5821016ad83Smrg 5831016ad83Smrg_LT_OUTPUT_LIBTOOL_INIT 5841016ad83Smrg]) 5851016ad83Smrg 5861016ad83Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 5871016ad83Smrg# ------------------------------------ 5881016ad83Smrg# Generate a child script FILE with all initialization necessary to 5891016ad83Smrg# reuse the environment learned by the parent script, and make the 5901016ad83Smrg# file executable. If COMMENT is supplied, it is inserted after the 5917204935cSmrg# '#!' sequence but before initialization text begins. After this 5921016ad83Smrg# macro, additional text can be appended to FILE to form the body of 5931016ad83Smrg# the child script. The macro ends with non-zero status if the 5941016ad83Smrg# file could not be fully written (such as if the disk is full). 5951016ad83Smrgm4_ifdef([AS_INIT_GENERATED], 5961016ad83Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 5971016ad83Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 5981016ad83Smrg[m4_require([AS_PREPARE])]dnl 5991016ad83Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 6001016ad83Smrg[lt_write_fail=0 6011016ad83Smrgcat >$1 <<_ASEOF || lt_write_fail=1 6021016ad83Smrg#! $SHELL 6031016ad83Smrg# Generated by $as_me. 6041016ad83Smrg$2 6051016ad83SmrgSHELL=\${CONFIG_SHELL-$SHELL} 6061016ad83Smrgexport SHELL 6071016ad83Smrg_ASEOF 6081016ad83Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 6091016ad83SmrgAS_SHELL_SANITIZE 6101016ad83Smrg_AS_PREPARE 6111016ad83Smrgexec AS_MESSAGE_FD>&1 6121016ad83Smrg_ASEOF 6137204935cSmrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 6141016ad83Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 6151016ad83Smrg 6161016ad83Smrg# LT_OUTPUT 6171016ad83Smrg# --------- 6181016ad83Smrg# This macro allows early generation of the libtool script (before 6191016ad83Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 6201016ad83Smrg# tests. 6211016ad83SmrgAC_DEFUN([LT_OUTPUT], 6221016ad83Smrg[: ${CONFIG_LT=./config.lt} 6231016ad83SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 6241016ad83Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 6251016ad83Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 6261016ad83Smrg 6271016ad83Smrgcat >>"$CONFIG_LT" <<\_LTEOF 6281016ad83Smrglt_cl_silent=false 6291016ad83Smrgexec AS_MESSAGE_LOG_FD>>config.log 6301016ad83Smrg{ 6311016ad83Smrg echo 6321016ad83Smrg AS_BOX([Running $as_me.]) 6331016ad83Smrg} >&AS_MESSAGE_LOG_FD 6341016ad83Smrg 6351016ad83Smrglt_cl_help="\ 6367204935cSmrg'$as_me' creates a local libtool stub from the current configuration, 6371016ad83Smrgfor use in further configure time tests before the real libtool is 6381016ad83Smrggenerated. 6391016ad83Smrg 6401016ad83SmrgUsage: $[0] [[OPTIONS]] 6411016ad83Smrg 6421016ad83Smrg -h, --help print this help, then exit 6431016ad83Smrg -V, --version print version number, then exit 6441016ad83Smrg -q, --quiet do not print progress messages 6451016ad83Smrg -d, --debug don't remove temporary files 6461016ad83Smrg 6471016ad83SmrgReport bugs to <bug-libtool@gnu.org>." 6481016ad83Smrg 6491016ad83Smrglt_cl_version="\ 6501016ad83Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 6511016ad83Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 6521016ad83Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 6531016ad83Smrg 6541016ad83SmrgCopyright (C) 2011 Free Software Foundation, Inc. 6551016ad83SmrgThis config.lt script is free software; the Free Software Foundation 6561016ad83Smrggives unlimited permision to copy, distribute and modify it." 6571016ad83Smrg 6587204935cSmrgwhile test 0 != $[#] 6591016ad83Smrgdo 6601016ad83Smrg case $[1] in 6611016ad83Smrg --version | --v* | -V ) 6621016ad83Smrg echo "$lt_cl_version"; exit 0 ;; 6631016ad83Smrg --help | --h* | -h ) 6641016ad83Smrg echo "$lt_cl_help"; exit 0 ;; 6651016ad83Smrg --debug | --d* | -d ) 6661016ad83Smrg debug=: ;; 6671016ad83Smrg --quiet | --q* | --silent | --s* | -q ) 6681016ad83Smrg lt_cl_silent=: ;; 6691016ad83Smrg 6701016ad83Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 6717204935cSmrgTry '$[0] --help' for more information.]) ;; 6721016ad83Smrg 6731016ad83Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 6747204935cSmrgTry '$[0] --help' for more information.]) ;; 6751016ad83Smrg esac 6761016ad83Smrg shift 6771016ad83Smrgdone 6781016ad83Smrg 6791016ad83Smrgif $lt_cl_silent; then 6801016ad83Smrg exec AS_MESSAGE_FD>/dev/null 6811016ad83Smrgfi 6821016ad83Smrg_LTEOF 6831016ad83Smrg 6841016ad83Smrgcat >>"$CONFIG_LT" <<_LTEOF 6851016ad83Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 6861016ad83Smrg_LTEOF 6871016ad83Smrg 6881016ad83Smrgcat >>"$CONFIG_LT" <<\_LTEOF 6891016ad83SmrgAC_MSG_NOTICE([creating $ofile]) 6901016ad83Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 6911016ad83SmrgAS_EXIT(0) 6921016ad83Smrg_LTEOF 6931016ad83Smrgchmod +x "$CONFIG_LT" 6941016ad83Smrg 6951016ad83Smrg# configure is writing to config.log, but config.lt does its own redirection, 6961016ad83Smrg# appending to config.log, which fails on DOS, as config.log is still kept 6971016ad83Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 6981016ad83Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 6991016ad83Smrglt_cl_success=: 7007204935cSmrgtest yes = "$silent" && 7011016ad83Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 7021016ad83Smrgexec AS_MESSAGE_LOG_FD>/dev/null 7031016ad83Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 7041016ad83Smrgexec AS_MESSAGE_LOG_FD>>config.log 7051016ad83Smrg$lt_cl_success || AS_EXIT(1) 7061016ad83Smrg])# LT_OUTPUT 7071016ad83Smrg 7081016ad83Smrg 7091016ad83Smrg# _LT_CONFIG(TAG) 7101016ad83Smrg# --------------- 7111016ad83Smrg# If TAG is the built-in tag, create an initial libtool script with a 7121016ad83Smrg# default configuration from the untagged config vars. Otherwise add code 7131016ad83Smrg# to config.status for appending the configuration named by TAG from the 7141016ad83Smrg# matching tagged config vars. 7151016ad83Smrgm4_defun([_LT_CONFIG], 7161016ad83Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7171016ad83Smrg_LT_CONFIG_SAVE_COMMANDS([ 7181016ad83Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 7191016ad83Smrg m4_if(_LT_TAG, [C], [ 7207204935cSmrg # See if we are running on zsh, and set the options that allow our 7211016ad83Smrg # commands through without removal of \ escapes. 7227204935cSmrg if test -n "${ZSH_VERSION+set}"; then 7231016ad83Smrg setopt NO_GLOB_SUBST 7241016ad83Smrg fi 7251016ad83Smrg 7267204935cSmrg cfgfile=${ofile}T 7271016ad83Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 7281016ad83Smrg $RM "$cfgfile" 7291016ad83Smrg 7301016ad83Smrg cat <<_LT_EOF >> "$cfgfile" 7311016ad83Smrg#! $SHELL 7327204935cSmrg# Generated automatically by $as_me ($PACKAGE) $VERSION 733aa30ed02Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 7341016ad83Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 7357204935cSmrg 7367204935cSmrg# Provide generalized library-building support services. 7377204935cSmrg# Written by Gordon Matzigkeit, 1996 7387204935cSmrg 7391016ad83Smrg_LT_COPYING 7401016ad83Smrg_LT_LIBTOOL_TAGS 7411016ad83Smrg 7427204935cSmrg# Configured defaults for sys_lib_dlsearch_path munging. 7437204935cSmrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 7447204935cSmrg 7451016ad83Smrg# ### BEGIN LIBTOOL CONFIG 7461016ad83Smrg_LT_LIBTOOL_CONFIG_VARS 7471016ad83Smrg_LT_LIBTOOL_TAG_VARS 7481016ad83Smrg# ### END LIBTOOL CONFIG 7491016ad83Smrg 7507204935cSmrg_LT_EOF 7517204935cSmrg 7527204935cSmrg cat <<'_LT_EOF' >> "$cfgfile" 7537204935cSmrg 7547204935cSmrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 7557204935cSmrg 7567204935cSmrg_LT_PREPARE_MUNGE_PATH_LIST 7577204935cSmrg_LT_PREPARE_CC_BASENAME 7587204935cSmrg 7597204935cSmrg# ### END FUNCTIONS SHARED WITH CONFIGURE 7607204935cSmrg 7611016ad83Smrg_LT_EOF 7621016ad83Smrg 7631016ad83Smrg case $host_os in 7641016ad83Smrg aix3*) 7651016ad83Smrg cat <<\_LT_EOF >> "$cfgfile" 7661016ad83Smrg# AIX sometimes has problems with the GCC collect2 program. For some 7671016ad83Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 7681016ad83Smrg# vanish in a puff of smoke. 7697204935cSmrgif test set != "${COLLECT_NAMES+set}"; then 7701016ad83Smrg COLLECT_NAMES= 7711016ad83Smrg export COLLECT_NAMES 7721016ad83Smrgfi 7731016ad83Smrg_LT_EOF 7741016ad83Smrg ;; 7751016ad83Smrg esac 7761016ad83Smrg 7771016ad83Smrg _LT_PROG_LTMAIN 7781016ad83Smrg 7791016ad83Smrg # We use sed instead of cat because bash on DJGPP gets confused if 7801016ad83Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 7811016ad83Smrg # text mode, it properly converts lines to CR/LF. This bash problem 7821016ad83Smrg # is reportedly fixed, but why not run on old versions too? 783b9526c6aSmrg $SED '$q' "$ltmain" >> "$cfgfile" \ 7841016ad83Smrg || (rm -f "$cfgfile"; exit 1) 7851016ad83Smrg 7861016ad83Smrg mv -f "$cfgfile" "$ofile" || 7871016ad83Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 7881016ad83Smrg chmod +x "$ofile" 7891016ad83Smrg], 7901016ad83Smrg[cat <<_LT_EOF >> "$ofile" 7911016ad83Smrg 7921016ad83Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 7931016ad83Smrgdnl in a comment (ie after a #). 7941016ad83Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 7951016ad83Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 7961016ad83Smrg# ### END LIBTOOL TAG CONFIG: $1 7971016ad83Smrg_LT_EOF 7981016ad83Smrg])dnl /m4_if 7991016ad83Smrg], 8001016ad83Smrg[m4_if([$1], [], [ 8011016ad83Smrg PACKAGE='$PACKAGE' 8021016ad83Smrg VERSION='$VERSION' 8031016ad83Smrg RM='$RM' 8041016ad83Smrg ofile='$ofile'], []) 8051016ad83Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 8061016ad83Smrg])# _LT_CONFIG 8071016ad83Smrg 8081016ad83Smrg 8091016ad83Smrg# LT_SUPPORTED_TAG(TAG) 8101016ad83Smrg# --------------------- 8111016ad83Smrg# Trace this macro to discover what tags are supported by the libtool 8121016ad83Smrg# --tag option, using: 8131016ad83Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 8141016ad83SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 8151016ad83Smrg 8161016ad83Smrg 8171016ad83Smrg# C support is built-in for now 8181016ad83Smrgm4_define([_LT_LANG_C_enabled], []) 8191016ad83Smrgm4_define([_LT_TAGS], []) 8201016ad83Smrg 8211016ad83Smrg 8221016ad83Smrg# LT_LANG(LANG) 8231016ad83Smrg# ------------- 8241016ad83Smrg# Enable libtool support for the given language if not already enabled. 8251016ad83SmrgAC_DEFUN([LT_LANG], 8261016ad83Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 8271016ad83Smrgm4_case([$1], 8281016ad83Smrg [C], [_LT_LANG(C)], 8291016ad83Smrg [C++], [_LT_LANG(CXX)], 8301016ad83Smrg [Go], [_LT_LANG(GO)], 8311016ad83Smrg [Java], [_LT_LANG(GCJ)], 8321016ad83Smrg [Fortran 77], [_LT_LANG(F77)], 8331016ad83Smrg [Fortran], [_LT_LANG(FC)], 8341016ad83Smrg [Windows Resource], [_LT_LANG(RC)], 8351016ad83Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 8361016ad83Smrg [_LT_LANG($1)], 8371016ad83Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 8381016ad83Smrg])# LT_LANG 8391016ad83Smrg 8401016ad83Smrg 8411016ad83Smrg# _LT_LANG(LANGNAME) 8421016ad83Smrg# ------------------ 8431016ad83Smrgm4_defun([_LT_LANG], 8441016ad83Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 8451016ad83Smrg [LT_SUPPORTED_TAG([$1])dnl 8461016ad83Smrg m4_append([_LT_TAGS], [$1 ])dnl 8471016ad83Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 8481016ad83Smrg _LT_LANG_$1_CONFIG($1)])dnl 8491016ad83Smrg])# _LT_LANG 8501016ad83Smrg 8511016ad83Smrg 8521016ad83Smrgm4_ifndef([AC_PROG_GO], [ 8531016ad83Smrg############################################################ 8541016ad83Smrg# NOTE: This macro has been submitted for inclusion into # 8551016ad83Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 8561016ad83Smrg# a released version of Autoconf we should remove this # 8571016ad83Smrg# macro and use it instead. # 8581016ad83Smrg############################################################ 8591016ad83Smrgm4_defun([AC_PROG_GO], 8601016ad83Smrg[AC_LANG_PUSH(Go)dnl 8611016ad83SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 8621016ad83SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 8631016ad83Smrg_AC_ARG_VAR_LDFLAGS()dnl 8641016ad83SmrgAC_CHECK_TOOL(GOC, gccgo) 8651016ad83Smrgif test -z "$GOC"; then 8661016ad83Smrg if test -n "$ac_tool_prefix"; then 8671016ad83Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 8681016ad83Smrg fi 8691016ad83Smrgfi 8701016ad83Smrgif test -z "$GOC"; then 8711016ad83Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 8721016ad83Smrgfi 8731016ad83Smrg])#m4_defun 8741016ad83Smrg])#m4_ifndef 8751016ad83Smrg 8761016ad83Smrg 8771016ad83Smrg# _LT_LANG_DEFAULT_CONFIG 8781016ad83Smrg# ----------------------- 8791016ad83Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 8801016ad83Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 8811016ad83Smrg [LT_LANG(CXX)], 8821016ad83Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 8831016ad83Smrg 8841016ad83SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 8851016ad83Smrg [LT_LANG(F77)], 8861016ad83Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 8871016ad83Smrg 8881016ad83SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 8891016ad83Smrg [LT_LANG(FC)], 8901016ad83Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 8911016ad83Smrg 8921016ad83Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 8931016ad83Smrgdnl pulling things in needlessly. 8941016ad83SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 8951016ad83Smrg [LT_LANG(GCJ)], 8961016ad83Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 8971016ad83Smrg [LT_LANG(GCJ)], 8981016ad83Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 8991016ad83Smrg [LT_LANG(GCJ)], 9001016ad83Smrg [m4_ifdef([AC_PROG_GCJ], 9011016ad83Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 9021016ad83Smrg m4_ifdef([A][M_PROG_GCJ], 9031016ad83Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 9041016ad83Smrg m4_ifdef([LT_PROG_GCJ], 9051016ad83Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 9061016ad83Smrg 9071016ad83SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 9081016ad83Smrg [LT_LANG(GO)], 9091016ad83Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 9101016ad83Smrg 9111016ad83SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 9121016ad83Smrg [LT_LANG(RC)], 9131016ad83Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 9141016ad83Smrg])# _LT_LANG_DEFAULT_CONFIG 9151016ad83Smrg 9161016ad83Smrg# Obsolete macros: 9171016ad83SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 9181016ad83SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 9191016ad83SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 9201016ad83SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 9211016ad83SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 9221016ad83Smrgdnl aclocal-1.4 backwards compatibility: 9231016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 9241016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 9251016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 9261016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 9271016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 9281016ad83Smrg 9291016ad83Smrg 9301016ad83Smrg# _LT_TAG_COMPILER 9311016ad83Smrg# ---------------- 9321016ad83Smrgm4_defun([_LT_TAG_COMPILER], 9331016ad83Smrg[AC_REQUIRE([AC_PROG_CC])dnl 9341016ad83Smrg 9351016ad83Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 9361016ad83Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 9371016ad83Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 9381016ad83Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 9391016ad83Smrg 9401016ad83Smrg# If no C compiler was specified, use CC. 9411016ad83SmrgLTCC=${LTCC-"$CC"} 9421016ad83Smrg 9431016ad83Smrg# If no C compiler flags were specified, use CFLAGS. 9441016ad83SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 9451016ad83Smrg 9461016ad83Smrg# Allow CC to be a program name with arguments. 9471016ad83Smrgcompiler=$CC 9481016ad83Smrg])# _LT_TAG_COMPILER 9491016ad83Smrg 9501016ad83Smrg 9511016ad83Smrg# _LT_COMPILER_BOILERPLATE 9521016ad83Smrg# ------------------------ 9531016ad83Smrg# Check for compiler boilerplate output or warnings with 9541016ad83Smrg# the simple compiler test code. 9551016ad83Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 9561016ad83Smrg[m4_require([_LT_DECL_SED])dnl 9571016ad83Smrgac_outfile=conftest.$ac_objext 9581016ad83Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 9591016ad83Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9601016ad83Smrg_lt_compiler_boilerplate=`cat conftest.err` 9611016ad83Smrg$RM conftest* 9621016ad83Smrg])# _LT_COMPILER_BOILERPLATE 9631016ad83Smrg 9641016ad83Smrg 9651016ad83Smrg# _LT_LINKER_BOILERPLATE 9661016ad83Smrg# ---------------------- 9671016ad83Smrg# Check for linker boilerplate output or warnings with 9681016ad83Smrg# the simple link test code. 9691016ad83Smrgm4_defun([_LT_LINKER_BOILERPLATE], 9701016ad83Smrg[m4_require([_LT_DECL_SED])dnl 9711016ad83Smrgac_outfile=conftest.$ac_objext 9721016ad83Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 9731016ad83Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9741016ad83Smrg_lt_linker_boilerplate=`cat conftest.err` 9751016ad83Smrg$RM -r conftest* 9761016ad83Smrg])# _LT_LINKER_BOILERPLATE 9771016ad83Smrg 9781016ad83Smrg# _LT_REQUIRED_DARWIN_CHECKS 9791016ad83Smrg# ------------------------- 9801016ad83Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 9811016ad83Smrg case $host_os in 9821016ad83Smrg rhapsody* | darwin*) 9831016ad83Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 9841016ad83Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 9851016ad83Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 9861016ad83Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 9871016ad83Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 9881016ad83Smrg _LT_DECL([], [DSYMUTIL], [1], 9891016ad83Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 9901016ad83Smrg _LT_DECL([], [NMEDIT], [1], 9911016ad83Smrg [Tool to change global to local symbols on Mac OS X]) 9921016ad83Smrg _LT_DECL([], [LIPO], [1], 9931016ad83Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 9941016ad83Smrg _LT_DECL([], [OTOOL], [1], 9951016ad83Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 9961016ad83Smrg _LT_DECL([], [OTOOL64], [1], 9971016ad83Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 9981016ad83Smrg 9991016ad83Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 10001016ad83Smrg [lt_cv_apple_cc_single_mod=no 10017204935cSmrg if test -z "$LT_MULTI_MODULE"; then 10021016ad83Smrg # By default we will add the -single_module flag. You can override 10031016ad83Smrg # by either setting the environment variable LT_MULTI_MODULE 10041016ad83Smrg # non-empty at configure time, or by adding -multi_module to the 10051016ad83Smrg # link flags. 10061016ad83Smrg rm -rf libconftest.dylib* 10071016ad83Smrg echo "int foo(void){return 1;}" > conftest.c 10081016ad83Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 10091016ad83Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 10101016ad83Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 10111016ad83Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 10121016ad83Smrg _lt_result=$? 10131016ad83Smrg # If there is a non-empty error log, and "single_module" 10141016ad83Smrg # appears in it, assume the flag caused a linker warning 10151016ad83Smrg if test -s conftest.err && $GREP single_module conftest.err; then 10161016ad83Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10171016ad83Smrg # Otherwise, if the output was created with a 0 exit code from 10181016ad83Smrg # the compiler, it worked. 10197204935cSmrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 10201016ad83Smrg lt_cv_apple_cc_single_mod=yes 10211016ad83Smrg else 10221016ad83Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10231016ad83Smrg fi 10241016ad83Smrg rm -rf libconftest.dylib* 10251016ad83Smrg rm -f conftest.* 10261016ad83Smrg fi]) 10271016ad83Smrg 10281016ad83Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 10291016ad83Smrg [lt_cv_ld_exported_symbols_list], 10301016ad83Smrg [lt_cv_ld_exported_symbols_list=no 10311016ad83Smrg save_LDFLAGS=$LDFLAGS 10321016ad83Smrg echo "_main" > conftest.sym 10331016ad83Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 10341016ad83Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 10351016ad83Smrg [lt_cv_ld_exported_symbols_list=yes], 10361016ad83Smrg [lt_cv_ld_exported_symbols_list=no]) 10377204935cSmrg LDFLAGS=$save_LDFLAGS 10381016ad83Smrg ]) 10391016ad83Smrg 10401016ad83Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 10411016ad83Smrg [lt_cv_ld_force_load=no 10421016ad83Smrg cat > conftest.c << _LT_EOF 10431016ad83Smrgint forced_loaded() { return 2;} 10441016ad83Smrg_LT_EOF 10451016ad83Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 10461016ad83Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1047b9526c6aSmrg echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1048b9526c6aSmrg $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 10491016ad83Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 10501016ad83Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 10511016ad83Smrg cat > conftest.c << _LT_EOF 10521016ad83Smrgint main() { return 0;} 10531016ad83Smrg_LT_EOF 10541016ad83Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 10551016ad83Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 10561016ad83Smrg _lt_result=$? 10571016ad83Smrg if test -s conftest.err && $GREP force_load conftest.err; then 10581016ad83Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10597204935cSmrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 10601016ad83Smrg lt_cv_ld_force_load=yes 10611016ad83Smrg else 10621016ad83Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10631016ad83Smrg fi 10641016ad83Smrg rm -f conftest.err libconftest.a conftest conftest.c 10651016ad83Smrg rm -rf conftest.dSYM 10661016ad83Smrg ]) 10671016ad83Smrg case $host_os in 10681016ad83Smrg rhapsody* | darwin1.[[012]]) 10697204935cSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 10701016ad83Smrg darwin1.*) 10717204935cSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1072b9526c6aSmrg darwin*) 1073b9526c6aSmrg case $MACOSX_DEPLOYMENT_TARGET,$host in 1074b9526c6aSmrg 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) 1075b9526c6aSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1076b9526c6aSmrg *) 1077b9526c6aSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10781016ad83Smrg esac 10791016ad83Smrg ;; 10801016ad83Smrg esac 10817204935cSmrg if test yes = "$lt_cv_apple_cc_single_mod"; then 10821016ad83Smrg _lt_dar_single_mod='$single_module' 10831016ad83Smrg fi 10847204935cSmrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 10857204935cSmrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 10861016ad83Smrg else 10877204935cSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 10881016ad83Smrg fi 10897204935cSmrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 10901016ad83Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 10911016ad83Smrg else 10921016ad83Smrg _lt_dsymutil= 10931016ad83Smrg fi 10941016ad83Smrg ;; 10951016ad83Smrg esac 10961016ad83Smrg]) 10971016ad83Smrg 10981016ad83Smrg 10991016ad83Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 11001016ad83Smrg# --------------------------------- 11011016ad83Smrg# Checks for linker and compiler features on darwin 11021016ad83Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 11031016ad83Smrg[ 11041016ad83Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 11051016ad83Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 11061016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=no 11071016ad83Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 11081016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 11097204935cSmrg if test yes = "$lt_cv_ld_force_load"; then 11107204935cSmrg _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\"`' 11111016ad83Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 11121016ad83Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 11131016ad83Smrg else 11141016ad83Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 11151016ad83Smrg fi 11161016ad83Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 11177204935cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 11181016ad83Smrg case $cc_basename in 11197204935cSmrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 11201016ad83Smrg *) _lt_dar_can_shared=$GCC ;; 11211016ad83Smrg esac 11227204935cSmrg if test yes = "$_lt_dar_can_shared"; then 11231016ad83Smrg output_verbose_link_cmd=func_echo_all 11247204935cSmrg _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" 11257204935cSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 1126b9526c6aSmrg _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" 1127b9526c6aSmrg _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" 11281016ad83Smrg m4_if([$1], [CXX], 11297204935cSmrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 11307204935cSmrg _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" 1131b9526c6aSmrg _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" 11321016ad83Smrg fi 11331016ad83Smrg],[]) 11341016ad83Smrg else 11351016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11361016ad83Smrg fi 11371016ad83Smrg]) 11381016ad83Smrg 11391016ad83Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 11401016ad83Smrg# ---------------------------------- 11411016ad83Smrg# Links a minimal program and checks the executable 11421016ad83Smrg# for the system default hardcoded library path. In most cases, 11431016ad83Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 11441016ad83Smrg# the location of the communication and MPI libs are included too. 11451016ad83Smrg# If we don't find anything, use the default library path according 11461016ad83Smrg# to the aix ld manual. 11471016ad83Smrg# Store the results from the different compilers for each TAGNAME. 11481016ad83Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 11491016ad83Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 11501016ad83Smrg[m4_require([_LT_DECL_SED])dnl 11517204935cSmrgif test set = "${lt_cv_aix_libpath+set}"; then 11521016ad83Smrg aix_libpath=$lt_cv_aix_libpath 11531016ad83Smrgelse 11541016ad83Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 11551016ad83Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 11561016ad83Smrg lt_aix_libpath_sed='[ 11571016ad83Smrg /Import File Strings/,/^$/ { 11581016ad83Smrg /^0/ { 11591016ad83Smrg s/^0 *\([^ ]*\) *$/\1/ 11601016ad83Smrg p 11611016ad83Smrg } 11621016ad83Smrg }]' 11631016ad83Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 11641016ad83Smrg # Check for a 64-bit object if we didn't find anything. 11651016ad83Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 11661016ad83Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 11671016ad83Smrg fi],[]) 11681016ad83Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 11697204935cSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 11701016ad83Smrg fi 11711016ad83Smrg ]) 11721016ad83Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 11731016ad83Smrgfi 11741016ad83Smrg])# _LT_SYS_MODULE_PATH_AIX 11751016ad83Smrg 11761016ad83Smrg 11771016ad83Smrg# _LT_SHELL_INIT(ARG) 11781016ad83Smrg# ------------------- 11791016ad83Smrgm4_define([_LT_SHELL_INIT], 11801016ad83Smrg[m4_divert_text([M4SH-INIT], [$1 11811016ad83Smrg])])# _LT_SHELL_INIT 11821016ad83Smrg 11831016ad83Smrg 11841016ad83Smrg 11851016ad83Smrg# _LT_PROG_ECHO_BACKSLASH 11861016ad83Smrg# ----------------------- 11871016ad83Smrg# Find how we can fake an echo command that does not interpret backslash. 11881016ad83Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 11897204935cSmrg# of the generated configure script that will find a shell with a builtin 11907204935cSmrg# printf (that we can use as an echo command). 11911016ad83Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 11921016ad83Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 11931016ad83SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 11941016ad83SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 11951016ad83Smrg 11961016ad83SmrgAC_MSG_CHECKING([how to print strings]) 11971016ad83Smrg# Test print first, because it will be a builtin if present. 11981016ad83Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 11991016ad83Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 12001016ad83Smrg ECHO='print -r --' 12011016ad83Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 12021016ad83Smrg ECHO='printf %s\n' 12031016ad83Smrgelse 12041016ad83Smrg # Use this function as a fallback that always works. 12051016ad83Smrg func_fallback_echo () 12061016ad83Smrg { 12071016ad83Smrg eval 'cat <<_LTECHO_EOF 12081016ad83Smrg$[]1 12091016ad83Smrg_LTECHO_EOF' 12101016ad83Smrg } 12111016ad83Smrg ECHO='func_fallback_echo' 12121016ad83Smrgfi 12131016ad83Smrg 12141016ad83Smrg# func_echo_all arg... 12151016ad83Smrg# Invoke $ECHO with all args, space-separated. 12161016ad83Smrgfunc_echo_all () 12171016ad83Smrg{ 12187204935cSmrg $ECHO "$*" 12191016ad83Smrg} 12201016ad83Smrg 12217204935cSmrgcase $ECHO in 12221016ad83Smrg printf*) AC_MSG_RESULT([printf]) ;; 12231016ad83Smrg print*) AC_MSG_RESULT([print -r]) ;; 12241016ad83Smrg *) AC_MSG_RESULT([cat]) ;; 12251016ad83Smrgesac 12261016ad83Smrg 12271016ad83Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 12281016ad83Smrg[_AS_DETECT_SUGGESTED([ 12291016ad83Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 12301016ad83Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 12311016ad83Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 12321016ad83Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 12331016ad83Smrg PATH=/empty FPATH=/empty; export PATH FPATH 12341016ad83Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 12351016ad83Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 12361016ad83Smrg 12371016ad83Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 12381016ad83Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 12391016ad83Smrg])# _LT_PROG_ECHO_BACKSLASH 12401016ad83Smrg 12411016ad83Smrg 12421016ad83Smrg# _LT_WITH_SYSROOT 12431016ad83Smrg# ---------------- 12441016ad83SmrgAC_DEFUN([_LT_WITH_SYSROOT], 1245b9526c6aSmrg[m4_require([_LT_DECL_SED])dnl 1246b9526c6aSmrgAC_MSG_CHECKING([for sysroot]) 12471016ad83SmrgAC_ARG_WITH([sysroot], 12487204935cSmrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 12497204935cSmrg [Search for dependent libraries within DIR (or the compiler's sysroot 12507204935cSmrg if not specified).])], 12511016ad83Smrg[], [with_sysroot=no]) 12521016ad83Smrg 12531016ad83Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 12541016ad83Smrgdnl in case the user passed a directory name. 12551016ad83Smrglt_sysroot= 12567204935cSmrgcase $with_sysroot in #( 12571016ad83Smrg yes) 12587204935cSmrg if test yes = "$GCC"; then 12591016ad83Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 12601016ad83Smrg fi 12611016ad83Smrg ;; #( 12621016ad83Smrg /*) 1263b9526c6aSmrg lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` 12641016ad83Smrg ;; #( 12651016ad83Smrg no|'') 12661016ad83Smrg ;; #( 12671016ad83Smrg *) 12687204935cSmrg AC_MSG_RESULT([$with_sysroot]) 12691016ad83Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 12701016ad83Smrg ;; 12711016ad83Smrgesac 12721016ad83Smrg 12731016ad83Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 12741016ad83Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 12757204935cSmrg[dependent libraries, and where our libraries should be installed.])]) 12761016ad83Smrg 12771016ad83Smrg# _LT_ENABLE_LOCK 12781016ad83Smrg# --------------- 12791016ad83Smrgm4_defun([_LT_ENABLE_LOCK], 12801016ad83Smrg[AC_ARG_ENABLE([libtool-lock], 12811016ad83Smrg [AS_HELP_STRING([--disable-libtool-lock], 12821016ad83Smrg [avoid locking (might break parallel builds)])]) 12837204935cSmrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 12841016ad83Smrg 12851016ad83Smrg# Some flags need to be propagated to the compiler or linker for good 12861016ad83Smrg# libtool support. 12871016ad83Smrgcase $host in 12881016ad83Smrgia64-*-hpux*) 12897204935cSmrg # Find out what ABI is being produced by ac_compile, and set mode 12907204935cSmrg # options accordingly. 12911016ad83Smrg echo 'int i;' > conftest.$ac_ext 12921016ad83Smrg if AC_TRY_EVAL(ac_compile); then 1293b9526c6aSmrg case `$FILECMD conftest.$ac_objext` in 12941016ad83Smrg *ELF-32*) 12957204935cSmrg HPUX_IA64_MODE=32 12961016ad83Smrg ;; 12971016ad83Smrg *ELF-64*) 12987204935cSmrg HPUX_IA64_MODE=64 12991016ad83Smrg ;; 13001016ad83Smrg esac 13011016ad83Smrg fi 13021016ad83Smrg rm -rf conftest* 13031016ad83Smrg ;; 13041016ad83Smrg*-*-irix6*) 13057204935cSmrg # Find out what ABI is being produced by ac_compile, and set linker 13067204935cSmrg # options accordingly. 13071016ad83Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 13081016ad83Smrg if AC_TRY_EVAL(ac_compile); then 13097204935cSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 1310b9526c6aSmrg case `$FILECMD conftest.$ac_objext` in 13111016ad83Smrg *32-bit*) 13121016ad83Smrg LD="${LD-ld} -melf32bsmip" 13131016ad83Smrg ;; 13141016ad83Smrg *N32*) 13151016ad83Smrg LD="${LD-ld} -melf32bmipn32" 13161016ad83Smrg ;; 13171016ad83Smrg *64-bit*) 13181016ad83Smrg LD="${LD-ld} -melf64bmip" 13191016ad83Smrg ;; 13201016ad83Smrg esac 13211016ad83Smrg else 1322b9526c6aSmrg case `$FILECMD conftest.$ac_objext` in 13231016ad83Smrg *32-bit*) 13241016ad83Smrg LD="${LD-ld} -32" 13251016ad83Smrg ;; 13261016ad83Smrg *N32*) 13271016ad83Smrg LD="${LD-ld} -n32" 13281016ad83Smrg ;; 13291016ad83Smrg *64-bit*) 13301016ad83Smrg LD="${LD-ld} -64" 13311016ad83Smrg ;; 13321016ad83Smrg esac 13331016ad83Smrg fi 13341016ad83Smrg fi 13351016ad83Smrg rm -rf conftest* 13361016ad83Smrg ;; 13371016ad83Smrg 13387204935cSmrgmips64*-*linux*) 13397204935cSmrg # Find out what ABI is being produced by ac_compile, and set linker 13407204935cSmrg # options accordingly. 13417204935cSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 13427204935cSmrg if AC_TRY_EVAL(ac_compile); then 13437204935cSmrg emul=elf 1344b9526c6aSmrg case `$FILECMD conftest.$ac_objext` in 13457204935cSmrg *32-bit*) 13467204935cSmrg emul="${emul}32" 13477204935cSmrg ;; 13487204935cSmrg *64-bit*) 13497204935cSmrg emul="${emul}64" 13507204935cSmrg ;; 13517204935cSmrg esac 1352b9526c6aSmrg case `$FILECMD conftest.$ac_objext` in 13537204935cSmrg *MSB*) 13547204935cSmrg emul="${emul}btsmip" 13557204935cSmrg ;; 13567204935cSmrg *LSB*) 13577204935cSmrg emul="${emul}ltsmip" 13587204935cSmrg ;; 13597204935cSmrg esac 1360b9526c6aSmrg case `$FILECMD conftest.$ac_objext` in 13617204935cSmrg *N32*) 13627204935cSmrg emul="${emul}n32" 13637204935cSmrg ;; 13647204935cSmrg esac 13657204935cSmrg LD="${LD-ld} -m $emul" 13667204935cSmrg fi 13677204935cSmrg rm -rf conftest* 13687204935cSmrg ;; 13697204935cSmrg 13701c7386f4Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 13711016ad83Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 13727204935cSmrg # Find out what ABI is being produced by ac_compile, and set linker 13737204935cSmrg # options accordingly. Note that the listed cases only cover the 13747204935cSmrg # situations where additional linker options are needed (such as when 13757204935cSmrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 13767204935cSmrg # vice versa); the common cases where no linker options are needed do 13777204935cSmrg # not appear in the list. 13781016ad83Smrg echo 'int i;' > conftest.$ac_ext 13791016ad83Smrg if AC_TRY_EVAL(ac_compile); then 1380b9526c6aSmrg case `$FILECMD conftest.o` in 13811016ad83Smrg *32-bit*) 13821016ad83Smrg case $host in 13831016ad83Smrg x86_64-*kfreebsd*-gnu) 13841016ad83Smrg LD="${LD-ld} -m elf_i386_fbsd" 13851016ad83Smrg ;; 13861016ad83Smrg x86_64-*linux*) 1387b9526c6aSmrg case `$FILECMD conftest.o` in 13881016ad83Smrg *x86-64*) 13891016ad83Smrg LD="${LD-ld} -m elf32_x86_64" 13901016ad83Smrg ;; 13911016ad83Smrg *) 13921016ad83Smrg LD="${LD-ld} -m elf_i386" 13931016ad83Smrg ;; 13941016ad83Smrg esac 13951016ad83Smrg ;; 13967204935cSmrg powerpc64le-*linux*) 13971c7386f4Smrg LD="${LD-ld} -m elf32lppclinux" 13981c7386f4Smrg ;; 13997204935cSmrg powerpc64-*linux*) 14001016ad83Smrg LD="${LD-ld} -m elf32ppclinux" 14011016ad83Smrg ;; 14021016ad83Smrg s390x-*linux*) 14031016ad83Smrg LD="${LD-ld} -m elf_s390" 14041016ad83Smrg ;; 14051016ad83Smrg sparc64-*linux*) 14061016ad83Smrg LD="${LD-ld} -m elf32_sparc" 14071016ad83Smrg ;; 14081016ad83Smrg esac 14091016ad83Smrg ;; 14101016ad83Smrg *64-bit*) 14111016ad83Smrg case $host in 14121016ad83Smrg x86_64-*kfreebsd*-gnu) 14131016ad83Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 14141016ad83Smrg ;; 14151016ad83Smrg x86_64-*linux*) 14161016ad83Smrg LD="${LD-ld} -m elf_x86_64" 14171016ad83Smrg ;; 1418aa30ed02Smrg powerpcle-*linux*|powerpc64le-*linux*) 14191c7386f4Smrg LD="${LD-ld} -m elf64lppc" 14201c7386f4Smrg ;; 1421aa30ed02Smrg powerpc-*linux*|powerpc64-*linux*) 14221016ad83Smrg LD="${LD-ld} -m elf64ppc" 14231016ad83Smrg ;; 14241016ad83Smrg s390*-*linux*|s390*-*tpf*) 14251016ad83Smrg LD="${LD-ld} -m elf64_s390" 14261016ad83Smrg ;; 14271016ad83Smrg sparc*-*linux*) 14281016ad83Smrg LD="${LD-ld} -m elf64_sparc" 14291016ad83Smrg ;; 14301016ad83Smrg esac 14311016ad83Smrg ;; 14321016ad83Smrg esac 14331016ad83Smrg fi 14341016ad83Smrg rm -rf conftest* 14351016ad83Smrg ;; 14361016ad83Smrg 14371016ad83Smrg*-*-sco3.2v5*) 14381016ad83Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 14397204935cSmrg SAVE_CFLAGS=$CFLAGS 14401016ad83Smrg CFLAGS="$CFLAGS -belf" 14411016ad83Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 14421016ad83Smrg [AC_LANG_PUSH(C) 14431016ad83Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 14441016ad83Smrg AC_LANG_POP]) 14457204935cSmrg if test yes != "$lt_cv_cc_needs_belf"; then 14461016ad83Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 14477204935cSmrg CFLAGS=$SAVE_CFLAGS 14481016ad83Smrg fi 14491016ad83Smrg ;; 14501016ad83Smrg*-*solaris*) 14517204935cSmrg # Find out what ABI is being produced by ac_compile, and set linker 14527204935cSmrg # options accordingly. 14531016ad83Smrg echo 'int i;' > conftest.$ac_ext 14541016ad83Smrg if AC_TRY_EVAL(ac_compile); then 1455b9526c6aSmrg case `$FILECMD conftest.o` in 14561016ad83Smrg *64-bit*) 14571016ad83Smrg case $lt_cv_prog_gnu_ld in 14581016ad83Smrg yes*) 14591016ad83Smrg case $host in 14607204935cSmrg i?86-*-solaris*|x86_64-*-solaris*) 14611016ad83Smrg LD="${LD-ld} -m elf_x86_64" 14621016ad83Smrg ;; 14631016ad83Smrg sparc*-*-solaris*) 14641016ad83Smrg LD="${LD-ld} -m elf64_sparc" 14651016ad83Smrg ;; 14661016ad83Smrg esac 14671016ad83Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 14681016ad83Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 14697204935cSmrg LD=${LD-ld}_sol2 14701016ad83Smrg fi 14711016ad83Smrg ;; 14721016ad83Smrg *) 14731016ad83Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 14741016ad83Smrg LD="${LD-ld} -64" 14751016ad83Smrg fi 14761016ad83Smrg ;; 14771016ad83Smrg esac 14781016ad83Smrg ;; 14791016ad83Smrg esac 14801016ad83Smrg fi 14811016ad83Smrg rm -rf conftest* 14821016ad83Smrg ;; 14831016ad83Smrgesac 14841016ad83Smrg 14857204935cSmrgneed_locks=$enable_libtool_lock 14861016ad83Smrg])# _LT_ENABLE_LOCK 14871016ad83Smrg 14881016ad83Smrg 14891016ad83Smrg# _LT_PROG_AR 14901016ad83Smrg# ----------- 14911016ad83Smrgm4_defun([_LT_PROG_AR], 14921016ad83Smrg[AC_CHECK_TOOLS(AR, [ar], false) 14931016ad83Smrg: ${AR=ar} 14941016ad83Smrg_LT_DECL([], [AR], [1], [The archiver]) 1495b9526c6aSmrg 1496b9526c6aSmrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with 1497b9526c6aSmrg# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 1498b9526c6aSmrg# higher priority because thats what people were doing historically (setting 1499b9526c6aSmrg# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 1500b9526c6aSmrg# variable obsoleted/removed. 1501b9526c6aSmrg 1502b9526c6aSmrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 1503b9526c6aSmrglt_ar_flags=$AR_FLAGS 1504b9526c6aSmrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 1505b9526c6aSmrg 1506b9526c6aSmrg# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 1507b9526c6aSmrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 1508b9526c6aSmrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 1509b9526c6aSmrg [Flags to create an archive]) 15101016ad83Smrg 15111016ad83SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 15121016ad83Smrg [lt_cv_ar_at_file=no 15131016ad83Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 15141016ad83Smrg [echo conftest.$ac_objext > conftest.lst 15151016ad83Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 15161016ad83Smrg AC_TRY_EVAL([lt_ar_try]) 15177204935cSmrg if test 0 -eq "$ac_status"; then 15181016ad83Smrg # Ensure the archiver fails upon bogus file names. 15191016ad83Smrg rm -f conftest.$ac_objext libconftest.a 15201016ad83Smrg AC_TRY_EVAL([lt_ar_try]) 15217204935cSmrg if test 0 -ne "$ac_status"; then 15221016ad83Smrg lt_cv_ar_at_file=@ 15231016ad83Smrg fi 15241016ad83Smrg fi 15251016ad83Smrg rm -f conftest.* libconftest.a 15261016ad83Smrg ]) 15271016ad83Smrg ]) 15281016ad83Smrg 15297204935cSmrgif test no = "$lt_cv_ar_at_file"; then 15301016ad83Smrg archiver_list_spec= 15311016ad83Smrgelse 15321016ad83Smrg archiver_list_spec=$lt_cv_ar_at_file 15331016ad83Smrgfi 15341016ad83Smrg_LT_DECL([], [archiver_list_spec], [1], 15351016ad83Smrg [How to feed a file listing to the archiver]) 15361016ad83Smrg])# _LT_PROG_AR 15371016ad83Smrg 15381016ad83Smrg 15391016ad83Smrg# _LT_CMD_OLD_ARCHIVE 15401016ad83Smrg# ------------------- 15411016ad83Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 15421016ad83Smrg[_LT_PROG_AR 15431016ad83Smrg 15441016ad83SmrgAC_CHECK_TOOL(STRIP, strip, :) 15451016ad83Smrgtest -z "$STRIP" && STRIP=: 15461016ad83Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 15471016ad83Smrg 15481016ad83SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 15491016ad83Smrgtest -z "$RANLIB" && RANLIB=: 15501016ad83Smrg_LT_DECL([], [RANLIB], [1], 15511016ad83Smrg [Commands used to install an old-style archive]) 15521016ad83Smrg 15531016ad83Smrg# Determine commands to create old-style static archives. 15541016ad83Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 15551016ad83Smrgold_postinstall_cmds='chmod 644 $oldlib' 15561016ad83Smrgold_postuninstall_cmds= 15571016ad83Smrg 15581016ad83Smrgif test -n "$RANLIB"; then 15591016ad83Smrg case $host_os in 15607204935cSmrg bitrig* | openbsd*) 15611016ad83Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 15621016ad83Smrg ;; 15631016ad83Smrg *) 15641016ad83Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 15651016ad83Smrg ;; 15661016ad83Smrg esac 15671016ad83Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 15681016ad83Smrgfi 15691016ad83Smrg 15701016ad83Smrgcase $host_os in 15711016ad83Smrg darwin*) 15721016ad83Smrg lock_old_archive_extraction=yes ;; 15731016ad83Smrg *) 15741016ad83Smrg lock_old_archive_extraction=no ;; 15751016ad83Smrgesac 15761016ad83Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 15771016ad83Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 15781016ad83Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 15791016ad83Smrg [Commands used to build an old-style archive]) 15801016ad83Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 15811016ad83Smrg [Whether to use a lock for old archive extraction]) 15821016ad83Smrg])# _LT_CMD_OLD_ARCHIVE 15831016ad83Smrg 15841016ad83Smrg 15851016ad83Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 15861016ad83Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 15871016ad83Smrg# ---------------------------------------------------------------- 15881016ad83Smrg# Check whether the given compiler option works 15891016ad83SmrgAC_DEFUN([_LT_COMPILER_OPTION], 15901016ad83Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 15911016ad83Smrgm4_require([_LT_DECL_SED])dnl 15921016ad83SmrgAC_CACHE_CHECK([$1], [$2], 15931016ad83Smrg [$2=no 15941016ad83Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 15951016ad83Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 15967204935cSmrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 15971016ad83Smrg # Insert the option either (1) after the last *FLAGS variable, or 15981016ad83Smrg # (2) before a word containing "conftest.", or (3) at the end. 15991016ad83Smrg # Note that $ac_compile itself does not contain backslashes and begins 16001016ad83Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 16011016ad83Smrg # The option is referenced via a variable to avoid confusing sed. 16021016ad83Smrg lt_compile=`echo "$ac_compile" | $SED \ 16031016ad83Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 16041016ad83Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 16051016ad83Smrg -e 's:$: $lt_compiler_flag:'` 16061016ad83Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 16071016ad83Smrg (eval "$lt_compile" 2>conftest.err) 16081016ad83Smrg ac_status=$? 16091016ad83Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 16101016ad83Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 16111016ad83Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 16121016ad83Smrg # The compiler can only warn and ignore the option if not recognized 16131016ad83Smrg # So say no if there are warnings other than the usual output. 16141016ad83Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 16151016ad83Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 16161016ad83Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 16171016ad83Smrg $2=yes 16181016ad83Smrg fi 16191016ad83Smrg fi 16201016ad83Smrg $RM conftest* 16211016ad83Smrg]) 16221016ad83Smrg 16237204935cSmrgif test yes = "[$]$2"; then 16241016ad83Smrg m4_if([$5], , :, [$5]) 16251016ad83Smrgelse 16261016ad83Smrg m4_if([$6], , :, [$6]) 16271016ad83Smrgfi 16281016ad83Smrg])# _LT_COMPILER_OPTION 16291016ad83Smrg 16301016ad83Smrg# Old name: 16311016ad83SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 16321016ad83Smrgdnl aclocal-1.4 backwards compatibility: 16331016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 16341016ad83Smrg 16351016ad83Smrg 16361016ad83Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 16371016ad83Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 16381016ad83Smrg# ---------------------------------------------------- 16391016ad83Smrg# Check whether the given linker option works 16401016ad83SmrgAC_DEFUN([_LT_LINKER_OPTION], 16411016ad83Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 16421016ad83Smrgm4_require([_LT_DECL_SED])dnl 16431016ad83SmrgAC_CACHE_CHECK([$1], [$2], 16441016ad83Smrg [$2=no 16457204935cSmrg save_LDFLAGS=$LDFLAGS 16461016ad83Smrg LDFLAGS="$LDFLAGS $3" 16471016ad83Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 16481016ad83Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 16491016ad83Smrg # The linker can only warn and ignore the option if not recognized 16501016ad83Smrg # So say no if there are warnings 16511016ad83Smrg if test -s conftest.err; then 16521016ad83Smrg # Append any errors to the config.log. 16531016ad83Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 16541016ad83Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 16551016ad83Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 16561016ad83Smrg if diff conftest.exp conftest.er2 >/dev/null; then 16571016ad83Smrg $2=yes 16581016ad83Smrg fi 16591016ad83Smrg else 16601016ad83Smrg $2=yes 16611016ad83Smrg fi 16621016ad83Smrg fi 16631016ad83Smrg $RM -r conftest* 16647204935cSmrg LDFLAGS=$save_LDFLAGS 16651016ad83Smrg]) 16661016ad83Smrg 16677204935cSmrgif test yes = "[$]$2"; then 16681016ad83Smrg m4_if([$4], , :, [$4]) 16691016ad83Smrgelse 16701016ad83Smrg m4_if([$5], , :, [$5]) 16711016ad83Smrgfi 16721016ad83Smrg])# _LT_LINKER_OPTION 16731016ad83Smrg 16741016ad83Smrg# Old name: 16751016ad83SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 16761016ad83Smrgdnl aclocal-1.4 backwards compatibility: 16771016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 16781016ad83Smrg 16791016ad83Smrg 16801016ad83Smrg# LT_CMD_MAX_LEN 16811016ad83Smrg#--------------- 16821016ad83SmrgAC_DEFUN([LT_CMD_MAX_LEN], 16831016ad83Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 16841016ad83Smrg# find the maximum length of command line arguments 16851016ad83SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 16861016ad83SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 16871016ad83Smrg i=0 16887204935cSmrg teststring=ABCD 16891016ad83Smrg 16901016ad83Smrg case $build_os in 16911016ad83Smrg msdosdjgpp*) 16921016ad83Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 16931016ad83Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 16941016ad83Smrg # during glob expansion). Even if it were fixed, the result of this 16951016ad83Smrg # check would be larger than it should be. 16961016ad83Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 16971016ad83Smrg ;; 16981016ad83Smrg 16991016ad83Smrg gnu*) 17001016ad83Smrg # Under GNU Hurd, this test is not required because there is 17011016ad83Smrg # no limit to the length of command line arguments. 17021016ad83Smrg # Libtool will interpret -1 as no limit whatsoever 17031016ad83Smrg lt_cv_sys_max_cmd_len=-1; 17041016ad83Smrg ;; 17051016ad83Smrg 17061016ad83Smrg cygwin* | mingw* | cegcc*) 17071016ad83Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 17081016ad83Smrg # about 5 minutes as the teststring grows exponentially. 17091016ad83Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 17101016ad83Smrg # you end up with a "frozen" computer, even though with patience 17111016ad83Smrg # the test eventually succeeds (with a max line length of 256k). 17121016ad83Smrg # Instead, let's just punt: use the minimum linelength reported by 17131016ad83Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 17141016ad83Smrg lt_cv_sys_max_cmd_len=8192; 17151016ad83Smrg ;; 17161016ad83Smrg 17171016ad83Smrg mint*) 17181016ad83Smrg # On MiNT this can take a long time and run out of memory. 17191016ad83Smrg lt_cv_sys_max_cmd_len=8192; 17201016ad83Smrg ;; 17211016ad83Smrg 17221016ad83Smrg amigaos*) 17231016ad83Smrg # On AmigaOS with pdksh, this test takes hours, literally. 17241016ad83Smrg # So we just punt and use a minimum line length of 8192. 17251016ad83Smrg lt_cv_sys_max_cmd_len=8192; 17261016ad83Smrg ;; 17271016ad83Smrg 1728b9526c6aSmrg bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) 17291016ad83Smrg # This has been around since 386BSD, at least. Likely further. 17301016ad83Smrg if test -x /sbin/sysctl; then 17311016ad83Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 17321016ad83Smrg elif test -x /usr/sbin/sysctl; then 17331016ad83Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 17341016ad83Smrg else 17351016ad83Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 17361016ad83Smrg fi 17371016ad83Smrg # And add a safety zone 17381016ad83Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 17391016ad83Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 17401016ad83Smrg ;; 17411016ad83Smrg 17421016ad83Smrg interix*) 17431016ad83Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 17441016ad83Smrg lt_cv_sys_max_cmd_len=196608 17451016ad83Smrg ;; 17461016ad83Smrg 17471016ad83Smrg os2*) 17481016ad83Smrg # The test takes a long time on OS/2. 17491016ad83Smrg lt_cv_sys_max_cmd_len=8192 17501016ad83Smrg ;; 17511016ad83Smrg 17521016ad83Smrg osf*) 17531016ad83Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 17541016ad83Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 17551016ad83Smrg # nice to cause kernel panics so lets avoid the loop below. 17561016ad83Smrg # First set a reasonable default. 17571016ad83Smrg lt_cv_sys_max_cmd_len=16384 17581016ad83Smrg # 17591016ad83Smrg if test -x /sbin/sysconfig; then 17601016ad83Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 17611016ad83Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 17621016ad83Smrg esac 17631016ad83Smrg fi 17641016ad83Smrg ;; 17651016ad83Smrg sco3.2v5*) 17661016ad83Smrg lt_cv_sys_max_cmd_len=102400 17671016ad83Smrg ;; 17681016ad83Smrg sysv5* | sco5v6* | sysv4.2uw2*) 17691016ad83Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 17701016ad83Smrg if test -n "$kargmax"; then 1771b9526c6aSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` 17721016ad83Smrg else 17731016ad83Smrg lt_cv_sys_max_cmd_len=32768 17741016ad83Smrg fi 17751016ad83Smrg ;; 17761016ad83Smrg *) 17771016ad83Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 17781016ad83Smrg if test -n "$lt_cv_sys_max_cmd_len" && \ 17797204935cSmrg test undefined != "$lt_cv_sys_max_cmd_len"; then 17801016ad83Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 17811016ad83Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 17821016ad83Smrg else 17831016ad83Smrg # Make teststring a little bigger before we do anything with it. 17841016ad83Smrg # a 1K string should be a reasonable start. 17857204935cSmrg for i in 1 2 3 4 5 6 7 8; do 17861016ad83Smrg teststring=$teststring$teststring 17871016ad83Smrg done 17881016ad83Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 17891016ad83Smrg # If test is not a shell built-in, we'll probably end up computing a 17901016ad83Smrg # maximum length that is only half of the actual maximum length, but 17911016ad83Smrg # we can't tell. 17927204935cSmrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 17931016ad83Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 17947204935cSmrg test 17 != "$i" # 1/2 MB should be enough 17951016ad83Smrg do 17961016ad83Smrg i=`expr $i + 1` 17971016ad83Smrg teststring=$teststring$teststring 17981016ad83Smrg done 17991016ad83Smrg # Only check the string length outside the loop. 18001016ad83Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 18011016ad83Smrg teststring= 18021016ad83Smrg # Add a significant safety factor because C++ compilers can tack on 18031016ad83Smrg # massive amounts of additional arguments before passing them to the 18041016ad83Smrg # linker. It appears as though 1/2 is a usable value. 18051016ad83Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 18061016ad83Smrg fi 18071016ad83Smrg ;; 18081016ad83Smrg esac 18091016ad83Smrg]) 18107204935cSmrgif test -n "$lt_cv_sys_max_cmd_len"; then 18111016ad83Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 18121016ad83Smrgelse 18131016ad83Smrg AC_MSG_RESULT(none) 18141016ad83Smrgfi 18151016ad83Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 18161016ad83Smrg_LT_DECL([], [max_cmd_len], [0], 18171016ad83Smrg [What is the maximum length of a command?]) 18181016ad83Smrg])# LT_CMD_MAX_LEN 18191016ad83Smrg 18201016ad83Smrg# Old name: 18211016ad83SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 18221016ad83Smrgdnl aclocal-1.4 backwards compatibility: 18231016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 18241016ad83Smrg 18251016ad83Smrg 18261016ad83Smrg# _LT_HEADER_DLFCN 18271016ad83Smrg# ---------------- 18281016ad83Smrgm4_defun([_LT_HEADER_DLFCN], 18291016ad83Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 18301016ad83Smrg])# _LT_HEADER_DLFCN 18311016ad83Smrg 18321016ad83Smrg 18331016ad83Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 18341016ad83Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 18351016ad83Smrg# ---------------------------------------------------------------- 18361016ad83Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 18371016ad83Smrg[m4_require([_LT_HEADER_DLFCN])dnl 18387204935cSmrgif test yes = "$cross_compiling"; then : 18391016ad83Smrg [$4] 18401016ad83Smrgelse 18411016ad83Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 18421016ad83Smrg lt_status=$lt_dlunknown 18431016ad83Smrg cat > conftest.$ac_ext <<_LT_EOF 18441016ad83Smrg[#line $LINENO "configure" 18451016ad83Smrg#include "confdefs.h" 18461016ad83Smrg 18471016ad83Smrg#if HAVE_DLFCN_H 18481016ad83Smrg#include <dlfcn.h> 18491016ad83Smrg#endif 18501016ad83Smrg 18511016ad83Smrg#include <stdio.h> 18521016ad83Smrg 18531016ad83Smrg#ifdef RTLD_GLOBAL 18541016ad83Smrg# define LT_DLGLOBAL RTLD_GLOBAL 18551016ad83Smrg#else 18561016ad83Smrg# ifdef DL_GLOBAL 18571016ad83Smrg# define LT_DLGLOBAL DL_GLOBAL 18581016ad83Smrg# else 18591016ad83Smrg# define LT_DLGLOBAL 0 18601016ad83Smrg# endif 18611016ad83Smrg#endif 18621016ad83Smrg 18631016ad83Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 18641016ad83Smrg find out it does not work in some platform. */ 18651016ad83Smrg#ifndef LT_DLLAZY_OR_NOW 18661016ad83Smrg# ifdef RTLD_LAZY 18671016ad83Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 18681016ad83Smrg# else 18691016ad83Smrg# ifdef DL_LAZY 18701016ad83Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 18711016ad83Smrg# else 18721016ad83Smrg# ifdef RTLD_NOW 18731016ad83Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 18741016ad83Smrg# else 18751016ad83Smrg# ifdef DL_NOW 18761016ad83Smrg# define LT_DLLAZY_OR_NOW DL_NOW 18771016ad83Smrg# else 18781016ad83Smrg# define LT_DLLAZY_OR_NOW 0 18791016ad83Smrg# endif 18801016ad83Smrg# endif 18811016ad83Smrg# endif 18821016ad83Smrg# endif 18831016ad83Smrg#endif 18841016ad83Smrg 18857204935cSmrg/* When -fvisibility=hidden is used, assume the code has been annotated 18861016ad83Smrg correspondingly for the symbols needed. */ 18877204935cSmrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 18881016ad83Smrgint fnord () __attribute__((visibility("default"))); 18891016ad83Smrg#endif 18901016ad83Smrg 18911016ad83Smrgint fnord () { return 42; } 18921016ad83Smrgint main () 18931016ad83Smrg{ 18941016ad83Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 18951016ad83Smrg int status = $lt_dlunknown; 18961016ad83Smrg 18971016ad83Smrg if (self) 18981016ad83Smrg { 18991016ad83Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 19001016ad83Smrg else 19011016ad83Smrg { 19021016ad83Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 19031016ad83Smrg else puts (dlerror ()); 19041016ad83Smrg } 19051016ad83Smrg /* dlclose (self); */ 19061016ad83Smrg } 19071016ad83Smrg else 19081016ad83Smrg puts (dlerror ()); 19091016ad83Smrg 19101016ad83Smrg return status; 19111016ad83Smrg}] 19121016ad83Smrg_LT_EOF 19137204935cSmrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 19141016ad83Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 19151016ad83Smrg lt_status=$? 19161016ad83Smrg case x$lt_status in 19171016ad83Smrg x$lt_dlno_uscore) $1 ;; 19181016ad83Smrg x$lt_dlneed_uscore) $2 ;; 19191016ad83Smrg x$lt_dlunknown|x*) $3 ;; 19201016ad83Smrg esac 19211016ad83Smrg else : 19221016ad83Smrg # compilation failed 19231016ad83Smrg $3 19241016ad83Smrg fi 19251016ad83Smrgfi 19261016ad83Smrgrm -fr conftest* 19271016ad83Smrg])# _LT_TRY_DLOPEN_SELF 19281016ad83Smrg 19291016ad83Smrg 19301016ad83Smrg# LT_SYS_DLOPEN_SELF 19311016ad83Smrg# ------------------ 19321016ad83SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 19331016ad83Smrg[m4_require([_LT_HEADER_DLFCN])dnl 19347204935cSmrgif test yes != "$enable_dlopen"; then 19351016ad83Smrg enable_dlopen=unknown 19361016ad83Smrg enable_dlopen_self=unknown 19371016ad83Smrg enable_dlopen_self_static=unknown 19381016ad83Smrgelse 19391016ad83Smrg lt_cv_dlopen=no 19401016ad83Smrg lt_cv_dlopen_libs= 19411016ad83Smrg 19421016ad83Smrg case $host_os in 19431016ad83Smrg beos*) 19447204935cSmrg lt_cv_dlopen=load_add_on 19451016ad83Smrg lt_cv_dlopen_libs= 19461016ad83Smrg lt_cv_dlopen_self=yes 19471016ad83Smrg ;; 19481016ad83Smrg 19491016ad83Smrg mingw* | pw32* | cegcc*) 19507204935cSmrg lt_cv_dlopen=LoadLibrary 19511016ad83Smrg lt_cv_dlopen_libs= 19521016ad83Smrg ;; 19531016ad83Smrg 19541016ad83Smrg cygwin*) 19557204935cSmrg lt_cv_dlopen=dlopen 19561016ad83Smrg lt_cv_dlopen_libs= 19571016ad83Smrg ;; 19581016ad83Smrg 19591016ad83Smrg darwin*) 19607204935cSmrg # if libdl is installed we need to link against it 19611016ad83Smrg AC_CHECK_LIB([dl], [dlopen], 19627204935cSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 19637204935cSmrg lt_cv_dlopen=dyld 19641016ad83Smrg lt_cv_dlopen_libs= 19651016ad83Smrg lt_cv_dlopen_self=yes 19661016ad83Smrg ]) 19671016ad83Smrg ;; 19681016ad83Smrg 19697204935cSmrg tpf*) 19707204935cSmrg # Don't try to run any link tests for TPF. We know it's impossible 19717204935cSmrg # because TPF is a cross-compiler, and we know how we open DSOs. 19727204935cSmrg lt_cv_dlopen=dlopen 19737204935cSmrg lt_cv_dlopen_libs= 19747204935cSmrg lt_cv_dlopen_self=no 19757204935cSmrg ;; 19767204935cSmrg 19771016ad83Smrg *) 19781016ad83Smrg AC_CHECK_FUNC([shl_load], 19797204935cSmrg [lt_cv_dlopen=shl_load], 19801016ad83Smrg [AC_CHECK_LIB([dld], [shl_load], 19817204935cSmrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 19821016ad83Smrg [AC_CHECK_FUNC([dlopen], 19837204935cSmrg [lt_cv_dlopen=dlopen], 19841016ad83Smrg [AC_CHECK_LIB([dl], [dlopen], 19857204935cSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 19861016ad83Smrg [AC_CHECK_LIB([svld], [dlopen], 19877204935cSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 19881016ad83Smrg [AC_CHECK_LIB([dld], [dld_link], 19897204935cSmrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 19901016ad83Smrg ]) 19911016ad83Smrg ]) 19921016ad83Smrg ]) 19931016ad83Smrg ]) 19941016ad83Smrg ]) 19951016ad83Smrg ;; 19961016ad83Smrg esac 19971016ad83Smrg 19987204935cSmrg if test no = "$lt_cv_dlopen"; then 19991016ad83Smrg enable_dlopen=no 20007204935cSmrg else 20017204935cSmrg enable_dlopen=yes 20021016ad83Smrg fi 20031016ad83Smrg 20041016ad83Smrg case $lt_cv_dlopen in 20051016ad83Smrg dlopen) 20067204935cSmrg save_CPPFLAGS=$CPPFLAGS 20077204935cSmrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 20081016ad83Smrg 20097204935cSmrg save_LDFLAGS=$LDFLAGS 20101016ad83Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 20111016ad83Smrg 20127204935cSmrg save_LIBS=$LIBS 20131016ad83Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 20141016ad83Smrg 20151016ad83Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 20161016ad83Smrg lt_cv_dlopen_self, [dnl 20171016ad83Smrg _LT_TRY_DLOPEN_SELF( 20181016ad83Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 20191016ad83Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 20201016ad83Smrg ]) 20211016ad83Smrg 20227204935cSmrg if test yes = "$lt_cv_dlopen_self"; then 20231016ad83Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 20241016ad83Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 20251016ad83Smrg lt_cv_dlopen_self_static, [dnl 20261016ad83Smrg _LT_TRY_DLOPEN_SELF( 20271016ad83Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 20281016ad83Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 20291016ad83Smrg ]) 20301016ad83Smrg fi 20311016ad83Smrg 20327204935cSmrg CPPFLAGS=$save_CPPFLAGS 20337204935cSmrg LDFLAGS=$save_LDFLAGS 20347204935cSmrg LIBS=$save_LIBS 20351016ad83Smrg ;; 20361016ad83Smrg esac 20371016ad83Smrg 20381016ad83Smrg case $lt_cv_dlopen_self in 20391016ad83Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 20401016ad83Smrg *) enable_dlopen_self=unknown ;; 20411016ad83Smrg esac 20421016ad83Smrg 20431016ad83Smrg case $lt_cv_dlopen_self_static in 20441016ad83Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 20451016ad83Smrg *) enable_dlopen_self_static=unknown ;; 20461016ad83Smrg esac 20471016ad83Smrgfi 20481016ad83Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 20491016ad83Smrg [Whether dlopen is supported]) 20501016ad83Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 20511016ad83Smrg [Whether dlopen of programs is supported]) 20521016ad83Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 20531016ad83Smrg [Whether dlopen of statically linked programs is supported]) 20541016ad83Smrg])# LT_SYS_DLOPEN_SELF 20551016ad83Smrg 20561016ad83Smrg# Old name: 20571016ad83SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 20581016ad83Smrgdnl aclocal-1.4 backwards compatibility: 20591016ad83Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 20601016ad83Smrg 20611016ad83Smrg 20621016ad83Smrg# _LT_COMPILER_C_O([TAGNAME]) 20631016ad83Smrg# --------------------------- 20641016ad83Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 20651016ad83Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 20661016ad83Smrgm4_defun([_LT_COMPILER_C_O], 20671016ad83Smrg[m4_require([_LT_DECL_SED])dnl 20681016ad83Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 20691016ad83Smrgm4_require([_LT_TAG_COMPILER])dnl 20701016ad83SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 20711016ad83Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 20721016ad83Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 20731016ad83Smrg $RM -r conftest 2>/dev/null 20741016ad83Smrg mkdir conftest 20751016ad83Smrg cd conftest 20761016ad83Smrg mkdir out 20771016ad83Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 20781016ad83Smrg 20791016ad83Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 20801016ad83Smrg # Insert the option either (1) after the last *FLAGS variable, or 20811016ad83Smrg # (2) before a word containing "conftest.", or (3) at the end. 20821016ad83Smrg # Note that $ac_compile itself does not contain backslashes and begins 20831016ad83Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 20841016ad83Smrg lt_compile=`echo "$ac_compile" | $SED \ 20851016ad83Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 20861016ad83Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 20871016ad83Smrg -e 's:$: $lt_compiler_flag:'` 20881016ad83Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 20891016ad83Smrg (eval "$lt_compile" 2>out/conftest.err) 20901016ad83Smrg ac_status=$? 20911016ad83Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 20921016ad83Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 20931016ad83Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 20941016ad83Smrg then 20951016ad83Smrg # The compiler can only warn and ignore the option if not recognized 20961016ad83Smrg # So say no if there are warnings 20971016ad83Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 20981016ad83Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 20991016ad83Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 21001016ad83Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 21011016ad83Smrg fi 21021016ad83Smrg fi 21031016ad83Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 21041016ad83Smrg $RM conftest* 21051016ad83Smrg # SGI C++ compiler will create directory out/ii_files/ for 21061016ad83Smrg # template instantiation 21071016ad83Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 21081016ad83Smrg $RM out/* && rmdir out 21091016ad83Smrg cd .. 21101016ad83Smrg $RM -r conftest 21111016ad83Smrg $RM conftest* 21121016ad83Smrg]) 21131016ad83Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 21141016ad83Smrg [Does compiler simultaneously support -c and -o options?]) 21151016ad83Smrg])# _LT_COMPILER_C_O 21161016ad83Smrg 21171016ad83Smrg 21181016ad83Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 21191016ad83Smrg# ---------------------------------- 21201016ad83Smrg# Check to see if we can do hard links to lock some files if needed 21211016ad83Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 21221016ad83Smrg[m4_require([_LT_ENABLE_LOCK])dnl 21231016ad83Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 21241016ad83Smrg_LT_COMPILER_C_O([$1]) 21251016ad83Smrg 21267204935cSmrghard_links=nottested 21277204935cSmrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 21281016ad83Smrg # do not overwrite the value of need_locks provided by the user 21291016ad83Smrg AC_MSG_CHECKING([if we can lock with hard links]) 21301016ad83Smrg hard_links=yes 21311016ad83Smrg $RM conftest* 21321016ad83Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 21331016ad83Smrg touch conftest.a 21341016ad83Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 21351016ad83Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 21361016ad83Smrg AC_MSG_RESULT([$hard_links]) 21377204935cSmrg if test no = "$hard_links"; then 21387204935cSmrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 21391016ad83Smrg need_locks=warn 21401016ad83Smrg fi 21411016ad83Smrgelse 21421016ad83Smrg need_locks=no 21431016ad83Smrgfi 21441016ad83Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 21451016ad83Smrg])# _LT_COMPILER_FILE_LOCKS 21461016ad83Smrg 21471016ad83Smrg 21481016ad83Smrg# _LT_CHECK_OBJDIR 21491016ad83Smrg# ---------------- 21501016ad83Smrgm4_defun([_LT_CHECK_OBJDIR], 21511016ad83Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 21521016ad83Smrg[rm -f .libs 2>/dev/null 21531016ad83Smrgmkdir .libs 2>/dev/null 21541016ad83Smrgif test -d .libs; then 21551016ad83Smrg lt_cv_objdir=.libs 21561016ad83Smrgelse 21571016ad83Smrg # MS-DOS does not allow filenames that begin with a dot. 21581016ad83Smrg lt_cv_objdir=_libs 21591016ad83Smrgfi 21601016ad83Smrgrmdir .libs 2>/dev/null]) 21611016ad83Smrgobjdir=$lt_cv_objdir 21621016ad83Smrg_LT_DECL([], [objdir], [0], 21631016ad83Smrg [The name of the directory that contains temporary libtool files])dnl 21641016ad83Smrgm4_pattern_allow([LT_OBJDIR])dnl 21657204935cSmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 21667204935cSmrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 21671016ad83Smrg])# _LT_CHECK_OBJDIR 21681016ad83Smrg 21691016ad83Smrg 21701016ad83Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 21711016ad83Smrg# -------------------------------------- 21721016ad83Smrg# Check hardcoding attributes. 21731016ad83Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 21741016ad83Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 21751016ad83Smrg_LT_TAGVAR(hardcode_action, $1)= 21761016ad83Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 21771016ad83Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 21787204935cSmrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 21791016ad83Smrg 21801016ad83Smrg # We can hardcode non-existent directories. 21817204935cSmrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 21821016ad83Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 21831016ad83Smrg # have to relink, otherwise we might link with an installed library 21841016ad83Smrg # when we should be linking with a yet-to-be-installed one 21857204935cSmrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 21867204935cSmrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 21871016ad83Smrg # Linking always hardcodes the temporary library directory. 21881016ad83Smrg _LT_TAGVAR(hardcode_action, $1)=relink 21891016ad83Smrg else 21901016ad83Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 21911016ad83Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 21921016ad83Smrg fi 21931016ad83Smrgelse 21941016ad83Smrg # We cannot hardcode anything, or else we can only hardcode existing 21951016ad83Smrg # directories. 21961016ad83Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 21971016ad83Smrgfi 21981016ad83SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 21991016ad83Smrg 22007204935cSmrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 22017204935cSmrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 22021016ad83Smrg # Fast installation is not supported 22031016ad83Smrg enable_fast_install=no 22047204935cSmrgelif test yes = "$shlibpath_overrides_runpath" || 22057204935cSmrg test no = "$enable_shared"; then 22061016ad83Smrg # Fast installation is not necessary 22071016ad83Smrg enable_fast_install=needless 22081016ad83Smrgfi 22091016ad83Smrg_LT_TAGDECL([], [hardcode_action], [0], 22101016ad83Smrg [How to hardcode a shared library path into an executable]) 22111016ad83Smrg])# _LT_LINKER_HARDCODE_LIBPATH 22121016ad83Smrg 22131016ad83Smrg 22141016ad83Smrg# _LT_CMD_STRIPLIB 22151016ad83Smrg# ---------------- 22161016ad83Smrgm4_defun([_LT_CMD_STRIPLIB], 22171016ad83Smrg[m4_require([_LT_DECL_EGREP]) 22181016ad83Smrgstriplib= 22191016ad83Smrgold_striplib= 22201016ad83SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2221b9526c6aSmrgif test -z "$STRIP"; then 2222b9526c6aSmrg AC_MSG_RESULT([no]) 22231016ad83Smrgelse 2224b9526c6aSmrg if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2225b9526c6aSmrg old_striplib="$STRIP --strip-debug" 2226b9526c6aSmrg striplib="$STRIP --strip-unneeded" 2227b9526c6aSmrg AC_MSG_RESULT([yes]) 2228b9526c6aSmrg else 2229b9526c6aSmrg case $host_os in 2230b9526c6aSmrg darwin*) 2231b9526c6aSmrg # FIXME - insert some real tests, host_os isn't really good enough 22321016ad83Smrg striplib="$STRIP -x" 22331016ad83Smrg old_striplib="$STRIP -S" 22341016ad83Smrg AC_MSG_RESULT([yes]) 2235b9526c6aSmrg ;; 2236b9526c6aSmrg freebsd*) 2237b9526c6aSmrg if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 2238b9526c6aSmrg old_striplib="$STRIP --strip-debug" 2239b9526c6aSmrg striplib="$STRIP --strip-unneeded" 2240b9526c6aSmrg AC_MSG_RESULT([yes]) 2241b9526c6aSmrg else 2242b9526c6aSmrg AC_MSG_RESULT([no]) 2243b9526c6aSmrg fi 2244b9526c6aSmrg ;; 2245b9526c6aSmrg *) 22461016ad83Smrg AC_MSG_RESULT([no]) 2247b9526c6aSmrg ;; 2248b9526c6aSmrg esac 2249b9526c6aSmrg fi 22501016ad83Smrgfi 22511016ad83Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 22521016ad83Smrg_LT_DECL([], [striplib], [1]) 22531016ad83Smrg])# _LT_CMD_STRIPLIB 22541016ad83Smrg 22551016ad83Smrg 22567204935cSmrg# _LT_PREPARE_MUNGE_PATH_LIST 22577204935cSmrg# --------------------------- 22587204935cSmrg# Make sure func_munge_path_list() is defined correctly. 22597204935cSmrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 22607204935cSmrg[[# func_munge_path_list VARIABLE PATH 22617204935cSmrg# ----------------------------------- 22627204935cSmrg# VARIABLE is name of variable containing _space_ separated list of 22637204935cSmrg# directories to be munged by the contents of PATH, which is string 22647204935cSmrg# having a format: 22657204935cSmrg# "DIR[:DIR]:" 22667204935cSmrg# string "DIR[ DIR]" will be prepended to VARIABLE 22677204935cSmrg# ":DIR[:DIR]" 22687204935cSmrg# string "DIR[ DIR]" will be appended to VARIABLE 22697204935cSmrg# "DIRP[:DIRP]::[DIRA:]DIRA" 22707204935cSmrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 22717204935cSmrg# "DIRA[ DIRA]" will be appended to VARIABLE 22727204935cSmrg# "DIR[:DIR]" 22737204935cSmrg# VARIABLE will be replaced by "DIR[ DIR]" 22747204935cSmrgfunc_munge_path_list () 22757204935cSmrg{ 22767204935cSmrg case x@S|@2 in 22777204935cSmrg x) 22787204935cSmrg ;; 22797204935cSmrg *:) 22807204935cSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 22817204935cSmrg ;; 22827204935cSmrg x:*) 22837204935cSmrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 22847204935cSmrg ;; 22857204935cSmrg *::*) 22867204935cSmrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 22877204935cSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 22887204935cSmrg ;; 22897204935cSmrg *) 22907204935cSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 22917204935cSmrg ;; 22927204935cSmrg esac 22937204935cSmrg} 22947204935cSmrg]])# _LT_PREPARE_PATH_LIST 22957204935cSmrg 22967204935cSmrg 22971016ad83Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 22981016ad83Smrg# ----------------------------- 22991016ad83Smrg# PORTME Fill in your ld.so characteristics 23001016ad83Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 23011016ad83Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 23021016ad83Smrgm4_require([_LT_DECL_EGREP])dnl 23031016ad83Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 23041016ad83Smrgm4_require([_LT_DECL_OBJDUMP])dnl 23051016ad83Smrgm4_require([_LT_DECL_SED])dnl 23061016ad83Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 23077204935cSmrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 23081016ad83SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 23091016ad83Smrgm4_if([$1], 23101016ad83Smrg [], [ 23117204935cSmrgif test yes = "$GCC"; then 23121016ad83Smrg case $host_os in 23137204935cSmrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 23147204935cSmrg *) lt_awk_arg='/^libraries:/' ;; 23151016ad83Smrg esac 23161016ad83Smrg case $host_os in 23177204935cSmrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 23187204935cSmrg *) lt_sed_strip_eq='s|=/|/|g' ;; 23191016ad83Smrg esac 23201016ad83Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 23211016ad83Smrg case $lt_search_path_spec in 23221016ad83Smrg *\;*) 23231016ad83Smrg # if the path contains ";" then we assume it to be the separator 23241016ad83Smrg # otherwise default to the standard path separator (i.e. ":") - it is 23251016ad83Smrg # assumed that no part of a normal pathname contains ";" but that should 23261016ad83Smrg # okay in the real world where ";" in dirpaths is itself problematic. 23271016ad83Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 23281016ad83Smrg ;; 23291016ad83Smrg *) 23301016ad83Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 23311016ad83Smrg ;; 23321016ad83Smrg esac 23331016ad83Smrg # Ok, now we have the path, separated by spaces, we can step through it 23347204935cSmrg # and add multilib dir if necessary... 23351016ad83Smrg lt_tmp_lt_search_path_spec= 23367204935cSmrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 23377204935cSmrg # ...but if some path component already ends with the multilib dir we assume 23387204935cSmrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 23397204935cSmrg case "$lt_multi_os_dir; $lt_search_path_spec " in 23407204935cSmrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 23417204935cSmrg lt_multi_os_dir= 23427204935cSmrg ;; 23437204935cSmrg esac 23441016ad83Smrg for lt_sys_path in $lt_search_path_spec; do 23457204935cSmrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 23467204935cSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 23477204935cSmrg elif test -n "$lt_multi_os_dir"; then 23481016ad83Smrg test -d "$lt_sys_path" && \ 23491016ad83Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 23501016ad83Smrg fi 23511016ad83Smrg done 23521016ad83Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 23537204935cSmrgBEGIN {RS = " "; FS = "/|\n";} { 23547204935cSmrg lt_foo = ""; 23557204935cSmrg lt_count = 0; 23561016ad83Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 23571016ad83Smrg if ($lt_i != "" && $lt_i != ".") { 23581016ad83Smrg if ($lt_i == "..") { 23591016ad83Smrg lt_count++; 23601016ad83Smrg } else { 23611016ad83Smrg if (lt_count == 0) { 23627204935cSmrg lt_foo = "/" $lt_i lt_foo; 23631016ad83Smrg } else { 23641016ad83Smrg lt_count--; 23651016ad83Smrg } 23661016ad83Smrg } 23671016ad83Smrg } 23681016ad83Smrg } 23691016ad83Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 23701016ad83Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 23711016ad83Smrg}'` 23721016ad83Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 23731016ad83Smrg # for these hosts. 23741016ad83Smrg case $host_os in 23751016ad83Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 23767204935cSmrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 23771016ad83Smrg esac 23781016ad83Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 23791016ad83Smrgelse 23801016ad83Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 23811016ad83Smrgfi]) 23821016ad83Smrglibrary_names_spec= 23831016ad83Smrglibname_spec='lib$name' 23841016ad83Smrgsoname_spec= 23857204935cSmrgshrext_cmds=.so 23861016ad83Smrgpostinstall_cmds= 23871016ad83Smrgpostuninstall_cmds= 23881016ad83Smrgfinish_cmds= 23891016ad83Smrgfinish_eval= 23901016ad83Smrgshlibpath_var= 23911016ad83Smrgshlibpath_overrides_runpath=unknown 23921016ad83Smrgversion_type=none 23931016ad83Smrgdynamic_linker="$host_os ld.so" 23941016ad83Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 23951016ad83Smrgneed_lib_prefix=unknown 23961016ad83Smrghardcode_into_libs=no 23971016ad83Smrg 23981016ad83Smrg# when you set need_version to no, make sure it does not cause -set_version 23991016ad83Smrg# flags to be left without arguments 24001016ad83Smrgneed_version=unknown 24011016ad83Smrg 24027204935cSmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 24037204935cSmrg[User-defined run-time library search path.]) 24047204935cSmrg 24051016ad83Smrgcase $host_os in 24061016ad83Smrgaix3*) 24071016ad83Smrg version_type=linux # correct to gnu/linux during the next big refactor 24087204935cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 24091016ad83Smrg shlibpath_var=LIBPATH 24101016ad83Smrg 24111016ad83Smrg # AIX 3 has no versioning support, so we append a major version to the name. 24127204935cSmrg soname_spec='$libname$release$shared_ext$major' 24131016ad83Smrg ;; 24141016ad83Smrg 24151016ad83Smrgaix[[4-9]]*) 24161016ad83Smrg version_type=linux # correct to gnu/linux during the next big refactor 24171016ad83Smrg need_lib_prefix=no 24181016ad83Smrg need_version=no 24191016ad83Smrg hardcode_into_libs=yes 24207204935cSmrg if test ia64 = "$host_cpu"; then 24211016ad83Smrg # AIX 5 supports IA64 24227204935cSmrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 24231016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 24241016ad83Smrg else 24251016ad83Smrg # With GCC up to 2.95.x, collect2 would create an import file 24261016ad83Smrg # for dependence libraries. The import file would start with 24277204935cSmrg # the line '#! .'. This would cause the generated library to 24287204935cSmrg # depend on '.', always an invalid library. This was fixed in 24291016ad83Smrg # development snapshots of GCC prior to 3.0. 24301016ad83Smrg case $host_os in 24311016ad83Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 24321016ad83Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 24331016ad83Smrg echo ' yes ' 24347204935cSmrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 24351016ad83Smrg : 24361016ad83Smrg else 24371016ad83Smrg can_build_shared=no 24381016ad83Smrg fi 24391016ad83Smrg ;; 24401016ad83Smrg esac 24417204935cSmrg # Using Import Files as archive members, it is possible to support 24427204935cSmrg # filename-based versioning of shared library archives on AIX. While 24437204935cSmrg # this would work for both with and without runtime linking, it will 24447204935cSmrg # prevent static linking of such archives. So we do filename-based 24457204935cSmrg # shared library versioning with .so extension only, which is used 24467204935cSmrg # when both runtime linking and shared linking is enabled. 24477204935cSmrg # Unfortunately, runtime linking may impact performance, so we do 24487204935cSmrg # not want this to be the default eventually. Also, we use the 24497204935cSmrg # versioned .so libs for executables only if there is the -brtl 24507204935cSmrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 24517204935cSmrg # To allow for filename-based versioning support, we need to create 24527204935cSmrg # libNAME.so.V as an archive file, containing: 24537204935cSmrg # *) an Import File, referring to the versioned filename of the 24547204935cSmrg # archive as well as the shared archive member, telling the 24557204935cSmrg # bitwidth (32 or 64) of that shared object, and providing the 24567204935cSmrg # list of exported symbols of that shared object, eventually 24577204935cSmrg # decorated with the 'weak' keyword 24587204935cSmrg # *) the shared object with the F_LOADONLY flag set, to really avoid 24597204935cSmrg # it being seen by the linker. 24607204935cSmrg # At run time we better use the real file rather than another symlink, 24617204935cSmrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 24627204935cSmrg 24637204935cSmrg case $with_aix_soname,$aix_use_runtimelinking in 24647204935cSmrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 24651016ad83Smrg # soname into executable. Probably we can add versioning support to 24661016ad83Smrg # collect2, so additional links can be useful in future. 24677204935cSmrg aix,yes) # traditional libtool 24687204935cSmrg dynamic_linker='AIX unversionable lib.so' 24691016ad83Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 24701016ad83Smrg # instead of lib<name>.a to let people know that these are not 24711016ad83Smrg # typical AIX shared libraries. 24727204935cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 24737204935cSmrg ;; 24747204935cSmrg aix,no) # traditional AIX only 24757204935cSmrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 24761016ad83Smrg # We preserve .a as extension for shared libraries through AIX4.2 24771016ad83Smrg # and later when we are not doing run time linking. 24787204935cSmrg library_names_spec='$libname$release.a $libname.a' 24797204935cSmrg soname_spec='$libname$release$shared_ext$major' 24807204935cSmrg ;; 24817204935cSmrg svr4,*) # full svr4 only 24827204935cSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 24837204935cSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 24847204935cSmrg # We do not specify a path in Import Files, so LIBPATH fires. 24857204935cSmrg shlibpath_overrides_runpath=yes 24867204935cSmrg ;; 24877204935cSmrg *,yes) # both, prefer svr4 24887204935cSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 24897204935cSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 24907204935cSmrg # unpreferred sharedlib libNAME.a needs extra handling 24917204935cSmrg postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' 24927204935cSmrg postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' 24937204935cSmrg # We do not specify a path in Import Files, so LIBPATH fires. 24947204935cSmrg shlibpath_overrides_runpath=yes 24957204935cSmrg ;; 24967204935cSmrg *,no) # both, prefer aix 24977204935cSmrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 24987204935cSmrg library_names_spec='$libname$release.a $libname.a' 24997204935cSmrg soname_spec='$libname$release$shared_ext$major' 25007204935cSmrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 25017204935cSmrg postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' 25027204935cSmrg postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' 25037204935cSmrg ;; 25047204935cSmrg esac 25051016ad83Smrg shlibpath_var=LIBPATH 25061016ad83Smrg fi 25071016ad83Smrg ;; 25081016ad83Smrg 25091016ad83Smrgamigaos*) 25101016ad83Smrg case $host_cpu in 25111016ad83Smrg powerpc) 25121016ad83Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 25131016ad83Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 25147204935cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 25151016ad83Smrg ;; 25161016ad83Smrg m68k) 25171016ad83Smrg library_names_spec='$libname.ixlibrary $libname.a' 25181016ad83Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 25197204935cSmrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' 25201016ad83Smrg ;; 25211016ad83Smrg esac 25221016ad83Smrg ;; 25231016ad83Smrg 25241016ad83Smrgbeos*) 25257204935cSmrg library_names_spec='$libname$shared_ext' 25261016ad83Smrg dynamic_linker="$host_os ld.so" 25271016ad83Smrg shlibpath_var=LIBRARY_PATH 25281016ad83Smrg ;; 25291016ad83Smrg 25301016ad83Smrgbsdi[[45]]*) 25311016ad83Smrg version_type=linux # correct to gnu/linux during the next big refactor 25321016ad83Smrg need_version=no 25337204935cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 25347204935cSmrg soname_spec='$libname$release$shared_ext$major' 25351016ad83Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 25361016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 25371016ad83Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 25381016ad83Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 25391016ad83Smrg # the default ld.so.conf also contains /usr/contrib/lib and 25401016ad83Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 25411016ad83Smrg # libtool to hard-code these into programs 25421016ad83Smrg ;; 25431016ad83Smrg 25441016ad83Smrgcygwin* | mingw* | pw32* | cegcc*) 25451016ad83Smrg version_type=windows 25467204935cSmrg shrext_cmds=.dll 25471016ad83Smrg need_version=no 25481016ad83Smrg need_lib_prefix=no 25491016ad83Smrg 25501016ad83Smrg case $GCC,$cc_basename in 25511016ad83Smrg yes,*) 25521016ad83Smrg # gcc 25531016ad83Smrg library_names_spec='$libname.dll.a' 25541016ad83Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 25557204935cSmrg postinstall_cmds='base_file=`basename \$file`~ 25567204935cSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 25571016ad83Smrg dldir=$destdir/`dirname \$dlpath`~ 25581016ad83Smrg test -d \$dldir || mkdir -p \$dldir~ 25591016ad83Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 25601016ad83Smrg chmod a+x \$dldir/$dlname~ 25611016ad83Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 25621016ad83Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 25631016ad83Smrg fi' 25641016ad83Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 25651016ad83Smrg dlpath=$dir/\$dldll~ 25661016ad83Smrg $RM \$dlpath' 25671016ad83Smrg shlibpath_overrides_runpath=yes 25681016ad83Smrg 25691016ad83Smrg case $host_os in 25701016ad83Smrg cygwin*) 25711016ad83Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2572b9526c6aSmrg soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25731016ad83Smrgm4_if([$1], [],[ 25741016ad83Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 25751016ad83Smrg ;; 25761016ad83Smrg mingw* | cegcc*) 25771016ad83Smrg # MinGW DLLs use traditional 'lib' prefix 25787204935cSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25791016ad83Smrg ;; 25801016ad83Smrg pw32*) 25811016ad83Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 2582b9526c6aSmrg library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25831016ad83Smrg ;; 25841016ad83Smrg esac 25851016ad83Smrg dynamic_linker='Win32 ld.exe' 25861016ad83Smrg ;; 25871016ad83Smrg 2588b9526c6aSmrg *,cl* | *,icl*) 2589b9526c6aSmrg # Native MSVC or ICC 25901016ad83Smrg libname_spec='$name' 25917204935cSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25927204935cSmrg library_names_spec='$libname.dll.lib' 25931016ad83Smrg 25941016ad83Smrg case $build_os in 25951016ad83Smrg mingw*) 25961016ad83Smrg sys_lib_search_path_spec= 25971016ad83Smrg lt_save_ifs=$IFS 25981016ad83Smrg IFS=';' 25991016ad83Smrg for lt_path in $LIB 26001016ad83Smrg do 26011016ad83Smrg IFS=$lt_save_ifs 26021016ad83Smrg # Let DOS variable expansion print the short 8.3 style file name. 26031016ad83Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 26041016ad83Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 26051016ad83Smrg done 26061016ad83Smrg IFS=$lt_save_ifs 26071016ad83Smrg # Convert to MSYS style. 2608b9526c6aSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 26091016ad83Smrg ;; 26101016ad83Smrg cygwin*) 26111016ad83Smrg # Convert to unix form, then to dos form, then back to unix form 26121016ad83Smrg # but this time dos style (no spaces!) so that the unix form looks 26131016ad83Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 26141016ad83Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 26151016ad83Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 26161016ad83Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 26171016ad83Smrg ;; 26181016ad83Smrg *) 26197204935cSmrg sys_lib_search_path_spec=$LIB 26201016ad83Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 26211016ad83Smrg # It is most probably a Windows format PATH. 26221016ad83Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 26231016ad83Smrg else 26241016ad83Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 26251016ad83Smrg fi 26261016ad83Smrg # FIXME: find the short name or the path components, as spaces are 26271016ad83Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 26281016ad83Smrg ;; 26291016ad83Smrg esac 26301016ad83Smrg 26311016ad83Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 26327204935cSmrg postinstall_cmds='base_file=`basename \$file`~ 26337204935cSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 26341016ad83Smrg dldir=$destdir/`dirname \$dlpath`~ 26351016ad83Smrg test -d \$dldir || mkdir -p \$dldir~ 26361016ad83Smrg $install_prog $dir/$dlname \$dldir/$dlname' 26371016ad83Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 26381016ad83Smrg dlpath=$dir/\$dldll~ 26391016ad83Smrg $RM \$dlpath' 26401016ad83Smrg shlibpath_overrides_runpath=yes 26411016ad83Smrg dynamic_linker='Win32 link.exe' 26421016ad83Smrg ;; 26431016ad83Smrg 26441016ad83Smrg *) 2645b9526c6aSmrg # Assume MSVC and ICC wrapper 26467204935cSmrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 26471016ad83Smrg dynamic_linker='Win32 ld.exe' 26481016ad83Smrg ;; 26491016ad83Smrg esac 26501016ad83Smrg # FIXME: first we should search . and the directory the executable is in 26511016ad83Smrg shlibpath_var=PATH 26521016ad83Smrg ;; 26531016ad83Smrg 26541016ad83Smrgdarwin* | rhapsody*) 26551016ad83Smrg dynamic_linker="$host_os dyld" 26561016ad83Smrg version_type=darwin 26571016ad83Smrg need_lib_prefix=no 26581016ad83Smrg need_version=no 2659aa30ed02Smrg library_names_spec='$libname$release$versuffix$shared_ext $libname$release$major$shared_ext $libname$shared_ext' 26607204935cSmrg soname_spec='$libname$release$major$shared_ext' 26611016ad83Smrg shlibpath_overrides_runpath=yes 26621016ad83Smrg shlibpath_var=DYLD_LIBRARY_PATH 2663aa30ed02Smrg shrext_cmds='`test .$module = .yes && echo .bundle || echo .dylib`' 26641016ad83Smrgm4_if([$1], [],[ 26651016ad83Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 26661016ad83Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 26671016ad83Smrg ;; 26681016ad83Smrg 26691016ad83Smrgdgux*) 26701016ad83Smrg version_type=linux # correct to gnu/linux during the next big refactor 26711016ad83Smrg need_lib_prefix=no 26721016ad83Smrg need_version=no 26737204935cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 26747204935cSmrg soname_spec='$libname$release$shared_ext$major' 26751016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 26761016ad83Smrg ;; 26771016ad83Smrg 2678b9526c6aSmrgfreebsd* | dragonfly* | midnightbsd*) 26791016ad83Smrg # DragonFly does not have aout. When/if they implement a new 26801016ad83Smrg # versioning mechanism, adjust this. 26811016ad83Smrg if test -x /usr/bin/objformat; then 26821016ad83Smrg objformat=`/usr/bin/objformat` 26831016ad83Smrg else 26841016ad83Smrg case $host_os in 26851016ad83Smrg freebsd[[23]].*) objformat=aout ;; 26861016ad83Smrg *) objformat=elf ;; 26871016ad83Smrg esac 26881016ad83Smrg fi 2689aa30ed02Smrg # Handle Gentoo/FreeBSD as it was Linux 2690aa30ed02Smrg case $host_vendor in 2691aa30ed02Smrg gentoo) 2692aa30ed02Smrg version_type=linux ;; 2693aa30ed02Smrg *) 2694aa30ed02Smrg version_type=freebsd-$objformat ;; 2695aa30ed02Smrg esac 2696aa30ed02Smrg 26971016ad83Smrg case $version_type in 26981016ad83Smrg freebsd-elf*) 26997204935cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27007204935cSmrg soname_spec='$libname$release$shared_ext$major' 27011016ad83Smrg need_version=no 27021016ad83Smrg need_lib_prefix=no 27031016ad83Smrg ;; 27041016ad83Smrg freebsd-*) 27057204935cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 27061016ad83Smrg need_version=yes 27071016ad83Smrg ;; 2708aa30ed02Smrg linux) 2709aa30ed02Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2710aa30ed02Smrg soname_spec='${libname}${release}${shared_ext}$major' 2711aa30ed02Smrg need_lib_prefix=no 2712aa30ed02Smrg need_version=no 2713aa30ed02Smrg ;; 27141016ad83Smrg esac 27151016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 27161016ad83Smrg case $host_os in 27171016ad83Smrg freebsd2.*) 27181016ad83Smrg shlibpath_overrides_runpath=yes 27191016ad83Smrg ;; 27201016ad83Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 27211016ad83Smrg shlibpath_overrides_runpath=yes 27221016ad83Smrg hardcode_into_libs=yes 27231016ad83Smrg ;; 27241016ad83Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 27251016ad83Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 27261016ad83Smrg shlibpath_overrides_runpath=no 27271016ad83Smrg hardcode_into_libs=yes 27281016ad83Smrg ;; 27291016ad83Smrg *) # from 4.6 on, and DragonFly 27301016ad83Smrg shlibpath_overrides_runpath=yes 27311016ad83Smrg hardcode_into_libs=yes 27321016ad83Smrg ;; 27331016ad83Smrg esac 27341016ad83Smrg ;; 27351016ad83Smrg 27361016ad83Smrghaiku*) 27371016ad83Smrg version_type=linux # correct to gnu/linux during the next big refactor 27381016ad83Smrg need_lib_prefix=no 27391016ad83Smrg need_version=no 27401016ad83Smrg dynamic_linker="$host_os runtime_loader" 27417204935cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27427204935cSmrg soname_spec='$libname$release$shared_ext$major' 27431016ad83Smrg shlibpath_var=LIBRARY_PATH 27447204935cSmrg shlibpath_overrides_runpath=no 27451016ad83Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 27461016ad83Smrg hardcode_into_libs=yes 27471016ad83Smrg ;; 27481016ad83Smrg 27491016ad83Smrghpux9* | hpux10* | hpux11*) 27501016ad83Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 27511016ad83Smrg # link against other versions. 27521016ad83Smrg version_type=sunos 27531016ad83Smrg need_lib_prefix=no 27541016ad83Smrg need_version=no 27551016ad83Smrg case $host_cpu in 27561016ad83Smrg ia64*) 27571016ad83Smrg shrext_cmds='.so' 27581016ad83Smrg hardcode_into_libs=yes 27591016ad83Smrg dynamic_linker="$host_os dld.so" 27601016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 27611016ad83Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 27627204935cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27637204935cSmrg soname_spec='$libname$release$shared_ext$major' 27647204935cSmrg if test 32 = "$HPUX_IA64_MODE"; then 27651016ad83Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 27667204935cSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 27671016ad83Smrg else 27681016ad83Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 27697204935cSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 27701016ad83Smrg fi 27711016ad83Smrg ;; 27721016ad83Smrg hppa*64*) 27731016ad83Smrg shrext_cmds='.sl' 27741016ad83Smrg hardcode_into_libs=yes 27751016ad83Smrg dynamic_linker="$host_os dld.sl" 27761016ad83Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 27771016ad83Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 27787204935cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27797204935cSmrg soname_spec='$libname$release$shared_ext$major' 27801016ad83Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 27811016ad83Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 27821016ad83Smrg ;; 27831016ad83Smrg *) 27841016ad83Smrg shrext_cmds='.sl' 27851016ad83Smrg dynamic_linker="$host_os dld.sl" 27861016ad83Smrg shlibpath_var=SHLIB_PATH 27871016ad83Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 27887204935cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27897204935cSmrg soname_spec='$libname$release$shared_ext$major' 27901016ad83Smrg ;; 27911016ad83Smrg esac 27921016ad83Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 27931016ad83Smrg postinstall_cmds='chmod 555 $lib' 27941016ad83Smrg # or fails outright, so override atomically: 27951016ad83Smrg install_override_mode=555 27961016ad83Smrg ;; 27971016ad83Smrg 27981016ad83Smrginterix[[3-9]]*) 27991016ad83Smrg version_type=linux # correct to gnu/linux during the next big refactor 28001016ad83Smrg need_lib_prefix=no 28011016ad83Smrg need_version=no 28027204935cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 28037204935cSmrg soname_spec='$libname$release$shared_ext$major' 28041016ad83Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 28051016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 28061016ad83Smrg shlibpath_overrides_runpath=no 28071016ad83Smrg hardcode_into_libs=yes 28081016ad83Smrg ;; 28091016ad83Smrg 28101016ad83Smrgirix5* | irix6* | nonstopux*) 28111016ad83Smrg case $host_os in 28121016ad83Smrg nonstopux*) version_type=nonstopux ;; 28131016ad83Smrg *) 28147204935cSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 28151016ad83Smrg version_type=linux # correct to gnu/linux during the next big refactor 28161016ad83Smrg else 28171016ad83Smrg version_type=irix 28181016ad83Smrg fi ;; 28191016ad83Smrg esac 28201016ad83Smrg need_lib_prefix=no 28211016ad83Smrg need_version=no 28227204935cSmrg soname_spec='$libname$release$shared_ext$major' 28237204935cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 28241016ad83Smrg case $host_os in 28251016ad83Smrg irix5* | nonstopux*) 28261016ad83Smrg libsuff= shlibsuff= 28271016ad83Smrg ;; 28281016ad83Smrg *) 28291016ad83Smrg case $LD in # libtool.m4 will add one of these switches to LD 28301016ad83Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 28311016ad83Smrg libsuff= shlibsuff= libmagic=32-bit;; 28321016ad83Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 28331016ad83Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 28341016ad83Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 28351016ad83Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 28361016ad83Smrg *) libsuff= shlibsuff= libmagic=never-match;; 28371016ad83Smrg esac 28381016ad83Smrg ;; 28391016ad83Smrg esac 28401016ad83Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 28411016ad83Smrg shlibpath_overrides_runpath=no 28427204935cSmrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 28437204935cSmrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 28441016ad83Smrg hardcode_into_libs=yes 28451016ad83Smrg ;; 28461016ad83Smrg 28471016ad83Smrg# No shared lib support for Linux oldld, aout, or coff. 28481016ad83Smrglinux*oldld* | linux*aout* | linux*coff*) 28491016ad83Smrg dynamic_linker=no 28501016ad83Smrg ;; 28511016ad83Smrg 28527204935cSmrglinux*android*) 28537204935cSmrg version_type=none # Android doesn't support versioned libraries. 28547204935cSmrg need_lib_prefix=no 28557204935cSmrg need_version=no 28567204935cSmrg library_names_spec='$libname$release$shared_ext' 28577204935cSmrg soname_spec='$libname$release$shared_ext' 28587204935cSmrg finish_cmds= 28597204935cSmrg shlibpath_var=LD_LIBRARY_PATH 28607204935cSmrg shlibpath_overrides_runpath=yes 28617204935cSmrg 28627204935cSmrg # This implies no fast_install, which is unacceptable. 28637204935cSmrg # Some rework will be needed to allow for fast_install 28647204935cSmrg # before this can be enabled. 28657204935cSmrg hardcode_into_libs=yes 28667204935cSmrg 28677204935cSmrg dynamic_linker='Android linker' 28687204935cSmrg # Don't embed -rpath directories since the linker doesn't support them. 28697204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 28707204935cSmrg ;; 28717204935cSmrg 28721016ad83Smrg# This must be glibc/ELF. 28731016ad83Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 28741016ad83Smrg version_type=linux # correct to gnu/linux during the next big refactor 28751016ad83Smrg need_lib_prefix=no 28761016ad83Smrg need_version=no 28777204935cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 28787204935cSmrg soname_spec='$libname$release$shared_ext$major' 28791016ad83Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 28801016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 28811016ad83Smrg shlibpath_overrides_runpath=no 28821016ad83Smrg 28831016ad83Smrg # Some binutils ld are patched to set DT_RUNPATH 28841016ad83Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 28851016ad83Smrg [lt_cv_shlibpath_overrides_runpath=no 28861016ad83Smrg save_LDFLAGS=$LDFLAGS 28871016ad83Smrg save_libdir=$libdir 28881016ad83Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 28891016ad83Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 28901016ad83Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 28911016ad83Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 28921016ad83Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 28931016ad83Smrg LDFLAGS=$save_LDFLAGS 28941016ad83Smrg libdir=$save_libdir 28951016ad83Smrg ]) 28961016ad83Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 28971016ad83Smrg 28981016ad83Smrg # This implies no fast_install, which is unacceptable. 28991016ad83Smrg # Some rework will be needed to allow for fast_install 29001016ad83Smrg # before this can be enabled. 29011016ad83Smrg hardcode_into_libs=yes 29021016ad83Smrg 29037204935cSmrg # Ideally, we could use ldconfig to report *all* directores which are 29047204935cSmrg # searched for libraries, however this is still not possible. Aside from not 29057204935cSmrg # being certain /sbin/ldconfig is available, command 29067204935cSmrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 29077204935cSmrg # even though it is searched at run-time. Try to do the best guess by 29087204935cSmrg # appending ld.so.conf contents (and includes) to the search path. 29091016ad83Smrg if test -f /etc/ld.so.conf; then 29101016ad83Smrg 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' ' '` 2911fe12f63cSmrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 29121016ad83Smrg fi 29131016ad83Smrg 29141016ad83Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 29151016ad83Smrg # powerpc, because MkLinux only supported shared libraries with the 29161016ad83Smrg # GNU dynamic linker. Since this was broken with cross compilers, 29171016ad83Smrg # most powerpc-linux boxes support dynamic linking these days and 29181016ad83Smrg # people can always --disable-shared, the test was removed, and we 29191016ad83Smrg # assume the GNU/Linux dynamic linker is in use. 29201016ad83Smrg dynamic_linker='GNU/Linux ld.so' 29211016ad83Smrg ;; 29221016ad83Smrg 29231016ad83Smrgnetbsd*) 29241016ad83Smrg version_type=sunos 29251016ad83Smrg need_lib_prefix=no 29261016ad83Smrg need_version=no 29271016ad83Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 29287204935cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 29291016ad83Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 29301016ad83Smrg dynamic_linker='NetBSD (a.out) ld.so' 29311016ad83Smrg else 29327204935cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 29337204935cSmrg soname_spec='$libname$release$shared_ext$major' 29341016ad83Smrg dynamic_linker='NetBSD ld.elf_so' 29351016ad83Smrg fi 29361016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 29371016ad83Smrg shlibpath_overrides_runpath=yes 29381016ad83Smrg hardcode_into_libs=yes 29391016ad83Smrg ;; 29401016ad83Smrg 29411016ad83Smrgnewsos6) 29421016ad83Smrg version_type=linux # correct to gnu/linux during the next big refactor 29437204935cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 29441016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 29451016ad83Smrg shlibpath_overrides_runpath=yes 29461016ad83Smrg ;; 29471016ad83Smrg 29481016ad83Smrg*nto* | *qnx*) 29491016ad83Smrg version_type=qnx 29501016ad83Smrg need_lib_prefix=no 29511016ad83Smrg need_version=no 29527204935cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 29537204935cSmrg soname_spec='$libname$release$shared_ext$major' 29541016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 29551016ad83Smrg shlibpath_overrides_runpath=no 29561016ad83Smrg hardcode_into_libs=yes 29571016ad83Smrg dynamic_linker='ldqnx.so' 29581016ad83Smrg ;; 29591016ad83Smrg 29607204935cSmrgopenbsd* | bitrig*) 29611016ad83Smrg version_type=sunos 29627204935cSmrg sys_lib_dlsearch_path_spec=/usr/lib 29631016ad83Smrg need_lib_prefix=no 29647204935cSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 29657204935cSmrg need_version=no 29661016ad83Smrg else 29677204935cSmrg need_version=yes 29681016ad83Smrg fi 29697204935cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 29707204935cSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 29717204935cSmrg shlibpath_var=LD_LIBRARY_PATH 29727204935cSmrg shlibpath_overrides_runpath=yes 29731016ad83Smrg ;; 29741016ad83Smrg 29751016ad83Smrgos2*) 29761016ad83Smrg libname_spec='$name' 29777204935cSmrg version_type=windows 29787204935cSmrg shrext_cmds=.dll 29797204935cSmrg need_version=no 29801016ad83Smrg need_lib_prefix=no 29817204935cSmrg # OS/2 can only load a DLL with a base name of 8 characters or less. 29827204935cSmrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 29837204935cSmrg v=$($ECHO $release$versuffix | tr -d .-); 29847204935cSmrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 29857204935cSmrg $ECHO $n$v`$shared_ext' 29867204935cSmrg library_names_spec='${libname}_dll.$libext' 29871016ad83Smrg dynamic_linker='OS/2 ld.exe' 29887204935cSmrg shlibpath_var=BEGINLIBPATH 29897204935cSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 29907204935cSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 29917204935cSmrg postinstall_cmds='base_file=`basename \$file`~ 29927204935cSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 29937204935cSmrg dldir=$destdir/`dirname \$dlpath`~ 29947204935cSmrg test -d \$dldir || mkdir -p \$dldir~ 29957204935cSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 29967204935cSmrg chmod a+x \$dldir/$dlname~ 29977204935cSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 29987204935cSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 29997204935cSmrg fi' 30007204935cSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 30017204935cSmrg dlpath=$dir/\$dldll~ 30027204935cSmrg $RM \$dlpath' 30031016ad83Smrg ;; 30041016ad83Smrg 30051016ad83Smrgosf3* | osf4* | osf5*) 30061016ad83Smrg version_type=osf 30071016ad83Smrg need_lib_prefix=no 30081016ad83Smrg need_version=no 30097204935cSmrg soname_spec='$libname$release$shared_ext$major' 30107204935cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30111016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 30121016ad83Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 30137204935cSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 30141016ad83Smrg ;; 30151016ad83Smrg 30161016ad83Smrgrdos*) 30171016ad83Smrg dynamic_linker=no 30181016ad83Smrg ;; 30191016ad83Smrg 30201016ad83Smrgsolaris*) 30211016ad83Smrg version_type=linux # correct to gnu/linux during the next big refactor 30221016ad83Smrg need_lib_prefix=no 30231016ad83Smrg need_version=no 30247204935cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30257204935cSmrg soname_spec='$libname$release$shared_ext$major' 30261016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 30271016ad83Smrg shlibpath_overrides_runpath=yes 30281016ad83Smrg hardcode_into_libs=yes 30291016ad83Smrg # ldd complains unless libraries are executable 30301016ad83Smrg postinstall_cmds='chmod +x $lib' 30311016ad83Smrg ;; 30321016ad83Smrg 30331016ad83Smrgsunos4*) 30341016ad83Smrg version_type=sunos 30357204935cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 30361016ad83Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 30371016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 30381016ad83Smrg shlibpath_overrides_runpath=yes 30397204935cSmrg if test yes = "$with_gnu_ld"; then 30401016ad83Smrg need_lib_prefix=no 30411016ad83Smrg fi 30421016ad83Smrg need_version=yes 30431016ad83Smrg ;; 30441016ad83Smrg 30451016ad83Smrgsysv4 | sysv4.3*) 30461016ad83Smrg version_type=linux # correct to gnu/linux during the next big refactor 30477204935cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30487204935cSmrg soname_spec='$libname$release$shared_ext$major' 30491016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 30501016ad83Smrg case $host_vendor in 30511016ad83Smrg sni) 30521016ad83Smrg shlibpath_overrides_runpath=no 30531016ad83Smrg need_lib_prefix=no 30541016ad83Smrg runpath_var=LD_RUN_PATH 30551016ad83Smrg ;; 30561016ad83Smrg siemens) 30571016ad83Smrg need_lib_prefix=no 30581016ad83Smrg ;; 30591016ad83Smrg motorola) 30601016ad83Smrg need_lib_prefix=no 30611016ad83Smrg need_version=no 30621016ad83Smrg shlibpath_overrides_runpath=no 30631016ad83Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 30641016ad83Smrg ;; 30651016ad83Smrg esac 30661016ad83Smrg ;; 30671016ad83Smrg 30681016ad83Smrgsysv4*MP*) 30697204935cSmrg if test -d /usr/nec; then 30701016ad83Smrg version_type=linux # correct to gnu/linux during the next big refactor 30717204935cSmrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 30727204935cSmrg soname_spec='$libname$shared_ext.$major' 30731016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 30741016ad83Smrg fi 30751016ad83Smrg ;; 30761016ad83Smrg 30771016ad83Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 30787204935cSmrg version_type=sco 30791016ad83Smrg need_lib_prefix=no 30801016ad83Smrg need_version=no 30817204935cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 30827204935cSmrg soname_spec='$libname$release$shared_ext$major' 30831016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 30841016ad83Smrg shlibpath_overrides_runpath=yes 30851016ad83Smrg hardcode_into_libs=yes 30867204935cSmrg if test yes = "$with_gnu_ld"; then 30871016ad83Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 30881016ad83Smrg else 30891016ad83Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 30901016ad83Smrg case $host_os in 30911016ad83Smrg sco3.2v5*) 30921016ad83Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 30931016ad83Smrg ;; 30941016ad83Smrg esac 30951016ad83Smrg fi 30961016ad83Smrg sys_lib_dlsearch_path_spec='/usr/lib' 30971016ad83Smrg ;; 30981016ad83Smrg 30991016ad83Smrgtpf*) 31001016ad83Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 31011016ad83Smrg version_type=linux # correct to gnu/linux during the next big refactor 31021016ad83Smrg need_lib_prefix=no 31031016ad83Smrg need_version=no 31047204935cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 31051016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 31061016ad83Smrg shlibpath_overrides_runpath=no 31071016ad83Smrg hardcode_into_libs=yes 31081016ad83Smrg ;; 31091016ad83Smrg 31101016ad83Smrguts4*) 31111016ad83Smrg version_type=linux # correct to gnu/linux during the next big refactor 31127204935cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 31137204935cSmrg soname_spec='$libname$release$shared_ext$major' 31141016ad83Smrg shlibpath_var=LD_LIBRARY_PATH 31151016ad83Smrg ;; 31161016ad83Smrg 31171016ad83Smrg*) 31181016ad83Smrg dynamic_linker=no 31191016ad83Smrg ;; 31201016ad83Smrgesac 31211016ad83SmrgAC_MSG_RESULT([$dynamic_linker]) 31227204935cSmrgtest no = "$dynamic_linker" && can_build_shared=no 31231016ad83Smrg 31241016ad83Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 31257204935cSmrgif test yes = "$GCC"; then 31261016ad83Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 31271016ad83Smrgfi 31281016ad83Smrg 31297204935cSmrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 31307204935cSmrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 31311016ad83Smrgfi 31327204935cSmrg 31337204935cSmrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 31347204935cSmrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 31351016ad83Smrgfi 31361016ad83Smrg 31377204935cSmrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 31387204935cSmrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 31397204935cSmrg 31407204935cSmrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 31417204935cSmrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 31427204935cSmrg 31437204935cSmrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 31447204935cSmrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 31457204935cSmrg 31461016ad83Smrg_LT_DECL([], [variables_saved_for_relink], [1], 31471016ad83Smrg [Variables whose values should be saved in libtool wrapper scripts and 31481016ad83Smrg restored at link time]) 31491016ad83Smrg_LT_DECL([], [need_lib_prefix], [0], 31501016ad83Smrg [Do we need the "lib" prefix for modules?]) 31511016ad83Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 31521016ad83Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 31531016ad83Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 31541016ad83Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 31551016ad83Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 31561016ad83Smrg [Is shlibpath searched before the hard-coded library search path?]) 31571016ad83Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 31581016ad83Smrg_LT_DECL([], [library_names_spec], [1], 31591016ad83Smrg [[List of archive names. First name is the real one, the rest are links. 31601016ad83Smrg The last name is the one that the linker finds with -lNAME]]) 31611016ad83Smrg_LT_DECL([], [soname_spec], [1], 31621016ad83Smrg [[The coded name of the library, if different from the real name]]) 31631016ad83Smrg_LT_DECL([], [install_override_mode], [1], 31641016ad83Smrg [Permission mode override for installation of shared libraries]) 31651016ad83Smrg_LT_DECL([], [postinstall_cmds], [2], 31661016ad83Smrg [Command to use after installation of a shared archive]) 31671016ad83Smrg_LT_DECL([], [postuninstall_cmds], [2], 31681016ad83Smrg [Command to use after uninstallation of a shared archive]) 31691016ad83Smrg_LT_DECL([], [finish_cmds], [2], 31701016ad83Smrg [Commands used to finish a libtool library installation in a directory]) 31711016ad83Smrg_LT_DECL([], [finish_eval], [1], 31721016ad83Smrg [[As "finish_cmds", except a single script fragment to be evaled but 31731016ad83Smrg not shown]]) 31741016ad83Smrg_LT_DECL([], [hardcode_into_libs], [0], 31751016ad83Smrg [Whether we should hardcode library paths into libraries]) 31761016ad83Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 31771016ad83Smrg [Compile-time system search path for libraries]) 31787204935cSmrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 31797204935cSmrg [Detected run-time system search path for libraries]) 31807204935cSmrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 31817204935cSmrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 31821016ad83Smrg])# _LT_SYS_DYNAMIC_LINKER 31831016ad83Smrg 31841016ad83Smrg 31851016ad83Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 31861016ad83Smrg# -------------------------- 31877204935cSmrg# find a file program that can recognize shared library 31881016ad83SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 31891016ad83Smrg[m4_require([_LT_DECL_EGREP])dnl 31901016ad83SmrgAC_MSG_CHECKING([for $1]) 31911016ad83SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 31921016ad83Smrg[case $MAGIC_CMD in 31931016ad83Smrg[[\\/*] | ?:[\\/]*]) 31947204935cSmrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 31951016ad83Smrg ;; 31961016ad83Smrg*) 31977204935cSmrg lt_save_MAGIC_CMD=$MAGIC_CMD 31987204935cSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 31991016ad83Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 32001016ad83Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 32011016ad83Smrgdnl not every word. This closes a longstanding sh security hole. 32021016ad83Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 32031016ad83Smrg for ac_dir in $ac_dummy; do 32047204935cSmrg IFS=$lt_save_ifs 32051016ad83Smrg test -z "$ac_dir" && ac_dir=. 32067204935cSmrg if test -f "$ac_dir/$1"; then 32077204935cSmrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 32081016ad83Smrg if test -n "$file_magic_test_file"; then 32091016ad83Smrg case $deplibs_check_method in 32101016ad83Smrg "file_magic "*) 32111016ad83Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 32127204935cSmrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 32131016ad83Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 32141016ad83Smrg $EGREP "$file_magic_regex" > /dev/null; then 32151016ad83Smrg : 32161016ad83Smrg else 32171016ad83Smrg cat <<_LT_EOF 1>&2 32181016ad83Smrg 32191016ad83Smrg*** Warning: the command libtool uses to detect shared libraries, 32201016ad83Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 32211016ad83Smrg*** The result is that libtool may fail to recognize shared libraries 32221016ad83Smrg*** as such. This will affect the creation of libtool libraries that 32231016ad83Smrg*** depend on shared libraries, but programs linked with such libtool 32241016ad83Smrg*** libraries will work regardless of this problem. Nevertheless, you 32251016ad83Smrg*** may want to report the problem to your system manager and/or to 32261016ad83Smrg*** bug-libtool@gnu.org 32271016ad83Smrg 32281016ad83Smrg_LT_EOF 32291016ad83Smrg fi ;; 32301016ad83Smrg esac 32311016ad83Smrg fi 32321016ad83Smrg break 32331016ad83Smrg fi 32341016ad83Smrg done 32357204935cSmrg IFS=$lt_save_ifs 32367204935cSmrg MAGIC_CMD=$lt_save_MAGIC_CMD 32371016ad83Smrg ;; 32381016ad83Smrgesac]) 32397204935cSmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 32401016ad83Smrgif test -n "$MAGIC_CMD"; then 32411016ad83Smrg AC_MSG_RESULT($MAGIC_CMD) 32421016ad83Smrgelse 32431016ad83Smrg AC_MSG_RESULT(no) 32441016ad83Smrgfi 32451016ad83Smrg_LT_DECL([], [MAGIC_CMD], [0], 32461016ad83Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 32471016ad83Smrg])# _LT_PATH_TOOL_PREFIX 32481016ad83Smrg 32491016ad83Smrg# Old name: 32501016ad83SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 32511016ad83Smrgdnl aclocal-1.4 backwards compatibility: 32521016ad83Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 32531016ad83Smrg 32541016ad83Smrg 32551016ad83Smrg# _LT_PATH_MAGIC 32561016ad83Smrg# -------------- 32577204935cSmrg# find a file program that can recognize a shared library 32581016ad83Smrgm4_defun([_LT_PATH_MAGIC], 32591016ad83Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 32601016ad83Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 32611016ad83Smrg if test -n "$ac_tool_prefix"; then 32621016ad83Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 32631016ad83Smrg else 32641016ad83Smrg MAGIC_CMD=: 32651016ad83Smrg fi 32661016ad83Smrgfi 32671016ad83Smrg])# _LT_PATH_MAGIC 32681016ad83Smrg 32691016ad83Smrg 32701016ad83Smrg# LT_PATH_LD 32711016ad83Smrg# ---------- 32721016ad83Smrg# find the pathname to the GNU or non-GNU linker 32731016ad83SmrgAC_DEFUN([LT_PATH_LD], 32741016ad83Smrg[AC_REQUIRE([AC_PROG_CC])dnl 32751016ad83SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 32761016ad83SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 32771016ad83Smrgm4_require([_LT_DECL_SED])dnl 32781016ad83Smrgm4_require([_LT_DECL_EGREP])dnl 32791016ad83Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 32801016ad83Smrg 32811016ad83SmrgAC_ARG_WITH([gnu-ld], 32821016ad83Smrg [AS_HELP_STRING([--with-gnu-ld], 32831016ad83Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 32847204935cSmrg [test no = "$withval" || with_gnu_ld=yes], 32851016ad83Smrg [with_gnu_ld=no])dnl 32861016ad83Smrg 32871016ad83Smrgac_prog=ld 32887204935cSmrgif test yes = "$GCC"; then 32891016ad83Smrg # Check if gcc -print-prog-name=ld gives a path. 32901016ad83Smrg AC_MSG_CHECKING([for ld used by $CC]) 32911016ad83Smrg case $host in 32921016ad83Smrg *-*-mingw*) 32937204935cSmrg # gcc leaves a trailing carriage return, which upsets mingw 32941016ad83Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 32951016ad83Smrg *) 32961016ad83Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 32971016ad83Smrg esac 32981016ad83Smrg case $ac_prog in 32991016ad83Smrg # Accept absolute paths. 33001016ad83Smrg [[\\/]]* | ?:[[\\/]]*) 33011016ad83Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 33021016ad83Smrg # Canonicalize the pathname of ld 33031016ad83Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 33041016ad83Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 33051016ad83Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 33061016ad83Smrg done 33077204935cSmrg test -z "$LD" && LD=$ac_prog 33081016ad83Smrg ;; 33091016ad83Smrg "") 33101016ad83Smrg # If it fails, then pretend we aren't using GCC. 33111016ad83Smrg ac_prog=ld 33121016ad83Smrg ;; 33131016ad83Smrg *) 33141016ad83Smrg # If it is relative, then search for the first ld in PATH. 33151016ad83Smrg with_gnu_ld=unknown 33161016ad83Smrg ;; 33171016ad83Smrg esac 33187204935cSmrgelif test yes = "$with_gnu_ld"; then 33191016ad83Smrg AC_MSG_CHECKING([for GNU ld]) 33201016ad83Smrgelse 33211016ad83Smrg AC_MSG_CHECKING([for non-GNU ld]) 33221016ad83Smrgfi 33231016ad83SmrgAC_CACHE_VAL(lt_cv_path_LD, 33241016ad83Smrg[if test -z "$LD"; then 33257204935cSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 33261016ad83Smrg for ac_dir in $PATH; do 33277204935cSmrg IFS=$lt_save_ifs 33281016ad83Smrg test -z "$ac_dir" && ac_dir=. 33291016ad83Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 33307204935cSmrg lt_cv_path_LD=$ac_dir/$ac_prog 33311016ad83Smrg # Check to see if the program is GNU ld. I'd rather use --version, 33321016ad83Smrg # but apparently some variants of GNU ld only accept -v. 33331016ad83Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 33341016ad83Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 33351016ad83Smrg *GNU* | *'with BFD'*) 33367204935cSmrg test no != "$with_gnu_ld" && break 33371016ad83Smrg ;; 33381016ad83Smrg *) 33397204935cSmrg test yes != "$with_gnu_ld" && break 33401016ad83Smrg ;; 33411016ad83Smrg esac 33421016ad83Smrg fi 33431016ad83Smrg done 33447204935cSmrg IFS=$lt_save_ifs 33451016ad83Smrgelse 33467204935cSmrg lt_cv_path_LD=$LD # Let the user override the test with a path. 33471016ad83Smrgfi]) 33487204935cSmrgLD=$lt_cv_path_LD 33491016ad83Smrgif test -n "$LD"; then 33501016ad83Smrg AC_MSG_RESULT($LD) 33511016ad83Smrgelse 33521016ad83Smrg AC_MSG_RESULT(no) 33531016ad83Smrgfi 33541016ad83Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 33551016ad83Smrg_LT_PATH_LD_GNU 33561016ad83SmrgAC_SUBST([LD]) 33571016ad83Smrg 33581016ad83Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 33591016ad83Smrg])# LT_PATH_LD 33601016ad83Smrg 33611016ad83Smrg# Old names: 33621016ad83SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 33631016ad83SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 33641016ad83Smrgdnl aclocal-1.4 backwards compatibility: 33651016ad83Smrgdnl AC_DEFUN([AM_PROG_LD], []) 33661016ad83Smrgdnl AC_DEFUN([AC_PROG_LD], []) 33671016ad83Smrg 33681016ad83Smrg 33691016ad83Smrg# _LT_PATH_LD_GNU 33701016ad83Smrg#- -------------- 33711016ad83Smrgm4_defun([_LT_PATH_LD_GNU], 33721016ad83Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 33731016ad83Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 33741016ad83Smrgcase `$LD -v 2>&1 </dev/null` in 33751016ad83Smrg*GNU* | *'with BFD'*) 33761016ad83Smrg lt_cv_prog_gnu_ld=yes 33771016ad83Smrg ;; 33781016ad83Smrg*) 33791016ad83Smrg lt_cv_prog_gnu_ld=no 33801016ad83Smrg ;; 33811016ad83Smrgesac]) 33821016ad83Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 33831016ad83Smrg])# _LT_PATH_LD_GNU 33841016ad83Smrg 33851016ad83Smrg 33861016ad83Smrg# _LT_CMD_RELOAD 33871016ad83Smrg# -------------- 33881016ad83Smrg# find reload flag for linker 33891016ad83Smrg# -- PORTME Some linkers may need a different reload flag. 33901016ad83Smrgm4_defun([_LT_CMD_RELOAD], 33911016ad83Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 33921016ad83Smrg lt_cv_ld_reload_flag, 33931016ad83Smrg [lt_cv_ld_reload_flag='-r']) 33941016ad83Smrgreload_flag=$lt_cv_ld_reload_flag 33951016ad83Smrgcase $reload_flag in 33961016ad83Smrg"" | " "*) ;; 33971016ad83Smrg*) reload_flag=" $reload_flag" ;; 33981016ad83Smrgesac 33991016ad83Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 34001016ad83Smrgcase $host_os in 34011016ad83Smrg cygwin* | mingw* | pw32* | cegcc*) 34027204935cSmrg if test yes != "$GCC"; then 34031016ad83Smrg reload_cmds=false 34041016ad83Smrg fi 34051016ad83Smrg ;; 34061016ad83Smrg darwin*) 34077204935cSmrg if test yes = "$GCC"; then 34087204935cSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 34091016ad83Smrg else 34101016ad83Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 34111016ad83Smrg fi 34121016ad83Smrg ;; 34131016ad83Smrgesac 34141016ad83Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 34151016ad83Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 34161016ad83Smrg])# _LT_CMD_RELOAD 34171016ad83Smrg 34181016ad83Smrg 34197204935cSmrg# _LT_PATH_DD 34207204935cSmrg# ----------- 34217204935cSmrg# find a working dd 34227204935cSmrgm4_defun([_LT_PATH_DD], 34237204935cSmrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 34247204935cSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 34257204935cSmrgcat conftest.i conftest.i >conftest2.i 34267204935cSmrg: ${lt_DD:=$DD} 34277204935cSmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 34287204935cSmrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 34297204935cSmrg cmp -s conftest.i conftest.out \ 34307204935cSmrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 34317204935cSmrgfi]) 34327204935cSmrgrm -f conftest.i conftest2.i conftest.out]) 34337204935cSmrg])# _LT_PATH_DD 34347204935cSmrg 34357204935cSmrg 34367204935cSmrg# _LT_CMD_TRUNCATE 34377204935cSmrg# ---------------- 34387204935cSmrg# find command to truncate a binary pipe 34397204935cSmrgm4_defun([_LT_CMD_TRUNCATE], 34407204935cSmrg[m4_require([_LT_PATH_DD]) 34417204935cSmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 34427204935cSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 34437204935cSmrgcat conftest.i conftest.i >conftest2.i 34447204935cSmrglt_cv_truncate_bin= 34457204935cSmrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 34467204935cSmrg cmp -s conftest.i conftest.out \ 34477204935cSmrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 34487204935cSmrgfi 34497204935cSmrgrm -f conftest.i conftest2.i conftest.out 34507204935cSmrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 34517204935cSmrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 34527204935cSmrg [Command to truncate a binary pipe]) 34537204935cSmrg])# _LT_CMD_TRUNCATE 34547204935cSmrg 34557204935cSmrg 34561016ad83Smrg# _LT_CHECK_MAGIC_METHOD 34571016ad83Smrg# ---------------------- 34581016ad83Smrg# how to check for library dependencies 34591016ad83Smrg# -- PORTME fill in with the dynamic library characteristics 34601016ad83Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 34611016ad83Smrg[m4_require([_LT_DECL_EGREP]) 34621016ad83Smrgm4_require([_LT_DECL_OBJDUMP]) 34631016ad83SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 34641016ad83Smrglt_cv_deplibs_check_method, 34651016ad83Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 34661016ad83Smrglt_cv_file_magic_test_file= 34671016ad83Smrglt_cv_deplibs_check_method='unknown' 34681016ad83Smrg# Need to set the preceding variable on all platforms that support 34691016ad83Smrg# interlibrary dependencies. 34701016ad83Smrg# 'none' -- dependencies not supported. 34717204935cSmrg# 'unknown' -- same as none, but documents that we really don't know. 34721016ad83Smrg# 'pass_all' -- all dependencies passed with no checks. 34731016ad83Smrg# 'test_compile' -- check by making test program. 34741016ad83Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 34757204935cSmrg# that responds to the $file_magic_cmd with a given extended regex. 34767204935cSmrg# If you have 'file' or equivalent on your system and you're not sure 34777204935cSmrg# whether 'pass_all' will *always* work, you probably want this one. 34781016ad83Smrg 34791016ad83Smrgcase $host_os in 34801016ad83Smrgaix[[4-9]]*) 34811016ad83Smrg lt_cv_deplibs_check_method=pass_all 34821016ad83Smrg ;; 34831016ad83Smrg 34841016ad83Smrgbeos*) 34851016ad83Smrg lt_cv_deplibs_check_method=pass_all 34861016ad83Smrg ;; 34871016ad83Smrg 34881016ad83Smrgbsdi[[45]]*) 34891016ad83Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3490b9526c6aSmrg lt_cv_file_magic_cmd='$FILECMD -L' 34911016ad83Smrg lt_cv_file_magic_test_file=/shlib/libc.so 34921016ad83Smrg ;; 34931016ad83Smrg 34941016ad83Smrgcygwin*) 34951016ad83Smrg # func_win32_libid is a shell function defined in ltmain.sh 34961016ad83Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 34971016ad83Smrg lt_cv_file_magic_cmd='func_win32_libid' 34981016ad83Smrg ;; 34991016ad83Smrg 35001016ad83Smrgmingw* | pw32*) 35011016ad83Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 35021016ad83Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 35031016ad83Smrg # unless we find 'file', for example because we are cross-compiling. 35047204935cSmrg if ( file / ) >/dev/null 2>&1; then 35051016ad83Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 35061016ad83Smrg lt_cv_file_magic_cmd='func_win32_libid' 35071016ad83Smrg else 35081016ad83Smrg # Keep this pattern in sync with the one in func_win32_libid. 35091016ad83Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 35101016ad83Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 35111016ad83Smrg fi 35121016ad83Smrg ;; 35131016ad83Smrg 35141016ad83Smrgcegcc*) 35151016ad83Smrg # use the weaker test based on 'objdump'. See mingw*. 35161016ad83Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 35171016ad83Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 35181016ad83Smrg ;; 35191016ad83Smrg 35201016ad83Smrgdarwin* | rhapsody*) 35211016ad83Smrg lt_cv_deplibs_check_method=pass_all 35221016ad83Smrg ;; 35231016ad83Smrg 3524b9526c6aSmrgfreebsd* | dragonfly* | midnightbsd*) 35251016ad83Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 35261016ad83Smrg case $host_cpu in 35271016ad83Smrg i*86 ) 35281016ad83Smrg # Not sure whether the presence of OpenBSD here was a mistake. 35291016ad83Smrg # Let's accept both of them until this is cleared up. 35301016ad83Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3531b9526c6aSmrg lt_cv_file_magic_cmd=$FILECMD 35321016ad83Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 35331016ad83Smrg ;; 35341016ad83Smrg esac 35351016ad83Smrg else 35361016ad83Smrg lt_cv_deplibs_check_method=pass_all 35371016ad83Smrg fi 35381016ad83Smrg ;; 35391016ad83Smrg 35401016ad83Smrghaiku*) 35411016ad83Smrg lt_cv_deplibs_check_method=pass_all 35421016ad83Smrg ;; 35431016ad83Smrg 35441016ad83Smrghpux10.20* | hpux11*) 3545b9526c6aSmrg lt_cv_file_magic_cmd=$FILECMD 35461016ad83Smrg case $host_cpu in 35471016ad83Smrg ia64*) 35481016ad83Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 35491016ad83Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 35501016ad83Smrg ;; 35511016ad83Smrg hppa*64*) 35521016ad83Smrg [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]'] 35531016ad83Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 35541016ad83Smrg ;; 35551016ad83Smrg *) 35561016ad83Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 35571016ad83Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 35581016ad83Smrg ;; 35591016ad83Smrg esac 35601016ad83Smrg ;; 35611016ad83Smrg 35621016ad83Smrginterix[[3-9]]*) 35631016ad83Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 35641016ad83Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 35651016ad83Smrg ;; 35661016ad83Smrg 35671016ad83Smrgirix5* | irix6* | nonstopux*) 35681016ad83Smrg case $LD in 35691016ad83Smrg *-32|*"-32 ") libmagic=32-bit;; 35701016ad83Smrg *-n32|*"-n32 ") libmagic=N32;; 35711016ad83Smrg *-64|*"-64 ") libmagic=64-bit;; 35721016ad83Smrg *) libmagic=never-match;; 35731016ad83Smrg esac 35741016ad83Smrg lt_cv_deplibs_check_method=pass_all 35751016ad83Smrg ;; 35761016ad83Smrg 35771016ad83Smrg# This must be glibc/ELF. 35781016ad83Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 35791016ad83Smrg lt_cv_deplibs_check_method=pass_all 35801016ad83Smrg ;; 35811016ad83Smrg 3582aa30ed02Smrgnetbsd*) 35831016ad83Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 35841016ad83Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 35851016ad83Smrg else 35861016ad83Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 35871016ad83Smrg fi 35881016ad83Smrg ;; 35891016ad83Smrg 35901016ad83Smrgnewos6*) 35911016ad83Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3592b9526c6aSmrg lt_cv_file_magic_cmd=$FILECMD 35931016ad83Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 35941016ad83Smrg ;; 35951016ad83Smrg 35961016ad83Smrg*nto* | *qnx*) 35971016ad83Smrg lt_cv_deplibs_check_method=pass_all 35981016ad83Smrg ;; 35991016ad83Smrg 36007204935cSmrgopenbsd* | bitrig*) 36017204935cSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 36021016ad83Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 36031016ad83Smrg else 36041016ad83Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 36051016ad83Smrg fi 36061016ad83Smrg ;; 36071016ad83Smrg 36081016ad83Smrgosf3* | osf4* | osf5*) 36091016ad83Smrg lt_cv_deplibs_check_method=pass_all 36101016ad83Smrg ;; 36111016ad83Smrg 36121016ad83Smrgrdos*) 36131016ad83Smrg lt_cv_deplibs_check_method=pass_all 36141016ad83Smrg ;; 36151016ad83Smrg 36161016ad83Smrgsolaris*) 36171016ad83Smrg lt_cv_deplibs_check_method=pass_all 36181016ad83Smrg ;; 36191016ad83Smrg 36201016ad83Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 36211016ad83Smrg lt_cv_deplibs_check_method=pass_all 36221016ad83Smrg ;; 36231016ad83Smrg 36241016ad83Smrgsysv4 | sysv4.3*) 36251016ad83Smrg case $host_vendor in 36261016ad83Smrg motorola) 36271016ad83Smrg 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]]' 36281016ad83Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 36291016ad83Smrg ;; 36301016ad83Smrg ncr) 36311016ad83Smrg lt_cv_deplibs_check_method=pass_all 36321016ad83Smrg ;; 36331016ad83Smrg sequent) 36341016ad83Smrg lt_cv_file_magic_cmd='/bin/file' 36351016ad83Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 36361016ad83Smrg ;; 36371016ad83Smrg sni) 36381016ad83Smrg lt_cv_file_magic_cmd='/bin/file' 36391016ad83Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 36401016ad83Smrg lt_cv_file_magic_test_file=/lib/libc.so 36411016ad83Smrg ;; 36421016ad83Smrg siemens) 36431016ad83Smrg lt_cv_deplibs_check_method=pass_all 36441016ad83Smrg ;; 36451016ad83Smrg pc) 36461016ad83Smrg lt_cv_deplibs_check_method=pass_all 36471016ad83Smrg ;; 36481016ad83Smrg esac 36491016ad83Smrg ;; 36501016ad83Smrg 36511016ad83Smrgtpf*) 36521016ad83Smrg lt_cv_deplibs_check_method=pass_all 36531016ad83Smrg ;; 36547204935cSmrgos2*) 36557204935cSmrg lt_cv_deplibs_check_method=pass_all 36567204935cSmrg ;; 36571016ad83Smrgesac 36581016ad83Smrg]) 36591016ad83Smrg 36601016ad83Smrgfile_magic_glob= 36611016ad83Smrgwant_nocaseglob=no 36621016ad83Smrgif test "$build" = "$host"; then 36631016ad83Smrg case $host_os in 36641016ad83Smrg mingw* | pw32*) 36651016ad83Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 36661016ad83Smrg want_nocaseglob=yes 36671016ad83Smrg else 36681016ad83Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 36691016ad83Smrg fi 36701016ad83Smrg ;; 36711016ad83Smrg esac 36721016ad83Smrgfi 36731016ad83Smrg 36741016ad83Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 36751016ad83Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 36761016ad83Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 36771016ad83Smrg 36781016ad83Smrg_LT_DECL([], [deplibs_check_method], [1], 36791016ad83Smrg [Method to check whether dependent libraries are shared objects]) 36801016ad83Smrg_LT_DECL([], [file_magic_cmd], [1], 36811016ad83Smrg [Command to use when deplibs_check_method = "file_magic"]) 36821016ad83Smrg_LT_DECL([], [file_magic_glob], [1], 36831016ad83Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 36841016ad83Smrg_LT_DECL([], [want_nocaseglob], [1], 36851016ad83Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 36861016ad83Smrg])# _LT_CHECK_MAGIC_METHOD 36871016ad83Smrg 36881016ad83Smrg 36891016ad83Smrg# LT_PATH_NM 36901016ad83Smrg# ---------- 36911016ad83Smrg# find the pathname to a BSD- or MS-compatible name lister 36921016ad83SmrgAC_DEFUN([LT_PATH_NM], 36931016ad83Smrg[AC_REQUIRE([AC_PROG_CC])dnl 36941016ad83SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 36951016ad83Smrg[if test -n "$NM"; then 36961016ad83Smrg # Let the user override the test. 36977204935cSmrg lt_cv_path_NM=$NM 36981016ad83Smrgelse 36997204935cSmrg lt_nm_to_check=${ac_tool_prefix}nm 37001016ad83Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 37011016ad83Smrg lt_nm_to_check="$lt_nm_to_check nm" 37021016ad83Smrg fi 37031016ad83Smrg for lt_tmp_nm in $lt_nm_to_check; do 37047204935cSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 37051016ad83Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 37067204935cSmrg IFS=$lt_save_ifs 37071016ad83Smrg test -z "$ac_dir" && ac_dir=. 37087204935cSmrg tmp_nm=$ac_dir/$lt_tmp_nm 37097204935cSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 37101016ad83Smrg # Check to see if the nm accepts a BSD-compat flag. 37117204935cSmrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 37121016ad83Smrg # nm: unknown option "B" ignored 37131016ad83Smrg # Tru64's nm complains that /dev/null is an invalid object file 37147204935cSmrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 37157204935cSmrg case $build_os in 37167204935cSmrg mingw*) lt_bad_file=conftest.nm/nofile ;; 37177204935cSmrg *) lt_bad_file=/dev/null ;; 37187204935cSmrg esac 3719b9526c6aSmrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in 37207204935cSmrg *$lt_bad_file* | *'Invalid file or object type'*) 37211016ad83Smrg lt_cv_path_NM="$tmp_nm -B" 37227204935cSmrg break 2 37231016ad83Smrg ;; 37241016ad83Smrg *) 3725b9526c6aSmrg case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in 37261016ad83Smrg */dev/null*) 37271016ad83Smrg lt_cv_path_NM="$tmp_nm -p" 37287204935cSmrg break 2 37291016ad83Smrg ;; 37301016ad83Smrg *) 37311016ad83Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 37321016ad83Smrg continue # so that we can try to find one that supports BSD flags 37331016ad83Smrg ;; 37341016ad83Smrg esac 37351016ad83Smrg ;; 37361016ad83Smrg esac 37371016ad83Smrg fi 37381016ad83Smrg done 37397204935cSmrg IFS=$lt_save_ifs 37401016ad83Smrg done 37411016ad83Smrg : ${lt_cv_path_NM=no} 37421016ad83Smrgfi]) 37437204935cSmrgif test no != "$lt_cv_path_NM"; then 37447204935cSmrg NM=$lt_cv_path_NM 37451016ad83Smrgelse 37461016ad83Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 37471016ad83Smrg if test -n "$DUMPBIN"; then : 37481016ad83Smrg # Let the user override the test. 37491016ad83Smrg else 37501016ad83Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3751b9526c6aSmrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in 37521016ad83Smrg *COFF*) 37537204935cSmrg DUMPBIN="$DUMPBIN -symbols -headers" 37541016ad83Smrg ;; 37551016ad83Smrg *) 37561016ad83Smrg DUMPBIN=: 37571016ad83Smrg ;; 37581016ad83Smrg esac 37591016ad83Smrg fi 37601016ad83Smrg AC_SUBST([DUMPBIN]) 37617204935cSmrg if test : != "$DUMPBIN"; then 37627204935cSmrg NM=$DUMPBIN 37631016ad83Smrg fi 37641016ad83Smrgfi 37651016ad83Smrgtest -z "$NM" && NM=nm 37661016ad83SmrgAC_SUBST([NM]) 37671016ad83Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 37681016ad83Smrg 37691016ad83SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 37701016ad83Smrg [lt_cv_nm_interface="BSD nm" 37711016ad83Smrg echo "int some_variable = 0;" > conftest.$ac_ext 37721016ad83Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 37731016ad83Smrg (eval "$ac_compile" 2>conftest.err) 37741016ad83Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 37751016ad83Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 37761016ad83Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 37771016ad83Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 37781016ad83Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 37791016ad83Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 37801016ad83Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 37811016ad83Smrg lt_cv_nm_interface="MS dumpbin" 37821016ad83Smrg fi 37831016ad83Smrg rm -f conftest*]) 37841016ad83Smrg])# LT_PATH_NM 37851016ad83Smrg 37861016ad83Smrg# Old names: 37871016ad83SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 37881016ad83SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 37891016ad83Smrgdnl aclocal-1.4 backwards compatibility: 37901016ad83Smrgdnl AC_DEFUN([AM_PROG_NM], []) 37911016ad83Smrgdnl AC_DEFUN([AC_PROG_NM], []) 37921016ad83Smrg 37931016ad83Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 37941016ad83Smrg# -------------------------------- 37951016ad83Smrg# how to determine the name of the shared library 37961016ad83Smrg# associated with a specific link library. 37971016ad83Smrg# -- PORTME fill in with the dynamic library characteristics 37981016ad83Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 37991016ad83Smrg[m4_require([_LT_DECL_EGREP]) 38001016ad83Smrgm4_require([_LT_DECL_OBJDUMP]) 38011016ad83Smrgm4_require([_LT_DECL_DLLTOOL]) 38021016ad83SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 38031016ad83Smrglt_cv_sharedlib_from_linklib_cmd, 38041016ad83Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 38051016ad83Smrg 38061016ad83Smrgcase $host_os in 38071016ad83Smrgcygwin* | mingw* | pw32* | cegcc*) 38087204935cSmrg # two different shell functions defined in ltmain.sh; 38097204935cSmrg # decide which one to use based on capabilities of $DLLTOOL 38101016ad83Smrg case `$DLLTOOL --help 2>&1` in 38111016ad83Smrg *--identify-strict*) 38121016ad83Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 38131016ad83Smrg ;; 38141016ad83Smrg *) 38151016ad83Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 38161016ad83Smrg ;; 38171016ad83Smrg esac 38181016ad83Smrg ;; 38191016ad83Smrg*) 38201016ad83Smrg # fallback: assume linklib IS sharedlib 38217204935cSmrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 38221016ad83Smrg ;; 38231016ad83Smrgesac 38241016ad83Smrg]) 38251016ad83Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 38261016ad83Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 38271016ad83Smrg 38281016ad83Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 38291016ad83Smrg [Command to associate shared and link libraries]) 38301016ad83Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 38311016ad83Smrg 38321016ad83Smrg 38331016ad83Smrg# _LT_PATH_MANIFEST_TOOL 38341016ad83Smrg# ---------------------- 38351016ad83Smrg# locate the manifest tool 38361016ad83Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 38371016ad83Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 38381016ad83Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 38391016ad83SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 38401016ad83Smrg [lt_cv_path_mainfest_tool=no 38411016ad83Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 38421016ad83Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 38431016ad83Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 38441016ad83Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 38451016ad83Smrg lt_cv_path_mainfest_tool=yes 38461016ad83Smrg fi 38471016ad83Smrg rm -f conftest*]) 38487204935cSmrgif test yes != "$lt_cv_path_mainfest_tool"; then 38491016ad83Smrg MANIFEST_TOOL=: 38501016ad83Smrgfi 38511016ad83Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 38521016ad83Smrg])# _LT_PATH_MANIFEST_TOOL 38531016ad83Smrg 38541016ad83Smrg 38557204935cSmrg# _LT_DLL_DEF_P([FILE]) 38567204935cSmrg# --------------------- 38577204935cSmrg# True iff FILE is a Windows DLL '.def' file. 38587204935cSmrg# Keep in sync with func_dll_def_p in the libtool script 38597204935cSmrgAC_DEFUN([_LT_DLL_DEF_P], 38607204935cSmrg[dnl 38617204935cSmrg test DEF = "`$SED -n dnl 38627204935cSmrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 38637204935cSmrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 38647204935cSmrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 38657204935cSmrg -e q dnl Only consider the first "real" line 38667204935cSmrg $1`" dnl 38677204935cSmrg])# _LT_DLL_DEF_P 38687204935cSmrg 38697204935cSmrg 38701016ad83Smrg# LT_LIB_M 38711016ad83Smrg# -------- 38721016ad83Smrg# check for math library 38731016ad83SmrgAC_DEFUN([LT_LIB_M], 38741016ad83Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 38751016ad83SmrgLIBM= 38761016ad83Smrgcase $host in 38771016ad83Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 38781016ad83Smrg # These system don't have libm, or don't need it 38791016ad83Smrg ;; 38801016ad83Smrg*-ncr-sysv4.3*) 38817204935cSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 38821016ad83Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 38831016ad83Smrg ;; 38841016ad83Smrg*) 38857204935cSmrg AC_CHECK_LIB(m, cos, LIBM=-lm) 38861016ad83Smrg ;; 38871016ad83Smrgesac 38881016ad83SmrgAC_SUBST([LIBM]) 38891016ad83Smrg])# LT_LIB_M 38901016ad83Smrg 38911016ad83Smrg# Old name: 38921016ad83SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 38931016ad83Smrgdnl aclocal-1.4 backwards compatibility: 38941016ad83Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 38951016ad83Smrg 38961016ad83Smrg 38971016ad83Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 38981016ad83Smrg# ------------------------------- 38991016ad83Smrgm4_defun([_LT_COMPILER_NO_RTTI], 39001016ad83Smrg[m4_require([_LT_TAG_COMPILER])dnl 39011016ad83Smrg 39021016ad83Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 39031016ad83Smrg 39047204935cSmrgif test yes = "$GCC"; then 39051016ad83Smrg case $cc_basename in 39061016ad83Smrg nvcc*) 39071016ad83Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 39081016ad83Smrg *) 39091016ad83Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 39101016ad83Smrg esac 39111016ad83Smrg 39121016ad83Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 39131016ad83Smrg lt_cv_prog_compiler_rtti_exceptions, 39141016ad83Smrg [-fno-rtti -fno-exceptions], [], 39151016ad83Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 39161016ad83Smrgfi 39171016ad83Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 39181016ad83Smrg [Compiler flag to turn off builtin functions]) 39191016ad83Smrg])# _LT_COMPILER_NO_RTTI 39201016ad83Smrg 39211016ad83Smrg 39221016ad83Smrg# _LT_CMD_GLOBAL_SYMBOLS 39231016ad83Smrg# ---------------------- 39241016ad83Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 39251016ad83Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 39261016ad83SmrgAC_REQUIRE([AC_PROG_CC])dnl 39271016ad83SmrgAC_REQUIRE([AC_PROG_AWK])dnl 39281016ad83SmrgAC_REQUIRE([LT_PATH_NM])dnl 39291016ad83SmrgAC_REQUIRE([LT_PATH_LD])dnl 39301016ad83Smrgm4_require([_LT_DECL_SED])dnl 39311016ad83Smrgm4_require([_LT_DECL_EGREP])dnl 39321016ad83Smrgm4_require([_LT_TAG_COMPILER])dnl 39331016ad83Smrg 39341016ad83Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 39351016ad83SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 39361016ad83SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 39371016ad83Smrg[ 39381016ad83Smrg# These are sane defaults that work on at least a few old systems. 39391016ad83Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 39401016ad83Smrg 39411016ad83Smrg# Character class describing NM global symbol codes. 39421016ad83Smrgsymcode='[[BCDEGRST]]' 39431016ad83Smrg 39441016ad83Smrg# Regexp to match symbols that can be accessed directly from C. 39451016ad83Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 39461016ad83Smrg 39471016ad83Smrg# Define system-specific variables. 39481016ad83Smrgcase $host_os in 39491016ad83Smrgaix*) 39501016ad83Smrg symcode='[[BCDT]]' 39511016ad83Smrg ;; 39521016ad83Smrgcygwin* | mingw* | pw32* | cegcc*) 39531016ad83Smrg symcode='[[ABCDGISTW]]' 39541016ad83Smrg ;; 39551016ad83Smrghpux*) 39567204935cSmrg if test ia64 = "$host_cpu"; then 39571016ad83Smrg symcode='[[ABCDEGRST]]' 39581016ad83Smrg fi 39591016ad83Smrg ;; 39601016ad83Smrgirix* | nonstopux*) 39611016ad83Smrg symcode='[[BCDEGRST]]' 39621016ad83Smrg ;; 39631016ad83Smrgosf*) 39641016ad83Smrg symcode='[[BCDEGQRST]]' 39651016ad83Smrg ;; 39661016ad83Smrgsolaris*) 39671016ad83Smrg symcode='[[BDRT]]' 39681016ad83Smrg ;; 39691016ad83Smrgsco3.2v5*) 39701016ad83Smrg symcode='[[DT]]' 39711016ad83Smrg ;; 39721016ad83Smrgsysv4.2uw2*) 39731016ad83Smrg symcode='[[DT]]' 39741016ad83Smrg ;; 39751016ad83Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 39761016ad83Smrg symcode='[[ABDT]]' 39771016ad83Smrg ;; 39781016ad83Smrgsysv4) 39791016ad83Smrg symcode='[[DFNSTU]]' 39801016ad83Smrg ;; 39811016ad83Smrgesac 39821016ad83Smrg 39831016ad83Smrg# If we're using GNU nm, then use its standard symbol codes. 39841016ad83Smrgcase `$NM -V 2>&1` in 39851016ad83Smrg*GNU* | *'with BFD'*) 39861016ad83Smrg symcode='[[ABCDGIRSTW]]' ;; 39871016ad83Smrgesac 39881016ad83Smrg 39897204935cSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 39907204935cSmrg # Gets list of data symbols to import. 3991b9526c6aSmrg lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" 39927204935cSmrg # Adjust the below global symbol transforms to fixup imported variables. 39937204935cSmrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 39947204935cSmrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 39957204935cSmrg lt_c_name_lib_hook="\ 39967204935cSmrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 39977204935cSmrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 39987204935cSmrgelse 39997204935cSmrg # Disable hooks by default. 40007204935cSmrg lt_cv_sys_global_symbol_to_import= 40017204935cSmrg lt_cdecl_hook= 40027204935cSmrg lt_c_name_hook= 40037204935cSmrg lt_c_name_lib_hook= 40047204935cSmrgfi 40057204935cSmrg 40061016ad83Smrg# Transform an extracted symbol line into a proper C declaration. 40071016ad83Smrg# Some systems (esp. on ia64) link data and code symbols differently, 40081016ad83Smrg# so use this general approach. 4009b9526c6aSmrglt_cv_sys_global_symbol_to_cdecl="$SED -n"\ 40107204935cSmrg$lt_cdecl_hook\ 40117204935cSmrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 40127204935cSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 40131016ad83Smrg 40141016ad83Smrg# Transform an extracted symbol line into symbol name and symbol address 4015b9526c6aSmrglt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ 40167204935cSmrg$lt_c_name_hook\ 40177204935cSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 40187204935cSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 40197204935cSmrg 40207204935cSmrg# Transform an extracted symbol line into symbol name with lib prefix and 40217204935cSmrg# symbol address. 4022b9526c6aSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ 40237204935cSmrg$lt_c_name_lib_hook\ 40247204935cSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 40257204935cSmrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 40267204935cSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 40271016ad83Smrg 40281016ad83Smrg# Handle CRLF in mingw tool chain 40291016ad83Smrgopt_cr= 40301016ad83Smrgcase $build_os in 40311016ad83Smrgmingw*) 40321016ad83Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 40331016ad83Smrg ;; 40341016ad83Smrgesac 40351016ad83Smrg 40361016ad83Smrg# Try without a prefix underscore, then with it. 40371016ad83Smrgfor ac_symprfx in "" "_"; do 40381016ad83Smrg 40391016ad83Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 40401016ad83Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 40411016ad83Smrg 40421016ad83Smrg # Write the raw and C identifiers. 40431016ad83Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 40447204935cSmrg # Fake it for dumpbin and say T for any non-static function, 40457204935cSmrg # D for any global variable and I for any imported variable. 4046b9526c6aSmrg # Also find C++ and __fastcall symbols from MSVC++ or ICC, 40471016ad83Smrg # which start with @ or ?. 40481016ad83Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 40491016ad83Smrg" {last_section=section; section=\$ 3};"\ 40501016ad83Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 40511016ad83Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 40527204935cSmrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 40537204935cSmrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 40547204935cSmrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 40551016ad83Smrg" \$ 0!~/External *\|/{next};"\ 40561016ad83Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 40571016ad83Smrg" {if(hide[section]) next};"\ 40587204935cSmrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 40597204935cSmrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 40607204935cSmrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 40617204935cSmrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 40621016ad83Smrg" ' prfx=^$ac_symprfx]" 40631016ad83Smrg else 4064b9526c6aSmrg lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 40651016ad83Smrg fi 4066b9526c6aSmrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" 40671016ad83Smrg 40681016ad83Smrg # Check to see that the pipe works correctly. 40691016ad83Smrg pipe_works=no 40701016ad83Smrg 40711016ad83Smrg rm -f conftest* 40721016ad83Smrg cat > conftest.$ac_ext <<_LT_EOF 40731016ad83Smrg#ifdef __cplusplus 40741016ad83Smrgextern "C" { 40751016ad83Smrg#endif 40761016ad83Smrgchar nm_test_var; 40771016ad83Smrgvoid nm_test_func(void); 40781016ad83Smrgvoid nm_test_func(void){} 40791016ad83Smrg#ifdef __cplusplus 40801016ad83Smrg} 40811016ad83Smrg#endif 40821016ad83Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 40831016ad83Smrg_LT_EOF 40841016ad83Smrg 40851016ad83Smrg if AC_TRY_EVAL(ac_compile); then 40861016ad83Smrg # Now try to grab the symbols. 40871016ad83Smrg nlist=conftest.nm 40881016ad83Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 40891016ad83Smrg # Try sorting and uniquifying the output. 40901016ad83Smrg if sort "$nlist" | uniq > "$nlist"T; then 40911016ad83Smrg mv -f "$nlist"T "$nlist" 40921016ad83Smrg else 40931016ad83Smrg rm -f "$nlist"T 40941016ad83Smrg fi 40951016ad83Smrg 40961016ad83Smrg # Make sure that we snagged all the symbols we need. 40971016ad83Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 40981016ad83Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 40991016ad83Smrg cat <<_LT_EOF > conftest.$ac_ext 41001016ad83Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 41017204935cSmrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 41027204935cSmrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 41031016ad83Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 41041016ad83Smrg# define LT@&t@_DLSYM_CONST 41057204935cSmrg#elif defined __osf__ 41061016ad83Smrg/* This system does not cope well with relocations in const data. */ 41071016ad83Smrg# define LT@&t@_DLSYM_CONST 41081016ad83Smrg#else 41091016ad83Smrg# define LT@&t@_DLSYM_CONST const 41101016ad83Smrg#endif 41111016ad83Smrg 41121016ad83Smrg#ifdef __cplusplus 41131016ad83Smrgextern "C" { 41141016ad83Smrg#endif 41151016ad83Smrg 41161016ad83Smrg_LT_EOF 41171016ad83Smrg # Now generate the symbol file. 41181016ad83Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 41191016ad83Smrg 41201016ad83Smrg cat <<_LT_EOF >> conftest.$ac_ext 41211016ad83Smrg 41221016ad83Smrg/* The mapping between symbol names and symbols. */ 41231016ad83SmrgLT@&t@_DLSYM_CONST struct { 41241016ad83Smrg const char *name; 41251016ad83Smrg void *address; 41261016ad83Smrg} 41271016ad83Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 41281016ad83Smrg{ 41291016ad83Smrg { "@PROGRAM@", (void *) 0 }, 41301016ad83Smrg_LT_EOF 41317204935cSmrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 41321016ad83Smrg cat <<\_LT_EOF >> conftest.$ac_ext 41331016ad83Smrg {0, (void *) 0} 41341016ad83Smrg}; 41351016ad83Smrg 41361016ad83Smrg/* This works around a problem in FreeBSD linker */ 41371016ad83Smrg#ifdef FREEBSD_WORKAROUND 41381016ad83Smrgstatic const void *lt_preloaded_setup() { 41391016ad83Smrg return lt__PROGRAM__LTX_preloaded_symbols; 41401016ad83Smrg} 41411016ad83Smrg#endif 41421016ad83Smrg 41431016ad83Smrg#ifdef __cplusplus 41441016ad83Smrg} 41451016ad83Smrg#endif 41461016ad83Smrg_LT_EOF 41471016ad83Smrg # Now try linking the two files. 41481016ad83Smrg mv conftest.$ac_objext conftstm.$ac_objext 41491016ad83Smrg lt_globsym_save_LIBS=$LIBS 41501016ad83Smrg lt_globsym_save_CFLAGS=$CFLAGS 41517204935cSmrg LIBS=conftstm.$ac_objext 41521016ad83Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 41537204935cSmrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 41541016ad83Smrg pipe_works=yes 41551016ad83Smrg fi 41561016ad83Smrg LIBS=$lt_globsym_save_LIBS 41571016ad83Smrg CFLAGS=$lt_globsym_save_CFLAGS 41581016ad83Smrg else 41591016ad83Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 41601016ad83Smrg fi 41611016ad83Smrg else 41621016ad83Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 41631016ad83Smrg fi 41641016ad83Smrg else 41651016ad83Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 41661016ad83Smrg fi 41671016ad83Smrg else 41681016ad83Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 41691016ad83Smrg cat conftest.$ac_ext >&5 41701016ad83Smrg fi 41711016ad83Smrg rm -rf conftest* conftst* 41721016ad83Smrg 41731016ad83Smrg # Do not use the global_symbol_pipe unless it works. 41747204935cSmrg if test yes = "$pipe_works"; then 41751016ad83Smrg break 41761016ad83Smrg else 41771016ad83Smrg lt_cv_sys_global_symbol_pipe= 41781016ad83Smrg fi 41791016ad83Smrgdone 41801016ad83Smrg]) 41811016ad83Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 41821016ad83Smrg lt_cv_sys_global_symbol_to_cdecl= 41831016ad83Smrgfi 41841016ad83Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 41851016ad83Smrg AC_MSG_RESULT(failed) 41861016ad83Smrgelse 41871016ad83Smrg AC_MSG_RESULT(ok) 41881016ad83Smrgfi 41891016ad83Smrg 41901016ad83Smrg# Response file support. 41911016ad83Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 41921016ad83Smrg nm_file_list_spec='@' 41931016ad83Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 41941016ad83Smrg nm_file_list_spec='@' 41951016ad83Smrgfi 41961016ad83Smrg 41971016ad83Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 41981016ad83Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 41991016ad83Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 42001016ad83Smrg [Transform the output of nm in a proper C declaration]) 42017204935cSmrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 42027204935cSmrg [Transform the output of nm into a list of symbols to manually relocate]) 42031016ad83Smrg_LT_DECL([global_symbol_to_c_name_address], 42041016ad83Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 42051016ad83Smrg [Transform the output of nm in a C name address pair]) 42061016ad83Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 42071016ad83Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 42081016ad83Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 42097204935cSmrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 42107204935cSmrg [The name lister interface]) 42111016ad83Smrg_LT_DECL([], [nm_file_list_spec], [1], 42121016ad83Smrg [Specify filename containing input files for $NM]) 42131016ad83Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 42141016ad83Smrg 42151016ad83Smrg 42161016ad83Smrg# _LT_COMPILER_PIC([TAGNAME]) 42171016ad83Smrg# --------------------------- 42181016ad83Smrgm4_defun([_LT_COMPILER_PIC], 42191016ad83Smrg[m4_require([_LT_TAG_COMPILER])dnl 42201016ad83Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 42211016ad83Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 42221016ad83Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 42231016ad83Smrg 42241016ad83Smrgm4_if([$1], [CXX], [ 42251016ad83Smrg # C++ specific cases for pic, static, wl, etc. 42267204935cSmrg if test yes = "$GXX"; then 42271016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 42281016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 42291016ad83Smrg 42301016ad83Smrg case $host_os in 42311016ad83Smrg aix*) 42321016ad83Smrg # All AIX code is PIC. 42337204935cSmrg if test ia64 = "$host_cpu"; then 42341016ad83Smrg # AIX 5 now supports IA64 processor 42351016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 42361016ad83Smrg fi 42377204935cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42381016ad83Smrg ;; 42391016ad83Smrg 42401016ad83Smrg amigaos*) 42411016ad83Smrg case $host_cpu in 42421016ad83Smrg powerpc) 42431016ad83Smrg # see comment about AmigaOS4 .so support 42441016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42451016ad83Smrg ;; 42461016ad83Smrg m68k) 42471016ad83Smrg # FIXME: we need at least 68020 code to build shared libraries, but 42487204935cSmrg # adding the '-m68020' flag to GCC prevents building anything better, 42497204935cSmrg # like '-m68040'. 42501016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 42511016ad83Smrg ;; 42521016ad83Smrg esac 42531016ad83Smrg ;; 42541016ad83Smrg 42551016ad83Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 42561016ad83Smrg # PIC is the default for these OSes. 42571016ad83Smrg ;; 42581016ad83Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 42591016ad83Smrg # This hack is so that the source file can tell whether it is being 42601016ad83Smrg # built for inclusion in a dll (and should export symbols for example). 42611016ad83Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 42621016ad83Smrg # (--disable-auto-import) libraries 42631016ad83Smrg m4_if([$1], [GCJ], [], 42641016ad83Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 42657204935cSmrg case $host_os in 42667204935cSmrg os2*) 42677204935cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 42687204935cSmrg ;; 42697204935cSmrg esac 42701016ad83Smrg ;; 42711016ad83Smrg darwin* | rhapsody*) 42721016ad83Smrg # PIC is the default on this platform 42731016ad83Smrg # Common symbols not allowed in MH_DYLIB files 42741016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 42751016ad83Smrg ;; 42761016ad83Smrg *djgpp*) 42771016ad83Smrg # DJGPP does not support shared libraries at all 42781016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 42791016ad83Smrg ;; 42801016ad83Smrg haiku*) 42811016ad83Smrg # PIC is the default for Haiku. 42821016ad83Smrg # The "-static" flag exists, but is broken. 42831016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 42841016ad83Smrg ;; 42851016ad83Smrg interix[[3-9]]*) 42861016ad83Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 42871016ad83Smrg # Instead, we relocate shared libraries at runtime. 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 hpux*) 42951016ad83Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 42961016ad83Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 42971016ad83Smrg # sets the default TLS model and affects inlining. 42981016ad83Smrg case $host_cpu in 42991016ad83Smrg hppa*64*) 43001016ad83Smrg ;; 43011016ad83Smrg *) 43021016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43031016ad83Smrg ;; 43041016ad83Smrg esac 43051016ad83Smrg ;; 43061016ad83Smrg *qnx* | *nto*) 43071016ad83Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 43081016ad83Smrg # it will coredump. 43091016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 43101016ad83Smrg ;; 43111016ad83Smrg *) 43121016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43131016ad83Smrg ;; 43141016ad83Smrg esac 43151016ad83Smrg else 43161016ad83Smrg case $host_os in 43171016ad83Smrg aix[[4-9]]*) 43181016ad83Smrg # All AIX code is PIC. 43197204935cSmrg if test ia64 = "$host_cpu"; then 43201016ad83Smrg # AIX 5 now supports IA64 processor 43211016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43221016ad83Smrg else 43231016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 43241016ad83Smrg fi 43251016ad83Smrg ;; 43261016ad83Smrg chorus*) 43271016ad83Smrg case $cc_basename in 43281016ad83Smrg cxch68*) 43291016ad83Smrg # Green Hills C++ Compiler 43301016ad83Smrg # _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" 43311016ad83Smrg ;; 43321016ad83Smrg esac 43331016ad83Smrg ;; 43341016ad83Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 43351016ad83Smrg # This hack is so that the source file can tell whether it is being 43361016ad83Smrg # built for inclusion in a dll (and should export symbols for example). 43371016ad83Smrg m4_if([$1], [GCJ], [], 43381016ad83Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 43391016ad83Smrg ;; 43401016ad83Smrg dgux*) 43411016ad83Smrg case $cc_basename in 43421016ad83Smrg ec++*) 43431016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 43441016ad83Smrg ;; 43451016ad83Smrg ghcx*) 43461016ad83Smrg # Green Hills C++ Compiler 43471016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 43481016ad83Smrg ;; 43491016ad83Smrg *) 43501016ad83Smrg ;; 43511016ad83Smrg esac 43521016ad83Smrg ;; 4353b9526c6aSmrg freebsd* | dragonfly* | midnightbsd*) 43541016ad83Smrg # FreeBSD uses GNU C++ 43551016ad83Smrg ;; 43561016ad83Smrg hpux9* | hpux10* | hpux11*) 43571016ad83Smrg case $cc_basename in 43581016ad83Smrg CC*) 43591016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43607204935cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 43617204935cSmrg if test ia64 != "$host_cpu"; then 43621016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 43631016ad83Smrg fi 43641016ad83Smrg ;; 43651016ad83Smrg aCC*) 43661016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43677204935cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 43681016ad83Smrg case $host_cpu in 43691016ad83Smrg hppa*64*|ia64*) 43701016ad83Smrg # +Z the default 43711016ad83Smrg ;; 43721016ad83Smrg *) 43731016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 43741016ad83Smrg ;; 43751016ad83Smrg esac 43761016ad83Smrg ;; 43771016ad83Smrg *) 43781016ad83Smrg ;; 43791016ad83Smrg esac 43801016ad83Smrg ;; 43811016ad83Smrg interix*) 43821016ad83Smrg # This is c89, which is MS Visual C++ (no shared libs) 43831016ad83Smrg # Anyone wants to do a port? 43841016ad83Smrg ;; 43851016ad83Smrg irix5* | irix6* | nonstopux*) 43861016ad83Smrg case $cc_basename in 43871016ad83Smrg CC*) 43881016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43891016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 43901016ad83Smrg # CC pic flag -KPIC is the default. 43911016ad83Smrg ;; 43921016ad83Smrg *) 43931016ad83Smrg ;; 43941016ad83Smrg esac 43951016ad83Smrg ;; 43961016ad83Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 43971016ad83Smrg case $cc_basename in 43981016ad83Smrg KCC*) 43991016ad83Smrg # KAI C++ Compiler 44001016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 44011016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 44021016ad83Smrg ;; 44031016ad83Smrg ecpc* ) 44047204935cSmrg # old Intel C++ for x86_64, which still supported -KPIC. 44051016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44061016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44071016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 44081016ad83Smrg ;; 44091016ad83Smrg icpc* ) 44101016ad83Smrg # Intel C++, used to be incompatible with GCC. 44111016ad83Smrg # ICC 10 doesn't accept -KPIC any more. 44121016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44131016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 44141016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 44151016ad83Smrg ;; 44161016ad83Smrg pgCC* | pgcpp*) 44171016ad83Smrg # Portland Group C++ compiler 44181016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44191016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 44201016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44211016ad83Smrg ;; 44221016ad83Smrg cxx*) 44231016ad83Smrg # Compaq C++ 44241016ad83Smrg # Make sure the PIC flag is empty. It appears that all Alpha 44251016ad83Smrg # Linux and Compaq Tru64 Unix objects are PIC. 44261016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 44271016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44281016ad83Smrg ;; 44291016ad83Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 44301016ad83Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 44311016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44321016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 44331016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 44341016ad83Smrg ;; 44351016ad83Smrg *) 4436b9526c6aSmrg case `$CC -V 2>&1 | $SED 5q` in 44371016ad83Smrg *Sun\ C*) 44381016ad83Smrg # Sun C++ 5.9 44391016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44401016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44411016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44421016ad83Smrg ;; 44431016ad83Smrg esac 44441016ad83Smrg ;; 44451016ad83Smrg esac 44461016ad83Smrg ;; 44471016ad83Smrg lynxos*) 44481016ad83Smrg ;; 44491016ad83Smrg m88k*) 44501016ad83Smrg ;; 44511016ad83Smrg mvs*) 44521016ad83Smrg case $cc_basename in 44531016ad83Smrg cxx*) 44541016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 44551016ad83Smrg ;; 44561016ad83Smrg *) 44571016ad83Smrg ;; 44581016ad83Smrg esac 44591016ad83Smrg ;; 4460aa30ed02Smrg netbsd*) 44611016ad83Smrg ;; 44621016ad83Smrg *qnx* | *nto*) 44631016ad83Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 44641016ad83Smrg # it will coredump. 44651016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 44661016ad83Smrg ;; 44671016ad83Smrg osf3* | osf4* | osf5*) 44681016ad83Smrg case $cc_basename in 44691016ad83Smrg KCC*) 44701016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 44711016ad83Smrg ;; 44721016ad83Smrg RCC*) 44731016ad83Smrg # Rational C++ 2.4.1 44741016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 44751016ad83Smrg ;; 44761016ad83Smrg cxx*) 44771016ad83Smrg # Digital/Compaq C++ 44781016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44791016ad83Smrg # Make sure the PIC flag is empty. It appears that all Alpha 44801016ad83Smrg # Linux and Compaq Tru64 Unix objects are PIC. 44811016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 44821016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44831016ad83Smrg ;; 44841016ad83Smrg *) 44851016ad83Smrg ;; 44861016ad83Smrg esac 44871016ad83Smrg ;; 44881016ad83Smrg psos*) 44891016ad83Smrg ;; 44901016ad83Smrg solaris*) 44911016ad83Smrg case $cc_basename in 44921016ad83Smrg CC* | sunCC*) 44931016ad83Smrg # Sun C++ 4.2, 5.x and Centerline C++ 44941016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44951016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44961016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44971016ad83Smrg ;; 44981016ad83Smrg gcx*) 44991016ad83Smrg # Green Hills C++ Compiler 45001016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 45011016ad83Smrg ;; 45021016ad83Smrg *) 45031016ad83Smrg ;; 45041016ad83Smrg esac 45051016ad83Smrg ;; 45061016ad83Smrg sunos4*) 45071016ad83Smrg case $cc_basename in 45081016ad83Smrg CC*) 45091016ad83Smrg # Sun C++ 4.x 45101016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 45111016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45121016ad83Smrg ;; 45131016ad83Smrg lcc*) 45141016ad83Smrg # Lucid 45151016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 45161016ad83Smrg ;; 45171016ad83Smrg *) 45181016ad83Smrg ;; 45191016ad83Smrg esac 45201016ad83Smrg ;; 45211016ad83Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 45221016ad83Smrg case $cc_basename in 45231016ad83Smrg CC*) 45241016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45251016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 45261016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45271016ad83Smrg ;; 45281016ad83Smrg esac 45291016ad83Smrg ;; 45301016ad83Smrg tandem*) 45311016ad83Smrg case $cc_basename in 45321016ad83Smrg NCC*) 45331016ad83Smrg # NonStop-UX NCC 3.20 45341016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 45351016ad83Smrg ;; 45361016ad83Smrg *) 45371016ad83Smrg ;; 45381016ad83Smrg esac 45391016ad83Smrg ;; 45401016ad83Smrg vxworks*) 45411016ad83Smrg ;; 45421016ad83Smrg *) 45431016ad83Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 45441016ad83Smrg ;; 45451016ad83Smrg esac 45461016ad83Smrg fi 45471016ad83Smrg], 45481016ad83Smrg[ 45497204935cSmrg if test yes = "$GCC"; then 45501016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45511016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 45521016ad83Smrg 45531016ad83Smrg case $host_os in 45541016ad83Smrg aix*) 45551016ad83Smrg # All AIX code is PIC. 45567204935cSmrg if test ia64 = "$host_cpu"; then 45571016ad83Smrg # AIX 5 now supports IA64 processor 45581016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45591016ad83Smrg fi 45607204935cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 45611016ad83Smrg ;; 45621016ad83Smrg 45631016ad83Smrg amigaos*) 45641016ad83Smrg case $host_cpu in 45651016ad83Smrg powerpc) 45661016ad83Smrg # see comment about AmigaOS4 .so support 45671016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 45681016ad83Smrg ;; 45691016ad83Smrg m68k) 45701016ad83Smrg # FIXME: we need at least 68020 code to build shared libraries, but 45717204935cSmrg # adding the '-m68020' flag to GCC prevents building anything better, 45727204935cSmrg # like '-m68040'. 45731016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 45741016ad83Smrg ;; 45751016ad83Smrg esac 45761016ad83Smrg ;; 45771016ad83Smrg 45781016ad83Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 45791016ad83Smrg # PIC is the default for these OSes. 45801016ad83Smrg ;; 45811016ad83Smrg 45821016ad83Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 45831016ad83Smrg # This hack is so that the source file can tell whether it is being 45841016ad83Smrg # built for inclusion in a dll (and should export symbols for example). 45851016ad83Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 45861016ad83Smrg # (--disable-auto-import) libraries 45871016ad83Smrg m4_if([$1], [GCJ], [], 45881016ad83Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 45897204935cSmrg case $host_os in 45907204935cSmrg os2*) 45917204935cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 45927204935cSmrg ;; 45937204935cSmrg esac 45941016ad83Smrg ;; 45951016ad83Smrg 45961016ad83Smrg darwin* | rhapsody*) 45971016ad83Smrg # PIC is the default on this platform 45981016ad83Smrg # Common symbols not allowed in MH_DYLIB files 45991016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 46001016ad83Smrg ;; 46011016ad83Smrg 46021016ad83Smrg haiku*) 46031016ad83Smrg # PIC is the default for Haiku. 46041016ad83Smrg # The "-static" flag exists, but is broken. 46051016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 46061016ad83Smrg ;; 46071016ad83Smrg 46081016ad83Smrg hpux*) 46091016ad83Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 46101016ad83Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 46111016ad83Smrg # sets the default TLS model and affects inlining. 46121016ad83Smrg case $host_cpu in 46131016ad83Smrg hppa*64*) 46141016ad83Smrg # +Z the default 46151016ad83Smrg ;; 46161016ad83Smrg *) 46171016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 46181016ad83Smrg ;; 46191016ad83Smrg esac 46201016ad83Smrg ;; 46211016ad83Smrg 46221016ad83Smrg interix[[3-9]]*) 46231016ad83Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 46241016ad83Smrg # Instead, we relocate shared libraries at runtime. 46251016ad83Smrg ;; 46261016ad83Smrg 46271016ad83Smrg msdosdjgpp*) 46281016ad83Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 46291016ad83Smrg # on systems that don't support them. 46301016ad83Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 46311016ad83Smrg enable_shared=no 46321016ad83Smrg ;; 46331016ad83Smrg 46341016ad83Smrg *nto* | *qnx*) 46351016ad83Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 46361016ad83Smrg # it will coredump. 46371016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 46381016ad83Smrg ;; 46391016ad83Smrg 46401016ad83Smrg sysv4*MP*) 46411016ad83Smrg if test -d /usr/nec; then 46421016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 46431016ad83Smrg fi 46441016ad83Smrg ;; 46451016ad83Smrg 46461016ad83Smrg *) 46471016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 46481016ad83Smrg ;; 46491016ad83Smrg esac 46501016ad83Smrg 46511016ad83Smrg case $cc_basename in 46521016ad83Smrg nvcc*) # Cuda Compiler Driver 2.2 46531016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 46541016ad83Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 46551016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 46561016ad83Smrg fi 46571016ad83Smrg ;; 46581016ad83Smrg esac 46591016ad83Smrg else 46601016ad83Smrg # PORTME Check for flag to pass linker flags through the system compiler. 46611016ad83Smrg case $host_os in 46621016ad83Smrg aix*) 46631016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 46647204935cSmrg if test ia64 = "$host_cpu"; then 46651016ad83Smrg # AIX 5 now supports IA64 processor 46661016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 46671016ad83Smrg else 46681016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 46691016ad83Smrg fi 46701016ad83Smrg ;; 46711016ad83Smrg 46727204935cSmrg darwin* | rhapsody*) 46737204935cSmrg # PIC is the default on this platform 46747204935cSmrg # Common symbols not allowed in MH_DYLIB files 46757204935cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 46767204935cSmrg case $cc_basename in 46777204935cSmrg nagfor*) 46787204935cSmrg # NAG Fortran compiler 46797204935cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 46807204935cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 46817204935cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 46827204935cSmrg ;; 46837204935cSmrg esac 46847204935cSmrg ;; 46857204935cSmrg 46861016ad83Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 46871016ad83Smrg # This hack is so that the source file can tell whether it is being 46881016ad83Smrg # built for inclusion in a dll (and should export symbols for example). 46891016ad83Smrg m4_if([$1], [GCJ], [], 46901016ad83Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 46917204935cSmrg case $host_os in 46927204935cSmrg os2*) 46937204935cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 46947204935cSmrg ;; 46957204935cSmrg esac 46961016ad83Smrg ;; 46971016ad83Smrg 46981016ad83Smrg hpux9* | hpux10* | hpux11*) 46991016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47001016ad83Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 47011016ad83Smrg # not for PA HP-UX. 47021016ad83Smrg case $host_cpu in 47031016ad83Smrg hppa*64*|ia64*) 47041016ad83Smrg # +Z the default 47051016ad83Smrg ;; 47061016ad83Smrg *) 47071016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 47081016ad83Smrg ;; 47091016ad83Smrg esac 47101016ad83Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 47117204935cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 47121016ad83Smrg ;; 47131016ad83Smrg 47141016ad83Smrg irix5* | irix6* | nonstopux*) 47151016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47161016ad83Smrg # PIC (with -KPIC) is the default. 47171016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 47181016ad83Smrg ;; 47191016ad83Smrg 47201016ad83Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 47211016ad83Smrg case $cc_basename in 47227204935cSmrg # old Intel for x86_64, which still supported -KPIC. 47231016ad83Smrg ecc*) 47241016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47251016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47261016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47271016ad83Smrg ;; 47281016ad83Smrg # icc used to be incompatible with GCC. 47291016ad83Smrg # ICC 10 doesn't accept -KPIC any more. 47301016ad83Smrg icc* | ifort*) 47311016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47321016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 47331016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47341016ad83Smrg ;; 47351016ad83Smrg # Lahey Fortran 8.1. 47361016ad83Smrg lf95*) 47371016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47381016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 47391016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 47401016ad83Smrg ;; 47411016ad83Smrg nagfor*) 47421016ad83Smrg # NAG Fortran compiler 47431016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 47441016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 47451016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47461016ad83Smrg ;; 47477204935cSmrg tcc*) 47487204935cSmrg # Fabrice Bellard et al's Tiny C Compiler 47497204935cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47507204935cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 47517204935cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47527204935cSmrg ;; 47531016ad83Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 47541016ad83Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 47551016ad83Smrg # which looks to be a dead project) 47561016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47571016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 47581016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47591016ad83Smrg ;; 47601016ad83Smrg ccc*) 47611016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47621016ad83Smrg # All Alpha code is PIC. 47631016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 47641016ad83Smrg ;; 47651016ad83Smrg xl* | bgxl* | bgf* | mpixl*) 47661016ad83Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 47671016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47681016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 47691016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 47701016ad83Smrg ;; 47711016ad83Smrg *) 4772b9526c6aSmrg case `$CC -V 2>&1 | $SED 5q` in 47731016ad83Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 47741016ad83Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 47751016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47761016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47771016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 47781016ad83Smrg ;; 47791016ad83Smrg *Sun\ F* | *Sun*Fortran*) 47801016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47811016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47821016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 47831016ad83Smrg ;; 47841016ad83Smrg *Sun\ C*) 47851016ad83Smrg # Sun C 5.9 47861016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47871016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47881016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47891016ad83Smrg ;; 47901016ad83Smrg *Intel*\ [[CF]]*Compiler*) 47911016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47921016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 47931016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47941016ad83Smrg ;; 47951016ad83Smrg *Portland\ Group*) 47961016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47971016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 47981016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47991016ad83Smrg ;; 48001016ad83Smrg esac 48011016ad83Smrg ;; 48021016ad83Smrg esac 48031016ad83Smrg ;; 48041016ad83Smrg 48051016ad83Smrg newsos6) 48061016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48071016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48081016ad83Smrg ;; 48091016ad83Smrg 48101016ad83Smrg *nto* | *qnx*) 48111016ad83Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 48121016ad83Smrg # it will coredump. 48131016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 48141016ad83Smrg ;; 48151016ad83Smrg 48161016ad83Smrg osf3* | osf4* | osf5*) 48171016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48181016ad83Smrg # All OSF/1 code is PIC. 48191016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 48201016ad83Smrg ;; 48211016ad83Smrg 48221016ad83Smrg rdos*) 48231016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 48241016ad83Smrg ;; 48251016ad83Smrg 48261016ad83Smrg solaris*) 48271016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48281016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48291016ad83Smrg case $cc_basename in 48301016ad83Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 48311016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 48321016ad83Smrg *) 48331016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 48341016ad83Smrg esac 48351016ad83Smrg ;; 48361016ad83Smrg 48371016ad83Smrg sunos4*) 48381016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 48391016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 48401016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48411016ad83Smrg ;; 48421016ad83Smrg 48431016ad83Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 48441016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48451016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48461016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48471016ad83Smrg ;; 48481016ad83Smrg 48491016ad83Smrg sysv4*MP*) 48507204935cSmrg if test -d /usr/nec; then 48511016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 48521016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48531016ad83Smrg fi 48541016ad83Smrg ;; 48551016ad83Smrg 48561016ad83Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 48571016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48581016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48591016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48601016ad83Smrg ;; 48611016ad83Smrg 48621016ad83Smrg unicos*) 48631016ad83Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48641016ad83Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 48651016ad83Smrg ;; 48661016ad83Smrg 48671016ad83Smrg uts4*) 48681016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 48691016ad83Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48701016ad83Smrg ;; 48711016ad83Smrg 48721016ad83Smrg *) 48731016ad83Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 48741016ad83Smrg ;; 48751016ad83Smrg esac 48761016ad83Smrg fi 48771016ad83Smrg]) 48781016ad83Smrgcase $host_os in 48797204935cSmrg # For platforms that do not support PIC, -DPIC is meaningless: 48801016ad83Smrg *djgpp*) 48811016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 48821016ad83Smrg ;; 48831016ad83Smrg *) 48841016ad83Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 48851016ad83Smrg ;; 48861016ad83Smrgesac 48871016ad83Smrg 48881016ad83SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 48891016ad83Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 48901016ad83Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 48911016ad83Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 48921016ad83Smrg 48931016ad83Smrg# 48941016ad83Smrg# Check to make sure the PIC flag actually works. 48951016ad83Smrg# 48961016ad83Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 48971016ad83Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 48981016ad83Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 48991016ad83Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 49001016ad83Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 49011016ad83Smrg "" | " "*) ;; 49021016ad83Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 49031016ad83Smrg esac], 49041016ad83Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 49051016ad83Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 49061016ad83Smrgfi 49071016ad83Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 49081016ad83Smrg [Additional compiler flags for building library objects]) 49091016ad83Smrg 49101016ad83Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 49111016ad83Smrg [How to pass a linker flag through the compiler]) 49121016ad83Smrg# 49131016ad83Smrg# Check to make sure the static flag actually works. 49141016ad83Smrg# 49151016ad83Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 49161016ad83Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 49171016ad83Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 49181016ad83Smrg $lt_tmp_static_flag, 49191016ad83Smrg [], 49201016ad83Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 49211016ad83Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 49221016ad83Smrg [Compiler flag to prevent dynamic linking]) 49231016ad83Smrg])# _LT_COMPILER_PIC 49241016ad83Smrg 49251016ad83Smrg 49261016ad83Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 49271016ad83Smrg# ---------------------------- 49281016ad83Smrg# See if the linker supports building shared libraries. 49291016ad83Smrgm4_defun([_LT_LINKER_SHLIBS], 49301016ad83Smrg[AC_REQUIRE([LT_PATH_LD])dnl 49311016ad83SmrgAC_REQUIRE([LT_PATH_NM])dnl 49321016ad83Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 49331016ad83Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 49341016ad83Smrgm4_require([_LT_DECL_EGREP])dnl 49351016ad83Smrgm4_require([_LT_DECL_SED])dnl 49361016ad83Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 49371016ad83Smrgm4_require([_LT_TAG_COMPILER])dnl 49381016ad83SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 49391016ad83Smrgm4_if([$1], [CXX], [ 49401016ad83Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 49411016ad83Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 49421016ad83Smrg case $host_os in 49431016ad83Smrg aix[[4-9]]*) 49441016ad83Smrg # If we're using GNU nm, then we don't want the "-C" option. 49457204935cSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 49467204935cSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 49477204935cSmrg # weak defined symbols like other global defined symbols, whereas 49487204935cSmrg # GNU nm marks them as "W". 49497204935cSmrg # While the 'weak' keyword is ignored in the Export File, we need 49507204935cSmrg # it in the Import File for the 'aix-soname' feature, so we have 49517204935cSmrg # to replace the "-B" option with "-P" for AIX nm. 49521016ad83Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 49537204935cSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' 49541016ad83Smrg else 4955b9526c6aSmrg _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 49561016ad83Smrg fi 49571016ad83Smrg ;; 49581016ad83Smrg pw32*) 49597204935cSmrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 49601016ad83Smrg ;; 49611016ad83Smrg cygwin* | mingw* | cegcc*) 49621016ad83Smrg case $cc_basename in 4963b9526c6aSmrg cl* | icl*) 49641016ad83Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 49651016ad83Smrg ;; 49661016ad83Smrg *) 49671016ad83Smrg _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' 49681016ad83Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 49691016ad83Smrg ;; 49701016ad83Smrg esac 49711016ad83Smrg ;; 49721016ad83Smrg *) 49731016ad83Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 49741016ad83Smrg ;; 49751016ad83Smrg esac 49761016ad83Smrg], [ 49771016ad83Smrg runpath_var= 49781016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 49791016ad83Smrg _LT_TAGVAR(always_export_symbols, $1)=no 49801016ad83Smrg _LT_TAGVAR(archive_cmds, $1)= 49811016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 49821016ad83Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 49831016ad83Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 49841016ad83Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 49851016ad83Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 49861016ad83Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 49871016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=no 49881016ad83Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 49891016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 49901016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 49911016ad83Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 49921016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 49931016ad83Smrg _LT_TAGVAR(inherit_rpath, $1)=no 49941016ad83Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 49951016ad83Smrg _LT_TAGVAR(module_cmds, $1)= 49961016ad83Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 49971016ad83Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 49981016ad83Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 49991016ad83Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 50001016ad83Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 50011016ad83Smrg # include_expsyms should be a list of space-separated symbols to be *always* 50021016ad83Smrg # included in the symbol list 50031016ad83Smrg _LT_TAGVAR(include_expsyms, $1)= 50041016ad83Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 50057204935cSmrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 50067204935cSmrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 50077204935cSmrg # as well as any symbol that contains 'd'. 50081016ad83Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 50091016ad83Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 50101016ad83Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 50111016ad83Smrg # the symbol is explicitly referenced. Since portable code cannot 50121016ad83Smrg # rely on this symbol name, it's probably fine to never include it in 50131016ad83Smrg # preloaded symbol tables. 50141016ad83Smrg # Exclude shared library initialization/finalization symbols. 50151016ad83Smrgdnl Note also adjust exclude_expsyms for C++ above. 50161016ad83Smrg extract_expsyms_cmds= 50171016ad83Smrg 50181016ad83Smrg case $host_os in 50191016ad83Smrg cygwin* | mingw* | pw32* | cegcc*) 5020b9526c6aSmrg # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 50211016ad83Smrg # When not using gcc, we currently assume that we are using 5022b9526c6aSmrg # Microsoft Visual C++ or Intel C++ Compiler. 50237204935cSmrg if test yes != "$GCC"; then 50241016ad83Smrg with_gnu_ld=no 50251016ad83Smrg fi 50261016ad83Smrg ;; 50271016ad83Smrg interix*) 5028b9526c6aSmrg # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 50291016ad83Smrg with_gnu_ld=yes 50301016ad83Smrg ;; 50317204935cSmrg openbsd* | bitrig*) 50321016ad83Smrg with_gnu_ld=no 50331016ad83Smrg ;; 50341016ad83Smrg esac 50351016ad83Smrg 50361016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 50371016ad83Smrg 50381016ad83Smrg # On some targets, GNU ld is compatible enough with the native linker 50391016ad83Smrg # that we're better off using the native interface for both. 50401016ad83Smrg lt_use_gnu_ld_interface=no 50417204935cSmrg if test yes = "$with_gnu_ld"; then 50421016ad83Smrg case $host_os in 50431016ad83Smrg aix*) 50441016ad83Smrg # The AIX port of GNU ld has always aspired to compatibility 50451016ad83Smrg # with the native linker. However, as the warning in the GNU ld 50461016ad83Smrg # block says, versions before 2.19.5* couldn't really create working 50471016ad83Smrg # shared libraries, regardless of the interface used. 50481016ad83Smrg case `$LD -v 2>&1` in 50491016ad83Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 50501016ad83Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 50511016ad83Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 50521016ad83Smrg *) 50531016ad83Smrg lt_use_gnu_ld_interface=yes 50541016ad83Smrg ;; 50551016ad83Smrg esac 50561016ad83Smrg ;; 50571016ad83Smrg *) 50581016ad83Smrg lt_use_gnu_ld_interface=yes 50591016ad83Smrg ;; 50601016ad83Smrg esac 50611016ad83Smrg fi 50621016ad83Smrg 50637204935cSmrg if test yes = "$lt_use_gnu_ld_interface"; then 50641016ad83Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 50657204935cSmrg wlarc='$wl' 50661016ad83Smrg 50671016ad83Smrg # Set some defaults for GNU ld with shared library support. These 50681016ad83Smrg # are reset later if shared libraries are not supported. Putting them 50691016ad83Smrg # here allows them to be overridden if necessary. 50701016ad83Smrg runpath_var=LD_RUN_PATH 50717204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 50727204935cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 50731016ad83Smrg # ancient GNU ld didn't support --whole-archive et. al. 50741016ad83Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 50757204935cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 50761016ad83Smrg else 50771016ad83Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 50781016ad83Smrg fi 50791016ad83Smrg supports_anon_versioning=no 5080b9526c6aSmrg case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in 50811016ad83Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 50821016ad83Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 50831016ad83Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 50841016ad83Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 50851016ad83Smrg *\ 2.11.*) ;; # other 2.11 versions 50861016ad83Smrg *) supports_anon_versioning=yes ;; 50871016ad83Smrg esac 50881016ad83Smrg 50891016ad83Smrg # See if GNU ld supports shared libraries. 50901016ad83Smrg case $host_os in 50911016ad83Smrg aix[[3-9]]*) 50921016ad83Smrg # On AIX/PPC, the GNU linker is very broken 50937204935cSmrg if test ia64 != "$host_cpu"; then 50941016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 50951016ad83Smrg cat <<_LT_EOF 1>&2 50961016ad83Smrg 50971016ad83Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 50981016ad83Smrg*** to be unable to reliably create shared libraries on AIX. 50991016ad83Smrg*** Therefore, libtool is disabling shared libraries support. If you 51001016ad83Smrg*** really care for shared libraries, you may want to install binutils 51011016ad83Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 51021016ad83Smrg*** You will then need to restart the configuration process. 51031016ad83Smrg 51041016ad83Smrg_LT_EOF 51051016ad83Smrg fi 51061016ad83Smrg ;; 51071016ad83Smrg 51081016ad83Smrg amigaos*) 51091016ad83Smrg case $host_cpu in 51101016ad83Smrg powerpc) 51111016ad83Smrg # see comment about AmigaOS4 .so support 51127204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 51131016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 51141016ad83Smrg ;; 51151016ad83Smrg m68k) 51161016ad83Smrg _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)' 51171016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51181016ad83Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 51191016ad83Smrg ;; 51201016ad83Smrg esac 51211016ad83Smrg ;; 51221016ad83Smrg 51231016ad83Smrg beos*) 51241016ad83Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 51251016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51261016ad83Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 51271016ad83Smrg # support --undefined. This deserves some investigation. FIXME 51287204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 51291016ad83Smrg else 51301016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 51311016ad83Smrg fi 51321016ad83Smrg ;; 51331016ad83Smrg 51341016ad83Smrg cygwin* | mingw* | pw32* | cegcc*) 51351016ad83Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 51361016ad83Smrg # as there is no search path for DLLs. 51371016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51387204935cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 51391016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51401016ad83Smrg _LT_TAGVAR(always_export_symbols, $1)=no 51411016ad83Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 51421016ad83Smrg _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' 51431016ad83Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 51441016ad83Smrg 51451016ad83Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 51467204935cSmrg _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' 51477204935cSmrg # If the export-symbols file already is a .def file, use it as 51487204935cSmrg # is; otherwise, prepend EXPORTS... 51497204935cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 51507204935cSmrg cp $export_symbols $output_objdir/$soname.def; 51517204935cSmrg else 51527204935cSmrg echo EXPORTS > $output_objdir/$soname.def; 51537204935cSmrg cat $export_symbols >> $output_objdir/$soname.def; 51547204935cSmrg fi~ 51557204935cSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 51561016ad83Smrg else 51571016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 51581016ad83Smrg fi 51591016ad83Smrg ;; 51601016ad83Smrg 51611016ad83Smrg haiku*) 51627204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 51631016ad83Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 51641016ad83Smrg ;; 51651016ad83Smrg 51667204935cSmrg os2*) 51677204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51687204935cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 51697204935cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51707204935cSmrg shrext_cmds=.dll 51717204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 51727204935cSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 51737204935cSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 51747204935cSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 51757204935cSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 51767204935cSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 51777204935cSmrg emximp -o $lib $output_objdir/$libname.def' 51787204935cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 51797204935cSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 51807204935cSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 51817204935cSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 51827204935cSmrg prefix_cmds="$SED"~ 51837204935cSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 51847204935cSmrg prefix_cmds="$prefix_cmds -e 1d"; 51857204935cSmrg fi~ 51867204935cSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 51877204935cSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 51887204935cSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 51897204935cSmrg emximp -o $lib $output_objdir/$libname.def' 51907204935cSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 51917204935cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5192b9526c6aSmrg _LT_TAGVAR(file_list_spec, $1)='@' 51937204935cSmrg ;; 51947204935cSmrg 51951016ad83Smrg interix[[3-9]]*) 51961016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=no 51971016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 51987204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 51997204935cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 52001016ad83Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 52011016ad83Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 52021016ad83Smrg # default) and relocated if they conflict, which is a slow very memory 52031016ad83Smrg # consuming and fragmenting process. To avoid this, we pick a random, 52041016ad83Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 52051016ad83Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 52067204935cSmrg _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' 5207b9526c6aSmrg _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' 52081016ad83Smrg ;; 52091016ad83Smrg 52101016ad83Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 52111016ad83Smrg tmp_diet=no 52127204935cSmrg if test linux-dietlibc = "$host_os"; then 52131016ad83Smrg case $cc_basename in 52141016ad83Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 52151016ad83Smrg esac 52161016ad83Smrg fi 52171016ad83Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 52187204935cSmrg && test no = "$tmp_diet" 52191016ad83Smrg then 52201016ad83Smrg tmp_addflag=' $pic_flag' 52211016ad83Smrg tmp_sharedflag='-shared' 52221016ad83Smrg case $cc_basename,$host_cpu in 52231016ad83Smrg pgcc*) # Portland Group C compiler 52247204935cSmrg _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' 52251016ad83Smrg tmp_addflag=' $pic_flag' 52261016ad83Smrg ;; 52271016ad83Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 52281016ad83Smrg # Portland Group f77 and f90 compilers 52297204935cSmrg _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' 52301016ad83Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 52311016ad83Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 52321016ad83Smrg tmp_addflag=' -i_dynamic' ;; 52331016ad83Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 52341016ad83Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 52351016ad83Smrg ifc* | ifort*) # Intel Fortran compiler 52361016ad83Smrg tmp_addflag=' -nofor_main' ;; 52371016ad83Smrg lf95*) # Lahey Fortran 8.1 52381016ad83Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 52391016ad83Smrg tmp_sharedflag='--shared' ;; 52407204935cSmrg nagfor*) # NAGFOR 5.3 52417204935cSmrg tmp_sharedflag='-Wl,-shared' ;; 52421016ad83Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 52431016ad83Smrg tmp_sharedflag='-qmkshrobj' 52441016ad83Smrg tmp_addflag= ;; 52451016ad83Smrg nvcc*) # Cuda Compiler Driver 2.2 52467204935cSmrg _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' 52471016ad83Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 52481016ad83Smrg ;; 52491016ad83Smrg esac 5250b9526c6aSmrg case `$CC -V 2>&1 | $SED 5q` in 52511016ad83Smrg *Sun\ C*) # Sun C 5.9 52527204935cSmrg _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' 52531016ad83Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 52541016ad83Smrg tmp_sharedflag='-G' ;; 52551016ad83Smrg *Sun\ F*) # Sun Fortran 8.3 52561016ad83Smrg tmp_sharedflag='-G' ;; 52571016ad83Smrg esac 52587204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 52591016ad83Smrg 52607204935cSmrg if test yes = "$supports_anon_versioning"; then 52611016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5262b9526c6aSmrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 52637204935cSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 52647204935cSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 52651016ad83Smrg fi 52661016ad83Smrg 52671016ad83Smrg case $cc_basename in 52687204935cSmrg tcc*) 52697204935cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 52707204935cSmrg ;; 52711016ad83Smrg xlf* | bgf* | bgxlf* | mpixlf*) 52721016ad83Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 52731016ad83Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 52747204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 52751016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 52767204935cSmrg if test yes = "$supports_anon_versioning"; then 52771016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5278b9526c6aSmrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 52797204935cSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 52807204935cSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 52811016ad83Smrg fi 52821016ad83Smrg ;; 52831016ad83Smrg esac 52841016ad83Smrg else 52851016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 52861016ad83Smrg fi 52871016ad83Smrg ;; 52881016ad83Smrg 5289aa30ed02Smrg netbsd*) 52901016ad83Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 52911016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 52921016ad83Smrg wlarc= 52931016ad83Smrg else 52947204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 52957204935cSmrg _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' 52961016ad83Smrg fi 52971016ad83Smrg ;; 52981016ad83Smrg 52991016ad83Smrg solaris*) 53001016ad83Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 53011016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 53021016ad83Smrg cat <<_LT_EOF 1>&2 53031016ad83Smrg 53041016ad83Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 53051016ad83Smrg*** create shared libraries on Solaris systems. Therefore, libtool 53061016ad83Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 53071016ad83Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 53081016ad83Smrg*** your PATH or compiler configuration so that the native linker is 53091016ad83Smrg*** used, and then restart. 53101016ad83Smrg 53111016ad83Smrg_LT_EOF 53121016ad83Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 53137204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 53147204935cSmrg _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' 53151016ad83Smrg else 53161016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 53171016ad83Smrg fi 53181016ad83Smrg ;; 53191016ad83Smrg 53201016ad83Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 53211016ad83Smrg case `$LD -v 2>&1` in 53221016ad83Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 53231016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 53241016ad83Smrg cat <<_LT_EOF 1>&2 53251016ad83Smrg 53267204935cSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 53271016ad83Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 53281016ad83Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 53291016ad83Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 53301016ad83Smrg*** your PATH or compiler configuration so that the native linker is 53311016ad83Smrg*** used, and then restart. 53321016ad83Smrg 53331016ad83Smrg_LT_EOF 53341016ad83Smrg ;; 53351016ad83Smrg *) 53361016ad83Smrg # For security reasons, it is highly recommended that you always 53371016ad83Smrg # use absolute paths for naming shared libraries, and exclude the 53381016ad83Smrg # DT_RUNPATH tag from executables and libraries. But doing so 53391016ad83Smrg # requires that you compile everything twice, which is a pain. 53401016ad83Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 53417204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 53427204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 53437204935cSmrg _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' 53441016ad83Smrg else 53451016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 53461016ad83Smrg fi 53471016ad83Smrg ;; 53481016ad83Smrg esac 53491016ad83Smrg ;; 53501016ad83Smrg 53511016ad83Smrg sunos4*) 53521016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 53531016ad83Smrg wlarc= 53541016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 53551016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53561016ad83Smrg ;; 53571016ad83Smrg 53581016ad83Smrg *) 53591016ad83Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 53607204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 53617204935cSmrg _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' 53621016ad83Smrg else 53631016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 53641016ad83Smrg fi 53651016ad83Smrg ;; 53661016ad83Smrg esac 53671016ad83Smrg 53687204935cSmrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 53691016ad83Smrg runpath_var= 53701016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 53711016ad83Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 53721016ad83Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 53731016ad83Smrg fi 53741016ad83Smrg else 53751016ad83Smrg # PORTME fill in a description of your system's linker (not GNU ld) 53761016ad83Smrg case $host_os in 53771016ad83Smrg aix3*) 53781016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 53791016ad83Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 53801016ad83Smrg _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' 53811016ad83Smrg # Note: this linker hardcodes the directories in LIBPATH if there 53821016ad83Smrg # are no directories specified by -L. 53831016ad83Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 53847204935cSmrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 53851016ad83Smrg # Neither direct hardcoding nor static linking is supported with a 53861016ad83Smrg # broken collect2. 53871016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 53881016ad83Smrg fi 53891016ad83Smrg ;; 53901016ad83Smrg 53911016ad83Smrg aix[[4-9]]*) 53927204935cSmrg if test ia64 = "$host_cpu"; then 53931016ad83Smrg # On IA64, the linker does run time linking by default, so we don't 53941016ad83Smrg # have to do anything special. 53951016ad83Smrg aix_use_runtimelinking=no 53961016ad83Smrg exp_sym_flag='-Bexport' 53977204935cSmrg no_entry_flag= 53981016ad83Smrg else 53991016ad83Smrg # If we're using GNU nm, then we don't want the "-C" option. 54007204935cSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 54017204935cSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 54027204935cSmrg # weak defined symbols like other global defined symbols, whereas 54037204935cSmrg # GNU nm marks them as "W". 54047204935cSmrg # While the 'weak' keyword is ignored in the Export File, we need 54057204935cSmrg # it in the Import File for the 'aix-soname' feature, so we have 54067204935cSmrg # to replace the "-B" option with "-P" for AIX nm. 54071016ad83Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 54087204935cSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' 54091016ad83Smrg else 5410b9526c6aSmrg _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 54111016ad83Smrg fi 54121016ad83Smrg aix_use_runtimelinking=no 54131016ad83Smrg 54141016ad83Smrg # Test if we are trying to use run time linking or normal 54151016ad83Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 54167204935cSmrg # have runtime linking enabled, and use it for executables. 54177204935cSmrg # For shared libraries, we enable/disable runtime linking 54187204935cSmrg # depending on the kind of the shared library created - 54197204935cSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 54207204935cSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 54217204935cSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 54227204935cSmrg # lib.a static archive 54237204935cSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 54247204935cSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 54257204935cSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 54267204935cSmrg # lib.a(lib.so.V) shared, rtl:no 54277204935cSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 54287204935cSmrg # lib.a static archive 54291016ad83Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 54301016ad83Smrg for ld_flag in $LDFLAGS; do 54317204935cSmrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 54321016ad83Smrg aix_use_runtimelinking=yes 54331016ad83Smrg break 54341016ad83Smrg fi 54351016ad83Smrg done 54367204935cSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 54377204935cSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 54387204935cSmrg # so we don't have lib.a shared libs to link our executables. 54397204935cSmrg # We have to force runtime linking in this case. 54407204935cSmrg aix_use_runtimelinking=yes 54417204935cSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 54427204935cSmrg fi 54431016ad83Smrg ;; 54441016ad83Smrg esac 54451016ad83Smrg 54461016ad83Smrg exp_sym_flag='-bexport' 54471016ad83Smrg no_entry_flag='-bnoentry' 54481016ad83Smrg fi 54491016ad83Smrg 54501016ad83Smrg # When large executables or shared objects are built, AIX ld can 54511016ad83Smrg # have problems creating the table of contents. If linking a library 54521016ad83Smrg # or program results in "error TOC overflow" add -mminimal-toc to 54531016ad83Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 54541016ad83Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 54551016ad83Smrg 54561016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='' 54571016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 54581016ad83Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 54591016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 54601016ad83Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 54617204935cSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 54627204935cSmrg case $with_aix_soname,$aix_use_runtimelinking in 54637204935cSmrg aix,*) ;; # traditional, no import file 54647204935cSmrg svr4,* | *,yes) # use import file 54657204935cSmrg # The Import File defines what to hardcode. 54667204935cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 54677204935cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 54687204935cSmrg ;; 54697204935cSmrg esac 54701016ad83Smrg 54717204935cSmrg if test yes = "$GCC"; then 54721016ad83Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 54731016ad83Smrg # We only want to do this on AIX 4.2 and lower, the check 54741016ad83Smrg # below for broken collect2 doesn't work under 4.3+ 54757204935cSmrg collect2name=`$CC -print-prog-name=collect2` 54761016ad83Smrg if test -f "$collect2name" && 54771016ad83Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 54781016ad83Smrg then 54791016ad83Smrg # We have reworked collect2 54801016ad83Smrg : 54811016ad83Smrg else 54821016ad83Smrg # We have old collect2 54831016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 54841016ad83Smrg # It fails to find uninstalled libraries when the uninstalled 54851016ad83Smrg # path is not listed in the libpath. Setting hardcode_minus_L 54861016ad83Smrg # to unsupported forces relinking 54871016ad83Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 54881016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 54891016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 54901016ad83Smrg fi 54911016ad83Smrg ;; 54921016ad83Smrg esac 54931016ad83Smrg shared_flag='-shared' 54947204935cSmrg if test yes = "$aix_use_runtimelinking"; then 54957204935cSmrg shared_flag="$shared_flag "'$wl-G' 54961016ad83Smrg fi 54977204935cSmrg # Need to ensure runtime linking is disabled for the traditional 54987204935cSmrg # shared library, or the linker may eventually find shared libraries 54997204935cSmrg # /with/ Import File - we do not want to mix them. 55007204935cSmrg shared_flag_aix='-shared' 55017204935cSmrg shared_flag_svr4='-shared $wl-G' 55021016ad83Smrg else 55031016ad83Smrg # not using gcc 55047204935cSmrg if test ia64 = "$host_cpu"; then 55051016ad83Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 55061016ad83Smrg # chokes on -Wl,-G. The following line is correct: 55071016ad83Smrg shared_flag='-G' 55081016ad83Smrg else 55097204935cSmrg if test yes = "$aix_use_runtimelinking"; then 55107204935cSmrg shared_flag='$wl-G' 55111016ad83Smrg else 55127204935cSmrg shared_flag='$wl-bM:SRE' 55131016ad83Smrg fi 55147204935cSmrg shared_flag_aix='$wl-bM:SRE' 55157204935cSmrg shared_flag_svr4='$wl-G' 55161016ad83Smrg fi 55171016ad83Smrg fi 55181016ad83Smrg 55197204935cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 55201016ad83Smrg # It seems that -bexpall does not export symbols beginning with 55211016ad83Smrg # underscore (_), so it is better to generate a list of symbols to export. 55221016ad83Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 55237204935cSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 55241016ad83Smrg # Warning - without using the other runtime loading flags (-brtl), 55251016ad83Smrg # -berok will link without error, but may produce a broken library. 55261016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 55271016ad83Smrg # Determine the default libpath from the value encoded in an 55281016ad83Smrg # empty executable. 55291016ad83Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 55307204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 55317204935cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag 55321016ad83Smrg else 55337204935cSmrg if test ia64 = "$host_cpu"; then 55347204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 55351016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 55367204935cSmrg _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" 55371016ad83Smrg else 55381016ad83Smrg # Determine the default libpath from the value encoded in an 55391016ad83Smrg # empty executable. 55401016ad83Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 55417204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 55421016ad83Smrg # Warning - without using the other run time loading flags, 55431016ad83Smrg # -berok will link without error, but may produce a broken library. 55447204935cSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 55457204935cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 55467204935cSmrg if test yes = "$with_gnu_ld"; then 55471016ad83Smrg # We only use this code for GNU lds that support --whole-archive. 55487204935cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 55491016ad83Smrg else 55501016ad83Smrg # Exported symbols can be pulled into shared objects from archives 55511016ad83Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 55521016ad83Smrg fi 55531016ad83Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 55547204935cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 55557204935cSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 55567204935cSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 55577204935cSmrg if test svr4 != "$with_aix_soname"; then 55587204935cSmrg # This is similar to how AIX traditionally builds its shared libraries. 55597204935cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' 55607204935cSmrg fi 55617204935cSmrg if test aix != "$with_aix_soname"; then 55627204935cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' 55637204935cSmrg else 55647204935cSmrg # used by -dlpreopen to get the symbols 55657204935cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 55667204935cSmrg fi 55677204935cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 55681016ad83Smrg fi 55691016ad83Smrg fi 55701016ad83Smrg ;; 55711016ad83Smrg 55721016ad83Smrg amigaos*) 55731016ad83Smrg case $host_cpu in 55741016ad83Smrg powerpc) 55751016ad83Smrg # see comment about AmigaOS4 .so support 55767204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 55771016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 55781016ad83Smrg ;; 55791016ad83Smrg m68k) 55801016ad83Smrg _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)' 55811016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 55821016ad83Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 55831016ad83Smrg ;; 55841016ad83Smrg esac 55851016ad83Smrg ;; 55861016ad83Smrg 55871016ad83Smrg bsdi[[45]]*) 55881016ad83Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 55891016ad83Smrg ;; 55901016ad83Smrg 55911016ad83Smrg cygwin* | mingw* | pw32* | cegcc*) 55921016ad83Smrg # When not using gcc, we currently assume that we are using 5593b9526c6aSmrg # Microsoft Visual C++ or Intel C++ Compiler. 55941016ad83Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 55951016ad83Smrg # no search path for DLLs. 55961016ad83Smrg case $cc_basename in 5597b9526c6aSmrg cl* | icl*) 5598b9526c6aSmrg # Native MSVC or ICC 55991016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 56001016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 56011016ad83Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 56021016ad83Smrg _LT_TAGVAR(file_list_spec, $1)='@' 56031016ad83Smrg # Tell ltmain to make .lib files, not .a files. 56041016ad83Smrg libext=lib 56051016ad83Smrg # Tell ltmain to make .dll files, not .so files. 56067204935cSmrg shrext_cmds=.dll 56071016ad83Smrg # FIXME: Setting linknames here is a bad hack. 56087204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 56097204935cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 56107204935cSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 56117204935cSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 56127204935cSmrg else 56137204935cSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 56147204935cSmrg fi~ 56157204935cSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 56167204935cSmrg linknames=' 56171016ad83Smrg # The linker will not automatically build a static lib if we build a DLL. 56181016ad83Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 56191016ad83Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 56201016ad83Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 56211016ad83Smrg _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' 56221016ad83Smrg # Don't use ranlib 56231016ad83Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 56241016ad83Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 56257204935cSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 56267204935cSmrg case $lt_outputfile in 56277204935cSmrg *.exe|*.EXE) ;; 56287204935cSmrg *) 56297204935cSmrg lt_outputfile=$lt_outputfile.exe 56307204935cSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 56317204935cSmrg ;; 56327204935cSmrg esac~ 56337204935cSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 56347204935cSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 56357204935cSmrg $RM "$lt_outputfile.manifest"; 56367204935cSmrg fi' 56371016ad83Smrg ;; 56381016ad83Smrg *) 5639b9526c6aSmrg # Assume MSVC and ICC wrapper 56401016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 56411016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 56421016ad83Smrg # Tell ltmain to make .lib files, not .a files. 56431016ad83Smrg libext=lib 56441016ad83Smrg # Tell ltmain to make .dll files, not .so files. 56457204935cSmrg shrext_cmds=.dll 56461016ad83Smrg # FIXME: Setting linknames here is a bad hack. 56471016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 56481016ad83Smrg # The linker will automatically build a .lib file if we build a DLL. 56491016ad83Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 56501016ad83Smrg # FIXME: Should let the user specify the lib program. 56511016ad83Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 56521016ad83Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 56531016ad83Smrg ;; 56541016ad83Smrg esac 56551016ad83Smrg ;; 56561016ad83Smrg 56571016ad83Smrg darwin* | rhapsody*) 56581016ad83Smrg _LT_DARWIN_LINKER_FEATURES($1) 56591016ad83Smrg ;; 56601016ad83Smrg 56611016ad83Smrg dgux*) 56621016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 56631016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 56641016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56651016ad83Smrg ;; 56661016ad83Smrg 56671016ad83Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 56681016ad83Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 56691016ad83Smrg # does not break anything, and helps significantly (at the cost of a little 56701016ad83Smrg # extra space). 56711016ad83Smrg freebsd2.2*) 56721016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 56731016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 56741016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 56751016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56761016ad83Smrg ;; 56771016ad83Smrg 56781016ad83Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 56791016ad83Smrg freebsd2.*) 56801016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 56811016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 56821016ad83Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 56831016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56841016ad83Smrg ;; 56851016ad83Smrg 56861016ad83Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5687b9526c6aSmrg freebsd* | dragonfly* | midnightbsd*) 56881016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 56891016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 56901016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 56911016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56921016ad83Smrg ;; 56931016ad83Smrg 56941016ad83Smrg hpux9*) 56957204935cSmrg if test yes = "$GCC"; then 56967204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 56971016ad83Smrg else 56987204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 56991016ad83Smrg fi 57007204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 57011016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57021016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 57031016ad83Smrg 57041016ad83Smrg # hardcode_minus_L: Not really in the search PATH, 57051016ad83Smrg # but as the default location of the library. 57061016ad83Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57077204935cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 57081016ad83Smrg ;; 57091016ad83Smrg 57101016ad83Smrg hpux10*) 57117204935cSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 57127204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 57131016ad83Smrg else 57141016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 57151016ad83Smrg fi 57167204935cSmrg if test no = "$with_gnu_ld"; then 57177204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 57181016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57191016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 57201016ad83Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 57217204935cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 57221016ad83Smrg # hardcode_minus_L: Not really in the search PATH, 57231016ad83Smrg # but as the default location of the library. 57241016ad83Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57251016ad83Smrg fi 57261016ad83Smrg ;; 57271016ad83Smrg 57281016ad83Smrg hpux11*) 57297204935cSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 57301016ad83Smrg case $host_cpu in 57311016ad83Smrg hppa*64*) 57327204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 57331016ad83Smrg ;; 57341016ad83Smrg ia64*) 57357204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 57361016ad83Smrg ;; 57371016ad83Smrg *) 57387204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 57391016ad83Smrg ;; 57401016ad83Smrg esac 57411016ad83Smrg else 57421016ad83Smrg case $host_cpu in 57431016ad83Smrg hppa*64*) 57447204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 57451016ad83Smrg ;; 57461016ad83Smrg ia64*) 57477204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 57481016ad83Smrg ;; 57491016ad83Smrg *) 57501016ad83Smrg m4_if($1, [], [ 57511016ad83Smrg # Older versions of the 11.00 compiler do not understand -b yet 57521016ad83Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 57531016ad83Smrg _LT_LINKER_OPTION([if $CC understands -b], 57541016ad83Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 57557204935cSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 57561016ad83Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 57577204935cSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 57581016ad83Smrg ;; 57591016ad83Smrg esac 57601016ad83Smrg fi 57617204935cSmrg if test no = "$with_gnu_ld"; then 57627204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 57631016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57641016ad83Smrg 57651016ad83Smrg case $host_cpu in 57661016ad83Smrg hppa*64*|ia64*) 57671016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=no 57681016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 57691016ad83Smrg ;; 57701016ad83Smrg *) 57711016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 57721016ad83Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 57737204935cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 57741016ad83Smrg 57751016ad83Smrg # hardcode_minus_L: Not really in the search PATH, 57761016ad83Smrg # but as the default location of the library. 57771016ad83Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57781016ad83Smrg ;; 57791016ad83Smrg esac 57801016ad83Smrg fi 57811016ad83Smrg ;; 57821016ad83Smrg 57831016ad83Smrg irix5* | irix6* | nonstopux*) 57847204935cSmrg if test yes = "$GCC"; then 57857204935cSmrg _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' 57861016ad83Smrg # Try to use the -exported_symbol ld option, if it does not 57871016ad83Smrg # work, assume that -exports_file does not work either and 57881016ad83Smrg # implicitly export all symbols. 57891016ad83Smrg # This should be the same for all languages, so no per-tag cache variable. 57901016ad83Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 57911016ad83Smrg [lt_cv_irix_exported_symbol], 57927204935cSmrg [save_LDFLAGS=$LDFLAGS 57937204935cSmrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 57941016ad83Smrg AC_LINK_IFELSE( 57951016ad83Smrg [AC_LANG_SOURCE( 57961016ad83Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 57971016ad83Smrg [C++], [[int foo (void) { return 0; }]], 57981016ad83Smrg [Fortran 77], [[ 57991016ad83Smrg subroutine foo 58001016ad83Smrg end]], 58011016ad83Smrg [Fortran], [[ 58021016ad83Smrg subroutine foo 58031016ad83Smrg end]])])], 58041016ad83Smrg [lt_cv_irix_exported_symbol=yes], 58051016ad83Smrg [lt_cv_irix_exported_symbol=no]) 58067204935cSmrg LDFLAGS=$save_LDFLAGS]) 58077204935cSmrg if test yes = "$lt_cv_irix_exported_symbol"; then 58087204935cSmrg _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' 58091016ad83Smrg fi 58101016ad83Smrg else 58117204935cSmrg _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' 58127204935cSmrg _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' 58131016ad83Smrg fi 58141016ad83Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 58157204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 58161016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58171016ad83Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 58181016ad83Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 58191016ad83Smrg ;; 58201016ad83Smrg 58217204935cSmrg linux*) 58227204935cSmrg case $cc_basename in 58237204935cSmrg tcc*) 58247204935cSmrg # Fabrice Bellard et al's Tiny C Compiler 58257204935cSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 58267204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 58277204935cSmrg ;; 58287204935cSmrg esac 58297204935cSmrg ;; 58307204935cSmrg 5831aa30ed02Smrg netbsd*) 58321016ad83Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 58331016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 58341016ad83Smrg else 58351016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 58361016ad83Smrg fi 58371016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 58381016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 58391016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58401016ad83Smrg ;; 58411016ad83Smrg 58421016ad83Smrg newsos6) 58431016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 58441016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 58457204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 58461016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58471016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58481016ad83Smrg ;; 58491016ad83Smrg 58501016ad83Smrg *nto* | *qnx*) 58511016ad83Smrg ;; 58521016ad83Smrg 58537204935cSmrg openbsd* | bitrig*) 58541016ad83Smrg if test -f /usr/libexec/ld.so; then 58551016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 58561016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58571016ad83Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 58587204935cSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 58591016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 58607204935cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 58617204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 58627204935cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 58631016ad83Smrg else 58647204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 58657204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 58661016ad83Smrg fi 58671016ad83Smrg else 58681016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 58691016ad83Smrg fi 58701016ad83Smrg ;; 58711016ad83Smrg 58721016ad83Smrg os2*) 58731016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 58741016ad83Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 58751016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 58767204935cSmrg shrext_cmds=.dll 58777204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 58787204935cSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 58797204935cSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 58807204935cSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 58817204935cSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 58827204935cSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 58837204935cSmrg emximp -o $lib $output_objdir/$libname.def' 58847204935cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 58857204935cSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 58867204935cSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 58877204935cSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 58887204935cSmrg prefix_cmds="$SED"~ 58897204935cSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 58907204935cSmrg prefix_cmds="$prefix_cmds -e 1d"; 58917204935cSmrg fi~ 58927204935cSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 58937204935cSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 58947204935cSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 58957204935cSmrg emximp -o $lib $output_objdir/$libname.def' 58967204935cSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 58977204935cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5898b9526c6aSmrg _LT_TAGVAR(file_list_spec, $1)='@' 58991016ad83Smrg ;; 59001016ad83Smrg 59011016ad83Smrg osf3*) 59027204935cSmrg if test yes = "$GCC"; then 59037204935cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 59047204935cSmrg _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' 59051016ad83Smrg else 59061016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 59077204935cSmrg _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' 59081016ad83Smrg fi 59091016ad83Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 59107204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 59111016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 59121016ad83Smrg ;; 59131016ad83Smrg 59141016ad83Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 59157204935cSmrg if test yes = "$GCC"; then 59167204935cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 59177204935cSmrg _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' 59187204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 59191016ad83Smrg else 59201016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 59217204935cSmrg _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' 59221016ad83Smrg _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~ 59237204935cSmrg $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' 59241016ad83Smrg 59251016ad83Smrg # Both c and cxx compiler support -rpath directly 59261016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 59271016ad83Smrg fi 59281016ad83Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 59291016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 59301016ad83Smrg ;; 59311016ad83Smrg 59321016ad83Smrg solaris*) 59331016ad83Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 59347204935cSmrg if test yes = "$GCC"; then 59357204935cSmrg wlarc='$wl' 59367204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 59371016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 59387204935cSmrg $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' 59391016ad83Smrg else 59401016ad83Smrg case `$CC -V 2>&1` in 59411016ad83Smrg *"Compilers 5.0"*) 59421016ad83Smrg wlarc='' 59437204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 59441016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 59457204935cSmrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 59461016ad83Smrg ;; 59471016ad83Smrg *) 59487204935cSmrg wlarc='$wl' 59497204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 59501016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 59517204935cSmrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 59521016ad83Smrg ;; 59531016ad83Smrg esac 59541016ad83Smrg fi 59551016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 59561016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59571016ad83Smrg case $host_os in 59581016ad83Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 59591016ad83Smrg *) 59601016ad83Smrg # The compiler driver will combine and reorder linker options, 59617204935cSmrg # but understands '-z linker_flag'. GCC discards it without '$wl', 59621016ad83Smrg # but is careful enough not to reorder. 59631016ad83Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 59647204935cSmrg if test yes = "$GCC"; then 59657204935cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 59661016ad83Smrg else 59671016ad83Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 59681016ad83Smrg fi 59691016ad83Smrg ;; 59701016ad83Smrg esac 59711016ad83Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 59721016ad83Smrg ;; 59731016ad83Smrg 59741016ad83Smrg sunos4*) 59757204935cSmrg if test sequent = "$host_vendor"; then 59761016ad83Smrg # Use $CC to link under sequent, because it throws in some extra .o 59771016ad83Smrg # files that make .init and .fini sections work. 59787204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 59791016ad83Smrg else 59801016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 59811016ad83Smrg fi 59821016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 59831016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 59841016ad83Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 59851016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59861016ad83Smrg ;; 59871016ad83Smrg 59881016ad83Smrg sysv4) 59891016ad83Smrg case $host_vendor in 59901016ad83Smrg sni) 59911016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 59921016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 59931016ad83Smrg ;; 59941016ad83Smrg siemens) 59951016ad83Smrg ## LD is ld it makes a PLAMLIB 59961016ad83Smrg ## CC just makes a GrossModule. 59971016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 59981016ad83Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 59991016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=no 60001016ad83Smrg ;; 60011016ad83Smrg motorola) 60021016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60031016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 60041016ad83Smrg ;; 60051016ad83Smrg esac 60061016ad83Smrg runpath_var='LD_RUN_PATH' 60071016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60081016ad83Smrg ;; 60091016ad83Smrg 60101016ad83Smrg sysv4.3*) 60111016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60121016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60131016ad83Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 60141016ad83Smrg ;; 60151016ad83Smrg 60161016ad83Smrg sysv4*MP*) 60171016ad83Smrg if test -d /usr/nec; then 60181016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60191016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60201016ad83Smrg runpath_var=LD_RUN_PATH 60211016ad83Smrg hardcode_runpath_var=yes 60221016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 60231016ad83Smrg fi 60241016ad83Smrg ;; 60251016ad83Smrg 60261016ad83Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 60277204935cSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 60281016ad83Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 60291016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60301016ad83Smrg runpath_var='LD_RUN_PATH' 60311016ad83Smrg 60327204935cSmrg if test yes = "$GCC"; then 60337204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60347204935cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60351016ad83Smrg else 60367204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60377204935cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60381016ad83Smrg fi 60391016ad83Smrg ;; 60401016ad83Smrg 60411016ad83Smrg sysv5* | sco3.2v5* | sco5v6*) 60427204935cSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 60431016ad83Smrg # link with -lc, and that would cause any symbols used from libc to 60441016ad83Smrg # always be unresolved, which means just about no library would 60451016ad83Smrg # ever link correctly. If we're not using GNU ld we use -z text 60461016ad83Smrg # though, which does catch some bad symbols but isn't as heavy-handed 60471016ad83Smrg # as -z defs. 60487204935cSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 60497204935cSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 60501016ad83Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 60511016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60527204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 60531016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 60541016ad83Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 60557204935cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 60561016ad83Smrg runpath_var='LD_RUN_PATH' 60571016ad83Smrg 60587204935cSmrg if test yes = "$GCC"; then 60597204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60607204935cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60611016ad83Smrg else 60627204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60637204935cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60641016ad83Smrg fi 60651016ad83Smrg ;; 60661016ad83Smrg 60671016ad83Smrg uts4*) 60681016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60691016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 60701016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60711016ad83Smrg ;; 60721016ad83Smrg 60731016ad83Smrg *) 60741016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60751016ad83Smrg ;; 60761016ad83Smrg esac 60771016ad83Smrg 60787204935cSmrg if test sni = "$host_vendor"; then 60791016ad83Smrg case $host in 60801016ad83Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 60817204935cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 60821016ad83Smrg ;; 60831016ad83Smrg esac 60841016ad83Smrg fi 60851016ad83Smrg fi 60861016ad83Smrg]) 60871016ad83SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 60887204935cSmrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 60891016ad83Smrg 60901016ad83Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 60911016ad83Smrg 60921016ad83Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 60931016ad83Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 60941016ad83Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 60951016ad83Smrg [The commands to extract the exported symbol list from a shared archive]) 60961016ad83Smrg 60971016ad83Smrg# 60981016ad83Smrg# Do we need to explicitly link libc? 60991016ad83Smrg# 61001016ad83Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 61011016ad83Smrgx|xyes) 61021016ad83Smrg # Assume -lc should be added 61031016ad83Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 61041016ad83Smrg 61057204935cSmrg if test yes,yes = "$GCC,$enable_shared"; then 61061016ad83Smrg case $_LT_TAGVAR(archive_cmds, $1) in 61071016ad83Smrg *'~'*) 61081016ad83Smrg # FIXME: we may have to deal with multi-command sequences. 61091016ad83Smrg ;; 61101016ad83Smrg '$CC '*) 61111016ad83Smrg # Test whether the compiler implicitly links with -lc since on some 61121016ad83Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 61131016ad83Smrg # to ld, don't add -lc before -lgcc. 61141016ad83Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 61151016ad83Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 61161016ad83Smrg [$RM conftest* 61171016ad83Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 61181016ad83Smrg 61191016ad83Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 61201016ad83Smrg soname=conftest 61211016ad83Smrg lib=conftest 61221016ad83Smrg libobjs=conftest.$ac_objext 61231016ad83Smrg deplibs= 61241016ad83Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 61251016ad83Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 61261016ad83Smrg compiler_flags=-v 61271016ad83Smrg linker_flags=-v 61281016ad83Smrg verstring= 61291016ad83Smrg output_objdir=. 61301016ad83Smrg libname=conftest 61311016ad83Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 61321016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 61331016ad83Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 61341016ad83Smrg then 61351016ad83Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 61361016ad83Smrg else 61371016ad83Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 61381016ad83Smrg fi 61391016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 61401016ad83Smrg else 61411016ad83Smrg cat conftest.err 1>&5 61421016ad83Smrg fi 61431016ad83Smrg $RM conftest* 61441016ad83Smrg ]) 61451016ad83Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 61461016ad83Smrg ;; 61471016ad83Smrg esac 61481016ad83Smrg fi 61491016ad83Smrg ;; 61501016ad83Smrgesac 61511016ad83Smrg 61521016ad83Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 61531016ad83Smrg [Whether or not to add -lc for building shared libraries]) 61541016ad83Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 61551016ad83Smrg [enable_shared_with_static_runtimes], [0], 61561016ad83Smrg [Whether or not to disallow shared libs when runtime libs are static]) 61571016ad83Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 61581016ad83Smrg [Compiler flag to allow reflexive dlopens]) 61591016ad83Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 61601016ad83Smrg [Compiler flag to generate shared objects directly from archives]) 61611016ad83Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 61621016ad83Smrg [Whether the compiler copes with passing no objects directly]) 61631016ad83Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 61641016ad83Smrg [Create an old-style archive from a shared archive]) 61651016ad83Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 61661016ad83Smrg [Create a temporary old-style archive to link instead of a shared archive]) 61671016ad83Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 61681016ad83Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 61691016ad83Smrg_LT_TAGDECL([], [module_cmds], [2], 61701016ad83Smrg [Commands used to build a loadable module if different from building 61711016ad83Smrg a shared archive.]) 61721016ad83Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 61731016ad83Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 61741016ad83Smrg [Whether we are building with GNU ld or not]) 61751016ad83Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 61761016ad83Smrg [Flag that allows shared libraries with undefined symbols to be built]) 61771016ad83Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 61781016ad83Smrg [Flag that enforces no undefined symbols]) 61791016ad83Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 61801016ad83Smrg [Flag to hardcode $libdir into a binary during linking. 61811016ad83Smrg This must work even if $libdir does not exist]) 61821016ad83Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 61831016ad83Smrg [Whether we need a single "-rpath" flag with a separated argument]) 61841016ad83Smrg_LT_TAGDECL([], [hardcode_direct], [0], 61857204935cSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 61861016ad83Smrg DIR into the resulting binary]) 61871016ad83Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 61887204935cSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 61891016ad83Smrg DIR into the resulting binary and the resulting library dependency is 61907204935cSmrg "absolute", i.e impossible to change by setting $shlibpath_var if the 61911016ad83Smrg library is relocated]) 61921016ad83Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 61931016ad83Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 61941016ad83Smrg into the resulting binary]) 61951016ad83Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 61961016ad83Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 61971016ad83Smrg into the resulting binary]) 61981016ad83Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 61991016ad83Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 62001016ad83Smrg into the library and all subsequent libraries and executables linked 62011016ad83Smrg against it]) 62021016ad83Smrg_LT_TAGDECL([], [inherit_rpath], [0], 62031016ad83Smrg [Set to yes if linker adds runtime paths of dependent libraries 62041016ad83Smrg to runtime path list]) 62051016ad83Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 62061016ad83Smrg [Whether libtool must link a program against all its dependency libraries]) 62071016ad83Smrg_LT_TAGDECL([], [always_export_symbols], [0], 62081016ad83Smrg [Set to "yes" if exported symbols are required]) 62091016ad83Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 62101016ad83Smrg [The commands to list exported symbols]) 62111016ad83Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 62121016ad83Smrg [Symbols that should not be listed in the preloaded symbols]) 62131016ad83Smrg_LT_TAGDECL([], [include_expsyms], [1], 62141016ad83Smrg [Symbols that must always be exported]) 62151016ad83Smrg_LT_TAGDECL([], [prelink_cmds], [2], 62161016ad83Smrg [Commands necessary for linking programs (against libraries) with templates]) 62171016ad83Smrg_LT_TAGDECL([], [postlink_cmds], [2], 62181016ad83Smrg [Commands necessary for finishing linking programs]) 62191016ad83Smrg_LT_TAGDECL([], [file_list_spec], [1], 62201016ad83Smrg [Specify filename containing input files]) 62211016ad83Smrgdnl FIXME: Not yet implemented 62221016ad83Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 62231016ad83Smrgdnl [Compiler flag to generate thread safe objects]) 62241016ad83Smrg])# _LT_LINKER_SHLIBS 62251016ad83Smrg 62261016ad83Smrg 62271016ad83Smrg# _LT_LANG_C_CONFIG([TAG]) 62281016ad83Smrg# ------------------------ 62291016ad83Smrg# Ensure that the configuration variables for a C compiler are suitably 62301016ad83Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 62317204935cSmrg# the compiler configuration to 'libtool'. 62321016ad83Smrgm4_defun([_LT_LANG_C_CONFIG], 62331016ad83Smrg[m4_require([_LT_DECL_EGREP])dnl 62347204935cSmrglt_save_CC=$CC 62351016ad83SmrgAC_LANG_PUSH(C) 62361016ad83Smrg 62371016ad83Smrg# Source file extension for C test sources. 62381016ad83Smrgac_ext=c 62391016ad83Smrg 62401016ad83Smrg# Object file extension for compiled C test sources. 62411016ad83Smrgobjext=o 62421016ad83Smrg_LT_TAGVAR(objext, $1)=$objext 62431016ad83Smrg 62441016ad83Smrg# Code to be used in simple compile tests 62451016ad83Smrglt_simple_compile_test_code="int some_variable = 0;" 62461016ad83Smrg 62471016ad83Smrg# Code to be used in simple link tests 62481016ad83Smrglt_simple_link_test_code='int main(){return(0);}' 62491016ad83Smrg 62501016ad83Smrg_LT_TAG_COMPILER 62511016ad83Smrg# Save the default compiler, since it gets overwritten when the other 62521016ad83Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 62531016ad83Smrgcompiler_DEFAULT=$CC 62541016ad83Smrg 62551016ad83Smrg# save warnings/boilerplate of simple test code 62561016ad83Smrg_LT_COMPILER_BOILERPLATE 62571016ad83Smrg_LT_LINKER_BOILERPLATE 62581016ad83Smrg 62591016ad83Smrg## CAVEAT EMPTOR: 62601016ad83Smrg## There is no encapsulation within the following macros, do not change 62611016ad83Smrg## the running order or otherwise move them around unless you know exactly 62621016ad83Smrg## what you are doing... 62631016ad83Smrgif test -n "$compiler"; then 62641016ad83Smrg _LT_COMPILER_NO_RTTI($1) 62651016ad83Smrg _LT_COMPILER_PIC($1) 62661016ad83Smrg _LT_COMPILER_C_O($1) 62671016ad83Smrg _LT_COMPILER_FILE_LOCKS($1) 62681016ad83Smrg _LT_LINKER_SHLIBS($1) 62691016ad83Smrg _LT_SYS_DYNAMIC_LINKER($1) 62701016ad83Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 62711016ad83Smrg LT_SYS_DLOPEN_SELF 62721016ad83Smrg _LT_CMD_STRIPLIB 62731016ad83Smrg 62747204935cSmrg # Report what library types will actually be built 62751016ad83Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 62761016ad83Smrg AC_MSG_RESULT([$can_build_shared]) 62771016ad83Smrg 62781016ad83Smrg AC_MSG_CHECKING([whether to build shared libraries]) 62797204935cSmrg test no = "$can_build_shared" && enable_shared=no 62801016ad83Smrg 62811016ad83Smrg # On AIX, shared libraries and static libraries use the same namespace, and 62821016ad83Smrg # are all built from PIC. 62831016ad83Smrg case $host_os in 62841016ad83Smrg aix3*) 62857204935cSmrg test yes = "$enable_shared" && enable_static=no 62861016ad83Smrg if test -n "$RANLIB"; then 62871016ad83Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 62881016ad83Smrg postinstall_cmds='$RANLIB $lib' 62891016ad83Smrg fi 62901016ad83Smrg ;; 62911016ad83Smrg 62921016ad83Smrg aix[[4-9]]*) 62937204935cSmrg if test ia64 != "$host_cpu"; then 62947204935cSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 62957204935cSmrg yes,aix,yes) ;; # shared object as lib.so file only 62967204935cSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 62977204935cSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 62987204935cSmrg esac 62991016ad83Smrg fi 63001016ad83Smrg ;; 63011016ad83Smrg esac 63021016ad83Smrg AC_MSG_RESULT([$enable_shared]) 63031016ad83Smrg 63041016ad83Smrg AC_MSG_CHECKING([whether to build static libraries]) 63051016ad83Smrg # Make sure either enable_shared or enable_static is yes. 63067204935cSmrg test yes = "$enable_shared" || enable_static=yes 63071016ad83Smrg AC_MSG_RESULT([$enable_static]) 63081016ad83Smrg 63091016ad83Smrg _LT_CONFIG($1) 63101016ad83Smrgfi 63111016ad83SmrgAC_LANG_POP 63127204935cSmrgCC=$lt_save_CC 63131016ad83Smrg])# _LT_LANG_C_CONFIG 63141016ad83Smrg 63151016ad83Smrg 63161016ad83Smrg# _LT_LANG_CXX_CONFIG([TAG]) 63171016ad83Smrg# -------------------------- 63181016ad83Smrg# Ensure that the configuration variables for a C++ compiler are suitably 63191016ad83Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 63207204935cSmrg# the compiler configuration to 'libtool'. 63211016ad83Smrgm4_defun([_LT_LANG_CXX_CONFIG], 63221016ad83Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 63231016ad83Smrgm4_require([_LT_DECL_EGREP])dnl 63241016ad83Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 63257204935cSmrgif test -n "$CXX" && ( test no != "$CXX" && 63267204935cSmrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 63277204935cSmrg (test g++ != "$CXX"))); then 63281016ad83Smrg AC_PROG_CXXCPP 63291016ad83Smrgelse 63301016ad83Smrg _lt_caught_CXX_error=yes 63311016ad83Smrgfi 63321016ad83Smrg 63331016ad83SmrgAC_LANG_PUSH(C++) 63341016ad83Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 63351016ad83Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 63361016ad83Smrg_LT_TAGVAR(always_export_symbols, $1)=no 63371016ad83Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 63381016ad83Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 63391016ad83Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 63401016ad83Smrg_LT_TAGVAR(hardcode_direct, $1)=no 63411016ad83Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 63421016ad83Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 63431016ad83Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 63441016ad83Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 63451016ad83Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 63461016ad83Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 63471016ad83Smrg_LT_TAGVAR(inherit_rpath, $1)=no 63481016ad83Smrg_LT_TAGVAR(module_cmds, $1)= 63491016ad83Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 63501016ad83Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 63511016ad83Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 63521016ad83Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 63531016ad83Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 63541016ad83Smrg_LT_TAGVAR(no_undefined_flag, $1)= 63551016ad83Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 63561016ad83Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 63571016ad83Smrg 63581016ad83Smrg# Source file extension for C++ test sources. 63591016ad83Smrgac_ext=cpp 63601016ad83Smrg 63611016ad83Smrg# Object file extension for compiled C++ test sources. 63621016ad83Smrgobjext=o 63631016ad83Smrg_LT_TAGVAR(objext, $1)=$objext 63641016ad83Smrg 63651016ad83Smrg# No sense in running all these tests if we already determined that 63661016ad83Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 63671016ad83Smrg# are currently assumed to apply to all compilers on this platform, 63681016ad83Smrg# and will be corrupted by setting them based on a non-working compiler. 63697204935cSmrgif test yes != "$_lt_caught_CXX_error"; then 63701016ad83Smrg # Code to be used in simple compile tests 63711016ad83Smrg lt_simple_compile_test_code="int some_variable = 0;" 63721016ad83Smrg 63731016ad83Smrg # Code to be used in simple link tests 63741016ad83Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 63751016ad83Smrg 63761016ad83Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 63771016ad83Smrg _LT_TAG_COMPILER 63781016ad83Smrg 63791016ad83Smrg # save warnings/boilerplate of simple test code 63801016ad83Smrg _LT_COMPILER_BOILERPLATE 63811016ad83Smrg _LT_LINKER_BOILERPLATE 63821016ad83Smrg 63831016ad83Smrg # Allow CC to be a program name with arguments. 63841016ad83Smrg lt_save_CC=$CC 63851016ad83Smrg lt_save_CFLAGS=$CFLAGS 63861016ad83Smrg lt_save_LD=$LD 63871016ad83Smrg lt_save_GCC=$GCC 63881016ad83Smrg GCC=$GXX 63891016ad83Smrg lt_save_with_gnu_ld=$with_gnu_ld 63901016ad83Smrg lt_save_path_LD=$lt_cv_path_LD 63911016ad83Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 63921016ad83Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 63931016ad83Smrg else 63941016ad83Smrg $as_unset lt_cv_prog_gnu_ld 63951016ad83Smrg fi 63961016ad83Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 63971016ad83Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 63981016ad83Smrg else 63991016ad83Smrg $as_unset lt_cv_path_LD 64001016ad83Smrg fi 64011016ad83Smrg test -z "${LDCXX+set}" || LD=$LDCXX 64021016ad83Smrg CC=${CXX-"c++"} 64031016ad83Smrg CFLAGS=$CXXFLAGS 64041016ad83Smrg compiler=$CC 64051016ad83Smrg _LT_TAGVAR(compiler, $1)=$CC 64061016ad83Smrg _LT_CC_BASENAME([$compiler]) 64071016ad83Smrg 64081016ad83Smrg if test -n "$compiler"; then 64091016ad83Smrg # We don't want -fno-exception when compiling C++ code, so set the 64101016ad83Smrg # no_builtin_flag separately 64117204935cSmrg if test yes = "$GXX"; then 64121016ad83Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 64131016ad83Smrg else 64141016ad83Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 64151016ad83Smrg fi 64161016ad83Smrg 64177204935cSmrg if test yes = "$GXX"; then 64181016ad83Smrg # Set up default GNU C++ configuration 64191016ad83Smrg 64201016ad83Smrg LT_PATH_LD 64211016ad83Smrg 64221016ad83Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 64231016ad83Smrg # archiving commands below assume that GNU ld is being used. 64247204935cSmrg if test yes = "$with_gnu_ld"; then 64257204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 64267204935cSmrg _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' 64271016ad83Smrg 64287204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 64297204935cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 64301016ad83Smrg 64311016ad83Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 64321016ad83Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 64331016ad83Smrg # investigate it a little bit more. (MM) 64347204935cSmrg wlarc='$wl' 64351016ad83Smrg 64361016ad83Smrg # ancient GNU ld didn't support --whole-archive et. al. 64371016ad83Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 64381016ad83Smrg $GREP 'no-whole-archive' > /dev/null; then 64397204935cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 64401016ad83Smrg else 64411016ad83Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 64421016ad83Smrg fi 64431016ad83Smrg else 64441016ad83Smrg with_gnu_ld=no 64451016ad83Smrg wlarc= 64461016ad83Smrg 64471016ad83Smrg # A generic and very simple default shared library creation 64481016ad83Smrg # command for GNU C++ for the case where it uses the native 64491016ad83Smrg # linker, instead of GNU ld. If possible, this setting should 64501016ad83Smrg # overridden to take advantage of the native linker features on 64511016ad83Smrg # the platform it is being used on. 64521016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 64531016ad83Smrg fi 64541016ad83Smrg 64551016ad83Smrg # Commands to make compiler produce verbose output that lists 64561016ad83Smrg # what "hidden" libraries, object files and flags are used when 64571016ad83Smrg # linking a shared library. 6458aa30ed02Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 64591016ad83Smrg 64601016ad83Smrg else 64611016ad83Smrg GXX=no 64621016ad83Smrg with_gnu_ld=no 64631016ad83Smrg wlarc= 64641016ad83Smrg fi 64651016ad83Smrg 64661016ad83Smrg # PORTME: fill in a description of your system's C++ link characteristics 64671016ad83Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 64681016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 64691016ad83Smrg case $host_os in 64701016ad83Smrg aix3*) 64711016ad83Smrg # FIXME: insert proper C++ library support 64721016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 64731016ad83Smrg ;; 64741016ad83Smrg aix[[4-9]]*) 64757204935cSmrg if test ia64 = "$host_cpu"; then 64761016ad83Smrg # On IA64, the linker does run time linking by default, so we don't 64771016ad83Smrg # have to do anything special. 64781016ad83Smrg aix_use_runtimelinking=no 64791016ad83Smrg exp_sym_flag='-Bexport' 64807204935cSmrg no_entry_flag= 64811016ad83Smrg else 64821016ad83Smrg aix_use_runtimelinking=no 64831016ad83Smrg 64841016ad83Smrg # Test if we are trying to use run time linking or normal 64851016ad83Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 64867204935cSmrg # have runtime linking enabled, and use it for executables. 64877204935cSmrg # For shared libraries, we enable/disable runtime linking 64887204935cSmrg # depending on the kind of the shared library created - 64897204935cSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 64907204935cSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 64917204935cSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 64927204935cSmrg # lib.a static archive 64937204935cSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 64947204935cSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 64957204935cSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 64967204935cSmrg # lib.a(lib.so.V) shared, rtl:no 64977204935cSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 64987204935cSmrg # lib.a static archive 64991016ad83Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 65001016ad83Smrg for ld_flag in $LDFLAGS; do 65011016ad83Smrg case $ld_flag in 65021016ad83Smrg *-brtl*) 65031016ad83Smrg aix_use_runtimelinking=yes 65041016ad83Smrg break 65051016ad83Smrg ;; 65061016ad83Smrg esac 65071016ad83Smrg done 65087204935cSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 65097204935cSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 65107204935cSmrg # so we don't have lib.a shared libs to link our executables. 65117204935cSmrg # We have to force runtime linking in this case. 65127204935cSmrg aix_use_runtimelinking=yes 65137204935cSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 65147204935cSmrg fi 65151016ad83Smrg ;; 65161016ad83Smrg esac 65171016ad83Smrg 65181016ad83Smrg exp_sym_flag='-bexport' 65191016ad83Smrg no_entry_flag='-bnoentry' 65201016ad83Smrg fi 65211016ad83Smrg 65221016ad83Smrg # When large executables or shared objects are built, AIX ld can 65231016ad83Smrg # have problems creating the table of contents. If linking a library 65241016ad83Smrg # or program results in "error TOC overflow" add -mminimal-toc to 65251016ad83Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 65261016ad83Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 65271016ad83Smrg 65281016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='' 65291016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 65301016ad83Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 65311016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 65321016ad83Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 65337204935cSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 65347204935cSmrg case $with_aix_soname,$aix_use_runtimelinking in 65357204935cSmrg aix,*) ;; # no import file 65367204935cSmrg svr4,* | *,yes) # use import file 65377204935cSmrg # The Import File defines what to hardcode. 65387204935cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 65397204935cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 65407204935cSmrg ;; 65417204935cSmrg esac 65421016ad83Smrg 65437204935cSmrg if test yes = "$GXX"; then 65441016ad83Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 65451016ad83Smrg # We only want to do this on AIX 4.2 and lower, the check 65461016ad83Smrg # below for broken collect2 doesn't work under 4.3+ 65477204935cSmrg collect2name=`$CC -print-prog-name=collect2` 65481016ad83Smrg if test -f "$collect2name" && 65491016ad83Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 65501016ad83Smrg then 65511016ad83Smrg # We have reworked collect2 65521016ad83Smrg : 65531016ad83Smrg else 65541016ad83Smrg # We have old collect2 65551016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 65561016ad83Smrg # It fails to find uninstalled libraries when the uninstalled 65571016ad83Smrg # path is not listed in the libpath. Setting hardcode_minus_L 65581016ad83Smrg # to unsupported forces relinking 65591016ad83Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 65601016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 65611016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 65621016ad83Smrg fi 65631016ad83Smrg esac 65641016ad83Smrg shared_flag='-shared' 65657204935cSmrg if test yes = "$aix_use_runtimelinking"; then 65667204935cSmrg shared_flag=$shared_flag' $wl-G' 65671016ad83Smrg fi 65687204935cSmrg # Need to ensure runtime linking is disabled for the traditional 65697204935cSmrg # shared library, or the linker may eventually find shared libraries 65707204935cSmrg # /with/ Import File - we do not want to mix them. 65717204935cSmrg shared_flag_aix='-shared' 65727204935cSmrg shared_flag_svr4='-shared $wl-G' 65731016ad83Smrg else 65741016ad83Smrg # not using gcc 65757204935cSmrg if test ia64 = "$host_cpu"; then 65761016ad83Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 65771016ad83Smrg # chokes on -Wl,-G. The following line is correct: 65781016ad83Smrg shared_flag='-G' 65791016ad83Smrg else 65807204935cSmrg if test yes = "$aix_use_runtimelinking"; then 65817204935cSmrg shared_flag='$wl-G' 65821016ad83Smrg else 65837204935cSmrg shared_flag='$wl-bM:SRE' 65841016ad83Smrg fi 65857204935cSmrg shared_flag_aix='$wl-bM:SRE' 65867204935cSmrg shared_flag_svr4='$wl-G' 65871016ad83Smrg fi 65881016ad83Smrg fi 65891016ad83Smrg 65907204935cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 65911016ad83Smrg # It seems that -bexpall does not export symbols beginning with 65921016ad83Smrg # underscore (_), so it is better to generate a list of symbols to 65931016ad83Smrg # export. 65941016ad83Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 65957204935cSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 65961016ad83Smrg # Warning - without using the other runtime loading flags (-brtl), 65971016ad83Smrg # -berok will link without error, but may produce a broken library. 65987204935cSmrg # The "-G" linker flag allows undefined symbols. 65997204935cSmrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 66001016ad83Smrg # Determine the default libpath from the value encoded in an empty 66011016ad83Smrg # executable. 66021016ad83Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 66037204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 66041016ad83Smrg 66057204935cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag 66061016ad83Smrg else 66077204935cSmrg if test ia64 = "$host_cpu"; then 66087204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 66091016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 66107204935cSmrg _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" 66111016ad83Smrg else 66121016ad83Smrg # Determine the default libpath from the value encoded in an 66131016ad83Smrg # empty executable. 66141016ad83Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 66157204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 66161016ad83Smrg # Warning - without using the other run time loading flags, 66171016ad83Smrg # -berok will link without error, but may produce a broken library. 66187204935cSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 66197204935cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 66207204935cSmrg if test yes = "$with_gnu_ld"; then 66211016ad83Smrg # We only use this code for GNU lds that support --whole-archive. 66227204935cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 66231016ad83Smrg else 66241016ad83Smrg # Exported symbols can be pulled into shared objects from archives 66251016ad83Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 66261016ad83Smrg fi 66271016ad83Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 66287204935cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 66297204935cSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 66307204935cSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 66317204935cSmrg if test svr4 != "$with_aix_soname"; then 66327204935cSmrg # This is similar to how AIX traditionally builds its shared 66337204935cSmrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 66347204935cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' 66357204935cSmrg fi 66367204935cSmrg if test aix != "$with_aix_soname"; then 66377204935cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' 66387204935cSmrg else 66397204935cSmrg # used by -dlpreopen to get the symbols 66407204935cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 66417204935cSmrg fi 66427204935cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 66431016ad83Smrg fi 66441016ad83Smrg fi 66451016ad83Smrg ;; 66461016ad83Smrg 66471016ad83Smrg beos*) 66481016ad83Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 66491016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 66501016ad83Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 66511016ad83Smrg # support --undefined. This deserves some investigation. FIXME 66527204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 66531016ad83Smrg else 66541016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66551016ad83Smrg fi 66561016ad83Smrg ;; 66571016ad83Smrg 66581016ad83Smrg chorus*) 66591016ad83Smrg case $cc_basename in 66601016ad83Smrg *) 66611016ad83Smrg # FIXME: insert proper C++ library support 66621016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66631016ad83Smrg ;; 66641016ad83Smrg esac 66651016ad83Smrg ;; 66661016ad83Smrg 66671016ad83Smrg cygwin* | mingw* | pw32* | cegcc*) 66681016ad83Smrg case $GXX,$cc_basename in 6669b9526c6aSmrg ,cl* | no,cl* | ,icl* | no,icl*) 6670b9526c6aSmrg # Native MSVC or ICC 66711016ad83Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 66721016ad83Smrg # no search path for DLLs. 66731016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 66741016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 66751016ad83Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 66761016ad83Smrg _LT_TAGVAR(file_list_spec, $1)='@' 66771016ad83Smrg # Tell ltmain to make .lib files, not .a files. 66781016ad83Smrg libext=lib 66791016ad83Smrg # Tell ltmain to make .dll files, not .so files. 66807204935cSmrg shrext_cmds=.dll 66811016ad83Smrg # FIXME: Setting linknames here is a bad hack. 66827204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 66837204935cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 66847204935cSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 66857204935cSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 66867204935cSmrg else 66877204935cSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 66887204935cSmrg fi~ 66897204935cSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 66907204935cSmrg linknames=' 66911016ad83Smrg # The linker will not automatically build a static lib if we build a DLL. 66921016ad83Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 66931016ad83Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 66941016ad83Smrg # Don't use ranlib 66951016ad83Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 66961016ad83Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 66977204935cSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 66987204935cSmrg case $lt_outputfile in 66997204935cSmrg *.exe|*.EXE) ;; 67007204935cSmrg *) 67017204935cSmrg lt_outputfile=$lt_outputfile.exe 67027204935cSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 67037204935cSmrg ;; 67047204935cSmrg esac~ 67057204935cSmrg func_to_tool_file "$lt_outputfile"~ 67067204935cSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 67077204935cSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 67087204935cSmrg $RM "$lt_outputfile.manifest"; 67097204935cSmrg fi' 67101016ad83Smrg ;; 67111016ad83Smrg *) 67121016ad83Smrg # g++ 67131016ad83Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 67141016ad83Smrg # as there is no search path for DLLs. 67151016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 67167204935cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 67171016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 67181016ad83Smrg _LT_TAGVAR(always_export_symbols, $1)=no 67191016ad83Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 67201016ad83Smrg 67211016ad83Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 67227204935cSmrg _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' 67237204935cSmrg # If the export-symbols file already is a .def file, use it as 67247204935cSmrg # is; otherwise, prepend EXPORTS... 67257204935cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 67267204935cSmrg cp $export_symbols $output_objdir/$soname.def; 67277204935cSmrg else 67287204935cSmrg echo EXPORTS > $output_objdir/$soname.def; 67297204935cSmrg cat $export_symbols >> $output_objdir/$soname.def; 67307204935cSmrg fi~ 67317204935cSmrg $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' 67321016ad83Smrg else 67331016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67341016ad83Smrg fi 67351016ad83Smrg ;; 67361016ad83Smrg esac 67371016ad83Smrg ;; 67381016ad83Smrg darwin* | rhapsody*) 67391016ad83Smrg _LT_DARWIN_LINKER_FEATURES($1) 67401016ad83Smrg ;; 67411016ad83Smrg 67427204935cSmrg os2*) 67437204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 67447204935cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 67457204935cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 67467204935cSmrg shrext_cmds=.dll 67477204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 67487204935cSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 67497204935cSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 67507204935cSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 67517204935cSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 67527204935cSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 67537204935cSmrg emximp -o $lib $output_objdir/$libname.def' 67547204935cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 67557204935cSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 67567204935cSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 67577204935cSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 67587204935cSmrg prefix_cmds="$SED"~ 67597204935cSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 67607204935cSmrg prefix_cmds="$prefix_cmds -e 1d"; 67617204935cSmrg fi~ 67627204935cSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 67637204935cSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 67647204935cSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 67657204935cSmrg emximp -o $lib $output_objdir/$libname.def' 67667204935cSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 67677204935cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6768b9526c6aSmrg _LT_TAGVAR(file_list_spec, $1)='@' 67697204935cSmrg ;; 67707204935cSmrg 67711016ad83Smrg dgux*) 67721016ad83Smrg case $cc_basename in 67731016ad83Smrg ec++*) 67741016ad83Smrg # FIXME: insert proper C++ library support 67751016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67761016ad83Smrg ;; 67771016ad83Smrg ghcx*) 67781016ad83Smrg # Green Hills C++ Compiler 67791016ad83Smrg # FIXME: insert proper C++ library support 67801016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67811016ad83Smrg ;; 67821016ad83Smrg *) 67831016ad83Smrg # FIXME: insert proper C++ library support 67841016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67851016ad83Smrg ;; 67861016ad83Smrg esac 67871016ad83Smrg ;; 67881016ad83Smrg 67891016ad83Smrg freebsd2.*) 67901016ad83Smrg # C++ shared libraries reported to be fairly broken before 67911016ad83Smrg # switch to ELF 67921016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67931016ad83Smrg ;; 67941016ad83Smrg 67951016ad83Smrg freebsd-elf*) 67961016ad83Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 67971016ad83Smrg ;; 67981016ad83Smrg 6799b9526c6aSmrg freebsd* | dragonfly* | midnightbsd*) 68001016ad83Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 68011016ad83Smrg # conventions 68021016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 68031016ad83Smrg ;; 68041016ad83Smrg 68051016ad83Smrg haiku*) 68067204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 68071016ad83Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 68081016ad83Smrg ;; 68091016ad83Smrg 68101016ad83Smrg hpux9*) 68117204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 68121016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 68137204935cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 68141016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 68151016ad83Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 68161016ad83Smrg # but as the default 68171016ad83Smrg # location of the library. 68181016ad83Smrg 68191016ad83Smrg case $cc_basename in 68201016ad83Smrg CC*) 68211016ad83Smrg # FIXME: insert proper C++ library support 68221016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68231016ad83Smrg ;; 68241016ad83Smrg aCC*) 68257204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 68261016ad83Smrg # Commands to make compiler produce verbose output that lists 68271016ad83Smrg # what "hidden" libraries, object files and flags are used when 68281016ad83Smrg # linking a shared library. 68291016ad83Smrg # 68301016ad83Smrg # There doesn't appear to be a way to prevent this compiler from 68311016ad83Smrg # explicitly linking system object files so we need to strip them 68321016ad83Smrg # from the output so that they don't get included in the library 68331016ad83Smrg # dependencies. 6834aa30ed02Smrg 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"' 68351016ad83Smrg ;; 68361016ad83Smrg *) 68377204935cSmrg if test yes = "$GXX"; then 68387204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 68391016ad83Smrg else 68401016ad83Smrg # FIXME: insert proper C++ library support 68411016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68421016ad83Smrg fi 68431016ad83Smrg ;; 68441016ad83Smrg esac 68451016ad83Smrg ;; 68461016ad83Smrg 68471016ad83Smrg hpux10*|hpux11*) 68487204935cSmrg if test no = "$with_gnu_ld"; then 68497204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 68501016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 68511016ad83Smrg 68521016ad83Smrg case $host_cpu in 68531016ad83Smrg hppa*64*|ia64*) 68541016ad83Smrg ;; 68551016ad83Smrg *) 68567204935cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 68571016ad83Smrg ;; 68581016ad83Smrg esac 68591016ad83Smrg fi 68601016ad83Smrg case $host_cpu in 68611016ad83Smrg hppa*64*|ia64*) 68621016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=no 68631016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 68641016ad83Smrg ;; 68651016ad83Smrg *) 68661016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 68671016ad83Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 68681016ad83Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 68691016ad83Smrg # but as the default 68701016ad83Smrg # location of the library. 68711016ad83Smrg ;; 68721016ad83Smrg esac 68731016ad83Smrg 68741016ad83Smrg case $cc_basename in 68751016ad83Smrg CC*) 68761016ad83Smrg # FIXME: insert proper C++ library support 68771016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68781016ad83Smrg ;; 68791016ad83Smrg aCC*) 68801016ad83Smrg case $host_cpu in 68811016ad83Smrg hppa*64*) 68827204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 68831016ad83Smrg ;; 68841016ad83Smrg ia64*) 68857204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 68861016ad83Smrg ;; 68871016ad83Smrg *) 68887204935cSmrg _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' 68891016ad83Smrg ;; 68901016ad83Smrg esac 68911016ad83Smrg # Commands to make compiler produce verbose output that lists 68921016ad83Smrg # what "hidden" libraries, object files and flags are used when 68931016ad83Smrg # linking a shared library. 68941016ad83Smrg # 68951016ad83Smrg # There doesn't appear to be a way to prevent this compiler from 68961016ad83Smrg # explicitly linking system object files so we need to strip them 68971016ad83Smrg # from the output so that they don't get included in the library 68981016ad83Smrg # dependencies. 6899aa30ed02Smrg 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"' 69001016ad83Smrg ;; 69011016ad83Smrg *) 69027204935cSmrg if test yes = "$GXX"; then 69037204935cSmrg if test no = "$with_gnu_ld"; then 69041016ad83Smrg case $host_cpu in 69051016ad83Smrg hppa*64*) 69067204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 69071016ad83Smrg ;; 69081016ad83Smrg ia64*) 69097204935cSmrg _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' 69101016ad83Smrg ;; 69111016ad83Smrg *) 69127204935cSmrg _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' 69131016ad83Smrg ;; 69141016ad83Smrg esac 69151016ad83Smrg fi 69161016ad83Smrg else 69171016ad83Smrg # FIXME: insert proper C++ library support 69181016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 69191016ad83Smrg fi 69201016ad83Smrg ;; 69211016ad83Smrg esac 69221016ad83Smrg ;; 69231016ad83Smrg 69241016ad83Smrg interix[[3-9]]*) 69251016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=no 69261016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 69277204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 69287204935cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 69291016ad83Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 69301016ad83Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 69311016ad83Smrg # default) and relocated if they conflict, which is a slow very memory 69321016ad83Smrg # consuming and fragmenting process. To avoid this, we pick a random, 69331016ad83Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 69341016ad83Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 69357204935cSmrg _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' 6936b9526c6aSmrg _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' 69371016ad83Smrg ;; 69381016ad83Smrg irix5* | irix6*) 69391016ad83Smrg case $cc_basename in 69401016ad83Smrg CC*) 69411016ad83Smrg # SGI C++ 69427204935cSmrg _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' 69431016ad83Smrg 69441016ad83Smrg # Archives containing C++ object files must be created using 69451016ad83Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 69461016ad83Smrg # necessary to make sure instantiated templates are included 69471016ad83Smrg # in the archive. 69481016ad83Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 69491016ad83Smrg ;; 69501016ad83Smrg *) 69517204935cSmrg if test yes = "$GXX"; then 69527204935cSmrg if test no = "$with_gnu_ld"; then 69537204935cSmrg _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' 69541016ad83Smrg else 69557204935cSmrg _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' 69561016ad83Smrg fi 69571016ad83Smrg fi 69581016ad83Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 69591016ad83Smrg ;; 69601016ad83Smrg esac 69617204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 69621016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 69631016ad83Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 69641016ad83Smrg ;; 69651016ad83Smrg 69661016ad83Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 69671016ad83Smrg case $cc_basename in 69681016ad83Smrg KCC*) 69691016ad83Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 69701016ad83Smrg 69711016ad83Smrg # KCC will only create a shared library if the output file 69721016ad83Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 69731016ad83Smrg # to its proper name (with version) after linking. 69747204935cSmrg _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' 69757204935cSmrg _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' 69761016ad83Smrg # Commands to make compiler produce verbose output that lists 69771016ad83Smrg # what "hidden" libraries, object files and flags are used when 69781016ad83Smrg # linking a shared library. 69791016ad83Smrg # 69801016ad83Smrg # There doesn't appear to be a way to prevent this compiler from 69811016ad83Smrg # explicitly linking system object files so we need to strip them 69821016ad83Smrg # from the output so that they don't get included in the library 69831016ad83Smrg # dependencies. 69847204935cSmrg 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"' 69851016ad83Smrg 69867204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 69877204935cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 69881016ad83Smrg 69891016ad83Smrg # Archives containing C++ object files must be created using 69901016ad83Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 69911016ad83Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 69921016ad83Smrg ;; 69931016ad83Smrg icpc* | ecpc* ) 69941016ad83Smrg # Intel C++ 69951016ad83Smrg with_gnu_ld=yes 69961016ad83Smrg # version 8.0 and above of icpc choke on multiply defined symbols 69971016ad83Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 69981016ad83Smrg # earlier do not add the objects themselves. 69991016ad83Smrg case `$CC -V 2>&1` in 70001016ad83Smrg *"Version 7."*) 70017204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 70027204935cSmrg _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' 70031016ad83Smrg ;; 70041016ad83Smrg *) # Version 8.0 or newer 70051016ad83Smrg tmp_idyn= 70061016ad83Smrg case $host_cpu in 70071016ad83Smrg ia64*) tmp_idyn=' -i_dynamic';; 70081016ad83Smrg esac 70097204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 70107204935cSmrg _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' 70111016ad83Smrg ;; 70121016ad83Smrg esac 70131016ad83Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 70147204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 70157204935cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 70167204935cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 70171016ad83Smrg ;; 70181016ad83Smrg pgCC* | pgcpp*) 70191016ad83Smrg # Portland Group C++ compiler 70201016ad83Smrg case `$CC -V` in 70211016ad83Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 70221016ad83Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 70237204935cSmrg rm -rf $tpldir~ 70247204935cSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 70257204935cSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 70261016ad83Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 70277204935cSmrg rm -rf $tpldir~ 70287204935cSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 70297204935cSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 70307204935cSmrg $RANLIB $oldlib' 70311016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 70327204935cSmrg rm -rf $tpldir~ 70337204935cSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 70347204935cSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 70351016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 70367204935cSmrg rm -rf $tpldir~ 70377204935cSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 70387204935cSmrg $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' 70391016ad83Smrg ;; 70401016ad83Smrg *) # Version 6 and above use weak symbols 70417204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 70427204935cSmrg _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' 70431016ad83Smrg ;; 70441016ad83Smrg esac 70451016ad83Smrg 70467204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 70477204935cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 70487204935cSmrg _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' 70491016ad83Smrg ;; 70501016ad83Smrg cxx*) 70511016ad83Smrg # Compaq C++ 70527204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 70537204935cSmrg _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' 70541016ad83Smrg 70551016ad83Smrg runpath_var=LD_RUN_PATH 70561016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 70571016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 70581016ad83Smrg 70591016ad83Smrg # Commands to make compiler produce verbose output that lists 70601016ad83Smrg # what "hidden" libraries, object files and flags are used when 70611016ad83Smrg # linking a shared library. 70621016ad83Smrg # 70631016ad83Smrg # There doesn't appear to be a way to prevent this compiler from 70641016ad83Smrg # explicitly linking system object files so we need to strip them 70651016ad83Smrg # from the output so that they don't get included in the library 70661016ad83Smrg # dependencies. 70677204935cSmrg 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' 70681016ad83Smrg ;; 70691016ad83Smrg xl* | mpixl* | bgxl*) 70701016ad83Smrg # IBM XL 8.0 on PPC, with GNU ld 70717204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 70727204935cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 70737204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 70747204935cSmrg if test yes = "$supports_anon_versioning"; then 70751016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7076b9526c6aSmrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 70777204935cSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 70787204935cSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 70791016ad83Smrg fi 70801016ad83Smrg ;; 70811016ad83Smrg *) 7082b9526c6aSmrg case `$CC -V 2>&1 | $SED 5q` in 70831016ad83Smrg *Sun\ C*) 70841016ad83Smrg # Sun C++ 5.9 70851016ad83Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 70867204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 70877204935cSmrg _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' 70881016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 70897204935cSmrg _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' 70901016ad83Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 70911016ad83Smrg 70921016ad83Smrg # Not sure whether something based on 70931016ad83Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 70941016ad83Smrg # would be better. 70951016ad83Smrg output_verbose_link_cmd='func_echo_all' 70961016ad83Smrg 70971016ad83Smrg # Archives containing C++ object files must be created using 70981016ad83Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 70991016ad83Smrg # necessary to make sure instantiated templates are included 71001016ad83Smrg # in the archive. 71011016ad83Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 71021016ad83Smrg ;; 71031016ad83Smrg esac 71041016ad83Smrg ;; 71051016ad83Smrg esac 71061016ad83Smrg ;; 71071016ad83Smrg 71081016ad83Smrg lynxos*) 71091016ad83Smrg # FIXME: insert proper C++ library support 71101016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71111016ad83Smrg ;; 71121016ad83Smrg 71131016ad83Smrg m88k*) 71141016ad83Smrg # FIXME: insert proper C++ library support 71151016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71161016ad83Smrg ;; 71171016ad83Smrg 71181016ad83Smrg mvs*) 71191016ad83Smrg case $cc_basename in 71201016ad83Smrg cxx*) 71211016ad83Smrg # FIXME: insert proper C++ library support 71221016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71231016ad83Smrg ;; 71241016ad83Smrg *) 71251016ad83Smrg # FIXME: insert proper C++ library support 71261016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71271016ad83Smrg ;; 71281016ad83Smrg esac 71291016ad83Smrg ;; 71301016ad83Smrg 71311016ad83Smrg netbsd*) 71321016ad83Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 71331016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 71341016ad83Smrg wlarc= 71351016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 71361016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 71371016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 71381016ad83Smrg fi 71391016ad83Smrg # Workaround some broken pre-1.5 toolchains 71401016ad83Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 71411016ad83Smrg ;; 71421016ad83Smrg 71431016ad83Smrg *nto* | *qnx*) 71441016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 71451016ad83Smrg ;; 71461016ad83Smrg 71477204935cSmrg openbsd* | bitrig*) 71481016ad83Smrg if test -f /usr/libexec/ld.so; then 71491016ad83Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 71501016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 71511016ad83Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 71521016ad83Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 71537204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 71547204935cSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 71557204935cSmrg _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' 71567204935cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 71577204935cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 71581016ad83Smrg fi 71591016ad83Smrg output_verbose_link_cmd=func_echo_all 71601016ad83Smrg else 71611016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71621016ad83Smrg fi 71631016ad83Smrg ;; 71641016ad83Smrg 71651016ad83Smrg osf3* | osf4* | osf5*) 71661016ad83Smrg case $cc_basename in 71671016ad83Smrg KCC*) 71681016ad83Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 71691016ad83Smrg 71701016ad83Smrg # KCC will only create a shared library if the output file 71711016ad83Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 71721016ad83Smrg # to its proper name (with version) after linking. 71737204935cSmrg _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' 71741016ad83Smrg 71757204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 71761016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 71771016ad83Smrg 71781016ad83Smrg # Archives containing C++ object files must be created using 71791016ad83Smrg # the KAI C++ compiler. 71801016ad83Smrg case $host in 71811016ad83Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 71821016ad83Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 71831016ad83Smrg esac 71841016ad83Smrg ;; 71851016ad83Smrg RCC*) 71861016ad83Smrg # Rational C++ 2.4.1 71871016ad83Smrg # FIXME: insert proper C++ library support 71881016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71891016ad83Smrg ;; 71901016ad83Smrg cxx*) 71911016ad83Smrg case $host in 71921016ad83Smrg osf3*) 71937204935cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 71947204935cSmrg _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' 71957204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 71961016ad83Smrg ;; 71971016ad83Smrg *) 71981016ad83Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 71997204935cSmrg _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' 72001016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 72017204935cSmrg echo "-hidden">> $lib.exp~ 72027204935cSmrg $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~ 72037204935cSmrg $RM $lib.exp' 72041016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 72051016ad83Smrg ;; 72061016ad83Smrg esac 72071016ad83Smrg 72081016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 72091016ad83Smrg 72101016ad83Smrg # Commands to make compiler produce verbose output that lists 72111016ad83Smrg # what "hidden" libraries, object files and flags are used when 72121016ad83Smrg # linking a shared library. 72131016ad83Smrg # 72141016ad83Smrg # There doesn't appear to be a way to prevent this compiler from 72151016ad83Smrg # explicitly linking system object files so we need to strip them 72161016ad83Smrg # from the output so that they don't get included in the library 72171016ad83Smrg # dependencies. 72187204935cSmrg 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"' 72191016ad83Smrg ;; 72201016ad83Smrg *) 72217204935cSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 72227204935cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 72231016ad83Smrg case $host in 72241016ad83Smrg osf3*) 72257204935cSmrg _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' 72261016ad83Smrg ;; 72271016ad83Smrg *) 72287204935cSmrg _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' 72291016ad83Smrg ;; 72301016ad83Smrg esac 72311016ad83Smrg 72327204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 72331016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 72341016ad83Smrg 72351016ad83Smrg # Commands to make compiler produce verbose output that lists 72361016ad83Smrg # what "hidden" libraries, object files and flags are used when 72371016ad83Smrg # linking a shared library. 7238aa30ed02Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 72391016ad83Smrg 72401016ad83Smrg else 72411016ad83Smrg # FIXME: insert proper C++ library support 72421016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72431016ad83Smrg fi 72441016ad83Smrg ;; 72451016ad83Smrg esac 72461016ad83Smrg ;; 72471016ad83Smrg 72481016ad83Smrg psos*) 72491016ad83Smrg # FIXME: insert proper C++ library support 72501016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72511016ad83Smrg ;; 72521016ad83Smrg 72531016ad83Smrg sunos4*) 72541016ad83Smrg case $cc_basename in 72551016ad83Smrg CC*) 72561016ad83Smrg # Sun C++ 4.x 72571016ad83Smrg # FIXME: insert proper C++ library support 72581016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72591016ad83Smrg ;; 72601016ad83Smrg lcc*) 72611016ad83Smrg # Lucid 72621016ad83Smrg # FIXME: insert proper C++ library support 72631016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72641016ad83Smrg ;; 72651016ad83Smrg *) 72661016ad83Smrg # FIXME: insert proper C++ library support 72671016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72681016ad83Smrg ;; 72691016ad83Smrg esac 72701016ad83Smrg ;; 72711016ad83Smrg 72721016ad83Smrg solaris*) 72731016ad83Smrg case $cc_basename in 72741016ad83Smrg CC* | sunCC*) 72751016ad83Smrg # Sun C++ 4.2, 5.x and Centerline C++ 72761016ad83Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 72771016ad83Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 72787204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 72791016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 72807204935cSmrg $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' 72811016ad83Smrg 72821016ad83Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 72831016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 72841016ad83Smrg case $host_os in 72851016ad83Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 72861016ad83Smrg *) 72871016ad83Smrg # The compiler driver will combine and reorder linker options, 72887204935cSmrg # but understands '-z linker_flag'. 72891016ad83Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 72901016ad83Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 72911016ad83Smrg ;; 72921016ad83Smrg esac 72931016ad83Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 72941016ad83Smrg 72951016ad83Smrg output_verbose_link_cmd='func_echo_all' 72961016ad83Smrg 72971016ad83Smrg # Archives containing C++ object files must be created using 72981016ad83Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 72991016ad83Smrg # necessary to make sure instantiated templates are included 73001016ad83Smrg # in the archive. 73011016ad83Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 73021016ad83Smrg ;; 73031016ad83Smrg gcx*) 73041016ad83Smrg # Green Hills C++ Compiler 73057204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 73061016ad83Smrg 73071016ad83Smrg # The C++ compiler must be used to create the archive. 73081016ad83Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 73091016ad83Smrg ;; 73101016ad83Smrg *) 73111016ad83Smrg # GNU C++ compiler with Solaris linker 73127204935cSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 73137204935cSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 73141016ad83Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 73157204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 73161016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 73177204935cSmrg $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 73181016ad83Smrg 73191016ad83Smrg # Commands to make compiler produce verbose output that lists 73201016ad83Smrg # what "hidden" libraries, object files and flags are used when 73211016ad83Smrg # linking a shared library. 7322aa30ed02Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 73231016ad83Smrg else 73247204935cSmrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 73251016ad83Smrg # platform. 73267204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 73271016ad83Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 73287204935cSmrg $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 73291016ad83Smrg 73301016ad83Smrg # Commands to make compiler produce verbose output that lists 73311016ad83Smrg # what "hidden" libraries, object files and flags are used when 73321016ad83Smrg # linking a shared library. 7333aa30ed02Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 73341016ad83Smrg fi 73351016ad83Smrg 73367204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 73371016ad83Smrg case $host_os in 73381016ad83Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 73391016ad83Smrg *) 73407204935cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 73411016ad83Smrg ;; 73421016ad83Smrg esac 73431016ad83Smrg fi 73441016ad83Smrg ;; 73451016ad83Smrg esac 73461016ad83Smrg ;; 73471016ad83Smrg 73481016ad83Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 73497204935cSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 73501016ad83Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 73511016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 73521016ad83Smrg runpath_var='LD_RUN_PATH' 73531016ad83Smrg 73541016ad83Smrg case $cc_basename in 73551016ad83Smrg CC*) 73567204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73577204935cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73581016ad83Smrg ;; 73591016ad83Smrg *) 73607204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73617204935cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73621016ad83Smrg ;; 73631016ad83Smrg esac 73641016ad83Smrg ;; 73651016ad83Smrg 73661016ad83Smrg sysv5* | sco3.2v5* | sco5v6*) 73677204935cSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 73681016ad83Smrg # link with -lc, and that would cause any symbols used from libc to 73691016ad83Smrg # always be unresolved, which means just about no library would 73701016ad83Smrg # ever link correctly. If we're not using GNU ld we use -z text 73711016ad83Smrg # though, which does catch some bad symbols but isn't as heavy-handed 73721016ad83Smrg # as -z defs. 73737204935cSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 73747204935cSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 73751016ad83Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 73761016ad83Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 73777204935cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 73781016ad83Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 73791016ad83Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 73807204935cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 73811016ad83Smrg runpath_var='LD_RUN_PATH' 73821016ad83Smrg 73831016ad83Smrg case $cc_basename in 73841016ad83Smrg CC*) 73857204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73867204935cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73871016ad83Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 73887204935cSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 73891016ad83Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 73907204935cSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 73911016ad83Smrg ;; 73921016ad83Smrg *) 73937204935cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73947204935cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73951016ad83Smrg ;; 73961016ad83Smrg esac 73971016ad83Smrg ;; 73981016ad83Smrg 73991016ad83Smrg tandem*) 74001016ad83Smrg case $cc_basename in 74011016ad83Smrg NCC*) 74021016ad83Smrg # NonStop-UX NCC 3.20 74031016ad83Smrg # FIXME: insert proper C++ library support 74041016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74051016ad83Smrg ;; 74061016ad83Smrg *) 74071016ad83Smrg # FIXME: insert proper C++ library support 74081016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74091016ad83Smrg ;; 74101016ad83Smrg esac 74111016ad83Smrg ;; 74121016ad83Smrg 74131016ad83Smrg vxworks*) 74141016ad83Smrg # FIXME: insert proper C++ library support 74151016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74161016ad83Smrg ;; 74171016ad83Smrg 74181016ad83Smrg *) 74191016ad83Smrg # FIXME: insert proper C++ library support 74201016ad83Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74211016ad83Smrg ;; 74221016ad83Smrg esac 74231016ad83Smrg 74241016ad83Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 74257204935cSmrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 74261016ad83Smrg 74277204935cSmrg _LT_TAGVAR(GCC, $1)=$GXX 74287204935cSmrg _LT_TAGVAR(LD, $1)=$LD 74291016ad83Smrg 74301016ad83Smrg ## CAVEAT EMPTOR: 74311016ad83Smrg ## There is no encapsulation within the following macros, do not change 74321016ad83Smrg ## the running order or otherwise move them around unless you know exactly 74331016ad83Smrg ## what you are doing... 74341016ad83Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 74351016ad83Smrg _LT_COMPILER_PIC($1) 74361016ad83Smrg _LT_COMPILER_C_O($1) 74371016ad83Smrg _LT_COMPILER_FILE_LOCKS($1) 74381016ad83Smrg _LT_LINKER_SHLIBS($1) 74391016ad83Smrg _LT_SYS_DYNAMIC_LINKER($1) 74401016ad83Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 74411016ad83Smrg 74421016ad83Smrg _LT_CONFIG($1) 74431016ad83Smrg fi # test -n "$compiler" 74441016ad83Smrg 74451016ad83Smrg CC=$lt_save_CC 74461016ad83Smrg CFLAGS=$lt_save_CFLAGS 74471016ad83Smrg LDCXX=$LD 74481016ad83Smrg LD=$lt_save_LD 74491016ad83Smrg GCC=$lt_save_GCC 74501016ad83Smrg with_gnu_ld=$lt_save_with_gnu_ld 74511016ad83Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 74521016ad83Smrg lt_cv_path_LD=$lt_save_path_LD 74531016ad83Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 74541016ad83Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 74557204935cSmrgfi # test yes != "$_lt_caught_CXX_error" 74561016ad83Smrg 74571016ad83SmrgAC_LANG_POP 74581016ad83Smrg])# _LT_LANG_CXX_CONFIG 74591016ad83Smrg 74601016ad83Smrg 74611016ad83Smrg# _LT_FUNC_STRIPNAME_CNF 74621016ad83Smrg# ---------------------- 74631016ad83Smrg# func_stripname_cnf prefix suffix name 74641016ad83Smrg# strip PREFIX and SUFFIX off of NAME. 74651016ad83Smrg# PREFIX and SUFFIX must not contain globbing or regex special 74661016ad83Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 74671016ad83Smrg# dot (in which case that matches only a dot). 74681016ad83Smrg# 74691016ad83Smrg# This function is identical to the (non-XSI) version of func_stripname, 74701016ad83Smrg# except this one can be used by m4 code that may be executed by configure, 74711016ad83Smrg# rather than the libtool script. 74721016ad83Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 74731016ad83SmrgAC_REQUIRE([_LT_DECL_SED]) 74741016ad83SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 74751016ad83Smrgfunc_stripname_cnf () 74761016ad83Smrg{ 74777204935cSmrg case @S|@2 in 74787204935cSmrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 74797204935cSmrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 74801016ad83Smrg esac 74811016ad83Smrg} # func_stripname_cnf 74821016ad83Smrg])# _LT_FUNC_STRIPNAME_CNF 74831016ad83Smrg 74847204935cSmrg 74851016ad83Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 74861016ad83Smrg# --------------------------------- 74871016ad83Smrg# Figure out "hidden" library dependencies from verbose 74881016ad83Smrg# compiler output when linking a shared library. 74891016ad83Smrg# Parse the compiler output and extract the necessary 74901016ad83Smrg# objects, libraries and library flags. 74911016ad83Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 74921016ad83Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 74931016ad83SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 74941016ad83Smrg# Dependencies to place before and after the object being linked: 74951016ad83Smrg_LT_TAGVAR(predep_objects, $1)= 74961016ad83Smrg_LT_TAGVAR(postdep_objects, $1)= 74971016ad83Smrg_LT_TAGVAR(predeps, $1)= 74981016ad83Smrg_LT_TAGVAR(postdeps, $1)= 74991016ad83Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 75001016ad83Smrg 75011016ad83Smrgdnl we can't use the lt_simple_compile_test_code here, 75021016ad83Smrgdnl because it contains code intended for an executable, 75031016ad83Smrgdnl not a library. It's possible we should let each 75041016ad83Smrgdnl tag define a new lt_????_link_test_code variable, 75051016ad83Smrgdnl but it's only used here... 75061016ad83Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 75071016ad83Smrgint a; 75081016ad83Smrgvoid foo (void) { a = 0; } 75091016ad83Smrg_LT_EOF 75101016ad83Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 75111016ad83Smrgclass Foo 75121016ad83Smrg{ 75131016ad83Smrgpublic: 75141016ad83Smrg Foo (void) { a = 0; } 75151016ad83Smrgprivate: 75161016ad83Smrg int a; 75171016ad83Smrg}; 75181016ad83Smrg_LT_EOF 75191016ad83Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 75201016ad83Smrg subroutine foo 75211016ad83Smrg implicit none 75221016ad83Smrg integer*4 a 75231016ad83Smrg a=0 75241016ad83Smrg return 75251016ad83Smrg end 75261016ad83Smrg_LT_EOF 75271016ad83Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 75281016ad83Smrg subroutine foo 75291016ad83Smrg implicit none 75301016ad83Smrg integer a 75311016ad83Smrg a=0 75321016ad83Smrg return 75331016ad83Smrg end 75341016ad83Smrg_LT_EOF 75351016ad83Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 75361016ad83Smrgpublic class foo { 75371016ad83Smrg private int a; 75381016ad83Smrg public void bar (void) { 75391016ad83Smrg a = 0; 75401016ad83Smrg } 75411016ad83Smrg}; 75421016ad83Smrg_LT_EOF 75431016ad83Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 75441016ad83Smrgpackage foo 75451016ad83Smrgfunc foo() { 75461016ad83Smrg} 75471016ad83Smrg_LT_EOF 75481016ad83Smrg]) 75491016ad83Smrg 75501016ad83Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 75511016ad83Smrgcase "$CC $CFLAGS " in #( 75521016ad83Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 75531016ad83Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 75541016ad83Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 75551016ad83Smrgesac 75561016ad83Smrg 75571016ad83Smrgdnl Parse the compiler output and extract the necessary 75581016ad83Smrgdnl objects, libraries and library flags. 75591016ad83Smrgif AC_TRY_EVAL(ac_compile); then 75601016ad83Smrg # Parse the compiler output and extract the necessary 75611016ad83Smrg # objects, libraries and library flags. 75621016ad83Smrg 75631016ad83Smrg # Sentinel used to keep track of whether or not we are before 75641016ad83Smrg # the conftest object file. 75651016ad83Smrg pre_test_object_deps_done=no 75661016ad83Smrg 75671016ad83Smrg for p in `eval "$output_verbose_link_cmd"`; do 75687204935cSmrg case $prev$p in 75691016ad83Smrg 75701016ad83Smrg -L* | -R* | -l*) 75711016ad83Smrg # Some compilers place space between "-{L,R}" and the path. 75721016ad83Smrg # Remove the space. 75737204935cSmrg if test x-L = "$p" || 75747204935cSmrg test x-R = "$p"; then 75751016ad83Smrg prev=$p 75761016ad83Smrg continue 75771016ad83Smrg fi 75781016ad83Smrg 75791016ad83Smrg # Expand the sysroot to ease extracting the directories later. 75801016ad83Smrg if test -z "$prev"; then 75811016ad83Smrg case $p in 75821016ad83Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 75831016ad83Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 75841016ad83Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 75851016ad83Smrg esac 75861016ad83Smrg fi 75871016ad83Smrg case $p in 75881016ad83Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 75891016ad83Smrg esac 75907204935cSmrg if test no = "$pre_test_object_deps_done"; then 75917204935cSmrg case $prev in 75921016ad83Smrg -L | -R) 75931016ad83Smrg # Internal compiler library paths should come after those 75941016ad83Smrg # provided the user. The postdeps already come after the 75951016ad83Smrg # user supplied libs so there is no need to process them. 75961016ad83Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 75977204935cSmrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 75981016ad83Smrg else 75997204935cSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 76001016ad83Smrg fi 76011016ad83Smrg ;; 76021016ad83Smrg # The "-l" case would never come before the object being 76031016ad83Smrg # linked, so don't bother handling this case. 76041016ad83Smrg esac 76051016ad83Smrg else 76061016ad83Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 76077204935cSmrg _LT_TAGVAR(postdeps, $1)=$prev$p 76081016ad83Smrg else 76097204935cSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 76101016ad83Smrg fi 76111016ad83Smrg fi 76121016ad83Smrg prev= 76131016ad83Smrg ;; 76141016ad83Smrg 76151016ad83Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 76161016ad83Smrg *.$objext) 76171016ad83Smrg # This assumes that the test object file only shows up 76181016ad83Smrg # once in the compiler output. 76191016ad83Smrg if test "$p" = "conftest.$objext"; then 76201016ad83Smrg pre_test_object_deps_done=yes 76211016ad83Smrg continue 76221016ad83Smrg fi 76231016ad83Smrg 76247204935cSmrg if test no = "$pre_test_object_deps_done"; then 76251016ad83Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 76267204935cSmrg _LT_TAGVAR(predep_objects, $1)=$p 76271016ad83Smrg else 76281016ad83Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 76291016ad83Smrg fi 76301016ad83Smrg else 76311016ad83Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 76327204935cSmrg _LT_TAGVAR(postdep_objects, $1)=$p 76331016ad83Smrg else 76341016ad83Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 76351016ad83Smrg fi 76361016ad83Smrg fi 76371016ad83Smrg ;; 76381016ad83Smrg 76391016ad83Smrg *) ;; # Ignore the rest. 76401016ad83Smrg 76411016ad83Smrg esac 76421016ad83Smrg done 76431016ad83Smrg 76441016ad83Smrg # Clean up. 76451016ad83Smrg rm -f a.out a.exe 76461016ad83Smrgelse 76471016ad83Smrg echo "libtool.m4: error: problem compiling $1 test program" 76481016ad83Smrgfi 76491016ad83Smrg 76501016ad83Smrg$RM -f confest.$objext 76511016ad83SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 76521016ad83Smrg 76531016ad83Smrg# PORTME: override above test on systems where it is broken 76541016ad83Smrgm4_if([$1], [CXX], 76551016ad83Smrg[case $host_os in 76561016ad83Smrginterix[[3-9]]*) 76571016ad83Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 76581016ad83Smrg # hack all around it, let's just trust "g++" to DTRT. 76591016ad83Smrg _LT_TAGVAR(predep_objects,$1)= 76601016ad83Smrg _LT_TAGVAR(postdep_objects,$1)= 76611016ad83Smrg _LT_TAGVAR(postdeps,$1)= 76621016ad83Smrg ;; 76631016ad83Smrgesac 76641016ad83Smrg]) 76651016ad83Smrg 76661016ad83Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 76671016ad83Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 76681016ad83Smrgesac 76691016ad83Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 76701016ad83Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 76717204935cSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 76721016ad83Smrgfi 76731016ad83Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 76741016ad83Smrg [The directories searched by this compiler when creating a shared library]) 76751016ad83Smrg_LT_TAGDECL([], [predep_objects], [1], 76761016ad83Smrg [Dependencies to place before and after the objects being linked to 76771016ad83Smrg create a shared library]) 76781016ad83Smrg_LT_TAGDECL([], [postdep_objects], [1]) 76791016ad83Smrg_LT_TAGDECL([], [predeps], [1]) 76801016ad83Smrg_LT_TAGDECL([], [postdeps], [1]) 76811016ad83Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 76821016ad83Smrg [The library search path used internally by the compiler when linking 76831016ad83Smrg a shared library]) 76841016ad83Smrg])# _LT_SYS_HIDDEN_LIBDEPS 76851016ad83Smrg 76861016ad83Smrg 76871016ad83Smrg# _LT_LANG_F77_CONFIG([TAG]) 76881016ad83Smrg# -------------------------- 76891016ad83Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 76901016ad83Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 76917204935cSmrg# to write the compiler configuration to 'libtool'. 76921016ad83Smrgm4_defun([_LT_LANG_F77_CONFIG], 76931016ad83Smrg[AC_LANG_PUSH(Fortran 77) 76947204935cSmrgif test -z "$F77" || test no = "$F77"; then 76951016ad83Smrg _lt_disable_F77=yes 76961016ad83Smrgfi 76971016ad83Smrg 76981016ad83Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 76991016ad83Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 77001016ad83Smrg_LT_TAGVAR(always_export_symbols, $1)=no 77011016ad83Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 77021016ad83Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 77031016ad83Smrg_LT_TAGVAR(hardcode_direct, $1)=no 77041016ad83Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 77051016ad83Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 77061016ad83Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 77071016ad83Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 77081016ad83Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 77091016ad83Smrg_LT_TAGVAR(inherit_rpath, $1)=no 77101016ad83Smrg_LT_TAGVAR(module_cmds, $1)= 77111016ad83Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 77121016ad83Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 77131016ad83Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 77141016ad83Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 77151016ad83Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 77161016ad83Smrg_LT_TAGVAR(no_undefined_flag, $1)= 77171016ad83Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 77181016ad83Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 77191016ad83Smrg 77201016ad83Smrg# Source file extension for f77 test sources. 77211016ad83Smrgac_ext=f 77221016ad83Smrg 77231016ad83Smrg# Object file extension for compiled f77 test sources. 77241016ad83Smrgobjext=o 77251016ad83Smrg_LT_TAGVAR(objext, $1)=$objext 77261016ad83Smrg 77271016ad83Smrg# No sense in running all these tests if we already determined that 77281016ad83Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 77291016ad83Smrg# are currently assumed to apply to all compilers on this platform, 77301016ad83Smrg# and will be corrupted by setting them based on a non-working compiler. 77317204935cSmrgif test yes != "$_lt_disable_F77"; then 77321016ad83Smrg # Code to be used in simple compile tests 77331016ad83Smrg lt_simple_compile_test_code="\ 77341016ad83Smrg subroutine t 77351016ad83Smrg return 77361016ad83Smrg end 77371016ad83Smrg" 77381016ad83Smrg 77391016ad83Smrg # Code to be used in simple link tests 77401016ad83Smrg lt_simple_link_test_code="\ 77411016ad83Smrg program t 77421016ad83Smrg end 77431016ad83Smrg" 77441016ad83Smrg 77451016ad83Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 77461016ad83Smrg _LT_TAG_COMPILER 77471016ad83Smrg 77481016ad83Smrg # save warnings/boilerplate of simple test code 77491016ad83Smrg _LT_COMPILER_BOILERPLATE 77501016ad83Smrg _LT_LINKER_BOILERPLATE 77511016ad83Smrg 77521016ad83Smrg # Allow CC to be a program name with arguments. 77537204935cSmrg lt_save_CC=$CC 77541016ad83Smrg lt_save_GCC=$GCC 77551016ad83Smrg lt_save_CFLAGS=$CFLAGS 77561016ad83Smrg CC=${F77-"f77"} 77571016ad83Smrg CFLAGS=$FFLAGS 77581016ad83Smrg compiler=$CC 77591016ad83Smrg _LT_TAGVAR(compiler, $1)=$CC 77601016ad83Smrg _LT_CC_BASENAME([$compiler]) 77611016ad83Smrg GCC=$G77 77621016ad83Smrg if test -n "$compiler"; then 77631016ad83Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 77641016ad83Smrg AC_MSG_RESULT([$can_build_shared]) 77651016ad83Smrg 77661016ad83Smrg AC_MSG_CHECKING([whether to build shared libraries]) 77677204935cSmrg test no = "$can_build_shared" && enable_shared=no 77681016ad83Smrg 77691016ad83Smrg # On AIX, shared libraries and static libraries use the same namespace, and 77701016ad83Smrg # are all built from PIC. 77711016ad83Smrg case $host_os in 77721016ad83Smrg aix3*) 77737204935cSmrg test yes = "$enable_shared" && enable_static=no 77741016ad83Smrg if test -n "$RANLIB"; then 77751016ad83Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 77761016ad83Smrg postinstall_cmds='$RANLIB $lib' 77771016ad83Smrg fi 77781016ad83Smrg ;; 77791016ad83Smrg aix[[4-9]]*) 77807204935cSmrg if test ia64 != "$host_cpu"; then 77817204935cSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 77827204935cSmrg yes,aix,yes) ;; # shared object as lib.so file only 77837204935cSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 77847204935cSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 77857204935cSmrg esac 77861016ad83Smrg fi 77871016ad83Smrg ;; 77881016ad83Smrg esac 77891016ad83Smrg AC_MSG_RESULT([$enable_shared]) 77901016ad83Smrg 77911016ad83Smrg AC_MSG_CHECKING([whether to build static libraries]) 77921016ad83Smrg # Make sure either enable_shared or enable_static is yes. 77937204935cSmrg test yes = "$enable_shared" || enable_static=yes 77941016ad83Smrg AC_MSG_RESULT([$enable_static]) 77951016ad83Smrg 77967204935cSmrg _LT_TAGVAR(GCC, $1)=$G77 77977204935cSmrg _LT_TAGVAR(LD, $1)=$LD 77981016ad83Smrg 77991016ad83Smrg ## CAVEAT EMPTOR: 78001016ad83Smrg ## There is no encapsulation within the following macros, do not change 78011016ad83Smrg ## the running order or otherwise move them around unless you know exactly 78021016ad83Smrg ## what you are doing... 78031016ad83Smrg _LT_COMPILER_PIC($1) 78041016ad83Smrg _LT_COMPILER_C_O($1) 78051016ad83Smrg _LT_COMPILER_FILE_LOCKS($1) 78061016ad83Smrg _LT_LINKER_SHLIBS($1) 78071016ad83Smrg _LT_SYS_DYNAMIC_LINKER($1) 78081016ad83Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 78091016ad83Smrg 78101016ad83Smrg _LT_CONFIG($1) 78111016ad83Smrg fi # test -n "$compiler" 78121016ad83Smrg 78131016ad83Smrg GCC=$lt_save_GCC 78147204935cSmrg CC=$lt_save_CC 78157204935cSmrg CFLAGS=$lt_save_CFLAGS 78167204935cSmrgfi # test yes != "$_lt_disable_F77" 78171016ad83Smrg 78181016ad83SmrgAC_LANG_POP 78191016ad83Smrg])# _LT_LANG_F77_CONFIG 78201016ad83Smrg 78211016ad83Smrg 78221016ad83Smrg# _LT_LANG_FC_CONFIG([TAG]) 78231016ad83Smrg# ------------------------- 78241016ad83Smrg# Ensure that the configuration variables for a Fortran compiler are 78251016ad83Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 78267204935cSmrg# to write the compiler configuration to 'libtool'. 78271016ad83Smrgm4_defun([_LT_LANG_FC_CONFIG], 78281016ad83Smrg[AC_LANG_PUSH(Fortran) 78291016ad83Smrg 78307204935cSmrgif test -z "$FC" || test no = "$FC"; then 78311016ad83Smrg _lt_disable_FC=yes 78321016ad83Smrgfi 78331016ad83Smrg 78341016ad83Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 78351016ad83Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 78361016ad83Smrg_LT_TAGVAR(always_export_symbols, $1)=no 78371016ad83Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 78381016ad83Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 78391016ad83Smrg_LT_TAGVAR(hardcode_direct, $1)=no 78401016ad83Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 78411016ad83Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 78421016ad83Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 78431016ad83Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 78441016ad83Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 78451016ad83Smrg_LT_TAGVAR(inherit_rpath, $1)=no 78461016ad83Smrg_LT_TAGVAR(module_cmds, $1)= 78471016ad83Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 78481016ad83Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 78491016ad83Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 78501016ad83Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 78511016ad83Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 78521016ad83Smrg_LT_TAGVAR(no_undefined_flag, $1)= 78531016ad83Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 78541016ad83Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 78551016ad83Smrg 78561016ad83Smrg# Source file extension for fc test sources. 78571016ad83Smrgac_ext=${ac_fc_srcext-f} 78581016ad83Smrg 78591016ad83Smrg# Object file extension for compiled fc test sources. 78601016ad83Smrgobjext=o 78611016ad83Smrg_LT_TAGVAR(objext, $1)=$objext 78621016ad83Smrg 78631016ad83Smrg# No sense in running all these tests if we already determined that 78641016ad83Smrg# the FC compiler isn't working. Some variables (like enable_shared) 78651016ad83Smrg# are currently assumed to apply to all compilers on this platform, 78661016ad83Smrg# and will be corrupted by setting them based on a non-working compiler. 78677204935cSmrgif test yes != "$_lt_disable_FC"; then 78681016ad83Smrg # Code to be used in simple compile tests 78691016ad83Smrg lt_simple_compile_test_code="\ 78701016ad83Smrg subroutine t 78711016ad83Smrg return 78721016ad83Smrg end 78731016ad83Smrg" 78741016ad83Smrg 78751016ad83Smrg # Code to be used in simple link tests 78761016ad83Smrg lt_simple_link_test_code="\ 78771016ad83Smrg program t 78781016ad83Smrg end 78791016ad83Smrg" 78801016ad83Smrg 78811016ad83Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 78821016ad83Smrg _LT_TAG_COMPILER 78831016ad83Smrg 78841016ad83Smrg # save warnings/boilerplate of simple test code 78851016ad83Smrg _LT_COMPILER_BOILERPLATE 78861016ad83Smrg _LT_LINKER_BOILERPLATE 78871016ad83Smrg 78881016ad83Smrg # Allow CC to be a program name with arguments. 78897204935cSmrg lt_save_CC=$CC 78901016ad83Smrg lt_save_GCC=$GCC 78911016ad83Smrg lt_save_CFLAGS=$CFLAGS 78921016ad83Smrg CC=${FC-"f95"} 78931016ad83Smrg CFLAGS=$FCFLAGS 78941016ad83Smrg compiler=$CC 78951016ad83Smrg GCC=$ac_cv_fc_compiler_gnu 78961016ad83Smrg 78971016ad83Smrg _LT_TAGVAR(compiler, $1)=$CC 78981016ad83Smrg _LT_CC_BASENAME([$compiler]) 78991016ad83Smrg 79001016ad83Smrg if test -n "$compiler"; then 79011016ad83Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 79021016ad83Smrg AC_MSG_RESULT([$can_build_shared]) 79031016ad83Smrg 79041016ad83Smrg AC_MSG_CHECKING([whether to build shared libraries]) 79057204935cSmrg test no = "$can_build_shared" && enable_shared=no 79061016ad83Smrg 79071016ad83Smrg # On AIX, shared libraries and static libraries use the same namespace, and 79081016ad83Smrg # are all built from PIC. 79091016ad83Smrg case $host_os in 79101016ad83Smrg aix3*) 79117204935cSmrg test yes = "$enable_shared" && enable_static=no 79121016ad83Smrg if test -n "$RANLIB"; then 79131016ad83Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 79141016ad83Smrg postinstall_cmds='$RANLIB $lib' 79151016ad83Smrg fi 79161016ad83Smrg ;; 79171016ad83Smrg aix[[4-9]]*) 79187204935cSmrg if test ia64 != "$host_cpu"; then 79197204935cSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 79207204935cSmrg yes,aix,yes) ;; # shared object as lib.so file only 79217204935cSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 79227204935cSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 79237204935cSmrg esac 79241016ad83Smrg fi 79251016ad83Smrg ;; 79261016ad83Smrg esac 79271016ad83Smrg AC_MSG_RESULT([$enable_shared]) 79281016ad83Smrg 79291016ad83Smrg AC_MSG_CHECKING([whether to build static libraries]) 79301016ad83Smrg # Make sure either enable_shared or enable_static is yes. 79317204935cSmrg test yes = "$enable_shared" || enable_static=yes 79321016ad83Smrg AC_MSG_RESULT([$enable_static]) 79331016ad83Smrg 79347204935cSmrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 79357204935cSmrg _LT_TAGVAR(LD, $1)=$LD 79361016ad83Smrg 79371016ad83Smrg ## CAVEAT EMPTOR: 79381016ad83Smrg ## There is no encapsulation within the following macros, do not change 79391016ad83Smrg ## the running order or otherwise move them around unless you know exactly 79401016ad83Smrg ## what you are doing... 79411016ad83Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 79421016ad83Smrg _LT_COMPILER_PIC($1) 79431016ad83Smrg _LT_COMPILER_C_O($1) 79441016ad83Smrg _LT_COMPILER_FILE_LOCKS($1) 79451016ad83Smrg _LT_LINKER_SHLIBS($1) 79461016ad83Smrg _LT_SYS_DYNAMIC_LINKER($1) 79471016ad83Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 79481016ad83Smrg 79491016ad83Smrg _LT_CONFIG($1) 79501016ad83Smrg fi # test -n "$compiler" 79511016ad83Smrg 79521016ad83Smrg GCC=$lt_save_GCC 79531016ad83Smrg CC=$lt_save_CC 79541016ad83Smrg CFLAGS=$lt_save_CFLAGS 79557204935cSmrgfi # test yes != "$_lt_disable_FC" 79561016ad83Smrg 79571016ad83SmrgAC_LANG_POP 79581016ad83Smrg])# _LT_LANG_FC_CONFIG 79591016ad83Smrg 79601016ad83Smrg 79611016ad83Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 79621016ad83Smrg# -------------------------- 79631016ad83Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 79641016ad83Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 79657204935cSmrg# to write the compiler configuration to 'libtool'. 79661016ad83Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 79671016ad83Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 79681016ad83SmrgAC_LANG_SAVE 79691016ad83Smrg 79701016ad83Smrg# Source file extension for Java test sources. 79711016ad83Smrgac_ext=java 79721016ad83Smrg 79731016ad83Smrg# Object file extension for compiled Java test sources. 79741016ad83Smrgobjext=o 79751016ad83Smrg_LT_TAGVAR(objext, $1)=$objext 79761016ad83Smrg 79771016ad83Smrg# Code to be used in simple compile tests 79781016ad83Smrglt_simple_compile_test_code="class foo {}" 79791016ad83Smrg 79801016ad83Smrg# Code to be used in simple link tests 79811016ad83Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 79821016ad83Smrg 79831016ad83Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 79841016ad83Smrg_LT_TAG_COMPILER 79851016ad83Smrg 79861016ad83Smrg# save warnings/boilerplate of simple test code 79871016ad83Smrg_LT_COMPILER_BOILERPLATE 79881016ad83Smrg_LT_LINKER_BOILERPLATE 79891016ad83Smrg 79901016ad83Smrg# Allow CC to be a program name with arguments. 79911016ad83Smrglt_save_CC=$CC 79921016ad83Smrglt_save_CFLAGS=$CFLAGS 79931016ad83Smrglt_save_GCC=$GCC 79941016ad83SmrgGCC=yes 79951016ad83SmrgCC=${GCJ-"gcj"} 79961016ad83SmrgCFLAGS=$GCJFLAGS 79971016ad83Smrgcompiler=$CC 79981016ad83Smrg_LT_TAGVAR(compiler, $1)=$CC 79997204935cSmrg_LT_TAGVAR(LD, $1)=$LD 80001016ad83Smrg_LT_CC_BASENAME([$compiler]) 80011016ad83Smrg 80021016ad83Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 80031016ad83Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 80041016ad83Smrg 80051016ad83Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 80061016ad83Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 80071016ad83Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 80081016ad83Smrg 80091016ad83Smrg## CAVEAT EMPTOR: 80101016ad83Smrg## There is no encapsulation within the following macros, do not change 80111016ad83Smrg## the running order or otherwise move them around unless you know exactly 80121016ad83Smrg## what you are doing... 80131016ad83Smrgif test -n "$compiler"; then 80141016ad83Smrg _LT_COMPILER_NO_RTTI($1) 80151016ad83Smrg _LT_COMPILER_PIC($1) 80161016ad83Smrg _LT_COMPILER_C_O($1) 80171016ad83Smrg _LT_COMPILER_FILE_LOCKS($1) 80181016ad83Smrg _LT_LINKER_SHLIBS($1) 80191016ad83Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 80201016ad83Smrg 80211016ad83Smrg _LT_CONFIG($1) 80221016ad83Smrgfi 80231016ad83Smrg 80241016ad83SmrgAC_LANG_RESTORE 80251016ad83Smrg 80261016ad83SmrgGCC=$lt_save_GCC 80271016ad83SmrgCC=$lt_save_CC 80281016ad83SmrgCFLAGS=$lt_save_CFLAGS 80291016ad83Smrg])# _LT_LANG_GCJ_CONFIG 80301016ad83Smrg 80311016ad83Smrg 80321016ad83Smrg# _LT_LANG_GO_CONFIG([TAG]) 80331016ad83Smrg# -------------------------- 80341016ad83Smrg# Ensure that the configuration variables for the GNU Go compiler 80351016ad83Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 80367204935cSmrg# to write the compiler configuration to 'libtool'. 80371016ad83Smrgm4_defun([_LT_LANG_GO_CONFIG], 80381016ad83Smrg[AC_REQUIRE([LT_PROG_GO])dnl 80391016ad83SmrgAC_LANG_SAVE 80401016ad83Smrg 80411016ad83Smrg# Source file extension for Go test sources. 80421016ad83Smrgac_ext=go 80431016ad83Smrg 80441016ad83Smrg# Object file extension for compiled Go test sources. 80451016ad83Smrgobjext=o 80461016ad83Smrg_LT_TAGVAR(objext, $1)=$objext 80471016ad83Smrg 80481016ad83Smrg# Code to be used in simple compile tests 80491016ad83Smrglt_simple_compile_test_code="package main; func main() { }" 80501016ad83Smrg 80511016ad83Smrg# Code to be used in simple link tests 80521016ad83Smrglt_simple_link_test_code='package main; func main() { }' 80531016ad83Smrg 80541016ad83Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 80551016ad83Smrg_LT_TAG_COMPILER 80561016ad83Smrg 80571016ad83Smrg# save warnings/boilerplate of simple test code 80581016ad83Smrg_LT_COMPILER_BOILERPLATE 80591016ad83Smrg_LT_LINKER_BOILERPLATE 80601016ad83Smrg 80611016ad83Smrg# Allow CC to be a program name with arguments. 80621016ad83Smrglt_save_CC=$CC 80631016ad83Smrglt_save_CFLAGS=$CFLAGS 80641016ad83Smrglt_save_GCC=$GCC 80651016ad83SmrgGCC=yes 80661016ad83SmrgCC=${GOC-"gccgo"} 80671016ad83SmrgCFLAGS=$GOFLAGS 80681016ad83Smrgcompiler=$CC 80691016ad83Smrg_LT_TAGVAR(compiler, $1)=$CC 80707204935cSmrg_LT_TAGVAR(LD, $1)=$LD 80711016ad83Smrg_LT_CC_BASENAME([$compiler]) 80721016ad83Smrg 80731016ad83Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 80741016ad83Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 80751016ad83Smrg 80761016ad83Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 80771016ad83Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 80781016ad83Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 80791016ad83Smrg 80801016ad83Smrg## CAVEAT EMPTOR: 80811016ad83Smrg## There is no encapsulation within the following macros, do not change 80821016ad83Smrg## the running order or otherwise move them around unless you know exactly 80831016ad83Smrg## what you are doing... 80841016ad83Smrgif test -n "$compiler"; then 80851016ad83Smrg _LT_COMPILER_NO_RTTI($1) 80861016ad83Smrg _LT_COMPILER_PIC($1) 80871016ad83Smrg _LT_COMPILER_C_O($1) 80881016ad83Smrg _LT_COMPILER_FILE_LOCKS($1) 80891016ad83Smrg _LT_LINKER_SHLIBS($1) 80901016ad83Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 80911016ad83Smrg 80921016ad83Smrg _LT_CONFIG($1) 80931016ad83Smrgfi 80941016ad83Smrg 80951016ad83SmrgAC_LANG_RESTORE 80961016ad83Smrg 80971016ad83SmrgGCC=$lt_save_GCC 80981016ad83SmrgCC=$lt_save_CC 80991016ad83SmrgCFLAGS=$lt_save_CFLAGS 81001016ad83Smrg])# _LT_LANG_GO_CONFIG 81011016ad83Smrg 81021016ad83Smrg 81031016ad83Smrg# _LT_LANG_RC_CONFIG([TAG]) 81041016ad83Smrg# ------------------------- 81051016ad83Smrg# Ensure that the configuration variables for the Windows resource compiler 81061016ad83Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 81077204935cSmrg# to write the compiler configuration to 'libtool'. 81081016ad83Smrgm4_defun([_LT_LANG_RC_CONFIG], 81091016ad83Smrg[AC_REQUIRE([LT_PROG_RC])dnl 81101016ad83SmrgAC_LANG_SAVE 81111016ad83Smrg 81121016ad83Smrg# Source file extension for RC test sources. 81131016ad83Smrgac_ext=rc 81141016ad83Smrg 81151016ad83Smrg# Object file extension for compiled RC test sources. 81161016ad83Smrgobjext=o 81171016ad83Smrg_LT_TAGVAR(objext, $1)=$objext 81181016ad83Smrg 81191016ad83Smrg# Code to be used in simple compile tests 81201016ad83Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 81211016ad83Smrg 81221016ad83Smrg# Code to be used in simple link tests 81237204935cSmrglt_simple_link_test_code=$lt_simple_compile_test_code 81241016ad83Smrg 81251016ad83Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 81261016ad83Smrg_LT_TAG_COMPILER 81271016ad83Smrg 81281016ad83Smrg# save warnings/boilerplate of simple test code 81291016ad83Smrg_LT_COMPILER_BOILERPLATE 81301016ad83Smrg_LT_LINKER_BOILERPLATE 81311016ad83Smrg 81321016ad83Smrg# Allow CC to be a program name with arguments. 81337204935cSmrglt_save_CC=$CC 81341016ad83Smrglt_save_CFLAGS=$CFLAGS 81351016ad83Smrglt_save_GCC=$GCC 81361016ad83SmrgGCC= 81371016ad83SmrgCC=${RC-"windres"} 81381016ad83SmrgCFLAGS= 81391016ad83Smrgcompiler=$CC 81401016ad83Smrg_LT_TAGVAR(compiler, $1)=$CC 81411016ad83Smrg_LT_CC_BASENAME([$compiler]) 81421016ad83Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 81431016ad83Smrg 81441016ad83Smrgif test -n "$compiler"; then 81451016ad83Smrg : 81461016ad83Smrg _LT_CONFIG($1) 81471016ad83Smrgfi 81481016ad83Smrg 81491016ad83SmrgGCC=$lt_save_GCC 81501016ad83SmrgAC_LANG_RESTORE 81511016ad83SmrgCC=$lt_save_CC 81521016ad83SmrgCFLAGS=$lt_save_CFLAGS 81531016ad83Smrg])# _LT_LANG_RC_CONFIG 81541016ad83Smrg 81551016ad83Smrg 81561016ad83Smrg# LT_PROG_GCJ 81571016ad83Smrg# ----------- 81581016ad83SmrgAC_DEFUN([LT_PROG_GCJ], 81591016ad83Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 81601016ad83Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 81611016ad83Smrg [AC_CHECK_TOOL(GCJ, gcj,) 81627204935cSmrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 81631016ad83Smrg AC_SUBST(GCJFLAGS)])])[]dnl 81641016ad83Smrg]) 81651016ad83Smrg 81661016ad83Smrg# Old name: 81671016ad83SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 81681016ad83Smrgdnl aclocal-1.4 backwards compatibility: 81691016ad83Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 81701016ad83Smrg 81711016ad83Smrg 81721016ad83Smrg# LT_PROG_GO 81731016ad83Smrg# ---------- 81741016ad83SmrgAC_DEFUN([LT_PROG_GO], 81751016ad83Smrg[AC_CHECK_TOOL(GOC, gccgo,) 81761016ad83Smrg]) 81771016ad83Smrg 81781016ad83Smrg 81791016ad83Smrg# LT_PROG_RC 81801016ad83Smrg# ---------- 81811016ad83SmrgAC_DEFUN([LT_PROG_RC], 81821016ad83Smrg[AC_CHECK_TOOL(RC, windres,) 81831016ad83Smrg]) 81841016ad83Smrg 81851016ad83Smrg# Old name: 81861016ad83SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 81871016ad83Smrgdnl aclocal-1.4 backwards compatibility: 81881016ad83Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 81891016ad83Smrg 81901016ad83Smrg 81911016ad83Smrg# _LT_DECL_EGREP 81921016ad83Smrg# -------------- 81931016ad83Smrg# If we don't have a new enough Autoconf to choose the best grep 81941016ad83Smrg# available, choose the one first in the user's PATH. 81951016ad83Smrgm4_defun([_LT_DECL_EGREP], 81961016ad83Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 81971016ad83SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 81981016ad83Smrgtest -z "$GREP" && GREP=grep 81991016ad83Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 82001016ad83Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 82011016ad83Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 82021016ad83Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 82031016ad83SmrgAC_SUBST([GREP]) 82041016ad83Smrg]) 82051016ad83Smrg 82061016ad83Smrg 82071016ad83Smrg# _LT_DECL_OBJDUMP 82081016ad83Smrg# -------------- 82091016ad83Smrg# If we don't have a new enough Autoconf to choose the best objdump 82101016ad83Smrg# available, choose the one first in the user's PATH. 82111016ad83Smrgm4_defun([_LT_DECL_OBJDUMP], 82121016ad83Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 82131016ad83Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 82141016ad83Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 82151016ad83SmrgAC_SUBST([OBJDUMP]) 82161016ad83Smrg]) 82171016ad83Smrg 82181016ad83Smrg# _LT_DECL_DLLTOOL 82191016ad83Smrg# ---------------- 82201016ad83Smrg# Ensure DLLTOOL variable is set. 82211016ad83Smrgm4_defun([_LT_DECL_DLLTOOL], 82221016ad83Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 82231016ad83Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 82241016ad83Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 82251016ad83SmrgAC_SUBST([DLLTOOL]) 82261016ad83Smrg]) 82271016ad83Smrg 8228b9526c6aSmrg# _LT_DECL_FILECMD 8229b9526c6aSmrg# ---------------- 8230b9526c6aSmrg# Check for a file(cmd) program that can be used to detect file type and magic 8231b9526c6aSmrgm4_defun([_LT_DECL_FILECMD], 8232b9526c6aSmrg[AC_CHECK_TOOL([FILECMD], [file], [:]) 8233b9526c6aSmrg_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) 8234b9526c6aSmrg])# _LD_DECL_FILECMD 8235b9526c6aSmrg 82361016ad83Smrg# _LT_DECL_SED 82371016ad83Smrg# ------------ 82381016ad83Smrg# Check for a fully-functional sed program, that truncates 82391016ad83Smrg# as few characters as possible. Prefer GNU sed if found. 82401016ad83Smrgm4_defun([_LT_DECL_SED], 82411016ad83Smrg[AC_PROG_SED 82421016ad83Smrgtest -z "$SED" && SED=sed 82431016ad83SmrgXsed="$SED -e 1s/^X//" 82441016ad83Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 82451016ad83Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 82461016ad83Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 82471016ad83Smrg])# _LT_DECL_SED 82481016ad83Smrg 82491016ad83Smrgm4_ifndef([AC_PROG_SED], [ 82501016ad83Smrg############################################################ 82511016ad83Smrg# NOTE: This macro has been submitted for inclusion into # 82521016ad83Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 82531016ad83Smrg# a released version of Autoconf we should remove this # 82541016ad83Smrg# macro and use it instead. # 82551016ad83Smrg############################################################ 82561016ad83Smrg 82571016ad83Smrgm4_defun([AC_PROG_SED], 82581016ad83Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 82591016ad83SmrgAC_CACHE_VAL(lt_cv_path_SED, 82601016ad83Smrg[# Loop through the user's path and test for sed and gsed. 82611016ad83Smrg# Then use that list of sed's as ones to test for truncation. 82621016ad83Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 82631016ad83Smrgfor as_dir in $PATH 82641016ad83Smrgdo 82651016ad83Smrg IFS=$as_save_IFS 82661016ad83Smrg test -z "$as_dir" && as_dir=. 82671016ad83Smrg for lt_ac_prog in sed gsed; do 82681016ad83Smrg for ac_exec_ext in '' $ac_executable_extensions; do 82691016ad83Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 82701016ad83Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 82711016ad83Smrg fi 82721016ad83Smrg done 82731016ad83Smrg done 82741016ad83Smrgdone 82751016ad83SmrgIFS=$as_save_IFS 82761016ad83Smrglt_ac_max=0 82771016ad83Smrglt_ac_count=0 82781016ad83Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 82791016ad83Smrg# along with /bin/sed that truncates output. 82801016ad83Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 82817204935cSmrg test ! -f "$lt_ac_sed" && continue 82821016ad83Smrg cat /dev/null > conftest.in 82831016ad83Smrg lt_ac_count=0 82841016ad83Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 82851016ad83Smrg # Check for GNU sed and select it if it is found. 82861016ad83Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 82871016ad83Smrg lt_cv_path_SED=$lt_ac_sed 82881016ad83Smrg break 82891016ad83Smrg fi 82901016ad83Smrg while true; do 82911016ad83Smrg cat conftest.in conftest.in >conftest.tmp 82921016ad83Smrg mv conftest.tmp conftest.in 82931016ad83Smrg cp conftest.in conftest.nl 82941016ad83Smrg echo >>conftest.nl 82951016ad83Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 82961016ad83Smrg cmp -s conftest.out conftest.nl || break 82971016ad83Smrg # 10000 chars as input seems more than enough 82987204935cSmrg test 10 -lt "$lt_ac_count" && break 82991016ad83Smrg lt_ac_count=`expr $lt_ac_count + 1` 83007204935cSmrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 83011016ad83Smrg lt_ac_max=$lt_ac_count 83021016ad83Smrg lt_cv_path_SED=$lt_ac_sed 83031016ad83Smrg fi 83041016ad83Smrg done 83051016ad83Smrgdone 83061016ad83Smrg]) 83071016ad83SmrgSED=$lt_cv_path_SED 83081016ad83SmrgAC_SUBST([SED]) 83091016ad83SmrgAC_MSG_RESULT([$SED]) 83101016ad83Smrg])#AC_PROG_SED 83111016ad83Smrg])#m4_ifndef 83121016ad83Smrg 83131016ad83Smrg# Old name: 83141016ad83SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 83151016ad83Smrgdnl aclocal-1.4 backwards compatibility: 83161016ad83Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 83171016ad83Smrg 83181016ad83Smrg 83191016ad83Smrg# _LT_CHECK_SHELL_FEATURES 83201016ad83Smrg# ------------------------ 83211016ad83Smrg# Find out whether the shell is Bourne or XSI compatible, 83221016ad83Smrg# or has some other useful features. 83231016ad83Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 83247204935cSmrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 83251016ad83Smrg lt_unset=unset 83261016ad83Smrgelse 83271016ad83Smrg lt_unset=false 83281016ad83Smrgfi 83291016ad83Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 83301016ad83Smrg 83311016ad83Smrg# test EBCDIC or ASCII 83321016ad83Smrgcase `echo X|tr X '\101'` in 83331016ad83Smrg A) # ASCII based system 83341016ad83Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 83351016ad83Smrg lt_SP2NL='tr \040 \012' 83361016ad83Smrg lt_NL2SP='tr \015\012 \040\040' 83371016ad83Smrg ;; 83381016ad83Smrg *) # EBCDIC based system 83391016ad83Smrg lt_SP2NL='tr \100 \n' 83401016ad83Smrg lt_NL2SP='tr \r\n \100\100' 83411016ad83Smrg ;; 83421016ad83Smrgesac 83431016ad83Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 83441016ad83Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 83451016ad83Smrg])# _LT_CHECK_SHELL_FEATURES 83461016ad83Smrg 83471016ad83Smrg 83481016ad83Smrg# _LT_PATH_CONVERSION_FUNCTIONS 83491016ad83Smrg# ----------------------------- 83507204935cSmrg# Determine what file name conversion functions should be used by 83511016ad83Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 83521016ad83Smrg# for certain cross-compile configurations and native mingw. 83531016ad83Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 83541016ad83Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 83551016ad83SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 83561016ad83SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 83571016ad83SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 83581016ad83Smrg[case $host in 83591016ad83Smrg *-*-mingw* ) 83601016ad83Smrg case $build in 83611016ad83Smrg *-*-mingw* ) # actually msys 83621016ad83Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 83631016ad83Smrg ;; 83641016ad83Smrg *-*-cygwin* ) 83651016ad83Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 83661016ad83Smrg ;; 83671016ad83Smrg * ) # otherwise, assume *nix 83681016ad83Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 83691016ad83Smrg ;; 83701016ad83Smrg esac 83711016ad83Smrg ;; 83721016ad83Smrg *-*-cygwin* ) 83731016ad83Smrg case $build in 83741016ad83Smrg *-*-mingw* ) # actually msys 83751016ad83Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 83761016ad83Smrg ;; 83771016ad83Smrg *-*-cygwin* ) 83781016ad83Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 83791016ad83Smrg ;; 83801016ad83Smrg * ) # otherwise, assume *nix 83811016ad83Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 83821016ad83Smrg ;; 83831016ad83Smrg esac 83841016ad83Smrg ;; 83851016ad83Smrg * ) # unhandled hosts (and "normal" native builds) 83861016ad83Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 83871016ad83Smrg ;; 83881016ad83Smrgesac 83891016ad83Smrg]) 83901016ad83Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 83911016ad83SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 83921016ad83Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 83931016ad83Smrg [0], [convert $build file names to $host format])dnl 83941016ad83Smrg 83951016ad83SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 83961016ad83SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 83971016ad83Smrg[#assume ordinary cross tools, or native build. 83981016ad83Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 83991016ad83Smrgcase $host in 84001016ad83Smrg *-*-mingw* ) 84011016ad83Smrg case $build in 84021016ad83Smrg *-*-mingw* ) # actually msys 84031016ad83Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 84041016ad83Smrg ;; 84051016ad83Smrg esac 84061016ad83Smrg ;; 84071016ad83Smrgesac 84081016ad83Smrg]) 84091016ad83Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 84101016ad83SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 84111016ad83Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 84121016ad83Smrg [0], [convert $build files to toolchain format])dnl 84131016ad83Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 8414