18bf5c682Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 28bf5c682Smrg# 30a1d3ae0Smrg# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software 40a1d3ae0Smrg# Foundation, Inc. 58bf5c682Smrg# Written by Gordon Matzigkeit, 1996 68bf5c682Smrg# 78bf5c682Smrg# This file is free software; the Free Software Foundation gives 88bf5c682Smrg# unlimited permission to copy and/or distribute it, with or without 98bf5c682Smrg# modifications, as long as this notice is preserved. 108bf5c682Smrg 118bf5c682Smrgm4_define([_LT_COPYING], [dnl 128bf5c682Smrg# Copyright (C) 2014 Free Software Foundation, Inc. 138bf5c682Smrg# This is free software; see the source for copying conditions. There is NO 148bf5c682Smrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 158bf5c682Smrg 168bf5c682Smrg# GNU Libtool is free software; you can redistribute it and/or modify 178bf5c682Smrg# it under the terms of the GNU General Public License as published by 188bf5c682Smrg# the Free Software Foundation; either version 2 of of the License, or 198bf5c682Smrg# (at your option) any later version. 208bf5c682Smrg# 218bf5c682Smrg# As a special exception to the GNU General Public License, if you 228bf5c682Smrg# distribute this file as part of a program or library that is built 238bf5c682Smrg# using GNU Libtool, you may include this file under the same 248bf5c682Smrg# distribution terms that you use for the rest of that program. 258bf5c682Smrg# 268bf5c682Smrg# GNU Libtool is distributed in the hope that it will be useful, but 278bf5c682Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 288bf5c682Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 298bf5c682Smrg# GNU General Public License for more details. 308bf5c682Smrg# 318bf5c682Smrg# You should have received a copy of the GNU General Public License 328bf5c682Smrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 338bf5c682Smrg]) 348bf5c682Smrg 350a1d3ae0Smrg# serial 59 LT_INIT 368bf5c682Smrg 378bf5c682Smrg 388bf5c682Smrg# LT_PREREQ(VERSION) 398bf5c682Smrg# ------------------ 408bf5c682Smrg# Complain and exit if this libtool version is less that VERSION. 418bf5c682Smrgm4_defun([LT_PREREQ], 428bf5c682Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 438bf5c682Smrg [m4_default([$3], 448bf5c682Smrg [m4_fatal([Libtool version $1 or higher is required], 458bf5c682Smrg 63)])], 468bf5c682Smrg [$2])]) 478bf5c682Smrg 488bf5c682Smrg 498bf5c682Smrg# _LT_CHECK_BUILDDIR 508bf5c682Smrg# ------------------ 518bf5c682Smrg# Complain if the absolute build directory name contains unusual characters 528bf5c682Smrgm4_defun([_LT_CHECK_BUILDDIR], 538bf5c682Smrg[case `pwd` in 548bf5c682Smrg *\ * | *\ *) 558bf5c682Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 568bf5c682Smrgesac 578bf5c682Smrg]) 588bf5c682Smrg 598bf5c682Smrg 608bf5c682Smrg# LT_INIT([OPTIONS]) 618bf5c682Smrg# ------------------ 628bf5c682SmrgAC_DEFUN([LT_INIT], 638bf5c682Smrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 648bf5c682SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 658bf5c682SmrgAC_BEFORE([$0], [LT_LANG])dnl 668bf5c682SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 678bf5c682SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 688bf5c682Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 698bf5c682Smrg 708bf5c682Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 718bf5c682Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 728bf5c682Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 738bf5c682Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 748bf5c682Smrgdnl unless we require an AC_DEFUNed macro: 758bf5c682SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 768bf5c682SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 778bf5c682SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 788bf5c682SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 798bf5c682Smrgm4_require([_LT_PROG_LTMAIN])dnl 808bf5c682Smrg 818bf5c682Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 828bf5c682Smrg 838bf5c682Smrgdnl Parse OPTIONS 848bf5c682Smrg_LT_SET_OPTIONS([$0], [$1]) 858bf5c682Smrg 868bf5c682Smrg# This can be used to rebuild libtool when needed 878bf5c682SmrgLIBTOOL_DEPS=$ltmain 888bf5c682Smrg 898bf5c682Smrg# Always use our own libtool. 908bf5c682SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 918bf5c682SmrgAC_SUBST(LIBTOOL)dnl 928bf5c682Smrg 938bf5c682Smrg_LT_SETUP 948bf5c682Smrg 958bf5c682Smrg# Only expand once: 968bf5c682Smrgm4_define([LT_INIT]) 978bf5c682Smrg])# LT_INIT 988bf5c682Smrg 998bf5c682Smrg# Old names: 1008bf5c682SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 1018bf5c682SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 1028bf5c682Smrgdnl aclocal-1.4 backwards compatibility: 1038bf5c682Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 1048bf5c682Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1058bf5c682Smrg 1068bf5c682Smrg 1078bf5c682Smrg# _LT_PREPARE_CC_BASENAME 1088bf5c682Smrg# ----------------------- 1098bf5c682Smrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 1108bf5c682Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 1118bf5c682Smrgfunc_cc_basename () 1128bf5c682Smrg{ 1138bf5c682Smrg for cc_temp in @S|@*""; do 1148bf5c682Smrg case $cc_temp in 1158bf5c682Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 1168bf5c682Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 1178bf5c682Smrg \-*) ;; 1188bf5c682Smrg *) break;; 1198bf5c682Smrg esac 1208bf5c682Smrg done 1218bf5c682Smrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 1228bf5c682Smrg} 1238bf5c682Smrg])# _LT_PREPARE_CC_BASENAME 1248bf5c682Smrg 1258bf5c682Smrg 1268bf5c682Smrg# _LT_CC_BASENAME(CC) 1278bf5c682Smrg# ------------------- 1288bf5c682Smrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 1298bf5c682Smrg# but that macro is also expanded into generated libtool script, which 1308bf5c682Smrg# arranges for $SED and $ECHO to be set by different means. 1318bf5c682Smrgm4_defun([_LT_CC_BASENAME], 1328bf5c682Smrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 1338bf5c682SmrgAC_REQUIRE([_LT_DECL_SED])dnl 1348bf5c682SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1358bf5c682Smrgfunc_cc_basename $1 1368bf5c682Smrgcc_basename=$func_cc_basename_result 1378bf5c682Smrg]) 1388bf5c682Smrg 1398bf5c682Smrg 1408bf5c682Smrg# _LT_FILEUTILS_DEFAULTS 1418bf5c682Smrg# ---------------------- 1428bf5c682Smrg# It is okay to use these file commands and assume they have been set 1438bf5c682Smrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 1448bf5c682Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 1458bf5c682Smrg[: ${CP="cp -f"} 1468bf5c682Smrg: ${MV="mv -f"} 1478bf5c682Smrg: ${RM="rm -f"} 1488bf5c682Smrg])# _LT_FILEUTILS_DEFAULTS 1498bf5c682Smrg 1508bf5c682Smrg 1518bf5c682Smrg# _LT_SETUP 1528bf5c682Smrg# --------- 1538bf5c682Smrgm4_defun([_LT_SETUP], 1548bf5c682Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1558bf5c682SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 1568bf5c682SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 1578bf5c682SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1588bf5c682Smrg 1598bf5c682Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 1608bf5c682Smrgdnl 1618bf5c682Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 1628bf5c682Smrg_LT_DECL([], [host], [0])dnl 1638bf5c682Smrg_LT_DECL([], [host_os], [0])dnl 1648bf5c682Smrgdnl 1658bf5c682Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 1668bf5c682Smrg_LT_DECL([], [build], [0])dnl 1678bf5c682Smrg_LT_DECL([], [build_os], [0])dnl 1688bf5c682Smrgdnl 1698bf5c682SmrgAC_REQUIRE([AC_PROG_CC])dnl 1708bf5c682SmrgAC_REQUIRE([LT_PATH_LD])dnl 1718bf5c682SmrgAC_REQUIRE([LT_PATH_NM])dnl 1728bf5c682Smrgdnl 1738bf5c682SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 1748bf5c682Smrgtest -z "$LN_S" && LN_S="ln -s" 1758bf5c682Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 1768bf5c682Smrgdnl 1778bf5c682SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 1788bf5c682Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 1798bf5c682Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 1808bf5c682Smrgdnl 1818bf5c682Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1828bf5c682Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 1838bf5c682Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 1848bf5c682Smrgm4_require([_LT_CMD_RELOAD])dnl 1850a1d3ae0Smrgm4_require([_LT_DECL_FILECMD])dnl 1868bf5c682Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 1878bf5c682Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 1888bf5c682Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 1898bf5c682Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 1908bf5c682Smrgm4_require([_LT_WITH_SYSROOT])dnl 1918bf5c682Smrgm4_require([_LT_CMD_TRUNCATE])dnl 1928bf5c682Smrg 1938bf5c682Smrg_LT_CONFIG_LIBTOOL_INIT([ 1948bf5c682Smrg# See if we are running on zsh, and set the options that allow our 1958bf5c682Smrg# commands through without removal of \ escapes INIT. 1968bf5c682Smrgif test -n "\${ZSH_VERSION+set}"; then 1978bf5c682Smrg setopt NO_GLOB_SUBST 1988bf5c682Smrgfi 1998bf5c682Smrg]) 2008bf5c682Smrgif test -n "${ZSH_VERSION+set}"; then 2018bf5c682Smrg setopt NO_GLOB_SUBST 2028bf5c682Smrgfi 2038bf5c682Smrg 2048bf5c682Smrg_LT_CHECK_OBJDIR 2058bf5c682Smrg 2068bf5c682Smrgm4_require([_LT_TAG_COMPILER])dnl 2078bf5c682Smrg 2088bf5c682Smrgcase $host_os in 2098bf5c682Smrgaix3*) 2108bf5c682Smrg # AIX sometimes has problems with the GCC collect2 program. For some 2118bf5c682Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 2128bf5c682Smrg # vanish in a puff of smoke. 2138bf5c682Smrg if test set != "${COLLECT_NAMES+set}"; then 2148bf5c682Smrg COLLECT_NAMES= 2158bf5c682Smrg export COLLECT_NAMES 2168bf5c682Smrg fi 2178bf5c682Smrg ;; 2188bf5c682Smrgesac 2198bf5c682Smrg 2208bf5c682Smrg# Global variables: 2218bf5c682Smrgofile=libtool 2228bf5c682Smrgcan_build_shared=yes 2238bf5c682Smrg 2240a1d3ae0Smrg# All known linkers require a '.a' archive for static linking (except MSVC and 2250a1d3ae0Smrg# ICC, which need '.lib'). 2268bf5c682Smrglibext=a 2278bf5c682Smrg 2288bf5c682Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 2298bf5c682Smrg 2308bf5c682Smrgold_CC=$CC 2318bf5c682Smrgold_CFLAGS=$CFLAGS 2328bf5c682Smrg 2338bf5c682Smrg# Set sane defaults for various variables 2348bf5c682Smrgtest -z "$CC" && CC=cc 2358bf5c682Smrgtest -z "$LTCC" && LTCC=$CC 2368bf5c682Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 2378bf5c682Smrgtest -z "$LD" && LD=ld 2388bf5c682Smrgtest -z "$ac_objext" && ac_objext=o 2398bf5c682Smrg 2408bf5c682Smrg_LT_CC_BASENAME([$compiler]) 2418bf5c682Smrg 2428bf5c682Smrg# Only perform the check for file, if the check method requires it 2438bf5c682Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 2448bf5c682Smrgcase $deplibs_check_method in 2458bf5c682Smrgfile_magic*) 2468bf5c682Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2478bf5c682Smrg _LT_PATH_MAGIC 2488bf5c682Smrg fi 2498bf5c682Smrg ;; 2508bf5c682Smrgesac 2518bf5c682Smrg 2528bf5c682Smrg# Use C for the default configuration in the libtool script 2538bf5c682SmrgLT_SUPPORTED_TAG([CC]) 2548bf5c682Smrg_LT_LANG_C_CONFIG 2558bf5c682Smrg_LT_LANG_DEFAULT_CONFIG 2568bf5c682Smrg_LT_CONFIG_COMMANDS 2578bf5c682Smrg])# _LT_SETUP 2588bf5c682Smrg 2598bf5c682Smrg 2608bf5c682Smrg# _LT_PREPARE_SED_QUOTE_VARS 2618bf5c682Smrg# -------------------------- 2628bf5c682Smrg# Define a few sed substitution that help us do robust quoting. 2638bf5c682Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 2648bf5c682Smrg[# Backslashify metacharacters that are still active within 2658bf5c682Smrg# double-quoted strings. 2668bf5c682Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 2678bf5c682Smrg 2688bf5c682Smrg# Same as above, but do not quote variable references. 2698bf5c682Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 2708bf5c682Smrg 2718bf5c682Smrg# Sed substitution to delay expansion of an escaped shell variable in a 2728bf5c682Smrg# double_quote_subst'ed string. 2738bf5c682Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 2748bf5c682Smrg 2758bf5c682Smrg# Sed substitution to delay expansion of an escaped single quote. 2768bf5c682Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 2778bf5c682Smrg 2788bf5c682Smrg# Sed substitution to avoid accidental globbing in evaled expressions 2798bf5c682Smrgno_glob_subst='s/\*/\\\*/g' 2808bf5c682Smrg]) 2818bf5c682Smrg 2828bf5c682Smrg# _LT_PROG_LTMAIN 2838bf5c682Smrg# --------------- 2848bf5c682Smrg# Note that this code is called both from 'configure', and 'config.status' 2858bf5c682Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 2868bf5c682Smrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 2878bf5c682Smrg# so we pass a copy along to make sure it has a sensible value anyway. 2888bf5c682Smrgm4_defun([_LT_PROG_LTMAIN], 2898bf5c682Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 2908bf5c682Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 2918bf5c682Smrgltmain=$ac_aux_dir/ltmain.sh 2928bf5c682Smrg])# _LT_PROG_LTMAIN 2938bf5c682Smrg 2948bf5c682Smrg 2958bf5c682Smrg## ------------------------------------- ## 2968bf5c682Smrg## Accumulate code for creating libtool. ## 2978bf5c682Smrg## ------------------------------------- ## 2988bf5c682Smrg 2998bf5c682Smrg# So that we can recreate a full libtool script including additional 3008bf5c682Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 3018bf5c682Smrg# in macros and then make a single call at the end using the 'libtool' 3028bf5c682Smrg# label. 3038bf5c682Smrg 3048bf5c682Smrg 3058bf5c682Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 3068bf5c682Smrg# ---------------------------------------- 3078bf5c682Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3088bf5c682Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 3098bf5c682Smrg[m4_ifval([$1], 3108bf5c682Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3118bf5c682Smrg [$1 3128bf5c682Smrg])])]) 3138bf5c682Smrg 3148bf5c682Smrg# Initialize. 3158bf5c682Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 3168bf5c682Smrg 3178bf5c682Smrg 3188bf5c682Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 3198bf5c682Smrg# ------------------------------ 3208bf5c682Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3218bf5c682Smrgm4_define([_LT_CONFIG_LIBTOOL], 3228bf5c682Smrg[m4_ifval([$1], 3238bf5c682Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3248bf5c682Smrg [$1 3258bf5c682Smrg])])]) 3268bf5c682Smrg 3278bf5c682Smrg# Initialize. 3288bf5c682Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3298bf5c682Smrg 3308bf5c682Smrg 3318bf5c682Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3328bf5c682Smrg# ----------------------------------------------------- 3338bf5c682Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 3348bf5c682Smrg[_LT_CONFIG_LIBTOOL([$1]) 3358bf5c682Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 3368bf5c682Smrg]) 3378bf5c682Smrg 3388bf5c682Smrg 3398bf5c682Smrg# _LT_FORMAT_COMMENT([COMMENT]) 3408bf5c682Smrg# ----------------------------- 3418bf5c682Smrg# Add leading comment marks to the start of each line, and a trailing 3428bf5c682Smrg# full-stop to the whole comment if one is not present already. 3438bf5c682Smrgm4_define([_LT_FORMAT_COMMENT], 3448bf5c682Smrg[m4_ifval([$1], [ 3458bf5c682Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3468bf5c682Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3478bf5c682Smrg)]) 3488bf5c682Smrg 3498bf5c682Smrg 3508bf5c682Smrg 3518bf5c682Smrg## ------------------------ ## 3528bf5c682Smrg## FIXME: Eliminate VARNAME ## 3538bf5c682Smrg## ------------------------ ## 3548bf5c682Smrg 3558bf5c682Smrg 3568bf5c682Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3578bf5c682Smrg# ------------------------------------------------------------------- 3588bf5c682Smrg# CONFIGNAME is the name given to the value in the libtool script. 3598bf5c682Smrg# VARNAME is the (base) name used in the configure script. 3608bf5c682Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3618bf5c682Smrg# VARNAME. Any other value will be used directly. 3628bf5c682Smrgm4_define([_LT_DECL], 3638bf5c682Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3648bf5c682Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3658bf5c682Smrg [m4_ifval([$1], [$1], [$2])]) 3668bf5c682Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3678bf5c682Smrg m4_ifval([$4], 3688bf5c682Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3698bf5c682Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 3708bf5c682Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 3718bf5c682Smrg]) 3728bf5c682Smrg 3738bf5c682Smrg 3748bf5c682Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3758bf5c682Smrg# -------------------------------------------------------- 3768bf5c682Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3778bf5c682Smrg 3788bf5c682Smrg 3798bf5c682Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3808bf5c682Smrg# ------------------------------------------------ 3818bf5c682Smrgm4_define([lt_decl_tag_varnames], 3828bf5c682Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 3838bf5c682Smrg 3848bf5c682Smrg 3858bf5c682Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 3868bf5c682Smrg# --------------------------------------------------------- 3878bf5c682Smrgm4_define([_lt_decl_filter], 3888bf5c682Smrg[m4_case([$#], 3898bf5c682Smrg [0], [m4_fatal([$0: too few arguments: $#])], 3908bf5c682Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 3918bf5c682Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 3928bf5c682Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 3938bf5c682Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 3948bf5c682Smrg]) 3958bf5c682Smrg 3968bf5c682Smrg 3978bf5c682Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 3988bf5c682Smrg# -------------------------------------------------- 3998bf5c682Smrgm4_define([lt_decl_quote_varnames], 4008bf5c682Smrg[_lt_decl_filter([value], [1], $@)]) 4018bf5c682Smrg 4028bf5c682Smrg 4038bf5c682Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 4048bf5c682Smrg# --------------------------------------------------- 4058bf5c682Smrgm4_define([lt_decl_dquote_varnames], 4068bf5c682Smrg[_lt_decl_filter([value], [2], $@)]) 4078bf5c682Smrg 4088bf5c682Smrg 4098bf5c682Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 4108bf5c682Smrg# --------------------------------------------------- 4118bf5c682Smrgm4_define([lt_decl_varnames_tagged], 4128bf5c682Smrg[m4_assert([$# <= 2])dnl 4138bf5c682Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 4148bf5c682Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 4158bf5c682Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 4168bf5c682Smrgm4_define([_lt_decl_varnames_tagged], 4178bf5c682Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 4188bf5c682Smrg 4198bf5c682Smrg 4208bf5c682Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 4218bf5c682Smrg# ------------------------------------------------ 4228bf5c682Smrgm4_define([lt_decl_all_varnames], 4238bf5c682Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 4248bf5c682Smrg m4_if([$2], [], 4258bf5c682Smrg m4_quote(lt_decl_varnames), 4268bf5c682Smrg m4_quote(m4_shift($@))))[]dnl 4278bf5c682Smrg]) 4288bf5c682Smrgm4_define([_lt_decl_all_varnames], 4298bf5c682Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 4308bf5c682Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 4318bf5c682Smrg]) 4328bf5c682Smrg 4338bf5c682Smrg 4348bf5c682Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 4358bf5c682Smrg# ------------------------------------ 4368bf5c682Smrg# Quote a variable value, and forward it to 'config.status' so that its 4378bf5c682Smrg# declaration there will have the same value as in 'configure'. VARNAME 4388bf5c682Smrg# must have a single quote delimited value for this to work. 4398bf5c682Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 4408bf5c682Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 4418bf5c682Smrg 4428bf5c682Smrg 4438bf5c682Smrg# _LT_CONFIG_STATUS_DECLARATIONS 4448bf5c682Smrg# ------------------------------ 4458bf5c682Smrg# We delimit libtool config variables with single quotes, so when 4468bf5c682Smrg# we write them to config.status, we have to be sure to quote all 4478bf5c682Smrg# embedded single quotes properly. In configure, this macro expands 4488bf5c682Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 4498bf5c682Smrg# 4508bf5c682Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 4518bf5c682Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 4528bf5c682Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 4538bf5c682Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 4548bf5c682Smrg 4558bf5c682Smrg 4568bf5c682Smrg# _LT_LIBTOOL_TAGS 4578bf5c682Smrg# ---------------- 4588bf5c682Smrg# Output comment and list of tags supported by the script 4598bf5c682Smrgm4_defun([_LT_LIBTOOL_TAGS], 4608bf5c682Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 4618bf5c682Smrgavailable_tags='_LT_TAGS'dnl 4628bf5c682Smrg]) 4638bf5c682Smrg 4648bf5c682Smrg 4658bf5c682Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 4668bf5c682Smrg# ----------------------------------- 4678bf5c682Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 4688bf5c682Smrg# expand to a commented shell variable setting: 4698bf5c682Smrg# 4708bf5c682Smrg# # Some comment about what VAR is for. 4718bf5c682Smrg# visible_name=$lt_internal_name 4728bf5c682Smrgm4_define([_LT_LIBTOOL_DECLARE], 4738bf5c682Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 4748bf5c682Smrg [description])))[]dnl 4758bf5c682Smrgm4_pushdef([_libtool_name], 4768bf5c682Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 4778bf5c682Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 4788bf5c682Smrg [0], [_libtool_name=[$]$1], 4798bf5c682Smrg [1], [_libtool_name=$lt_[]$1], 4808bf5c682Smrg [2], [_libtool_name=$lt_[]$1], 4818bf5c682Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 4828bf5c682Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 4838bf5c682Smrg]) 4848bf5c682Smrg 4858bf5c682Smrg 4868bf5c682Smrg# _LT_LIBTOOL_CONFIG_VARS 4878bf5c682Smrg# ----------------------- 4888bf5c682Smrg# Produce commented declarations of non-tagged libtool config variables 4898bf5c682Smrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 4908bf5c682Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 4918bf5c682Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 4928bf5c682Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 4938bf5c682Smrg[m4_foreach([_lt_var], 4948bf5c682Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 4958bf5c682Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 4968bf5c682Smrg 4978bf5c682Smrg 4988bf5c682Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 4998bf5c682Smrg# ------------------------- 5008bf5c682Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 5018bf5c682Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 5028bf5c682Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 5038bf5c682Smrg 5048bf5c682Smrg 5058bf5c682Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 5068bf5c682Smrg# ------------------------------ 5078bf5c682Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 5088bf5c682Smrg 5098bf5c682Smrg 5108bf5c682Smrg# _LT_CONFIG_COMMANDS 5118bf5c682Smrg# ------------------- 5128bf5c682Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 5138bf5c682Smrg# variables for single and double quote escaping we saved from calls 5148bf5c682Smrg# to _LT_DECL, we can put quote escaped variables declarations 5158bf5c682Smrg# into 'config.status', and then the shell code to quote escape them in 5168bf5c682Smrg# for loops in 'config.status'. Finally, any additional code accumulated 5178bf5c682Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 5188bf5c682Smrgm4_defun([_LT_CONFIG_COMMANDS], 5198bf5c682Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 5208bf5c682Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 5218bf5c682Smrg dnl instead of duplicating it all over again into config.status, 5228bf5c682Smrg dnl then we will have config.status run $CONFIG_LT later, so it 5238bf5c682Smrg dnl needs to know what name is stored there: 5248bf5c682Smrg [AC_CONFIG_COMMANDS([libtool], 5258bf5c682Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 5268bf5c682Smrg dnl If the libtool generation code is destined for config.status, 5278bf5c682Smrg dnl expand the accumulated commands and init code now: 5288bf5c682Smrg [AC_CONFIG_COMMANDS([libtool], 5298bf5c682Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 5308bf5c682Smrg])#_LT_CONFIG_COMMANDS 5318bf5c682Smrg 5328bf5c682Smrg 5338bf5c682Smrg# Initialize. 5348bf5c682Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 5358bf5c682Smrg[ 5368bf5c682Smrg 5378bf5c682Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 5388bf5c682Smrg# if CDPATH is set. 5398bf5c682Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 5408bf5c682Smrg 5418bf5c682Smrgsed_quote_subst='$sed_quote_subst' 5428bf5c682Smrgdouble_quote_subst='$double_quote_subst' 5438bf5c682Smrgdelay_variable_subst='$delay_variable_subst' 5448bf5c682Smrg_LT_CONFIG_STATUS_DECLARATIONS 5458bf5c682SmrgLTCC='$LTCC' 5468bf5c682SmrgLTCFLAGS='$LTCFLAGS' 5478bf5c682Smrgcompiler='$compiler_DEFAULT' 5488bf5c682Smrg 5498bf5c682Smrg# A function that is used when there is no print builtin or printf. 5508bf5c682Smrgfunc_fallback_echo () 5518bf5c682Smrg{ 5528bf5c682Smrg eval 'cat <<_LTECHO_EOF 5538bf5c682Smrg\$[]1 5548bf5c682Smrg_LTECHO_EOF' 5558bf5c682Smrg} 5568bf5c682Smrg 5578bf5c682Smrg# Quote evaled strings. 5588bf5c682Smrgfor var in lt_decl_all_varnames([[ \ 5598bf5c682Smrg]], lt_decl_quote_varnames); do 5608bf5c682Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5618bf5c682Smrg *[[\\\\\\\`\\"\\\$]]*) 5628bf5c682Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 5638bf5c682Smrg ;; 5648bf5c682Smrg *) 5658bf5c682Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5668bf5c682Smrg ;; 5678bf5c682Smrg esac 5688bf5c682Smrgdone 5698bf5c682Smrg 5708bf5c682Smrg# Double-quote double-evaled strings. 5718bf5c682Smrgfor var in lt_decl_all_varnames([[ \ 5728bf5c682Smrg]], lt_decl_dquote_varnames); do 5738bf5c682Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5748bf5c682Smrg *[[\\\\\\\`\\"\\\$]]*) 5758bf5c682Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 5768bf5c682Smrg ;; 5778bf5c682Smrg *) 5788bf5c682Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5798bf5c682Smrg ;; 5808bf5c682Smrg esac 5818bf5c682Smrgdone 5828bf5c682Smrg 5838bf5c682Smrg_LT_OUTPUT_LIBTOOL_INIT 5848bf5c682Smrg]) 5858bf5c682Smrg 5868bf5c682Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 5878bf5c682Smrg# ------------------------------------ 5888bf5c682Smrg# Generate a child script FILE with all initialization necessary to 5898bf5c682Smrg# reuse the environment learned by the parent script, and make the 5908bf5c682Smrg# file executable. If COMMENT is supplied, it is inserted after the 5918bf5c682Smrg# '#!' sequence but before initialization text begins. After this 5928bf5c682Smrg# macro, additional text can be appended to FILE to form the body of 5938bf5c682Smrg# the child script. The macro ends with non-zero status if the 5948bf5c682Smrg# file could not be fully written (such as if the disk is full). 5958bf5c682Smrgm4_ifdef([AS_INIT_GENERATED], 5968bf5c682Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 5978bf5c682Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 5988bf5c682Smrg[m4_require([AS_PREPARE])]dnl 5998bf5c682Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 6008bf5c682Smrg[lt_write_fail=0 6018bf5c682Smrgcat >$1 <<_ASEOF || lt_write_fail=1 6028bf5c682Smrg#! $SHELL 6038bf5c682Smrg# Generated by $as_me. 6048bf5c682Smrg$2 6058bf5c682SmrgSHELL=\${CONFIG_SHELL-$SHELL} 6068bf5c682Smrgexport SHELL 6078bf5c682Smrg_ASEOF 6088bf5c682Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 6098bf5c682SmrgAS_SHELL_SANITIZE 6108bf5c682Smrg_AS_PREPARE 6118bf5c682Smrgexec AS_MESSAGE_FD>&1 6128bf5c682Smrg_ASEOF 6138bf5c682Smrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 6148bf5c682Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 6158bf5c682Smrg 6168bf5c682Smrg# LT_OUTPUT 6178bf5c682Smrg# --------- 6188bf5c682Smrg# This macro allows early generation of the libtool script (before 6198bf5c682Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 6208bf5c682Smrg# tests. 6218bf5c682SmrgAC_DEFUN([LT_OUTPUT], 6228bf5c682Smrg[: ${CONFIG_LT=./config.lt} 6238bf5c682SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 6248bf5c682Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 6258bf5c682Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 6268bf5c682Smrg 6278bf5c682Smrgcat >>"$CONFIG_LT" <<\_LTEOF 6288bf5c682Smrglt_cl_silent=false 6298bf5c682Smrgexec AS_MESSAGE_LOG_FD>>config.log 6308bf5c682Smrg{ 6318bf5c682Smrg echo 6328bf5c682Smrg AS_BOX([Running $as_me.]) 6338bf5c682Smrg} >&AS_MESSAGE_LOG_FD 6348bf5c682Smrg 6358bf5c682Smrglt_cl_help="\ 6368bf5c682Smrg'$as_me' creates a local libtool stub from the current configuration, 6378bf5c682Smrgfor use in further configure time tests before the real libtool is 6388bf5c682Smrggenerated. 6398bf5c682Smrg 6408bf5c682SmrgUsage: $[0] [[OPTIONS]] 6418bf5c682Smrg 6428bf5c682Smrg -h, --help print this help, then exit 6438bf5c682Smrg -V, --version print version number, then exit 6448bf5c682Smrg -q, --quiet do not print progress messages 6458bf5c682Smrg -d, --debug don't remove temporary files 6468bf5c682Smrg 6478bf5c682SmrgReport bugs to <bug-libtool@gnu.org>." 6488bf5c682Smrg 6498bf5c682Smrglt_cl_version="\ 6508bf5c682Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 6518bf5c682Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 6528bf5c682Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 6538bf5c682Smrg 6548bf5c682SmrgCopyright (C) 2011 Free Software Foundation, Inc. 6558bf5c682SmrgThis config.lt script is free software; the Free Software Foundation 6568bf5c682Smrggives unlimited permision to copy, distribute and modify it." 6578bf5c682Smrg 6588bf5c682Smrgwhile test 0 != $[#] 6598bf5c682Smrgdo 6608bf5c682Smrg case $[1] in 6618bf5c682Smrg --version | --v* | -V ) 6628bf5c682Smrg echo "$lt_cl_version"; exit 0 ;; 6638bf5c682Smrg --help | --h* | -h ) 6648bf5c682Smrg echo "$lt_cl_help"; exit 0 ;; 6658bf5c682Smrg --debug | --d* | -d ) 6668bf5c682Smrg debug=: ;; 6678bf5c682Smrg --quiet | --q* | --silent | --s* | -q ) 6688bf5c682Smrg lt_cl_silent=: ;; 6698bf5c682Smrg 6708bf5c682Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 6718bf5c682SmrgTry '$[0] --help' for more information.]) ;; 6728bf5c682Smrg 6738bf5c682Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 6748bf5c682SmrgTry '$[0] --help' for more information.]) ;; 6758bf5c682Smrg esac 6768bf5c682Smrg shift 6778bf5c682Smrgdone 6788bf5c682Smrg 6798bf5c682Smrgif $lt_cl_silent; then 6808bf5c682Smrg exec AS_MESSAGE_FD>/dev/null 6818bf5c682Smrgfi 6828bf5c682Smrg_LTEOF 6838bf5c682Smrg 6848bf5c682Smrgcat >>"$CONFIG_LT" <<_LTEOF 6858bf5c682Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 6868bf5c682Smrg_LTEOF 6878bf5c682Smrg 6888bf5c682Smrgcat >>"$CONFIG_LT" <<\_LTEOF 6898bf5c682SmrgAC_MSG_NOTICE([creating $ofile]) 6908bf5c682Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 6918bf5c682SmrgAS_EXIT(0) 6928bf5c682Smrg_LTEOF 6938bf5c682Smrgchmod +x "$CONFIG_LT" 6948bf5c682Smrg 6958bf5c682Smrg# configure is writing to config.log, but config.lt does its own redirection, 6968bf5c682Smrg# appending to config.log, which fails on DOS, as config.log is still kept 6978bf5c682Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 6988bf5c682Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 6998bf5c682Smrglt_cl_success=: 7008bf5c682Smrgtest yes = "$silent" && 7018bf5c682Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 7028bf5c682Smrgexec AS_MESSAGE_LOG_FD>/dev/null 7038bf5c682Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 7048bf5c682Smrgexec AS_MESSAGE_LOG_FD>>config.log 7058bf5c682Smrg$lt_cl_success || AS_EXIT(1) 7068bf5c682Smrg])# LT_OUTPUT 7078bf5c682Smrg 7088bf5c682Smrg 7098bf5c682Smrg# _LT_CONFIG(TAG) 7108bf5c682Smrg# --------------- 7118bf5c682Smrg# If TAG is the built-in tag, create an initial libtool script with a 7128bf5c682Smrg# default configuration from the untagged config vars. Otherwise add code 7138bf5c682Smrg# to config.status for appending the configuration named by TAG from the 7148bf5c682Smrg# matching tagged config vars. 7158bf5c682Smrgm4_defun([_LT_CONFIG], 7168bf5c682Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7178bf5c682Smrg_LT_CONFIG_SAVE_COMMANDS([ 7188bf5c682Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 7198bf5c682Smrg m4_if(_LT_TAG, [C], [ 7208bf5c682Smrg # See if we are running on zsh, and set the options that allow our 7218bf5c682Smrg # commands through without removal of \ escapes. 7228bf5c682Smrg if test -n "${ZSH_VERSION+set}"; then 7238bf5c682Smrg setopt NO_GLOB_SUBST 7248bf5c682Smrg fi 7258bf5c682Smrg 7268bf5c682Smrg cfgfile=${ofile}T 7278bf5c682Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 7288bf5c682Smrg $RM "$cfgfile" 7298bf5c682Smrg 7308bf5c682Smrg cat <<_LT_EOF >> "$cfgfile" 7318bf5c682Smrg#! $SHELL 7328bf5c682Smrg# Generated automatically by $as_me ($PACKAGE) $VERSION 7338bf5c682Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 7348bf5c682Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 7358bf5c682Smrg 7368bf5c682Smrg# Provide generalized library-building support services. 7378bf5c682Smrg# Written by Gordon Matzigkeit, 1996 7388bf5c682Smrg 7398bf5c682Smrg_LT_COPYING 7408bf5c682Smrg_LT_LIBTOOL_TAGS 7418bf5c682Smrg 7428bf5c682Smrg# Configured defaults for sys_lib_dlsearch_path munging. 7438bf5c682Smrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 7448bf5c682Smrg 7458bf5c682Smrg# ### BEGIN LIBTOOL CONFIG 7468bf5c682Smrg_LT_LIBTOOL_CONFIG_VARS 7478bf5c682Smrg_LT_LIBTOOL_TAG_VARS 7488bf5c682Smrg# ### END LIBTOOL CONFIG 7498bf5c682Smrg 7508bf5c682Smrg_LT_EOF 7518bf5c682Smrg 7528bf5c682Smrg cat <<'_LT_EOF' >> "$cfgfile" 7538bf5c682Smrg 7548bf5c682Smrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 7558bf5c682Smrg 7568bf5c682Smrg_LT_PREPARE_MUNGE_PATH_LIST 7578bf5c682Smrg_LT_PREPARE_CC_BASENAME 7588bf5c682Smrg 7598bf5c682Smrg# ### END FUNCTIONS SHARED WITH CONFIGURE 7608bf5c682Smrg 7618bf5c682Smrg_LT_EOF 7628bf5c682Smrg 7638bf5c682Smrg case $host_os in 7648bf5c682Smrg aix3*) 7658bf5c682Smrg cat <<\_LT_EOF >> "$cfgfile" 7668bf5c682Smrg# AIX sometimes has problems with the GCC collect2 program. For some 7678bf5c682Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 7688bf5c682Smrg# vanish in a puff of smoke. 7698bf5c682Smrgif test set != "${COLLECT_NAMES+set}"; then 7708bf5c682Smrg COLLECT_NAMES= 7718bf5c682Smrg export COLLECT_NAMES 7728bf5c682Smrgfi 7738bf5c682Smrg_LT_EOF 7748bf5c682Smrg ;; 7758bf5c682Smrg esac 7768bf5c682Smrg 7778bf5c682Smrg _LT_PROG_LTMAIN 7788bf5c682Smrg 7798bf5c682Smrg # We use sed instead of cat because bash on DJGPP gets confused if 7808bf5c682Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 7818bf5c682Smrg # text mode, it properly converts lines to CR/LF. This bash problem 7828bf5c682Smrg # is reportedly fixed, but why not run on old versions too? 7830a1d3ae0Smrg $SED '$q' "$ltmain" >> "$cfgfile" \ 7848bf5c682Smrg || (rm -f "$cfgfile"; exit 1) 7858bf5c682Smrg 7868bf5c682Smrg mv -f "$cfgfile" "$ofile" || 7878bf5c682Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 7888bf5c682Smrg chmod +x "$ofile" 7898bf5c682Smrg], 7908bf5c682Smrg[cat <<_LT_EOF >> "$ofile" 7918bf5c682Smrg 7928bf5c682Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 7938bf5c682Smrgdnl in a comment (ie after a #). 7948bf5c682Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 7958bf5c682Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 7968bf5c682Smrg# ### END LIBTOOL TAG CONFIG: $1 7978bf5c682Smrg_LT_EOF 7988bf5c682Smrg])dnl /m4_if 7998bf5c682Smrg], 8008bf5c682Smrg[m4_if([$1], [], [ 8018bf5c682Smrg PACKAGE='$PACKAGE' 8028bf5c682Smrg VERSION='$VERSION' 8038bf5c682Smrg RM='$RM' 8048bf5c682Smrg ofile='$ofile'], []) 8058bf5c682Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 8068bf5c682Smrg])# _LT_CONFIG 8078bf5c682Smrg 8088bf5c682Smrg 8098bf5c682Smrg# LT_SUPPORTED_TAG(TAG) 8108bf5c682Smrg# --------------------- 8118bf5c682Smrg# Trace this macro to discover what tags are supported by the libtool 8128bf5c682Smrg# --tag option, using: 8138bf5c682Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 8148bf5c682SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 8158bf5c682Smrg 8168bf5c682Smrg 8178bf5c682Smrg# C support is built-in for now 8188bf5c682Smrgm4_define([_LT_LANG_C_enabled], []) 8198bf5c682Smrgm4_define([_LT_TAGS], []) 8208bf5c682Smrg 8218bf5c682Smrg 8228bf5c682Smrg# LT_LANG(LANG) 8238bf5c682Smrg# ------------- 8248bf5c682Smrg# Enable libtool support for the given language if not already enabled. 8258bf5c682SmrgAC_DEFUN([LT_LANG], 8268bf5c682Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 8278bf5c682Smrgm4_case([$1], 8288bf5c682Smrg [C], [_LT_LANG(C)], 8298bf5c682Smrg [C++], [_LT_LANG(CXX)], 8308bf5c682Smrg [Go], [_LT_LANG(GO)], 8318bf5c682Smrg [Java], [_LT_LANG(GCJ)], 8328bf5c682Smrg [Fortran 77], [_LT_LANG(F77)], 8338bf5c682Smrg [Fortran], [_LT_LANG(FC)], 8348bf5c682Smrg [Windows Resource], [_LT_LANG(RC)], 8358bf5c682Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 8368bf5c682Smrg [_LT_LANG($1)], 8378bf5c682Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 8388bf5c682Smrg])# LT_LANG 8398bf5c682Smrg 8408bf5c682Smrg 8418bf5c682Smrg# _LT_LANG(LANGNAME) 8428bf5c682Smrg# ------------------ 8438bf5c682Smrgm4_defun([_LT_LANG], 8448bf5c682Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 8458bf5c682Smrg [LT_SUPPORTED_TAG([$1])dnl 8468bf5c682Smrg m4_append([_LT_TAGS], [$1 ])dnl 8478bf5c682Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 8488bf5c682Smrg _LT_LANG_$1_CONFIG($1)])dnl 8498bf5c682Smrg])# _LT_LANG 8508bf5c682Smrg 8518bf5c682Smrg 8528bf5c682Smrgm4_ifndef([AC_PROG_GO], [ 8538bf5c682Smrg############################################################ 8548bf5c682Smrg# NOTE: This macro has been submitted for inclusion into # 8558bf5c682Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 8568bf5c682Smrg# a released version of Autoconf we should remove this # 8578bf5c682Smrg# macro and use it instead. # 8588bf5c682Smrg############################################################ 8598bf5c682Smrgm4_defun([AC_PROG_GO], 8608bf5c682Smrg[AC_LANG_PUSH(Go)dnl 8618bf5c682SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 8628bf5c682SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 8638bf5c682Smrg_AC_ARG_VAR_LDFLAGS()dnl 8648bf5c682SmrgAC_CHECK_TOOL(GOC, gccgo) 8658bf5c682Smrgif test -z "$GOC"; then 8668bf5c682Smrg if test -n "$ac_tool_prefix"; then 8678bf5c682Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 8688bf5c682Smrg fi 8698bf5c682Smrgfi 8708bf5c682Smrgif test -z "$GOC"; then 8718bf5c682Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 8728bf5c682Smrgfi 8738bf5c682Smrg])#m4_defun 8748bf5c682Smrg])#m4_ifndef 8758bf5c682Smrg 8768bf5c682Smrg 8778bf5c682Smrg# _LT_LANG_DEFAULT_CONFIG 8788bf5c682Smrg# ----------------------- 8798bf5c682Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 8808bf5c682Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 8818bf5c682Smrg [LT_LANG(CXX)], 8828bf5c682Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 8838bf5c682Smrg 8848bf5c682SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 8858bf5c682Smrg [LT_LANG(F77)], 8868bf5c682Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 8878bf5c682Smrg 8888bf5c682SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 8898bf5c682Smrg [LT_LANG(FC)], 8908bf5c682Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 8918bf5c682Smrg 8928bf5c682Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 8938bf5c682Smrgdnl pulling things in needlessly. 8948bf5c682SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 8958bf5c682Smrg [LT_LANG(GCJ)], 8968bf5c682Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 8978bf5c682Smrg [LT_LANG(GCJ)], 8988bf5c682Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 8998bf5c682Smrg [LT_LANG(GCJ)], 9008bf5c682Smrg [m4_ifdef([AC_PROG_GCJ], 9018bf5c682Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 9028bf5c682Smrg m4_ifdef([A][M_PROG_GCJ], 9038bf5c682Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 9048bf5c682Smrg m4_ifdef([LT_PROG_GCJ], 9058bf5c682Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 9068bf5c682Smrg 9078bf5c682SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 9088bf5c682Smrg [LT_LANG(GO)], 9098bf5c682Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 9108bf5c682Smrg 9118bf5c682SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 9128bf5c682Smrg [LT_LANG(RC)], 9138bf5c682Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 9148bf5c682Smrg])# _LT_LANG_DEFAULT_CONFIG 9158bf5c682Smrg 9168bf5c682Smrg# Obsolete macros: 9178bf5c682SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 9188bf5c682SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 9198bf5c682SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 9208bf5c682SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 9218bf5c682SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 9228bf5c682Smrgdnl aclocal-1.4 backwards compatibility: 9238bf5c682Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 9248bf5c682Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 9258bf5c682Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 9268bf5c682Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 9278bf5c682Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 9288bf5c682Smrg 9298bf5c682Smrg 9308bf5c682Smrg# _LT_TAG_COMPILER 9318bf5c682Smrg# ---------------- 9328bf5c682Smrgm4_defun([_LT_TAG_COMPILER], 9338bf5c682Smrg[AC_REQUIRE([AC_PROG_CC])dnl 9348bf5c682Smrg 9358bf5c682Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 9368bf5c682Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 9378bf5c682Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 9388bf5c682Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 9398bf5c682Smrg 9408bf5c682Smrg# If no C compiler was specified, use CC. 9418bf5c682SmrgLTCC=${LTCC-"$CC"} 9428bf5c682Smrg 9438bf5c682Smrg# If no C compiler flags were specified, use CFLAGS. 9448bf5c682SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 9458bf5c682Smrg 9468bf5c682Smrg# Allow CC to be a program name with arguments. 9478bf5c682Smrgcompiler=$CC 9488bf5c682Smrg])# _LT_TAG_COMPILER 9498bf5c682Smrg 9508bf5c682Smrg 9518bf5c682Smrg# _LT_COMPILER_BOILERPLATE 9528bf5c682Smrg# ------------------------ 9538bf5c682Smrg# Check for compiler boilerplate output or warnings with 9548bf5c682Smrg# the simple compiler test code. 9558bf5c682Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 9568bf5c682Smrg[m4_require([_LT_DECL_SED])dnl 9578bf5c682Smrgac_outfile=conftest.$ac_objext 9588bf5c682Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 9598bf5c682Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9608bf5c682Smrg_lt_compiler_boilerplate=`cat conftest.err` 9618bf5c682Smrg$RM conftest* 9628bf5c682Smrg])# _LT_COMPILER_BOILERPLATE 9638bf5c682Smrg 9648bf5c682Smrg 9658bf5c682Smrg# _LT_LINKER_BOILERPLATE 9668bf5c682Smrg# ---------------------- 9678bf5c682Smrg# Check for linker boilerplate output or warnings with 9688bf5c682Smrg# the simple link test code. 9698bf5c682Smrgm4_defun([_LT_LINKER_BOILERPLATE], 9708bf5c682Smrg[m4_require([_LT_DECL_SED])dnl 9718bf5c682Smrgac_outfile=conftest.$ac_objext 9728bf5c682Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 9738bf5c682Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9748bf5c682Smrg_lt_linker_boilerplate=`cat conftest.err` 9758bf5c682Smrg$RM -r conftest* 9768bf5c682Smrg])# _LT_LINKER_BOILERPLATE 9778bf5c682Smrg 9788bf5c682Smrg# _LT_REQUIRED_DARWIN_CHECKS 9798bf5c682Smrg# ------------------------- 9808bf5c682Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 9818bf5c682Smrg case $host_os in 9828bf5c682Smrg rhapsody* | darwin*) 9838bf5c682Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 9848bf5c682Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 9858bf5c682Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 9868bf5c682Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 9878bf5c682Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 9888bf5c682Smrg _LT_DECL([], [DSYMUTIL], [1], 9898bf5c682Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 9908bf5c682Smrg _LT_DECL([], [NMEDIT], [1], 9918bf5c682Smrg [Tool to change global to local symbols on Mac OS X]) 9928bf5c682Smrg _LT_DECL([], [LIPO], [1], 9938bf5c682Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 9948bf5c682Smrg _LT_DECL([], [OTOOL], [1], 9958bf5c682Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 9968bf5c682Smrg _LT_DECL([], [OTOOL64], [1], 9978bf5c682Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 9988bf5c682Smrg 9998bf5c682Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 10008bf5c682Smrg [lt_cv_apple_cc_single_mod=no 10018bf5c682Smrg if test -z "$LT_MULTI_MODULE"; then 10028bf5c682Smrg # By default we will add the -single_module flag. You can override 10038bf5c682Smrg # by either setting the environment variable LT_MULTI_MODULE 10048bf5c682Smrg # non-empty at configure time, or by adding -multi_module to the 10058bf5c682Smrg # link flags. 10068bf5c682Smrg rm -rf libconftest.dylib* 10078bf5c682Smrg echo "int foo(void){return 1;}" > conftest.c 10088bf5c682Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 10098bf5c682Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 10108bf5c682Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 10118bf5c682Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 10128bf5c682Smrg _lt_result=$? 10138bf5c682Smrg # If there is a non-empty error log, and "single_module" 10148bf5c682Smrg # appears in it, assume the flag caused a linker warning 10158bf5c682Smrg if test -s conftest.err && $GREP single_module conftest.err; then 10168bf5c682Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10178bf5c682Smrg # Otherwise, if the output was created with a 0 exit code from 10188bf5c682Smrg # the compiler, it worked. 10198bf5c682Smrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 10208bf5c682Smrg lt_cv_apple_cc_single_mod=yes 10218bf5c682Smrg else 10228bf5c682Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10238bf5c682Smrg fi 10248bf5c682Smrg rm -rf libconftest.dylib* 10258bf5c682Smrg rm -f conftest.* 10268bf5c682Smrg fi]) 10278bf5c682Smrg 10288bf5c682Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 10298bf5c682Smrg [lt_cv_ld_exported_symbols_list], 10308bf5c682Smrg [lt_cv_ld_exported_symbols_list=no 10318bf5c682Smrg save_LDFLAGS=$LDFLAGS 10328bf5c682Smrg echo "_main" > conftest.sym 10338bf5c682Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 10348bf5c682Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 10358bf5c682Smrg [lt_cv_ld_exported_symbols_list=yes], 10368bf5c682Smrg [lt_cv_ld_exported_symbols_list=no]) 10378bf5c682Smrg LDFLAGS=$save_LDFLAGS 10388bf5c682Smrg ]) 10398bf5c682Smrg 10408bf5c682Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 10418bf5c682Smrg [lt_cv_ld_force_load=no 10428bf5c682Smrg cat > conftest.c << _LT_EOF 10438bf5c682Smrgint forced_loaded() { return 2;} 10448bf5c682Smrg_LT_EOF 10458bf5c682Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 10468bf5c682Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 10478bf5c682Smrg echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 10488bf5c682Smrg $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 10498bf5c682Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 10508bf5c682Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 10518bf5c682Smrg cat > conftest.c << _LT_EOF 10528bf5c682Smrgint main() { return 0;} 10538bf5c682Smrg_LT_EOF 10548bf5c682Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 10558bf5c682Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 10568bf5c682Smrg _lt_result=$? 10578bf5c682Smrg if test -s conftest.err && $GREP force_load conftest.err; then 10588bf5c682Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10598bf5c682Smrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 10608bf5c682Smrg lt_cv_ld_force_load=yes 10618bf5c682Smrg else 10628bf5c682Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10638bf5c682Smrg fi 10648bf5c682Smrg rm -f conftest.err libconftest.a conftest conftest.c 10658bf5c682Smrg rm -rf conftest.dSYM 10668bf5c682Smrg ]) 10678bf5c682Smrg case $host_os in 10688bf5c682Smrg rhapsody* | darwin1.[[012]]) 10698bf5c682Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 10708bf5c682Smrg darwin1.*) 10718bf5c682Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10720a1d3ae0Smrg darwin*) 10730a1d3ae0Smrg case $MACOSX_DEPLOYMENT_TARGET,$host in 10740a1d3ae0Smrg 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) 10750a1d3ae0Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10760a1d3ae0Smrg *) 10770a1d3ae0Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10788bf5c682Smrg esac 10798bf5c682Smrg ;; 10808bf5c682Smrg esac 10818bf5c682Smrg if test yes = "$lt_cv_apple_cc_single_mod"; then 10828bf5c682Smrg _lt_dar_single_mod='$single_module' 10838bf5c682Smrg fi 10848bf5c682Smrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 10858bf5c682Smrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 10868bf5c682Smrg else 10878bf5c682Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 10888bf5c682Smrg fi 10898bf5c682Smrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 10908bf5c682Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 10918bf5c682Smrg else 10928bf5c682Smrg _lt_dsymutil= 10938bf5c682Smrg fi 10948bf5c682Smrg ;; 10958bf5c682Smrg esac 10968bf5c682Smrg]) 10978bf5c682Smrg 10988bf5c682Smrg 10998bf5c682Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 11008bf5c682Smrg# --------------------------------- 11018bf5c682Smrg# Checks for linker and compiler features on darwin 11028bf5c682Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 11038bf5c682Smrg[ 11048bf5c682Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 11058bf5c682Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 11068bf5c682Smrg _LT_TAGVAR(hardcode_direct, $1)=no 11078bf5c682Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 11088bf5c682Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 11098bf5c682Smrg if test yes = "$lt_cv_ld_force_load"; then 11108bf5c682Smrg _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\"`' 11118bf5c682Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 11128bf5c682Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 11138bf5c682Smrg else 11148bf5c682Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 11158bf5c682Smrg fi 11168bf5c682Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 11178bf5c682Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 11188bf5c682Smrg case $cc_basename in 11198bf5c682Smrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 11208bf5c682Smrg *) _lt_dar_can_shared=$GCC ;; 11218bf5c682Smrg esac 11228bf5c682Smrg if test yes = "$_lt_dar_can_shared"; then 11238bf5c682Smrg output_verbose_link_cmd=func_echo_all 11248bf5c682Smrg _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" 11258bf5c682Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 11260a1d3ae0Smrg _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" 11270a1d3ae0Smrg _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" 11288bf5c682Smrg m4_if([$1], [CXX], 11298bf5c682Smrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 11308bf5c682Smrg _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" 11310a1d3ae0Smrg _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" 11328bf5c682Smrg fi 11338bf5c682Smrg],[]) 11348bf5c682Smrg else 11358bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11368bf5c682Smrg fi 11378bf5c682Smrg]) 11388bf5c682Smrg 11398bf5c682Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 11408bf5c682Smrg# ---------------------------------- 11418bf5c682Smrg# Links a minimal program and checks the executable 11428bf5c682Smrg# for the system default hardcoded library path. In most cases, 11438bf5c682Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 11448bf5c682Smrg# the location of the communication and MPI libs are included too. 11458bf5c682Smrg# If we don't find anything, use the default library path according 11468bf5c682Smrg# to the aix ld manual. 11478bf5c682Smrg# Store the results from the different compilers for each TAGNAME. 11488bf5c682Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 11498bf5c682Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 11508bf5c682Smrg[m4_require([_LT_DECL_SED])dnl 11518bf5c682Smrgif test set = "${lt_cv_aix_libpath+set}"; then 11528bf5c682Smrg aix_libpath=$lt_cv_aix_libpath 11538bf5c682Smrgelse 11548bf5c682Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 11558bf5c682Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 11568bf5c682Smrg lt_aix_libpath_sed='[ 11578bf5c682Smrg /Import File Strings/,/^$/ { 11588bf5c682Smrg /^0/ { 11598bf5c682Smrg s/^0 *\([^ ]*\) *$/\1/ 11608bf5c682Smrg p 11618bf5c682Smrg } 11628bf5c682Smrg }]' 11638bf5c682Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 11648bf5c682Smrg # Check for a 64-bit object if we didn't find anything. 11658bf5c682Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 11668bf5c682Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 11678bf5c682Smrg fi],[]) 11688bf5c682Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 11698bf5c682Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 11708bf5c682Smrg fi 11718bf5c682Smrg ]) 11728bf5c682Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 11738bf5c682Smrgfi 11748bf5c682Smrg])# _LT_SYS_MODULE_PATH_AIX 11758bf5c682Smrg 11768bf5c682Smrg 11778bf5c682Smrg# _LT_SHELL_INIT(ARG) 11788bf5c682Smrg# ------------------- 11798bf5c682Smrgm4_define([_LT_SHELL_INIT], 11808bf5c682Smrg[m4_divert_text([M4SH-INIT], [$1 11818bf5c682Smrg])])# _LT_SHELL_INIT 11828bf5c682Smrg 11838bf5c682Smrg 11848bf5c682Smrg 11858bf5c682Smrg# _LT_PROG_ECHO_BACKSLASH 11868bf5c682Smrg# ----------------------- 11878bf5c682Smrg# Find how we can fake an echo command that does not interpret backslash. 11888bf5c682Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 11898bf5c682Smrg# of the generated configure script that will find a shell with a builtin 11908bf5c682Smrg# printf (that we can use as an echo command). 11918bf5c682Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 11928bf5c682Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 11938bf5c682SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 11948bf5c682SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 11958bf5c682Smrg 11968bf5c682SmrgAC_MSG_CHECKING([how to print strings]) 11978bf5c682Smrg# Test print first, because it will be a builtin if present. 11988bf5c682Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 11998bf5c682Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 12008bf5c682Smrg ECHO='print -r --' 12018bf5c682Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 12028bf5c682Smrg ECHO='printf %s\n' 12038bf5c682Smrgelse 12048bf5c682Smrg # Use this function as a fallback that always works. 12058bf5c682Smrg func_fallback_echo () 12068bf5c682Smrg { 12078bf5c682Smrg eval 'cat <<_LTECHO_EOF 12088bf5c682Smrg$[]1 12098bf5c682Smrg_LTECHO_EOF' 12108bf5c682Smrg } 12118bf5c682Smrg ECHO='func_fallback_echo' 12128bf5c682Smrgfi 12138bf5c682Smrg 12148bf5c682Smrg# func_echo_all arg... 12158bf5c682Smrg# Invoke $ECHO with all args, space-separated. 12168bf5c682Smrgfunc_echo_all () 12178bf5c682Smrg{ 12188bf5c682Smrg $ECHO "$*" 12198bf5c682Smrg} 12208bf5c682Smrg 12218bf5c682Smrgcase $ECHO in 12228bf5c682Smrg printf*) AC_MSG_RESULT([printf]) ;; 12238bf5c682Smrg print*) AC_MSG_RESULT([print -r]) ;; 12248bf5c682Smrg *) AC_MSG_RESULT([cat]) ;; 12258bf5c682Smrgesac 12268bf5c682Smrg 12278bf5c682Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 12288bf5c682Smrg[_AS_DETECT_SUGGESTED([ 12298bf5c682Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 12308bf5c682Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 12318bf5c682Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 12328bf5c682Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 12338bf5c682Smrg PATH=/empty FPATH=/empty; export PATH FPATH 12348bf5c682Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 12358bf5c682Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 12368bf5c682Smrg 12378bf5c682Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 12388bf5c682Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 12398bf5c682Smrg])# _LT_PROG_ECHO_BACKSLASH 12408bf5c682Smrg 12418bf5c682Smrg 12428bf5c682Smrg# _LT_WITH_SYSROOT 12438bf5c682Smrg# ---------------- 12448bf5c682SmrgAC_DEFUN([_LT_WITH_SYSROOT], 12450a1d3ae0Smrg[m4_require([_LT_DECL_SED])dnl 12460a1d3ae0SmrgAC_MSG_CHECKING([for sysroot]) 12478bf5c682SmrgAC_ARG_WITH([sysroot], 12488bf5c682Smrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 12498bf5c682Smrg [Search for dependent libraries within DIR (or the compiler's sysroot 12508bf5c682Smrg if not specified).])], 12518bf5c682Smrg[], [with_sysroot=no]) 12528bf5c682Smrg 12538bf5c682Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 12548bf5c682Smrgdnl in case the user passed a directory name. 12558bf5c682Smrglt_sysroot= 12568bf5c682Smrgcase $with_sysroot in #( 12578bf5c682Smrg yes) 12588bf5c682Smrg if test yes = "$GCC"; then 12598bf5c682Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 12608bf5c682Smrg fi 12618bf5c682Smrg ;; #( 12628bf5c682Smrg /*) 12630a1d3ae0Smrg lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` 12648bf5c682Smrg ;; #( 12658bf5c682Smrg no|'') 12668bf5c682Smrg ;; #( 12678bf5c682Smrg *) 12688bf5c682Smrg AC_MSG_RESULT([$with_sysroot]) 12698bf5c682Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 12708bf5c682Smrg ;; 12718bf5c682Smrgesac 12728bf5c682Smrg 12738bf5c682Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 12748bf5c682Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 12758bf5c682Smrg[dependent libraries, and where our libraries should be installed.])]) 12768bf5c682Smrg 12778bf5c682Smrg# _LT_ENABLE_LOCK 12788bf5c682Smrg# --------------- 12798bf5c682Smrgm4_defun([_LT_ENABLE_LOCK], 12808bf5c682Smrg[AC_ARG_ENABLE([libtool-lock], 12818bf5c682Smrg [AS_HELP_STRING([--disable-libtool-lock], 12828bf5c682Smrg [avoid locking (might break parallel builds)])]) 12838bf5c682Smrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 12848bf5c682Smrg 12858bf5c682Smrg# Some flags need to be propagated to the compiler or linker for good 12868bf5c682Smrg# libtool support. 12878bf5c682Smrgcase $host in 12888bf5c682Smrgia64-*-hpux*) 12898bf5c682Smrg # Find out what ABI is being produced by ac_compile, and set mode 12908bf5c682Smrg # options accordingly. 12918bf5c682Smrg echo 'int i;' > conftest.$ac_ext 12928bf5c682Smrg if AC_TRY_EVAL(ac_compile); then 12930a1d3ae0Smrg case `$FILECMD conftest.$ac_objext` in 12948bf5c682Smrg *ELF-32*) 12958bf5c682Smrg HPUX_IA64_MODE=32 12968bf5c682Smrg ;; 12978bf5c682Smrg *ELF-64*) 12988bf5c682Smrg HPUX_IA64_MODE=64 12998bf5c682Smrg ;; 13008bf5c682Smrg esac 13018bf5c682Smrg fi 13028bf5c682Smrg rm -rf conftest* 13038bf5c682Smrg ;; 13048bf5c682Smrg*-*-irix6*) 13058bf5c682Smrg # Find out what ABI is being produced by ac_compile, and set linker 13068bf5c682Smrg # options accordingly. 13078bf5c682Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 13088bf5c682Smrg if AC_TRY_EVAL(ac_compile); then 13098bf5c682Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 13100a1d3ae0Smrg case `$FILECMD conftest.$ac_objext` in 13118bf5c682Smrg *32-bit*) 13128bf5c682Smrg LD="${LD-ld} -melf32bsmip" 13138bf5c682Smrg ;; 13148bf5c682Smrg *N32*) 13158bf5c682Smrg LD="${LD-ld} -melf32bmipn32" 13168bf5c682Smrg ;; 13178bf5c682Smrg *64-bit*) 13188bf5c682Smrg LD="${LD-ld} -melf64bmip" 13198bf5c682Smrg ;; 13208bf5c682Smrg esac 13218bf5c682Smrg else 13220a1d3ae0Smrg case `$FILECMD conftest.$ac_objext` in 13238bf5c682Smrg *32-bit*) 13248bf5c682Smrg LD="${LD-ld} -32" 13258bf5c682Smrg ;; 13268bf5c682Smrg *N32*) 13278bf5c682Smrg LD="${LD-ld} -n32" 13288bf5c682Smrg ;; 13298bf5c682Smrg *64-bit*) 13308bf5c682Smrg LD="${LD-ld} -64" 13318bf5c682Smrg ;; 13328bf5c682Smrg esac 13338bf5c682Smrg fi 13348bf5c682Smrg fi 13358bf5c682Smrg rm -rf conftest* 13368bf5c682Smrg ;; 13378bf5c682Smrg 13388bf5c682Smrgmips64*-*linux*) 13398bf5c682Smrg # Find out what ABI is being produced by ac_compile, and set linker 13408bf5c682Smrg # options accordingly. 13418bf5c682Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 13428bf5c682Smrg if AC_TRY_EVAL(ac_compile); then 13438bf5c682Smrg emul=elf 13440a1d3ae0Smrg case `$FILECMD conftest.$ac_objext` in 13458bf5c682Smrg *32-bit*) 13468bf5c682Smrg emul="${emul}32" 13478bf5c682Smrg ;; 13488bf5c682Smrg *64-bit*) 13498bf5c682Smrg emul="${emul}64" 13508bf5c682Smrg ;; 13518bf5c682Smrg esac 13520a1d3ae0Smrg case `$FILECMD conftest.$ac_objext` in 13538bf5c682Smrg *MSB*) 13548bf5c682Smrg emul="${emul}btsmip" 13558bf5c682Smrg ;; 13568bf5c682Smrg *LSB*) 13578bf5c682Smrg emul="${emul}ltsmip" 13588bf5c682Smrg ;; 13598bf5c682Smrg esac 13600a1d3ae0Smrg case `$FILECMD conftest.$ac_objext` in 13618bf5c682Smrg *N32*) 13628bf5c682Smrg emul="${emul}n32" 13638bf5c682Smrg ;; 13648bf5c682Smrg esac 13658bf5c682Smrg LD="${LD-ld} -m $emul" 13668bf5c682Smrg fi 13678bf5c682Smrg rm -rf conftest* 13688bf5c682Smrg ;; 13698bf5c682Smrg 13708bf5c682Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 13718bf5c682Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 13728bf5c682Smrg # Find out what ABI is being produced by ac_compile, and set linker 13738bf5c682Smrg # options accordingly. Note that the listed cases only cover the 13748bf5c682Smrg # situations where additional linker options are needed (such as when 13758bf5c682Smrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 13768bf5c682Smrg # vice versa); the common cases where no linker options are needed do 13778bf5c682Smrg # not appear in the list. 13788bf5c682Smrg echo 'int i;' > conftest.$ac_ext 13798bf5c682Smrg if AC_TRY_EVAL(ac_compile); then 13800a1d3ae0Smrg case `$FILECMD conftest.o` in 13818bf5c682Smrg *32-bit*) 13828bf5c682Smrg case $host in 13838bf5c682Smrg x86_64-*kfreebsd*-gnu) 13848bf5c682Smrg LD="${LD-ld} -m elf_i386_fbsd" 13858bf5c682Smrg ;; 13868bf5c682Smrg x86_64-*linux*) 13870a1d3ae0Smrg case `$FILECMD conftest.o` in 13888bf5c682Smrg *x86-64*) 13898bf5c682Smrg LD="${LD-ld} -m elf32_x86_64" 13908bf5c682Smrg ;; 13918bf5c682Smrg *) 13928bf5c682Smrg LD="${LD-ld} -m elf_i386" 13938bf5c682Smrg ;; 13948bf5c682Smrg esac 13958bf5c682Smrg ;; 13968bf5c682Smrg powerpc64le-*linux*) 13978bf5c682Smrg LD="${LD-ld} -m elf32lppclinux" 13988bf5c682Smrg ;; 13998bf5c682Smrg powerpc64-*linux*) 14008bf5c682Smrg LD="${LD-ld} -m elf32ppclinux" 14018bf5c682Smrg ;; 14028bf5c682Smrg s390x-*linux*) 14038bf5c682Smrg LD="${LD-ld} -m elf_s390" 14048bf5c682Smrg ;; 14058bf5c682Smrg sparc64-*linux*) 14068bf5c682Smrg LD="${LD-ld} -m elf32_sparc" 14078bf5c682Smrg ;; 14088bf5c682Smrg esac 14098bf5c682Smrg ;; 14108bf5c682Smrg *64-bit*) 14118bf5c682Smrg case $host in 14128bf5c682Smrg x86_64-*kfreebsd*-gnu) 14138bf5c682Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 14148bf5c682Smrg ;; 14158bf5c682Smrg x86_64-*linux*) 14168bf5c682Smrg LD="${LD-ld} -m elf_x86_64" 14178bf5c682Smrg ;; 14180a1d3ae0Smrg powerpcle-*linux*|powerpc64le-*linux*) 14198bf5c682Smrg LD="${LD-ld} -m elf64lppc" 14208bf5c682Smrg ;; 14210a1d3ae0Smrg powerpc-*linux*|powerpc64-*linux*) 14228bf5c682Smrg LD="${LD-ld} -m elf64ppc" 14238bf5c682Smrg ;; 14248bf5c682Smrg s390*-*linux*|s390*-*tpf*) 14258bf5c682Smrg LD="${LD-ld} -m elf64_s390" 14268bf5c682Smrg ;; 14278bf5c682Smrg sparc*-*linux*) 14288bf5c682Smrg LD="${LD-ld} -m elf64_sparc" 14298bf5c682Smrg ;; 14308bf5c682Smrg esac 14318bf5c682Smrg ;; 14328bf5c682Smrg esac 14338bf5c682Smrg fi 14348bf5c682Smrg rm -rf conftest* 14358bf5c682Smrg ;; 14368bf5c682Smrg 14378bf5c682Smrg*-*-sco3.2v5*) 14388bf5c682Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 14398bf5c682Smrg SAVE_CFLAGS=$CFLAGS 14408bf5c682Smrg CFLAGS="$CFLAGS -belf" 14418bf5c682Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 14428bf5c682Smrg [AC_LANG_PUSH(C) 14438bf5c682Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 14448bf5c682Smrg AC_LANG_POP]) 14458bf5c682Smrg if test yes != "$lt_cv_cc_needs_belf"; then 14468bf5c682Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 14478bf5c682Smrg CFLAGS=$SAVE_CFLAGS 14488bf5c682Smrg fi 14498bf5c682Smrg ;; 14508bf5c682Smrg*-*solaris*) 14518bf5c682Smrg # Find out what ABI is being produced by ac_compile, and set linker 14528bf5c682Smrg # options accordingly. 14538bf5c682Smrg echo 'int i;' > conftest.$ac_ext 14548bf5c682Smrg if AC_TRY_EVAL(ac_compile); then 14550a1d3ae0Smrg case `$FILECMD conftest.o` in 14568bf5c682Smrg *64-bit*) 14578bf5c682Smrg case $lt_cv_prog_gnu_ld in 14588bf5c682Smrg yes*) 14598bf5c682Smrg case $host in 14608bf5c682Smrg i?86-*-solaris*|x86_64-*-solaris*) 14618bf5c682Smrg LD="${LD-ld} -m elf_x86_64" 14628bf5c682Smrg ;; 14638bf5c682Smrg sparc*-*-solaris*) 14648bf5c682Smrg LD="${LD-ld} -m elf64_sparc" 14658bf5c682Smrg ;; 14668bf5c682Smrg esac 14678bf5c682Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 14688bf5c682Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 14698bf5c682Smrg LD=${LD-ld}_sol2 14708bf5c682Smrg fi 14718bf5c682Smrg ;; 14728bf5c682Smrg *) 14738bf5c682Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 14748bf5c682Smrg LD="${LD-ld} -64" 14758bf5c682Smrg fi 14768bf5c682Smrg ;; 14778bf5c682Smrg esac 14788bf5c682Smrg ;; 14798bf5c682Smrg esac 14808bf5c682Smrg fi 14818bf5c682Smrg rm -rf conftest* 14828bf5c682Smrg ;; 14838bf5c682Smrgesac 14848bf5c682Smrg 14858bf5c682Smrgneed_locks=$enable_libtool_lock 14868bf5c682Smrg])# _LT_ENABLE_LOCK 14878bf5c682Smrg 14888bf5c682Smrg 14898bf5c682Smrg# _LT_PROG_AR 14908bf5c682Smrg# ----------- 14918bf5c682Smrgm4_defun([_LT_PROG_AR], 14928bf5c682Smrg[AC_CHECK_TOOLS(AR, [ar], false) 14938bf5c682Smrg: ${AR=ar} 14948bf5c682Smrg_LT_DECL([], [AR], [1], [The archiver]) 14958bf5c682Smrg 14968bf5c682Smrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with 14978bf5c682Smrg# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 14988bf5c682Smrg# higher priority because thats what people were doing historically (setting 14998bf5c682Smrg# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 15008bf5c682Smrg# variable obsoleted/removed. 15018bf5c682Smrg 15028bf5c682Smrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 15038bf5c682Smrglt_ar_flags=$AR_FLAGS 15048bf5c682Smrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 15058bf5c682Smrg 15068bf5c682Smrg# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 15078bf5c682Smrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 15088bf5c682Smrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 15098bf5c682Smrg [Flags to create an archive]) 15108bf5c682Smrg 15118bf5c682SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 15128bf5c682Smrg [lt_cv_ar_at_file=no 15138bf5c682Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 15148bf5c682Smrg [echo conftest.$ac_objext > conftest.lst 15158bf5c682Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 15168bf5c682Smrg AC_TRY_EVAL([lt_ar_try]) 15178bf5c682Smrg if test 0 -eq "$ac_status"; then 15188bf5c682Smrg # Ensure the archiver fails upon bogus file names. 15198bf5c682Smrg rm -f conftest.$ac_objext libconftest.a 15208bf5c682Smrg AC_TRY_EVAL([lt_ar_try]) 15218bf5c682Smrg if test 0 -ne "$ac_status"; then 15228bf5c682Smrg lt_cv_ar_at_file=@ 15238bf5c682Smrg fi 15248bf5c682Smrg fi 15258bf5c682Smrg rm -f conftest.* libconftest.a 15268bf5c682Smrg ]) 15278bf5c682Smrg ]) 15288bf5c682Smrg 15298bf5c682Smrgif test no = "$lt_cv_ar_at_file"; then 15308bf5c682Smrg archiver_list_spec= 15318bf5c682Smrgelse 15328bf5c682Smrg archiver_list_spec=$lt_cv_ar_at_file 15338bf5c682Smrgfi 15348bf5c682Smrg_LT_DECL([], [archiver_list_spec], [1], 15358bf5c682Smrg [How to feed a file listing to the archiver]) 15368bf5c682Smrg])# _LT_PROG_AR 15378bf5c682Smrg 15388bf5c682Smrg 15398bf5c682Smrg# _LT_CMD_OLD_ARCHIVE 15408bf5c682Smrg# ------------------- 15418bf5c682Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 15428bf5c682Smrg[_LT_PROG_AR 15438bf5c682Smrg 15448bf5c682SmrgAC_CHECK_TOOL(STRIP, strip, :) 15458bf5c682Smrgtest -z "$STRIP" && STRIP=: 15468bf5c682Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 15478bf5c682Smrg 15488bf5c682SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 15498bf5c682Smrgtest -z "$RANLIB" && RANLIB=: 15508bf5c682Smrg_LT_DECL([], [RANLIB], [1], 15518bf5c682Smrg [Commands used to install an old-style archive]) 15528bf5c682Smrg 15538bf5c682Smrg# Determine commands to create old-style static archives. 15548bf5c682Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 15558bf5c682Smrgold_postinstall_cmds='chmod 644 $oldlib' 15568bf5c682Smrgold_postuninstall_cmds= 15578bf5c682Smrg 15588bf5c682Smrgif test -n "$RANLIB"; then 15598bf5c682Smrg case $host_os in 15608bf5c682Smrg bitrig* | openbsd*) 15618bf5c682Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 15628bf5c682Smrg ;; 15638bf5c682Smrg *) 15648bf5c682Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 15658bf5c682Smrg ;; 15668bf5c682Smrg esac 15678bf5c682Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 15688bf5c682Smrgfi 15698bf5c682Smrg 15708bf5c682Smrgcase $host_os in 15718bf5c682Smrg darwin*) 15728bf5c682Smrg lock_old_archive_extraction=yes ;; 15738bf5c682Smrg *) 15748bf5c682Smrg lock_old_archive_extraction=no ;; 15758bf5c682Smrgesac 15768bf5c682Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 15778bf5c682Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 15788bf5c682Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 15798bf5c682Smrg [Commands used to build an old-style archive]) 15808bf5c682Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 15818bf5c682Smrg [Whether to use a lock for old archive extraction]) 15828bf5c682Smrg])# _LT_CMD_OLD_ARCHIVE 15838bf5c682Smrg 15848bf5c682Smrg 15858bf5c682Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 15868bf5c682Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 15878bf5c682Smrg# ---------------------------------------------------------------- 15888bf5c682Smrg# Check whether the given compiler option works 15898bf5c682SmrgAC_DEFUN([_LT_COMPILER_OPTION], 15908bf5c682Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 15918bf5c682Smrgm4_require([_LT_DECL_SED])dnl 15928bf5c682SmrgAC_CACHE_CHECK([$1], [$2], 15938bf5c682Smrg [$2=no 15948bf5c682Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 15958bf5c682Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 15968bf5c682Smrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 15978bf5c682Smrg # Insert the option either (1) after the last *FLAGS variable, or 15988bf5c682Smrg # (2) before a word containing "conftest.", or (3) at the end. 15998bf5c682Smrg # Note that $ac_compile itself does not contain backslashes and begins 16008bf5c682Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 16018bf5c682Smrg # The option is referenced via a variable to avoid confusing sed. 16028bf5c682Smrg lt_compile=`echo "$ac_compile" | $SED \ 16038bf5c682Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 16048bf5c682Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 16058bf5c682Smrg -e 's:$: $lt_compiler_flag:'` 16068bf5c682Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 16078bf5c682Smrg (eval "$lt_compile" 2>conftest.err) 16088bf5c682Smrg ac_status=$? 16098bf5c682Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 16108bf5c682Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 16118bf5c682Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 16128bf5c682Smrg # The compiler can only warn and ignore the option if not recognized 16138bf5c682Smrg # So say no if there are warnings other than the usual output. 16148bf5c682Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 16158bf5c682Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 16168bf5c682Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 16178bf5c682Smrg $2=yes 16188bf5c682Smrg fi 16198bf5c682Smrg fi 16208bf5c682Smrg $RM conftest* 16218bf5c682Smrg]) 16228bf5c682Smrg 16238bf5c682Smrgif test yes = "[$]$2"; then 16248bf5c682Smrg m4_if([$5], , :, [$5]) 16258bf5c682Smrgelse 16268bf5c682Smrg m4_if([$6], , :, [$6]) 16278bf5c682Smrgfi 16288bf5c682Smrg])# _LT_COMPILER_OPTION 16298bf5c682Smrg 16308bf5c682Smrg# Old name: 16318bf5c682SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 16328bf5c682Smrgdnl aclocal-1.4 backwards compatibility: 16338bf5c682Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 16348bf5c682Smrg 16358bf5c682Smrg 16368bf5c682Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 16378bf5c682Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 16388bf5c682Smrg# ---------------------------------------------------- 16398bf5c682Smrg# Check whether the given linker option works 16408bf5c682SmrgAC_DEFUN([_LT_LINKER_OPTION], 16418bf5c682Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 16428bf5c682Smrgm4_require([_LT_DECL_SED])dnl 16438bf5c682SmrgAC_CACHE_CHECK([$1], [$2], 16448bf5c682Smrg [$2=no 16458bf5c682Smrg save_LDFLAGS=$LDFLAGS 16468bf5c682Smrg LDFLAGS="$LDFLAGS $3" 16478bf5c682Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 16488bf5c682Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 16498bf5c682Smrg # The linker can only warn and ignore the option if not recognized 16508bf5c682Smrg # So say no if there are warnings 16518bf5c682Smrg if test -s conftest.err; then 16528bf5c682Smrg # Append any errors to the config.log. 16538bf5c682Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 16548bf5c682Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 16558bf5c682Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 16568bf5c682Smrg if diff conftest.exp conftest.er2 >/dev/null; then 16578bf5c682Smrg $2=yes 16588bf5c682Smrg fi 16598bf5c682Smrg else 16608bf5c682Smrg $2=yes 16618bf5c682Smrg fi 16628bf5c682Smrg fi 16638bf5c682Smrg $RM -r conftest* 16648bf5c682Smrg LDFLAGS=$save_LDFLAGS 16658bf5c682Smrg]) 16668bf5c682Smrg 16678bf5c682Smrgif test yes = "[$]$2"; then 16688bf5c682Smrg m4_if([$4], , :, [$4]) 16698bf5c682Smrgelse 16708bf5c682Smrg m4_if([$5], , :, [$5]) 16718bf5c682Smrgfi 16728bf5c682Smrg])# _LT_LINKER_OPTION 16738bf5c682Smrg 16748bf5c682Smrg# Old name: 16758bf5c682SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 16768bf5c682Smrgdnl aclocal-1.4 backwards compatibility: 16778bf5c682Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 16788bf5c682Smrg 16798bf5c682Smrg 16808bf5c682Smrg# LT_CMD_MAX_LEN 16818bf5c682Smrg#--------------- 16828bf5c682SmrgAC_DEFUN([LT_CMD_MAX_LEN], 16838bf5c682Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 16848bf5c682Smrg# find the maximum length of command line arguments 16858bf5c682SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 16868bf5c682SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 16878bf5c682Smrg i=0 16888bf5c682Smrg teststring=ABCD 16898bf5c682Smrg 16908bf5c682Smrg case $build_os in 16918bf5c682Smrg msdosdjgpp*) 16928bf5c682Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 16938bf5c682Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 16948bf5c682Smrg # during glob expansion). Even if it were fixed, the result of this 16958bf5c682Smrg # check would be larger than it should be. 16968bf5c682Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 16978bf5c682Smrg ;; 16988bf5c682Smrg 16998bf5c682Smrg gnu*) 17008bf5c682Smrg # Under GNU Hurd, this test is not required because there is 17018bf5c682Smrg # no limit to the length of command line arguments. 17028bf5c682Smrg # Libtool will interpret -1 as no limit whatsoever 17038bf5c682Smrg lt_cv_sys_max_cmd_len=-1; 17048bf5c682Smrg ;; 17058bf5c682Smrg 17068bf5c682Smrg cygwin* | mingw* | cegcc*) 17078bf5c682Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 17088bf5c682Smrg # about 5 minutes as the teststring grows exponentially. 17098bf5c682Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 17108bf5c682Smrg # you end up with a "frozen" computer, even though with patience 17118bf5c682Smrg # the test eventually succeeds (with a max line length of 256k). 17128bf5c682Smrg # Instead, let's just punt: use the minimum linelength reported by 17138bf5c682Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 17148bf5c682Smrg lt_cv_sys_max_cmd_len=8192; 17158bf5c682Smrg ;; 17168bf5c682Smrg 17178bf5c682Smrg mint*) 17188bf5c682Smrg # On MiNT this can take a long time and run out of memory. 17198bf5c682Smrg lt_cv_sys_max_cmd_len=8192; 17208bf5c682Smrg ;; 17218bf5c682Smrg 17220a1d3ae0Smrg mint*) 17230a1d3ae0Smrg # On MiNT this can take a long time and run out of memory. 17240a1d3ae0Smrg lt_cv_sys_max_cmd_len=8192; 17250a1d3ae0Smrg ;; 17260a1d3ae0Smrg 17278bf5c682Smrg amigaos*) 17288bf5c682Smrg # On AmigaOS with pdksh, this test takes hours, literally. 17298bf5c682Smrg # So we just punt and use a minimum line length of 8192. 17308bf5c682Smrg lt_cv_sys_max_cmd_len=8192; 17318bf5c682Smrg ;; 17328bf5c682Smrg 17330a1d3ae0Smrg bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) 17348bf5c682Smrg # This has been around since 386BSD, at least. Likely further. 17358bf5c682Smrg if test -x /sbin/sysctl; then 17368bf5c682Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 17378bf5c682Smrg elif test -x /usr/sbin/sysctl; then 17388bf5c682Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 17398bf5c682Smrg else 17408bf5c682Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 17418bf5c682Smrg fi 17428bf5c682Smrg # And add a safety zone 17438bf5c682Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 17448bf5c682Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 17458bf5c682Smrg ;; 17468bf5c682Smrg 17478bf5c682Smrg interix*) 17488bf5c682Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 17498bf5c682Smrg lt_cv_sys_max_cmd_len=196608 17508bf5c682Smrg ;; 17518bf5c682Smrg 17528bf5c682Smrg os2*) 17538bf5c682Smrg # The test takes a long time on OS/2. 17548bf5c682Smrg lt_cv_sys_max_cmd_len=8192 17558bf5c682Smrg ;; 17568bf5c682Smrg 17578bf5c682Smrg osf*) 17588bf5c682Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 17598bf5c682Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 17608bf5c682Smrg # nice to cause kernel panics so lets avoid the loop below. 17618bf5c682Smrg # First set a reasonable default. 17628bf5c682Smrg lt_cv_sys_max_cmd_len=16384 17638bf5c682Smrg # 17648bf5c682Smrg if test -x /sbin/sysconfig; then 17658bf5c682Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 17668bf5c682Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 17678bf5c682Smrg esac 17688bf5c682Smrg fi 17698bf5c682Smrg ;; 17708bf5c682Smrg sco3.2v5*) 17718bf5c682Smrg lt_cv_sys_max_cmd_len=102400 17728bf5c682Smrg ;; 17738bf5c682Smrg sysv5* | sco5v6* | sysv4.2uw2*) 17748bf5c682Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 17758bf5c682Smrg if test -n "$kargmax"; then 17760a1d3ae0Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` 17778bf5c682Smrg else 17788bf5c682Smrg lt_cv_sys_max_cmd_len=32768 17798bf5c682Smrg fi 17808bf5c682Smrg ;; 17818bf5c682Smrg *) 17828bf5c682Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 17838bf5c682Smrg if test -n "$lt_cv_sys_max_cmd_len" && \ 17848bf5c682Smrg test undefined != "$lt_cv_sys_max_cmd_len"; then 17858bf5c682Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 17868bf5c682Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 17878bf5c682Smrg else 17888bf5c682Smrg # Make teststring a little bigger before we do anything with it. 17898bf5c682Smrg # a 1K string should be a reasonable start. 17908bf5c682Smrg for i in 1 2 3 4 5 6 7 8; do 17918bf5c682Smrg teststring=$teststring$teststring 17928bf5c682Smrg done 17938bf5c682Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 17948bf5c682Smrg # If test is not a shell built-in, we'll probably end up computing a 17958bf5c682Smrg # maximum length that is only half of the actual maximum length, but 17968bf5c682Smrg # we can't tell. 17978bf5c682Smrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 17988bf5c682Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 17998bf5c682Smrg test 17 != "$i" # 1/2 MB should be enough 18008bf5c682Smrg do 18018bf5c682Smrg i=`expr $i + 1` 18028bf5c682Smrg teststring=$teststring$teststring 18038bf5c682Smrg done 18048bf5c682Smrg # Only check the string length outside the loop. 18058bf5c682Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 18068bf5c682Smrg teststring= 18078bf5c682Smrg # Add a significant safety factor because C++ compilers can tack on 18088bf5c682Smrg # massive amounts of additional arguments before passing them to the 18098bf5c682Smrg # linker. It appears as though 1/2 is a usable value. 18108bf5c682Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 18118bf5c682Smrg fi 18128bf5c682Smrg ;; 18138bf5c682Smrg esac 18148bf5c682Smrg]) 18158bf5c682Smrgif test -n "$lt_cv_sys_max_cmd_len"; then 18168bf5c682Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 18178bf5c682Smrgelse 18188bf5c682Smrg AC_MSG_RESULT(none) 18198bf5c682Smrgfi 18208bf5c682Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 18218bf5c682Smrg_LT_DECL([], [max_cmd_len], [0], 18228bf5c682Smrg [What is the maximum length of a command?]) 18238bf5c682Smrg])# LT_CMD_MAX_LEN 18248bf5c682Smrg 18258bf5c682Smrg# Old name: 18268bf5c682SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 18278bf5c682Smrgdnl aclocal-1.4 backwards compatibility: 18288bf5c682Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 18298bf5c682Smrg 18308bf5c682Smrg 18318bf5c682Smrg# _LT_HEADER_DLFCN 18328bf5c682Smrg# ---------------- 18338bf5c682Smrgm4_defun([_LT_HEADER_DLFCN], 18348bf5c682Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 18358bf5c682Smrg])# _LT_HEADER_DLFCN 18368bf5c682Smrg 18378bf5c682Smrg 18388bf5c682Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 18398bf5c682Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 18408bf5c682Smrg# ---------------------------------------------------------------- 18418bf5c682Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 18428bf5c682Smrg[m4_require([_LT_HEADER_DLFCN])dnl 18438bf5c682Smrgif test yes = "$cross_compiling"; then : 18448bf5c682Smrg [$4] 18458bf5c682Smrgelse 18468bf5c682Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 18478bf5c682Smrg lt_status=$lt_dlunknown 18488bf5c682Smrg cat > conftest.$ac_ext <<_LT_EOF 18498bf5c682Smrg[#line $LINENO "configure" 18508bf5c682Smrg#include "confdefs.h" 18518bf5c682Smrg 18528bf5c682Smrg#if HAVE_DLFCN_H 18538bf5c682Smrg#include <dlfcn.h> 18548bf5c682Smrg#endif 18558bf5c682Smrg 18568bf5c682Smrg#include <stdio.h> 18578bf5c682Smrg 18588bf5c682Smrg#ifdef RTLD_GLOBAL 18598bf5c682Smrg# define LT_DLGLOBAL RTLD_GLOBAL 18608bf5c682Smrg#else 18618bf5c682Smrg# ifdef DL_GLOBAL 18628bf5c682Smrg# define LT_DLGLOBAL DL_GLOBAL 18638bf5c682Smrg# else 18648bf5c682Smrg# define LT_DLGLOBAL 0 18658bf5c682Smrg# endif 18668bf5c682Smrg#endif 18678bf5c682Smrg 18688bf5c682Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 18698bf5c682Smrg find out it does not work in some platform. */ 18708bf5c682Smrg#ifndef LT_DLLAZY_OR_NOW 18718bf5c682Smrg# ifdef RTLD_LAZY 18728bf5c682Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 18738bf5c682Smrg# else 18748bf5c682Smrg# ifdef DL_LAZY 18758bf5c682Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 18768bf5c682Smrg# else 18778bf5c682Smrg# ifdef RTLD_NOW 18788bf5c682Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 18798bf5c682Smrg# else 18808bf5c682Smrg# ifdef DL_NOW 18818bf5c682Smrg# define LT_DLLAZY_OR_NOW DL_NOW 18828bf5c682Smrg# else 18838bf5c682Smrg# define LT_DLLAZY_OR_NOW 0 18848bf5c682Smrg# endif 18858bf5c682Smrg# endif 18868bf5c682Smrg# endif 18878bf5c682Smrg# endif 18888bf5c682Smrg#endif 18898bf5c682Smrg 18908bf5c682Smrg/* When -fvisibility=hidden is used, assume the code has been annotated 18918bf5c682Smrg correspondingly for the symbols needed. */ 18928bf5c682Smrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 18938bf5c682Smrgint fnord () __attribute__((visibility("default"))); 18948bf5c682Smrg#endif 18958bf5c682Smrg 18968bf5c682Smrgint fnord () { return 42; } 18978bf5c682Smrgint main () 18988bf5c682Smrg{ 18998bf5c682Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 19008bf5c682Smrg int status = $lt_dlunknown; 19018bf5c682Smrg 19028bf5c682Smrg if (self) 19038bf5c682Smrg { 19048bf5c682Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 19058bf5c682Smrg else 19068bf5c682Smrg { 19078bf5c682Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 19088bf5c682Smrg else puts (dlerror ()); 19098bf5c682Smrg } 19108bf5c682Smrg /* dlclose (self); */ 19118bf5c682Smrg } 19128bf5c682Smrg else 19138bf5c682Smrg puts (dlerror ()); 19148bf5c682Smrg 19158bf5c682Smrg return status; 19168bf5c682Smrg}] 19178bf5c682Smrg_LT_EOF 19188bf5c682Smrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 19198bf5c682Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 19208bf5c682Smrg lt_status=$? 19218bf5c682Smrg case x$lt_status in 19228bf5c682Smrg x$lt_dlno_uscore) $1 ;; 19238bf5c682Smrg x$lt_dlneed_uscore) $2 ;; 19248bf5c682Smrg x$lt_dlunknown|x*) $3 ;; 19258bf5c682Smrg esac 19268bf5c682Smrg else : 19278bf5c682Smrg # compilation failed 19288bf5c682Smrg $3 19298bf5c682Smrg fi 19308bf5c682Smrgfi 19318bf5c682Smrgrm -fr conftest* 19328bf5c682Smrg])# _LT_TRY_DLOPEN_SELF 19338bf5c682Smrg 19348bf5c682Smrg 19358bf5c682Smrg# LT_SYS_DLOPEN_SELF 19368bf5c682Smrg# ------------------ 19378bf5c682SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 19388bf5c682Smrg[m4_require([_LT_HEADER_DLFCN])dnl 19398bf5c682Smrgif test yes != "$enable_dlopen"; then 19408bf5c682Smrg enable_dlopen=unknown 19418bf5c682Smrg enable_dlopen_self=unknown 19428bf5c682Smrg enable_dlopen_self_static=unknown 19438bf5c682Smrgelse 19448bf5c682Smrg lt_cv_dlopen=no 19458bf5c682Smrg lt_cv_dlopen_libs= 19468bf5c682Smrg 19478bf5c682Smrg case $host_os in 19488bf5c682Smrg beos*) 19498bf5c682Smrg lt_cv_dlopen=load_add_on 19508bf5c682Smrg lt_cv_dlopen_libs= 19518bf5c682Smrg lt_cv_dlopen_self=yes 19528bf5c682Smrg ;; 19538bf5c682Smrg 19548bf5c682Smrg mingw* | pw32* | cegcc*) 19558bf5c682Smrg lt_cv_dlopen=LoadLibrary 19568bf5c682Smrg lt_cv_dlopen_libs= 19578bf5c682Smrg ;; 19588bf5c682Smrg 19598bf5c682Smrg cygwin*) 19608bf5c682Smrg lt_cv_dlopen=dlopen 19618bf5c682Smrg lt_cv_dlopen_libs= 19628bf5c682Smrg ;; 19638bf5c682Smrg 19648bf5c682Smrg darwin*) 19658bf5c682Smrg # if libdl is installed we need to link against it 19668bf5c682Smrg AC_CHECK_LIB([dl], [dlopen], 19678bf5c682Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 19688bf5c682Smrg lt_cv_dlopen=dyld 19698bf5c682Smrg lt_cv_dlopen_libs= 19708bf5c682Smrg lt_cv_dlopen_self=yes 19718bf5c682Smrg ]) 19728bf5c682Smrg ;; 19738bf5c682Smrg 19748bf5c682Smrg tpf*) 19758bf5c682Smrg # Don't try to run any link tests for TPF. We know it's impossible 19768bf5c682Smrg # because TPF is a cross-compiler, and we know how we open DSOs. 19778bf5c682Smrg lt_cv_dlopen=dlopen 19788bf5c682Smrg lt_cv_dlopen_libs= 19798bf5c682Smrg lt_cv_dlopen_self=no 19808bf5c682Smrg ;; 19818bf5c682Smrg 19828bf5c682Smrg *) 19838bf5c682Smrg AC_CHECK_FUNC([shl_load], 19848bf5c682Smrg [lt_cv_dlopen=shl_load], 19858bf5c682Smrg [AC_CHECK_LIB([dld], [shl_load], 19868bf5c682Smrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 19878bf5c682Smrg [AC_CHECK_FUNC([dlopen], 19888bf5c682Smrg [lt_cv_dlopen=dlopen], 19898bf5c682Smrg [AC_CHECK_LIB([dl], [dlopen], 19908bf5c682Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 19918bf5c682Smrg [AC_CHECK_LIB([svld], [dlopen], 19928bf5c682Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 19938bf5c682Smrg [AC_CHECK_LIB([dld], [dld_link], 19948bf5c682Smrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 19958bf5c682Smrg ]) 19968bf5c682Smrg ]) 19978bf5c682Smrg ]) 19988bf5c682Smrg ]) 19998bf5c682Smrg ]) 20008bf5c682Smrg ;; 20018bf5c682Smrg esac 20028bf5c682Smrg 20038bf5c682Smrg if test no = "$lt_cv_dlopen"; then 20048bf5c682Smrg enable_dlopen=no 20058bf5c682Smrg else 20068bf5c682Smrg enable_dlopen=yes 20078bf5c682Smrg fi 20088bf5c682Smrg 20098bf5c682Smrg case $lt_cv_dlopen in 20108bf5c682Smrg dlopen) 20118bf5c682Smrg save_CPPFLAGS=$CPPFLAGS 20128bf5c682Smrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 20138bf5c682Smrg 20148bf5c682Smrg save_LDFLAGS=$LDFLAGS 20158bf5c682Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 20168bf5c682Smrg 20178bf5c682Smrg save_LIBS=$LIBS 20188bf5c682Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 20198bf5c682Smrg 20208bf5c682Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 20218bf5c682Smrg lt_cv_dlopen_self, [dnl 20228bf5c682Smrg _LT_TRY_DLOPEN_SELF( 20238bf5c682Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 20248bf5c682Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 20258bf5c682Smrg ]) 20268bf5c682Smrg 20278bf5c682Smrg if test yes = "$lt_cv_dlopen_self"; then 20288bf5c682Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 20298bf5c682Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 20308bf5c682Smrg lt_cv_dlopen_self_static, [dnl 20318bf5c682Smrg _LT_TRY_DLOPEN_SELF( 20328bf5c682Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 20338bf5c682Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 20348bf5c682Smrg ]) 20358bf5c682Smrg fi 20368bf5c682Smrg 20378bf5c682Smrg CPPFLAGS=$save_CPPFLAGS 20388bf5c682Smrg LDFLAGS=$save_LDFLAGS 20398bf5c682Smrg LIBS=$save_LIBS 20408bf5c682Smrg ;; 20418bf5c682Smrg esac 20428bf5c682Smrg 20438bf5c682Smrg case $lt_cv_dlopen_self in 20448bf5c682Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 20458bf5c682Smrg *) enable_dlopen_self=unknown ;; 20468bf5c682Smrg esac 20478bf5c682Smrg 20488bf5c682Smrg case $lt_cv_dlopen_self_static in 20498bf5c682Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 20508bf5c682Smrg *) enable_dlopen_self_static=unknown ;; 20518bf5c682Smrg esac 20528bf5c682Smrgfi 20538bf5c682Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 20548bf5c682Smrg [Whether dlopen is supported]) 20558bf5c682Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 20568bf5c682Smrg [Whether dlopen of programs is supported]) 20578bf5c682Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 20588bf5c682Smrg [Whether dlopen of statically linked programs is supported]) 20598bf5c682Smrg])# LT_SYS_DLOPEN_SELF 20608bf5c682Smrg 20618bf5c682Smrg# Old name: 20628bf5c682SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 20638bf5c682Smrgdnl aclocal-1.4 backwards compatibility: 20648bf5c682Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 20658bf5c682Smrg 20668bf5c682Smrg 20678bf5c682Smrg# _LT_COMPILER_C_O([TAGNAME]) 20688bf5c682Smrg# --------------------------- 20698bf5c682Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 20708bf5c682Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 20718bf5c682Smrgm4_defun([_LT_COMPILER_C_O], 20728bf5c682Smrg[m4_require([_LT_DECL_SED])dnl 20738bf5c682Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 20748bf5c682Smrgm4_require([_LT_TAG_COMPILER])dnl 20758bf5c682SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 20768bf5c682Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 20778bf5c682Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 20788bf5c682Smrg $RM -r conftest 2>/dev/null 20798bf5c682Smrg mkdir conftest 20808bf5c682Smrg cd conftest 20818bf5c682Smrg mkdir out 20828bf5c682Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 20838bf5c682Smrg 20848bf5c682Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 20858bf5c682Smrg # Insert the option either (1) after the last *FLAGS variable, or 20868bf5c682Smrg # (2) before a word containing "conftest.", or (3) at the end. 20878bf5c682Smrg # Note that $ac_compile itself does not contain backslashes and begins 20888bf5c682Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 20898bf5c682Smrg lt_compile=`echo "$ac_compile" | $SED \ 20908bf5c682Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 20918bf5c682Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 20928bf5c682Smrg -e 's:$: $lt_compiler_flag:'` 20938bf5c682Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 20948bf5c682Smrg (eval "$lt_compile" 2>out/conftest.err) 20958bf5c682Smrg ac_status=$? 20968bf5c682Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 20978bf5c682Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 20988bf5c682Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 20998bf5c682Smrg then 21008bf5c682Smrg # The compiler can only warn and ignore the option if not recognized 21018bf5c682Smrg # So say no if there are warnings 21028bf5c682Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 21038bf5c682Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 21048bf5c682Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 21058bf5c682Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 21068bf5c682Smrg fi 21078bf5c682Smrg fi 21088bf5c682Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 21098bf5c682Smrg $RM conftest* 21108bf5c682Smrg # SGI C++ compiler will create directory out/ii_files/ for 21118bf5c682Smrg # template instantiation 21128bf5c682Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 21138bf5c682Smrg $RM out/* && rmdir out 21148bf5c682Smrg cd .. 21158bf5c682Smrg $RM -r conftest 21168bf5c682Smrg $RM conftest* 21178bf5c682Smrg]) 21188bf5c682Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 21198bf5c682Smrg [Does compiler simultaneously support -c and -o options?]) 21208bf5c682Smrg])# _LT_COMPILER_C_O 21218bf5c682Smrg 21228bf5c682Smrg 21238bf5c682Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 21248bf5c682Smrg# ---------------------------------- 21258bf5c682Smrg# Check to see if we can do hard links to lock some files if needed 21268bf5c682Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 21278bf5c682Smrg[m4_require([_LT_ENABLE_LOCK])dnl 21288bf5c682Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 21298bf5c682Smrg_LT_COMPILER_C_O([$1]) 21308bf5c682Smrg 21318bf5c682Smrghard_links=nottested 21328bf5c682Smrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 21338bf5c682Smrg # do not overwrite the value of need_locks provided by the user 21348bf5c682Smrg AC_MSG_CHECKING([if we can lock with hard links]) 21358bf5c682Smrg hard_links=yes 21368bf5c682Smrg $RM conftest* 21378bf5c682Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 21388bf5c682Smrg touch conftest.a 21398bf5c682Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 21408bf5c682Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 21418bf5c682Smrg AC_MSG_RESULT([$hard_links]) 21428bf5c682Smrg if test no = "$hard_links"; then 21438bf5c682Smrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 21448bf5c682Smrg need_locks=warn 21458bf5c682Smrg fi 21468bf5c682Smrgelse 21478bf5c682Smrg need_locks=no 21488bf5c682Smrgfi 21498bf5c682Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 21508bf5c682Smrg])# _LT_COMPILER_FILE_LOCKS 21518bf5c682Smrg 21528bf5c682Smrg 21538bf5c682Smrg# _LT_CHECK_OBJDIR 21548bf5c682Smrg# ---------------- 21558bf5c682Smrgm4_defun([_LT_CHECK_OBJDIR], 21568bf5c682Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 21578bf5c682Smrg[rm -f .libs 2>/dev/null 21588bf5c682Smrgmkdir .libs 2>/dev/null 21598bf5c682Smrgif test -d .libs; then 21608bf5c682Smrg lt_cv_objdir=.libs 21618bf5c682Smrgelse 21628bf5c682Smrg # MS-DOS does not allow filenames that begin with a dot. 21638bf5c682Smrg lt_cv_objdir=_libs 21648bf5c682Smrgfi 21658bf5c682Smrgrmdir .libs 2>/dev/null]) 21668bf5c682Smrgobjdir=$lt_cv_objdir 21678bf5c682Smrg_LT_DECL([], [objdir], [0], 21688bf5c682Smrg [The name of the directory that contains temporary libtool files])dnl 21698bf5c682Smrgm4_pattern_allow([LT_OBJDIR])dnl 21708bf5c682SmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 21718bf5c682Smrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 21728bf5c682Smrg])# _LT_CHECK_OBJDIR 21738bf5c682Smrg 21748bf5c682Smrg 21758bf5c682Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 21768bf5c682Smrg# -------------------------------------- 21778bf5c682Smrg# Check hardcoding attributes. 21788bf5c682Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 21798bf5c682Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 21808bf5c682Smrg_LT_TAGVAR(hardcode_action, $1)= 21818bf5c682Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 21828bf5c682Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 21838bf5c682Smrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 21848bf5c682Smrg 21858bf5c682Smrg # We can hardcode non-existent directories. 21868bf5c682Smrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 21878bf5c682Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 21888bf5c682Smrg # have to relink, otherwise we might link with an installed library 21898bf5c682Smrg # when we should be linking with a yet-to-be-installed one 21908bf5c682Smrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 21918bf5c682Smrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 21928bf5c682Smrg # Linking always hardcodes the temporary library directory. 21938bf5c682Smrg _LT_TAGVAR(hardcode_action, $1)=relink 21948bf5c682Smrg else 21958bf5c682Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 21968bf5c682Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 21978bf5c682Smrg fi 21988bf5c682Smrgelse 21998bf5c682Smrg # We cannot hardcode anything, or else we can only hardcode existing 22008bf5c682Smrg # directories. 22018bf5c682Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 22028bf5c682Smrgfi 22038bf5c682SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 22048bf5c682Smrg 22058bf5c682Smrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 22068bf5c682Smrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 22078bf5c682Smrg # Fast installation is not supported 22088bf5c682Smrg enable_fast_install=no 22098bf5c682Smrgelif test yes = "$shlibpath_overrides_runpath" || 22108bf5c682Smrg test no = "$enable_shared"; then 22118bf5c682Smrg # Fast installation is not necessary 22128bf5c682Smrg enable_fast_install=needless 22138bf5c682Smrgfi 22148bf5c682Smrg_LT_TAGDECL([], [hardcode_action], [0], 22158bf5c682Smrg [How to hardcode a shared library path into an executable]) 22168bf5c682Smrg])# _LT_LINKER_HARDCODE_LIBPATH 22178bf5c682Smrg 22188bf5c682Smrg 22198bf5c682Smrg# _LT_CMD_STRIPLIB 22208bf5c682Smrg# ---------------- 22218bf5c682Smrgm4_defun([_LT_CMD_STRIPLIB], 22228bf5c682Smrg[m4_require([_LT_DECL_EGREP]) 22238bf5c682Smrgstriplib= 22248bf5c682Smrgold_striplib= 22258bf5c682SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 22268bf5c682Smrgif test -z "$STRIP"; then 22278bf5c682Smrg AC_MSG_RESULT([no]) 22288bf5c682Smrgelse 22298bf5c682Smrg if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 22308bf5c682Smrg old_striplib="$STRIP --strip-debug" 22318bf5c682Smrg striplib="$STRIP --strip-unneeded" 22328bf5c682Smrg AC_MSG_RESULT([yes]) 22338bf5c682Smrg else 22348bf5c682Smrg case $host_os in 22358bf5c682Smrg darwin*) 22368bf5c682Smrg # FIXME - insert some real tests, host_os isn't really good enough 22378bf5c682Smrg striplib="$STRIP -x" 22388bf5c682Smrg old_striplib="$STRIP -S" 22398bf5c682Smrg AC_MSG_RESULT([yes]) 22408bf5c682Smrg ;; 22418bf5c682Smrg freebsd*) 22428bf5c682Smrg if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 22438bf5c682Smrg old_striplib="$STRIP --strip-debug" 22448bf5c682Smrg striplib="$STRIP --strip-unneeded" 22458bf5c682Smrg AC_MSG_RESULT([yes]) 22468bf5c682Smrg else 22478bf5c682Smrg AC_MSG_RESULT([no]) 22488bf5c682Smrg fi 22498bf5c682Smrg ;; 22508bf5c682Smrg *) 22518bf5c682Smrg AC_MSG_RESULT([no]) 22528bf5c682Smrg ;; 22538bf5c682Smrg esac 22548bf5c682Smrg fi 22558bf5c682Smrgfi 22568bf5c682Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 22578bf5c682Smrg_LT_DECL([], [striplib], [1]) 22588bf5c682Smrg])# _LT_CMD_STRIPLIB 22598bf5c682Smrg 22608bf5c682Smrg 22618bf5c682Smrg# _LT_PREPARE_MUNGE_PATH_LIST 22628bf5c682Smrg# --------------------------- 22638bf5c682Smrg# Make sure func_munge_path_list() is defined correctly. 22648bf5c682Smrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 22658bf5c682Smrg[[# func_munge_path_list VARIABLE PATH 22668bf5c682Smrg# ----------------------------------- 22678bf5c682Smrg# VARIABLE is name of variable containing _space_ separated list of 22688bf5c682Smrg# directories to be munged by the contents of PATH, which is string 22698bf5c682Smrg# having a format: 22708bf5c682Smrg# "DIR[:DIR]:" 22718bf5c682Smrg# string "DIR[ DIR]" will be prepended to VARIABLE 22728bf5c682Smrg# ":DIR[:DIR]" 22738bf5c682Smrg# string "DIR[ DIR]" will be appended to VARIABLE 22748bf5c682Smrg# "DIRP[:DIRP]::[DIRA:]DIRA" 22758bf5c682Smrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 22768bf5c682Smrg# "DIRA[ DIRA]" will be appended to VARIABLE 22778bf5c682Smrg# "DIR[:DIR]" 22788bf5c682Smrg# VARIABLE will be replaced by "DIR[ DIR]" 22798bf5c682Smrgfunc_munge_path_list () 22808bf5c682Smrg{ 22818bf5c682Smrg case x@S|@2 in 22828bf5c682Smrg x) 22838bf5c682Smrg ;; 22848bf5c682Smrg *:) 22858bf5c682Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 22868bf5c682Smrg ;; 22878bf5c682Smrg x:*) 22888bf5c682Smrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 22898bf5c682Smrg ;; 22908bf5c682Smrg *::*) 22918bf5c682Smrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 22928bf5c682Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 22938bf5c682Smrg ;; 22948bf5c682Smrg *) 22958bf5c682Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 22968bf5c682Smrg ;; 22978bf5c682Smrg esac 22988bf5c682Smrg} 22998bf5c682Smrg]])# _LT_PREPARE_PATH_LIST 23008bf5c682Smrg 23018bf5c682Smrg 23028bf5c682Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 23038bf5c682Smrg# ----------------------------- 23048bf5c682Smrg# PORTME Fill in your ld.so characteristics 23058bf5c682Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 23068bf5c682Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 23078bf5c682Smrgm4_require([_LT_DECL_EGREP])dnl 23088bf5c682Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 23098bf5c682Smrgm4_require([_LT_DECL_OBJDUMP])dnl 23108bf5c682Smrgm4_require([_LT_DECL_SED])dnl 23118bf5c682Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 23128bf5c682Smrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 23138bf5c682SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 23148bf5c682Smrgm4_if([$1], 23158bf5c682Smrg [], [ 23168bf5c682Smrgif test yes = "$GCC"; then 23178bf5c682Smrg case $host_os in 23188bf5c682Smrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 23198bf5c682Smrg *) lt_awk_arg='/^libraries:/' ;; 23208bf5c682Smrg esac 23218bf5c682Smrg case $host_os in 23228bf5c682Smrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 23238bf5c682Smrg *) lt_sed_strip_eq='s|=/|/|g' ;; 23248bf5c682Smrg esac 23258bf5c682Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 23268bf5c682Smrg case $lt_search_path_spec in 23278bf5c682Smrg *\;*) 23288bf5c682Smrg # if the path contains ";" then we assume it to be the separator 23298bf5c682Smrg # otherwise default to the standard path separator (i.e. ":") - it is 23308bf5c682Smrg # assumed that no part of a normal pathname contains ";" but that should 23318bf5c682Smrg # okay in the real world where ";" in dirpaths is itself problematic. 23328bf5c682Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 23338bf5c682Smrg ;; 23348bf5c682Smrg *) 23358bf5c682Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 23368bf5c682Smrg ;; 23378bf5c682Smrg esac 23388bf5c682Smrg # Ok, now we have the path, separated by spaces, we can step through it 23398bf5c682Smrg # and add multilib dir if necessary... 23408bf5c682Smrg lt_tmp_lt_search_path_spec= 23418bf5c682Smrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 23428bf5c682Smrg # ...but if some path component already ends with the multilib dir we assume 23438bf5c682Smrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 23448bf5c682Smrg case "$lt_multi_os_dir; $lt_search_path_spec " in 23458bf5c682Smrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 23468bf5c682Smrg lt_multi_os_dir= 23478bf5c682Smrg ;; 23488bf5c682Smrg esac 23498bf5c682Smrg for lt_sys_path in $lt_search_path_spec; do 23508bf5c682Smrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 23518bf5c682Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 23528bf5c682Smrg elif test -n "$lt_multi_os_dir"; then 23538bf5c682Smrg test -d "$lt_sys_path" && \ 23548bf5c682Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 23558bf5c682Smrg fi 23568bf5c682Smrg done 23578bf5c682Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 23588bf5c682SmrgBEGIN {RS = " "; FS = "/|\n";} { 23598bf5c682Smrg lt_foo = ""; 23608bf5c682Smrg lt_count = 0; 23618bf5c682Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 23628bf5c682Smrg if ($lt_i != "" && $lt_i != ".") { 23638bf5c682Smrg if ($lt_i == "..") { 23648bf5c682Smrg lt_count++; 23658bf5c682Smrg } else { 23668bf5c682Smrg if (lt_count == 0) { 23678bf5c682Smrg lt_foo = "/" $lt_i lt_foo; 23688bf5c682Smrg } else { 23698bf5c682Smrg lt_count--; 23708bf5c682Smrg } 23718bf5c682Smrg } 23728bf5c682Smrg } 23738bf5c682Smrg } 23748bf5c682Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 23758bf5c682Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 23768bf5c682Smrg}'` 23778bf5c682Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 23788bf5c682Smrg # for these hosts. 23798bf5c682Smrg case $host_os in 23808bf5c682Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 23818bf5c682Smrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 23828bf5c682Smrg esac 23838bf5c682Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 23848bf5c682Smrgelse 23858bf5c682Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 23868bf5c682Smrgfi]) 23878bf5c682Smrglibrary_names_spec= 23888bf5c682Smrglibname_spec='lib$name' 23898bf5c682Smrgsoname_spec= 23908bf5c682Smrgshrext_cmds=.so 23918bf5c682Smrgpostinstall_cmds= 23928bf5c682Smrgpostuninstall_cmds= 23938bf5c682Smrgfinish_cmds= 23948bf5c682Smrgfinish_eval= 23958bf5c682Smrgshlibpath_var= 23968bf5c682Smrgshlibpath_overrides_runpath=unknown 23978bf5c682Smrgversion_type=none 23988bf5c682Smrgdynamic_linker="$host_os ld.so" 23998bf5c682Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 24008bf5c682Smrgneed_lib_prefix=unknown 24018bf5c682Smrghardcode_into_libs=no 24028bf5c682Smrg 24038bf5c682Smrg# when you set need_version to no, make sure it does not cause -set_version 24048bf5c682Smrg# flags to be left without arguments 24058bf5c682Smrgneed_version=unknown 24068bf5c682Smrg 24078bf5c682SmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 24088bf5c682Smrg[User-defined run-time library search path.]) 24098bf5c682Smrg 24108bf5c682Smrgcase $host_os in 24118bf5c682Smrgaix3*) 24128bf5c682Smrg version_type=linux # correct to gnu/linux during the next big refactor 24138bf5c682Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 24148bf5c682Smrg shlibpath_var=LIBPATH 24158bf5c682Smrg 24168bf5c682Smrg # AIX 3 has no versioning support, so we append a major version to the name. 24178bf5c682Smrg soname_spec='$libname$release$shared_ext$major' 24188bf5c682Smrg ;; 24198bf5c682Smrg 24208bf5c682Smrgaix[[4-9]]*) 24218bf5c682Smrg version_type=linux # correct to gnu/linux during the next big refactor 24228bf5c682Smrg need_lib_prefix=no 24238bf5c682Smrg need_version=no 24248bf5c682Smrg hardcode_into_libs=yes 24258bf5c682Smrg if test ia64 = "$host_cpu"; then 24268bf5c682Smrg # AIX 5 supports IA64 24278bf5c682Smrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 24288bf5c682Smrg shlibpath_var=LD_LIBRARY_PATH 24298bf5c682Smrg else 24308bf5c682Smrg # With GCC up to 2.95.x, collect2 would create an import file 24318bf5c682Smrg # for dependence libraries. The import file would start with 24328bf5c682Smrg # the line '#! .'. This would cause the generated library to 24338bf5c682Smrg # depend on '.', always an invalid library. This was fixed in 24348bf5c682Smrg # development snapshots of GCC prior to 3.0. 24358bf5c682Smrg case $host_os in 24368bf5c682Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 24378bf5c682Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 24388bf5c682Smrg echo ' yes ' 24398bf5c682Smrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 24408bf5c682Smrg : 24418bf5c682Smrg else 24428bf5c682Smrg can_build_shared=no 24438bf5c682Smrg fi 24448bf5c682Smrg ;; 24458bf5c682Smrg esac 24468bf5c682Smrg # Using Import Files as archive members, it is possible to support 24478bf5c682Smrg # filename-based versioning of shared library archives on AIX. While 24488bf5c682Smrg # this would work for both with and without runtime linking, it will 24498bf5c682Smrg # prevent static linking of such archives. So we do filename-based 24508bf5c682Smrg # shared library versioning with .so extension only, which is used 24518bf5c682Smrg # when both runtime linking and shared linking is enabled. 24528bf5c682Smrg # Unfortunately, runtime linking may impact performance, so we do 24538bf5c682Smrg # not want this to be the default eventually. Also, we use the 24548bf5c682Smrg # versioned .so libs for executables only if there is the -brtl 24558bf5c682Smrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 24568bf5c682Smrg # To allow for filename-based versioning support, we need to create 24578bf5c682Smrg # libNAME.so.V as an archive file, containing: 24588bf5c682Smrg # *) an Import File, referring to the versioned filename of the 24598bf5c682Smrg # archive as well as the shared archive member, telling the 24608bf5c682Smrg # bitwidth (32 or 64) of that shared object, and providing the 24618bf5c682Smrg # list of exported symbols of that shared object, eventually 24628bf5c682Smrg # decorated with the 'weak' keyword 24638bf5c682Smrg # *) the shared object with the F_LOADONLY flag set, to really avoid 24648bf5c682Smrg # it being seen by the linker. 24658bf5c682Smrg # At run time we better use the real file rather than another symlink, 24668bf5c682Smrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 24678bf5c682Smrg 24688bf5c682Smrg case $with_aix_soname,$aix_use_runtimelinking in 24698bf5c682Smrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 24708bf5c682Smrg # soname into executable. Probably we can add versioning support to 24718bf5c682Smrg # collect2, so additional links can be useful in future. 24728bf5c682Smrg aix,yes) # traditional libtool 24738bf5c682Smrg dynamic_linker='AIX unversionable lib.so' 24748bf5c682Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 24758bf5c682Smrg # instead of lib<name>.a to let people know that these are not 24768bf5c682Smrg # typical AIX shared libraries. 24778bf5c682Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 24788bf5c682Smrg ;; 24798bf5c682Smrg aix,no) # traditional AIX only 24808bf5c682Smrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 24818bf5c682Smrg # We preserve .a as extension for shared libraries through AIX4.2 24828bf5c682Smrg # and later when we are not doing run time linking. 24838bf5c682Smrg library_names_spec='$libname$release.a $libname.a' 24848bf5c682Smrg soname_spec='$libname$release$shared_ext$major' 24858bf5c682Smrg ;; 24868bf5c682Smrg svr4,*) # full svr4 only 24878bf5c682Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 24888bf5c682Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 24898bf5c682Smrg # We do not specify a path in Import Files, so LIBPATH fires. 24908bf5c682Smrg shlibpath_overrides_runpath=yes 24918bf5c682Smrg ;; 24928bf5c682Smrg *,yes) # both, prefer svr4 24938bf5c682Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 24948bf5c682Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 24958bf5c682Smrg # unpreferred sharedlib libNAME.a needs extra handling 24968bf5c682Smrg 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"' 24978bf5c682Smrg 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"' 24988bf5c682Smrg # We do not specify a path in Import Files, so LIBPATH fires. 24998bf5c682Smrg shlibpath_overrides_runpath=yes 25008bf5c682Smrg ;; 25018bf5c682Smrg *,no) # both, prefer aix 25028bf5c682Smrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 25038bf5c682Smrg library_names_spec='$libname$release.a $libname.a' 25048bf5c682Smrg soname_spec='$libname$release$shared_ext$major' 25058bf5c682Smrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 25068bf5c682Smrg 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)' 25078bf5c682Smrg 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"' 25088bf5c682Smrg ;; 25098bf5c682Smrg esac 25108bf5c682Smrg shlibpath_var=LIBPATH 25118bf5c682Smrg fi 25128bf5c682Smrg ;; 25138bf5c682Smrg 25148bf5c682Smrgamigaos*) 25158bf5c682Smrg case $host_cpu in 25168bf5c682Smrg powerpc) 25178bf5c682Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 25188bf5c682Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 25198bf5c682Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 25208bf5c682Smrg ;; 25218bf5c682Smrg m68k) 25228bf5c682Smrg library_names_spec='$libname.ixlibrary $libname.a' 25238bf5c682Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 25248bf5c682Smrg 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' 25258bf5c682Smrg ;; 25268bf5c682Smrg esac 25278bf5c682Smrg ;; 25288bf5c682Smrg 25298bf5c682Smrgbeos*) 25308bf5c682Smrg library_names_spec='$libname$shared_ext' 25318bf5c682Smrg dynamic_linker="$host_os ld.so" 25328bf5c682Smrg shlibpath_var=LIBRARY_PATH 25338bf5c682Smrg ;; 25348bf5c682Smrg 25358bf5c682Smrgbsdi[[45]]*) 25368bf5c682Smrg version_type=linux # correct to gnu/linux during the next big refactor 25378bf5c682Smrg need_version=no 25388bf5c682Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 25398bf5c682Smrg soname_spec='$libname$release$shared_ext$major' 25408bf5c682Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 25418bf5c682Smrg shlibpath_var=LD_LIBRARY_PATH 25428bf5c682Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 25438bf5c682Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 25448bf5c682Smrg # the default ld.so.conf also contains /usr/contrib/lib and 25458bf5c682Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 25468bf5c682Smrg # libtool to hard-code these into programs 25478bf5c682Smrg ;; 25488bf5c682Smrg 25498bf5c682Smrgcygwin* | mingw* | pw32* | cegcc*) 25508bf5c682Smrg version_type=windows 25518bf5c682Smrg shrext_cmds=.dll 25528bf5c682Smrg need_version=no 25538bf5c682Smrg need_lib_prefix=no 25548bf5c682Smrg 25558bf5c682Smrg case $GCC,$cc_basename in 25568bf5c682Smrg yes,*) 25578bf5c682Smrg # gcc 25588bf5c682Smrg library_names_spec='$libname.dll.a' 25598bf5c682Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 25608bf5c682Smrg postinstall_cmds='base_file=`basename \$file`~ 25618bf5c682Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 25628bf5c682Smrg dldir=$destdir/`dirname \$dlpath`~ 25638bf5c682Smrg test -d \$dldir || mkdir -p \$dldir~ 25648bf5c682Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 25658bf5c682Smrg chmod a+x \$dldir/$dlname~ 25668bf5c682Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 25678bf5c682Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 25688bf5c682Smrg fi' 25698bf5c682Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 25708bf5c682Smrg dlpath=$dir/\$dldll~ 25718bf5c682Smrg $RM \$dlpath' 25728bf5c682Smrg shlibpath_overrides_runpath=yes 25738bf5c682Smrg 25748bf5c682Smrg case $host_os in 25758bf5c682Smrg cygwin*) 25768bf5c682Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 25770a1d3ae0Smrg soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25788bf5c682Smrgm4_if([$1], [],[ 25798bf5c682Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 25808bf5c682Smrg ;; 25818bf5c682Smrg mingw* | cegcc*) 25828bf5c682Smrg # MinGW DLLs use traditional 'lib' prefix 25838bf5c682Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25848bf5c682Smrg ;; 25858bf5c682Smrg pw32*) 25868bf5c682Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 25870a1d3ae0Smrg library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25888bf5c682Smrg ;; 25898bf5c682Smrg esac 25908bf5c682Smrg dynamic_linker='Win32 ld.exe' 25918bf5c682Smrg ;; 25928bf5c682Smrg 25930a1d3ae0Smrg *,cl* | *,icl*) 25940a1d3ae0Smrg # Native MSVC or ICC 25958bf5c682Smrg libname_spec='$name' 25968bf5c682Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25978bf5c682Smrg library_names_spec='$libname.dll.lib' 25988bf5c682Smrg 25998bf5c682Smrg case $build_os in 26008bf5c682Smrg mingw*) 26018bf5c682Smrg sys_lib_search_path_spec= 26028bf5c682Smrg lt_save_ifs=$IFS 26038bf5c682Smrg IFS=';' 26048bf5c682Smrg for lt_path in $LIB 26058bf5c682Smrg do 26068bf5c682Smrg IFS=$lt_save_ifs 26078bf5c682Smrg # Let DOS variable expansion print the short 8.3 style file name. 26088bf5c682Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 26098bf5c682Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 26108bf5c682Smrg done 26118bf5c682Smrg IFS=$lt_save_ifs 26128bf5c682Smrg # Convert to MSYS style. 26130a1d3ae0Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 26148bf5c682Smrg ;; 26158bf5c682Smrg cygwin*) 26168bf5c682Smrg # Convert to unix form, then to dos form, then back to unix form 26178bf5c682Smrg # but this time dos style (no spaces!) so that the unix form looks 26188bf5c682Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 26198bf5c682Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 26208bf5c682Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 26218bf5c682Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 26228bf5c682Smrg ;; 26238bf5c682Smrg *) 26248bf5c682Smrg sys_lib_search_path_spec=$LIB 26258bf5c682Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 26268bf5c682Smrg # It is most probably a Windows format PATH. 26278bf5c682Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 26288bf5c682Smrg else 26298bf5c682Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 26308bf5c682Smrg fi 26318bf5c682Smrg # FIXME: find the short name or the path components, as spaces are 26328bf5c682Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 26338bf5c682Smrg ;; 26348bf5c682Smrg esac 26358bf5c682Smrg 26368bf5c682Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 26378bf5c682Smrg postinstall_cmds='base_file=`basename \$file`~ 26388bf5c682Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 26398bf5c682Smrg dldir=$destdir/`dirname \$dlpath`~ 26408bf5c682Smrg test -d \$dldir || mkdir -p \$dldir~ 26418bf5c682Smrg $install_prog $dir/$dlname \$dldir/$dlname' 26428bf5c682Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 26438bf5c682Smrg dlpath=$dir/\$dldll~ 26448bf5c682Smrg $RM \$dlpath' 26458bf5c682Smrg shlibpath_overrides_runpath=yes 26468bf5c682Smrg dynamic_linker='Win32 link.exe' 26478bf5c682Smrg ;; 26488bf5c682Smrg 26498bf5c682Smrg *) 26500a1d3ae0Smrg # Assume MSVC and ICC wrapper 26518bf5c682Smrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 26528bf5c682Smrg dynamic_linker='Win32 ld.exe' 26538bf5c682Smrg ;; 26548bf5c682Smrg esac 26558bf5c682Smrg # FIXME: first we should search . and the directory the executable is in 26568bf5c682Smrg shlibpath_var=PATH 26578bf5c682Smrg ;; 26588bf5c682Smrg 26598bf5c682Smrgdarwin* | rhapsody*) 26608bf5c682Smrg dynamic_linker="$host_os dyld" 26618bf5c682Smrg version_type=darwin 26628bf5c682Smrg need_lib_prefix=no 26638bf5c682Smrg need_version=no 26640a1d3ae0Smrg library_names_spec='$libname$release$versuffix$shared_ext $libname$release$major$shared_ext $libname$shared_ext' 26658bf5c682Smrg soname_spec='$libname$release$major$shared_ext' 26668bf5c682Smrg shlibpath_overrides_runpath=yes 26678bf5c682Smrg shlibpath_var=DYLD_LIBRARY_PATH 26680a1d3ae0Smrg shrext_cmds='`test .$module = .yes && echo .bundle || echo .dylib`' 26698bf5c682Smrgm4_if([$1], [],[ 26708bf5c682Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 26718bf5c682Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 26728bf5c682Smrg ;; 26738bf5c682Smrg 26748bf5c682Smrgdgux*) 26758bf5c682Smrg version_type=linux # correct to gnu/linux during the next big refactor 26768bf5c682Smrg need_lib_prefix=no 26778bf5c682Smrg need_version=no 26788bf5c682Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 26798bf5c682Smrg soname_spec='$libname$release$shared_ext$major' 26808bf5c682Smrg shlibpath_var=LD_LIBRARY_PATH 26818bf5c682Smrg ;; 26828bf5c682Smrg 26830a1d3ae0Smrgfreebsd* | dragonfly* | midnightbsd*) 26848bf5c682Smrg # DragonFly does not have aout. When/if they implement a new 26858bf5c682Smrg # versioning mechanism, adjust this. 26868bf5c682Smrg if test -x /usr/bin/objformat; then 26878bf5c682Smrg objformat=`/usr/bin/objformat` 26888bf5c682Smrg else 26898bf5c682Smrg case $host_os in 26908bf5c682Smrg freebsd[[23]].*) objformat=aout ;; 26918bf5c682Smrg *) objformat=elf ;; 26928bf5c682Smrg esac 26938bf5c682Smrg fi 26940a1d3ae0Smrg # Handle Gentoo/FreeBSD as it was Linux 26950a1d3ae0Smrg case $host_vendor in 26960a1d3ae0Smrg gentoo) 26970a1d3ae0Smrg version_type=linux ;; 26980a1d3ae0Smrg *) 26990a1d3ae0Smrg version_type=freebsd-$objformat ;; 27000a1d3ae0Smrg esac 27010a1d3ae0Smrg 27028bf5c682Smrg case $version_type in 27038bf5c682Smrg freebsd-elf*) 27048bf5c682Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27058bf5c682Smrg soname_spec='$libname$release$shared_ext$major' 27068bf5c682Smrg need_version=no 27078bf5c682Smrg need_lib_prefix=no 27088bf5c682Smrg ;; 27098bf5c682Smrg freebsd-*) 27108bf5c682Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 27118bf5c682Smrg need_version=yes 27128bf5c682Smrg ;; 27130a1d3ae0Smrg linux) 27140a1d3ae0Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 27150a1d3ae0Smrg soname_spec='${libname}${release}${shared_ext}$major' 27160a1d3ae0Smrg need_lib_prefix=no 27170a1d3ae0Smrg need_version=no 27180a1d3ae0Smrg ;; 27198bf5c682Smrg esac 27208bf5c682Smrg shlibpath_var=LD_LIBRARY_PATH 27218bf5c682Smrg case $host_os in 27228bf5c682Smrg freebsd2.*) 27238bf5c682Smrg shlibpath_overrides_runpath=yes 27248bf5c682Smrg ;; 27258bf5c682Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 27268bf5c682Smrg shlibpath_overrides_runpath=yes 27278bf5c682Smrg hardcode_into_libs=yes 27288bf5c682Smrg ;; 27298bf5c682Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 27308bf5c682Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 27318bf5c682Smrg shlibpath_overrides_runpath=no 27328bf5c682Smrg hardcode_into_libs=yes 27338bf5c682Smrg ;; 27348bf5c682Smrg *) # from 4.6 on, and DragonFly 27358bf5c682Smrg shlibpath_overrides_runpath=yes 27368bf5c682Smrg hardcode_into_libs=yes 27378bf5c682Smrg ;; 27388bf5c682Smrg esac 27398bf5c682Smrg ;; 27408bf5c682Smrg 27418bf5c682Smrghaiku*) 27428bf5c682Smrg version_type=linux # correct to gnu/linux during the next big refactor 27438bf5c682Smrg need_lib_prefix=no 27448bf5c682Smrg need_version=no 27458bf5c682Smrg dynamic_linker="$host_os runtime_loader" 27468bf5c682Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27478bf5c682Smrg soname_spec='$libname$release$shared_ext$major' 27488bf5c682Smrg shlibpath_var=LIBRARY_PATH 27498bf5c682Smrg shlibpath_overrides_runpath=no 27508bf5c682Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 27518bf5c682Smrg hardcode_into_libs=yes 27528bf5c682Smrg ;; 27538bf5c682Smrg 27548bf5c682Smrghpux9* | hpux10* | hpux11*) 27558bf5c682Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 27568bf5c682Smrg # link against other versions. 27578bf5c682Smrg version_type=sunos 27588bf5c682Smrg need_lib_prefix=no 27598bf5c682Smrg need_version=no 27608bf5c682Smrg case $host_cpu in 27618bf5c682Smrg ia64*) 27628bf5c682Smrg shrext_cmds='.so' 27638bf5c682Smrg hardcode_into_libs=yes 27648bf5c682Smrg dynamic_linker="$host_os dld.so" 27658bf5c682Smrg shlibpath_var=LD_LIBRARY_PATH 27668bf5c682Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 27678bf5c682Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27688bf5c682Smrg soname_spec='$libname$release$shared_ext$major' 27698bf5c682Smrg if test 32 = "$HPUX_IA64_MODE"; then 27708bf5c682Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 27718bf5c682Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 27728bf5c682Smrg else 27738bf5c682Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 27748bf5c682Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 27758bf5c682Smrg fi 27768bf5c682Smrg ;; 27778bf5c682Smrg hppa*64*) 27788bf5c682Smrg shrext_cmds='.sl' 27798bf5c682Smrg hardcode_into_libs=yes 27808bf5c682Smrg dynamic_linker="$host_os dld.sl" 27818bf5c682Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 27828bf5c682Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 27838bf5c682Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27848bf5c682Smrg soname_spec='$libname$release$shared_ext$major' 27858bf5c682Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 27868bf5c682Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 27878bf5c682Smrg ;; 27888bf5c682Smrg *) 27898bf5c682Smrg shrext_cmds='.sl' 27908bf5c682Smrg dynamic_linker="$host_os dld.sl" 27918bf5c682Smrg shlibpath_var=SHLIB_PATH 27928bf5c682Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 27938bf5c682Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27948bf5c682Smrg soname_spec='$libname$release$shared_ext$major' 27958bf5c682Smrg ;; 27968bf5c682Smrg esac 27978bf5c682Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 27988bf5c682Smrg postinstall_cmds='chmod 555 $lib' 27998bf5c682Smrg # or fails outright, so override atomically: 28008bf5c682Smrg install_override_mode=555 28018bf5c682Smrg ;; 28028bf5c682Smrg 28038bf5c682Smrginterix[[3-9]]*) 28048bf5c682Smrg version_type=linux # correct to gnu/linux during the next big refactor 28058bf5c682Smrg need_lib_prefix=no 28068bf5c682Smrg need_version=no 28078bf5c682Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 28088bf5c682Smrg soname_spec='$libname$release$shared_ext$major' 28098bf5c682Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 28108bf5c682Smrg shlibpath_var=LD_LIBRARY_PATH 28118bf5c682Smrg shlibpath_overrides_runpath=no 28128bf5c682Smrg hardcode_into_libs=yes 28138bf5c682Smrg ;; 28148bf5c682Smrg 28158bf5c682Smrgirix5* | irix6* | nonstopux*) 28168bf5c682Smrg case $host_os in 28178bf5c682Smrg nonstopux*) version_type=nonstopux ;; 28188bf5c682Smrg *) 28198bf5c682Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 28208bf5c682Smrg version_type=linux # correct to gnu/linux during the next big refactor 28218bf5c682Smrg else 28228bf5c682Smrg version_type=irix 28238bf5c682Smrg fi ;; 28248bf5c682Smrg esac 28258bf5c682Smrg need_lib_prefix=no 28268bf5c682Smrg need_version=no 28278bf5c682Smrg soname_spec='$libname$release$shared_ext$major' 28288bf5c682Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 28298bf5c682Smrg case $host_os in 28308bf5c682Smrg irix5* | nonstopux*) 28318bf5c682Smrg libsuff= shlibsuff= 28328bf5c682Smrg ;; 28338bf5c682Smrg *) 28348bf5c682Smrg case $LD in # libtool.m4 will add one of these switches to LD 28358bf5c682Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 28368bf5c682Smrg libsuff= shlibsuff= libmagic=32-bit;; 28378bf5c682Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 28388bf5c682Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 28398bf5c682Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 28408bf5c682Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 28418bf5c682Smrg *) libsuff= shlibsuff= libmagic=never-match;; 28428bf5c682Smrg esac 28438bf5c682Smrg ;; 28448bf5c682Smrg esac 28458bf5c682Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 28468bf5c682Smrg shlibpath_overrides_runpath=no 28478bf5c682Smrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 28488bf5c682Smrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 28498bf5c682Smrg hardcode_into_libs=yes 28508bf5c682Smrg ;; 28518bf5c682Smrg 28528bf5c682Smrg# No shared lib support for Linux oldld, aout, or coff. 28538bf5c682Smrglinux*oldld* | linux*aout* | linux*coff*) 28548bf5c682Smrg dynamic_linker=no 28558bf5c682Smrg ;; 28568bf5c682Smrg 28578bf5c682Smrglinux*android*) 28588bf5c682Smrg version_type=none # Android doesn't support versioned libraries. 28598bf5c682Smrg need_lib_prefix=no 28608bf5c682Smrg need_version=no 28618bf5c682Smrg library_names_spec='$libname$release$shared_ext' 28628bf5c682Smrg soname_spec='$libname$release$shared_ext' 28638bf5c682Smrg finish_cmds= 28648bf5c682Smrg shlibpath_var=LD_LIBRARY_PATH 28658bf5c682Smrg shlibpath_overrides_runpath=yes 28668bf5c682Smrg 28678bf5c682Smrg # This implies no fast_install, which is unacceptable. 28688bf5c682Smrg # Some rework will be needed to allow for fast_install 28698bf5c682Smrg # before this can be enabled. 28708bf5c682Smrg hardcode_into_libs=yes 28718bf5c682Smrg 28728bf5c682Smrg dynamic_linker='Android linker' 28738bf5c682Smrg # Don't embed -rpath directories since the linker doesn't support them. 28748bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 28758bf5c682Smrg ;; 28768bf5c682Smrg 28778bf5c682Smrg# This must be glibc/ELF. 28788bf5c682Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 28798bf5c682Smrg version_type=linux # correct to gnu/linux during the next big refactor 28808bf5c682Smrg need_lib_prefix=no 28818bf5c682Smrg need_version=no 28828bf5c682Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 28838bf5c682Smrg soname_spec='$libname$release$shared_ext$major' 28848bf5c682Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 28858bf5c682Smrg shlibpath_var=LD_LIBRARY_PATH 28868bf5c682Smrg shlibpath_overrides_runpath=no 28878bf5c682Smrg 28888bf5c682Smrg # Some binutils ld are patched to set DT_RUNPATH 28898bf5c682Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 28908bf5c682Smrg [lt_cv_shlibpath_overrides_runpath=no 28918bf5c682Smrg save_LDFLAGS=$LDFLAGS 28928bf5c682Smrg save_libdir=$libdir 28938bf5c682Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 28948bf5c682Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 28958bf5c682Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 28968bf5c682Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 28978bf5c682Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 28988bf5c682Smrg LDFLAGS=$save_LDFLAGS 28998bf5c682Smrg libdir=$save_libdir 29008bf5c682Smrg ]) 29018bf5c682Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 29028bf5c682Smrg 29038bf5c682Smrg # This implies no fast_install, which is unacceptable. 29048bf5c682Smrg # Some rework will be needed to allow for fast_install 29058bf5c682Smrg # before this can be enabled. 29068bf5c682Smrg hardcode_into_libs=yes 29078bf5c682Smrg 29088bf5c682Smrg # Ideally, we could use ldconfig to report *all* directores which are 29098bf5c682Smrg # searched for libraries, however this is still not possible. Aside from not 29108bf5c682Smrg # being certain /sbin/ldconfig is available, command 29118bf5c682Smrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 29128bf5c682Smrg # even though it is searched at run-time. Try to do the best guess by 29138bf5c682Smrg # appending ld.so.conf contents (and includes) to the search path. 29148bf5c682Smrg if test -f /etc/ld.so.conf; then 29158bf5c682Smrg 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' ' '` 29168bf5c682Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 29178bf5c682Smrg fi 29188bf5c682Smrg 29198bf5c682Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 29208bf5c682Smrg # powerpc, because MkLinux only supported shared libraries with the 29218bf5c682Smrg # GNU dynamic linker. Since this was broken with cross compilers, 29228bf5c682Smrg # most powerpc-linux boxes support dynamic linking these days and 29238bf5c682Smrg # people can always --disable-shared, the test was removed, and we 29248bf5c682Smrg # assume the GNU/Linux dynamic linker is in use. 29258bf5c682Smrg dynamic_linker='GNU/Linux ld.so' 29268bf5c682Smrg ;; 29278bf5c682Smrg 29288bf5c682Smrgnetbsd*) 29298bf5c682Smrg version_type=sunos 29308bf5c682Smrg need_lib_prefix=no 29318bf5c682Smrg need_version=no 29328bf5c682Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 29338bf5c682Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 29348bf5c682Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 29358bf5c682Smrg dynamic_linker='NetBSD (a.out) ld.so' 29368bf5c682Smrg else 29378bf5c682Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 29388bf5c682Smrg soname_spec='$libname$release$shared_ext$major' 29398bf5c682Smrg dynamic_linker='NetBSD ld.elf_so' 29408bf5c682Smrg fi 29418bf5c682Smrg shlibpath_var=LD_LIBRARY_PATH 29428bf5c682Smrg shlibpath_overrides_runpath=yes 29438bf5c682Smrg hardcode_into_libs=yes 29448bf5c682Smrg ;; 29458bf5c682Smrg 29468bf5c682Smrgnewsos6) 29478bf5c682Smrg version_type=linux # correct to gnu/linux during the next big refactor 29488bf5c682Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 29498bf5c682Smrg shlibpath_var=LD_LIBRARY_PATH 29508bf5c682Smrg shlibpath_overrides_runpath=yes 29518bf5c682Smrg ;; 29528bf5c682Smrg 29538bf5c682Smrg*nto* | *qnx*) 29548bf5c682Smrg version_type=qnx 29558bf5c682Smrg need_lib_prefix=no 29568bf5c682Smrg need_version=no 29578bf5c682Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 29588bf5c682Smrg soname_spec='$libname$release$shared_ext$major' 29598bf5c682Smrg shlibpath_var=LD_LIBRARY_PATH 29608bf5c682Smrg shlibpath_overrides_runpath=no 29618bf5c682Smrg hardcode_into_libs=yes 29628bf5c682Smrg dynamic_linker='ldqnx.so' 29638bf5c682Smrg ;; 29648bf5c682Smrg 29658bf5c682Smrgopenbsd* | bitrig*) 29668bf5c682Smrg version_type=sunos 29678bf5c682Smrg sys_lib_dlsearch_path_spec=/usr/lib 29688bf5c682Smrg need_lib_prefix=no 29698bf5c682Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 29708bf5c682Smrg need_version=no 29718bf5c682Smrg else 29728bf5c682Smrg need_version=yes 29738bf5c682Smrg fi 29748bf5c682Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 29758bf5c682Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 29768bf5c682Smrg shlibpath_var=LD_LIBRARY_PATH 29778bf5c682Smrg shlibpath_overrides_runpath=yes 29788bf5c682Smrg ;; 29798bf5c682Smrg 29808bf5c682Smrgos2*) 29818bf5c682Smrg libname_spec='$name' 29828bf5c682Smrg version_type=windows 29838bf5c682Smrg shrext_cmds=.dll 29848bf5c682Smrg need_version=no 29858bf5c682Smrg need_lib_prefix=no 29868bf5c682Smrg # OS/2 can only load a DLL with a base name of 8 characters or less. 29878bf5c682Smrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 29888bf5c682Smrg v=$($ECHO $release$versuffix | tr -d .-); 29898bf5c682Smrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 29908bf5c682Smrg $ECHO $n$v`$shared_ext' 29918bf5c682Smrg library_names_spec='${libname}_dll.$libext' 29928bf5c682Smrg dynamic_linker='OS/2 ld.exe' 29938bf5c682Smrg shlibpath_var=BEGINLIBPATH 29948bf5c682Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 29958bf5c682Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 29968bf5c682Smrg postinstall_cmds='base_file=`basename \$file`~ 29978bf5c682Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 29988bf5c682Smrg dldir=$destdir/`dirname \$dlpath`~ 29998bf5c682Smrg test -d \$dldir || mkdir -p \$dldir~ 30008bf5c682Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 30018bf5c682Smrg chmod a+x \$dldir/$dlname~ 30028bf5c682Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 30038bf5c682Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 30048bf5c682Smrg fi' 30058bf5c682Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 30068bf5c682Smrg dlpath=$dir/\$dldll~ 30078bf5c682Smrg $RM \$dlpath' 30088bf5c682Smrg ;; 30098bf5c682Smrg 30108bf5c682Smrgosf3* | osf4* | osf5*) 30118bf5c682Smrg version_type=osf 30128bf5c682Smrg need_lib_prefix=no 30138bf5c682Smrg need_version=no 30148bf5c682Smrg soname_spec='$libname$release$shared_ext$major' 30158bf5c682Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30168bf5c682Smrg shlibpath_var=LD_LIBRARY_PATH 30178bf5c682Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 30188bf5c682Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 30198bf5c682Smrg ;; 30208bf5c682Smrg 30218bf5c682Smrgrdos*) 30228bf5c682Smrg dynamic_linker=no 30238bf5c682Smrg ;; 30248bf5c682Smrg 30258bf5c682Smrgsolaris*) 30268bf5c682Smrg version_type=linux # correct to gnu/linux during the next big refactor 30278bf5c682Smrg need_lib_prefix=no 30288bf5c682Smrg need_version=no 30298bf5c682Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30308bf5c682Smrg soname_spec='$libname$release$shared_ext$major' 30318bf5c682Smrg shlibpath_var=LD_LIBRARY_PATH 30328bf5c682Smrg shlibpath_overrides_runpath=yes 30338bf5c682Smrg hardcode_into_libs=yes 30348bf5c682Smrg # ldd complains unless libraries are executable 30358bf5c682Smrg postinstall_cmds='chmod +x $lib' 30368bf5c682Smrg ;; 30378bf5c682Smrg 30388bf5c682Smrgsunos4*) 30398bf5c682Smrg version_type=sunos 30408bf5c682Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 30418bf5c682Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 30428bf5c682Smrg shlibpath_var=LD_LIBRARY_PATH 30438bf5c682Smrg shlibpath_overrides_runpath=yes 30448bf5c682Smrg if test yes = "$with_gnu_ld"; then 30458bf5c682Smrg need_lib_prefix=no 30468bf5c682Smrg fi 30478bf5c682Smrg need_version=yes 30488bf5c682Smrg ;; 30498bf5c682Smrg 30508bf5c682Smrgsysv4 | sysv4.3*) 30518bf5c682Smrg version_type=linux # correct to gnu/linux during the next big refactor 30528bf5c682Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30538bf5c682Smrg soname_spec='$libname$release$shared_ext$major' 30548bf5c682Smrg shlibpath_var=LD_LIBRARY_PATH 30558bf5c682Smrg case $host_vendor in 30568bf5c682Smrg sni) 30578bf5c682Smrg shlibpath_overrides_runpath=no 30588bf5c682Smrg need_lib_prefix=no 30598bf5c682Smrg runpath_var=LD_RUN_PATH 30608bf5c682Smrg ;; 30618bf5c682Smrg siemens) 30628bf5c682Smrg need_lib_prefix=no 30638bf5c682Smrg ;; 30648bf5c682Smrg motorola) 30658bf5c682Smrg need_lib_prefix=no 30668bf5c682Smrg need_version=no 30678bf5c682Smrg shlibpath_overrides_runpath=no 30688bf5c682Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 30698bf5c682Smrg ;; 30708bf5c682Smrg esac 30718bf5c682Smrg ;; 30728bf5c682Smrg 30738bf5c682Smrgsysv4*MP*) 30748bf5c682Smrg if test -d /usr/nec; then 30758bf5c682Smrg version_type=linux # correct to gnu/linux during the next big refactor 30768bf5c682Smrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 30778bf5c682Smrg soname_spec='$libname$shared_ext.$major' 30788bf5c682Smrg shlibpath_var=LD_LIBRARY_PATH 30798bf5c682Smrg fi 30808bf5c682Smrg ;; 30818bf5c682Smrg 30828bf5c682Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 30838bf5c682Smrg version_type=sco 30848bf5c682Smrg need_lib_prefix=no 30858bf5c682Smrg need_version=no 30868bf5c682Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 30878bf5c682Smrg soname_spec='$libname$release$shared_ext$major' 30888bf5c682Smrg shlibpath_var=LD_LIBRARY_PATH 30898bf5c682Smrg shlibpath_overrides_runpath=yes 30908bf5c682Smrg hardcode_into_libs=yes 30918bf5c682Smrg if test yes = "$with_gnu_ld"; then 30928bf5c682Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 30938bf5c682Smrg else 30948bf5c682Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 30958bf5c682Smrg case $host_os in 30968bf5c682Smrg sco3.2v5*) 30978bf5c682Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 30988bf5c682Smrg ;; 30998bf5c682Smrg esac 31008bf5c682Smrg fi 31018bf5c682Smrg sys_lib_dlsearch_path_spec='/usr/lib' 31028bf5c682Smrg ;; 31038bf5c682Smrg 31048bf5c682Smrgtpf*) 31058bf5c682Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 31068bf5c682Smrg version_type=linux # correct to gnu/linux during the next big refactor 31078bf5c682Smrg need_lib_prefix=no 31088bf5c682Smrg need_version=no 31098bf5c682Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 31108bf5c682Smrg shlibpath_var=LD_LIBRARY_PATH 31118bf5c682Smrg shlibpath_overrides_runpath=no 31128bf5c682Smrg hardcode_into_libs=yes 31138bf5c682Smrg ;; 31148bf5c682Smrg 31158bf5c682Smrguts4*) 31168bf5c682Smrg version_type=linux # correct to gnu/linux during the next big refactor 31178bf5c682Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 31188bf5c682Smrg soname_spec='$libname$release$shared_ext$major' 31198bf5c682Smrg shlibpath_var=LD_LIBRARY_PATH 31208bf5c682Smrg ;; 31218bf5c682Smrg 31228bf5c682Smrg*) 31238bf5c682Smrg dynamic_linker=no 31248bf5c682Smrg ;; 31258bf5c682Smrgesac 31268bf5c682SmrgAC_MSG_RESULT([$dynamic_linker]) 31278bf5c682Smrgtest no = "$dynamic_linker" && can_build_shared=no 31288bf5c682Smrg 31298bf5c682Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 31308bf5c682Smrgif test yes = "$GCC"; then 31318bf5c682Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 31328bf5c682Smrgfi 31338bf5c682Smrg 31348bf5c682Smrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 31358bf5c682Smrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 31368bf5c682Smrgfi 31378bf5c682Smrg 31388bf5c682Smrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 31398bf5c682Smrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 31408bf5c682Smrgfi 31418bf5c682Smrg 31428bf5c682Smrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 31438bf5c682Smrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 31448bf5c682Smrg 31458bf5c682Smrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 31468bf5c682Smrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 31478bf5c682Smrg 31488bf5c682Smrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 31498bf5c682Smrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 31508bf5c682Smrg 31518bf5c682Smrg_LT_DECL([], [variables_saved_for_relink], [1], 31528bf5c682Smrg [Variables whose values should be saved in libtool wrapper scripts and 31538bf5c682Smrg restored at link time]) 31548bf5c682Smrg_LT_DECL([], [need_lib_prefix], [0], 31558bf5c682Smrg [Do we need the "lib" prefix for modules?]) 31568bf5c682Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 31578bf5c682Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 31588bf5c682Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 31598bf5c682Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 31608bf5c682Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 31618bf5c682Smrg [Is shlibpath searched before the hard-coded library search path?]) 31628bf5c682Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 31638bf5c682Smrg_LT_DECL([], [library_names_spec], [1], 31648bf5c682Smrg [[List of archive names. First name is the real one, the rest are links. 31658bf5c682Smrg The last name is the one that the linker finds with -lNAME]]) 31668bf5c682Smrg_LT_DECL([], [soname_spec], [1], 31678bf5c682Smrg [[The coded name of the library, if different from the real name]]) 31688bf5c682Smrg_LT_DECL([], [install_override_mode], [1], 31698bf5c682Smrg [Permission mode override for installation of shared libraries]) 31708bf5c682Smrg_LT_DECL([], [postinstall_cmds], [2], 31718bf5c682Smrg [Command to use after installation of a shared archive]) 31728bf5c682Smrg_LT_DECL([], [postuninstall_cmds], [2], 31738bf5c682Smrg [Command to use after uninstallation of a shared archive]) 31748bf5c682Smrg_LT_DECL([], [finish_cmds], [2], 31758bf5c682Smrg [Commands used to finish a libtool library installation in a directory]) 31768bf5c682Smrg_LT_DECL([], [finish_eval], [1], 31778bf5c682Smrg [[As "finish_cmds", except a single script fragment to be evaled but 31788bf5c682Smrg not shown]]) 31798bf5c682Smrg_LT_DECL([], [hardcode_into_libs], [0], 31808bf5c682Smrg [Whether we should hardcode library paths into libraries]) 31818bf5c682Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 31828bf5c682Smrg [Compile-time system search path for libraries]) 31838bf5c682Smrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 31848bf5c682Smrg [Detected run-time system search path for libraries]) 31858bf5c682Smrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 31868bf5c682Smrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 31878bf5c682Smrg])# _LT_SYS_DYNAMIC_LINKER 31888bf5c682Smrg 31898bf5c682Smrg 31908bf5c682Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 31918bf5c682Smrg# -------------------------- 31928bf5c682Smrg# find a file program that can recognize shared library 31938bf5c682SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 31948bf5c682Smrg[m4_require([_LT_DECL_EGREP])dnl 31958bf5c682SmrgAC_MSG_CHECKING([for $1]) 31968bf5c682SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 31978bf5c682Smrg[case $MAGIC_CMD in 31988bf5c682Smrg[[\\/*] | ?:[\\/]*]) 31998bf5c682Smrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 32008bf5c682Smrg ;; 32018bf5c682Smrg*) 32028bf5c682Smrg lt_save_MAGIC_CMD=$MAGIC_CMD 32038bf5c682Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 32048bf5c682Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 32058bf5c682Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 32068bf5c682Smrgdnl not every word. This closes a longstanding sh security hole. 32078bf5c682Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 32088bf5c682Smrg for ac_dir in $ac_dummy; do 32098bf5c682Smrg IFS=$lt_save_ifs 32108bf5c682Smrg test -z "$ac_dir" && ac_dir=. 32118bf5c682Smrg if test -f "$ac_dir/$1"; then 32128bf5c682Smrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 32138bf5c682Smrg if test -n "$file_magic_test_file"; then 32148bf5c682Smrg case $deplibs_check_method in 32158bf5c682Smrg "file_magic "*) 32168bf5c682Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 32178bf5c682Smrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 32188bf5c682Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 32198bf5c682Smrg $EGREP "$file_magic_regex" > /dev/null; then 32208bf5c682Smrg : 32218bf5c682Smrg else 32228bf5c682Smrg cat <<_LT_EOF 1>&2 32238bf5c682Smrg 32248bf5c682Smrg*** Warning: the command libtool uses to detect shared libraries, 32258bf5c682Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 32268bf5c682Smrg*** The result is that libtool may fail to recognize shared libraries 32278bf5c682Smrg*** as such. This will affect the creation of libtool libraries that 32288bf5c682Smrg*** depend on shared libraries, but programs linked with such libtool 32298bf5c682Smrg*** libraries will work regardless of this problem. Nevertheless, you 32308bf5c682Smrg*** may want to report the problem to your system manager and/or to 32318bf5c682Smrg*** bug-libtool@gnu.org 32328bf5c682Smrg 32338bf5c682Smrg_LT_EOF 32348bf5c682Smrg fi ;; 32358bf5c682Smrg esac 32368bf5c682Smrg fi 32378bf5c682Smrg break 32388bf5c682Smrg fi 32398bf5c682Smrg done 32408bf5c682Smrg IFS=$lt_save_ifs 32418bf5c682Smrg MAGIC_CMD=$lt_save_MAGIC_CMD 32428bf5c682Smrg ;; 32438bf5c682Smrgesac]) 32448bf5c682SmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 32458bf5c682Smrgif test -n "$MAGIC_CMD"; then 32468bf5c682Smrg AC_MSG_RESULT($MAGIC_CMD) 32478bf5c682Smrgelse 32488bf5c682Smrg AC_MSG_RESULT(no) 32498bf5c682Smrgfi 32508bf5c682Smrg_LT_DECL([], [MAGIC_CMD], [0], 32518bf5c682Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 32528bf5c682Smrg])# _LT_PATH_TOOL_PREFIX 32538bf5c682Smrg 32548bf5c682Smrg# Old name: 32558bf5c682SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 32568bf5c682Smrgdnl aclocal-1.4 backwards compatibility: 32578bf5c682Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 32588bf5c682Smrg 32598bf5c682Smrg 32608bf5c682Smrg# _LT_PATH_MAGIC 32618bf5c682Smrg# -------------- 32628bf5c682Smrg# find a file program that can recognize a shared library 32638bf5c682Smrgm4_defun([_LT_PATH_MAGIC], 32648bf5c682Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 32658bf5c682Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 32668bf5c682Smrg if test -n "$ac_tool_prefix"; then 32678bf5c682Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 32688bf5c682Smrg else 32698bf5c682Smrg MAGIC_CMD=: 32708bf5c682Smrg fi 32718bf5c682Smrgfi 32728bf5c682Smrg])# _LT_PATH_MAGIC 32738bf5c682Smrg 32748bf5c682Smrg 32758bf5c682Smrg# LT_PATH_LD 32768bf5c682Smrg# ---------- 32778bf5c682Smrg# find the pathname to the GNU or non-GNU linker 32788bf5c682SmrgAC_DEFUN([LT_PATH_LD], 32798bf5c682Smrg[AC_REQUIRE([AC_PROG_CC])dnl 32808bf5c682SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 32818bf5c682SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 32828bf5c682Smrgm4_require([_LT_DECL_SED])dnl 32838bf5c682Smrgm4_require([_LT_DECL_EGREP])dnl 32848bf5c682Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 32858bf5c682Smrg 32868bf5c682SmrgAC_ARG_WITH([gnu-ld], 32878bf5c682Smrg [AS_HELP_STRING([--with-gnu-ld], 32888bf5c682Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 32898bf5c682Smrg [test no = "$withval" || with_gnu_ld=yes], 32908bf5c682Smrg [with_gnu_ld=no])dnl 32918bf5c682Smrg 32928bf5c682Smrgac_prog=ld 32938bf5c682Smrgif test yes = "$GCC"; then 32948bf5c682Smrg # Check if gcc -print-prog-name=ld gives a path. 32958bf5c682Smrg AC_MSG_CHECKING([for ld used by $CC]) 32968bf5c682Smrg case $host in 32978bf5c682Smrg *-*-mingw*) 32988bf5c682Smrg # gcc leaves a trailing carriage return, which upsets mingw 32998bf5c682Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 33008bf5c682Smrg *) 33018bf5c682Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 33028bf5c682Smrg esac 33038bf5c682Smrg case $ac_prog in 33048bf5c682Smrg # Accept absolute paths. 33058bf5c682Smrg [[\\/]]* | ?:[[\\/]]*) 33068bf5c682Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 33078bf5c682Smrg # Canonicalize the pathname of ld 33088bf5c682Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 33098bf5c682Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 33108bf5c682Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 33118bf5c682Smrg done 33128bf5c682Smrg test -z "$LD" && LD=$ac_prog 33138bf5c682Smrg ;; 33148bf5c682Smrg "") 33158bf5c682Smrg # If it fails, then pretend we aren't using GCC. 33168bf5c682Smrg ac_prog=ld 33178bf5c682Smrg ;; 33188bf5c682Smrg *) 33198bf5c682Smrg # If it is relative, then search for the first ld in PATH. 33208bf5c682Smrg with_gnu_ld=unknown 33218bf5c682Smrg ;; 33228bf5c682Smrg esac 33238bf5c682Smrgelif test yes = "$with_gnu_ld"; then 33248bf5c682Smrg AC_MSG_CHECKING([for GNU ld]) 33258bf5c682Smrgelse 33268bf5c682Smrg AC_MSG_CHECKING([for non-GNU ld]) 33278bf5c682Smrgfi 33288bf5c682SmrgAC_CACHE_VAL(lt_cv_path_LD, 33298bf5c682Smrg[if test -z "$LD"; then 33308bf5c682Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 33318bf5c682Smrg for ac_dir in $PATH; do 33328bf5c682Smrg IFS=$lt_save_ifs 33338bf5c682Smrg test -z "$ac_dir" && ac_dir=. 33348bf5c682Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 33358bf5c682Smrg lt_cv_path_LD=$ac_dir/$ac_prog 33368bf5c682Smrg # Check to see if the program is GNU ld. I'd rather use --version, 33378bf5c682Smrg # but apparently some variants of GNU ld only accept -v. 33388bf5c682Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 33398bf5c682Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 33408bf5c682Smrg *GNU* | *'with BFD'*) 33418bf5c682Smrg test no != "$with_gnu_ld" && break 33428bf5c682Smrg ;; 33438bf5c682Smrg *) 33448bf5c682Smrg test yes != "$with_gnu_ld" && break 33458bf5c682Smrg ;; 33468bf5c682Smrg esac 33478bf5c682Smrg fi 33488bf5c682Smrg done 33498bf5c682Smrg IFS=$lt_save_ifs 33508bf5c682Smrgelse 33518bf5c682Smrg lt_cv_path_LD=$LD # Let the user override the test with a path. 33528bf5c682Smrgfi]) 33538bf5c682SmrgLD=$lt_cv_path_LD 33548bf5c682Smrgif test -n "$LD"; then 33558bf5c682Smrg AC_MSG_RESULT($LD) 33568bf5c682Smrgelse 33578bf5c682Smrg AC_MSG_RESULT(no) 33588bf5c682Smrgfi 33598bf5c682Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 33608bf5c682Smrg_LT_PATH_LD_GNU 33618bf5c682SmrgAC_SUBST([LD]) 33628bf5c682Smrg 33638bf5c682Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 33648bf5c682Smrg])# LT_PATH_LD 33658bf5c682Smrg 33668bf5c682Smrg# Old names: 33678bf5c682SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 33688bf5c682SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 33698bf5c682Smrgdnl aclocal-1.4 backwards compatibility: 33708bf5c682Smrgdnl AC_DEFUN([AM_PROG_LD], []) 33718bf5c682Smrgdnl AC_DEFUN([AC_PROG_LD], []) 33728bf5c682Smrg 33738bf5c682Smrg 33748bf5c682Smrg# _LT_PATH_LD_GNU 33758bf5c682Smrg#- -------------- 33768bf5c682Smrgm4_defun([_LT_PATH_LD_GNU], 33778bf5c682Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 33788bf5c682Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 33798bf5c682Smrgcase `$LD -v 2>&1 </dev/null` in 33808bf5c682Smrg*GNU* | *'with BFD'*) 33818bf5c682Smrg lt_cv_prog_gnu_ld=yes 33828bf5c682Smrg ;; 33838bf5c682Smrg*) 33848bf5c682Smrg lt_cv_prog_gnu_ld=no 33858bf5c682Smrg ;; 33868bf5c682Smrgesac]) 33878bf5c682Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 33888bf5c682Smrg])# _LT_PATH_LD_GNU 33898bf5c682Smrg 33908bf5c682Smrg 33918bf5c682Smrg# _LT_CMD_RELOAD 33928bf5c682Smrg# -------------- 33938bf5c682Smrg# find reload flag for linker 33948bf5c682Smrg# -- PORTME Some linkers may need a different reload flag. 33958bf5c682Smrgm4_defun([_LT_CMD_RELOAD], 33968bf5c682Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 33978bf5c682Smrg lt_cv_ld_reload_flag, 33988bf5c682Smrg [lt_cv_ld_reload_flag='-r']) 33998bf5c682Smrgreload_flag=$lt_cv_ld_reload_flag 34008bf5c682Smrgcase $reload_flag in 34018bf5c682Smrg"" | " "*) ;; 34028bf5c682Smrg*) reload_flag=" $reload_flag" ;; 34038bf5c682Smrgesac 34048bf5c682Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 34058bf5c682Smrgcase $host_os in 34068bf5c682Smrg cygwin* | mingw* | pw32* | cegcc*) 34078bf5c682Smrg if test yes != "$GCC"; then 34088bf5c682Smrg reload_cmds=false 34098bf5c682Smrg fi 34108bf5c682Smrg ;; 34118bf5c682Smrg darwin*) 34128bf5c682Smrg if test yes = "$GCC"; then 34138bf5c682Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 34148bf5c682Smrg else 34158bf5c682Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 34168bf5c682Smrg fi 34178bf5c682Smrg ;; 34188bf5c682Smrgesac 34198bf5c682Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 34208bf5c682Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 34218bf5c682Smrg])# _LT_CMD_RELOAD 34228bf5c682Smrg 34238bf5c682Smrg 34248bf5c682Smrg# _LT_PATH_DD 34258bf5c682Smrg# ----------- 34268bf5c682Smrg# find a working dd 34278bf5c682Smrgm4_defun([_LT_PATH_DD], 34288bf5c682Smrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 34298bf5c682Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 34308bf5c682Smrgcat conftest.i conftest.i >conftest2.i 34318bf5c682Smrg: ${lt_DD:=$DD} 34328bf5c682SmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 34338bf5c682Smrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 34348bf5c682Smrg cmp -s conftest.i conftest.out \ 34358bf5c682Smrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 34368bf5c682Smrgfi]) 34378bf5c682Smrgrm -f conftest.i conftest2.i conftest.out]) 34388bf5c682Smrg])# _LT_PATH_DD 34398bf5c682Smrg 34408bf5c682Smrg 34418bf5c682Smrg# _LT_CMD_TRUNCATE 34428bf5c682Smrg# ---------------- 34438bf5c682Smrg# find command to truncate a binary pipe 34448bf5c682Smrgm4_defun([_LT_CMD_TRUNCATE], 34458bf5c682Smrg[m4_require([_LT_PATH_DD]) 34468bf5c682SmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 34478bf5c682Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 34488bf5c682Smrgcat conftest.i conftest.i >conftest2.i 34498bf5c682Smrglt_cv_truncate_bin= 34508bf5c682Smrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 34518bf5c682Smrg cmp -s conftest.i conftest.out \ 34528bf5c682Smrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 34538bf5c682Smrgfi 34548bf5c682Smrgrm -f conftest.i conftest2.i conftest.out 34558bf5c682Smrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 34568bf5c682Smrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 34578bf5c682Smrg [Command to truncate a binary pipe]) 34588bf5c682Smrg])# _LT_CMD_TRUNCATE 34598bf5c682Smrg 34608bf5c682Smrg 34618bf5c682Smrg# _LT_CHECK_MAGIC_METHOD 34628bf5c682Smrg# ---------------------- 34638bf5c682Smrg# how to check for library dependencies 34648bf5c682Smrg# -- PORTME fill in with the dynamic library characteristics 34658bf5c682Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 34668bf5c682Smrg[m4_require([_LT_DECL_EGREP]) 34678bf5c682Smrgm4_require([_LT_DECL_OBJDUMP]) 34688bf5c682SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 34698bf5c682Smrglt_cv_deplibs_check_method, 34708bf5c682Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 34718bf5c682Smrglt_cv_file_magic_test_file= 34728bf5c682Smrglt_cv_deplibs_check_method='unknown' 34738bf5c682Smrg# Need to set the preceding variable on all platforms that support 34748bf5c682Smrg# interlibrary dependencies. 34758bf5c682Smrg# 'none' -- dependencies not supported. 34768bf5c682Smrg# 'unknown' -- same as none, but documents that we really don't know. 34778bf5c682Smrg# 'pass_all' -- all dependencies passed with no checks. 34788bf5c682Smrg# 'test_compile' -- check by making test program. 34798bf5c682Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 34808bf5c682Smrg# that responds to the $file_magic_cmd with a given extended regex. 34818bf5c682Smrg# If you have 'file' or equivalent on your system and you're not sure 34828bf5c682Smrg# whether 'pass_all' will *always* work, you probably want this one. 34838bf5c682Smrg 34848bf5c682Smrgcase $host_os in 34858bf5c682Smrgaix[[4-9]]*) 34868bf5c682Smrg lt_cv_deplibs_check_method=pass_all 34878bf5c682Smrg ;; 34888bf5c682Smrg 34898bf5c682Smrgbeos*) 34908bf5c682Smrg lt_cv_deplibs_check_method=pass_all 34918bf5c682Smrg ;; 34928bf5c682Smrg 34938bf5c682Smrgbsdi[[45]]*) 34948bf5c682Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 34950a1d3ae0Smrg lt_cv_file_magic_cmd='$FILECMD -L' 34968bf5c682Smrg lt_cv_file_magic_test_file=/shlib/libc.so 34978bf5c682Smrg ;; 34988bf5c682Smrg 34998bf5c682Smrgcygwin*) 35008bf5c682Smrg # func_win32_libid is a shell function defined in ltmain.sh 35018bf5c682Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 35028bf5c682Smrg lt_cv_file_magic_cmd='func_win32_libid' 35038bf5c682Smrg ;; 35048bf5c682Smrg 35058bf5c682Smrgmingw* | pw32*) 35068bf5c682Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 35078bf5c682Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 35088bf5c682Smrg # unless we find 'file', for example because we are cross-compiling. 35098bf5c682Smrg if ( file / ) >/dev/null 2>&1; then 35108bf5c682Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 35118bf5c682Smrg lt_cv_file_magic_cmd='func_win32_libid' 35128bf5c682Smrg else 35138bf5c682Smrg # Keep this pattern in sync with the one in func_win32_libid. 35148bf5c682Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 35158bf5c682Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 35168bf5c682Smrg fi 35178bf5c682Smrg ;; 35188bf5c682Smrg 35198bf5c682Smrgcegcc*) 35208bf5c682Smrg # use the weaker test based on 'objdump'. See mingw*. 35218bf5c682Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 35228bf5c682Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 35238bf5c682Smrg ;; 35248bf5c682Smrg 35258bf5c682Smrgdarwin* | rhapsody*) 35268bf5c682Smrg lt_cv_deplibs_check_method=pass_all 35278bf5c682Smrg ;; 35288bf5c682Smrg 35290a1d3ae0Smrgfreebsd* | dragonfly* | midnightbsd*) 35308bf5c682Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 35318bf5c682Smrg case $host_cpu in 35328bf5c682Smrg i*86 ) 35338bf5c682Smrg # Not sure whether the presence of OpenBSD here was a mistake. 35348bf5c682Smrg # Let's accept both of them until this is cleared up. 35358bf5c682Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 35360a1d3ae0Smrg lt_cv_file_magic_cmd=$FILECMD 35378bf5c682Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 35388bf5c682Smrg ;; 35398bf5c682Smrg esac 35408bf5c682Smrg else 35418bf5c682Smrg lt_cv_deplibs_check_method=pass_all 35428bf5c682Smrg fi 35438bf5c682Smrg ;; 35448bf5c682Smrg 35458bf5c682Smrghaiku*) 35468bf5c682Smrg lt_cv_deplibs_check_method=pass_all 35478bf5c682Smrg ;; 35488bf5c682Smrg 35498bf5c682Smrghpux10.20* | hpux11*) 35500a1d3ae0Smrg lt_cv_file_magic_cmd=$FILECMD 35518bf5c682Smrg case $host_cpu in 35528bf5c682Smrg ia64*) 35538bf5c682Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 35548bf5c682Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 35558bf5c682Smrg ;; 35568bf5c682Smrg hppa*64*) 35578bf5c682Smrg [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]'] 35588bf5c682Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 35598bf5c682Smrg ;; 35608bf5c682Smrg *) 35618bf5c682Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 35628bf5c682Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 35638bf5c682Smrg ;; 35648bf5c682Smrg esac 35658bf5c682Smrg ;; 35668bf5c682Smrg 35678bf5c682Smrginterix[[3-9]]*) 35688bf5c682Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 35698bf5c682Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 35708bf5c682Smrg ;; 35718bf5c682Smrg 35728bf5c682Smrgirix5* | irix6* | nonstopux*) 35738bf5c682Smrg case $LD in 35748bf5c682Smrg *-32|*"-32 ") libmagic=32-bit;; 35758bf5c682Smrg *-n32|*"-n32 ") libmagic=N32;; 35768bf5c682Smrg *-64|*"-64 ") libmagic=64-bit;; 35778bf5c682Smrg *) libmagic=never-match;; 35788bf5c682Smrg esac 35798bf5c682Smrg lt_cv_deplibs_check_method=pass_all 35808bf5c682Smrg ;; 35818bf5c682Smrg 35828bf5c682Smrg# This must be glibc/ELF. 35838bf5c682Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 35848bf5c682Smrg lt_cv_deplibs_check_method=pass_all 35858bf5c682Smrg ;; 35868bf5c682Smrg 35878bf5c682Smrgnetbsd*) 35888bf5c682Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 35898bf5c682Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 35908bf5c682Smrg else 35918bf5c682Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 35928bf5c682Smrg fi 35938bf5c682Smrg ;; 35948bf5c682Smrg 35958bf5c682Smrgnewos6*) 35968bf5c682Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 35970a1d3ae0Smrg lt_cv_file_magic_cmd=$FILECMD 35988bf5c682Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 35998bf5c682Smrg ;; 36008bf5c682Smrg 36018bf5c682Smrg*nto* | *qnx*) 36028bf5c682Smrg lt_cv_deplibs_check_method=pass_all 36038bf5c682Smrg ;; 36048bf5c682Smrg 36058bf5c682Smrgopenbsd* | bitrig*) 36068bf5c682Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 36078bf5c682Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 36088bf5c682Smrg else 36098bf5c682Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 36108bf5c682Smrg fi 36118bf5c682Smrg ;; 36128bf5c682Smrg 36138bf5c682Smrgosf3* | osf4* | osf5*) 36148bf5c682Smrg lt_cv_deplibs_check_method=pass_all 36158bf5c682Smrg ;; 36168bf5c682Smrg 36178bf5c682Smrgrdos*) 36188bf5c682Smrg lt_cv_deplibs_check_method=pass_all 36198bf5c682Smrg ;; 36208bf5c682Smrg 36218bf5c682Smrgsolaris*) 36228bf5c682Smrg lt_cv_deplibs_check_method=pass_all 36238bf5c682Smrg ;; 36248bf5c682Smrg 36258bf5c682Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 36268bf5c682Smrg lt_cv_deplibs_check_method=pass_all 36278bf5c682Smrg ;; 36288bf5c682Smrg 36298bf5c682Smrgsysv4 | sysv4.3*) 36308bf5c682Smrg case $host_vendor in 36318bf5c682Smrg motorola) 36328bf5c682Smrg 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]]' 36338bf5c682Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 36348bf5c682Smrg ;; 36358bf5c682Smrg ncr) 36368bf5c682Smrg lt_cv_deplibs_check_method=pass_all 36378bf5c682Smrg ;; 36388bf5c682Smrg sequent) 36398bf5c682Smrg lt_cv_file_magic_cmd='/bin/file' 36408bf5c682Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 36418bf5c682Smrg ;; 36428bf5c682Smrg sni) 36438bf5c682Smrg lt_cv_file_magic_cmd='/bin/file' 36448bf5c682Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 36458bf5c682Smrg lt_cv_file_magic_test_file=/lib/libc.so 36468bf5c682Smrg ;; 36478bf5c682Smrg siemens) 36488bf5c682Smrg lt_cv_deplibs_check_method=pass_all 36498bf5c682Smrg ;; 36508bf5c682Smrg pc) 36518bf5c682Smrg lt_cv_deplibs_check_method=pass_all 36528bf5c682Smrg ;; 36538bf5c682Smrg esac 36548bf5c682Smrg ;; 36558bf5c682Smrg 36568bf5c682Smrgtpf*) 36578bf5c682Smrg lt_cv_deplibs_check_method=pass_all 36588bf5c682Smrg ;; 36598bf5c682Smrgos2*) 36608bf5c682Smrg lt_cv_deplibs_check_method=pass_all 36618bf5c682Smrg ;; 36628bf5c682Smrgesac 36638bf5c682Smrg]) 36648bf5c682Smrg 36658bf5c682Smrgfile_magic_glob= 36668bf5c682Smrgwant_nocaseglob=no 36678bf5c682Smrgif test "$build" = "$host"; then 36688bf5c682Smrg case $host_os in 36698bf5c682Smrg mingw* | pw32*) 36708bf5c682Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 36718bf5c682Smrg want_nocaseglob=yes 36728bf5c682Smrg else 36738bf5c682Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 36748bf5c682Smrg fi 36758bf5c682Smrg ;; 36768bf5c682Smrg esac 36778bf5c682Smrgfi 36788bf5c682Smrg 36798bf5c682Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 36808bf5c682Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 36818bf5c682Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 36828bf5c682Smrg 36838bf5c682Smrg_LT_DECL([], [deplibs_check_method], [1], 36848bf5c682Smrg [Method to check whether dependent libraries are shared objects]) 36858bf5c682Smrg_LT_DECL([], [file_magic_cmd], [1], 36868bf5c682Smrg [Command to use when deplibs_check_method = "file_magic"]) 36878bf5c682Smrg_LT_DECL([], [file_magic_glob], [1], 36888bf5c682Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 36898bf5c682Smrg_LT_DECL([], [want_nocaseglob], [1], 36908bf5c682Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 36918bf5c682Smrg])# _LT_CHECK_MAGIC_METHOD 36928bf5c682Smrg 36938bf5c682Smrg 36948bf5c682Smrg# LT_PATH_NM 36958bf5c682Smrg# ---------- 36968bf5c682Smrg# find the pathname to a BSD- or MS-compatible name lister 36978bf5c682SmrgAC_DEFUN([LT_PATH_NM], 36988bf5c682Smrg[AC_REQUIRE([AC_PROG_CC])dnl 36998bf5c682SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 37008bf5c682Smrg[if test -n "$NM"; then 37018bf5c682Smrg # Let the user override the test. 37028bf5c682Smrg lt_cv_path_NM=$NM 37038bf5c682Smrgelse 37048bf5c682Smrg lt_nm_to_check=${ac_tool_prefix}nm 37058bf5c682Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 37068bf5c682Smrg lt_nm_to_check="$lt_nm_to_check nm" 37078bf5c682Smrg fi 37088bf5c682Smrg for lt_tmp_nm in $lt_nm_to_check; do 37098bf5c682Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 37108bf5c682Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 37118bf5c682Smrg IFS=$lt_save_ifs 37128bf5c682Smrg test -z "$ac_dir" && ac_dir=. 37138bf5c682Smrg tmp_nm=$ac_dir/$lt_tmp_nm 37148bf5c682Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 37158bf5c682Smrg # Check to see if the nm accepts a BSD-compat flag. 37168bf5c682Smrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 37178bf5c682Smrg # nm: unknown option "B" ignored 37188bf5c682Smrg # Tru64's nm complains that /dev/null is an invalid object file 37198bf5c682Smrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 37208bf5c682Smrg case $build_os in 37218bf5c682Smrg mingw*) lt_bad_file=conftest.nm/nofile ;; 37228bf5c682Smrg *) lt_bad_file=/dev/null ;; 37238bf5c682Smrg esac 37240a1d3ae0Smrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in 37258bf5c682Smrg *$lt_bad_file* | *'Invalid file or object type'*) 37268bf5c682Smrg lt_cv_path_NM="$tmp_nm -B" 37278bf5c682Smrg break 2 37288bf5c682Smrg ;; 37298bf5c682Smrg *) 37300a1d3ae0Smrg case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in 37318bf5c682Smrg */dev/null*) 37328bf5c682Smrg lt_cv_path_NM="$tmp_nm -p" 37338bf5c682Smrg break 2 37348bf5c682Smrg ;; 37358bf5c682Smrg *) 37368bf5c682Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 37378bf5c682Smrg continue # so that we can try to find one that supports BSD flags 37388bf5c682Smrg ;; 37398bf5c682Smrg esac 37408bf5c682Smrg ;; 37418bf5c682Smrg esac 37428bf5c682Smrg fi 37438bf5c682Smrg done 37448bf5c682Smrg IFS=$lt_save_ifs 37458bf5c682Smrg done 37468bf5c682Smrg : ${lt_cv_path_NM=no} 37478bf5c682Smrgfi]) 37488bf5c682Smrgif test no != "$lt_cv_path_NM"; then 37498bf5c682Smrg NM=$lt_cv_path_NM 37508bf5c682Smrgelse 37518bf5c682Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 37528bf5c682Smrg if test -n "$DUMPBIN"; then : 37538bf5c682Smrg # Let the user override the test. 37548bf5c682Smrg else 37558bf5c682Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 37560a1d3ae0Smrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in 37578bf5c682Smrg *COFF*) 37588bf5c682Smrg DUMPBIN="$DUMPBIN -symbols -headers" 37598bf5c682Smrg ;; 37608bf5c682Smrg *) 37618bf5c682Smrg DUMPBIN=: 37628bf5c682Smrg ;; 37638bf5c682Smrg esac 37648bf5c682Smrg fi 37658bf5c682Smrg AC_SUBST([DUMPBIN]) 37668bf5c682Smrg if test : != "$DUMPBIN"; then 37678bf5c682Smrg NM=$DUMPBIN 37688bf5c682Smrg fi 37698bf5c682Smrgfi 37708bf5c682Smrgtest -z "$NM" && NM=nm 37718bf5c682SmrgAC_SUBST([NM]) 37728bf5c682Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 37738bf5c682Smrg 37748bf5c682SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 37758bf5c682Smrg [lt_cv_nm_interface="BSD nm" 37768bf5c682Smrg echo "int some_variable = 0;" > conftest.$ac_ext 37778bf5c682Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 37788bf5c682Smrg (eval "$ac_compile" 2>conftest.err) 37798bf5c682Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 37808bf5c682Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 37818bf5c682Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 37828bf5c682Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 37838bf5c682Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 37848bf5c682Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 37858bf5c682Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 37868bf5c682Smrg lt_cv_nm_interface="MS dumpbin" 37878bf5c682Smrg fi 37888bf5c682Smrg rm -f conftest*]) 37898bf5c682Smrg])# LT_PATH_NM 37908bf5c682Smrg 37918bf5c682Smrg# Old names: 37928bf5c682SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 37938bf5c682SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 37948bf5c682Smrgdnl aclocal-1.4 backwards compatibility: 37958bf5c682Smrgdnl AC_DEFUN([AM_PROG_NM], []) 37968bf5c682Smrgdnl AC_DEFUN([AC_PROG_NM], []) 37978bf5c682Smrg 37988bf5c682Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 37998bf5c682Smrg# -------------------------------- 38008bf5c682Smrg# how to determine the name of the shared library 38018bf5c682Smrg# associated with a specific link library. 38028bf5c682Smrg# -- PORTME fill in with the dynamic library characteristics 38038bf5c682Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 38048bf5c682Smrg[m4_require([_LT_DECL_EGREP]) 38058bf5c682Smrgm4_require([_LT_DECL_OBJDUMP]) 38068bf5c682Smrgm4_require([_LT_DECL_DLLTOOL]) 38078bf5c682SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 38088bf5c682Smrglt_cv_sharedlib_from_linklib_cmd, 38098bf5c682Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 38108bf5c682Smrg 38118bf5c682Smrgcase $host_os in 38128bf5c682Smrgcygwin* | mingw* | pw32* | cegcc*) 38138bf5c682Smrg # two different shell functions defined in ltmain.sh; 38148bf5c682Smrg # decide which one to use based on capabilities of $DLLTOOL 38158bf5c682Smrg case `$DLLTOOL --help 2>&1` in 38168bf5c682Smrg *--identify-strict*) 38178bf5c682Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 38188bf5c682Smrg ;; 38198bf5c682Smrg *) 38208bf5c682Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 38218bf5c682Smrg ;; 38228bf5c682Smrg esac 38238bf5c682Smrg ;; 38248bf5c682Smrg*) 38258bf5c682Smrg # fallback: assume linklib IS sharedlib 38268bf5c682Smrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 38278bf5c682Smrg ;; 38288bf5c682Smrgesac 38298bf5c682Smrg]) 38308bf5c682Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 38318bf5c682Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 38328bf5c682Smrg 38338bf5c682Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 38348bf5c682Smrg [Command to associate shared and link libraries]) 38358bf5c682Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 38368bf5c682Smrg 38378bf5c682Smrg 38388bf5c682Smrg# _LT_PATH_MANIFEST_TOOL 38398bf5c682Smrg# ---------------------- 38408bf5c682Smrg# locate the manifest tool 38418bf5c682Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 38428bf5c682Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 38438bf5c682Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 38448bf5c682SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 38458bf5c682Smrg [lt_cv_path_mainfest_tool=no 38468bf5c682Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 38478bf5c682Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 38488bf5c682Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 38498bf5c682Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 38508bf5c682Smrg lt_cv_path_mainfest_tool=yes 38518bf5c682Smrg fi 38528bf5c682Smrg rm -f conftest*]) 38538bf5c682Smrgif test yes != "$lt_cv_path_mainfest_tool"; then 38548bf5c682Smrg MANIFEST_TOOL=: 38558bf5c682Smrgfi 38568bf5c682Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 38578bf5c682Smrg])# _LT_PATH_MANIFEST_TOOL 38588bf5c682Smrg 38598bf5c682Smrg 38608bf5c682Smrg# _LT_DLL_DEF_P([FILE]) 38618bf5c682Smrg# --------------------- 38628bf5c682Smrg# True iff FILE is a Windows DLL '.def' file. 38638bf5c682Smrg# Keep in sync with func_dll_def_p in the libtool script 38648bf5c682SmrgAC_DEFUN([_LT_DLL_DEF_P], 38658bf5c682Smrg[dnl 38668bf5c682Smrg test DEF = "`$SED -n dnl 38678bf5c682Smrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 38688bf5c682Smrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 38698bf5c682Smrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 38708bf5c682Smrg -e q dnl Only consider the first "real" line 38718bf5c682Smrg $1`" dnl 38728bf5c682Smrg])# _LT_DLL_DEF_P 38738bf5c682Smrg 38748bf5c682Smrg 38758bf5c682Smrg# LT_LIB_M 38768bf5c682Smrg# -------- 38778bf5c682Smrg# check for math library 38788bf5c682SmrgAC_DEFUN([LT_LIB_M], 38798bf5c682Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 38808bf5c682SmrgLIBM= 38818bf5c682Smrgcase $host in 38828bf5c682Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 38838bf5c682Smrg # These system don't have libm, or don't need it 38848bf5c682Smrg ;; 38858bf5c682Smrg*-ncr-sysv4.3*) 38868bf5c682Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 38878bf5c682Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 38888bf5c682Smrg ;; 38898bf5c682Smrg*) 38908bf5c682Smrg AC_CHECK_LIB(m, cos, LIBM=-lm) 38918bf5c682Smrg ;; 38928bf5c682Smrgesac 38938bf5c682SmrgAC_SUBST([LIBM]) 38948bf5c682Smrg])# LT_LIB_M 38958bf5c682Smrg 38968bf5c682Smrg# Old name: 38978bf5c682SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 38988bf5c682Smrgdnl aclocal-1.4 backwards compatibility: 38998bf5c682Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 39008bf5c682Smrg 39018bf5c682Smrg 39028bf5c682Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 39038bf5c682Smrg# ------------------------------- 39048bf5c682Smrgm4_defun([_LT_COMPILER_NO_RTTI], 39058bf5c682Smrg[m4_require([_LT_TAG_COMPILER])dnl 39068bf5c682Smrg 39078bf5c682Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 39088bf5c682Smrg 39098bf5c682Smrgif test yes = "$GCC"; then 39108bf5c682Smrg case $cc_basename in 39118bf5c682Smrg nvcc*) 39128bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 39138bf5c682Smrg *) 39148bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 39158bf5c682Smrg esac 39168bf5c682Smrg 39178bf5c682Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 39188bf5c682Smrg lt_cv_prog_compiler_rtti_exceptions, 39198bf5c682Smrg [-fno-rtti -fno-exceptions], [], 39208bf5c682Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 39218bf5c682Smrgfi 39228bf5c682Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 39238bf5c682Smrg [Compiler flag to turn off builtin functions]) 39248bf5c682Smrg])# _LT_COMPILER_NO_RTTI 39258bf5c682Smrg 39268bf5c682Smrg 39278bf5c682Smrg# _LT_CMD_GLOBAL_SYMBOLS 39288bf5c682Smrg# ---------------------- 39298bf5c682Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 39308bf5c682Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 39318bf5c682SmrgAC_REQUIRE([AC_PROG_CC])dnl 39328bf5c682SmrgAC_REQUIRE([AC_PROG_AWK])dnl 39338bf5c682SmrgAC_REQUIRE([LT_PATH_NM])dnl 39348bf5c682SmrgAC_REQUIRE([LT_PATH_LD])dnl 39358bf5c682Smrgm4_require([_LT_DECL_SED])dnl 39368bf5c682Smrgm4_require([_LT_DECL_EGREP])dnl 39378bf5c682Smrgm4_require([_LT_TAG_COMPILER])dnl 39388bf5c682Smrg 39398bf5c682Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 39408bf5c682SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 39418bf5c682SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 39428bf5c682Smrg[ 39438bf5c682Smrg# These are sane defaults that work on at least a few old systems. 39448bf5c682Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 39458bf5c682Smrg 39468bf5c682Smrg# Character class describing NM global symbol codes. 39478bf5c682Smrgsymcode='[[BCDEGRST]]' 39488bf5c682Smrg 39498bf5c682Smrg# Regexp to match symbols that can be accessed directly from C. 39508bf5c682Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 39518bf5c682Smrg 39528bf5c682Smrg# Define system-specific variables. 39538bf5c682Smrgcase $host_os in 39548bf5c682Smrgaix*) 39558bf5c682Smrg symcode='[[BCDT]]' 39568bf5c682Smrg ;; 39578bf5c682Smrgcygwin* | mingw* | pw32* | cegcc*) 39588bf5c682Smrg symcode='[[ABCDGISTW]]' 39598bf5c682Smrg ;; 39608bf5c682Smrghpux*) 39618bf5c682Smrg if test ia64 = "$host_cpu"; then 39628bf5c682Smrg symcode='[[ABCDEGRST]]' 39638bf5c682Smrg fi 39648bf5c682Smrg ;; 39658bf5c682Smrgirix* | nonstopux*) 39668bf5c682Smrg symcode='[[BCDEGRST]]' 39678bf5c682Smrg ;; 39688bf5c682Smrgosf*) 39698bf5c682Smrg symcode='[[BCDEGQRST]]' 39708bf5c682Smrg ;; 39718bf5c682Smrgsolaris*) 39728bf5c682Smrg symcode='[[BDRT]]' 39738bf5c682Smrg ;; 39748bf5c682Smrgsco3.2v5*) 39758bf5c682Smrg symcode='[[DT]]' 39768bf5c682Smrg ;; 39778bf5c682Smrgsysv4.2uw2*) 39788bf5c682Smrg symcode='[[DT]]' 39798bf5c682Smrg ;; 39808bf5c682Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 39818bf5c682Smrg symcode='[[ABDT]]' 39828bf5c682Smrg ;; 39838bf5c682Smrgsysv4) 39848bf5c682Smrg symcode='[[DFNSTU]]' 39858bf5c682Smrg ;; 39868bf5c682Smrgesac 39878bf5c682Smrg 39888bf5c682Smrg# If we're using GNU nm, then use its standard symbol codes. 39898bf5c682Smrgcase `$NM -V 2>&1` in 39908bf5c682Smrg*GNU* | *'with BFD'*) 39918bf5c682Smrg symcode='[[ABCDGIRSTW]]' ;; 39928bf5c682Smrgesac 39938bf5c682Smrg 39948bf5c682Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 39958bf5c682Smrg # Gets list of data symbols to import. 39960a1d3ae0Smrg lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" 39978bf5c682Smrg # Adjust the below global symbol transforms to fixup imported variables. 39988bf5c682Smrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 39998bf5c682Smrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 40008bf5c682Smrg lt_c_name_lib_hook="\ 40018bf5c682Smrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 40028bf5c682Smrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 40038bf5c682Smrgelse 40048bf5c682Smrg # Disable hooks by default. 40058bf5c682Smrg lt_cv_sys_global_symbol_to_import= 40068bf5c682Smrg lt_cdecl_hook= 40078bf5c682Smrg lt_c_name_hook= 40088bf5c682Smrg lt_c_name_lib_hook= 40098bf5c682Smrgfi 40108bf5c682Smrg 40118bf5c682Smrg# Transform an extracted symbol line into a proper C declaration. 40128bf5c682Smrg# Some systems (esp. on ia64) link data and code symbols differently, 40138bf5c682Smrg# so use this general approach. 40140a1d3ae0Smrglt_cv_sys_global_symbol_to_cdecl="$SED -n"\ 40158bf5c682Smrg$lt_cdecl_hook\ 40168bf5c682Smrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 40178bf5c682Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 40188bf5c682Smrg 40198bf5c682Smrg# Transform an extracted symbol line into symbol name and symbol address 40200a1d3ae0Smrglt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ 40218bf5c682Smrg$lt_c_name_hook\ 40228bf5c682Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 40238bf5c682Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 40248bf5c682Smrg 40258bf5c682Smrg# Transform an extracted symbol line into symbol name with lib prefix and 40268bf5c682Smrg# symbol address. 40270a1d3ae0Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ 40288bf5c682Smrg$lt_c_name_lib_hook\ 40298bf5c682Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 40308bf5c682Smrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 40318bf5c682Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 40328bf5c682Smrg 40338bf5c682Smrg# Handle CRLF in mingw tool chain 40348bf5c682Smrgopt_cr= 40358bf5c682Smrgcase $build_os in 40368bf5c682Smrgmingw*) 40378bf5c682Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 40388bf5c682Smrg ;; 40398bf5c682Smrgesac 40408bf5c682Smrg 40418bf5c682Smrg# Try without a prefix underscore, then with it. 40428bf5c682Smrgfor ac_symprfx in "" "_"; do 40438bf5c682Smrg 40448bf5c682Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 40458bf5c682Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 40468bf5c682Smrg 40478bf5c682Smrg # Write the raw and C identifiers. 40488bf5c682Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 40498bf5c682Smrg # Fake it for dumpbin and say T for any non-static function, 40508bf5c682Smrg # D for any global variable and I for any imported variable. 40510a1d3ae0Smrg # Also find C++ and __fastcall symbols from MSVC++ or ICC, 40528bf5c682Smrg # which start with @ or ?. 40538bf5c682Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 40548bf5c682Smrg" {last_section=section; section=\$ 3};"\ 40558bf5c682Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 40568bf5c682Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 40578bf5c682Smrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 40588bf5c682Smrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 40598bf5c682Smrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 40608bf5c682Smrg" \$ 0!~/External *\|/{next};"\ 40618bf5c682Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 40628bf5c682Smrg" {if(hide[section]) next};"\ 40638bf5c682Smrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 40648bf5c682Smrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 40658bf5c682Smrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 40668bf5c682Smrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 40678bf5c682Smrg" ' prfx=^$ac_symprfx]" 40688bf5c682Smrg else 40690a1d3ae0Smrg lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 40708bf5c682Smrg fi 40710a1d3ae0Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" 40728bf5c682Smrg 40738bf5c682Smrg # Check to see that the pipe works correctly. 40748bf5c682Smrg pipe_works=no 40758bf5c682Smrg 40768bf5c682Smrg rm -f conftest* 40778bf5c682Smrg cat > conftest.$ac_ext <<_LT_EOF 40788bf5c682Smrg#ifdef __cplusplus 40798bf5c682Smrgextern "C" { 40808bf5c682Smrg#endif 40818bf5c682Smrgchar nm_test_var; 40828bf5c682Smrgvoid nm_test_func(void); 40838bf5c682Smrgvoid nm_test_func(void){} 40848bf5c682Smrg#ifdef __cplusplus 40858bf5c682Smrg} 40868bf5c682Smrg#endif 40878bf5c682Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 40888bf5c682Smrg_LT_EOF 40898bf5c682Smrg 40908bf5c682Smrg if AC_TRY_EVAL(ac_compile); then 40918bf5c682Smrg # Now try to grab the symbols. 40928bf5c682Smrg nlist=conftest.nm 40938bf5c682Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 40948bf5c682Smrg # Try sorting and uniquifying the output. 40958bf5c682Smrg if sort "$nlist" | uniq > "$nlist"T; then 40968bf5c682Smrg mv -f "$nlist"T "$nlist" 40978bf5c682Smrg else 40988bf5c682Smrg rm -f "$nlist"T 40998bf5c682Smrg fi 41008bf5c682Smrg 41018bf5c682Smrg # Make sure that we snagged all the symbols we need. 41028bf5c682Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 41038bf5c682Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 41048bf5c682Smrg cat <<_LT_EOF > conftest.$ac_ext 41058bf5c682Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 41068bf5c682Smrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 41078bf5c682Smrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 41088bf5c682Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 41098bf5c682Smrg# define LT@&t@_DLSYM_CONST 41108bf5c682Smrg#elif defined __osf__ 41118bf5c682Smrg/* This system does not cope well with relocations in const data. */ 41128bf5c682Smrg# define LT@&t@_DLSYM_CONST 41138bf5c682Smrg#else 41148bf5c682Smrg# define LT@&t@_DLSYM_CONST const 41158bf5c682Smrg#endif 41168bf5c682Smrg 41178bf5c682Smrg#ifdef __cplusplus 41188bf5c682Smrgextern "C" { 41198bf5c682Smrg#endif 41208bf5c682Smrg 41218bf5c682Smrg_LT_EOF 41228bf5c682Smrg # Now generate the symbol file. 41238bf5c682Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 41248bf5c682Smrg 41258bf5c682Smrg cat <<_LT_EOF >> conftest.$ac_ext 41268bf5c682Smrg 41278bf5c682Smrg/* The mapping between symbol names and symbols. */ 41288bf5c682SmrgLT@&t@_DLSYM_CONST struct { 41298bf5c682Smrg const char *name; 41308bf5c682Smrg void *address; 41318bf5c682Smrg} 41328bf5c682Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 41338bf5c682Smrg{ 41348bf5c682Smrg { "@PROGRAM@", (void *) 0 }, 41358bf5c682Smrg_LT_EOF 41368bf5c682Smrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 41378bf5c682Smrg cat <<\_LT_EOF >> conftest.$ac_ext 41388bf5c682Smrg {0, (void *) 0} 41398bf5c682Smrg}; 41408bf5c682Smrg 41418bf5c682Smrg/* This works around a problem in FreeBSD linker */ 41428bf5c682Smrg#ifdef FREEBSD_WORKAROUND 41438bf5c682Smrgstatic const void *lt_preloaded_setup() { 41448bf5c682Smrg return lt__PROGRAM__LTX_preloaded_symbols; 41458bf5c682Smrg} 41468bf5c682Smrg#endif 41478bf5c682Smrg 41488bf5c682Smrg#ifdef __cplusplus 41498bf5c682Smrg} 41508bf5c682Smrg#endif 41518bf5c682Smrg_LT_EOF 41528bf5c682Smrg # Now try linking the two files. 41538bf5c682Smrg mv conftest.$ac_objext conftstm.$ac_objext 41548bf5c682Smrg lt_globsym_save_LIBS=$LIBS 41558bf5c682Smrg lt_globsym_save_CFLAGS=$CFLAGS 41568bf5c682Smrg LIBS=conftstm.$ac_objext 41578bf5c682Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 41588bf5c682Smrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 41598bf5c682Smrg pipe_works=yes 41608bf5c682Smrg fi 41618bf5c682Smrg LIBS=$lt_globsym_save_LIBS 41628bf5c682Smrg CFLAGS=$lt_globsym_save_CFLAGS 41638bf5c682Smrg else 41648bf5c682Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 41658bf5c682Smrg fi 41668bf5c682Smrg else 41678bf5c682Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 41688bf5c682Smrg fi 41698bf5c682Smrg else 41708bf5c682Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 41718bf5c682Smrg fi 41728bf5c682Smrg else 41738bf5c682Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 41748bf5c682Smrg cat conftest.$ac_ext >&5 41758bf5c682Smrg fi 41768bf5c682Smrg rm -rf conftest* conftst* 41778bf5c682Smrg 41788bf5c682Smrg # Do not use the global_symbol_pipe unless it works. 41798bf5c682Smrg if test yes = "$pipe_works"; then 41808bf5c682Smrg break 41818bf5c682Smrg else 41828bf5c682Smrg lt_cv_sys_global_symbol_pipe= 41838bf5c682Smrg fi 41848bf5c682Smrgdone 41858bf5c682Smrg]) 41868bf5c682Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 41878bf5c682Smrg lt_cv_sys_global_symbol_to_cdecl= 41888bf5c682Smrgfi 41898bf5c682Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 41908bf5c682Smrg AC_MSG_RESULT(failed) 41918bf5c682Smrgelse 41928bf5c682Smrg AC_MSG_RESULT(ok) 41938bf5c682Smrgfi 41948bf5c682Smrg 41958bf5c682Smrg# Response file support. 41968bf5c682Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 41978bf5c682Smrg nm_file_list_spec='@' 41988bf5c682Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 41998bf5c682Smrg nm_file_list_spec='@' 42008bf5c682Smrgfi 42018bf5c682Smrg 42028bf5c682Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 42038bf5c682Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 42048bf5c682Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 42058bf5c682Smrg [Transform the output of nm in a proper C declaration]) 42068bf5c682Smrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 42078bf5c682Smrg [Transform the output of nm into a list of symbols to manually relocate]) 42088bf5c682Smrg_LT_DECL([global_symbol_to_c_name_address], 42098bf5c682Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 42108bf5c682Smrg [Transform the output of nm in a C name address pair]) 42118bf5c682Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 42128bf5c682Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 42138bf5c682Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 42148bf5c682Smrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 42158bf5c682Smrg [The name lister interface]) 42168bf5c682Smrg_LT_DECL([], [nm_file_list_spec], [1], 42178bf5c682Smrg [Specify filename containing input files for $NM]) 42188bf5c682Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 42198bf5c682Smrg 42208bf5c682Smrg 42218bf5c682Smrg# _LT_COMPILER_PIC([TAGNAME]) 42228bf5c682Smrg# --------------------------- 42238bf5c682Smrgm4_defun([_LT_COMPILER_PIC], 42248bf5c682Smrg[m4_require([_LT_TAG_COMPILER])dnl 42258bf5c682Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 42268bf5c682Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 42278bf5c682Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 42288bf5c682Smrg 42298bf5c682Smrgm4_if([$1], [CXX], [ 42308bf5c682Smrg # C++ specific cases for pic, static, wl, etc. 42318bf5c682Smrg if test yes = "$GXX"; then 42328bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 42338bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 42348bf5c682Smrg 42358bf5c682Smrg case $host_os in 42368bf5c682Smrg aix*) 42378bf5c682Smrg # All AIX code is PIC. 42388bf5c682Smrg if test ia64 = "$host_cpu"; then 42398bf5c682Smrg # AIX 5 now supports IA64 processor 42408bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 42418bf5c682Smrg fi 42428bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42438bf5c682Smrg ;; 42448bf5c682Smrg 42458bf5c682Smrg amigaos*) 42468bf5c682Smrg case $host_cpu in 42478bf5c682Smrg powerpc) 42488bf5c682Smrg # see comment about AmigaOS4 .so support 42498bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42508bf5c682Smrg ;; 42518bf5c682Smrg m68k) 42528bf5c682Smrg # FIXME: we need at least 68020 code to build shared libraries, but 42538bf5c682Smrg # adding the '-m68020' flag to GCC prevents building anything better, 42548bf5c682Smrg # like '-m68040'. 42558bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 42568bf5c682Smrg ;; 42578bf5c682Smrg esac 42588bf5c682Smrg ;; 42598bf5c682Smrg 42608bf5c682Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 42618bf5c682Smrg # PIC is the default for these OSes. 42628bf5c682Smrg ;; 42638bf5c682Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 42648bf5c682Smrg # This hack is so that the source file can tell whether it is being 42658bf5c682Smrg # built for inclusion in a dll (and should export symbols for example). 42668bf5c682Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 42678bf5c682Smrg # (--disable-auto-import) libraries 42688bf5c682Smrg m4_if([$1], [GCJ], [], 42698bf5c682Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 42708bf5c682Smrg case $host_os in 42718bf5c682Smrg os2*) 42728bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 42738bf5c682Smrg ;; 42748bf5c682Smrg esac 42758bf5c682Smrg ;; 42768bf5c682Smrg darwin* | rhapsody*) 42778bf5c682Smrg # PIC is the default on this platform 42788bf5c682Smrg # Common symbols not allowed in MH_DYLIB files 42798bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 42808bf5c682Smrg ;; 42818bf5c682Smrg *djgpp*) 42828bf5c682Smrg # DJGPP does not support shared libraries at all 42838bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 42848bf5c682Smrg ;; 42858bf5c682Smrg haiku*) 42868bf5c682Smrg # PIC is the default for Haiku. 42878bf5c682Smrg # The "-static" flag exists, but is broken. 42888bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 42898bf5c682Smrg ;; 42908bf5c682Smrg interix[[3-9]]*) 42918bf5c682Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 42928bf5c682Smrg # Instead, we relocate shared libraries at runtime. 42938bf5c682Smrg ;; 42948bf5c682Smrg sysv4*MP*) 42958bf5c682Smrg if test -d /usr/nec; then 42968bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 42978bf5c682Smrg fi 42988bf5c682Smrg ;; 42998bf5c682Smrg hpux*) 43008bf5c682Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 43018bf5c682Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 43028bf5c682Smrg # sets the default TLS model and affects inlining. 43038bf5c682Smrg case $host_cpu in 43048bf5c682Smrg hppa*64*) 43058bf5c682Smrg ;; 43068bf5c682Smrg *) 43078bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43088bf5c682Smrg ;; 43098bf5c682Smrg esac 43108bf5c682Smrg ;; 43118bf5c682Smrg *qnx* | *nto*) 43128bf5c682Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 43138bf5c682Smrg # it will coredump. 43148bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 43158bf5c682Smrg ;; 43168bf5c682Smrg *) 43178bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43188bf5c682Smrg ;; 43198bf5c682Smrg esac 43208bf5c682Smrg else 43218bf5c682Smrg case $host_os in 43228bf5c682Smrg aix[[4-9]]*) 43238bf5c682Smrg # All AIX code is PIC. 43248bf5c682Smrg if test ia64 = "$host_cpu"; then 43258bf5c682Smrg # AIX 5 now supports IA64 processor 43268bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43278bf5c682Smrg else 43288bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 43298bf5c682Smrg fi 43308bf5c682Smrg ;; 43318bf5c682Smrg chorus*) 43328bf5c682Smrg case $cc_basename in 43338bf5c682Smrg cxch68*) 43348bf5c682Smrg # Green Hills C++ Compiler 43358bf5c682Smrg # _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" 43368bf5c682Smrg ;; 43378bf5c682Smrg esac 43388bf5c682Smrg ;; 43398bf5c682Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 43408bf5c682Smrg # This hack is so that the source file can tell whether it is being 43418bf5c682Smrg # built for inclusion in a dll (and should export symbols for example). 43428bf5c682Smrg m4_if([$1], [GCJ], [], 43438bf5c682Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 43448bf5c682Smrg ;; 43458bf5c682Smrg dgux*) 43468bf5c682Smrg case $cc_basename in 43478bf5c682Smrg ec++*) 43488bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 43498bf5c682Smrg ;; 43508bf5c682Smrg ghcx*) 43518bf5c682Smrg # Green Hills C++ Compiler 43528bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 43538bf5c682Smrg ;; 43548bf5c682Smrg *) 43558bf5c682Smrg ;; 43568bf5c682Smrg esac 43578bf5c682Smrg ;; 43580a1d3ae0Smrg freebsd* | dragonfly* | midnightbsd*) 43598bf5c682Smrg # FreeBSD uses GNU C++ 43608bf5c682Smrg ;; 43618bf5c682Smrg hpux9* | hpux10* | hpux11*) 43628bf5c682Smrg case $cc_basename in 43638bf5c682Smrg CC*) 43648bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43658bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 43668bf5c682Smrg if test ia64 != "$host_cpu"; then 43678bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 43688bf5c682Smrg fi 43698bf5c682Smrg ;; 43708bf5c682Smrg aCC*) 43718bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43728bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 43738bf5c682Smrg case $host_cpu in 43748bf5c682Smrg hppa*64*|ia64*) 43758bf5c682Smrg # +Z the default 43768bf5c682Smrg ;; 43778bf5c682Smrg *) 43788bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 43798bf5c682Smrg ;; 43808bf5c682Smrg esac 43818bf5c682Smrg ;; 43828bf5c682Smrg *) 43838bf5c682Smrg ;; 43848bf5c682Smrg esac 43858bf5c682Smrg ;; 43868bf5c682Smrg interix*) 43878bf5c682Smrg # This is c89, which is MS Visual C++ (no shared libs) 43888bf5c682Smrg # Anyone wants to do a port? 43898bf5c682Smrg ;; 43908bf5c682Smrg irix5* | irix6* | nonstopux*) 43918bf5c682Smrg case $cc_basename in 43928bf5c682Smrg CC*) 43938bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43948bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 43958bf5c682Smrg # CC pic flag -KPIC is the default. 43968bf5c682Smrg ;; 43978bf5c682Smrg *) 43988bf5c682Smrg ;; 43998bf5c682Smrg esac 44008bf5c682Smrg ;; 44018bf5c682Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 44028bf5c682Smrg case $cc_basename in 44038bf5c682Smrg KCC*) 44048bf5c682Smrg # KAI C++ Compiler 44058bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 44068bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 44078bf5c682Smrg ;; 44088bf5c682Smrg ecpc* ) 44098bf5c682Smrg # old Intel C++ for x86_64, which still supported -KPIC. 44108bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44118bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44128bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 44138bf5c682Smrg ;; 44148bf5c682Smrg icpc* ) 44158bf5c682Smrg # Intel C++, used to be incompatible with GCC. 44168bf5c682Smrg # ICC 10 doesn't accept -KPIC any more. 44178bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44188bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 44198bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 44208bf5c682Smrg ;; 44218bf5c682Smrg pgCC* | pgcpp*) 44228bf5c682Smrg # Portland Group C++ compiler 44238bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44248bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 44258bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44268bf5c682Smrg ;; 44278bf5c682Smrg cxx*) 44288bf5c682Smrg # Compaq C++ 44298bf5c682Smrg # Make sure the PIC flag is empty. It appears that all Alpha 44308bf5c682Smrg # Linux and Compaq Tru64 Unix objects are PIC. 44318bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 44328bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44338bf5c682Smrg ;; 44348bf5c682Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 44358bf5c682Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 44368bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44378bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 44388bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 44398bf5c682Smrg ;; 44408bf5c682Smrg *) 44410a1d3ae0Smrg case `$CC -V 2>&1 | $SED 5q` in 44428bf5c682Smrg *Sun\ C*) 44438bf5c682Smrg # Sun C++ 5.9 44448bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44458bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44468bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44478bf5c682Smrg ;; 44488bf5c682Smrg esac 44498bf5c682Smrg ;; 44508bf5c682Smrg esac 44518bf5c682Smrg ;; 44528bf5c682Smrg lynxos*) 44538bf5c682Smrg ;; 44548bf5c682Smrg m88k*) 44558bf5c682Smrg ;; 44568bf5c682Smrg mvs*) 44578bf5c682Smrg case $cc_basename in 44588bf5c682Smrg cxx*) 44598bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 44608bf5c682Smrg ;; 44618bf5c682Smrg *) 44628bf5c682Smrg ;; 44638bf5c682Smrg esac 44648bf5c682Smrg ;; 44658bf5c682Smrg netbsd*) 44668bf5c682Smrg ;; 44678bf5c682Smrg *qnx* | *nto*) 44688bf5c682Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 44698bf5c682Smrg # it will coredump. 44708bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 44718bf5c682Smrg ;; 44728bf5c682Smrg osf3* | osf4* | osf5*) 44738bf5c682Smrg case $cc_basename in 44748bf5c682Smrg KCC*) 44758bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 44768bf5c682Smrg ;; 44778bf5c682Smrg RCC*) 44788bf5c682Smrg # Rational C++ 2.4.1 44798bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 44808bf5c682Smrg ;; 44818bf5c682Smrg cxx*) 44828bf5c682Smrg # Digital/Compaq C++ 44838bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44848bf5c682Smrg # Make sure the PIC flag is empty. It appears that all Alpha 44858bf5c682Smrg # Linux and Compaq Tru64 Unix objects are PIC. 44868bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 44878bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44888bf5c682Smrg ;; 44898bf5c682Smrg *) 44908bf5c682Smrg ;; 44918bf5c682Smrg esac 44928bf5c682Smrg ;; 44938bf5c682Smrg psos*) 44948bf5c682Smrg ;; 44958bf5c682Smrg solaris*) 44968bf5c682Smrg case $cc_basename in 44978bf5c682Smrg CC* | sunCC*) 44988bf5c682Smrg # Sun C++ 4.2, 5.x and Centerline C++ 44998bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 45008bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45018bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 45028bf5c682Smrg ;; 45038bf5c682Smrg gcx*) 45048bf5c682Smrg # Green Hills C++ Compiler 45058bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 45068bf5c682Smrg ;; 45078bf5c682Smrg *) 45088bf5c682Smrg ;; 45098bf5c682Smrg esac 45108bf5c682Smrg ;; 45118bf5c682Smrg sunos4*) 45128bf5c682Smrg case $cc_basename in 45138bf5c682Smrg CC*) 45148bf5c682Smrg # Sun C++ 4.x 45158bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 45168bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45178bf5c682Smrg ;; 45188bf5c682Smrg lcc*) 45198bf5c682Smrg # Lucid 45208bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 45218bf5c682Smrg ;; 45228bf5c682Smrg *) 45238bf5c682Smrg ;; 45248bf5c682Smrg esac 45258bf5c682Smrg ;; 45268bf5c682Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 45278bf5c682Smrg case $cc_basename in 45288bf5c682Smrg CC*) 45298bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45308bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 45318bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45328bf5c682Smrg ;; 45338bf5c682Smrg esac 45348bf5c682Smrg ;; 45358bf5c682Smrg tandem*) 45368bf5c682Smrg case $cc_basename in 45378bf5c682Smrg NCC*) 45388bf5c682Smrg # NonStop-UX NCC 3.20 45398bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 45408bf5c682Smrg ;; 45418bf5c682Smrg *) 45428bf5c682Smrg ;; 45438bf5c682Smrg esac 45448bf5c682Smrg ;; 45458bf5c682Smrg vxworks*) 45468bf5c682Smrg ;; 45478bf5c682Smrg *) 45488bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 45498bf5c682Smrg ;; 45508bf5c682Smrg esac 45518bf5c682Smrg fi 45528bf5c682Smrg], 45538bf5c682Smrg[ 45548bf5c682Smrg if test yes = "$GCC"; then 45558bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45568bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 45578bf5c682Smrg 45588bf5c682Smrg case $host_os in 45598bf5c682Smrg aix*) 45608bf5c682Smrg # All AIX code is PIC. 45618bf5c682Smrg if test ia64 = "$host_cpu"; then 45628bf5c682Smrg # AIX 5 now supports IA64 processor 45638bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45648bf5c682Smrg fi 45658bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 45668bf5c682Smrg ;; 45678bf5c682Smrg 45688bf5c682Smrg amigaos*) 45698bf5c682Smrg case $host_cpu in 45708bf5c682Smrg powerpc) 45718bf5c682Smrg # see comment about AmigaOS4 .so support 45728bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 45738bf5c682Smrg ;; 45748bf5c682Smrg m68k) 45758bf5c682Smrg # FIXME: we need at least 68020 code to build shared libraries, but 45768bf5c682Smrg # adding the '-m68020' flag to GCC prevents building anything better, 45778bf5c682Smrg # like '-m68040'. 45788bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 45798bf5c682Smrg ;; 45808bf5c682Smrg esac 45818bf5c682Smrg ;; 45828bf5c682Smrg 45838bf5c682Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 45848bf5c682Smrg # PIC is the default for these OSes. 45858bf5c682Smrg ;; 45868bf5c682Smrg 45878bf5c682Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 45888bf5c682Smrg # This hack is so that the source file can tell whether it is being 45898bf5c682Smrg # built for inclusion in a dll (and should export symbols for example). 45908bf5c682Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 45918bf5c682Smrg # (--disable-auto-import) libraries 45928bf5c682Smrg m4_if([$1], [GCJ], [], 45938bf5c682Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 45948bf5c682Smrg case $host_os in 45958bf5c682Smrg os2*) 45968bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 45978bf5c682Smrg ;; 45988bf5c682Smrg esac 45998bf5c682Smrg ;; 46008bf5c682Smrg 46018bf5c682Smrg darwin* | rhapsody*) 46028bf5c682Smrg # PIC is the default on this platform 46038bf5c682Smrg # Common symbols not allowed in MH_DYLIB files 46048bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 46058bf5c682Smrg ;; 46068bf5c682Smrg 46078bf5c682Smrg haiku*) 46088bf5c682Smrg # PIC is the default for Haiku. 46098bf5c682Smrg # The "-static" flag exists, but is broken. 46108bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 46118bf5c682Smrg ;; 46128bf5c682Smrg 46138bf5c682Smrg hpux*) 46148bf5c682Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 46158bf5c682Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 46168bf5c682Smrg # sets the default TLS model and affects inlining. 46178bf5c682Smrg case $host_cpu in 46188bf5c682Smrg hppa*64*) 46198bf5c682Smrg # +Z the default 46208bf5c682Smrg ;; 46218bf5c682Smrg *) 46228bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 46238bf5c682Smrg ;; 46248bf5c682Smrg esac 46258bf5c682Smrg ;; 46268bf5c682Smrg 46278bf5c682Smrg interix[[3-9]]*) 46288bf5c682Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 46298bf5c682Smrg # Instead, we relocate shared libraries at runtime. 46308bf5c682Smrg ;; 46318bf5c682Smrg 46328bf5c682Smrg msdosdjgpp*) 46338bf5c682Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 46348bf5c682Smrg # on systems that don't support them. 46358bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 46368bf5c682Smrg enable_shared=no 46378bf5c682Smrg ;; 46388bf5c682Smrg 46398bf5c682Smrg *nto* | *qnx*) 46408bf5c682Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 46418bf5c682Smrg # it will coredump. 46428bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 46438bf5c682Smrg ;; 46448bf5c682Smrg 46458bf5c682Smrg sysv4*MP*) 46468bf5c682Smrg if test -d /usr/nec; then 46478bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 46488bf5c682Smrg fi 46498bf5c682Smrg ;; 46508bf5c682Smrg 46518bf5c682Smrg *) 46528bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 46538bf5c682Smrg ;; 46548bf5c682Smrg esac 46558bf5c682Smrg 46568bf5c682Smrg case $cc_basename in 46578bf5c682Smrg nvcc*) # Cuda Compiler Driver 2.2 46588bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 46598bf5c682Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 46608bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 46618bf5c682Smrg fi 46628bf5c682Smrg ;; 46638bf5c682Smrg esac 46648bf5c682Smrg else 46658bf5c682Smrg # PORTME Check for flag to pass linker flags through the system compiler. 46668bf5c682Smrg case $host_os in 46678bf5c682Smrg aix*) 46688bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 46698bf5c682Smrg if test ia64 = "$host_cpu"; then 46708bf5c682Smrg # AIX 5 now supports IA64 processor 46718bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 46728bf5c682Smrg else 46738bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 46748bf5c682Smrg fi 46758bf5c682Smrg ;; 46768bf5c682Smrg 46778bf5c682Smrg darwin* | rhapsody*) 46788bf5c682Smrg # PIC is the default on this platform 46798bf5c682Smrg # Common symbols not allowed in MH_DYLIB files 46808bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 46818bf5c682Smrg case $cc_basename in 46828bf5c682Smrg nagfor*) 46838bf5c682Smrg # NAG Fortran compiler 46848bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 46858bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 46868bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 46878bf5c682Smrg ;; 46888bf5c682Smrg esac 46898bf5c682Smrg ;; 46908bf5c682Smrg 46918bf5c682Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 46928bf5c682Smrg # This hack is so that the source file can tell whether it is being 46938bf5c682Smrg # built for inclusion in a dll (and should export symbols for example). 46948bf5c682Smrg m4_if([$1], [GCJ], [], 46958bf5c682Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 46968bf5c682Smrg case $host_os in 46978bf5c682Smrg os2*) 46988bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 46998bf5c682Smrg ;; 47008bf5c682Smrg esac 47018bf5c682Smrg ;; 47028bf5c682Smrg 47038bf5c682Smrg hpux9* | hpux10* | hpux11*) 47048bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47058bf5c682Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 47068bf5c682Smrg # not for PA HP-UX. 47078bf5c682Smrg case $host_cpu in 47088bf5c682Smrg hppa*64*|ia64*) 47098bf5c682Smrg # +Z the default 47108bf5c682Smrg ;; 47118bf5c682Smrg *) 47128bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 47138bf5c682Smrg ;; 47148bf5c682Smrg esac 47158bf5c682Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 47168bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 47178bf5c682Smrg ;; 47188bf5c682Smrg 47198bf5c682Smrg irix5* | irix6* | nonstopux*) 47208bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47218bf5c682Smrg # PIC (with -KPIC) is the default. 47228bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 47238bf5c682Smrg ;; 47248bf5c682Smrg 47258bf5c682Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 47268bf5c682Smrg case $cc_basename in 47278bf5c682Smrg # old Intel for x86_64, which still supported -KPIC. 47288bf5c682Smrg ecc*) 47298bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47308bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47318bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47328bf5c682Smrg ;; 47338bf5c682Smrg # icc used to be incompatible with GCC. 47348bf5c682Smrg # ICC 10 doesn't accept -KPIC any more. 47358bf5c682Smrg icc* | ifort*) 47368bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47378bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 47388bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47398bf5c682Smrg ;; 47408bf5c682Smrg # Lahey Fortran 8.1. 47418bf5c682Smrg lf95*) 47428bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47438bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 47448bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 47458bf5c682Smrg ;; 47468bf5c682Smrg nagfor*) 47478bf5c682Smrg # NAG Fortran compiler 47488bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 47498bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 47508bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47518bf5c682Smrg ;; 47528bf5c682Smrg tcc*) 47538bf5c682Smrg # Fabrice Bellard et al's Tiny C Compiler 47548bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47558bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 47568bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47578bf5c682Smrg ;; 47588bf5c682Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 47598bf5c682Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 47608bf5c682Smrg # which looks to be a dead project) 47618bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47628bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 47638bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47648bf5c682Smrg ;; 47658bf5c682Smrg ccc*) 47668bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47678bf5c682Smrg # All Alpha code is PIC. 47688bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 47698bf5c682Smrg ;; 47708bf5c682Smrg xl* | bgxl* | bgf* | mpixl*) 47718bf5c682Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 47728bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47738bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 47748bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 47758bf5c682Smrg ;; 47768bf5c682Smrg *) 47770a1d3ae0Smrg case `$CC -V 2>&1 | $SED 5q` in 47788bf5c682Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 47798bf5c682Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 47808bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47818bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47828bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 47838bf5c682Smrg ;; 47848bf5c682Smrg *Sun\ F* | *Sun*Fortran*) 47858bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47868bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47878bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 47888bf5c682Smrg ;; 47898bf5c682Smrg *Sun\ C*) 47908bf5c682Smrg # Sun C 5.9 47918bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47928bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47938bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47948bf5c682Smrg ;; 47958bf5c682Smrg *Intel*\ [[CF]]*Compiler*) 47968bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47978bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 47988bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47998bf5c682Smrg ;; 48008bf5c682Smrg *Portland\ Group*) 48018bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48028bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 48038bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48048bf5c682Smrg ;; 48058bf5c682Smrg esac 48068bf5c682Smrg ;; 48078bf5c682Smrg esac 48088bf5c682Smrg ;; 48098bf5c682Smrg 48108bf5c682Smrg newsos6) 48118bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48128bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48138bf5c682Smrg ;; 48148bf5c682Smrg 48158bf5c682Smrg *nto* | *qnx*) 48168bf5c682Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 48178bf5c682Smrg # it will coredump. 48188bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 48198bf5c682Smrg ;; 48208bf5c682Smrg 48218bf5c682Smrg osf3* | osf4* | osf5*) 48228bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48238bf5c682Smrg # All OSF/1 code is PIC. 48248bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 48258bf5c682Smrg ;; 48268bf5c682Smrg 48278bf5c682Smrg rdos*) 48288bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 48298bf5c682Smrg ;; 48308bf5c682Smrg 48318bf5c682Smrg solaris*) 48328bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48338bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48348bf5c682Smrg case $cc_basename in 48358bf5c682Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 48368bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 48378bf5c682Smrg *) 48388bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 48398bf5c682Smrg esac 48408bf5c682Smrg ;; 48418bf5c682Smrg 48428bf5c682Smrg sunos4*) 48438bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 48448bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 48458bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48468bf5c682Smrg ;; 48478bf5c682Smrg 48488bf5c682Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 48498bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48508bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48518bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48528bf5c682Smrg ;; 48538bf5c682Smrg 48548bf5c682Smrg sysv4*MP*) 48558bf5c682Smrg if test -d /usr/nec; then 48568bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 48578bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48588bf5c682Smrg fi 48598bf5c682Smrg ;; 48608bf5c682Smrg 48618bf5c682Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 48628bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48638bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48648bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48658bf5c682Smrg ;; 48668bf5c682Smrg 48678bf5c682Smrg unicos*) 48688bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48698bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 48708bf5c682Smrg ;; 48718bf5c682Smrg 48728bf5c682Smrg uts4*) 48738bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 48748bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48758bf5c682Smrg ;; 48768bf5c682Smrg 48778bf5c682Smrg *) 48788bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 48798bf5c682Smrg ;; 48808bf5c682Smrg esac 48818bf5c682Smrg fi 48828bf5c682Smrg]) 48838bf5c682Smrgcase $host_os in 48848bf5c682Smrg # For platforms that do not support PIC, -DPIC is meaningless: 48858bf5c682Smrg *djgpp*) 48868bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 48878bf5c682Smrg ;; 48888bf5c682Smrg *) 48898bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 48908bf5c682Smrg ;; 48918bf5c682Smrgesac 48928bf5c682Smrg 48938bf5c682SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 48948bf5c682Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 48958bf5c682Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 48968bf5c682Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 48978bf5c682Smrg 48988bf5c682Smrg# 48998bf5c682Smrg# Check to make sure the PIC flag actually works. 49008bf5c682Smrg# 49018bf5c682Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 49028bf5c682Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 49038bf5c682Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 49048bf5c682Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 49058bf5c682Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 49068bf5c682Smrg "" | " "*) ;; 49078bf5c682Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 49088bf5c682Smrg esac], 49098bf5c682Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 49108bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 49118bf5c682Smrgfi 49128bf5c682Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 49138bf5c682Smrg [Additional compiler flags for building library objects]) 49148bf5c682Smrg 49158bf5c682Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 49168bf5c682Smrg [How to pass a linker flag through the compiler]) 49178bf5c682Smrg# 49188bf5c682Smrg# Check to make sure the static flag actually works. 49198bf5c682Smrg# 49208bf5c682Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 49218bf5c682Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 49228bf5c682Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 49238bf5c682Smrg $lt_tmp_static_flag, 49248bf5c682Smrg [], 49258bf5c682Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 49268bf5c682Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 49278bf5c682Smrg [Compiler flag to prevent dynamic linking]) 49288bf5c682Smrg])# _LT_COMPILER_PIC 49298bf5c682Smrg 49308bf5c682Smrg 49318bf5c682Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 49328bf5c682Smrg# ---------------------------- 49338bf5c682Smrg# See if the linker supports building shared libraries. 49348bf5c682Smrgm4_defun([_LT_LINKER_SHLIBS], 49358bf5c682Smrg[AC_REQUIRE([LT_PATH_LD])dnl 49368bf5c682SmrgAC_REQUIRE([LT_PATH_NM])dnl 49378bf5c682Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 49388bf5c682Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 49398bf5c682Smrgm4_require([_LT_DECL_EGREP])dnl 49408bf5c682Smrgm4_require([_LT_DECL_SED])dnl 49418bf5c682Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 49428bf5c682Smrgm4_require([_LT_TAG_COMPILER])dnl 49438bf5c682SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 49448bf5c682Smrgm4_if([$1], [CXX], [ 49458bf5c682Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 49468bf5c682Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 49478bf5c682Smrg case $host_os in 49488bf5c682Smrg aix[[4-9]]*) 49498bf5c682Smrg # If we're using GNU nm, then we don't want the "-C" option. 49508bf5c682Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 49518bf5c682Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 49528bf5c682Smrg # weak defined symbols like other global defined symbols, whereas 49538bf5c682Smrg # GNU nm marks them as "W". 49548bf5c682Smrg # While the 'weak' keyword is ignored in the Export File, we need 49558bf5c682Smrg # it in the Import File for the 'aix-soname' feature, so we have 49568bf5c682Smrg # to replace the "-B" option with "-P" for AIX nm. 49578bf5c682Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 49588bf5c682Smrg _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' 49598bf5c682Smrg else 49608bf5c682Smrg _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' 49618bf5c682Smrg fi 49628bf5c682Smrg ;; 49638bf5c682Smrg pw32*) 49648bf5c682Smrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 49658bf5c682Smrg ;; 49668bf5c682Smrg cygwin* | mingw* | cegcc*) 49678bf5c682Smrg case $cc_basename in 49680a1d3ae0Smrg cl* | icl*) 49698bf5c682Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 49708bf5c682Smrg ;; 49718bf5c682Smrg *) 49728bf5c682Smrg _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' 49738bf5c682Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 49748bf5c682Smrg ;; 49758bf5c682Smrg esac 49768bf5c682Smrg ;; 49778bf5c682Smrg *) 49788bf5c682Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 49798bf5c682Smrg ;; 49808bf5c682Smrg esac 49818bf5c682Smrg], [ 49828bf5c682Smrg runpath_var= 49838bf5c682Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 49848bf5c682Smrg _LT_TAGVAR(always_export_symbols, $1)=no 49858bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)= 49868bf5c682Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 49878bf5c682Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 49888bf5c682Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 49898bf5c682Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 49908bf5c682Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 49918bf5c682Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 49928bf5c682Smrg _LT_TAGVAR(hardcode_direct, $1)=no 49938bf5c682Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 49948bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 49958bf5c682Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 49968bf5c682Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 49978bf5c682Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 49988bf5c682Smrg _LT_TAGVAR(inherit_rpath, $1)=no 49998bf5c682Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 50008bf5c682Smrg _LT_TAGVAR(module_cmds, $1)= 50018bf5c682Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 50028bf5c682Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 50038bf5c682Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 50048bf5c682Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 50058bf5c682Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 50068bf5c682Smrg # include_expsyms should be a list of space-separated symbols to be *always* 50078bf5c682Smrg # included in the symbol list 50088bf5c682Smrg _LT_TAGVAR(include_expsyms, $1)= 50098bf5c682Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 50108bf5c682Smrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 50118bf5c682Smrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 50128bf5c682Smrg # as well as any symbol that contains 'd'. 50138bf5c682Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 50148bf5c682Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 50158bf5c682Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 50168bf5c682Smrg # the symbol is explicitly referenced. Since portable code cannot 50178bf5c682Smrg # rely on this symbol name, it's probably fine to never include it in 50188bf5c682Smrg # preloaded symbol tables. 50198bf5c682Smrg # Exclude shared library initialization/finalization symbols. 50208bf5c682Smrgdnl Note also adjust exclude_expsyms for C++ above. 50218bf5c682Smrg extract_expsyms_cmds= 50228bf5c682Smrg 50238bf5c682Smrg case $host_os in 50248bf5c682Smrg cygwin* | mingw* | pw32* | cegcc*) 50250a1d3ae0Smrg # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 50268bf5c682Smrg # When not using gcc, we currently assume that we are using 50270a1d3ae0Smrg # Microsoft Visual C++ or Intel C++ Compiler. 50288bf5c682Smrg if test yes != "$GCC"; then 50298bf5c682Smrg with_gnu_ld=no 50308bf5c682Smrg fi 50318bf5c682Smrg ;; 50328bf5c682Smrg interix*) 50330a1d3ae0Smrg # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 50348bf5c682Smrg with_gnu_ld=yes 50358bf5c682Smrg ;; 50368bf5c682Smrg openbsd* | bitrig*) 50378bf5c682Smrg with_gnu_ld=no 50388bf5c682Smrg ;; 50398bf5c682Smrg esac 50408bf5c682Smrg 50418bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 50428bf5c682Smrg 50438bf5c682Smrg # On some targets, GNU ld is compatible enough with the native linker 50448bf5c682Smrg # that we're better off using the native interface for both. 50458bf5c682Smrg lt_use_gnu_ld_interface=no 50468bf5c682Smrg if test yes = "$with_gnu_ld"; then 50478bf5c682Smrg case $host_os in 50488bf5c682Smrg aix*) 50498bf5c682Smrg # The AIX port of GNU ld has always aspired to compatibility 50508bf5c682Smrg # with the native linker. However, as the warning in the GNU ld 50518bf5c682Smrg # block says, versions before 2.19.5* couldn't really create working 50528bf5c682Smrg # shared libraries, regardless of the interface used. 50538bf5c682Smrg case `$LD -v 2>&1` in 50548bf5c682Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 50558bf5c682Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 50568bf5c682Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 50578bf5c682Smrg *) 50588bf5c682Smrg lt_use_gnu_ld_interface=yes 50598bf5c682Smrg ;; 50608bf5c682Smrg esac 50618bf5c682Smrg ;; 50628bf5c682Smrg *) 50638bf5c682Smrg lt_use_gnu_ld_interface=yes 50648bf5c682Smrg ;; 50658bf5c682Smrg esac 50668bf5c682Smrg fi 50678bf5c682Smrg 50688bf5c682Smrg if test yes = "$lt_use_gnu_ld_interface"; then 50698bf5c682Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 50708bf5c682Smrg wlarc='$wl' 50718bf5c682Smrg 50728bf5c682Smrg # Set some defaults for GNU ld with shared library support. These 50738bf5c682Smrg # are reset later if shared libraries are not supported. Putting them 50748bf5c682Smrg # here allows them to be overridden if necessary. 50758bf5c682Smrg runpath_var=LD_RUN_PATH 50768bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 50778bf5c682Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 50788bf5c682Smrg # ancient GNU ld didn't support --whole-archive et. al. 50798bf5c682Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 50808bf5c682Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 50818bf5c682Smrg else 50828bf5c682Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 50838bf5c682Smrg fi 50848bf5c682Smrg supports_anon_versioning=no 50850a1d3ae0Smrg case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in 50868bf5c682Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 50878bf5c682Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 50888bf5c682Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 50898bf5c682Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 50908bf5c682Smrg *\ 2.11.*) ;; # other 2.11 versions 50918bf5c682Smrg *) supports_anon_versioning=yes ;; 50928bf5c682Smrg esac 50938bf5c682Smrg 50948bf5c682Smrg # See if GNU ld supports shared libraries. 50958bf5c682Smrg case $host_os in 50968bf5c682Smrg aix[[3-9]]*) 50978bf5c682Smrg # On AIX/PPC, the GNU linker is very broken 50988bf5c682Smrg if test ia64 != "$host_cpu"; then 50998bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 51008bf5c682Smrg cat <<_LT_EOF 1>&2 51018bf5c682Smrg 51028bf5c682Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 51038bf5c682Smrg*** to be unable to reliably create shared libraries on AIX. 51048bf5c682Smrg*** Therefore, libtool is disabling shared libraries support. If you 51058bf5c682Smrg*** really care for shared libraries, you may want to install binutils 51068bf5c682Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 51078bf5c682Smrg*** You will then need to restart the configuration process. 51088bf5c682Smrg 51098bf5c682Smrg_LT_EOF 51108bf5c682Smrg fi 51118bf5c682Smrg ;; 51128bf5c682Smrg 51138bf5c682Smrg amigaos*) 51148bf5c682Smrg case $host_cpu in 51158bf5c682Smrg powerpc) 51168bf5c682Smrg # see comment about AmigaOS4 .so support 51178bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 51188bf5c682Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 51198bf5c682Smrg ;; 51208bf5c682Smrg m68k) 51218bf5c682Smrg _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)' 51228bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51238bf5c682Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 51248bf5c682Smrg ;; 51258bf5c682Smrg esac 51268bf5c682Smrg ;; 51278bf5c682Smrg 51288bf5c682Smrg beos*) 51298bf5c682Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 51308bf5c682Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51318bf5c682Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 51328bf5c682Smrg # support --undefined. This deserves some investigation. FIXME 51338bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 51348bf5c682Smrg else 51358bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 51368bf5c682Smrg fi 51378bf5c682Smrg ;; 51388bf5c682Smrg 51398bf5c682Smrg cygwin* | mingw* | pw32* | cegcc*) 51408bf5c682Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 51418bf5c682Smrg # as there is no search path for DLLs. 51428bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51438bf5c682Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 51448bf5c682Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51458bf5c682Smrg _LT_TAGVAR(always_export_symbols, $1)=no 51468bf5c682Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 51478bf5c682Smrg _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' 51488bf5c682Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 51498bf5c682Smrg 51508bf5c682Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 51518bf5c682Smrg _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' 51528bf5c682Smrg # If the export-symbols file already is a .def file, use it as 51538bf5c682Smrg # is; otherwise, prepend EXPORTS... 51548bf5c682Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 51558bf5c682Smrg cp $export_symbols $output_objdir/$soname.def; 51568bf5c682Smrg else 51578bf5c682Smrg echo EXPORTS > $output_objdir/$soname.def; 51588bf5c682Smrg cat $export_symbols >> $output_objdir/$soname.def; 51598bf5c682Smrg fi~ 51608bf5c682Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 51618bf5c682Smrg else 51628bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 51638bf5c682Smrg fi 51648bf5c682Smrg ;; 51658bf5c682Smrg 51668bf5c682Smrg haiku*) 51678bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 51688bf5c682Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 51698bf5c682Smrg ;; 51708bf5c682Smrg 51718bf5c682Smrg os2*) 51728bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51738bf5c682Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 51748bf5c682Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51758bf5c682Smrg shrext_cmds=.dll 51768bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 51778bf5c682Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 51788bf5c682Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 51798bf5c682Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 51808bf5c682Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 51818bf5c682Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 51828bf5c682Smrg emximp -o $lib $output_objdir/$libname.def' 51838bf5c682Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 51848bf5c682Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 51858bf5c682Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 51868bf5c682Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 51878bf5c682Smrg prefix_cmds="$SED"~ 51888bf5c682Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 51898bf5c682Smrg prefix_cmds="$prefix_cmds -e 1d"; 51908bf5c682Smrg fi~ 51918bf5c682Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 51928bf5c682Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 51938bf5c682Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 51948bf5c682Smrg emximp -o $lib $output_objdir/$libname.def' 51958bf5c682Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 51968bf5c682Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 51978bf5c682Smrg _LT_TAGVAR(file_list_spec, $1)='@' 51988bf5c682Smrg ;; 51998bf5c682Smrg 52008bf5c682Smrg interix[[3-9]]*) 52018bf5c682Smrg _LT_TAGVAR(hardcode_direct, $1)=no 52028bf5c682Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52038bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 52048bf5c682Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 52058bf5c682Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 52068bf5c682Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 52078bf5c682Smrg # default) and relocated if they conflict, which is a slow very memory 52088bf5c682Smrg # consuming and fragmenting process. To avoid this, we pick a random, 52098bf5c682Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 52108bf5c682Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 52118bf5c682Smrg _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' 52120a1d3ae0Smrg _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' 52138bf5c682Smrg ;; 52148bf5c682Smrg 52158bf5c682Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 52168bf5c682Smrg tmp_diet=no 52178bf5c682Smrg if test linux-dietlibc = "$host_os"; then 52188bf5c682Smrg case $cc_basename in 52198bf5c682Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 52208bf5c682Smrg esac 52218bf5c682Smrg fi 52228bf5c682Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 52238bf5c682Smrg && test no = "$tmp_diet" 52248bf5c682Smrg then 52258bf5c682Smrg tmp_addflag=' $pic_flag' 52268bf5c682Smrg tmp_sharedflag='-shared' 52278bf5c682Smrg case $cc_basename,$host_cpu in 52288bf5c682Smrg pgcc*) # Portland Group C compiler 52298bf5c682Smrg _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' 52308bf5c682Smrg tmp_addflag=' $pic_flag' 52318bf5c682Smrg ;; 52328bf5c682Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 52338bf5c682Smrg # Portland Group f77 and f90 compilers 52348bf5c682Smrg _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' 52358bf5c682Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 52368bf5c682Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 52378bf5c682Smrg tmp_addflag=' -i_dynamic' ;; 52388bf5c682Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 52398bf5c682Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 52408bf5c682Smrg ifc* | ifort*) # Intel Fortran compiler 52418bf5c682Smrg tmp_addflag=' -nofor_main' ;; 52428bf5c682Smrg lf95*) # Lahey Fortran 8.1 52438bf5c682Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 52448bf5c682Smrg tmp_sharedflag='--shared' ;; 52458bf5c682Smrg nagfor*) # NAGFOR 5.3 52468bf5c682Smrg tmp_sharedflag='-Wl,-shared' ;; 52478bf5c682Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 52488bf5c682Smrg tmp_sharedflag='-qmkshrobj' 52498bf5c682Smrg tmp_addflag= ;; 52508bf5c682Smrg nvcc*) # Cuda Compiler Driver 2.2 52518bf5c682Smrg _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' 52528bf5c682Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 52538bf5c682Smrg ;; 52548bf5c682Smrg esac 52550a1d3ae0Smrg case `$CC -V 2>&1 | $SED 5q` in 52568bf5c682Smrg *Sun\ C*) # Sun C 5.9 52578bf5c682Smrg _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' 52588bf5c682Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 52598bf5c682Smrg tmp_sharedflag='-G' ;; 52608bf5c682Smrg *Sun\ F*) # Sun Fortran 8.3 52618bf5c682Smrg tmp_sharedflag='-G' ;; 52628bf5c682Smrg esac 52638bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 52648bf5c682Smrg 52658bf5c682Smrg if test yes = "$supports_anon_versioning"; then 52668bf5c682Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 52670a1d3ae0Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 52688bf5c682Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 52698bf5c682Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 52708bf5c682Smrg fi 52718bf5c682Smrg 52728bf5c682Smrg case $cc_basename in 52738bf5c682Smrg tcc*) 52748bf5c682Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 52758bf5c682Smrg ;; 52768bf5c682Smrg xlf* | bgf* | bgxlf* | mpixlf*) 52778bf5c682Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 52788bf5c682Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 52798bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 52808bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 52818bf5c682Smrg if test yes = "$supports_anon_versioning"; then 52828bf5c682Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 52830a1d3ae0Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 52848bf5c682Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 52858bf5c682Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 52868bf5c682Smrg fi 52878bf5c682Smrg ;; 52888bf5c682Smrg esac 52898bf5c682Smrg else 52908bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 52918bf5c682Smrg fi 52928bf5c682Smrg ;; 52938bf5c682Smrg 52948bf5c682Smrg netbsd*) 52958bf5c682Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 52968bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 52978bf5c682Smrg wlarc= 52988bf5c682Smrg else 52998bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 53008bf5c682Smrg _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' 53018bf5c682Smrg fi 53028bf5c682Smrg ;; 53038bf5c682Smrg 53048bf5c682Smrg solaris*) 53058bf5c682Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 53068bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 53078bf5c682Smrg cat <<_LT_EOF 1>&2 53088bf5c682Smrg 53098bf5c682Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 53108bf5c682Smrg*** create shared libraries on Solaris systems. Therefore, libtool 53118bf5c682Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 53128bf5c682Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 53138bf5c682Smrg*** your PATH or compiler configuration so that the native linker is 53148bf5c682Smrg*** used, and then restart. 53158bf5c682Smrg 53168bf5c682Smrg_LT_EOF 53178bf5c682Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 53188bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 53198bf5c682Smrg _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' 53208bf5c682Smrg else 53218bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 53228bf5c682Smrg fi 53238bf5c682Smrg ;; 53248bf5c682Smrg 53258bf5c682Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 53268bf5c682Smrg case `$LD -v 2>&1` in 53278bf5c682Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 53288bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 53298bf5c682Smrg cat <<_LT_EOF 1>&2 53308bf5c682Smrg 53318bf5c682Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 53328bf5c682Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 53338bf5c682Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 53348bf5c682Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 53358bf5c682Smrg*** your PATH or compiler configuration so that the native linker is 53368bf5c682Smrg*** used, and then restart. 53378bf5c682Smrg 53388bf5c682Smrg_LT_EOF 53398bf5c682Smrg ;; 53408bf5c682Smrg *) 53418bf5c682Smrg # For security reasons, it is highly recommended that you always 53428bf5c682Smrg # use absolute paths for naming shared libraries, and exclude the 53438bf5c682Smrg # DT_RUNPATH tag from executables and libraries. But doing so 53448bf5c682Smrg # requires that you compile everything twice, which is a pain. 53458bf5c682Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 53468bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 53478bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 53488bf5c682Smrg _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' 53498bf5c682Smrg else 53508bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 53518bf5c682Smrg fi 53528bf5c682Smrg ;; 53538bf5c682Smrg esac 53548bf5c682Smrg ;; 53558bf5c682Smrg 53568bf5c682Smrg sunos4*) 53578bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 53588bf5c682Smrg wlarc= 53598bf5c682Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 53608bf5c682Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53618bf5c682Smrg ;; 53628bf5c682Smrg 53638bf5c682Smrg *) 53648bf5c682Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 53658bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 53668bf5c682Smrg _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' 53678bf5c682Smrg else 53688bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 53698bf5c682Smrg fi 53708bf5c682Smrg ;; 53718bf5c682Smrg esac 53728bf5c682Smrg 53738bf5c682Smrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 53748bf5c682Smrg runpath_var= 53758bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 53768bf5c682Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 53778bf5c682Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 53788bf5c682Smrg fi 53798bf5c682Smrg else 53808bf5c682Smrg # PORTME fill in a description of your system's linker (not GNU ld) 53818bf5c682Smrg case $host_os in 53828bf5c682Smrg aix3*) 53838bf5c682Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 53848bf5c682Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 53858bf5c682Smrg _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' 53868bf5c682Smrg # Note: this linker hardcodes the directories in LIBPATH if there 53878bf5c682Smrg # are no directories specified by -L. 53888bf5c682Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 53898bf5c682Smrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 53908bf5c682Smrg # Neither direct hardcoding nor static linking is supported with a 53918bf5c682Smrg # broken collect2. 53928bf5c682Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 53938bf5c682Smrg fi 53948bf5c682Smrg ;; 53958bf5c682Smrg 53968bf5c682Smrg aix[[4-9]]*) 53978bf5c682Smrg if test ia64 = "$host_cpu"; then 53988bf5c682Smrg # On IA64, the linker does run time linking by default, so we don't 53998bf5c682Smrg # have to do anything special. 54008bf5c682Smrg aix_use_runtimelinking=no 54018bf5c682Smrg exp_sym_flag='-Bexport' 54028bf5c682Smrg no_entry_flag= 54038bf5c682Smrg else 54048bf5c682Smrg # If we're using GNU nm, then we don't want the "-C" option. 54058bf5c682Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 54068bf5c682Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 54078bf5c682Smrg # weak defined symbols like other global defined symbols, whereas 54088bf5c682Smrg # GNU nm marks them as "W". 54098bf5c682Smrg # While the 'weak' keyword is ignored in the Export File, we need 54108bf5c682Smrg # it in the Import File for the 'aix-soname' feature, so we have 54118bf5c682Smrg # to replace the "-B" option with "-P" for AIX nm. 54128bf5c682Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 54138bf5c682Smrg _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' 54148bf5c682Smrg else 54158bf5c682Smrg _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' 54168bf5c682Smrg fi 54178bf5c682Smrg aix_use_runtimelinking=no 54188bf5c682Smrg 54198bf5c682Smrg # Test if we are trying to use run time linking or normal 54208bf5c682Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 54218bf5c682Smrg # have runtime linking enabled, and use it for executables. 54228bf5c682Smrg # For shared libraries, we enable/disable runtime linking 54238bf5c682Smrg # depending on the kind of the shared library created - 54248bf5c682Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 54258bf5c682Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 54268bf5c682Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 54278bf5c682Smrg # lib.a static archive 54288bf5c682Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 54298bf5c682Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 54308bf5c682Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 54318bf5c682Smrg # lib.a(lib.so.V) shared, rtl:no 54328bf5c682Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 54338bf5c682Smrg # lib.a static archive 54348bf5c682Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 54358bf5c682Smrg for ld_flag in $LDFLAGS; do 54368bf5c682Smrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 54378bf5c682Smrg aix_use_runtimelinking=yes 54388bf5c682Smrg break 54398bf5c682Smrg fi 54408bf5c682Smrg done 54418bf5c682Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 54428bf5c682Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 54438bf5c682Smrg # so we don't have lib.a shared libs to link our executables. 54448bf5c682Smrg # We have to force runtime linking in this case. 54458bf5c682Smrg aix_use_runtimelinking=yes 54468bf5c682Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 54478bf5c682Smrg fi 54488bf5c682Smrg ;; 54498bf5c682Smrg esac 54508bf5c682Smrg 54518bf5c682Smrg exp_sym_flag='-bexport' 54528bf5c682Smrg no_entry_flag='-bnoentry' 54538bf5c682Smrg fi 54548bf5c682Smrg 54558bf5c682Smrg # When large executables or shared objects are built, AIX ld can 54568bf5c682Smrg # have problems creating the table of contents. If linking a library 54578bf5c682Smrg # or program results in "error TOC overflow" add -mminimal-toc to 54588bf5c682Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 54598bf5c682Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 54608bf5c682Smrg 54618bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='' 54628bf5c682Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 54638bf5c682Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 54648bf5c682Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 54658bf5c682Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 54668bf5c682Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 54678bf5c682Smrg case $with_aix_soname,$aix_use_runtimelinking in 54688bf5c682Smrg aix,*) ;; # traditional, no import file 54698bf5c682Smrg svr4,* | *,yes) # use import file 54708bf5c682Smrg # The Import File defines what to hardcode. 54718bf5c682Smrg _LT_TAGVAR(hardcode_direct, $1)=no 54728bf5c682Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 54738bf5c682Smrg ;; 54748bf5c682Smrg esac 54758bf5c682Smrg 54768bf5c682Smrg if test yes = "$GCC"; then 54778bf5c682Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 54788bf5c682Smrg # We only want to do this on AIX 4.2 and lower, the check 54798bf5c682Smrg # below for broken collect2 doesn't work under 4.3+ 54808bf5c682Smrg collect2name=`$CC -print-prog-name=collect2` 54818bf5c682Smrg if test -f "$collect2name" && 54828bf5c682Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 54838bf5c682Smrg then 54848bf5c682Smrg # We have reworked collect2 54858bf5c682Smrg : 54868bf5c682Smrg else 54878bf5c682Smrg # We have old collect2 54888bf5c682Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 54898bf5c682Smrg # It fails to find uninstalled libraries when the uninstalled 54908bf5c682Smrg # path is not listed in the libpath. Setting hardcode_minus_L 54918bf5c682Smrg # to unsupported forces relinking 54928bf5c682Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 54938bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 54948bf5c682Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 54958bf5c682Smrg fi 54968bf5c682Smrg ;; 54978bf5c682Smrg esac 54988bf5c682Smrg shared_flag='-shared' 54998bf5c682Smrg if test yes = "$aix_use_runtimelinking"; then 55008bf5c682Smrg shared_flag="$shared_flag "'$wl-G' 55018bf5c682Smrg fi 55028bf5c682Smrg # Need to ensure runtime linking is disabled for the traditional 55038bf5c682Smrg # shared library, or the linker may eventually find shared libraries 55048bf5c682Smrg # /with/ Import File - we do not want to mix them. 55058bf5c682Smrg shared_flag_aix='-shared' 55068bf5c682Smrg shared_flag_svr4='-shared $wl-G' 55078bf5c682Smrg else 55088bf5c682Smrg # not using gcc 55098bf5c682Smrg if test ia64 = "$host_cpu"; then 55108bf5c682Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 55118bf5c682Smrg # chokes on -Wl,-G. The following line is correct: 55128bf5c682Smrg shared_flag='-G' 55138bf5c682Smrg else 55148bf5c682Smrg if test yes = "$aix_use_runtimelinking"; then 55158bf5c682Smrg shared_flag='$wl-G' 55168bf5c682Smrg else 55178bf5c682Smrg shared_flag='$wl-bM:SRE' 55188bf5c682Smrg fi 55198bf5c682Smrg shared_flag_aix='$wl-bM:SRE' 55208bf5c682Smrg shared_flag_svr4='$wl-G' 55218bf5c682Smrg fi 55228bf5c682Smrg fi 55238bf5c682Smrg 55248bf5c682Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 55258bf5c682Smrg # It seems that -bexpall does not export symbols beginning with 55268bf5c682Smrg # underscore (_), so it is better to generate a list of symbols to export. 55278bf5c682Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 55288bf5c682Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 55298bf5c682Smrg # Warning - without using the other runtime loading flags (-brtl), 55308bf5c682Smrg # -berok will link without error, but may produce a broken library. 55318bf5c682Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 55328bf5c682Smrg # Determine the default libpath from the value encoded in an 55338bf5c682Smrg # empty executable. 55348bf5c682Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 55358bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 55368bf5c682Smrg _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 55378bf5c682Smrg else 55388bf5c682Smrg if test ia64 = "$host_cpu"; then 55398bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 55408bf5c682Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 55418bf5c682Smrg _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" 55428bf5c682Smrg else 55438bf5c682Smrg # Determine the default libpath from the value encoded in an 55448bf5c682Smrg # empty executable. 55458bf5c682Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 55468bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 55478bf5c682Smrg # Warning - without using the other run time loading flags, 55488bf5c682Smrg # -berok will link without error, but may produce a broken library. 55498bf5c682Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 55508bf5c682Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 55518bf5c682Smrg if test yes = "$with_gnu_ld"; then 55528bf5c682Smrg # We only use this code for GNU lds that support --whole-archive. 55538bf5c682Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 55548bf5c682Smrg else 55558bf5c682Smrg # Exported symbols can be pulled into shared objects from archives 55568bf5c682Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 55578bf5c682Smrg fi 55588bf5c682Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 55598bf5c682Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 55608bf5c682Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 55618bf5c682Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 55628bf5c682Smrg if test svr4 != "$with_aix_soname"; then 55638bf5c682Smrg # This is similar to how AIX traditionally builds its shared libraries. 55648bf5c682Smrg _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' 55658bf5c682Smrg fi 55668bf5c682Smrg if test aix != "$with_aix_soname"; then 55678bf5c682Smrg _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' 55688bf5c682Smrg else 55698bf5c682Smrg # used by -dlpreopen to get the symbols 55708bf5c682Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 55718bf5c682Smrg fi 55728bf5c682Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 55738bf5c682Smrg fi 55748bf5c682Smrg fi 55758bf5c682Smrg ;; 55768bf5c682Smrg 55778bf5c682Smrg amigaos*) 55788bf5c682Smrg case $host_cpu in 55798bf5c682Smrg powerpc) 55808bf5c682Smrg # see comment about AmigaOS4 .so support 55818bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 55828bf5c682Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 55838bf5c682Smrg ;; 55848bf5c682Smrg m68k) 55858bf5c682Smrg _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)' 55868bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 55878bf5c682Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 55888bf5c682Smrg ;; 55898bf5c682Smrg esac 55908bf5c682Smrg ;; 55918bf5c682Smrg 55928bf5c682Smrg bsdi[[45]]*) 55938bf5c682Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 55948bf5c682Smrg ;; 55958bf5c682Smrg 55968bf5c682Smrg cygwin* | mingw* | pw32* | cegcc*) 55978bf5c682Smrg # When not using gcc, we currently assume that we are using 55980a1d3ae0Smrg # Microsoft Visual C++ or Intel C++ Compiler. 55998bf5c682Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 56008bf5c682Smrg # no search path for DLLs. 56018bf5c682Smrg case $cc_basename in 56020a1d3ae0Smrg cl* | icl*) 56030a1d3ae0Smrg # Native MSVC or ICC 56048bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 56058bf5c682Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 56068bf5c682Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 56078bf5c682Smrg _LT_TAGVAR(file_list_spec, $1)='@' 56088bf5c682Smrg # Tell ltmain to make .lib files, not .a files. 56098bf5c682Smrg libext=lib 56108bf5c682Smrg # Tell ltmain to make .dll files, not .so files. 56118bf5c682Smrg shrext_cmds=.dll 56128bf5c682Smrg # FIXME: Setting linknames here is a bad hack. 56138bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 56148bf5c682Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 56158bf5c682Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 56168bf5c682Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 56178bf5c682Smrg else 56188bf5c682Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 56198bf5c682Smrg fi~ 56208bf5c682Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 56218bf5c682Smrg linknames=' 56228bf5c682Smrg # The linker will not automatically build a static lib if we build a DLL. 56238bf5c682Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 56248bf5c682Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 56258bf5c682Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 56268bf5c682Smrg _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' 56278bf5c682Smrg # Don't use ranlib 56288bf5c682Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 56298bf5c682Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 56308bf5c682Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 56318bf5c682Smrg case $lt_outputfile in 56328bf5c682Smrg *.exe|*.EXE) ;; 56338bf5c682Smrg *) 56348bf5c682Smrg lt_outputfile=$lt_outputfile.exe 56358bf5c682Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 56368bf5c682Smrg ;; 56378bf5c682Smrg esac~ 56388bf5c682Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 56398bf5c682Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 56408bf5c682Smrg $RM "$lt_outputfile.manifest"; 56418bf5c682Smrg fi' 56428bf5c682Smrg ;; 56438bf5c682Smrg *) 56440a1d3ae0Smrg # Assume MSVC and ICC wrapper 56458bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 56468bf5c682Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 56478bf5c682Smrg # Tell ltmain to make .lib files, not .a files. 56488bf5c682Smrg libext=lib 56498bf5c682Smrg # Tell ltmain to make .dll files, not .so files. 56508bf5c682Smrg shrext_cmds=.dll 56518bf5c682Smrg # FIXME: Setting linknames here is a bad hack. 56528bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 56538bf5c682Smrg # The linker will automatically build a .lib file if we build a DLL. 56548bf5c682Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 56558bf5c682Smrg # FIXME: Should let the user specify the lib program. 56568bf5c682Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 56578bf5c682Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 56588bf5c682Smrg ;; 56598bf5c682Smrg esac 56608bf5c682Smrg ;; 56618bf5c682Smrg 56628bf5c682Smrg darwin* | rhapsody*) 56638bf5c682Smrg _LT_DARWIN_LINKER_FEATURES($1) 56648bf5c682Smrg ;; 56658bf5c682Smrg 56668bf5c682Smrg dgux*) 56678bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 56688bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 56698bf5c682Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56708bf5c682Smrg ;; 56718bf5c682Smrg 56728bf5c682Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 56738bf5c682Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 56748bf5c682Smrg # does not break anything, and helps significantly (at the cost of a little 56758bf5c682Smrg # extra space). 56768bf5c682Smrg freebsd2.2*) 56778bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 56788bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 56798bf5c682Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 56808bf5c682Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56818bf5c682Smrg ;; 56828bf5c682Smrg 56838bf5c682Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 56848bf5c682Smrg freebsd2.*) 56858bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 56868bf5c682Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 56878bf5c682Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 56888bf5c682Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56898bf5c682Smrg ;; 56908bf5c682Smrg 56918bf5c682Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 56920a1d3ae0Smrg freebsd* | dragonfly* | midnightbsd*) 56938bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 56948bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 56958bf5c682Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 56968bf5c682Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56978bf5c682Smrg ;; 56988bf5c682Smrg 56998bf5c682Smrg hpux9*) 57008bf5c682Smrg if test yes = "$GCC"; then 57018bf5c682Smrg _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' 57028bf5c682Smrg else 57038bf5c682Smrg _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' 57048bf5c682Smrg fi 57058bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 57068bf5c682Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57078bf5c682Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 57088bf5c682Smrg 57098bf5c682Smrg # hardcode_minus_L: Not really in the search PATH, 57108bf5c682Smrg # but as the default location of the library. 57118bf5c682Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57128bf5c682Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 57138bf5c682Smrg ;; 57148bf5c682Smrg 57158bf5c682Smrg hpux10*) 57168bf5c682Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 57178bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 57188bf5c682Smrg else 57198bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 57208bf5c682Smrg fi 57218bf5c682Smrg if test no = "$with_gnu_ld"; then 57228bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 57238bf5c682Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57248bf5c682Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 57258bf5c682Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 57268bf5c682Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 57278bf5c682Smrg # hardcode_minus_L: Not really in the search PATH, 57288bf5c682Smrg # but as the default location of the library. 57298bf5c682Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57308bf5c682Smrg fi 57318bf5c682Smrg ;; 57328bf5c682Smrg 57338bf5c682Smrg hpux11*) 57348bf5c682Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 57358bf5c682Smrg case $host_cpu in 57368bf5c682Smrg hppa*64*) 57378bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 57388bf5c682Smrg ;; 57398bf5c682Smrg ia64*) 57408bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 57418bf5c682Smrg ;; 57428bf5c682Smrg *) 57438bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 57448bf5c682Smrg ;; 57458bf5c682Smrg esac 57468bf5c682Smrg else 57478bf5c682Smrg case $host_cpu in 57488bf5c682Smrg hppa*64*) 57498bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 57508bf5c682Smrg ;; 57518bf5c682Smrg ia64*) 57528bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 57538bf5c682Smrg ;; 57548bf5c682Smrg *) 57558bf5c682Smrg m4_if($1, [], [ 57568bf5c682Smrg # Older versions of the 11.00 compiler do not understand -b yet 57578bf5c682Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 57588bf5c682Smrg _LT_LINKER_OPTION([if $CC understands -b], 57598bf5c682Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 57608bf5c682Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 57618bf5c682Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 57628bf5c682Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 57638bf5c682Smrg ;; 57648bf5c682Smrg esac 57658bf5c682Smrg fi 57668bf5c682Smrg if test no = "$with_gnu_ld"; then 57678bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 57688bf5c682Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57698bf5c682Smrg 57708bf5c682Smrg case $host_cpu in 57718bf5c682Smrg hppa*64*|ia64*) 57728bf5c682Smrg _LT_TAGVAR(hardcode_direct, $1)=no 57738bf5c682Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 57748bf5c682Smrg ;; 57758bf5c682Smrg *) 57768bf5c682Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 57778bf5c682Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 57788bf5c682Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 57798bf5c682Smrg 57808bf5c682Smrg # hardcode_minus_L: Not really in the search PATH, 57818bf5c682Smrg # but as the default location of the library. 57828bf5c682Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57838bf5c682Smrg ;; 57848bf5c682Smrg esac 57858bf5c682Smrg fi 57868bf5c682Smrg ;; 57878bf5c682Smrg 57888bf5c682Smrg irix5* | irix6* | nonstopux*) 57898bf5c682Smrg if test yes = "$GCC"; then 57908bf5c682Smrg _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' 57918bf5c682Smrg # Try to use the -exported_symbol ld option, if it does not 57928bf5c682Smrg # work, assume that -exports_file does not work either and 57938bf5c682Smrg # implicitly export all symbols. 57948bf5c682Smrg # This should be the same for all languages, so no per-tag cache variable. 57958bf5c682Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 57968bf5c682Smrg [lt_cv_irix_exported_symbol], 57978bf5c682Smrg [save_LDFLAGS=$LDFLAGS 57988bf5c682Smrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 57998bf5c682Smrg AC_LINK_IFELSE( 58008bf5c682Smrg [AC_LANG_SOURCE( 58018bf5c682Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 58028bf5c682Smrg [C++], [[int foo (void) { return 0; }]], 58038bf5c682Smrg [Fortran 77], [[ 58048bf5c682Smrg subroutine foo 58058bf5c682Smrg end]], 58068bf5c682Smrg [Fortran], [[ 58078bf5c682Smrg subroutine foo 58088bf5c682Smrg end]])])], 58098bf5c682Smrg [lt_cv_irix_exported_symbol=yes], 58108bf5c682Smrg [lt_cv_irix_exported_symbol=no]) 58118bf5c682Smrg LDFLAGS=$save_LDFLAGS]) 58128bf5c682Smrg if test yes = "$lt_cv_irix_exported_symbol"; then 58138bf5c682Smrg _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' 58148bf5c682Smrg fi 58158bf5c682Smrg else 58168bf5c682Smrg _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' 58178bf5c682Smrg _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' 58188bf5c682Smrg fi 58198bf5c682Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 58208bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 58218bf5c682Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58228bf5c682Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 58238bf5c682Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 58248bf5c682Smrg ;; 58258bf5c682Smrg 58268bf5c682Smrg linux*) 58278bf5c682Smrg case $cc_basename in 58288bf5c682Smrg tcc*) 58298bf5c682Smrg # Fabrice Bellard et al's Tiny C Compiler 58308bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 58318bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 58328bf5c682Smrg ;; 58338bf5c682Smrg esac 58348bf5c682Smrg ;; 58358bf5c682Smrg 58368bf5c682Smrg netbsd*) 58378bf5c682Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 58388bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 58398bf5c682Smrg else 58408bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 58418bf5c682Smrg fi 58428bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 58438bf5c682Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 58448bf5c682Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58458bf5c682Smrg ;; 58468bf5c682Smrg 58478bf5c682Smrg newsos6) 58488bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 58498bf5c682Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 58508bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 58518bf5c682Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58528bf5c682Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58538bf5c682Smrg ;; 58548bf5c682Smrg 58558bf5c682Smrg *nto* | *qnx*) 58568bf5c682Smrg ;; 58578bf5c682Smrg 58588bf5c682Smrg openbsd* | bitrig*) 58598bf5c682Smrg if test -f /usr/libexec/ld.so; then 58608bf5c682Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 58618bf5c682Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58628bf5c682Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 58638bf5c682Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 58648bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 58658bf5c682Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 58668bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 58678bf5c682Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 58688bf5c682Smrg else 58698bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 58708bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 58718bf5c682Smrg fi 58728bf5c682Smrg else 58738bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 58748bf5c682Smrg fi 58758bf5c682Smrg ;; 58768bf5c682Smrg 58778bf5c682Smrg os2*) 58788bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 58798bf5c682Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 58808bf5c682Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 58818bf5c682Smrg shrext_cmds=.dll 58828bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 58838bf5c682Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 58848bf5c682Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 58858bf5c682Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 58868bf5c682Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 58878bf5c682Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 58888bf5c682Smrg emximp -o $lib $output_objdir/$libname.def' 58898bf5c682Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 58908bf5c682Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 58918bf5c682Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 58928bf5c682Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 58938bf5c682Smrg prefix_cmds="$SED"~ 58948bf5c682Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 58958bf5c682Smrg prefix_cmds="$prefix_cmds -e 1d"; 58968bf5c682Smrg fi~ 58978bf5c682Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 58988bf5c682Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 58998bf5c682Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 59008bf5c682Smrg emximp -o $lib $output_objdir/$libname.def' 59018bf5c682Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 59028bf5c682Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 59038bf5c682Smrg _LT_TAGVAR(file_list_spec, $1)='@' 59048bf5c682Smrg ;; 59058bf5c682Smrg 59068bf5c682Smrg osf3*) 59078bf5c682Smrg if test yes = "$GCC"; then 59088bf5c682Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 59098bf5c682Smrg _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' 59108bf5c682Smrg else 59118bf5c682Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 59128bf5c682Smrg _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' 59138bf5c682Smrg fi 59148bf5c682Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 59158bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 59168bf5c682Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 59178bf5c682Smrg ;; 59188bf5c682Smrg 59198bf5c682Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 59208bf5c682Smrg if test yes = "$GCC"; then 59218bf5c682Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 59228bf5c682Smrg _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' 59238bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 59248bf5c682Smrg else 59258bf5c682Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 59268bf5c682Smrg _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' 59278bf5c682Smrg _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~ 59288bf5c682Smrg $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' 59298bf5c682Smrg 59308bf5c682Smrg # Both c and cxx compiler support -rpath directly 59318bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 59328bf5c682Smrg fi 59338bf5c682Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 59348bf5c682Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 59358bf5c682Smrg ;; 59368bf5c682Smrg 59378bf5c682Smrg solaris*) 59388bf5c682Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 59398bf5c682Smrg if test yes = "$GCC"; then 59408bf5c682Smrg wlarc='$wl' 59418bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 59428bf5c682Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 59438bf5c682Smrg $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' 59448bf5c682Smrg else 59458bf5c682Smrg case `$CC -V 2>&1` in 59468bf5c682Smrg *"Compilers 5.0"*) 59478bf5c682Smrg wlarc='' 59488bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 59498bf5c682Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 59508bf5c682Smrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 59518bf5c682Smrg ;; 59528bf5c682Smrg *) 59538bf5c682Smrg wlarc='$wl' 59548bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 59558bf5c682Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 59568bf5c682Smrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 59578bf5c682Smrg ;; 59588bf5c682Smrg esac 59598bf5c682Smrg fi 59608bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 59618bf5c682Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59628bf5c682Smrg case $host_os in 59638bf5c682Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 59648bf5c682Smrg *) 59658bf5c682Smrg # The compiler driver will combine and reorder linker options, 59668bf5c682Smrg # but understands '-z linker_flag'. GCC discards it without '$wl', 59678bf5c682Smrg # but is careful enough not to reorder. 59688bf5c682Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 59698bf5c682Smrg if test yes = "$GCC"; then 59708bf5c682Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 59718bf5c682Smrg else 59728bf5c682Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 59738bf5c682Smrg fi 59748bf5c682Smrg ;; 59758bf5c682Smrg esac 59768bf5c682Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 59778bf5c682Smrg ;; 59788bf5c682Smrg 59798bf5c682Smrg sunos4*) 59808bf5c682Smrg if test sequent = "$host_vendor"; then 59818bf5c682Smrg # Use $CC to link under sequent, because it throws in some extra .o 59828bf5c682Smrg # files that make .init and .fini sections work. 59838bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 59848bf5c682Smrg else 59858bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 59868bf5c682Smrg fi 59878bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 59888bf5c682Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 59898bf5c682Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 59908bf5c682Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59918bf5c682Smrg ;; 59928bf5c682Smrg 59938bf5c682Smrg sysv4) 59948bf5c682Smrg case $host_vendor in 59958bf5c682Smrg sni) 59968bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 59978bf5c682Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 59988bf5c682Smrg ;; 59998bf5c682Smrg siemens) 60008bf5c682Smrg ## LD is ld it makes a PLAMLIB 60018bf5c682Smrg ## CC just makes a GrossModule. 60028bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 60038bf5c682Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 60048bf5c682Smrg _LT_TAGVAR(hardcode_direct, $1)=no 60058bf5c682Smrg ;; 60068bf5c682Smrg motorola) 60078bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60088bf5c682Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 60098bf5c682Smrg ;; 60108bf5c682Smrg esac 60118bf5c682Smrg runpath_var='LD_RUN_PATH' 60128bf5c682Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60138bf5c682Smrg ;; 60148bf5c682Smrg 60158bf5c682Smrg sysv4.3*) 60168bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60178bf5c682Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60188bf5c682Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 60198bf5c682Smrg ;; 60208bf5c682Smrg 60218bf5c682Smrg sysv4*MP*) 60228bf5c682Smrg if test -d /usr/nec; then 60238bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60248bf5c682Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60258bf5c682Smrg runpath_var=LD_RUN_PATH 60268bf5c682Smrg hardcode_runpath_var=yes 60278bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 60288bf5c682Smrg fi 60298bf5c682Smrg ;; 60308bf5c682Smrg 60318bf5c682Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 60328bf5c682Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 60338bf5c682Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 60348bf5c682Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60358bf5c682Smrg runpath_var='LD_RUN_PATH' 60368bf5c682Smrg 60378bf5c682Smrg if test yes = "$GCC"; then 60388bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60398bf5c682Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60408bf5c682Smrg else 60418bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60428bf5c682Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60438bf5c682Smrg fi 60448bf5c682Smrg ;; 60458bf5c682Smrg 60468bf5c682Smrg sysv5* | sco3.2v5* | sco5v6*) 60478bf5c682Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 60488bf5c682Smrg # link with -lc, and that would cause any symbols used from libc to 60498bf5c682Smrg # always be unresolved, which means just about no library would 60508bf5c682Smrg # ever link correctly. If we're not using GNU ld we use -z text 60518bf5c682Smrg # though, which does catch some bad symbols but isn't as heavy-handed 60528bf5c682Smrg # as -z defs. 60538bf5c682Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 60548bf5c682Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 60558bf5c682Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 60568bf5c682Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60578bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 60588bf5c682Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 60598bf5c682Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 60608bf5c682Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 60618bf5c682Smrg runpath_var='LD_RUN_PATH' 60628bf5c682Smrg 60638bf5c682Smrg if test yes = "$GCC"; then 60648bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60658bf5c682Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60668bf5c682Smrg else 60678bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60688bf5c682Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60698bf5c682Smrg fi 60708bf5c682Smrg ;; 60718bf5c682Smrg 60728bf5c682Smrg uts4*) 60738bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60748bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 60758bf5c682Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60768bf5c682Smrg ;; 60778bf5c682Smrg 60788bf5c682Smrg *) 60798bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60808bf5c682Smrg ;; 60818bf5c682Smrg esac 60828bf5c682Smrg 60838bf5c682Smrg if test sni = "$host_vendor"; then 60848bf5c682Smrg case $host in 60858bf5c682Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 60868bf5c682Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 60878bf5c682Smrg ;; 60888bf5c682Smrg esac 60898bf5c682Smrg fi 60908bf5c682Smrg fi 60918bf5c682Smrg]) 60928bf5c682SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 60938bf5c682Smrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 60948bf5c682Smrg 60958bf5c682Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 60968bf5c682Smrg 60978bf5c682Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 60988bf5c682Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 60998bf5c682Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 61008bf5c682Smrg [The commands to extract the exported symbol list from a shared archive]) 61018bf5c682Smrg 61028bf5c682Smrg# 61038bf5c682Smrg# Do we need to explicitly link libc? 61048bf5c682Smrg# 61058bf5c682Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 61068bf5c682Smrgx|xyes) 61078bf5c682Smrg # Assume -lc should be added 61088bf5c682Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 61098bf5c682Smrg 61108bf5c682Smrg if test yes,yes = "$GCC,$enable_shared"; then 61118bf5c682Smrg case $_LT_TAGVAR(archive_cmds, $1) in 61128bf5c682Smrg *'~'*) 61138bf5c682Smrg # FIXME: we may have to deal with multi-command sequences. 61148bf5c682Smrg ;; 61158bf5c682Smrg '$CC '*) 61168bf5c682Smrg # Test whether the compiler implicitly links with -lc since on some 61178bf5c682Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 61188bf5c682Smrg # to ld, don't add -lc before -lgcc. 61198bf5c682Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 61208bf5c682Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 61218bf5c682Smrg [$RM conftest* 61228bf5c682Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 61238bf5c682Smrg 61248bf5c682Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 61258bf5c682Smrg soname=conftest 61268bf5c682Smrg lib=conftest 61278bf5c682Smrg libobjs=conftest.$ac_objext 61288bf5c682Smrg deplibs= 61298bf5c682Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 61308bf5c682Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 61318bf5c682Smrg compiler_flags=-v 61328bf5c682Smrg linker_flags=-v 61338bf5c682Smrg verstring= 61348bf5c682Smrg output_objdir=. 61358bf5c682Smrg libname=conftest 61368bf5c682Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 61378bf5c682Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 61388bf5c682Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 61398bf5c682Smrg then 61408bf5c682Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 61418bf5c682Smrg else 61428bf5c682Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 61438bf5c682Smrg fi 61448bf5c682Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 61458bf5c682Smrg else 61468bf5c682Smrg cat conftest.err 1>&5 61478bf5c682Smrg fi 61488bf5c682Smrg $RM conftest* 61498bf5c682Smrg ]) 61508bf5c682Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 61518bf5c682Smrg ;; 61528bf5c682Smrg esac 61538bf5c682Smrg fi 61548bf5c682Smrg ;; 61558bf5c682Smrgesac 61568bf5c682Smrg 61578bf5c682Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 61588bf5c682Smrg [Whether or not to add -lc for building shared libraries]) 61598bf5c682Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 61608bf5c682Smrg [enable_shared_with_static_runtimes], [0], 61618bf5c682Smrg [Whether or not to disallow shared libs when runtime libs are static]) 61628bf5c682Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 61638bf5c682Smrg [Compiler flag to allow reflexive dlopens]) 61648bf5c682Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 61658bf5c682Smrg [Compiler flag to generate shared objects directly from archives]) 61668bf5c682Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 61678bf5c682Smrg [Whether the compiler copes with passing no objects directly]) 61688bf5c682Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 61698bf5c682Smrg [Create an old-style archive from a shared archive]) 61708bf5c682Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 61718bf5c682Smrg [Create a temporary old-style archive to link instead of a shared archive]) 61728bf5c682Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 61738bf5c682Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 61748bf5c682Smrg_LT_TAGDECL([], [module_cmds], [2], 61758bf5c682Smrg [Commands used to build a loadable module if different from building 61768bf5c682Smrg a shared archive.]) 61778bf5c682Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 61788bf5c682Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 61798bf5c682Smrg [Whether we are building with GNU ld or not]) 61808bf5c682Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 61818bf5c682Smrg [Flag that allows shared libraries with undefined symbols to be built]) 61828bf5c682Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 61838bf5c682Smrg [Flag that enforces no undefined symbols]) 61848bf5c682Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 61858bf5c682Smrg [Flag to hardcode $libdir into a binary during linking. 61868bf5c682Smrg This must work even if $libdir does not exist]) 61878bf5c682Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 61888bf5c682Smrg [Whether we need a single "-rpath" flag with a separated argument]) 61898bf5c682Smrg_LT_TAGDECL([], [hardcode_direct], [0], 61908bf5c682Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 61918bf5c682Smrg DIR into the resulting binary]) 61928bf5c682Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 61938bf5c682Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 61948bf5c682Smrg DIR into the resulting binary and the resulting library dependency is 61958bf5c682Smrg "absolute", i.e impossible to change by setting $shlibpath_var if the 61968bf5c682Smrg library is relocated]) 61978bf5c682Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 61988bf5c682Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 61998bf5c682Smrg into the resulting binary]) 62008bf5c682Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 62018bf5c682Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 62028bf5c682Smrg into the resulting binary]) 62038bf5c682Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 62048bf5c682Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 62058bf5c682Smrg into the library and all subsequent libraries and executables linked 62068bf5c682Smrg against it]) 62078bf5c682Smrg_LT_TAGDECL([], [inherit_rpath], [0], 62088bf5c682Smrg [Set to yes if linker adds runtime paths of dependent libraries 62098bf5c682Smrg to runtime path list]) 62108bf5c682Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 62118bf5c682Smrg [Whether libtool must link a program against all its dependency libraries]) 62128bf5c682Smrg_LT_TAGDECL([], [always_export_symbols], [0], 62138bf5c682Smrg [Set to "yes" if exported symbols are required]) 62148bf5c682Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 62158bf5c682Smrg [The commands to list exported symbols]) 62168bf5c682Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 62178bf5c682Smrg [Symbols that should not be listed in the preloaded symbols]) 62188bf5c682Smrg_LT_TAGDECL([], [include_expsyms], [1], 62198bf5c682Smrg [Symbols that must always be exported]) 62208bf5c682Smrg_LT_TAGDECL([], [prelink_cmds], [2], 62218bf5c682Smrg [Commands necessary for linking programs (against libraries) with templates]) 62228bf5c682Smrg_LT_TAGDECL([], [postlink_cmds], [2], 62238bf5c682Smrg [Commands necessary for finishing linking programs]) 62248bf5c682Smrg_LT_TAGDECL([], [file_list_spec], [1], 62258bf5c682Smrg [Specify filename containing input files]) 62268bf5c682Smrgdnl FIXME: Not yet implemented 62278bf5c682Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 62288bf5c682Smrgdnl [Compiler flag to generate thread safe objects]) 62298bf5c682Smrg])# _LT_LINKER_SHLIBS 62308bf5c682Smrg 62318bf5c682Smrg 62328bf5c682Smrg# _LT_LANG_C_CONFIG([TAG]) 62338bf5c682Smrg# ------------------------ 62348bf5c682Smrg# Ensure that the configuration variables for a C compiler are suitably 62358bf5c682Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 62368bf5c682Smrg# the compiler configuration to 'libtool'. 62378bf5c682Smrgm4_defun([_LT_LANG_C_CONFIG], 62388bf5c682Smrg[m4_require([_LT_DECL_EGREP])dnl 62398bf5c682Smrglt_save_CC=$CC 62408bf5c682SmrgAC_LANG_PUSH(C) 62418bf5c682Smrg 62428bf5c682Smrg# Source file extension for C test sources. 62438bf5c682Smrgac_ext=c 62448bf5c682Smrg 62458bf5c682Smrg# Object file extension for compiled C test sources. 62468bf5c682Smrgobjext=o 62478bf5c682Smrg_LT_TAGVAR(objext, $1)=$objext 62488bf5c682Smrg 62498bf5c682Smrg# Code to be used in simple compile tests 62508bf5c682Smrglt_simple_compile_test_code="int some_variable = 0;" 62518bf5c682Smrg 62528bf5c682Smrg# Code to be used in simple link tests 62538bf5c682Smrglt_simple_link_test_code='int main(){return(0);}' 62548bf5c682Smrg 62558bf5c682Smrg_LT_TAG_COMPILER 62568bf5c682Smrg# Save the default compiler, since it gets overwritten when the other 62578bf5c682Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 62588bf5c682Smrgcompiler_DEFAULT=$CC 62598bf5c682Smrg 62608bf5c682Smrg# save warnings/boilerplate of simple test code 62618bf5c682Smrg_LT_COMPILER_BOILERPLATE 62628bf5c682Smrg_LT_LINKER_BOILERPLATE 62638bf5c682Smrg 62648bf5c682Smrg## CAVEAT EMPTOR: 62658bf5c682Smrg## There is no encapsulation within the following macros, do not change 62668bf5c682Smrg## the running order or otherwise move them around unless you know exactly 62678bf5c682Smrg## what you are doing... 62688bf5c682Smrgif test -n "$compiler"; then 62698bf5c682Smrg _LT_COMPILER_NO_RTTI($1) 62708bf5c682Smrg _LT_COMPILER_PIC($1) 62718bf5c682Smrg _LT_COMPILER_C_O($1) 62728bf5c682Smrg _LT_COMPILER_FILE_LOCKS($1) 62738bf5c682Smrg _LT_LINKER_SHLIBS($1) 62748bf5c682Smrg _LT_SYS_DYNAMIC_LINKER($1) 62758bf5c682Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 62768bf5c682Smrg LT_SYS_DLOPEN_SELF 62778bf5c682Smrg _LT_CMD_STRIPLIB 62788bf5c682Smrg 62798bf5c682Smrg # Report what library types will actually be built 62808bf5c682Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 62818bf5c682Smrg AC_MSG_RESULT([$can_build_shared]) 62828bf5c682Smrg 62838bf5c682Smrg AC_MSG_CHECKING([whether to build shared libraries]) 62848bf5c682Smrg test no = "$can_build_shared" && enable_shared=no 62858bf5c682Smrg 62868bf5c682Smrg # On AIX, shared libraries and static libraries use the same namespace, and 62878bf5c682Smrg # are all built from PIC. 62888bf5c682Smrg case $host_os in 62898bf5c682Smrg aix3*) 62908bf5c682Smrg test yes = "$enable_shared" && enable_static=no 62918bf5c682Smrg if test -n "$RANLIB"; then 62928bf5c682Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 62938bf5c682Smrg postinstall_cmds='$RANLIB $lib' 62948bf5c682Smrg fi 62958bf5c682Smrg ;; 62968bf5c682Smrg 62978bf5c682Smrg aix[[4-9]]*) 62988bf5c682Smrg if test ia64 != "$host_cpu"; then 62998bf5c682Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 63008bf5c682Smrg yes,aix,yes) ;; # shared object as lib.so file only 63018bf5c682Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 63028bf5c682Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 63038bf5c682Smrg esac 63048bf5c682Smrg fi 63058bf5c682Smrg ;; 63068bf5c682Smrg esac 63078bf5c682Smrg AC_MSG_RESULT([$enable_shared]) 63088bf5c682Smrg 63098bf5c682Smrg AC_MSG_CHECKING([whether to build static libraries]) 63108bf5c682Smrg # Make sure either enable_shared or enable_static is yes. 63118bf5c682Smrg test yes = "$enable_shared" || enable_static=yes 63128bf5c682Smrg AC_MSG_RESULT([$enable_static]) 63138bf5c682Smrg 63148bf5c682Smrg _LT_CONFIG($1) 63158bf5c682Smrgfi 63168bf5c682SmrgAC_LANG_POP 63178bf5c682SmrgCC=$lt_save_CC 63188bf5c682Smrg])# _LT_LANG_C_CONFIG 63198bf5c682Smrg 63208bf5c682Smrg 63218bf5c682Smrg# _LT_LANG_CXX_CONFIG([TAG]) 63228bf5c682Smrg# -------------------------- 63238bf5c682Smrg# Ensure that the configuration variables for a C++ compiler are suitably 63248bf5c682Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 63258bf5c682Smrg# the compiler configuration to 'libtool'. 63268bf5c682Smrgm4_defun([_LT_LANG_CXX_CONFIG], 63278bf5c682Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 63288bf5c682Smrgm4_require([_LT_DECL_EGREP])dnl 63298bf5c682Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 63308bf5c682Smrgif test -n "$CXX" && ( test no != "$CXX" && 63318bf5c682Smrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 63328bf5c682Smrg (test g++ != "$CXX"))); then 63338bf5c682Smrg AC_PROG_CXXCPP 63348bf5c682Smrgelse 63358bf5c682Smrg _lt_caught_CXX_error=yes 63368bf5c682Smrgfi 63378bf5c682Smrg 63388bf5c682SmrgAC_LANG_PUSH(C++) 63398bf5c682Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 63408bf5c682Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 63418bf5c682Smrg_LT_TAGVAR(always_export_symbols, $1)=no 63428bf5c682Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 63438bf5c682Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 63448bf5c682Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 63458bf5c682Smrg_LT_TAGVAR(hardcode_direct, $1)=no 63468bf5c682Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 63478bf5c682Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 63488bf5c682Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 63498bf5c682Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 63508bf5c682Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 63518bf5c682Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 63528bf5c682Smrg_LT_TAGVAR(inherit_rpath, $1)=no 63538bf5c682Smrg_LT_TAGVAR(module_cmds, $1)= 63548bf5c682Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 63558bf5c682Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 63568bf5c682Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 63578bf5c682Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 63588bf5c682Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 63598bf5c682Smrg_LT_TAGVAR(no_undefined_flag, $1)= 63608bf5c682Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 63618bf5c682Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 63628bf5c682Smrg 63638bf5c682Smrg# Source file extension for C++ test sources. 63648bf5c682Smrgac_ext=cpp 63658bf5c682Smrg 63668bf5c682Smrg# Object file extension for compiled C++ test sources. 63678bf5c682Smrgobjext=o 63688bf5c682Smrg_LT_TAGVAR(objext, $1)=$objext 63698bf5c682Smrg 63708bf5c682Smrg# No sense in running all these tests if we already determined that 63718bf5c682Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 63728bf5c682Smrg# are currently assumed to apply to all compilers on this platform, 63738bf5c682Smrg# and will be corrupted by setting them based on a non-working compiler. 63748bf5c682Smrgif test yes != "$_lt_caught_CXX_error"; then 63758bf5c682Smrg # Code to be used in simple compile tests 63768bf5c682Smrg lt_simple_compile_test_code="int some_variable = 0;" 63778bf5c682Smrg 63788bf5c682Smrg # Code to be used in simple link tests 63798bf5c682Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 63808bf5c682Smrg 63818bf5c682Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 63828bf5c682Smrg _LT_TAG_COMPILER 63838bf5c682Smrg 63848bf5c682Smrg # save warnings/boilerplate of simple test code 63858bf5c682Smrg _LT_COMPILER_BOILERPLATE 63868bf5c682Smrg _LT_LINKER_BOILERPLATE 63878bf5c682Smrg 63888bf5c682Smrg # Allow CC to be a program name with arguments. 63898bf5c682Smrg lt_save_CC=$CC 63908bf5c682Smrg lt_save_CFLAGS=$CFLAGS 63918bf5c682Smrg lt_save_LD=$LD 63928bf5c682Smrg lt_save_GCC=$GCC 63938bf5c682Smrg GCC=$GXX 63948bf5c682Smrg lt_save_with_gnu_ld=$with_gnu_ld 63958bf5c682Smrg lt_save_path_LD=$lt_cv_path_LD 63968bf5c682Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 63978bf5c682Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 63988bf5c682Smrg else 63998bf5c682Smrg $as_unset lt_cv_prog_gnu_ld 64008bf5c682Smrg fi 64018bf5c682Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 64028bf5c682Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 64038bf5c682Smrg else 64048bf5c682Smrg $as_unset lt_cv_path_LD 64058bf5c682Smrg fi 64068bf5c682Smrg test -z "${LDCXX+set}" || LD=$LDCXX 64078bf5c682Smrg CC=${CXX-"c++"} 64088bf5c682Smrg CFLAGS=$CXXFLAGS 64098bf5c682Smrg compiler=$CC 64108bf5c682Smrg _LT_TAGVAR(compiler, $1)=$CC 64118bf5c682Smrg _LT_CC_BASENAME([$compiler]) 64128bf5c682Smrg 64138bf5c682Smrg if test -n "$compiler"; then 64148bf5c682Smrg # We don't want -fno-exception when compiling C++ code, so set the 64158bf5c682Smrg # no_builtin_flag separately 64168bf5c682Smrg if test yes = "$GXX"; then 64178bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 64188bf5c682Smrg else 64198bf5c682Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 64208bf5c682Smrg fi 64218bf5c682Smrg 64228bf5c682Smrg if test yes = "$GXX"; then 64238bf5c682Smrg # Set up default GNU C++ configuration 64248bf5c682Smrg 64258bf5c682Smrg LT_PATH_LD 64268bf5c682Smrg 64278bf5c682Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 64288bf5c682Smrg # archiving commands below assume that GNU ld is being used. 64298bf5c682Smrg if test yes = "$with_gnu_ld"; then 64308bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 64318bf5c682Smrg _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' 64328bf5c682Smrg 64338bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 64348bf5c682Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 64358bf5c682Smrg 64368bf5c682Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 64378bf5c682Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 64388bf5c682Smrg # investigate it a little bit more. (MM) 64398bf5c682Smrg wlarc='$wl' 64408bf5c682Smrg 64418bf5c682Smrg # ancient GNU ld didn't support --whole-archive et. al. 64428bf5c682Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 64438bf5c682Smrg $GREP 'no-whole-archive' > /dev/null; then 64448bf5c682Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 64458bf5c682Smrg else 64468bf5c682Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 64478bf5c682Smrg fi 64488bf5c682Smrg else 64498bf5c682Smrg with_gnu_ld=no 64508bf5c682Smrg wlarc= 64518bf5c682Smrg 64528bf5c682Smrg # A generic and very simple default shared library creation 64538bf5c682Smrg # command for GNU C++ for the case where it uses the native 64548bf5c682Smrg # linker, instead of GNU ld. If possible, this setting should 64558bf5c682Smrg # overridden to take advantage of the native linker features on 64568bf5c682Smrg # the platform it is being used on. 64578bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 64588bf5c682Smrg fi 64598bf5c682Smrg 64608bf5c682Smrg # Commands to make compiler produce verbose output that lists 64618bf5c682Smrg # what "hidden" libraries, object files and flags are used when 64628bf5c682Smrg # linking a shared library. 64638bf5c682Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 64648bf5c682Smrg 64658bf5c682Smrg else 64668bf5c682Smrg GXX=no 64678bf5c682Smrg with_gnu_ld=no 64688bf5c682Smrg wlarc= 64698bf5c682Smrg fi 64708bf5c682Smrg 64718bf5c682Smrg # PORTME: fill in a description of your system's C++ link characteristics 64728bf5c682Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 64738bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 64748bf5c682Smrg case $host_os in 64758bf5c682Smrg aix3*) 64768bf5c682Smrg # FIXME: insert proper C++ library support 64778bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 64788bf5c682Smrg ;; 64798bf5c682Smrg aix[[4-9]]*) 64808bf5c682Smrg if test ia64 = "$host_cpu"; then 64818bf5c682Smrg # On IA64, the linker does run time linking by default, so we don't 64828bf5c682Smrg # have to do anything special. 64838bf5c682Smrg aix_use_runtimelinking=no 64848bf5c682Smrg exp_sym_flag='-Bexport' 64858bf5c682Smrg no_entry_flag= 64868bf5c682Smrg else 64878bf5c682Smrg aix_use_runtimelinking=no 64888bf5c682Smrg 64898bf5c682Smrg # Test if we are trying to use run time linking or normal 64908bf5c682Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 64918bf5c682Smrg # have runtime linking enabled, and use it for executables. 64928bf5c682Smrg # For shared libraries, we enable/disable runtime linking 64938bf5c682Smrg # depending on the kind of the shared library created - 64948bf5c682Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 64958bf5c682Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 64968bf5c682Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 64978bf5c682Smrg # lib.a static archive 64988bf5c682Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 64998bf5c682Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 65008bf5c682Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 65018bf5c682Smrg # lib.a(lib.so.V) shared, rtl:no 65028bf5c682Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 65038bf5c682Smrg # lib.a static archive 65048bf5c682Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 65058bf5c682Smrg for ld_flag in $LDFLAGS; do 65068bf5c682Smrg case $ld_flag in 65078bf5c682Smrg *-brtl*) 65088bf5c682Smrg aix_use_runtimelinking=yes 65098bf5c682Smrg break 65108bf5c682Smrg ;; 65118bf5c682Smrg esac 65128bf5c682Smrg done 65138bf5c682Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 65148bf5c682Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 65158bf5c682Smrg # so we don't have lib.a shared libs to link our executables. 65168bf5c682Smrg # We have to force runtime linking in this case. 65178bf5c682Smrg aix_use_runtimelinking=yes 65188bf5c682Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 65198bf5c682Smrg fi 65208bf5c682Smrg ;; 65218bf5c682Smrg esac 65228bf5c682Smrg 65238bf5c682Smrg exp_sym_flag='-bexport' 65248bf5c682Smrg no_entry_flag='-bnoentry' 65258bf5c682Smrg fi 65268bf5c682Smrg 65278bf5c682Smrg # When large executables or shared objects are built, AIX ld can 65288bf5c682Smrg # have problems creating the table of contents. If linking a library 65298bf5c682Smrg # or program results in "error TOC overflow" add -mminimal-toc to 65308bf5c682Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 65318bf5c682Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 65328bf5c682Smrg 65338bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='' 65348bf5c682Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 65358bf5c682Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 65368bf5c682Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 65378bf5c682Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 65388bf5c682Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 65398bf5c682Smrg case $with_aix_soname,$aix_use_runtimelinking in 65408bf5c682Smrg aix,*) ;; # no import file 65418bf5c682Smrg svr4,* | *,yes) # use import file 65428bf5c682Smrg # The Import File defines what to hardcode. 65438bf5c682Smrg _LT_TAGVAR(hardcode_direct, $1)=no 65448bf5c682Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 65458bf5c682Smrg ;; 65468bf5c682Smrg esac 65478bf5c682Smrg 65488bf5c682Smrg if test yes = "$GXX"; then 65498bf5c682Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 65508bf5c682Smrg # We only want to do this on AIX 4.2 and lower, the check 65518bf5c682Smrg # below for broken collect2 doesn't work under 4.3+ 65528bf5c682Smrg collect2name=`$CC -print-prog-name=collect2` 65538bf5c682Smrg if test -f "$collect2name" && 65548bf5c682Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 65558bf5c682Smrg then 65568bf5c682Smrg # We have reworked collect2 65578bf5c682Smrg : 65588bf5c682Smrg else 65598bf5c682Smrg # We have old collect2 65608bf5c682Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 65618bf5c682Smrg # It fails to find uninstalled libraries when the uninstalled 65628bf5c682Smrg # path is not listed in the libpath. Setting hardcode_minus_L 65638bf5c682Smrg # to unsupported forces relinking 65648bf5c682Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 65658bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 65668bf5c682Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 65678bf5c682Smrg fi 65688bf5c682Smrg esac 65698bf5c682Smrg shared_flag='-shared' 65708bf5c682Smrg if test yes = "$aix_use_runtimelinking"; then 65718bf5c682Smrg shared_flag=$shared_flag' $wl-G' 65728bf5c682Smrg fi 65738bf5c682Smrg # Need to ensure runtime linking is disabled for the traditional 65748bf5c682Smrg # shared library, or the linker may eventually find shared libraries 65758bf5c682Smrg # /with/ Import File - we do not want to mix them. 65768bf5c682Smrg shared_flag_aix='-shared' 65778bf5c682Smrg shared_flag_svr4='-shared $wl-G' 65788bf5c682Smrg else 65798bf5c682Smrg # not using gcc 65808bf5c682Smrg if test ia64 = "$host_cpu"; then 65818bf5c682Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 65828bf5c682Smrg # chokes on -Wl,-G. The following line is correct: 65838bf5c682Smrg shared_flag='-G' 65848bf5c682Smrg else 65858bf5c682Smrg if test yes = "$aix_use_runtimelinking"; then 65868bf5c682Smrg shared_flag='$wl-G' 65878bf5c682Smrg else 65888bf5c682Smrg shared_flag='$wl-bM:SRE' 65898bf5c682Smrg fi 65908bf5c682Smrg shared_flag_aix='$wl-bM:SRE' 65918bf5c682Smrg shared_flag_svr4='$wl-G' 65928bf5c682Smrg fi 65938bf5c682Smrg fi 65948bf5c682Smrg 65958bf5c682Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 65968bf5c682Smrg # It seems that -bexpall does not export symbols beginning with 65978bf5c682Smrg # underscore (_), so it is better to generate a list of symbols to 65988bf5c682Smrg # export. 65998bf5c682Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 66008bf5c682Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 66018bf5c682Smrg # Warning - without using the other runtime loading flags (-brtl), 66028bf5c682Smrg # -berok will link without error, but may produce a broken library. 66038bf5c682Smrg # The "-G" linker flag allows undefined symbols. 66048bf5c682Smrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 66058bf5c682Smrg # Determine the default libpath from the value encoded in an empty 66068bf5c682Smrg # executable. 66078bf5c682Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 66088bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 66098bf5c682Smrg 66108bf5c682Smrg _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 66118bf5c682Smrg else 66128bf5c682Smrg if test ia64 = "$host_cpu"; then 66138bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 66148bf5c682Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 66158bf5c682Smrg _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" 66168bf5c682Smrg else 66178bf5c682Smrg # Determine the default libpath from the value encoded in an 66188bf5c682Smrg # empty executable. 66198bf5c682Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 66208bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 66218bf5c682Smrg # Warning - without using the other run time loading flags, 66228bf5c682Smrg # -berok will link without error, but may produce a broken library. 66238bf5c682Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 66248bf5c682Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 66258bf5c682Smrg if test yes = "$with_gnu_ld"; then 66268bf5c682Smrg # We only use this code for GNU lds that support --whole-archive. 66278bf5c682Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 66288bf5c682Smrg else 66298bf5c682Smrg # Exported symbols can be pulled into shared objects from archives 66308bf5c682Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 66318bf5c682Smrg fi 66328bf5c682Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 66338bf5c682Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 66348bf5c682Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 66358bf5c682Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 66368bf5c682Smrg if test svr4 != "$with_aix_soname"; then 66378bf5c682Smrg # This is similar to how AIX traditionally builds its shared 66388bf5c682Smrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 66398bf5c682Smrg _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' 66408bf5c682Smrg fi 66418bf5c682Smrg if test aix != "$with_aix_soname"; then 66428bf5c682Smrg _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' 66438bf5c682Smrg else 66448bf5c682Smrg # used by -dlpreopen to get the symbols 66458bf5c682Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 66468bf5c682Smrg fi 66478bf5c682Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 66488bf5c682Smrg fi 66498bf5c682Smrg fi 66508bf5c682Smrg ;; 66518bf5c682Smrg 66528bf5c682Smrg beos*) 66538bf5c682Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 66548bf5c682Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 66558bf5c682Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 66568bf5c682Smrg # support --undefined. This deserves some investigation. FIXME 66578bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 66588bf5c682Smrg else 66598bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66608bf5c682Smrg fi 66618bf5c682Smrg ;; 66628bf5c682Smrg 66638bf5c682Smrg chorus*) 66648bf5c682Smrg case $cc_basename in 66658bf5c682Smrg *) 66668bf5c682Smrg # FIXME: insert proper C++ library support 66678bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66688bf5c682Smrg ;; 66698bf5c682Smrg esac 66708bf5c682Smrg ;; 66718bf5c682Smrg 66728bf5c682Smrg cygwin* | mingw* | pw32* | cegcc*) 66738bf5c682Smrg case $GXX,$cc_basename in 66740a1d3ae0Smrg ,cl* | no,cl* | ,icl* | no,icl*) 66750a1d3ae0Smrg # Native MSVC or ICC 66768bf5c682Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 66778bf5c682Smrg # no search path for DLLs. 66788bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 66798bf5c682Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 66808bf5c682Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 66818bf5c682Smrg _LT_TAGVAR(file_list_spec, $1)='@' 66828bf5c682Smrg # Tell ltmain to make .lib files, not .a files. 66838bf5c682Smrg libext=lib 66848bf5c682Smrg # Tell ltmain to make .dll files, not .so files. 66858bf5c682Smrg shrext_cmds=.dll 66868bf5c682Smrg # FIXME: Setting linknames here is a bad hack. 66878bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 66888bf5c682Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 66898bf5c682Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 66908bf5c682Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 66918bf5c682Smrg else 66928bf5c682Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 66938bf5c682Smrg fi~ 66948bf5c682Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 66958bf5c682Smrg linknames=' 66968bf5c682Smrg # The linker will not automatically build a static lib if we build a DLL. 66978bf5c682Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 66988bf5c682Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 66998bf5c682Smrg # Don't use ranlib 67008bf5c682Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 67018bf5c682Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 67028bf5c682Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 67038bf5c682Smrg case $lt_outputfile in 67048bf5c682Smrg *.exe|*.EXE) ;; 67058bf5c682Smrg *) 67068bf5c682Smrg lt_outputfile=$lt_outputfile.exe 67078bf5c682Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 67088bf5c682Smrg ;; 67098bf5c682Smrg esac~ 67108bf5c682Smrg func_to_tool_file "$lt_outputfile"~ 67118bf5c682Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 67128bf5c682Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 67138bf5c682Smrg $RM "$lt_outputfile.manifest"; 67148bf5c682Smrg fi' 67158bf5c682Smrg ;; 67168bf5c682Smrg *) 67178bf5c682Smrg # g++ 67188bf5c682Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 67198bf5c682Smrg # as there is no search path for DLLs. 67208bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 67218bf5c682Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 67228bf5c682Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 67238bf5c682Smrg _LT_TAGVAR(always_export_symbols, $1)=no 67248bf5c682Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 67258bf5c682Smrg 67268bf5c682Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 67278bf5c682Smrg _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' 67288bf5c682Smrg # If the export-symbols file already is a .def file, use it as 67298bf5c682Smrg # is; otherwise, prepend EXPORTS... 67308bf5c682Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 67318bf5c682Smrg cp $export_symbols $output_objdir/$soname.def; 67328bf5c682Smrg else 67338bf5c682Smrg echo EXPORTS > $output_objdir/$soname.def; 67348bf5c682Smrg cat $export_symbols >> $output_objdir/$soname.def; 67358bf5c682Smrg fi~ 67368bf5c682Smrg $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' 67378bf5c682Smrg else 67388bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67398bf5c682Smrg fi 67408bf5c682Smrg ;; 67418bf5c682Smrg esac 67428bf5c682Smrg ;; 67438bf5c682Smrg darwin* | rhapsody*) 67448bf5c682Smrg _LT_DARWIN_LINKER_FEATURES($1) 67458bf5c682Smrg ;; 67468bf5c682Smrg 67478bf5c682Smrg os2*) 67488bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 67498bf5c682Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 67508bf5c682Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 67518bf5c682Smrg shrext_cmds=.dll 67528bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 67538bf5c682Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 67548bf5c682Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 67558bf5c682Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 67568bf5c682Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 67578bf5c682Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 67588bf5c682Smrg emximp -o $lib $output_objdir/$libname.def' 67598bf5c682Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 67608bf5c682Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 67618bf5c682Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 67628bf5c682Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 67638bf5c682Smrg prefix_cmds="$SED"~ 67648bf5c682Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 67658bf5c682Smrg prefix_cmds="$prefix_cmds -e 1d"; 67668bf5c682Smrg fi~ 67678bf5c682Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 67688bf5c682Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 67698bf5c682Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 67708bf5c682Smrg emximp -o $lib $output_objdir/$libname.def' 67718bf5c682Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 67728bf5c682Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 67738bf5c682Smrg _LT_TAGVAR(file_list_spec, $1)='@' 67748bf5c682Smrg ;; 67758bf5c682Smrg 67768bf5c682Smrg dgux*) 67778bf5c682Smrg case $cc_basename in 67788bf5c682Smrg ec++*) 67798bf5c682Smrg # FIXME: insert proper C++ library support 67808bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67818bf5c682Smrg ;; 67828bf5c682Smrg ghcx*) 67838bf5c682Smrg # Green Hills C++ Compiler 67848bf5c682Smrg # FIXME: insert proper C++ library support 67858bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67868bf5c682Smrg ;; 67878bf5c682Smrg *) 67888bf5c682Smrg # FIXME: insert proper C++ library support 67898bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67908bf5c682Smrg ;; 67918bf5c682Smrg esac 67928bf5c682Smrg ;; 67938bf5c682Smrg 67948bf5c682Smrg freebsd2.*) 67958bf5c682Smrg # C++ shared libraries reported to be fairly broken before 67968bf5c682Smrg # switch to ELF 67978bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67988bf5c682Smrg ;; 67998bf5c682Smrg 68008bf5c682Smrg freebsd-elf*) 68018bf5c682Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 68028bf5c682Smrg ;; 68038bf5c682Smrg 68040a1d3ae0Smrg freebsd* | dragonfly* | midnightbsd*) 68058bf5c682Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 68068bf5c682Smrg # conventions 68078bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 68088bf5c682Smrg ;; 68098bf5c682Smrg 68108bf5c682Smrg haiku*) 68118bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 68128bf5c682Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 68138bf5c682Smrg ;; 68148bf5c682Smrg 68158bf5c682Smrg hpux9*) 68168bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 68178bf5c682Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 68188bf5c682Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 68198bf5c682Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 68208bf5c682Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 68218bf5c682Smrg # but as the default 68228bf5c682Smrg # location of the library. 68238bf5c682Smrg 68248bf5c682Smrg case $cc_basename in 68258bf5c682Smrg CC*) 68268bf5c682Smrg # FIXME: insert proper C++ library support 68278bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68288bf5c682Smrg ;; 68298bf5c682Smrg aCC*) 68308bf5c682Smrg _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' 68318bf5c682Smrg # Commands to make compiler produce verbose output that lists 68328bf5c682Smrg # what "hidden" libraries, object files and flags are used when 68338bf5c682Smrg # linking a shared library. 68348bf5c682Smrg # 68358bf5c682Smrg # There doesn't appear to be a way to prevent this compiler from 68368bf5c682Smrg # explicitly linking system object files so we need to strip them 68378bf5c682Smrg # from the output so that they don't get included in the library 68388bf5c682Smrg # dependencies. 68398bf5c682Smrg 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"' 68408bf5c682Smrg ;; 68418bf5c682Smrg *) 68428bf5c682Smrg if test yes = "$GXX"; then 68438bf5c682Smrg _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' 68448bf5c682Smrg else 68458bf5c682Smrg # FIXME: insert proper C++ library support 68468bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68478bf5c682Smrg fi 68488bf5c682Smrg ;; 68498bf5c682Smrg esac 68508bf5c682Smrg ;; 68518bf5c682Smrg 68528bf5c682Smrg hpux10*|hpux11*) 68538bf5c682Smrg if test no = "$with_gnu_ld"; then 68548bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 68558bf5c682Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 68568bf5c682Smrg 68578bf5c682Smrg case $host_cpu in 68588bf5c682Smrg hppa*64*|ia64*) 68598bf5c682Smrg ;; 68608bf5c682Smrg *) 68618bf5c682Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 68628bf5c682Smrg ;; 68638bf5c682Smrg esac 68648bf5c682Smrg fi 68658bf5c682Smrg case $host_cpu in 68668bf5c682Smrg hppa*64*|ia64*) 68678bf5c682Smrg _LT_TAGVAR(hardcode_direct, $1)=no 68688bf5c682Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 68698bf5c682Smrg ;; 68708bf5c682Smrg *) 68718bf5c682Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 68728bf5c682Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 68738bf5c682Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 68748bf5c682Smrg # but as the default 68758bf5c682Smrg # location of the library. 68768bf5c682Smrg ;; 68778bf5c682Smrg esac 68788bf5c682Smrg 68798bf5c682Smrg case $cc_basename in 68808bf5c682Smrg CC*) 68818bf5c682Smrg # FIXME: insert proper C++ library support 68828bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68838bf5c682Smrg ;; 68848bf5c682Smrg aCC*) 68858bf5c682Smrg case $host_cpu in 68868bf5c682Smrg hppa*64*) 68878bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 68888bf5c682Smrg ;; 68898bf5c682Smrg ia64*) 68908bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 68918bf5c682Smrg ;; 68928bf5c682Smrg *) 68938bf5c682Smrg _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' 68948bf5c682Smrg ;; 68958bf5c682Smrg esac 68968bf5c682Smrg # Commands to make compiler produce verbose output that lists 68978bf5c682Smrg # what "hidden" libraries, object files and flags are used when 68988bf5c682Smrg # linking a shared library. 68998bf5c682Smrg # 69008bf5c682Smrg # There doesn't appear to be a way to prevent this compiler from 69018bf5c682Smrg # explicitly linking system object files so we need to strip them 69028bf5c682Smrg # from the output so that they don't get included in the library 69038bf5c682Smrg # dependencies. 69048bf5c682Smrg 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"' 69058bf5c682Smrg ;; 69068bf5c682Smrg *) 69078bf5c682Smrg if test yes = "$GXX"; then 69088bf5c682Smrg if test no = "$with_gnu_ld"; then 69098bf5c682Smrg case $host_cpu in 69108bf5c682Smrg hppa*64*) 69118bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 69128bf5c682Smrg ;; 69138bf5c682Smrg ia64*) 69148bf5c682Smrg _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' 69158bf5c682Smrg ;; 69168bf5c682Smrg *) 69178bf5c682Smrg _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' 69188bf5c682Smrg ;; 69198bf5c682Smrg esac 69208bf5c682Smrg fi 69218bf5c682Smrg else 69228bf5c682Smrg # FIXME: insert proper C++ library support 69238bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 69248bf5c682Smrg fi 69258bf5c682Smrg ;; 69268bf5c682Smrg esac 69278bf5c682Smrg ;; 69288bf5c682Smrg 69298bf5c682Smrg interix[[3-9]]*) 69308bf5c682Smrg _LT_TAGVAR(hardcode_direct, $1)=no 69318bf5c682Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 69328bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 69338bf5c682Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 69348bf5c682Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 69358bf5c682Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 69368bf5c682Smrg # default) and relocated if they conflict, which is a slow very memory 69378bf5c682Smrg # consuming and fragmenting process. To avoid this, we pick a random, 69388bf5c682Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 69398bf5c682Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 69408bf5c682Smrg _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' 69410a1d3ae0Smrg _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' 69428bf5c682Smrg ;; 69438bf5c682Smrg irix5* | irix6*) 69448bf5c682Smrg case $cc_basename in 69458bf5c682Smrg CC*) 69468bf5c682Smrg # SGI C++ 69478bf5c682Smrg _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' 69488bf5c682Smrg 69498bf5c682Smrg # Archives containing C++ object files must be created using 69508bf5c682Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 69518bf5c682Smrg # necessary to make sure instantiated templates are included 69528bf5c682Smrg # in the archive. 69538bf5c682Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 69548bf5c682Smrg ;; 69558bf5c682Smrg *) 69568bf5c682Smrg if test yes = "$GXX"; then 69578bf5c682Smrg if test no = "$with_gnu_ld"; then 69588bf5c682Smrg _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' 69598bf5c682Smrg else 69608bf5c682Smrg _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' 69618bf5c682Smrg fi 69628bf5c682Smrg fi 69638bf5c682Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 69648bf5c682Smrg ;; 69658bf5c682Smrg esac 69668bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 69678bf5c682Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 69688bf5c682Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 69698bf5c682Smrg ;; 69708bf5c682Smrg 69718bf5c682Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 69728bf5c682Smrg case $cc_basename in 69738bf5c682Smrg KCC*) 69748bf5c682Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 69758bf5c682Smrg 69768bf5c682Smrg # KCC will only create a shared library if the output file 69778bf5c682Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 69788bf5c682Smrg # to its proper name (with version) after linking. 69798bf5c682Smrg _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' 69808bf5c682Smrg _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' 69818bf5c682Smrg # Commands to make compiler produce verbose output that lists 69828bf5c682Smrg # what "hidden" libraries, object files and flags are used when 69838bf5c682Smrg # linking a shared library. 69848bf5c682Smrg # 69858bf5c682Smrg # There doesn't appear to be a way to prevent this compiler from 69868bf5c682Smrg # explicitly linking system object files so we need to strip them 69878bf5c682Smrg # from the output so that they don't get included in the library 69888bf5c682Smrg # dependencies. 69898bf5c682Smrg 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"' 69908bf5c682Smrg 69918bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 69928bf5c682Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 69938bf5c682Smrg 69948bf5c682Smrg # Archives containing C++ object files must be created using 69958bf5c682Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 69968bf5c682Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 69978bf5c682Smrg ;; 69988bf5c682Smrg icpc* | ecpc* ) 69998bf5c682Smrg # Intel C++ 70008bf5c682Smrg with_gnu_ld=yes 70018bf5c682Smrg # version 8.0 and above of icpc choke on multiply defined symbols 70028bf5c682Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 70038bf5c682Smrg # earlier do not add the objects themselves. 70048bf5c682Smrg case `$CC -V 2>&1` in 70058bf5c682Smrg *"Version 7."*) 70068bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 70078bf5c682Smrg _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' 70088bf5c682Smrg ;; 70098bf5c682Smrg *) # Version 8.0 or newer 70108bf5c682Smrg tmp_idyn= 70118bf5c682Smrg case $host_cpu in 70128bf5c682Smrg ia64*) tmp_idyn=' -i_dynamic';; 70138bf5c682Smrg esac 70148bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 70158bf5c682Smrg _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' 70168bf5c682Smrg ;; 70178bf5c682Smrg esac 70188bf5c682Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 70198bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 70208bf5c682Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 70218bf5c682Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 70228bf5c682Smrg ;; 70238bf5c682Smrg pgCC* | pgcpp*) 70248bf5c682Smrg # Portland Group C++ compiler 70258bf5c682Smrg case `$CC -V` in 70268bf5c682Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 70278bf5c682Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 70288bf5c682Smrg rm -rf $tpldir~ 70298bf5c682Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 70308bf5c682Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 70318bf5c682Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 70328bf5c682Smrg rm -rf $tpldir~ 70338bf5c682Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 70348bf5c682Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 70358bf5c682Smrg $RANLIB $oldlib' 70368bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 70378bf5c682Smrg rm -rf $tpldir~ 70388bf5c682Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 70398bf5c682Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 70408bf5c682Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 70418bf5c682Smrg rm -rf $tpldir~ 70428bf5c682Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 70438bf5c682Smrg $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' 70448bf5c682Smrg ;; 70458bf5c682Smrg *) # Version 6 and above use weak symbols 70468bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 70478bf5c682Smrg _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' 70488bf5c682Smrg ;; 70498bf5c682Smrg esac 70508bf5c682Smrg 70518bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 70528bf5c682Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 70538bf5c682Smrg _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' 70548bf5c682Smrg ;; 70558bf5c682Smrg cxx*) 70568bf5c682Smrg # Compaq C++ 70578bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 70588bf5c682Smrg _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' 70598bf5c682Smrg 70608bf5c682Smrg runpath_var=LD_RUN_PATH 70618bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 70628bf5c682Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 70638bf5c682Smrg 70648bf5c682Smrg # Commands to make compiler produce verbose output that lists 70658bf5c682Smrg # what "hidden" libraries, object files and flags are used when 70668bf5c682Smrg # linking a shared library. 70678bf5c682Smrg # 70688bf5c682Smrg # There doesn't appear to be a way to prevent this compiler from 70698bf5c682Smrg # explicitly linking system object files so we need to strip them 70708bf5c682Smrg # from the output so that they don't get included in the library 70718bf5c682Smrg # dependencies. 70728bf5c682Smrg 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' 70738bf5c682Smrg ;; 70748bf5c682Smrg xl* | mpixl* | bgxl*) 70758bf5c682Smrg # IBM XL 8.0 on PPC, with GNU ld 70768bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 70778bf5c682Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 70788bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 70798bf5c682Smrg if test yes = "$supports_anon_versioning"; then 70808bf5c682Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 70810a1d3ae0Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 70828bf5c682Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 70838bf5c682Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 70848bf5c682Smrg fi 70858bf5c682Smrg ;; 70868bf5c682Smrg *) 70870a1d3ae0Smrg case `$CC -V 2>&1 | $SED 5q` in 70888bf5c682Smrg *Sun\ C*) 70898bf5c682Smrg # Sun C++ 5.9 70908bf5c682Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 70918bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 70928bf5c682Smrg _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' 70938bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 70948bf5c682Smrg _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' 70958bf5c682Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 70968bf5c682Smrg 70978bf5c682Smrg # Not sure whether something based on 70988bf5c682Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 70998bf5c682Smrg # would be better. 71008bf5c682Smrg output_verbose_link_cmd='func_echo_all' 71018bf5c682Smrg 71028bf5c682Smrg # Archives containing C++ object files must be created using 71038bf5c682Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 71048bf5c682Smrg # necessary to make sure instantiated templates are included 71058bf5c682Smrg # in the archive. 71068bf5c682Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 71078bf5c682Smrg ;; 71088bf5c682Smrg esac 71098bf5c682Smrg ;; 71108bf5c682Smrg esac 71118bf5c682Smrg ;; 71128bf5c682Smrg 71138bf5c682Smrg lynxos*) 71148bf5c682Smrg # FIXME: insert proper C++ library support 71158bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71168bf5c682Smrg ;; 71178bf5c682Smrg 71188bf5c682Smrg m88k*) 71198bf5c682Smrg # FIXME: insert proper C++ library support 71208bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71218bf5c682Smrg ;; 71228bf5c682Smrg 71238bf5c682Smrg mvs*) 71248bf5c682Smrg case $cc_basename in 71258bf5c682Smrg cxx*) 71268bf5c682Smrg # FIXME: insert proper C++ library support 71278bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71288bf5c682Smrg ;; 71298bf5c682Smrg *) 71308bf5c682Smrg # FIXME: insert proper C++ library support 71318bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71328bf5c682Smrg ;; 71338bf5c682Smrg esac 71348bf5c682Smrg ;; 71358bf5c682Smrg 71368bf5c682Smrg netbsd*) 71378bf5c682Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 71388bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 71398bf5c682Smrg wlarc= 71408bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 71418bf5c682Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 71428bf5c682Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 71438bf5c682Smrg fi 71448bf5c682Smrg # Workaround some broken pre-1.5 toolchains 71458bf5c682Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 71468bf5c682Smrg ;; 71478bf5c682Smrg 71488bf5c682Smrg *nto* | *qnx*) 71498bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 71508bf5c682Smrg ;; 71518bf5c682Smrg 71528bf5c682Smrg openbsd* | bitrig*) 71538bf5c682Smrg if test -f /usr/libexec/ld.so; then 71548bf5c682Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 71558bf5c682Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 71568bf5c682Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 71578bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 71588bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 71598bf5c682Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 71608bf5c682Smrg _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' 71618bf5c682Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 71628bf5c682Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 71638bf5c682Smrg fi 71648bf5c682Smrg output_verbose_link_cmd=func_echo_all 71658bf5c682Smrg else 71668bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71678bf5c682Smrg fi 71688bf5c682Smrg ;; 71698bf5c682Smrg 71708bf5c682Smrg osf3* | osf4* | osf5*) 71718bf5c682Smrg case $cc_basename in 71728bf5c682Smrg KCC*) 71738bf5c682Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 71748bf5c682Smrg 71758bf5c682Smrg # KCC will only create a shared library if the output file 71768bf5c682Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 71778bf5c682Smrg # to its proper name (with version) after linking. 71788bf5c682Smrg _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' 71798bf5c682Smrg 71808bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 71818bf5c682Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 71828bf5c682Smrg 71838bf5c682Smrg # Archives containing C++ object files must be created using 71848bf5c682Smrg # the KAI C++ compiler. 71858bf5c682Smrg case $host in 71868bf5c682Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 71878bf5c682Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 71888bf5c682Smrg esac 71898bf5c682Smrg ;; 71908bf5c682Smrg RCC*) 71918bf5c682Smrg # Rational C++ 2.4.1 71928bf5c682Smrg # FIXME: insert proper C++ library support 71938bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71948bf5c682Smrg ;; 71958bf5c682Smrg cxx*) 71968bf5c682Smrg case $host in 71978bf5c682Smrg osf3*) 71988bf5c682Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 71998bf5c682Smrg _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' 72008bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 72018bf5c682Smrg ;; 72028bf5c682Smrg *) 72038bf5c682Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 72048bf5c682Smrg _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' 72058bf5c682Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 72068bf5c682Smrg echo "-hidden">> $lib.exp~ 72078bf5c682Smrg $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~ 72088bf5c682Smrg $RM $lib.exp' 72098bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 72108bf5c682Smrg ;; 72118bf5c682Smrg esac 72128bf5c682Smrg 72138bf5c682Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 72148bf5c682Smrg 72158bf5c682Smrg # Commands to make compiler produce verbose output that lists 72168bf5c682Smrg # what "hidden" libraries, object files and flags are used when 72178bf5c682Smrg # linking a shared library. 72188bf5c682Smrg # 72198bf5c682Smrg # There doesn't appear to be a way to prevent this compiler from 72208bf5c682Smrg # explicitly linking system object files so we need to strip them 72218bf5c682Smrg # from the output so that they don't get included in the library 72228bf5c682Smrg # dependencies. 72238bf5c682Smrg 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"' 72248bf5c682Smrg ;; 72258bf5c682Smrg *) 72268bf5c682Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 72278bf5c682Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 72288bf5c682Smrg case $host in 72298bf5c682Smrg osf3*) 72308bf5c682Smrg _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' 72318bf5c682Smrg ;; 72328bf5c682Smrg *) 72338bf5c682Smrg _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' 72348bf5c682Smrg ;; 72358bf5c682Smrg esac 72368bf5c682Smrg 72378bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 72388bf5c682Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 72398bf5c682Smrg 72408bf5c682Smrg # Commands to make compiler produce verbose output that lists 72418bf5c682Smrg # what "hidden" libraries, object files and flags are used when 72428bf5c682Smrg # linking a shared library. 72438bf5c682Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 72448bf5c682Smrg 72458bf5c682Smrg else 72468bf5c682Smrg # FIXME: insert proper C++ library support 72478bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72488bf5c682Smrg fi 72498bf5c682Smrg ;; 72508bf5c682Smrg esac 72518bf5c682Smrg ;; 72528bf5c682Smrg 72538bf5c682Smrg psos*) 72548bf5c682Smrg # FIXME: insert proper C++ library support 72558bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72568bf5c682Smrg ;; 72578bf5c682Smrg 72588bf5c682Smrg sunos4*) 72598bf5c682Smrg case $cc_basename in 72608bf5c682Smrg CC*) 72618bf5c682Smrg # Sun C++ 4.x 72628bf5c682Smrg # FIXME: insert proper C++ library support 72638bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72648bf5c682Smrg ;; 72658bf5c682Smrg lcc*) 72668bf5c682Smrg # Lucid 72678bf5c682Smrg # FIXME: insert proper C++ library support 72688bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72698bf5c682Smrg ;; 72708bf5c682Smrg *) 72718bf5c682Smrg # FIXME: insert proper C++ library support 72728bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72738bf5c682Smrg ;; 72748bf5c682Smrg esac 72758bf5c682Smrg ;; 72768bf5c682Smrg 72778bf5c682Smrg solaris*) 72788bf5c682Smrg case $cc_basename in 72798bf5c682Smrg CC* | sunCC*) 72808bf5c682Smrg # Sun C++ 4.2, 5.x and Centerline C++ 72818bf5c682Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 72828bf5c682Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 72838bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 72848bf5c682Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 72858bf5c682Smrg $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' 72868bf5c682Smrg 72878bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 72888bf5c682Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 72898bf5c682Smrg case $host_os in 72908bf5c682Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 72918bf5c682Smrg *) 72928bf5c682Smrg # The compiler driver will combine and reorder linker options, 72938bf5c682Smrg # but understands '-z linker_flag'. 72948bf5c682Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 72958bf5c682Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 72968bf5c682Smrg ;; 72978bf5c682Smrg esac 72988bf5c682Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 72998bf5c682Smrg 73008bf5c682Smrg output_verbose_link_cmd='func_echo_all' 73018bf5c682Smrg 73028bf5c682Smrg # Archives containing C++ object files must be created using 73038bf5c682Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 73048bf5c682Smrg # necessary to make sure instantiated templates are included 73058bf5c682Smrg # in the archive. 73068bf5c682Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 73078bf5c682Smrg ;; 73088bf5c682Smrg gcx*) 73098bf5c682Smrg # Green Hills C++ Compiler 73108bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 73118bf5c682Smrg 73128bf5c682Smrg # The C++ compiler must be used to create the archive. 73138bf5c682Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 73148bf5c682Smrg ;; 73158bf5c682Smrg *) 73168bf5c682Smrg # GNU C++ compiler with Solaris linker 73178bf5c682Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 73188bf5c682Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 73198bf5c682Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 73208bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 73218bf5c682Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 73228bf5c682Smrg $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' 73238bf5c682Smrg 73248bf5c682Smrg # Commands to make compiler produce verbose output that lists 73258bf5c682Smrg # what "hidden" libraries, object files and flags are used when 73268bf5c682Smrg # linking a shared library. 73278bf5c682Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 73288bf5c682Smrg else 73298bf5c682Smrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 73308bf5c682Smrg # platform. 73318bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 73328bf5c682Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 73338bf5c682Smrg $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' 73348bf5c682Smrg 73358bf5c682Smrg # Commands to make compiler produce verbose output that lists 73368bf5c682Smrg # what "hidden" libraries, object files and flags are used when 73378bf5c682Smrg # linking a shared library. 73388bf5c682Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 73398bf5c682Smrg fi 73408bf5c682Smrg 73418bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 73428bf5c682Smrg case $host_os in 73438bf5c682Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 73448bf5c682Smrg *) 73458bf5c682Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 73468bf5c682Smrg ;; 73478bf5c682Smrg esac 73488bf5c682Smrg fi 73498bf5c682Smrg ;; 73508bf5c682Smrg esac 73518bf5c682Smrg ;; 73528bf5c682Smrg 73538bf5c682Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 73548bf5c682Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 73558bf5c682Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 73568bf5c682Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 73578bf5c682Smrg runpath_var='LD_RUN_PATH' 73588bf5c682Smrg 73598bf5c682Smrg case $cc_basename in 73608bf5c682Smrg CC*) 73618bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73628bf5c682Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73638bf5c682Smrg ;; 73648bf5c682Smrg *) 73658bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73668bf5c682Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73678bf5c682Smrg ;; 73688bf5c682Smrg esac 73698bf5c682Smrg ;; 73708bf5c682Smrg 73718bf5c682Smrg sysv5* | sco3.2v5* | sco5v6*) 73728bf5c682Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 73738bf5c682Smrg # link with -lc, and that would cause any symbols used from libc to 73748bf5c682Smrg # always be unresolved, which means just about no library would 73758bf5c682Smrg # ever link correctly. If we're not using GNU ld we use -z text 73768bf5c682Smrg # though, which does catch some bad symbols but isn't as heavy-handed 73778bf5c682Smrg # as -z defs. 73788bf5c682Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 73798bf5c682Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 73808bf5c682Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 73818bf5c682Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 73828bf5c682Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 73838bf5c682Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 73848bf5c682Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 73858bf5c682Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 73868bf5c682Smrg runpath_var='LD_RUN_PATH' 73878bf5c682Smrg 73888bf5c682Smrg case $cc_basename in 73898bf5c682Smrg CC*) 73908bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73918bf5c682Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73928bf5c682Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 73938bf5c682Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 73948bf5c682Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 73958bf5c682Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 73968bf5c682Smrg ;; 73978bf5c682Smrg *) 73988bf5c682Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73998bf5c682Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 74008bf5c682Smrg ;; 74018bf5c682Smrg esac 74028bf5c682Smrg ;; 74038bf5c682Smrg 74048bf5c682Smrg tandem*) 74058bf5c682Smrg case $cc_basename in 74068bf5c682Smrg NCC*) 74078bf5c682Smrg # NonStop-UX NCC 3.20 74088bf5c682Smrg # FIXME: insert proper C++ library support 74098bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74108bf5c682Smrg ;; 74118bf5c682Smrg *) 74128bf5c682Smrg # FIXME: insert proper C++ library support 74138bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74148bf5c682Smrg ;; 74158bf5c682Smrg esac 74168bf5c682Smrg ;; 74178bf5c682Smrg 74188bf5c682Smrg vxworks*) 74198bf5c682Smrg # FIXME: insert proper C++ library support 74208bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74218bf5c682Smrg ;; 74228bf5c682Smrg 74238bf5c682Smrg *) 74248bf5c682Smrg # FIXME: insert proper C++ library support 74258bf5c682Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74268bf5c682Smrg ;; 74278bf5c682Smrg esac 74288bf5c682Smrg 74298bf5c682Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 74308bf5c682Smrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 74318bf5c682Smrg 74328bf5c682Smrg _LT_TAGVAR(GCC, $1)=$GXX 74338bf5c682Smrg _LT_TAGVAR(LD, $1)=$LD 74348bf5c682Smrg 74358bf5c682Smrg ## CAVEAT EMPTOR: 74368bf5c682Smrg ## There is no encapsulation within the following macros, do not change 74378bf5c682Smrg ## the running order or otherwise move them around unless you know exactly 74388bf5c682Smrg ## what you are doing... 74398bf5c682Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 74408bf5c682Smrg _LT_COMPILER_PIC($1) 74418bf5c682Smrg _LT_COMPILER_C_O($1) 74428bf5c682Smrg _LT_COMPILER_FILE_LOCKS($1) 74438bf5c682Smrg _LT_LINKER_SHLIBS($1) 74448bf5c682Smrg _LT_SYS_DYNAMIC_LINKER($1) 74458bf5c682Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 74468bf5c682Smrg 74478bf5c682Smrg _LT_CONFIG($1) 74488bf5c682Smrg fi # test -n "$compiler" 74498bf5c682Smrg 74508bf5c682Smrg CC=$lt_save_CC 74518bf5c682Smrg CFLAGS=$lt_save_CFLAGS 74528bf5c682Smrg LDCXX=$LD 74538bf5c682Smrg LD=$lt_save_LD 74548bf5c682Smrg GCC=$lt_save_GCC 74558bf5c682Smrg with_gnu_ld=$lt_save_with_gnu_ld 74568bf5c682Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 74578bf5c682Smrg lt_cv_path_LD=$lt_save_path_LD 74588bf5c682Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 74598bf5c682Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 74608bf5c682Smrgfi # test yes != "$_lt_caught_CXX_error" 74618bf5c682Smrg 74628bf5c682SmrgAC_LANG_POP 74638bf5c682Smrg])# _LT_LANG_CXX_CONFIG 74648bf5c682Smrg 74658bf5c682Smrg 74668bf5c682Smrg# _LT_FUNC_STRIPNAME_CNF 74678bf5c682Smrg# ---------------------- 74688bf5c682Smrg# func_stripname_cnf prefix suffix name 74698bf5c682Smrg# strip PREFIX and SUFFIX off of NAME. 74708bf5c682Smrg# PREFIX and SUFFIX must not contain globbing or regex special 74718bf5c682Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 74728bf5c682Smrg# dot (in which case that matches only a dot). 74738bf5c682Smrg# 74748bf5c682Smrg# This function is identical to the (non-XSI) version of func_stripname, 74758bf5c682Smrg# except this one can be used by m4 code that may be executed by configure, 74768bf5c682Smrg# rather than the libtool script. 74778bf5c682Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 74788bf5c682SmrgAC_REQUIRE([_LT_DECL_SED]) 74798bf5c682SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 74808bf5c682Smrgfunc_stripname_cnf () 74818bf5c682Smrg{ 74828bf5c682Smrg case @S|@2 in 74838bf5c682Smrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 74848bf5c682Smrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 74858bf5c682Smrg esac 74868bf5c682Smrg} # func_stripname_cnf 74878bf5c682Smrg])# _LT_FUNC_STRIPNAME_CNF 74888bf5c682Smrg 74898bf5c682Smrg 74908bf5c682Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 74918bf5c682Smrg# --------------------------------- 74928bf5c682Smrg# Figure out "hidden" library dependencies from verbose 74938bf5c682Smrg# compiler output when linking a shared library. 74948bf5c682Smrg# Parse the compiler output and extract the necessary 74958bf5c682Smrg# objects, libraries and library flags. 74968bf5c682Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 74978bf5c682Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 74988bf5c682SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 74998bf5c682Smrg# Dependencies to place before and after the object being linked: 75008bf5c682Smrg_LT_TAGVAR(predep_objects, $1)= 75018bf5c682Smrg_LT_TAGVAR(postdep_objects, $1)= 75028bf5c682Smrg_LT_TAGVAR(predeps, $1)= 75038bf5c682Smrg_LT_TAGVAR(postdeps, $1)= 75048bf5c682Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 75058bf5c682Smrg 75068bf5c682Smrgdnl we can't use the lt_simple_compile_test_code here, 75078bf5c682Smrgdnl because it contains code intended for an executable, 75088bf5c682Smrgdnl not a library. It's possible we should let each 75098bf5c682Smrgdnl tag define a new lt_????_link_test_code variable, 75108bf5c682Smrgdnl but it's only used here... 75118bf5c682Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 75128bf5c682Smrgint a; 75138bf5c682Smrgvoid foo (void) { a = 0; } 75148bf5c682Smrg_LT_EOF 75158bf5c682Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 75168bf5c682Smrgclass Foo 75178bf5c682Smrg{ 75188bf5c682Smrgpublic: 75198bf5c682Smrg Foo (void) { a = 0; } 75208bf5c682Smrgprivate: 75218bf5c682Smrg int a; 75228bf5c682Smrg}; 75238bf5c682Smrg_LT_EOF 75248bf5c682Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 75258bf5c682Smrg subroutine foo 75268bf5c682Smrg implicit none 75278bf5c682Smrg integer*4 a 75288bf5c682Smrg a=0 75298bf5c682Smrg return 75308bf5c682Smrg end 75318bf5c682Smrg_LT_EOF 75328bf5c682Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 75338bf5c682Smrg subroutine foo 75348bf5c682Smrg implicit none 75358bf5c682Smrg integer a 75368bf5c682Smrg a=0 75378bf5c682Smrg return 75388bf5c682Smrg end 75398bf5c682Smrg_LT_EOF 75408bf5c682Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 75418bf5c682Smrgpublic class foo { 75428bf5c682Smrg private int a; 75438bf5c682Smrg public void bar (void) { 75448bf5c682Smrg a = 0; 75458bf5c682Smrg } 75468bf5c682Smrg}; 75478bf5c682Smrg_LT_EOF 75488bf5c682Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 75498bf5c682Smrgpackage foo 75508bf5c682Smrgfunc foo() { 75518bf5c682Smrg} 75528bf5c682Smrg_LT_EOF 75538bf5c682Smrg]) 75548bf5c682Smrg 75558bf5c682Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 75568bf5c682Smrgcase "$CC $CFLAGS " in #( 75578bf5c682Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 75588bf5c682Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 75598bf5c682Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 75608bf5c682Smrgesac 75618bf5c682Smrg 75628bf5c682Smrgdnl Parse the compiler output and extract the necessary 75638bf5c682Smrgdnl objects, libraries and library flags. 75648bf5c682Smrgif AC_TRY_EVAL(ac_compile); then 75658bf5c682Smrg # Parse the compiler output and extract the necessary 75668bf5c682Smrg # objects, libraries and library flags. 75678bf5c682Smrg 75688bf5c682Smrg # Sentinel used to keep track of whether or not we are before 75698bf5c682Smrg # the conftest object file. 75708bf5c682Smrg pre_test_object_deps_done=no 75718bf5c682Smrg 75728bf5c682Smrg for p in `eval "$output_verbose_link_cmd"`; do 75738bf5c682Smrg case $prev$p in 75748bf5c682Smrg 75758bf5c682Smrg -L* | -R* | -l*) 75768bf5c682Smrg # Some compilers place space between "-{L,R}" and the path. 75778bf5c682Smrg # Remove the space. 75788bf5c682Smrg if test x-L = "$p" || 75798bf5c682Smrg test x-R = "$p"; then 75808bf5c682Smrg prev=$p 75818bf5c682Smrg continue 75828bf5c682Smrg fi 75838bf5c682Smrg 75848bf5c682Smrg # Expand the sysroot to ease extracting the directories later. 75858bf5c682Smrg if test -z "$prev"; then 75868bf5c682Smrg case $p in 75878bf5c682Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 75888bf5c682Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 75898bf5c682Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 75908bf5c682Smrg esac 75918bf5c682Smrg fi 75928bf5c682Smrg case $p in 75938bf5c682Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 75948bf5c682Smrg esac 75958bf5c682Smrg if test no = "$pre_test_object_deps_done"; then 75968bf5c682Smrg case $prev in 75978bf5c682Smrg -L | -R) 75988bf5c682Smrg # Internal compiler library paths should come after those 75998bf5c682Smrg # provided the user. The postdeps already come after the 76008bf5c682Smrg # user supplied libs so there is no need to process them. 76018bf5c682Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 76028bf5c682Smrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 76038bf5c682Smrg else 76048bf5c682Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 76058bf5c682Smrg fi 76068bf5c682Smrg ;; 76078bf5c682Smrg # The "-l" case would never come before the object being 76088bf5c682Smrg # linked, so don't bother handling this case. 76098bf5c682Smrg esac 76108bf5c682Smrg else 76118bf5c682Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 76128bf5c682Smrg _LT_TAGVAR(postdeps, $1)=$prev$p 76138bf5c682Smrg else 76148bf5c682Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 76158bf5c682Smrg fi 76168bf5c682Smrg fi 76178bf5c682Smrg prev= 76188bf5c682Smrg ;; 76198bf5c682Smrg 76208bf5c682Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 76218bf5c682Smrg *.$objext) 76228bf5c682Smrg # This assumes that the test object file only shows up 76238bf5c682Smrg # once in the compiler output. 76248bf5c682Smrg if test "$p" = "conftest.$objext"; then 76258bf5c682Smrg pre_test_object_deps_done=yes 76268bf5c682Smrg continue 76278bf5c682Smrg fi 76288bf5c682Smrg 76298bf5c682Smrg if test no = "$pre_test_object_deps_done"; then 76308bf5c682Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 76318bf5c682Smrg _LT_TAGVAR(predep_objects, $1)=$p 76328bf5c682Smrg else 76338bf5c682Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 76348bf5c682Smrg fi 76358bf5c682Smrg else 76368bf5c682Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 76378bf5c682Smrg _LT_TAGVAR(postdep_objects, $1)=$p 76388bf5c682Smrg else 76398bf5c682Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 76408bf5c682Smrg fi 76418bf5c682Smrg fi 76428bf5c682Smrg ;; 76438bf5c682Smrg 76448bf5c682Smrg *) ;; # Ignore the rest. 76458bf5c682Smrg 76468bf5c682Smrg esac 76478bf5c682Smrg done 76488bf5c682Smrg 76498bf5c682Smrg # Clean up. 76508bf5c682Smrg rm -f a.out a.exe 76518bf5c682Smrgelse 76528bf5c682Smrg echo "libtool.m4: error: problem compiling $1 test program" 76538bf5c682Smrgfi 76548bf5c682Smrg 76558bf5c682Smrg$RM -f confest.$objext 76568bf5c682SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 76578bf5c682Smrg 76588bf5c682Smrg# PORTME: override above test on systems where it is broken 76598bf5c682Smrgm4_if([$1], [CXX], 76608bf5c682Smrg[case $host_os in 76618bf5c682Smrginterix[[3-9]]*) 76628bf5c682Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 76638bf5c682Smrg # hack all around it, let's just trust "g++" to DTRT. 76648bf5c682Smrg _LT_TAGVAR(predep_objects,$1)= 76658bf5c682Smrg _LT_TAGVAR(postdep_objects,$1)= 76668bf5c682Smrg _LT_TAGVAR(postdeps,$1)= 76678bf5c682Smrg ;; 76688bf5c682Smrgesac 76698bf5c682Smrg]) 76708bf5c682Smrg 76718bf5c682Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 76728bf5c682Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 76738bf5c682Smrgesac 76748bf5c682Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 76758bf5c682Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 76768bf5c682Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 76778bf5c682Smrgfi 76788bf5c682Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 76798bf5c682Smrg [The directories searched by this compiler when creating a shared library]) 76808bf5c682Smrg_LT_TAGDECL([], [predep_objects], [1], 76818bf5c682Smrg [Dependencies to place before and after the objects being linked to 76828bf5c682Smrg create a shared library]) 76838bf5c682Smrg_LT_TAGDECL([], [postdep_objects], [1]) 76848bf5c682Smrg_LT_TAGDECL([], [predeps], [1]) 76858bf5c682Smrg_LT_TAGDECL([], [postdeps], [1]) 76868bf5c682Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 76878bf5c682Smrg [The library search path used internally by the compiler when linking 76888bf5c682Smrg a shared library]) 76898bf5c682Smrg])# _LT_SYS_HIDDEN_LIBDEPS 76908bf5c682Smrg 76918bf5c682Smrg 76928bf5c682Smrg# _LT_LANG_F77_CONFIG([TAG]) 76938bf5c682Smrg# -------------------------- 76948bf5c682Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 76958bf5c682Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 76968bf5c682Smrg# to write the compiler configuration to 'libtool'. 76978bf5c682Smrgm4_defun([_LT_LANG_F77_CONFIG], 76988bf5c682Smrg[AC_LANG_PUSH(Fortran 77) 76998bf5c682Smrgif test -z "$F77" || test no = "$F77"; then 77008bf5c682Smrg _lt_disable_F77=yes 77018bf5c682Smrgfi 77028bf5c682Smrg 77038bf5c682Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 77048bf5c682Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 77058bf5c682Smrg_LT_TAGVAR(always_export_symbols, $1)=no 77068bf5c682Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 77078bf5c682Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 77088bf5c682Smrg_LT_TAGVAR(hardcode_direct, $1)=no 77098bf5c682Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 77108bf5c682Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 77118bf5c682Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 77128bf5c682Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 77138bf5c682Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 77148bf5c682Smrg_LT_TAGVAR(inherit_rpath, $1)=no 77158bf5c682Smrg_LT_TAGVAR(module_cmds, $1)= 77168bf5c682Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 77178bf5c682Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 77188bf5c682Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 77198bf5c682Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 77208bf5c682Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 77218bf5c682Smrg_LT_TAGVAR(no_undefined_flag, $1)= 77228bf5c682Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 77238bf5c682Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 77248bf5c682Smrg 77258bf5c682Smrg# Source file extension for f77 test sources. 77268bf5c682Smrgac_ext=f 77278bf5c682Smrg 77288bf5c682Smrg# Object file extension for compiled f77 test sources. 77298bf5c682Smrgobjext=o 77308bf5c682Smrg_LT_TAGVAR(objext, $1)=$objext 77318bf5c682Smrg 77328bf5c682Smrg# No sense in running all these tests if we already determined that 77338bf5c682Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 77348bf5c682Smrg# are currently assumed to apply to all compilers on this platform, 77358bf5c682Smrg# and will be corrupted by setting them based on a non-working compiler. 77368bf5c682Smrgif test yes != "$_lt_disable_F77"; then 77378bf5c682Smrg # Code to be used in simple compile tests 77388bf5c682Smrg lt_simple_compile_test_code="\ 77398bf5c682Smrg subroutine t 77408bf5c682Smrg return 77418bf5c682Smrg end 77428bf5c682Smrg" 77438bf5c682Smrg 77448bf5c682Smrg # Code to be used in simple link tests 77458bf5c682Smrg lt_simple_link_test_code="\ 77468bf5c682Smrg program t 77478bf5c682Smrg end 77488bf5c682Smrg" 77498bf5c682Smrg 77508bf5c682Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 77518bf5c682Smrg _LT_TAG_COMPILER 77528bf5c682Smrg 77538bf5c682Smrg # save warnings/boilerplate of simple test code 77548bf5c682Smrg _LT_COMPILER_BOILERPLATE 77558bf5c682Smrg _LT_LINKER_BOILERPLATE 77568bf5c682Smrg 77578bf5c682Smrg # Allow CC to be a program name with arguments. 77588bf5c682Smrg lt_save_CC=$CC 77598bf5c682Smrg lt_save_GCC=$GCC 77608bf5c682Smrg lt_save_CFLAGS=$CFLAGS 77618bf5c682Smrg CC=${F77-"f77"} 77628bf5c682Smrg CFLAGS=$FFLAGS 77638bf5c682Smrg compiler=$CC 77648bf5c682Smrg _LT_TAGVAR(compiler, $1)=$CC 77658bf5c682Smrg _LT_CC_BASENAME([$compiler]) 77668bf5c682Smrg GCC=$G77 77678bf5c682Smrg if test -n "$compiler"; then 77688bf5c682Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 77698bf5c682Smrg AC_MSG_RESULT([$can_build_shared]) 77708bf5c682Smrg 77718bf5c682Smrg AC_MSG_CHECKING([whether to build shared libraries]) 77728bf5c682Smrg test no = "$can_build_shared" && enable_shared=no 77738bf5c682Smrg 77748bf5c682Smrg # On AIX, shared libraries and static libraries use the same namespace, and 77758bf5c682Smrg # are all built from PIC. 77768bf5c682Smrg case $host_os in 77778bf5c682Smrg aix3*) 77788bf5c682Smrg test yes = "$enable_shared" && enable_static=no 77798bf5c682Smrg if test -n "$RANLIB"; then 77808bf5c682Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 77818bf5c682Smrg postinstall_cmds='$RANLIB $lib' 77828bf5c682Smrg fi 77838bf5c682Smrg ;; 77848bf5c682Smrg aix[[4-9]]*) 77858bf5c682Smrg if test ia64 != "$host_cpu"; then 77868bf5c682Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 77878bf5c682Smrg yes,aix,yes) ;; # shared object as lib.so file only 77888bf5c682Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 77898bf5c682Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 77908bf5c682Smrg esac 77918bf5c682Smrg fi 77928bf5c682Smrg ;; 77938bf5c682Smrg esac 77948bf5c682Smrg AC_MSG_RESULT([$enable_shared]) 77958bf5c682Smrg 77968bf5c682Smrg AC_MSG_CHECKING([whether to build static libraries]) 77978bf5c682Smrg # Make sure either enable_shared or enable_static is yes. 77988bf5c682Smrg test yes = "$enable_shared" || enable_static=yes 77998bf5c682Smrg AC_MSG_RESULT([$enable_static]) 78008bf5c682Smrg 78018bf5c682Smrg _LT_TAGVAR(GCC, $1)=$G77 78028bf5c682Smrg _LT_TAGVAR(LD, $1)=$LD 78038bf5c682Smrg 78048bf5c682Smrg ## CAVEAT EMPTOR: 78058bf5c682Smrg ## There is no encapsulation within the following macros, do not change 78068bf5c682Smrg ## the running order or otherwise move them around unless you know exactly 78078bf5c682Smrg ## what you are doing... 78088bf5c682Smrg _LT_COMPILER_PIC($1) 78098bf5c682Smrg _LT_COMPILER_C_O($1) 78108bf5c682Smrg _LT_COMPILER_FILE_LOCKS($1) 78118bf5c682Smrg _LT_LINKER_SHLIBS($1) 78128bf5c682Smrg _LT_SYS_DYNAMIC_LINKER($1) 78138bf5c682Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 78148bf5c682Smrg 78158bf5c682Smrg _LT_CONFIG($1) 78168bf5c682Smrg fi # test -n "$compiler" 78178bf5c682Smrg 78188bf5c682Smrg GCC=$lt_save_GCC 78198bf5c682Smrg CC=$lt_save_CC 78208bf5c682Smrg CFLAGS=$lt_save_CFLAGS 78218bf5c682Smrgfi # test yes != "$_lt_disable_F77" 78228bf5c682Smrg 78238bf5c682SmrgAC_LANG_POP 78248bf5c682Smrg])# _LT_LANG_F77_CONFIG 78258bf5c682Smrg 78268bf5c682Smrg 78278bf5c682Smrg# _LT_LANG_FC_CONFIG([TAG]) 78288bf5c682Smrg# ------------------------- 78298bf5c682Smrg# Ensure that the configuration variables for a Fortran compiler are 78308bf5c682Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 78318bf5c682Smrg# to write the compiler configuration to 'libtool'. 78328bf5c682Smrgm4_defun([_LT_LANG_FC_CONFIG], 78338bf5c682Smrg[AC_LANG_PUSH(Fortran) 78348bf5c682Smrg 78358bf5c682Smrgif test -z "$FC" || test no = "$FC"; then 78368bf5c682Smrg _lt_disable_FC=yes 78378bf5c682Smrgfi 78388bf5c682Smrg 78398bf5c682Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 78408bf5c682Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 78418bf5c682Smrg_LT_TAGVAR(always_export_symbols, $1)=no 78428bf5c682Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 78438bf5c682Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 78448bf5c682Smrg_LT_TAGVAR(hardcode_direct, $1)=no 78458bf5c682Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 78468bf5c682Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 78478bf5c682Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 78488bf5c682Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 78498bf5c682Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 78508bf5c682Smrg_LT_TAGVAR(inherit_rpath, $1)=no 78518bf5c682Smrg_LT_TAGVAR(module_cmds, $1)= 78528bf5c682Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 78538bf5c682Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 78548bf5c682Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 78558bf5c682Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 78568bf5c682Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 78578bf5c682Smrg_LT_TAGVAR(no_undefined_flag, $1)= 78588bf5c682Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 78598bf5c682Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 78608bf5c682Smrg 78618bf5c682Smrg# Source file extension for fc test sources. 78628bf5c682Smrgac_ext=${ac_fc_srcext-f} 78638bf5c682Smrg 78648bf5c682Smrg# Object file extension for compiled fc test sources. 78658bf5c682Smrgobjext=o 78668bf5c682Smrg_LT_TAGVAR(objext, $1)=$objext 78678bf5c682Smrg 78688bf5c682Smrg# No sense in running all these tests if we already determined that 78698bf5c682Smrg# the FC compiler isn't working. Some variables (like enable_shared) 78708bf5c682Smrg# are currently assumed to apply to all compilers on this platform, 78718bf5c682Smrg# and will be corrupted by setting them based on a non-working compiler. 78728bf5c682Smrgif test yes != "$_lt_disable_FC"; then 78738bf5c682Smrg # Code to be used in simple compile tests 78748bf5c682Smrg lt_simple_compile_test_code="\ 78758bf5c682Smrg subroutine t 78768bf5c682Smrg return 78778bf5c682Smrg end 78788bf5c682Smrg" 78798bf5c682Smrg 78808bf5c682Smrg # Code to be used in simple link tests 78818bf5c682Smrg lt_simple_link_test_code="\ 78828bf5c682Smrg program t 78838bf5c682Smrg end 78848bf5c682Smrg" 78858bf5c682Smrg 78868bf5c682Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 78878bf5c682Smrg _LT_TAG_COMPILER 78888bf5c682Smrg 78898bf5c682Smrg # save warnings/boilerplate of simple test code 78908bf5c682Smrg _LT_COMPILER_BOILERPLATE 78918bf5c682Smrg _LT_LINKER_BOILERPLATE 78928bf5c682Smrg 78938bf5c682Smrg # Allow CC to be a program name with arguments. 78948bf5c682Smrg lt_save_CC=$CC 78958bf5c682Smrg lt_save_GCC=$GCC 78968bf5c682Smrg lt_save_CFLAGS=$CFLAGS 78978bf5c682Smrg CC=${FC-"f95"} 78988bf5c682Smrg CFLAGS=$FCFLAGS 78998bf5c682Smrg compiler=$CC 79008bf5c682Smrg GCC=$ac_cv_fc_compiler_gnu 79018bf5c682Smrg 79028bf5c682Smrg _LT_TAGVAR(compiler, $1)=$CC 79038bf5c682Smrg _LT_CC_BASENAME([$compiler]) 79048bf5c682Smrg 79058bf5c682Smrg if test -n "$compiler"; then 79068bf5c682Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 79078bf5c682Smrg AC_MSG_RESULT([$can_build_shared]) 79088bf5c682Smrg 79098bf5c682Smrg AC_MSG_CHECKING([whether to build shared libraries]) 79108bf5c682Smrg test no = "$can_build_shared" && enable_shared=no 79118bf5c682Smrg 79128bf5c682Smrg # On AIX, shared libraries and static libraries use the same namespace, and 79138bf5c682Smrg # are all built from PIC. 79148bf5c682Smrg case $host_os in 79158bf5c682Smrg aix3*) 79168bf5c682Smrg test yes = "$enable_shared" && enable_static=no 79178bf5c682Smrg if test -n "$RANLIB"; then 79188bf5c682Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 79198bf5c682Smrg postinstall_cmds='$RANLIB $lib' 79208bf5c682Smrg fi 79218bf5c682Smrg ;; 79228bf5c682Smrg aix[[4-9]]*) 79238bf5c682Smrg if test ia64 != "$host_cpu"; then 79248bf5c682Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 79258bf5c682Smrg yes,aix,yes) ;; # shared object as lib.so file only 79268bf5c682Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 79278bf5c682Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 79288bf5c682Smrg esac 79298bf5c682Smrg fi 79308bf5c682Smrg ;; 79318bf5c682Smrg esac 79328bf5c682Smrg AC_MSG_RESULT([$enable_shared]) 79338bf5c682Smrg 79348bf5c682Smrg AC_MSG_CHECKING([whether to build static libraries]) 79358bf5c682Smrg # Make sure either enable_shared or enable_static is yes. 79368bf5c682Smrg test yes = "$enable_shared" || enable_static=yes 79378bf5c682Smrg AC_MSG_RESULT([$enable_static]) 79388bf5c682Smrg 79398bf5c682Smrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 79408bf5c682Smrg _LT_TAGVAR(LD, $1)=$LD 79418bf5c682Smrg 79428bf5c682Smrg ## CAVEAT EMPTOR: 79438bf5c682Smrg ## There is no encapsulation within the following macros, do not change 79448bf5c682Smrg ## the running order or otherwise move them around unless you know exactly 79458bf5c682Smrg ## what you are doing... 79468bf5c682Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 79478bf5c682Smrg _LT_COMPILER_PIC($1) 79488bf5c682Smrg _LT_COMPILER_C_O($1) 79498bf5c682Smrg _LT_COMPILER_FILE_LOCKS($1) 79508bf5c682Smrg _LT_LINKER_SHLIBS($1) 79518bf5c682Smrg _LT_SYS_DYNAMIC_LINKER($1) 79528bf5c682Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 79538bf5c682Smrg 79548bf5c682Smrg _LT_CONFIG($1) 79558bf5c682Smrg fi # test -n "$compiler" 79568bf5c682Smrg 79578bf5c682Smrg GCC=$lt_save_GCC 79588bf5c682Smrg CC=$lt_save_CC 79598bf5c682Smrg CFLAGS=$lt_save_CFLAGS 79608bf5c682Smrgfi # test yes != "$_lt_disable_FC" 79618bf5c682Smrg 79628bf5c682SmrgAC_LANG_POP 79638bf5c682Smrg])# _LT_LANG_FC_CONFIG 79648bf5c682Smrg 79658bf5c682Smrg 79668bf5c682Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 79678bf5c682Smrg# -------------------------- 79688bf5c682Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 79698bf5c682Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 79708bf5c682Smrg# to write the compiler configuration to 'libtool'. 79718bf5c682Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 79728bf5c682Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 79738bf5c682SmrgAC_LANG_SAVE 79748bf5c682Smrg 79758bf5c682Smrg# Source file extension for Java test sources. 79768bf5c682Smrgac_ext=java 79778bf5c682Smrg 79788bf5c682Smrg# Object file extension for compiled Java test sources. 79798bf5c682Smrgobjext=o 79808bf5c682Smrg_LT_TAGVAR(objext, $1)=$objext 79818bf5c682Smrg 79828bf5c682Smrg# Code to be used in simple compile tests 79838bf5c682Smrglt_simple_compile_test_code="class foo {}" 79848bf5c682Smrg 79858bf5c682Smrg# Code to be used in simple link tests 79868bf5c682Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 79878bf5c682Smrg 79888bf5c682Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 79898bf5c682Smrg_LT_TAG_COMPILER 79908bf5c682Smrg 79918bf5c682Smrg# save warnings/boilerplate of simple test code 79928bf5c682Smrg_LT_COMPILER_BOILERPLATE 79938bf5c682Smrg_LT_LINKER_BOILERPLATE 79948bf5c682Smrg 79958bf5c682Smrg# Allow CC to be a program name with arguments. 79968bf5c682Smrglt_save_CC=$CC 79978bf5c682Smrglt_save_CFLAGS=$CFLAGS 79988bf5c682Smrglt_save_GCC=$GCC 79998bf5c682SmrgGCC=yes 80008bf5c682SmrgCC=${GCJ-"gcj"} 80018bf5c682SmrgCFLAGS=$GCJFLAGS 80028bf5c682Smrgcompiler=$CC 80038bf5c682Smrg_LT_TAGVAR(compiler, $1)=$CC 80048bf5c682Smrg_LT_TAGVAR(LD, $1)=$LD 80058bf5c682Smrg_LT_CC_BASENAME([$compiler]) 80068bf5c682Smrg 80078bf5c682Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 80088bf5c682Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 80098bf5c682Smrg 80108bf5c682Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 80118bf5c682Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 80128bf5c682Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 80138bf5c682Smrg 80148bf5c682Smrg## CAVEAT EMPTOR: 80158bf5c682Smrg## There is no encapsulation within the following macros, do not change 80168bf5c682Smrg## the running order or otherwise move them around unless you know exactly 80178bf5c682Smrg## what you are doing... 80188bf5c682Smrgif test -n "$compiler"; then 80198bf5c682Smrg _LT_COMPILER_NO_RTTI($1) 80208bf5c682Smrg _LT_COMPILER_PIC($1) 80218bf5c682Smrg _LT_COMPILER_C_O($1) 80228bf5c682Smrg _LT_COMPILER_FILE_LOCKS($1) 80238bf5c682Smrg _LT_LINKER_SHLIBS($1) 80248bf5c682Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 80258bf5c682Smrg 80268bf5c682Smrg _LT_CONFIG($1) 80278bf5c682Smrgfi 80288bf5c682Smrg 80298bf5c682SmrgAC_LANG_RESTORE 80308bf5c682Smrg 80318bf5c682SmrgGCC=$lt_save_GCC 80328bf5c682SmrgCC=$lt_save_CC 80338bf5c682SmrgCFLAGS=$lt_save_CFLAGS 80348bf5c682Smrg])# _LT_LANG_GCJ_CONFIG 80358bf5c682Smrg 80368bf5c682Smrg 80378bf5c682Smrg# _LT_LANG_GO_CONFIG([TAG]) 80388bf5c682Smrg# -------------------------- 80398bf5c682Smrg# Ensure that the configuration variables for the GNU Go compiler 80408bf5c682Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 80418bf5c682Smrg# to write the compiler configuration to 'libtool'. 80428bf5c682Smrgm4_defun([_LT_LANG_GO_CONFIG], 80438bf5c682Smrg[AC_REQUIRE([LT_PROG_GO])dnl 80448bf5c682SmrgAC_LANG_SAVE 80458bf5c682Smrg 80468bf5c682Smrg# Source file extension for Go test sources. 80478bf5c682Smrgac_ext=go 80488bf5c682Smrg 80498bf5c682Smrg# Object file extension for compiled Go test sources. 80508bf5c682Smrgobjext=o 80518bf5c682Smrg_LT_TAGVAR(objext, $1)=$objext 80528bf5c682Smrg 80538bf5c682Smrg# Code to be used in simple compile tests 80548bf5c682Smrglt_simple_compile_test_code="package main; func main() { }" 80558bf5c682Smrg 80568bf5c682Smrg# Code to be used in simple link tests 80578bf5c682Smrglt_simple_link_test_code='package main; func main() { }' 80588bf5c682Smrg 80598bf5c682Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 80608bf5c682Smrg_LT_TAG_COMPILER 80618bf5c682Smrg 80628bf5c682Smrg# save warnings/boilerplate of simple test code 80638bf5c682Smrg_LT_COMPILER_BOILERPLATE 80648bf5c682Smrg_LT_LINKER_BOILERPLATE 80658bf5c682Smrg 80668bf5c682Smrg# Allow CC to be a program name with arguments. 80678bf5c682Smrglt_save_CC=$CC 80688bf5c682Smrglt_save_CFLAGS=$CFLAGS 80698bf5c682Smrglt_save_GCC=$GCC 80708bf5c682SmrgGCC=yes 80718bf5c682SmrgCC=${GOC-"gccgo"} 80728bf5c682SmrgCFLAGS=$GOFLAGS 80738bf5c682Smrgcompiler=$CC 80748bf5c682Smrg_LT_TAGVAR(compiler, $1)=$CC 80758bf5c682Smrg_LT_TAGVAR(LD, $1)=$LD 80768bf5c682Smrg_LT_CC_BASENAME([$compiler]) 80778bf5c682Smrg 80788bf5c682Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 80798bf5c682Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 80808bf5c682Smrg 80818bf5c682Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 80828bf5c682Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 80838bf5c682Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 80848bf5c682Smrg 80858bf5c682Smrg## CAVEAT EMPTOR: 80868bf5c682Smrg## There is no encapsulation within the following macros, do not change 80878bf5c682Smrg## the running order or otherwise move them around unless you know exactly 80888bf5c682Smrg## what you are doing... 80898bf5c682Smrgif test -n "$compiler"; then 80908bf5c682Smrg _LT_COMPILER_NO_RTTI($1) 80918bf5c682Smrg _LT_COMPILER_PIC($1) 80928bf5c682Smrg _LT_COMPILER_C_O($1) 80938bf5c682Smrg _LT_COMPILER_FILE_LOCKS($1) 80948bf5c682Smrg _LT_LINKER_SHLIBS($1) 80958bf5c682Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 80968bf5c682Smrg 80978bf5c682Smrg _LT_CONFIG($1) 80988bf5c682Smrgfi 80998bf5c682Smrg 81008bf5c682SmrgAC_LANG_RESTORE 81018bf5c682Smrg 81028bf5c682SmrgGCC=$lt_save_GCC 81038bf5c682SmrgCC=$lt_save_CC 81048bf5c682SmrgCFLAGS=$lt_save_CFLAGS 81058bf5c682Smrg])# _LT_LANG_GO_CONFIG 81068bf5c682Smrg 81078bf5c682Smrg 81088bf5c682Smrg# _LT_LANG_RC_CONFIG([TAG]) 81098bf5c682Smrg# ------------------------- 81108bf5c682Smrg# Ensure that the configuration variables for the Windows resource compiler 81118bf5c682Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 81128bf5c682Smrg# to write the compiler configuration to 'libtool'. 81138bf5c682Smrgm4_defun([_LT_LANG_RC_CONFIG], 81148bf5c682Smrg[AC_REQUIRE([LT_PROG_RC])dnl 81158bf5c682SmrgAC_LANG_SAVE 81168bf5c682Smrg 81178bf5c682Smrg# Source file extension for RC test sources. 81188bf5c682Smrgac_ext=rc 81198bf5c682Smrg 81208bf5c682Smrg# Object file extension for compiled RC test sources. 81218bf5c682Smrgobjext=o 81228bf5c682Smrg_LT_TAGVAR(objext, $1)=$objext 81238bf5c682Smrg 81248bf5c682Smrg# Code to be used in simple compile tests 81258bf5c682Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 81268bf5c682Smrg 81278bf5c682Smrg# Code to be used in simple link tests 81288bf5c682Smrglt_simple_link_test_code=$lt_simple_compile_test_code 81298bf5c682Smrg 81308bf5c682Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 81318bf5c682Smrg_LT_TAG_COMPILER 81328bf5c682Smrg 81338bf5c682Smrg# save warnings/boilerplate of simple test code 81348bf5c682Smrg_LT_COMPILER_BOILERPLATE 81358bf5c682Smrg_LT_LINKER_BOILERPLATE 81368bf5c682Smrg 81378bf5c682Smrg# Allow CC to be a program name with arguments. 81388bf5c682Smrglt_save_CC=$CC 81398bf5c682Smrglt_save_CFLAGS=$CFLAGS 81408bf5c682Smrglt_save_GCC=$GCC 81418bf5c682SmrgGCC= 81428bf5c682SmrgCC=${RC-"windres"} 81438bf5c682SmrgCFLAGS= 81448bf5c682Smrgcompiler=$CC 81458bf5c682Smrg_LT_TAGVAR(compiler, $1)=$CC 81468bf5c682Smrg_LT_CC_BASENAME([$compiler]) 81478bf5c682Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 81488bf5c682Smrg 81498bf5c682Smrgif test -n "$compiler"; then 81508bf5c682Smrg : 81518bf5c682Smrg _LT_CONFIG($1) 81528bf5c682Smrgfi 81538bf5c682Smrg 81548bf5c682SmrgGCC=$lt_save_GCC 81558bf5c682SmrgAC_LANG_RESTORE 81568bf5c682SmrgCC=$lt_save_CC 81578bf5c682SmrgCFLAGS=$lt_save_CFLAGS 81588bf5c682Smrg])# _LT_LANG_RC_CONFIG 81598bf5c682Smrg 81608bf5c682Smrg 81618bf5c682Smrg# LT_PROG_GCJ 81628bf5c682Smrg# ----------- 81638bf5c682SmrgAC_DEFUN([LT_PROG_GCJ], 81648bf5c682Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 81658bf5c682Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 81668bf5c682Smrg [AC_CHECK_TOOL(GCJ, gcj,) 81678bf5c682Smrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 81688bf5c682Smrg AC_SUBST(GCJFLAGS)])])[]dnl 81698bf5c682Smrg]) 81708bf5c682Smrg 81718bf5c682Smrg# Old name: 81728bf5c682SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 81738bf5c682Smrgdnl aclocal-1.4 backwards compatibility: 81748bf5c682Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 81758bf5c682Smrg 81768bf5c682Smrg 81778bf5c682Smrg# LT_PROG_GO 81788bf5c682Smrg# ---------- 81798bf5c682SmrgAC_DEFUN([LT_PROG_GO], 81808bf5c682Smrg[AC_CHECK_TOOL(GOC, gccgo,) 81818bf5c682Smrg]) 81828bf5c682Smrg 81838bf5c682Smrg 81848bf5c682Smrg# LT_PROG_RC 81858bf5c682Smrg# ---------- 81868bf5c682SmrgAC_DEFUN([LT_PROG_RC], 81878bf5c682Smrg[AC_CHECK_TOOL(RC, windres,) 81888bf5c682Smrg]) 81898bf5c682Smrg 81908bf5c682Smrg# Old name: 81918bf5c682SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 81928bf5c682Smrgdnl aclocal-1.4 backwards compatibility: 81938bf5c682Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 81948bf5c682Smrg 81958bf5c682Smrg 81968bf5c682Smrg# _LT_DECL_EGREP 81978bf5c682Smrg# -------------- 81988bf5c682Smrg# If we don't have a new enough Autoconf to choose the best grep 81998bf5c682Smrg# available, choose the one first in the user's PATH. 82008bf5c682Smrgm4_defun([_LT_DECL_EGREP], 82018bf5c682Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 82028bf5c682SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 82038bf5c682Smrgtest -z "$GREP" && GREP=grep 82048bf5c682Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 82058bf5c682Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 82068bf5c682Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 82078bf5c682Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 82088bf5c682SmrgAC_SUBST([GREP]) 82098bf5c682Smrg]) 82108bf5c682Smrg 82118bf5c682Smrg 82128bf5c682Smrg# _LT_DECL_OBJDUMP 82138bf5c682Smrg# -------------- 82148bf5c682Smrg# If we don't have a new enough Autoconf to choose the best objdump 82158bf5c682Smrg# available, choose the one first in the user's PATH. 82168bf5c682Smrgm4_defun([_LT_DECL_OBJDUMP], 82178bf5c682Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 82188bf5c682Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 82198bf5c682Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 82208bf5c682SmrgAC_SUBST([OBJDUMP]) 82218bf5c682Smrg]) 82228bf5c682Smrg 82238bf5c682Smrg# _LT_DECL_DLLTOOL 82248bf5c682Smrg# ---------------- 82258bf5c682Smrg# Ensure DLLTOOL variable is set. 82268bf5c682Smrgm4_defun([_LT_DECL_DLLTOOL], 82278bf5c682Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 82288bf5c682Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 82298bf5c682Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 82308bf5c682SmrgAC_SUBST([DLLTOOL]) 82318bf5c682Smrg]) 82328bf5c682Smrg 82330a1d3ae0Smrg# _LT_DECL_FILECMD 82340a1d3ae0Smrg# ---------------- 82350a1d3ae0Smrg# Check for a file(cmd) program that can be used to detect file type and magic 82360a1d3ae0Smrgm4_defun([_LT_DECL_FILECMD], 82370a1d3ae0Smrg[AC_CHECK_TOOL([FILECMD], [file], [:]) 82380a1d3ae0Smrg_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) 82390a1d3ae0Smrg])# _LD_DECL_FILECMD 82400a1d3ae0Smrg 82418bf5c682Smrg# _LT_DECL_SED 82428bf5c682Smrg# ------------ 82438bf5c682Smrg# Check for a fully-functional sed program, that truncates 82448bf5c682Smrg# as few characters as possible. Prefer GNU sed if found. 82458bf5c682Smrgm4_defun([_LT_DECL_SED], 82468bf5c682Smrg[AC_PROG_SED 82478bf5c682Smrgtest -z "$SED" && SED=sed 82488bf5c682SmrgXsed="$SED -e 1s/^X//" 82498bf5c682Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 82508bf5c682Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 82518bf5c682Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 82528bf5c682Smrg])# _LT_DECL_SED 82538bf5c682Smrg 82548bf5c682Smrgm4_ifndef([AC_PROG_SED], [ 82558bf5c682Smrg############################################################ 82568bf5c682Smrg# NOTE: This macro has been submitted for inclusion into # 82578bf5c682Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 82588bf5c682Smrg# a released version of Autoconf we should remove this # 82598bf5c682Smrg# macro and use it instead. # 82608bf5c682Smrg############################################################ 82618bf5c682Smrg 82628bf5c682Smrgm4_defun([AC_PROG_SED], 82638bf5c682Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 82648bf5c682SmrgAC_CACHE_VAL(lt_cv_path_SED, 82658bf5c682Smrg[# Loop through the user's path and test for sed and gsed. 82668bf5c682Smrg# Then use that list of sed's as ones to test for truncation. 82678bf5c682Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 82688bf5c682Smrgfor as_dir in $PATH 82698bf5c682Smrgdo 82708bf5c682Smrg IFS=$as_save_IFS 82718bf5c682Smrg test -z "$as_dir" && as_dir=. 82728bf5c682Smrg for lt_ac_prog in sed gsed; do 82738bf5c682Smrg for ac_exec_ext in '' $ac_executable_extensions; do 82748bf5c682Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 82758bf5c682Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 82768bf5c682Smrg fi 82778bf5c682Smrg done 82788bf5c682Smrg done 82798bf5c682Smrgdone 82808bf5c682SmrgIFS=$as_save_IFS 82818bf5c682Smrglt_ac_max=0 82828bf5c682Smrglt_ac_count=0 82838bf5c682Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 82848bf5c682Smrg# along with /bin/sed that truncates output. 82858bf5c682Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 82868bf5c682Smrg test ! -f "$lt_ac_sed" && continue 82878bf5c682Smrg cat /dev/null > conftest.in 82888bf5c682Smrg lt_ac_count=0 82898bf5c682Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 82908bf5c682Smrg # Check for GNU sed and select it if it is found. 82918bf5c682Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 82928bf5c682Smrg lt_cv_path_SED=$lt_ac_sed 82938bf5c682Smrg break 82948bf5c682Smrg fi 82958bf5c682Smrg while true; do 82968bf5c682Smrg cat conftest.in conftest.in >conftest.tmp 82978bf5c682Smrg mv conftest.tmp conftest.in 82988bf5c682Smrg cp conftest.in conftest.nl 82998bf5c682Smrg echo >>conftest.nl 83008bf5c682Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 83018bf5c682Smrg cmp -s conftest.out conftest.nl || break 83028bf5c682Smrg # 10000 chars as input seems more than enough 83038bf5c682Smrg test 10 -lt "$lt_ac_count" && break 83048bf5c682Smrg lt_ac_count=`expr $lt_ac_count + 1` 83058bf5c682Smrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 83068bf5c682Smrg lt_ac_max=$lt_ac_count 83078bf5c682Smrg lt_cv_path_SED=$lt_ac_sed 83088bf5c682Smrg fi 83098bf5c682Smrg done 83108bf5c682Smrgdone 83118bf5c682Smrg]) 83128bf5c682SmrgSED=$lt_cv_path_SED 83138bf5c682SmrgAC_SUBST([SED]) 83148bf5c682SmrgAC_MSG_RESULT([$SED]) 83158bf5c682Smrg])#AC_PROG_SED 83168bf5c682Smrg])#m4_ifndef 83178bf5c682Smrg 83188bf5c682Smrg# Old name: 83198bf5c682SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 83208bf5c682Smrgdnl aclocal-1.4 backwards compatibility: 83218bf5c682Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 83228bf5c682Smrg 83238bf5c682Smrg 83248bf5c682Smrg# _LT_CHECK_SHELL_FEATURES 83258bf5c682Smrg# ------------------------ 83268bf5c682Smrg# Find out whether the shell is Bourne or XSI compatible, 83278bf5c682Smrg# or has some other useful features. 83288bf5c682Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 83298bf5c682Smrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 83308bf5c682Smrg lt_unset=unset 83318bf5c682Smrgelse 83328bf5c682Smrg lt_unset=false 83338bf5c682Smrgfi 83348bf5c682Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 83358bf5c682Smrg 83368bf5c682Smrg# test EBCDIC or ASCII 83378bf5c682Smrgcase `echo X|tr X '\101'` in 83388bf5c682Smrg A) # ASCII based system 83398bf5c682Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 83408bf5c682Smrg lt_SP2NL='tr \040 \012' 83418bf5c682Smrg lt_NL2SP='tr \015\012 \040\040' 83428bf5c682Smrg ;; 83438bf5c682Smrg *) # EBCDIC based system 83448bf5c682Smrg lt_SP2NL='tr \100 \n' 83458bf5c682Smrg lt_NL2SP='tr \r\n \100\100' 83468bf5c682Smrg ;; 83478bf5c682Smrgesac 83488bf5c682Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 83498bf5c682Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 83508bf5c682Smrg])# _LT_CHECK_SHELL_FEATURES 83518bf5c682Smrg 83528bf5c682Smrg 83538bf5c682Smrg# _LT_PATH_CONVERSION_FUNCTIONS 83548bf5c682Smrg# ----------------------------- 83558bf5c682Smrg# Determine what file name conversion functions should be used by 83568bf5c682Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 83578bf5c682Smrg# for certain cross-compile configurations and native mingw. 83588bf5c682Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 83598bf5c682Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 83608bf5c682SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 83618bf5c682SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 83628bf5c682SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 83638bf5c682Smrg[case $host in 83648bf5c682Smrg *-*-mingw* ) 83658bf5c682Smrg case $build in 83668bf5c682Smrg *-*-mingw* ) # actually msys 83678bf5c682Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 83688bf5c682Smrg ;; 83698bf5c682Smrg *-*-cygwin* ) 83708bf5c682Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 83718bf5c682Smrg ;; 83728bf5c682Smrg * ) # otherwise, assume *nix 83738bf5c682Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 83748bf5c682Smrg ;; 83758bf5c682Smrg esac 83768bf5c682Smrg ;; 83778bf5c682Smrg *-*-cygwin* ) 83788bf5c682Smrg case $build in 83798bf5c682Smrg *-*-mingw* ) # actually msys 83808bf5c682Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 83818bf5c682Smrg ;; 83828bf5c682Smrg *-*-cygwin* ) 83838bf5c682Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 83848bf5c682Smrg ;; 83858bf5c682Smrg * ) # otherwise, assume *nix 83868bf5c682Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 83878bf5c682Smrg ;; 83888bf5c682Smrg esac 83898bf5c682Smrg ;; 83908bf5c682Smrg * ) # unhandled hosts (and "normal" native builds) 83918bf5c682Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 83928bf5c682Smrg ;; 83938bf5c682Smrgesac 83948bf5c682Smrg]) 83958bf5c682Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 83968bf5c682SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 83978bf5c682Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 83988bf5c682Smrg [0], [convert $build file names to $host format])dnl 83998bf5c682Smrg 84008bf5c682SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 84018bf5c682SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 84028bf5c682Smrg[#assume ordinary cross tools, or native build. 84038bf5c682Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 84048bf5c682Smrgcase $host in 84058bf5c682Smrg *-*-mingw* ) 84068bf5c682Smrg case $build in 84078bf5c682Smrg *-*-mingw* ) # actually msys 84088bf5c682Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 84098bf5c682Smrg ;; 84108bf5c682Smrg esac 84118bf5c682Smrg ;; 84128bf5c682Smrgesac 84138bf5c682Smrg]) 84148bf5c682Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 84158bf5c682SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 84168bf5c682Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 84178bf5c682Smrg [0], [convert $build files to toolchain format])dnl 84188bf5c682Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 8419