19f00f3a1Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 29f00f3a1Smrg# 374835918Smrg# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software 474835918Smrg# Foundation, Inc. 59f00f3a1Smrg# Written by Gordon Matzigkeit, 1996 69f00f3a1Smrg# 79f00f3a1Smrg# This file is free software; the Free Software Foundation gives 89f00f3a1Smrg# unlimited permission to copy and/or distribute it, with or without 99f00f3a1Smrg# modifications, as long as this notice is preserved. 109f00f3a1Smrg 119f00f3a1Smrgm4_define([_LT_COPYING], [dnl 12edce3322Smrg# Copyright (C) 2014 Free Software Foundation, Inc. 13edce3322Smrg# This is free software; see the source for copying conditions. There is NO 14edce3322Smrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15edce3322Smrg 16edce3322Smrg# GNU Libtool is free software; you can redistribute it and/or modify 17edce3322Smrg# it under the terms of the GNU General Public License as published by 18edce3322Smrg# the Free Software Foundation; either version 2 of of the License, or 19edce3322Smrg# (at your option) any later version. 209f00f3a1Smrg# 21edce3322Smrg# As a special exception to the GNU General Public License, if you 22edce3322Smrg# distribute this file as part of a program or library that is built 23edce3322Smrg# using GNU Libtool, you may include this file under the same 24edce3322Smrg# distribution terms that you use for the rest of that program. 259f00f3a1Smrg# 26edce3322Smrg# GNU Libtool is distributed in the hope that it will be useful, but 27edce3322Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 289f00f3a1Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 299f00f3a1Smrg# GNU General Public License for more details. 309f00f3a1Smrg# 319f00f3a1Smrg# You should have received a copy of the GNU General Public License 32edce3322Smrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 339f00f3a1Smrg]) 349f00f3a1Smrg 3574835918Smrg# serial 59 LT_INIT 369f00f3a1Smrg 379f00f3a1Smrg 389f00f3a1Smrg# LT_PREREQ(VERSION) 399f00f3a1Smrg# ------------------ 409f00f3a1Smrg# Complain and exit if this libtool version is less that VERSION. 419f00f3a1Smrgm4_defun([LT_PREREQ], 429f00f3a1Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 439f00f3a1Smrg [m4_default([$3], 449f00f3a1Smrg [m4_fatal([Libtool version $1 or higher is required], 459f00f3a1Smrg 63)])], 469f00f3a1Smrg [$2])]) 479f00f3a1Smrg 489f00f3a1Smrg 499f00f3a1Smrg# _LT_CHECK_BUILDDIR 509f00f3a1Smrg# ------------------ 519f00f3a1Smrg# Complain if the absolute build directory name contains unusual characters 529f00f3a1Smrgm4_defun([_LT_CHECK_BUILDDIR], 539f00f3a1Smrg[case `pwd` in 549f00f3a1Smrg *\ * | *\ *) 559f00f3a1Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 569f00f3a1Smrgesac 579f00f3a1Smrg]) 589f00f3a1Smrg 599f00f3a1Smrg 609f00f3a1Smrg# LT_INIT([OPTIONS]) 619f00f3a1Smrg# ------------------ 629f00f3a1SmrgAC_DEFUN([LT_INIT], 63edce3322Smrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 649f00f3a1SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 659f00f3a1SmrgAC_BEFORE([$0], [LT_LANG])dnl 669f00f3a1SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 679f00f3a1SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 689f00f3a1Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 699f00f3a1Smrg 709f00f3a1Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 719f00f3a1Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 729f00f3a1Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 739f00f3a1Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 749f00f3a1Smrgdnl unless we require an AC_DEFUNed macro: 759f00f3a1SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 769f00f3a1SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 779f00f3a1SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 789f00f3a1SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 799f00f3a1Smrgm4_require([_LT_PROG_LTMAIN])dnl 809f00f3a1Smrg 819f00f3a1Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 829f00f3a1Smrg 839f00f3a1Smrgdnl Parse OPTIONS 849f00f3a1Smrg_LT_SET_OPTIONS([$0], [$1]) 859f00f3a1Smrg 869f00f3a1Smrg# This can be used to rebuild libtool when needed 87edce3322SmrgLIBTOOL_DEPS=$ltmain 889f00f3a1Smrg 899f00f3a1Smrg# Always use our own libtool. 909f00f3a1SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 919f00f3a1SmrgAC_SUBST(LIBTOOL)dnl 929f00f3a1Smrg 939f00f3a1Smrg_LT_SETUP 949f00f3a1Smrg 959f00f3a1Smrg# Only expand once: 969f00f3a1Smrgm4_define([LT_INIT]) 979f00f3a1Smrg])# LT_INIT 989f00f3a1Smrg 999f00f3a1Smrg# Old names: 1009f00f3a1SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 1019f00f3a1SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 1029f00f3a1Smrgdnl aclocal-1.4 backwards compatibility: 1039f00f3a1Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 1049f00f3a1Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1059f00f3a1Smrg 1069f00f3a1Smrg 107edce3322Smrg# _LT_PREPARE_CC_BASENAME 108edce3322Smrg# ----------------------- 109edce3322Smrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 110edce3322Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 111edce3322Smrgfunc_cc_basename () 112edce3322Smrg{ 113edce3322Smrg for cc_temp in @S|@*""; do 114edce3322Smrg case $cc_temp in 115edce3322Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 116edce3322Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 117edce3322Smrg \-*) ;; 118edce3322Smrg *) break;; 119edce3322Smrg esac 120edce3322Smrg done 121edce3322Smrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 122edce3322Smrg} 123edce3322Smrg])# _LT_PREPARE_CC_BASENAME 124edce3322Smrg 125edce3322Smrg 1269f00f3a1Smrg# _LT_CC_BASENAME(CC) 1279f00f3a1Smrg# ------------------- 128edce3322Smrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 129edce3322Smrg# but that macro is also expanded into generated libtool script, which 130edce3322Smrg# arranges for $SED and $ECHO to be set by different means. 1319f00f3a1Smrgm4_defun([_LT_CC_BASENAME], 132edce3322Smrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 133edce3322SmrgAC_REQUIRE([_LT_DECL_SED])dnl 134edce3322SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 135edce3322Smrgfunc_cc_basename $1 136edce3322Smrgcc_basename=$func_cc_basename_result 1379f00f3a1Smrg]) 1389f00f3a1Smrg 1399f00f3a1Smrg 1409f00f3a1Smrg# _LT_FILEUTILS_DEFAULTS 1419f00f3a1Smrg# ---------------------- 1429f00f3a1Smrg# It is okay to use these file commands and assume they have been set 143edce3322Smrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 1449f00f3a1Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 1459f00f3a1Smrg[: ${CP="cp -f"} 1469f00f3a1Smrg: ${MV="mv -f"} 1479f00f3a1Smrg: ${RM="rm -f"} 1489f00f3a1Smrg])# _LT_FILEUTILS_DEFAULTS 1499f00f3a1Smrg 1509f00f3a1Smrg 1519f00f3a1Smrg# _LT_SETUP 1529f00f3a1Smrg# --------- 1539f00f3a1Smrgm4_defun([_LT_SETUP], 1549f00f3a1Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1559f00f3a1SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 1569f00f3a1SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 1579f00f3a1SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1589f00f3a1Smrg 1599f00f3a1Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 1609f00f3a1Smrgdnl 1619f00f3a1Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 1629f00f3a1Smrg_LT_DECL([], [host], [0])dnl 1639f00f3a1Smrg_LT_DECL([], [host_os], [0])dnl 1649f00f3a1Smrgdnl 1659f00f3a1Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 1669f00f3a1Smrg_LT_DECL([], [build], [0])dnl 1679f00f3a1Smrg_LT_DECL([], [build_os], [0])dnl 1689f00f3a1Smrgdnl 1699f00f3a1SmrgAC_REQUIRE([AC_PROG_CC])dnl 1709f00f3a1SmrgAC_REQUIRE([LT_PATH_LD])dnl 1719f00f3a1SmrgAC_REQUIRE([LT_PATH_NM])dnl 1729f00f3a1Smrgdnl 1739f00f3a1SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 1749f00f3a1Smrgtest -z "$LN_S" && LN_S="ln -s" 1759f00f3a1Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 1769f00f3a1Smrgdnl 1779f00f3a1SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 1789f00f3a1Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 1799f00f3a1Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 1809f00f3a1Smrgdnl 1819f00f3a1Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1829f00f3a1Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 1839f00f3a1Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 1849f00f3a1Smrgm4_require([_LT_CMD_RELOAD])dnl 18574835918Smrgm4_require([_LT_DECL_FILECMD])dnl 1869f00f3a1Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 1879f00f3a1Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 1889f00f3a1Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 1899f00f3a1Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 1909f00f3a1Smrgm4_require([_LT_WITH_SYSROOT])dnl 191edce3322Smrgm4_require([_LT_CMD_TRUNCATE])dnl 1929f00f3a1Smrg 1939f00f3a1Smrg_LT_CONFIG_LIBTOOL_INIT([ 194edce3322Smrg# See if we are running on zsh, and set the options that allow our 1959f00f3a1Smrg# commands through without removal of \ escapes INIT. 196edce3322Smrgif test -n "\${ZSH_VERSION+set}"; then 1979f00f3a1Smrg setopt NO_GLOB_SUBST 1989f00f3a1Smrgfi 1999f00f3a1Smrg]) 200edce3322Smrgif test -n "${ZSH_VERSION+set}"; then 2019f00f3a1Smrg setopt NO_GLOB_SUBST 2029f00f3a1Smrgfi 2039f00f3a1Smrg 2049f00f3a1Smrg_LT_CHECK_OBJDIR 2059f00f3a1Smrg 2069f00f3a1Smrgm4_require([_LT_TAG_COMPILER])dnl 2079f00f3a1Smrg 2089f00f3a1Smrgcase $host_os in 2099f00f3a1Smrgaix3*) 2109f00f3a1Smrg # AIX sometimes has problems with the GCC collect2 program. For some 2119f00f3a1Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 2129f00f3a1Smrg # vanish in a puff of smoke. 213edce3322Smrg if test set != "${COLLECT_NAMES+set}"; then 2149f00f3a1Smrg COLLECT_NAMES= 2159f00f3a1Smrg export COLLECT_NAMES 2169f00f3a1Smrg fi 2179f00f3a1Smrg ;; 2189f00f3a1Smrgesac 2199f00f3a1Smrg 2209f00f3a1Smrg# Global variables: 2219f00f3a1Smrgofile=libtool 2229f00f3a1Smrgcan_build_shared=yes 2239f00f3a1Smrg 22474835918Smrg# All known linkers require a '.a' archive for static linking (except MSVC and 22574835918Smrg# ICC, which need '.lib'). 2269f00f3a1Smrglibext=a 2279f00f3a1Smrg 228edce3322Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 2299f00f3a1Smrg 230edce3322Smrgold_CC=$CC 231edce3322Smrgold_CFLAGS=$CFLAGS 2329f00f3a1Smrg 2339f00f3a1Smrg# Set sane defaults for various variables 2349f00f3a1Smrgtest -z "$CC" && CC=cc 2359f00f3a1Smrgtest -z "$LTCC" && LTCC=$CC 2369f00f3a1Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 2379f00f3a1Smrgtest -z "$LD" && LD=ld 2389f00f3a1Smrgtest -z "$ac_objext" && ac_objext=o 2399f00f3a1Smrg 2409f00f3a1Smrg_LT_CC_BASENAME([$compiler]) 2419f00f3a1Smrg 2429f00f3a1Smrg# Only perform the check for file, if the check method requires it 2439f00f3a1Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 2449f00f3a1Smrgcase $deplibs_check_method in 2459f00f3a1Smrgfile_magic*) 2469f00f3a1Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2479f00f3a1Smrg _LT_PATH_MAGIC 2489f00f3a1Smrg fi 2499f00f3a1Smrg ;; 2509f00f3a1Smrgesac 2519f00f3a1Smrg 2529f00f3a1Smrg# Use C for the default configuration in the libtool script 2539f00f3a1SmrgLT_SUPPORTED_TAG([CC]) 2549f00f3a1Smrg_LT_LANG_C_CONFIG 2559f00f3a1Smrg_LT_LANG_DEFAULT_CONFIG 2569f00f3a1Smrg_LT_CONFIG_COMMANDS 2579f00f3a1Smrg])# _LT_SETUP 2589f00f3a1Smrg 2599f00f3a1Smrg 2609f00f3a1Smrg# _LT_PREPARE_SED_QUOTE_VARS 2619f00f3a1Smrg# -------------------------- 2629f00f3a1Smrg# Define a few sed substitution that help us do robust quoting. 2639f00f3a1Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 2649f00f3a1Smrg[# Backslashify metacharacters that are still active within 2659f00f3a1Smrg# double-quoted strings. 2669f00f3a1Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 2679f00f3a1Smrg 2689f00f3a1Smrg# Same as above, but do not quote variable references. 2699f00f3a1Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 2709f00f3a1Smrg 2719f00f3a1Smrg# Sed substitution to delay expansion of an escaped shell variable in a 2729f00f3a1Smrg# double_quote_subst'ed string. 2739f00f3a1Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 2749f00f3a1Smrg 2759f00f3a1Smrg# Sed substitution to delay expansion of an escaped single quote. 2769f00f3a1Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 2779f00f3a1Smrg 2789f00f3a1Smrg# Sed substitution to avoid accidental globbing in evaled expressions 2799f00f3a1Smrgno_glob_subst='s/\*/\\\*/g' 2809f00f3a1Smrg]) 2819f00f3a1Smrg 2829f00f3a1Smrg# _LT_PROG_LTMAIN 2839f00f3a1Smrg# --------------- 284edce3322Smrg# Note that this code is called both from 'configure', and 'config.status' 2859f00f3a1Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 286edce3322Smrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 2879f00f3a1Smrg# so we pass a copy along to make sure it has a sensible value anyway. 2889f00f3a1Smrgm4_defun([_LT_PROG_LTMAIN], 2899f00f3a1Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 2909f00f3a1Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 291edce3322Smrgltmain=$ac_aux_dir/ltmain.sh 2929f00f3a1Smrg])# _LT_PROG_LTMAIN 2939f00f3a1Smrg 2949f00f3a1Smrg 2959f00f3a1Smrg## ------------------------------------- ## 2969f00f3a1Smrg## Accumulate code for creating libtool. ## 2979f00f3a1Smrg## ------------------------------------- ## 2989f00f3a1Smrg 2999f00f3a1Smrg# So that we can recreate a full libtool script including additional 3009f00f3a1Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 301edce3322Smrg# in macros and then make a single call at the end using the 'libtool' 3029f00f3a1Smrg# label. 3039f00f3a1Smrg 3049f00f3a1Smrg 3059f00f3a1Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 3069f00f3a1Smrg# ---------------------------------------- 3079f00f3a1Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3089f00f3a1Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 3099f00f3a1Smrg[m4_ifval([$1], 3109f00f3a1Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3119f00f3a1Smrg [$1 3129f00f3a1Smrg])])]) 3139f00f3a1Smrg 3149f00f3a1Smrg# Initialize. 3159f00f3a1Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 3169f00f3a1Smrg 3179f00f3a1Smrg 3189f00f3a1Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 3199f00f3a1Smrg# ------------------------------ 3209f00f3a1Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3219f00f3a1Smrgm4_define([_LT_CONFIG_LIBTOOL], 3229f00f3a1Smrg[m4_ifval([$1], 3239f00f3a1Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3249f00f3a1Smrg [$1 3259f00f3a1Smrg])])]) 3269f00f3a1Smrg 3279f00f3a1Smrg# Initialize. 3289f00f3a1Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3299f00f3a1Smrg 3309f00f3a1Smrg 3319f00f3a1Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3329f00f3a1Smrg# ----------------------------------------------------- 3339f00f3a1Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 3349f00f3a1Smrg[_LT_CONFIG_LIBTOOL([$1]) 3359f00f3a1Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 3369f00f3a1Smrg]) 3379f00f3a1Smrg 3389f00f3a1Smrg 3399f00f3a1Smrg# _LT_FORMAT_COMMENT([COMMENT]) 3409f00f3a1Smrg# ----------------------------- 3419f00f3a1Smrg# Add leading comment marks to the start of each line, and a trailing 3429f00f3a1Smrg# full-stop to the whole comment if one is not present already. 3439f00f3a1Smrgm4_define([_LT_FORMAT_COMMENT], 3449f00f3a1Smrg[m4_ifval([$1], [ 3459f00f3a1Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3469f00f3a1Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3479f00f3a1Smrg)]) 3489f00f3a1Smrg 3499f00f3a1Smrg 3509f00f3a1Smrg 3519f00f3a1Smrg## ------------------------ ## 3529f00f3a1Smrg## FIXME: Eliminate VARNAME ## 3539f00f3a1Smrg## ------------------------ ## 3549f00f3a1Smrg 3559f00f3a1Smrg 3569f00f3a1Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3579f00f3a1Smrg# ------------------------------------------------------------------- 3589f00f3a1Smrg# CONFIGNAME is the name given to the value in the libtool script. 3599f00f3a1Smrg# VARNAME is the (base) name used in the configure script. 3609f00f3a1Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3619f00f3a1Smrg# VARNAME. Any other value will be used directly. 3629f00f3a1Smrgm4_define([_LT_DECL], 3639f00f3a1Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3649f00f3a1Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3659f00f3a1Smrg [m4_ifval([$1], [$1], [$2])]) 3669f00f3a1Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3679f00f3a1Smrg m4_ifval([$4], 3689f00f3a1Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3699f00f3a1Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 3709f00f3a1Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 3719f00f3a1Smrg]) 3729f00f3a1Smrg 3739f00f3a1Smrg 3749f00f3a1Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3759f00f3a1Smrg# -------------------------------------------------------- 3769f00f3a1Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3779f00f3a1Smrg 3789f00f3a1Smrg 3799f00f3a1Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3809f00f3a1Smrg# ------------------------------------------------ 3819f00f3a1Smrgm4_define([lt_decl_tag_varnames], 3829f00f3a1Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 3839f00f3a1Smrg 3849f00f3a1Smrg 3859f00f3a1Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 3869f00f3a1Smrg# --------------------------------------------------------- 3879f00f3a1Smrgm4_define([_lt_decl_filter], 3889f00f3a1Smrg[m4_case([$#], 3899f00f3a1Smrg [0], [m4_fatal([$0: too few arguments: $#])], 3909f00f3a1Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 3919f00f3a1Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 3929f00f3a1Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 3939f00f3a1Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 3949f00f3a1Smrg]) 3959f00f3a1Smrg 3969f00f3a1Smrg 3979f00f3a1Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 3989f00f3a1Smrg# -------------------------------------------------- 3999f00f3a1Smrgm4_define([lt_decl_quote_varnames], 4009f00f3a1Smrg[_lt_decl_filter([value], [1], $@)]) 4019f00f3a1Smrg 4029f00f3a1Smrg 4039f00f3a1Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 4049f00f3a1Smrg# --------------------------------------------------- 4059f00f3a1Smrgm4_define([lt_decl_dquote_varnames], 4069f00f3a1Smrg[_lt_decl_filter([value], [2], $@)]) 4079f00f3a1Smrg 4089f00f3a1Smrg 4099f00f3a1Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 4109f00f3a1Smrg# --------------------------------------------------- 4119f00f3a1Smrgm4_define([lt_decl_varnames_tagged], 4129f00f3a1Smrg[m4_assert([$# <= 2])dnl 4139f00f3a1Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 4149f00f3a1Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 4159f00f3a1Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 4169f00f3a1Smrgm4_define([_lt_decl_varnames_tagged], 4179f00f3a1Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 4189f00f3a1Smrg 4199f00f3a1Smrg 4209f00f3a1Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 4219f00f3a1Smrg# ------------------------------------------------ 4229f00f3a1Smrgm4_define([lt_decl_all_varnames], 4239f00f3a1Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 4249f00f3a1Smrg m4_if([$2], [], 4259f00f3a1Smrg m4_quote(lt_decl_varnames), 4269f00f3a1Smrg m4_quote(m4_shift($@))))[]dnl 4279f00f3a1Smrg]) 4289f00f3a1Smrgm4_define([_lt_decl_all_varnames], 4299f00f3a1Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 4309f00f3a1Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 4319f00f3a1Smrg]) 4329f00f3a1Smrg 4339f00f3a1Smrg 4349f00f3a1Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 4359f00f3a1Smrg# ------------------------------------ 436edce3322Smrg# Quote a variable value, and forward it to 'config.status' so that its 437edce3322Smrg# declaration there will have the same value as in 'configure'. VARNAME 4389f00f3a1Smrg# must have a single quote delimited value for this to work. 4399f00f3a1Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 4409f00f3a1Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 4419f00f3a1Smrg 4429f00f3a1Smrg 4439f00f3a1Smrg# _LT_CONFIG_STATUS_DECLARATIONS 4449f00f3a1Smrg# ------------------------------ 4459f00f3a1Smrg# We delimit libtool config variables with single quotes, so when 4469f00f3a1Smrg# we write them to config.status, we have to be sure to quote all 4479f00f3a1Smrg# embedded single quotes properly. In configure, this macro expands 4489f00f3a1Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 4499f00f3a1Smrg# 4509f00f3a1Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 4519f00f3a1Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 4529f00f3a1Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 4539f00f3a1Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 4549f00f3a1Smrg 4559f00f3a1Smrg 4569f00f3a1Smrg# _LT_LIBTOOL_TAGS 4579f00f3a1Smrg# ---------------- 4589f00f3a1Smrg# Output comment and list of tags supported by the script 4599f00f3a1Smrgm4_defun([_LT_LIBTOOL_TAGS], 4609f00f3a1Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 461edce3322Smrgavailable_tags='_LT_TAGS'dnl 4629f00f3a1Smrg]) 4639f00f3a1Smrg 4649f00f3a1Smrg 4659f00f3a1Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 4669f00f3a1Smrg# ----------------------------------- 4679f00f3a1Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 4689f00f3a1Smrg# expand to a commented shell variable setting: 4699f00f3a1Smrg# 4709f00f3a1Smrg# # Some comment about what VAR is for. 4719f00f3a1Smrg# visible_name=$lt_internal_name 4729f00f3a1Smrgm4_define([_LT_LIBTOOL_DECLARE], 4739f00f3a1Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 4749f00f3a1Smrg [description])))[]dnl 4759f00f3a1Smrgm4_pushdef([_libtool_name], 4769f00f3a1Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 4779f00f3a1Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 4789f00f3a1Smrg [0], [_libtool_name=[$]$1], 4799f00f3a1Smrg [1], [_libtool_name=$lt_[]$1], 4809f00f3a1Smrg [2], [_libtool_name=$lt_[]$1], 4819f00f3a1Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 4829f00f3a1Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 4839f00f3a1Smrg]) 4849f00f3a1Smrg 4859f00f3a1Smrg 4869f00f3a1Smrg# _LT_LIBTOOL_CONFIG_VARS 4879f00f3a1Smrg# ----------------------- 4889f00f3a1Smrg# Produce commented declarations of non-tagged libtool config variables 489edce3322Smrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 4909f00f3a1Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 4919f00f3a1Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 4929f00f3a1Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 4939f00f3a1Smrg[m4_foreach([_lt_var], 4949f00f3a1Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 4959f00f3a1Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 4969f00f3a1Smrg 4979f00f3a1Smrg 4989f00f3a1Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 4999f00f3a1Smrg# ------------------------- 5009f00f3a1Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 5019f00f3a1Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 5029f00f3a1Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 5039f00f3a1Smrg 5049f00f3a1Smrg 5059f00f3a1Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 5069f00f3a1Smrg# ------------------------------ 5079f00f3a1Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 5089f00f3a1Smrg 5099f00f3a1Smrg 5109f00f3a1Smrg# _LT_CONFIG_COMMANDS 5119f00f3a1Smrg# ------------------- 5129f00f3a1Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 5139f00f3a1Smrg# variables for single and double quote escaping we saved from calls 5149f00f3a1Smrg# to _LT_DECL, we can put quote escaped variables declarations 515edce3322Smrg# into 'config.status', and then the shell code to quote escape them in 516edce3322Smrg# for loops in 'config.status'. Finally, any additional code accumulated 5179f00f3a1Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 5189f00f3a1Smrgm4_defun([_LT_CONFIG_COMMANDS], 5199f00f3a1Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 5209f00f3a1Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 5219f00f3a1Smrg dnl instead of duplicating it all over again into config.status, 5229f00f3a1Smrg dnl then we will have config.status run $CONFIG_LT later, so it 5239f00f3a1Smrg dnl needs to know what name is stored there: 5249f00f3a1Smrg [AC_CONFIG_COMMANDS([libtool], 5259f00f3a1Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 5269f00f3a1Smrg dnl If the libtool generation code is destined for config.status, 5279f00f3a1Smrg dnl expand the accumulated commands and init code now: 5289f00f3a1Smrg [AC_CONFIG_COMMANDS([libtool], 5299f00f3a1Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 5309f00f3a1Smrg])#_LT_CONFIG_COMMANDS 5319f00f3a1Smrg 5329f00f3a1Smrg 5339f00f3a1Smrg# Initialize. 5349f00f3a1Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 5359f00f3a1Smrg[ 5369f00f3a1Smrg 5379f00f3a1Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 5389f00f3a1Smrg# if CDPATH is set. 5399f00f3a1Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 5409f00f3a1Smrg 5419f00f3a1Smrgsed_quote_subst='$sed_quote_subst' 5429f00f3a1Smrgdouble_quote_subst='$double_quote_subst' 5439f00f3a1Smrgdelay_variable_subst='$delay_variable_subst' 5449f00f3a1Smrg_LT_CONFIG_STATUS_DECLARATIONS 5459f00f3a1SmrgLTCC='$LTCC' 5469f00f3a1SmrgLTCFLAGS='$LTCFLAGS' 5479f00f3a1Smrgcompiler='$compiler_DEFAULT' 5489f00f3a1Smrg 5499f00f3a1Smrg# A function that is used when there is no print builtin or printf. 5509f00f3a1Smrgfunc_fallback_echo () 5519f00f3a1Smrg{ 5529f00f3a1Smrg eval 'cat <<_LTECHO_EOF 5539f00f3a1Smrg\$[]1 5549f00f3a1Smrg_LTECHO_EOF' 5559f00f3a1Smrg} 5569f00f3a1Smrg 5579f00f3a1Smrg# Quote evaled strings. 5589f00f3a1Smrgfor var in lt_decl_all_varnames([[ \ 5599f00f3a1Smrg]], lt_decl_quote_varnames); do 5609f00f3a1Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5619f00f3a1Smrg *[[\\\\\\\`\\"\\\$]]*) 562edce3322Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 5639f00f3a1Smrg ;; 5649f00f3a1Smrg *) 5659f00f3a1Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5669f00f3a1Smrg ;; 5679f00f3a1Smrg esac 5689f00f3a1Smrgdone 5699f00f3a1Smrg 5709f00f3a1Smrg# Double-quote double-evaled strings. 5719f00f3a1Smrgfor var in lt_decl_all_varnames([[ \ 5729f00f3a1Smrg]], lt_decl_dquote_varnames); do 5739f00f3a1Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5749f00f3a1Smrg *[[\\\\\\\`\\"\\\$]]*) 575edce3322Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 5769f00f3a1Smrg ;; 5779f00f3a1Smrg *) 5789f00f3a1Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5799f00f3a1Smrg ;; 5809f00f3a1Smrg esac 5819f00f3a1Smrgdone 5829f00f3a1Smrg 5839f00f3a1Smrg_LT_OUTPUT_LIBTOOL_INIT 5849f00f3a1Smrg]) 5859f00f3a1Smrg 5869f00f3a1Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 5879f00f3a1Smrg# ------------------------------------ 5889f00f3a1Smrg# Generate a child script FILE with all initialization necessary to 5899f00f3a1Smrg# reuse the environment learned by the parent script, and make the 5909f00f3a1Smrg# file executable. If COMMENT is supplied, it is inserted after the 591edce3322Smrg# '#!' sequence but before initialization text begins. After this 5929f00f3a1Smrg# macro, additional text can be appended to FILE to form the body of 5939f00f3a1Smrg# the child script. The macro ends with non-zero status if the 5949f00f3a1Smrg# file could not be fully written (such as if the disk is full). 5959f00f3a1Smrgm4_ifdef([AS_INIT_GENERATED], 5969f00f3a1Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 5979f00f3a1Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 5989f00f3a1Smrg[m4_require([AS_PREPARE])]dnl 5999f00f3a1Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 6009f00f3a1Smrg[lt_write_fail=0 6019f00f3a1Smrgcat >$1 <<_ASEOF || lt_write_fail=1 6029f00f3a1Smrg#! $SHELL 6039f00f3a1Smrg# Generated by $as_me. 6049f00f3a1Smrg$2 6059f00f3a1SmrgSHELL=\${CONFIG_SHELL-$SHELL} 6069f00f3a1Smrgexport SHELL 6079f00f3a1Smrg_ASEOF 6089f00f3a1Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 6099f00f3a1SmrgAS_SHELL_SANITIZE 6109f00f3a1Smrg_AS_PREPARE 6119f00f3a1Smrgexec AS_MESSAGE_FD>&1 6129f00f3a1Smrg_ASEOF 613edce3322Smrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 6149f00f3a1Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 6159f00f3a1Smrg 6169f00f3a1Smrg# LT_OUTPUT 6179f00f3a1Smrg# --------- 6189f00f3a1Smrg# This macro allows early generation of the libtool script (before 6199f00f3a1Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 6209f00f3a1Smrg# tests. 6219f00f3a1SmrgAC_DEFUN([LT_OUTPUT], 6229f00f3a1Smrg[: ${CONFIG_LT=./config.lt} 6239f00f3a1SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 6249f00f3a1Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 6259f00f3a1Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 6269f00f3a1Smrg 6279f00f3a1Smrgcat >>"$CONFIG_LT" <<\_LTEOF 6289f00f3a1Smrglt_cl_silent=false 6299f00f3a1Smrgexec AS_MESSAGE_LOG_FD>>config.log 6309f00f3a1Smrg{ 6319f00f3a1Smrg echo 6329f00f3a1Smrg AS_BOX([Running $as_me.]) 6339f00f3a1Smrg} >&AS_MESSAGE_LOG_FD 6349f00f3a1Smrg 6359f00f3a1Smrglt_cl_help="\ 636edce3322Smrg'$as_me' creates a local libtool stub from the current configuration, 6379f00f3a1Smrgfor use in further configure time tests before the real libtool is 6389f00f3a1Smrggenerated. 6399f00f3a1Smrg 6409f00f3a1SmrgUsage: $[0] [[OPTIONS]] 6419f00f3a1Smrg 6429f00f3a1Smrg -h, --help print this help, then exit 6439f00f3a1Smrg -V, --version print version number, then exit 6449f00f3a1Smrg -q, --quiet do not print progress messages 6459f00f3a1Smrg -d, --debug don't remove temporary files 6469f00f3a1Smrg 6479f00f3a1SmrgReport bugs to <bug-libtool@gnu.org>." 6489f00f3a1Smrg 6499f00f3a1Smrglt_cl_version="\ 6509f00f3a1Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 6519f00f3a1Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 6529f00f3a1Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 6539f00f3a1Smrg 6549f00f3a1SmrgCopyright (C) 2011 Free Software Foundation, Inc. 6559f00f3a1SmrgThis config.lt script is free software; the Free Software Foundation 6569f00f3a1Smrggives unlimited permision to copy, distribute and modify it." 6579f00f3a1Smrg 658edce3322Smrgwhile test 0 != $[#] 6599f00f3a1Smrgdo 6609f00f3a1Smrg case $[1] in 6619f00f3a1Smrg --version | --v* | -V ) 6629f00f3a1Smrg echo "$lt_cl_version"; exit 0 ;; 6639f00f3a1Smrg --help | --h* | -h ) 6649f00f3a1Smrg echo "$lt_cl_help"; exit 0 ;; 6659f00f3a1Smrg --debug | --d* | -d ) 6669f00f3a1Smrg debug=: ;; 6679f00f3a1Smrg --quiet | --q* | --silent | --s* | -q ) 6689f00f3a1Smrg lt_cl_silent=: ;; 6699f00f3a1Smrg 6709f00f3a1Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 671edce3322SmrgTry '$[0] --help' for more information.]) ;; 6729f00f3a1Smrg 6739f00f3a1Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 674edce3322SmrgTry '$[0] --help' for more information.]) ;; 6759f00f3a1Smrg esac 6769f00f3a1Smrg shift 6779f00f3a1Smrgdone 6789f00f3a1Smrg 6799f00f3a1Smrgif $lt_cl_silent; then 6809f00f3a1Smrg exec AS_MESSAGE_FD>/dev/null 6819f00f3a1Smrgfi 6829f00f3a1Smrg_LTEOF 6839f00f3a1Smrg 6849f00f3a1Smrgcat >>"$CONFIG_LT" <<_LTEOF 6859f00f3a1Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 6869f00f3a1Smrg_LTEOF 6879f00f3a1Smrg 6889f00f3a1Smrgcat >>"$CONFIG_LT" <<\_LTEOF 6899f00f3a1SmrgAC_MSG_NOTICE([creating $ofile]) 6909f00f3a1Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 6919f00f3a1SmrgAS_EXIT(0) 6929f00f3a1Smrg_LTEOF 6939f00f3a1Smrgchmod +x "$CONFIG_LT" 6949f00f3a1Smrg 6959f00f3a1Smrg# configure is writing to config.log, but config.lt does its own redirection, 6969f00f3a1Smrg# appending to config.log, which fails on DOS, as config.log is still kept 6979f00f3a1Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 6989f00f3a1Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 6999f00f3a1Smrglt_cl_success=: 700edce3322Smrgtest yes = "$silent" && 7019f00f3a1Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 7029f00f3a1Smrgexec AS_MESSAGE_LOG_FD>/dev/null 7039f00f3a1Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 7049f00f3a1Smrgexec AS_MESSAGE_LOG_FD>>config.log 7059f00f3a1Smrg$lt_cl_success || AS_EXIT(1) 7069f00f3a1Smrg])# LT_OUTPUT 7079f00f3a1Smrg 7089f00f3a1Smrg 7099f00f3a1Smrg# _LT_CONFIG(TAG) 7109f00f3a1Smrg# --------------- 7119f00f3a1Smrg# If TAG is the built-in tag, create an initial libtool script with a 7129f00f3a1Smrg# default configuration from the untagged config vars. Otherwise add code 7139f00f3a1Smrg# to config.status for appending the configuration named by TAG from the 7149f00f3a1Smrg# matching tagged config vars. 7159f00f3a1Smrgm4_defun([_LT_CONFIG], 7169f00f3a1Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7179f00f3a1Smrg_LT_CONFIG_SAVE_COMMANDS([ 7189f00f3a1Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 7199f00f3a1Smrg m4_if(_LT_TAG, [C], [ 720edce3322Smrg # See if we are running on zsh, and set the options that allow our 7219f00f3a1Smrg # commands through without removal of \ escapes. 722edce3322Smrg if test -n "${ZSH_VERSION+set}"; then 7239f00f3a1Smrg setopt NO_GLOB_SUBST 7249f00f3a1Smrg fi 7259f00f3a1Smrg 726edce3322Smrg cfgfile=${ofile}T 7279f00f3a1Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 7289f00f3a1Smrg $RM "$cfgfile" 7299f00f3a1Smrg 7309f00f3a1Smrg cat <<_LT_EOF >> "$cfgfile" 7319f00f3a1Smrg#! $SHELL 732edce3322Smrg# Generated automatically by $as_me ($PACKAGE) $VERSION 7339f00f3a1Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 7349f00f3a1Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 735edce3322Smrg 736edce3322Smrg# Provide generalized library-building support services. 737edce3322Smrg# Written by Gordon Matzigkeit, 1996 738edce3322Smrg 7399f00f3a1Smrg_LT_COPYING 7409f00f3a1Smrg_LT_LIBTOOL_TAGS 7419f00f3a1Smrg 742edce3322Smrg# Configured defaults for sys_lib_dlsearch_path munging. 743edce3322Smrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 744edce3322Smrg 7459f00f3a1Smrg# ### BEGIN LIBTOOL CONFIG 7469f00f3a1Smrg_LT_LIBTOOL_CONFIG_VARS 7479f00f3a1Smrg_LT_LIBTOOL_TAG_VARS 7489f00f3a1Smrg# ### END LIBTOOL CONFIG 7499f00f3a1Smrg 750edce3322Smrg_LT_EOF 751edce3322Smrg 752edce3322Smrg cat <<'_LT_EOF' >> "$cfgfile" 753edce3322Smrg 754edce3322Smrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 755edce3322Smrg 756edce3322Smrg_LT_PREPARE_MUNGE_PATH_LIST 757edce3322Smrg_LT_PREPARE_CC_BASENAME 758edce3322Smrg 759edce3322Smrg# ### END FUNCTIONS SHARED WITH CONFIGURE 760edce3322Smrg 7619f00f3a1Smrg_LT_EOF 7629f00f3a1Smrg 7639f00f3a1Smrg case $host_os in 7649f00f3a1Smrg aix3*) 7659f00f3a1Smrg cat <<\_LT_EOF >> "$cfgfile" 7669f00f3a1Smrg# AIX sometimes has problems with the GCC collect2 program. For some 7679f00f3a1Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 7689f00f3a1Smrg# vanish in a puff of smoke. 769edce3322Smrgif test set != "${COLLECT_NAMES+set}"; then 7709f00f3a1Smrg COLLECT_NAMES= 7719f00f3a1Smrg export COLLECT_NAMES 7729f00f3a1Smrgfi 7739f00f3a1Smrg_LT_EOF 7749f00f3a1Smrg ;; 7759f00f3a1Smrg esac 7769f00f3a1Smrg 7779f00f3a1Smrg _LT_PROG_LTMAIN 7789f00f3a1Smrg 7799f00f3a1Smrg # We use sed instead of cat because bash on DJGPP gets confused if 7809f00f3a1Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 7819f00f3a1Smrg # text mode, it properly converts lines to CR/LF. This bash problem 7829f00f3a1Smrg # is reportedly fixed, but why not run on old versions too? 78374835918Smrg $SED '$q' "$ltmain" >> "$cfgfile" \ 7849f00f3a1Smrg || (rm -f "$cfgfile"; exit 1) 7859f00f3a1Smrg 7869f00f3a1Smrg mv -f "$cfgfile" "$ofile" || 7879f00f3a1Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 7889f00f3a1Smrg chmod +x "$ofile" 7899f00f3a1Smrg], 7909f00f3a1Smrg[cat <<_LT_EOF >> "$ofile" 7919f00f3a1Smrg 7929f00f3a1Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 7939f00f3a1Smrgdnl in a comment (ie after a #). 7949f00f3a1Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 7959f00f3a1Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 7969f00f3a1Smrg# ### END LIBTOOL TAG CONFIG: $1 7979f00f3a1Smrg_LT_EOF 7989f00f3a1Smrg])dnl /m4_if 7999f00f3a1Smrg], 8009f00f3a1Smrg[m4_if([$1], [], [ 8019f00f3a1Smrg PACKAGE='$PACKAGE' 8029f00f3a1Smrg VERSION='$VERSION' 8039f00f3a1Smrg RM='$RM' 8049f00f3a1Smrg ofile='$ofile'], []) 8059f00f3a1Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 8069f00f3a1Smrg])# _LT_CONFIG 8079f00f3a1Smrg 8089f00f3a1Smrg 8099f00f3a1Smrg# LT_SUPPORTED_TAG(TAG) 8109f00f3a1Smrg# --------------------- 8119f00f3a1Smrg# Trace this macro to discover what tags are supported by the libtool 8129f00f3a1Smrg# --tag option, using: 8139f00f3a1Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 8149f00f3a1SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 8159f00f3a1Smrg 8169f00f3a1Smrg 8179f00f3a1Smrg# C support is built-in for now 8189f00f3a1Smrgm4_define([_LT_LANG_C_enabled], []) 8199f00f3a1Smrgm4_define([_LT_TAGS], []) 8209f00f3a1Smrg 8219f00f3a1Smrg 8229f00f3a1Smrg# LT_LANG(LANG) 8239f00f3a1Smrg# ------------- 8249f00f3a1Smrg# Enable libtool support for the given language if not already enabled. 8259f00f3a1SmrgAC_DEFUN([LT_LANG], 8269f00f3a1Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 8279f00f3a1Smrgm4_case([$1], 8289f00f3a1Smrg [C], [_LT_LANG(C)], 8299f00f3a1Smrg [C++], [_LT_LANG(CXX)], 8309f00f3a1Smrg [Go], [_LT_LANG(GO)], 8319f00f3a1Smrg [Java], [_LT_LANG(GCJ)], 8329f00f3a1Smrg [Fortran 77], [_LT_LANG(F77)], 8339f00f3a1Smrg [Fortran], [_LT_LANG(FC)], 8349f00f3a1Smrg [Windows Resource], [_LT_LANG(RC)], 8359f00f3a1Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 8369f00f3a1Smrg [_LT_LANG($1)], 8379f00f3a1Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 8389f00f3a1Smrg])# LT_LANG 8399f00f3a1Smrg 8409f00f3a1Smrg 8419f00f3a1Smrg# _LT_LANG(LANGNAME) 8429f00f3a1Smrg# ------------------ 8439f00f3a1Smrgm4_defun([_LT_LANG], 8449f00f3a1Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 8459f00f3a1Smrg [LT_SUPPORTED_TAG([$1])dnl 8469f00f3a1Smrg m4_append([_LT_TAGS], [$1 ])dnl 8479f00f3a1Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 8489f00f3a1Smrg _LT_LANG_$1_CONFIG($1)])dnl 8499f00f3a1Smrg])# _LT_LANG 8509f00f3a1Smrg 8519f00f3a1Smrg 8529f00f3a1Smrgm4_ifndef([AC_PROG_GO], [ 8539f00f3a1Smrg############################################################ 8549f00f3a1Smrg# NOTE: This macro has been submitted for inclusion into # 8559f00f3a1Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 8569f00f3a1Smrg# a released version of Autoconf we should remove this # 8579f00f3a1Smrg# macro and use it instead. # 8589f00f3a1Smrg############################################################ 8599f00f3a1Smrgm4_defun([AC_PROG_GO], 8609f00f3a1Smrg[AC_LANG_PUSH(Go)dnl 8619f00f3a1SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 8629f00f3a1SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 8639f00f3a1Smrg_AC_ARG_VAR_LDFLAGS()dnl 8649f00f3a1SmrgAC_CHECK_TOOL(GOC, gccgo) 8659f00f3a1Smrgif test -z "$GOC"; then 8669f00f3a1Smrg if test -n "$ac_tool_prefix"; then 8679f00f3a1Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 8689f00f3a1Smrg fi 8699f00f3a1Smrgfi 8709f00f3a1Smrgif test -z "$GOC"; then 8719f00f3a1Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 8729f00f3a1Smrgfi 8739f00f3a1Smrg])#m4_defun 8749f00f3a1Smrg])#m4_ifndef 8759f00f3a1Smrg 8769f00f3a1Smrg 8779f00f3a1Smrg# _LT_LANG_DEFAULT_CONFIG 8789f00f3a1Smrg# ----------------------- 8799f00f3a1Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 8809f00f3a1Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 8819f00f3a1Smrg [LT_LANG(CXX)], 8829f00f3a1Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 8839f00f3a1Smrg 8849f00f3a1SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 8859f00f3a1Smrg [LT_LANG(F77)], 8869f00f3a1Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 8879f00f3a1Smrg 8889f00f3a1SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 8899f00f3a1Smrg [LT_LANG(FC)], 8909f00f3a1Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 8919f00f3a1Smrg 8929f00f3a1Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 8939f00f3a1Smrgdnl pulling things in needlessly. 8949f00f3a1SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 8959f00f3a1Smrg [LT_LANG(GCJ)], 8969f00f3a1Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 8979f00f3a1Smrg [LT_LANG(GCJ)], 8989f00f3a1Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 8999f00f3a1Smrg [LT_LANG(GCJ)], 9009f00f3a1Smrg [m4_ifdef([AC_PROG_GCJ], 9019f00f3a1Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 9029f00f3a1Smrg m4_ifdef([A][M_PROG_GCJ], 9039f00f3a1Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 9049f00f3a1Smrg m4_ifdef([LT_PROG_GCJ], 9059f00f3a1Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 9069f00f3a1Smrg 9079f00f3a1SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 9089f00f3a1Smrg [LT_LANG(GO)], 9099f00f3a1Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 9109f00f3a1Smrg 9119f00f3a1SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 9129f00f3a1Smrg [LT_LANG(RC)], 9139f00f3a1Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 9149f00f3a1Smrg])# _LT_LANG_DEFAULT_CONFIG 9159f00f3a1Smrg 9169f00f3a1Smrg# Obsolete macros: 9179f00f3a1SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 9189f00f3a1SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 9199f00f3a1SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 9209f00f3a1SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 9219f00f3a1SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 9229f00f3a1Smrgdnl aclocal-1.4 backwards compatibility: 9239f00f3a1Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 9249f00f3a1Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 9259f00f3a1Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 9269f00f3a1Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 9279f00f3a1Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 9289f00f3a1Smrg 9299f00f3a1Smrg 9309f00f3a1Smrg# _LT_TAG_COMPILER 9319f00f3a1Smrg# ---------------- 9329f00f3a1Smrgm4_defun([_LT_TAG_COMPILER], 9339f00f3a1Smrg[AC_REQUIRE([AC_PROG_CC])dnl 9349f00f3a1Smrg 9359f00f3a1Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 9369f00f3a1Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 9379f00f3a1Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 9389f00f3a1Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 9399f00f3a1Smrg 9409f00f3a1Smrg# If no C compiler was specified, use CC. 9419f00f3a1SmrgLTCC=${LTCC-"$CC"} 9429f00f3a1Smrg 9439f00f3a1Smrg# If no C compiler flags were specified, use CFLAGS. 9449f00f3a1SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 9459f00f3a1Smrg 9469f00f3a1Smrg# Allow CC to be a program name with arguments. 9479f00f3a1Smrgcompiler=$CC 9489f00f3a1Smrg])# _LT_TAG_COMPILER 9499f00f3a1Smrg 9509f00f3a1Smrg 9519f00f3a1Smrg# _LT_COMPILER_BOILERPLATE 9529f00f3a1Smrg# ------------------------ 9539f00f3a1Smrg# Check for compiler boilerplate output or warnings with 9549f00f3a1Smrg# the simple compiler test code. 9559f00f3a1Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 9569f00f3a1Smrg[m4_require([_LT_DECL_SED])dnl 9579f00f3a1Smrgac_outfile=conftest.$ac_objext 9589f00f3a1Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 9599f00f3a1Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9609f00f3a1Smrg_lt_compiler_boilerplate=`cat conftest.err` 9619f00f3a1Smrg$RM conftest* 9629f00f3a1Smrg])# _LT_COMPILER_BOILERPLATE 9639f00f3a1Smrg 9649f00f3a1Smrg 9659f00f3a1Smrg# _LT_LINKER_BOILERPLATE 9669f00f3a1Smrg# ---------------------- 9679f00f3a1Smrg# Check for linker boilerplate output or warnings with 9689f00f3a1Smrg# the simple link test code. 9699f00f3a1Smrgm4_defun([_LT_LINKER_BOILERPLATE], 9709f00f3a1Smrg[m4_require([_LT_DECL_SED])dnl 9719f00f3a1Smrgac_outfile=conftest.$ac_objext 9729f00f3a1Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 9739f00f3a1Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9749f00f3a1Smrg_lt_linker_boilerplate=`cat conftest.err` 9759f00f3a1Smrg$RM -r conftest* 9769f00f3a1Smrg])# _LT_LINKER_BOILERPLATE 9779f00f3a1Smrg 9789f00f3a1Smrg# _LT_REQUIRED_DARWIN_CHECKS 9799f00f3a1Smrg# ------------------------- 9809f00f3a1Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 9819f00f3a1Smrg case $host_os in 9829f00f3a1Smrg rhapsody* | darwin*) 9839f00f3a1Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 9849f00f3a1Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 9859f00f3a1Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 9869f00f3a1Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 9879f00f3a1Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 9889f00f3a1Smrg _LT_DECL([], [DSYMUTIL], [1], 9899f00f3a1Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 9909f00f3a1Smrg _LT_DECL([], [NMEDIT], [1], 9919f00f3a1Smrg [Tool to change global to local symbols on Mac OS X]) 9929f00f3a1Smrg _LT_DECL([], [LIPO], [1], 9939f00f3a1Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 9949f00f3a1Smrg _LT_DECL([], [OTOOL], [1], 9959f00f3a1Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 9969f00f3a1Smrg _LT_DECL([], [OTOOL64], [1], 9979f00f3a1Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 9989f00f3a1Smrg 9999f00f3a1Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 10009f00f3a1Smrg [lt_cv_apple_cc_single_mod=no 1001edce3322Smrg if test -z "$LT_MULTI_MODULE"; then 10029f00f3a1Smrg # By default we will add the -single_module flag. You can override 10039f00f3a1Smrg # by either setting the environment variable LT_MULTI_MODULE 10049f00f3a1Smrg # non-empty at configure time, or by adding -multi_module to the 10059f00f3a1Smrg # link flags. 10069f00f3a1Smrg rm -rf libconftest.dylib* 10079f00f3a1Smrg echo "int foo(void){return 1;}" > conftest.c 10089f00f3a1Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 10099f00f3a1Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 10109f00f3a1Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 10119f00f3a1Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 10129f00f3a1Smrg _lt_result=$? 10139f00f3a1Smrg # If there is a non-empty error log, and "single_module" 10149f00f3a1Smrg # appears in it, assume the flag caused a linker warning 10159f00f3a1Smrg if test -s conftest.err && $GREP single_module conftest.err; then 10169f00f3a1Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10179f00f3a1Smrg # Otherwise, if the output was created with a 0 exit code from 10189f00f3a1Smrg # the compiler, it worked. 1019edce3322Smrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 10209f00f3a1Smrg lt_cv_apple_cc_single_mod=yes 10219f00f3a1Smrg else 10229f00f3a1Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10239f00f3a1Smrg fi 10249f00f3a1Smrg rm -rf libconftest.dylib* 10259f00f3a1Smrg rm -f conftest.* 10269f00f3a1Smrg fi]) 10279f00f3a1Smrg 10289f00f3a1Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 10299f00f3a1Smrg [lt_cv_ld_exported_symbols_list], 10309f00f3a1Smrg [lt_cv_ld_exported_symbols_list=no 10319f00f3a1Smrg save_LDFLAGS=$LDFLAGS 10329f00f3a1Smrg echo "_main" > conftest.sym 10339f00f3a1Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 10349f00f3a1Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 10359f00f3a1Smrg [lt_cv_ld_exported_symbols_list=yes], 10369f00f3a1Smrg [lt_cv_ld_exported_symbols_list=no]) 1037edce3322Smrg LDFLAGS=$save_LDFLAGS 10389f00f3a1Smrg ]) 10399f00f3a1Smrg 10409f00f3a1Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 10419f00f3a1Smrg [lt_cv_ld_force_load=no 10429f00f3a1Smrg cat > conftest.c << _LT_EOF 10439f00f3a1Smrgint forced_loaded() { return 2;} 10449f00f3a1Smrg_LT_EOF 10459f00f3a1Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 10469f00f3a1Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 104774835918Smrg echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 104874835918Smrg $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 10499f00f3a1Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 10509f00f3a1Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 10519f00f3a1Smrg cat > conftest.c << _LT_EOF 10529f00f3a1Smrgint main() { return 0;} 10539f00f3a1Smrg_LT_EOF 10549f00f3a1Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 10559f00f3a1Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 10569f00f3a1Smrg _lt_result=$? 10579f00f3a1Smrg if test -s conftest.err && $GREP force_load conftest.err; then 10589f00f3a1Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1059edce3322Smrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 10609f00f3a1Smrg lt_cv_ld_force_load=yes 10619f00f3a1Smrg else 10629f00f3a1Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10639f00f3a1Smrg fi 10649f00f3a1Smrg rm -f conftest.err libconftest.a conftest conftest.c 10659f00f3a1Smrg rm -rf conftest.dSYM 10669f00f3a1Smrg ]) 10679f00f3a1Smrg case $host_os in 10689f00f3a1Smrg rhapsody* | darwin1.[[012]]) 1069edce3322Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 10709f00f3a1Smrg darwin1.*) 1071edce3322Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 107274835918Smrg darwin*) 107374835918Smrg case $MACOSX_DEPLOYMENT_TARGET,$host in 107474835918Smrg 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) 107574835918Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 107674835918Smrg *) 107774835918Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10789f00f3a1Smrg esac 10799f00f3a1Smrg ;; 10809f00f3a1Smrg esac 1081edce3322Smrg if test yes = "$lt_cv_apple_cc_single_mod"; then 10829f00f3a1Smrg _lt_dar_single_mod='$single_module' 10839f00f3a1Smrg fi 1084edce3322Smrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 1085edce3322Smrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 10869f00f3a1Smrg else 1087edce3322Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 10889f00f3a1Smrg fi 1089edce3322Smrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 10909f00f3a1Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 10919f00f3a1Smrg else 10929f00f3a1Smrg _lt_dsymutil= 10939f00f3a1Smrg fi 10949f00f3a1Smrg ;; 10959f00f3a1Smrg esac 10969f00f3a1Smrg]) 10979f00f3a1Smrg 10989f00f3a1Smrg 10999f00f3a1Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 11009f00f3a1Smrg# --------------------------------- 11019f00f3a1Smrg# Checks for linker and compiler features on darwin 11029f00f3a1Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 11039f00f3a1Smrg[ 11049f00f3a1Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 11059f00f3a1Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 11069f00f3a1Smrg _LT_TAGVAR(hardcode_direct, $1)=no 11079f00f3a1Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 11089f00f3a1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1109edce3322Smrg if test yes = "$lt_cv_ld_force_load"; then 1110edce3322Smrg _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\"`' 11119f00f3a1Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 11129f00f3a1Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 11139f00f3a1Smrg else 11149f00f3a1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 11159f00f3a1Smrg fi 11169f00f3a1Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1117edce3322Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 11189f00f3a1Smrg case $cc_basename in 1119edce3322Smrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 11209f00f3a1Smrg *) _lt_dar_can_shared=$GCC ;; 11219f00f3a1Smrg esac 1122edce3322Smrg if test yes = "$_lt_dar_can_shared"; then 11239f00f3a1Smrg output_verbose_link_cmd=func_echo_all 1124edce3322Smrg _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" 1125edce3322Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 112674835918Smrg _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" 112774835918Smrg _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" 11289f00f3a1Smrg m4_if([$1], [CXX], 1129edce3322Smrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 1130edce3322Smrg _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" 113174835918Smrg _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" 11329f00f3a1Smrg fi 11339f00f3a1Smrg],[]) 11349f00f3a1Smrg else 11359f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11369f00f3a1Smrg fi 11379f00f3a1Smrg]) 11389f00f3a1Smrg 11399f00f3a1Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 11409f00f3a1Smrg# ---------------------------------- 11419f00f3a1Smrg# Links a minimal program and checks the executable 11429f00f3a1Smrg# for the system default hardcoded library path. In most cases, 11439f00f3a1Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 11449f00f3a1Smrg# the location of the communication and MPI libs are included too. 11459f00f3a1Smrg# If we don't find anything, use the default library path according 11469f00f3a1Smrg# to the aix ld manual. 11479f00f3a1Smrg# Store the results from the different compilers for each TAGNAME. 11489f00f3a1Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 11499f00f3a1Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 11509f00f3a1Smrg[m4_require([_LT_DECL_SED])dnl 1151edce3322Smrgif test set = "${lt_cv_aix_libpath+set}"; then 11529f00f3a1Smrg aix_libpath=$lt_cv_aix_libpath 11539f00f3a1Smrgelse 11549f00f3a1Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 11559f00f3a1Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 11569f00f3a1Smrg lt_aix_libpath_sed='[ 11579f00f3a1Smrg /Import File Strings/,/^$/ { 11589f00f3a1Smrg /^0/ { 11599f00f3a1Smrg s/^0 *\([^ ]*\) *$/\1/ 11609f00f3a1Smrg p 11619f00f3a1Smrg } 11629f00f3a1Smrg }]' 11639f00f3a1Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 11649f00f3a1Smrg # Check for a 64-bit object if we didn't find anything. 11659f00f3a1Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 11669f00f3a1Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 11679f00f3a1Smrg fi],[]) 11689f00f3a1Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1169edce3322Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 11709f00f3a1Smrg fi 11719f00f3a1Smrg ]) 11729f00f3a1Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 11739f00f3a1Smrgfi 11749f00f3a1Smrg])# _LT_SYS_MODULE_PATH_AIX 11759f00f3a1Smrg 11769f00f3a1Smrg 11779f00f3a1Smrg# _LT_SHELL_INIT(ARG) 11789f00f3a1Smrg# ------------------- 11799f00f3a1Smrgm4_define([_LT_SHELL_INIT], 11809f00f3a1Smrg[m4_divert_text([M4SH-INIT], [$1 11819f00f3a1Smrg])])# _LT_SHELL_INIT 11829f00f3a1Smrg 11839f00f3a1Smrg 11849f00f3a1Smrg 11859f00f3a1Smrg# _LT_PROG_ECHO_BACKSLASH 11869f00f3a1Smrg# ----------------------- 11879f00f3a1Smrg# Find how we can fake an echo command that does not interpret backslash. 11889f00f3a1Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 1189edce3322Smrg# of the generated configure script that will find a shell with a builtin 1190edce3322Smrg# printf (that we can use as an echo command). 11919f00f3a1Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 11929f00f3a1Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 11939f00f3a1SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 11949f00f3a1SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 11959f00f3a1Smrg 11969f00f3a1SmrgAC_MSG_CHECKING([how to print strings]) 11979f00f3a1Smrg# Test print first, because it will be a builtin if present. 11989f00f3a1Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 11999f00f3a1Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 12009f00f3a1Smrg ECHO='print -r --' 12019f00f3a1Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 12029f00f3a1Smrg ECHO='printf %s\n' 12039f00f3a1Smrgelse 12049f00f3a1Smrg # Use this function as a fallback that always works. 12059f00f3a1Smrg func_fallback_echo () 12069f00f3a1Smrg { 12079f00f3a1Smrg eval 'cat <<_LTECHO_EOF 12089f00f3a1Smrg$[]1 12099f00f3a1Smrg_LTECHO_EOF' 12109f00f3a1Smrg } 12119f00f3a1Smrg ECHO='func_fallback_echo' 12129f00f3a1Smrgfi 12139f00f3a1Smrg 12149f00f3a1Smrg# func_echo_all arg... 12159f00f3a1Smrg# Invoke $ECHO with all args, space-separated. 12169f00f3a1Smrgfunc_echo_all () 12179f00f3a1Smrg{ 1218edce3322Smrg $ECHO "$*" 12199f00f3a1Smrg} 12209f00f3a1Smrg 1221edce3322Smrgcase $ECHO in 12229f00f3a1Smrg printf*) AC_MSG_RESULT([printf]) ;; 12239f00f3a1Smrg print*) AC_MSG_RESULT([print -r]) ;; 12249f00f3a1Smrg *) AC_MSG_RESULT([cat]) ;; 12259f00f3a1Smrgesac 12269f00f3a1Smrg 12279f00f3a1Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 12289f00f3a1Smrg[_AS_DETECT_SUGGESTED([ 12299f00f3a1Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 12309f00f3a1Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 12319f00f3a1Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 12329f00f3a1Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 12339f00f3a1Smrg PATH=/empty FPATH=/empty; export PATH FPATH 12349f00f3a1Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 12359f00f3a1Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 12369f00f3a1Smrg 12379f00f3a1Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 12389f00f3a1Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 12399f00f3a1Smrg])# _LT_PROG_ECHO_BACKSLASH 12409f00f3a1Smrg 12419f00f3a1Smrg 12429f00f3a1Smrg# _LT_WITH_SYSROOT 12439f00f3a1Smrg# ---------------- 12449f00f3a1SmrgAC_DEFUN([_LT_WITH_SYSROOT], 124574835918Smrg[m4_require([_LT_DECL_SED])dnl 124674835918SmrgAC_MSG_CHECKING([for sysroot]) 12479f00f3a1SmrgAC_ARG_WITH([sysroot], 1248edce3322Smrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 1249edce3322Smrg [Search for dependent libraries within DIR (or the compiler's sysroot 1250edce3322Smrg if not specified).])], 12519f00f3a1Smrg[], [with_sysroot=no]) 12529f00f3a1Smrg 12539f00f3a1Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 12549f00f3a1Smrgdnl in case the user passed a directory name. 12559f00f3a1Smrglt_sysroot= 1256edce3322Smrgcase $with_sysroot in #( 12579f00f3a1Smrg yes) 1258edce3322Smrg if test yes = "$GCC"; then 12599f00f3a1Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 12609f00f3a1Smrg fi 12619f00f3a1Smrg ;; #( 12629f00f3a1Smrg /*) 126374835918Smrg lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` 12649f00f3a1Smrg ;; #( 12659f00f3a1Smrg no|'') 12669f00f3a1Smrg ;; #( 12679f00f3a1Smrg *) 1268edce3322Smrg AC_MSG_RESULT([$with_sysroot]) 12699f00f3a1Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 12709f00f3a1Smrg ;; 12719f00f3a1Smrgesac 12729f00f3a1Smrg 12739f00f3a1Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 12749f00f3a1Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1275edce3322Smrg[dependent libraries, and where our libraries should be installed.])]) 12769f00f3a1Smrg 12779f00f3a1Smrg# _LT_ENABLE_LOCK 12789f00f3a1Smrg# --------------- 12799f00f3a1Smrgm4_defun([_LT_ENABLE_LOCK], 12809f00f3a1Smrg[AC_ARG_ENABLE([libtool-lock], 12819f00f3a1Smrg [AS_HELP_STRING([--disable-libtool-lock], 12829f00f3a1Smrg [avoid locking (might break parallel builds)])]) 1283edce3322Smrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 12849f00f3a1Smrg 12859f00f3a1Smrg# Some flags need to be propagated to the compiler or linker for good 12869f00f3a1Smrg# libtool support. 12879f00f3a1Smrgcase $host in 12889f00f3a1Smrgia64-*-hpux*) 1289edce3322Smrg # Find out what ABI is being produced by ac_compile, and set mode 1290edce3322Smrg # options accordingly. 12919f00f3a1Smrg echo 'int i;' > conftest.$ac_ext 12929f00f3a1Smrg if AC_TRY_EVAL(ac_compile); then 129374835918Smrg case `$FILECMD conftest.$ac_objext` in 12949f00f3a1Smrg *ELF-32*) 1295edce3322Smrg HPUX_IA64_MODE=32 12969f00f3a1Smrg ;; 12979f00f3a1Smrg *ELF-64*) 1298edce3322Smrg HPUX_IA64_MODE=64 12999f00f3a1Smrg ;; 13009f00f3a1Smrg esac 13019f00f3a1Smrg fi 13029f00f3a1Smrg rm -rf conftest* 13039f00f3a1Smrg ;; 13049f00f3a1Smrg*-*-irix6*) 1305edce3322Smrg # Find out what ABI is being produced by ac_compile, and set linker 1306edce3322Smrg # options accordingly. 13079f00f3a1Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 13089f00f3a1Smrg if AC_TRY_EVAL(ac_compile); then 1309edce3322Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 131074835918Smrg case `$FILECMD conftest.$ac_objext` in 13119f00f3a1Smrg *32-bit*) 13129f00f3a1Smrg LD="${LD-ld} -melf32bsmip" 13139f00f3a1Smrg ;; 13149f00f3a1Smrg *N32*) 13159f00f3a1Smrg LD="${LD-ld} -melf32bmipn32" 13169f00f3a1Smrg ;; 13179f00f3a1Smrg *64-bit*) 13189f00f3a1Smrg LD="${LD-ld} -melf64bmip" 13199f00f3a1Smrg ;; 13209f00f3a1Smrg esac 13219f00f3a1Smrg else 132274835918Smrg case `$FILECMD conftest.$ac_objext` in 13239f00f3a1Smrg *32-bit*) 13249f00f3a1Smrg LD="${LD-ld} -32" 13259f00f3a1Smrg ;; 13269f00f3a1Smrg *N32*) 13279f00f3a1Smrg LD="${LD-ld} -n32" 13289f00f3a1Smrg ;; 13299f00f3a1Smrg *64-bit*) 13309f00f3a1Smrg LD="${LD-ld} -64" 13319f00f3a1Smrg ;; 13329f00f3a1Smrg esac 13339f00f3a1Smrg fi 13349f00f3a1Smrg fi 13359f00f3a1Smrg rm -rf conftest* 13369f00f3a1Smrg ;; 13379f00f3a1Smrg 1338edce3322Smrgmips64*-*linux*) 1339edce3322Smrg # Find out what ABI is being produced by ac_compile, and set linker 1340edce3322Smrg # options accordingly. 1341edce3322Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1342edce3322Smrg if AC_TRY_EVAL(ac_compile); then 1343edce3322Smrg emul=elf 134474835918Smrg case `$FILECMD conftest.$ac_objext` in 1345edce3322Smrg *32-bit*) 1346edce3322Smrg emul="${emul}32" 1347edce3322Smrg ;; 1348edce3322Smrg *64-bit*) 1349edce3322Smrg emul="${emul}64" 1350edce3322Smrg ;; 1351edce3322Smrg esac 135274835918Smrg case `$FILECMD conftest.$ac_objext` in 1353edce3322Smrg *MSB*) 1354edce3322Smrg emul="${emul}btsmip" 1355edce3322Smrg ;; 1356edce3322Smrg *LSB*) 1357edce3322Smrg emul="${emul}ltsmip" 1358edce3322Smrg ;; 1359edce3322Smrg esac 136074835918Smrg case `$FILECMD conftest.$ac_objext` in 1361edce3322Smrg *N32*) 1362edce3322Smrg emul="${emul}n32" 1363edce3322Smrg ;; 1364edce3322Smrg esac 1365edce3322Smrg LD="${LD-ld} -m $emul" 1366edce3322Smrg fi 1367edce3322Smrg rm -rf conftest* 1368edce3322Smrg ;; 1369edce3322Smrg 13709f00f3a1Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 13719f00f3a1Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1372edce3322Smrg # Find out what ABI is being produced by ac_compile, and set linker 1373edce3322Smrg # options accordingly. Note that the listed cases only cover the 1374edce3322Smrg # situations where additional linker options are needed (such as when 1375edce3322Smrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 1376edce3322Smrg # vice versa); the common cases where no linker options are needed do 1377edce3322Smrg # not appear in the list. 13789f00f3a1Smrg echo 'int i;' > conftest.$ac_ext 13799f00f3a1Smrg if AC_TRY_EVAL(ac_compile); then 138074835918Smrg case `$FILECMD conftest.o` in 13819f00f3a1Smrg *32-bit*) 13829f00f3a1Smrg case $host in 13839f00f3a1Smrg x86_64-*kfreebsd*-gnu) 13849f00f3a1Smrg LD="${LD-ld} -m elf_i386_fbsd" 13859f00f3a1Smrg ;; 13869f00f3a1Smrg x86_64-*linux*) 138774835918Smrg case `$FILECMD conftest.o` in 13889f00f3a1Smrg *x86-64*) 13899f00f3a1Smrg LD="${LD-ld} -m elf32_x86_64" 13909f00f3a1Smrg ;; 13919f00f3a1Smrg *) 13929f00f3a1Smrg LD="${LD-ld} -m elf_i386" 13939f00f3a1Smrg ;; 13949f00f3a1Smrg esac 13959f00f3a1Smrg ;; 1396edce3322Smrg powerpc64le-*linux*) 13979f00f3a1Smrg LD="${LD-ld} -m elf32lppclinux" 13989f00f3a1Smrg ;; 1399edce3322Smrg powerpc64-*linux*) 14009f00f3a1Smrg LD="${LD-ld} -m elf32ppclinux" 14019f00f3a1Smrg ;; 14029f00f3a1Smrg s390x-*linux*) 14039f00f3a1Smrg LD="${LD-ld} -m elf_s390" 14049f00f3a1Smrg ;; 14059f00f3a1Smrg sparc64-*linux*) 14069f00f3a1Smrg LD="${LD-ld} -m elf32_sparc" 14079f00f3a1Smrg ;; 14089f00f3a1Smrg esac 14099f00f3a1Smrg ;; 14109f00f3a1Smrg *64-bit*) 14119f00f3a1Smrg case $host in 14129f00f3a1Smrg x86_64-*kfreebsd*-gnu) 14139f00f3a1Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 14149f00f3a1Smrg ;; 14159f00f3a1Smrg x86_64-*linux*) 14169f00f3a1Smrg LD="${LD-ld} -m elf_x86_64" 14179f00f3a1Smrg ;; 141852dc082bSmrg powerpcle-*linux*) 14199f00f3a1Smrg LD="${LD-ld} -m elf64lppc" 14209f00f3a1Smrg ;; 142152dc082bSmrg powerpc-*linux*) 14229f00f3a1Smrg LD="${LD-ld} -m elf64ppc" 14239f00f3a1Smrg ;; 14249f00f3a1Smrg s390*-*linux*|s390*-*tpf*) 14259f00f3a1Smrg LD="${LD-ld} -m elf64_s390" 14269f00f3a1Smrg ;; 14279f00f3a1Smrg sparc*-*linux*) 14289f00f3a1Smrg LD="${LD-ld} -m elf64_sparc" 14299f00f3a1Smrg ;; 14309f00f3a1Smrg esac 14319f00f3a1Smrg ;; 14329f00f3a1Smrg esac 14339f00f3a1Smrg fi 14349f00f3a1Smrg rm -rf conftest* 14359f00f3a1Smrg ;; 14369f00f3a1Smrg 14379f00f3a1Smrg*-*-sco3.2v5*) 14389f00f3a1Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1439edce3322Smrg SAVE_CFLAGS=$CFLAGS 14409f00f3a1Smrg CFLAGS="$CFLAGS -belf" 14419f00f3a1Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 14429f00f3a1Smrg [AC_LANG_PUSH(C) 14439f00f3a1Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 14449f00f3a1Smrg AC_LANG_POP]) 1445edce3322Smrg if test yes != "$lt_cv_cc_needs_belf"; then 14469f00f3a1Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1447edce3322Smrg CFLAGS=$SAVE_CFLAGS 14489f00f3a1Smrg fi 14499f00f3a1Smrg ;; 14509f00f3a1Smrg*-*solaris*) 1451edce3322Smrg # Find out what ABI is being produced by ac_compile, and set linker 1452edce3322Smrg # options accordingly. 14539f00f3a1Smrg echo 'int i;' > conftest.$ac_ext 14549f00f3a1Smrg if AC_TRY_EVAL(ac_compile); then 145574835918Smrg case `$FILECMD conftest.o` in 14569f00f3a1Smrg *64-bit*) 14579f00f3a1Smrg case $lt_cv_prog_gnu_ld in 14589f00f3a1Smrg yes*) 14599f00f3a1Smrg case $host in 1460edce3322Smrg i?86-*-solaris*|x86_64-*-solaris*) 14619f00f3a1Smrg LD="${LD-ld} -m elf_x86_64" 14629f00f3a1Smrg ;; 14639f00f3a1Smrg sparc*-*-solaris*) 14649f00f3a1Smrg LD="${LD-ld} -m elf64_sparc" 14659f00f3a1Smrg ;; 14669f00f3a1Smrg esac 14679f00f3a1Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 14689f00f3a1Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1469edce3322Smrg LD=${LD-ld}_sol2 14709f00f3a1Smrg fi 14719f00f3a1Smrg ;; 14729f00f3a1Smrg *) 14739f00f3a1Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 14749f00f3a1Smrg LD="${LD-ld} -64" 14759f00f3a1Smrg fi 14769f00f3a1Smrg ;; 14779f00f3a1Smrg esac 14789f00f3a1Smrg ;; 14799f00f3a1Smrg esac 14809f00f3a1Smrg fi 14819f00f3a1Smrg rm -rf conftest* 14829f00f3a1Smrg ;; 14839f00f3a1Smrgesac 14849f00f3a1Smrg 1485edce3322Smrgneed_locks=$enable_libtool_lock 14869f00f3a1Smrg])# _LT_ENABLE_LOCK 14879f00f3a1Smrg 14889f00f3a1Smrg 14899f00f3a1Smrg# _LT_PROG_AR 14909f00f3a1Smrg# ----------- 14919f00f3a1Smrgm4_defun([_LT_PROG_AR], 14929f00f3a1Smrg[AC_CHECK_TOOLS(AR, [ar], false) 14939f00f3a1Smrg: ${AR=ar} 14949f00f3a1Smrg_LT_DECL([], [AR], [1], [The archiver]) 149574835918Smrg 149674835918Smrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with 149774835918Smrg# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 149874835918Smrg# higher priority because thats what people were doing historically (setting 149974835918Smrg# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 150074835918Smrg# variable obsoleted/removed. 150174835918Smrg 150274835918Smrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 150374835918Smrglt_ar_flags=$AR_FLAGS 150474835918Smrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 150574835918Smrg 150674835918Smrg# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 150774835918Smrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 150874835918Smrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 150974835918Smrg [Flags to create an archive]) 15109f00f3a1Smrg 15119f00f3a1SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 15129f00f3a1Smrg [lt_cv_ar_at_file=no 15139f00f3a1Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 15149f00f3a1Smrg [echo conftest.$ac_objext > conftest.lst 15159f00f3a1Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 15169f00f3a1Smrg AC_TRY_EVAL([lt_ar_try]) 1517edce3322Smrg if test 0 -eq "$ac_status"; then 15189f00f3a1Smrg # Ensure the archiver fails upon bogus file names. 15199f00f3a1Smrg rm -f conftest.$ac_objext libconftest.a 15209f00f3a1Smrg AC_TRY_EVAL([lt_ar_try]) 1521edce3322Smrg if test 0 -ne "$ac_status"; then 15229f00f3a1Smrg lt_cv_ar_at_file=@ 15239f00f3a1Smrg fi 15249f00f3a1Smrg fi 15259f00f3a1Smrg rm -f conftest.* libconftest.a 15269f00f3a1Smrg ]) 15279f00f3a1Smrg ]) 15289f00f3a1Smrg 1529edce3322Smrgif test no = "$lt_cv_ar_at_file"; then 15309f00f3a1Smrg archiver_list_spec= 15319f00f3a1Smrgelse 15329f00f3a1Smrg archiver_list_spec=$lt_cv_ar_at_file 15339f00f3a1Smrgfi 15349f00f3a1Smrg_LT_DECL([], [archiver_list_spec], [1], 15359f00f3a1Smrg [How to feed a file listing to the archiver]) 15369f00f3a1Smrg])# _LT_PROG_AR 15379f00f3a1Smrg 15389f00f3a1Smrg 15399f00f3a1Smrg# _LT_CMD_OLD_ARCHIVE 15409f00f3a1Smrg# ------------------- 15419f00f3a1Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 15429f00f3a1Smrg[_LT_PROG_AR 15439f00f3a1Smrg 15449f00f3a1SmrgAC_CHECK_TOOL(STRIP, strip, :) 15459f00f3a1Smrgtest -z "$STRIP" && STRIP=: 15469f00f3a1Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 15479f00f3a1Smrg 15489f00f3a1SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 15499f00f3a1Smrgtest -z "$RANLIB" && RANLIB=: 15509f00f3a1Smrg_LT_DECL([], [RANLIB], [1], 15519f00f3a1Smrg [Commands used to install an old-style archive]) 15529f00f3a1Smrg 15539f00f3a1Smrg# Determine commands to create old-style static archives. 15549f00f3a1Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 15559f00f3a1Smrgold_postinstall_cmds='chmod 644 $oldlib' 15569f00f3a1Smrgold_postuninstall_cmds= 15579f00f3a1Smrg 15589f00f3a1Smrgif test -n "$RANLIB"; then 15599f00f3a1Smrg case $host_os in 1560edce3322Smrg bitrig* | openbsd*) 15619f00f3a1Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 15629f00f3a1Smrg ;; 15639f00f3a1Smrg *) 15649f00f3a1Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 15659f00f3a1Smrg ;; 15669f00f3a1Smrg esac 15679f00f3a1Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 15689f00f3a1Smrgfi 15699f00f3a1Smrg 15709f00f3a1Smrgcase $host_os in 15719f00f3a1Smrg darwin*) 15729f00f3a1Smrg lock_old_archive_extraction=yes ;; 15739f00f3a1Smrg *) 15749f00f3a1Smrg lock_old_archive_extraction=no ;; 15759f00f3a1Smrgesac 15769f00f3a1Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 15779f00f3a1Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 15789f00f3a1Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 15799f00f3a1Smrg [Commands used to build an old-style archive]) 15809f00f3a1Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 15819f00f3a1Smrg [Whether to use a lock for old archive extraction]) 15829f00f3a1Smrg])# _LT_CMD_OLD_ARCHIVE 15839f00f3a1Smrg 15849f00f3a1Smrg 15859f00f3a1Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 15869f00f3a1Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 15879f00f3a1Smrg# ---------------------------------------------------------------- 15889f00f3a1Smrg# Check whether the given compiler option works 15899f00f3a1SmrgAC_DEFUN([_LT_COMPILER_OPTION], 15909f00f3a1Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 15919f00f3a1Smrgm4_require([_LT_DECL_SED])dnl 15929f00f3a1SmrgAC_CACHE_CHECK([$1], [$2], 15939f00f3a1Smrg [$2=no 15949f00f3a1Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 15959f00f3a1Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1596edce3322Smrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 15979f00f3a1Smrg # Insert the option either (1) after the last *FLAGS variable, or 15989f00f3a1Smrg # (2) before a word containing "conftest.", or (3) at the end. 15999f00f3a1Smrg # Note that $ac_compile itself does not contain backslashes and begins 16009f00f3a1Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 16019f00f3a1Smrg # The option is referenced via a variable to avoid confusing sed. 16029f00f3a1Smrg lt_compile=`echo "$ac_compile" | $SED \ 16039f00f3a1Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 16049f00f3a1Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 16059f00f3a1Smrg -e 's:$: $lt_compiler_flag:'` 16069f00f3a1Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 16079f00f3a1Smrg (eval "$lt_compile" 2>conftest.err) 16089f00f3a1Smrg ac_status=$? 16099f00f3a1Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 16109f00f3a1Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 16119f00f3a1Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 16129f00f3a1Smrg # The compiler can only warn and ignore the option if not recognized 16139f00f3a1Smrg # So say no if there are warnings other than the usual output. 16149f00f3a1Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 16159f00f3a1Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 16169f00f3a1Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 16179f00f3a1Smrg $2=yes 16189f00f3a1Smrg fi 16199f00f3a1Smrg fi 16209f00f3a1Smrg $RM conftest* 16219f00f3a1Smrg]) 16229f00f3a1Smrg 1623edce3322Smrgif test yes = "[$]$2"; then 16249f00f3a1Smrg m4_if([$5], , :, [$5]) 16259f00f3a1Smrgelse 16269f00f3a1Smrg m4_if([$6], , :, [$6]) 16279f00f3a1Smrgfi 16289f00f3a1Smrg])# _LT_COMPILER_OPTION 16299f00f3a1Smrg 16309f00f3a1Smrg# Old name: 16319f00f3a1SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 16329f00f3a1Smrgdnl aclocal-1.4 backwards compatibility: 16339f00f3a1Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 16349f00f3a1Smrg 16359f00f3a1Smrg 16369f00f3a1Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 16379f00f3a1Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 16389f00f3a1Smrg# ---------------------------------------------------- 16399f00f3a1Smrg# Check whether the given linker option works 16409f00f3a1SmrgAC_DEFUN([_LT_LINKER_OPTION], 16419f00f3a1Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 16429f00f3a1Smrgm4_require([_LT_DECL_SED])dnl 16439f00f3a1SmrgAC_CACHE_CHECK([$1], [$2], 16449f00f3a1Smrg [$2=no 1645edce3322Smrg save_LDFLAGS=$LDFLAGS 16469f00f3a1Smrg LDFLAGS="$LDFLAGS $3" 16479f00f3a1Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 16489f00f3a1Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 16499f00f3a1Smrg # The linker can only warn and ignore the option if not recognized 16509f00f3a1Smrg # So say no if there are warnings 16519f00f3a1Smrg if test -s conftest.err; then 16529f00f3a1Smrg # Append any errors to the config.log. 16539f00f3a1Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 16549f00f3a1Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 16559f00f3a1Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 16569f00f3a1Smrg if diff conftest.exp conftest.er2 >/dev/null; then 16579f00f3a1Smrg $2=yes 16589f00f3a1Smrg fi 16599f00f3a1Smrg else 16609f00f3a1Smrg $2=yes 16619f00f3a1Smrg fi 16629f00f3a1Smrg fi 16639f00f3a1Smrg $RM -r conftest* 1664edce3322Smrg LDFLAGS=$save_LDFLAGS 16659f00f3a1Smrg]) 16669f00f3a1Smrg 1667edce3322Smrgif test yes = "[$]$2"; then 16689f00f3a1Smrg m4_if([$4], , :, [$4]) 16699f00f3a1Smrgelse 16709f00f3a1Smrg m4_if([$5], , :, [$5]) 16719f00f3a1Smrgfi 16729f00f3a1Smrg])# _LT_LINKER_OPTION 16739f00f3a1Smrg 16749f00f3a1Smrg# Old name: 16759f00f3a1SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 16769f00f3a1Smrgdnl aclocal-1.4 backwards compatibility: 16779f00f3a1Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 16789f00f3a1Smrg 16799f00f3a1Smrg 16809f00f3a1Smrg# LT_CMD_MAX_LEN 16819f00f3a1Smrg#--------------- 16829f00f3a1SmrgAC_DEFUN([LT_CMD_MAX_LEN], 16839f00f3a1Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 16849f00f3a1Smrg# find the maximum length of command line arguments 16859f00f3a1SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 16869f00f3a1SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 16879f00f3a1Smrg i=0 1688edce3322Smrg teststring=ABCD 16899f00f3a1Smrg 16909f00f3a1Smrg case $build_os in 16919f00f3a1Smrg msdosdjgpp*) 16929f00f3a1Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 16939f00f3a1Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 16949f00f3a1Smrg # during glob expansion). Even if it were fixed, the result of this 16959f00f3a1Smrg # check would be larger than it should be. 16969f00f3a1Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 16979f00f3a1Smrg ;; 16989f00f3a1Smrg 16999f00f3a1Smrg gnu*) 17009f00f3a1Smrg # Under GNU Hurd, this test is not required because there is 17019f00f3a1Smrg # no limit to the length of command line arguments. 17029f00f3a1Smrg # Libtool will interpret -1 as no limit whatsoever 17039f00f3a1Smrg lt_cv_sys_max_cmd_len=-1; 17049f00f3a1Smrg ;; 17059f00f3a1Smrg 17069f00f3a1Smrg cygwin* | mingw* | cegcc*) 17079f00f3a1Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 17089f00f3a1Smrg # about 5 minutes as the teststring grows exponentially. 17099f00f3a1Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 17109f00f3a1Smrg # you end up with a "frozen" computer, even though with patience 17119f00f3a1Smrg # the test eventually succeeds (with a max line length of 256k). 17129f00f3a1Smrg # Instead, let's just punt: use the minimum linelength reported by 17139f00f3a1Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 17149f00f3a1Smrg lt_cv_sys_max_cmd_len=8192; 17159f00f3a1Smrg ;; 17169f00f3a1Smrg 17179f00f3a1Smrg mint*) 17189f00f3a1Smrg # On MiNT this can take a long time and run out of memory. 17199f00f3a1Smrg lt_cv_sys_max_cmd_len=8192; 17209f00f3a1Smrg ;; 17219f00f3a1Smrg 17229f00f3a1Smrg amigaos*) 17239f00f3a1Smrg # On AmigaOS with pdksh, this test takes hours, literally. 17249f00f3a1Smrg # So we just punt and use a minimum line length of 8192. 17259f00f3a1Smrg lt_cv_sys_max_cmd_len=8192; 17269f00f3a1Smrg ;; 17279f00f3a1Smrg 172874835918Smrg bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) 17299f00f3a1Smrg # This has been around since 386BSD, at least. Likely further. 17309f00f3a1Smrg if test -x /sbin/sysctl; then 17319f00f3a1Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 17329f00f3a1Smrg elif test -x /usr/sbin/sysctl; then 17339f00f3a1Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 17349f00f3a1Smrg else 17359f00f3a1Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 17369f00f3a1Smrg fi 17379f00f3a1Smrg # And add a safety zone 17389f00f3a1Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 17399f00f3a1Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 17409f00f3a1Smrg ;; 17419f00f3a1Smrg 17429f00f3a1Smrg interix*) 17439f00f3a1Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 17449f00f3a1Smrg lt_cv_sys_max_cmd_len=196608 17459f00f3a1Smrg ;; 17469f00f3a1Smrg 17479f00f3a1Smrg os2*) 17489f00f3a1Smrg # The test takes a long time on OS/2. 17499f00f3a1Smrg lt_cv_sys_max_cmd_len=8192 17509f00f3a1Smrg ;; 17519f00f3a1Smrg 17529f00f3a1Smrg osf*) 17539f00f3a1Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 17549f00f3a1Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 17559f00f3a1Smrg # nice to cause kernel panics so lets avoid the loop below. 17569f00f3a1Smrg # First set a reasonable default. 17579f00f3a1Smrg lt_cv_sys_max_cmd_len=16384 17589f00f3a1Smrg # 17599f00f3a1Smrg if test -x /sbin/sysconfig; then 17609f00f3a1Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 17619f00f3a1Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 17629f00f3a1Smrg esac 17639f00f3a1Smrg fi 17649f00f3a1Smrg ;; 17659f00f3a1Smrg sco3.2v5*) 17669f00f3a1Smrg lt_cv_sys_max_cmd_len=102400 17679f00f3a1Smrg ;; 17689f00f3a1Smrg sysv5* | sco5v6* | sysv4.2uw2*) 17699f00f3a1Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 17709f00f3a1Smrg if test -n "$kargmax"; then 177174835918Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` 17729f00f3a1Smrg else 17739f00f3a1Smrg lt_cv_sys_max_cmd_len=32768 17749f00f3a1Smrg fi 17759f00f3a1Smrg ;; 17769f00f3a1Smrg *) 17779f00f3a1Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 17789f00f3a1Smrg if test -n "$lt_cv_sys_max_cmd_len" && \ 1779edce3322Smrg test undefined != "$lt_cv_sys_max_cmd_len"; then 17809f00f3a1Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 17819f00f3a1Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 17829f00f3a1Smrg else 17839f00f3a1Smrg # Make teststring a little bigger before we do anything with it. 17849f00f3a1Smrg # a 1K string should be a reasonable start. 1785edce3322Smrg for i in 1 2 3 4 5 6 7 8; do 17869f00f3a1Smrg teststring=$teststring$teststring 17879f00f3a1Smrg done 17889f00f3a1Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 17899f00f3a1Smrg # If test is not a shell built-in, we'll probably end up computing a 17909f00f3a1Smrg # maximum length that is only half of the actual maximum length, but 17919f00f3a1Smrg # we can't tell. 1792edce3322Smrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 17939f00f3a1Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 1794edce3322Smrg test 17 != "$i" # 1/2 MB should be enough 17959f00f3a1Smrg do 17969f00f3a1Smrg i=`expr $i + 1` 17979f00f3a1Smrg teststring=$teststring$teststring 17989f00f3a1Smrg done 17999f00f3a1Smrg # Only check the string length outside the loop. 18009f00f3a1Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 18019f00f3a1Smrg teststring= 18029f00f3a1Smrg # Add a significant safety factor because C++ compilers can tack on 18039f00f3a1Smrg # massive amounts of additional arguments before passing them to the 18049f00f3a1Smrg # linker. It appears as though 1/2 is a usable value. 18059f00f3a1Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 18069f00f3a1Smrg fi 18079f00f3a1Smrg ;; 18089f00f3a1Smrg esac 18099f00f3a1Smrg]) 1810edce3322Smrgif test -n "$lt_cv_sys_max_cmd_len"; then 18119f00f3a1Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 18129f00f3a1Smrgelse 18139f00f3a1Smrg AC_MSG_RESULT(none) 18149f00f3a1Smrgfi 18159f00f3a1Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 18169f00f3a1Smrg_LT_DECL([], [max_cmd_len], [0], 18179f00f3a1Smrg [What is the maximum length of a command?]) 18189f00f3a1Smrg])# LT_CMD_MAX_LEN 18199f00f3a1Smrg 18209f00f3a1Smrg# Old name: 18219f00f3a1SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 18229f00f3a1Smrgdnl aclocal-1.4 backwards compatibility: 18239f00f3a1Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 18249f00f3a1Smrg 18259f00f3a1Smrg 18269f00f3a1Smrg# _LT_HEADER_DLFCN 18279f00f3a1Smrg# ---------------- 18289f00f3a1Smrgm4_defun([_LT_HEADER_DLFCN], 18299f00f3a1Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 18309f00f3a1Smrg])# _LT_HEADER_DLFCN 18319f00f3a1Smrg 18329f00f3a1Smrg 18339f00f3a1Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 18349f00f3a1Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 18359f00f3a1Smrg# ---------------------------------------------------------------- 18369f00f3a1Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 18379f00f3a1Smrg[m4_require([_LT_HEADER_DLFCN])dnl 1838edce3322Smrgif test yes = "$cross_compiling"; then : 18399f00f3a1Smrg [$4] 18409f00f3a1Smrgelse 18419f00f3a1Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 18429f00f3a1Smrg lt_status=$lt_dlunknown 18439f00f3a1Smrg cat > conftest.$ac_ext <<_LT_EOF 18449f00f3a1Smrg[#line $LINENO "configure" 18459f00f3a1Smrg#include "confdefs.h" 18469f00f3a1Smrg 18479f00f3a1Smrg#if HAVE_DLFCN_H 18489f00f3a1Smrg#include <dlfcn.h> 18499f00f3a1Smrg#endif 18509f00f3a1Smrg 18519f00f3a1Smrg#include <stdio.h> 18529f00f3a1Smrg 18539f00f3a1Smrg#ifdef RTLD_GLOBAL 18549f00f3a1Smrg# define LT_DLGLOBAL RTLD_GLOBAL 18559f00f3a1Smrg#else 18569f00f3a1Smrg# ifdef DL_GLOBAL 18579f00f3a1Smrg# define LT_DLGLOBAL DL_GLOBAL 18589f00f3a1Smrg# else 18599f00f3a1Smrg# define LT_DLGLOBAL 0 18609f00f3a1Smrg# endif 18619f00f3a1Smrg#endif 18629f00f3a1Smrg 18639f00f3a1Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 18649f00f3a1Smrg find out it does not work in some platform. */ 18659f00f3a1Smrg#ifndef LT_DLLAZY_OR_NOW 18669f00f3a1Smrg# ifdef RTLD_LAZY 18679f00f3a1Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 18689f00f3a1Smrg# else 18699f00f3a1Smrg# ifdef DL_LAZY 18709f00f3a1Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 18719f00f3a1Smrg# else 18729f00f3a1Smrg# ifdef RTLD_NOW 18739f00f3a1Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 18749f00f3a1Smrg# else 18759f00f3a1Smrg# ifdef DL_NOW 18769f00f3a1Smrg# define LT_DLLAZY_OR_NOW DL_NOW 18779f00f3a1Smrg# else 18789f00f3a1Smrg# define LT_DLLAZY_OR_NOW 0 18799f00f3a1Smrg# endif 18809f00f3a1Smrg# endif 18819f00f3a1Smrg# endif 18829f00f3a1Smrg# endif 18839f00f3a1Smrg#endif 18849f00f3a1Smrg 1885edce3322Smrg/* When -fvisibility=hidden is used, assume the code has been annotated 18869f00f3a1Smrg correspondingly for the symbols needed. */ 1887edce3322Smrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 18889f00f3a1Smrgint fnord () __attribute__((visibility("default"))); 18899f00f3a1Smrg#endif 18909f00f3a1Smrg 18919f00f3a1Smrgint fnord () { return 42; } 18929f00f3a1Smrgint main () 18939f00f3a1Smrg{ 18949f00f3a1Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 18959f00f3a1Smrg int status = $lt_dlunknown; 18969f00f3a1Smrg 18979f00f3a1Smrg if (self) 18989f00f3a1Smrg { 18999f00f3a1Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 19009f00f3a1Smrg else 19019f00f3a1Smrg { 19029f00f3a1Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 19039f00f3a1Smrg else puts (dlerror ()); 19049f00f3a1Smrg } 19059f00f3a1Smrg /* dlclose (self); */ 19069f00f3a1Smrg } 19079f00f3a1Smrg else 19089f00f3a1Smrg puts (dlerror ()); 19099f00f3a1Smrg 19109f00f3a1Smrg return status; 19119f00f3a1Smrg}] 19129f00f3a1Smrg_LT_EOF 1913edce3322Smrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 19149f00f3a1Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 19159f00f3a1Smrg lt_status=$? 19169f00f3a1Smrg case x$lt_status in 19179f00f3a1Smrg x$lt_dlno_uscore) $1 ;; 19189f00f3a1Smrg x$lt_dlneed_uscore) $2 ;; 19199f00f3a1Smrg x$lt_dlunknown|x*) $3 ;; 19209f00f3a1Smrg esac 19219f00f3a1Smrg else : 19229f00f3a1Smrg # compilation failed 19239f00f3a1Smrg $3 19249f00f3a1Smrg fi 19259f00f3a1Smrgfi 19269f00f3a1Smrgrm -fr conftest* 19279f00f3a1Smrg])# _LT_TRY_DLOPEN_SELF 19289f00f3a1Smrg 19299f00f3a1Smrg 19309f00f3a1Smrg# LT_SYS_DLOPEN_SELF 19319f00f3a1Smrg# ------------------ 19329f00f3a1SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 19339f00f3a1Smrg[m4_require([_LT_HEADER_DLFCN])dnl 1934edce3322Smrgif test yes != "$enable_dlopen"; then 19359f00f3a1Smrg enable_dlopen=unknown 19369f00f3a1Smrg enable_dlopen_self=unknown 19379f00f3a1Smrg enable_dlopen_self_static=unknown 19389f00f3a1Smrgelse 19399f00f3a1Smrg lt_cv_dlopen=no 19409f00f3a1Smrg lt_cv_dlopen_libs= 19419f00f3a1Smrg 19429f00f3a1Smrg case $host_os in 19439f00f3a1Smrg beos*) 1944edce3322Smrg lt_cv_dlopen=load_add_on 19459f00f3a1Smrg lt_cv_dlopen_libs= 19469f00f3a1Smrg lt_cv_dlopen_self=yes 19479f00f3a1Smrg ;; 19489f00f3a1Smrg 19499f00f3a1Smrg mingw* | pw32* | cegcc*) 1950edce3322Smrg lt_cv_dlopen=LoadLibrary 19519f00f3a1Smrg lt_cv_dlopen_libs= 19529f00f3a1Smrg ;; 19539f00f3a1Smrg 19549f00f3a1Smrg cygwin*) 1955edce3322Smrg lt_cv_dlopen=dlopen 19569f00f3a1Smrg lt_cv_dlopen_libs= 19579f00f3a1Smrg ;; 19589f00f3a1Smrg 19599f00f3a1Smrg darwin*) 1960edce3322Smrg # if libdl is installed we need to link against it 19619f00f3a1Smrg AC_CHECK_LIB([dl], [dlopen], 1962edce3322Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 1963edce3322Smrg lt_cv_dlopen=dyld 19649f00f3a1Smrg lt_cv_dlopen_libs= 19659f00f3a1Smrg lt_cv_dlopen_self=yes 19669f00f3a1Smrg ]) 19679f00f3a1Smrg ;; 19689f00f3a1Smrg 1969edce3322Smrg tpf*) 1970edce3322Smrg # Don't try to run any link tests for TPF. We know it's impossible 1971edce3322Smrg # because TPF is a cross-compiler, and we know how we open DSOs. 1972edce3322Smrg lt_cv_dlopen=dlopen 1973edce3322Smrg lt_cv_dlopen_libs= 1974edce3322Smrg lt_cv_dlopen_self=no 1975edce3322Smrg ;; 1976edce3322Smrg 19779f00f3a1Smrg *) 19789f00f3a1Smrg AC_CHECK_FUNC([shl_load], 1979edce3322Smrg [lt_cv_dlopen=shl_load], 19809f00f3a1Smrg [AC_CHECK_LIB([dld], [shl_load], 1981edce3322Smrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 19829f00f3a1Smrg [AC_CHECK_FUNC([dlopen], 1983edce3322Smrg [lt_cv_dlopen=dlopen], 19849f00f3a1Smrg [AC_CHECK_LIB([dl], [dlopen], 1985edce3322Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 19869f00f3a1Smrg [AC_CHECK_LIB([svld], [dlopen], 1987edce3322Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 19889f00f3a1Smrg [AC_CHECK_LIB([dld], [dld_link], 1989edce3322Smrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 19909f00f3a1Smrg ]) 19919f00f3a1Smrg ]) 19929f00f3a1Smrg ]) 19939f00f3a1Smrg ]) 19949f00f3a1Smrg ]) 19959f00f3a1Smrg ;; 19969f00f3a1Smrg esac 19979f00f3a1Smrg 1998edce3322Smrg if test no = "$lt_cv_dlopen"; then 19999f00f3a1Smrg enable_dlopen=no 2000edce3322Smrg else 2001edce3322Smrg enable_dlopen=yes 20029f00f3a1Smrg fi 20039f00f3a1Smrg 20049f00f3a1Smrg case $lt_cv_dlopen in 20059f00f3a1Smrg dlopen) 2006edce3322Smrg save_CPPFLAGS=$CPPFLAGS 2007edce3322Smrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 20089f00f3a1Smrg 2009edce3322Smrg save_LDFLAGS=$LDFLAGS 20109f00f3a1Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 20119f00f3a1Smrg 2012edce3322Smrg save_LIBS=$LIBS 20139f00f3a1Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 20149f00f3a1Smrg 20159f00f3a1Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 20169f00f3a1Smrg lt_cv_dlopen_self, [dnl 20179f00f3a1Smrg _LT_TRY_DLOPEN_SELF( 20189f00f3a1Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 20199f00f3a1Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 20209f00f3a1Smrg ]) 20219f00f3a1Smrg 2022edce3322Smrg if test yes = "$lt_cv_dlopen_self"; then 20239f00f3a1Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 20249f00f3a1Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 20259f00f3a1Smrg lt_cv_dlopen_self_static, [dnl 20269f00f3a1Smrg _LT_TRY_DLOPEN_SELF( 20279f00f3a1Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 20289f00f3a1Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 20299f00f3a1Smrg ]) 20309f00f3a1Smrg fi 20319f00f3a1Smrg 2032edce3322Smrg CPPFLAGS=$save_CPPFLAGS 2033edce3322Smrg LDFLAGS=$save_LDFLAGS 2034edce3322Smrg LIBS=$save_LIBS 20359f00f3a1Smrg ;; 20369f00f3a1Smrg esac 20379f00f3a1Smrg 20389f00f3a1Smrg case $lt_cv_dlopen_self in 20399f00f3a1Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 20409f00f3a1Smrg *) enable_dlopen_self=unknown ;; 20419f00f3a1Smrg esac 20429f00f3a1Smrg 20439f00f3a1Smrg case $lt_cv_dlopen_self_static in 20449f00f3a1Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 20459f00f3a1Smrg *) enable_dlopen_self_static=unknown ;; 20469f00f3a1Smrg esac 20479f00f3a1Smrgfi 20489f00f3a1Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 20499f00f3a1Smrg [Whether dlopen is supported]) 20509f00f3a1Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 20519f00f3a1Smrg [Whether dlopen of programs is supported]) 20529f00f3a1Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 20539f00f3a1Smrg [Whether dlopen of statically linked programs is supported]) 20549f00f3a1Smrg])# LT_SYS_DLOPEN_SELF 20559f00f3a1Smrg 20569f00f3a1Smrg# Old name: 20579f00f3a1SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 20589f00f3a1Smrgdnl aclocal-1.4 backwards compatibility: 20599f00f3a1Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 20609f00f3a1Smrg 20619f00f3a1Smrg 20629f00f3a1Smrg# _LT_COMPILER_C_O([TAGNAME]) 20639f00f3a1Smrg# --------------------------- 20649f00f3a1Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 20659f00f3a1Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 20669f00f3a1Smrgm4_defun([_LT_COMPILER_C_O], 20679f00f3a1Smrg[m4_require([_LT_DECL_SED])dnl 20689f00f3a1Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 20699f00f3a1Smrgm4_require([_LT_TAG_COMPILER])dnl 20709f00f3a1SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 20719f00f3a1Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 20729f00f3a1Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 20739f00f3a1Smrg $RM -r conftest 2>/dev/null 20749f00f3a1Smrg mkdir conftest 20759f00f3a1Smrg cd conftest 20769f00f3a1Smrg mkdir out 20779f00f3a1Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 20789f00f3a1Smrg 20799f00f3a1Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 20809f00f3a1Smrg # Insert the option either (1) after the last *FLAGS variable, or 20819f00f3a1Smrg # (2) before a word containing "conftest.", or (3) at the end. 20829f00f3a1Smrg # Note that $ac_compile itself does not contain backslashes and begins 20839f00f3a1Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 20849f00f3a1Smrg lt_compile=`echo "$ac_compile" | $SED \ 20859f00f3a1Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 20869f00f3a1Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 20879f00f3a1Smrg -e 's:$: $lt_compiler_flag:'` 20889f00f3a1Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 20899f00f3a1Smrg (eval "$lt_compile" 2>out/conftest.err) 20909f00f3a1Smrg ac_status=$? 20919f00f3a1Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 20929f00f3a1Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 20939f00f3a1Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 20949f00f3a1Smrg then 20959f00f3a1Smrg # The compiler can only warn and ignore the option if not recognized 20969f00f3a1Smrg # So say no if there are warnings 20979f00f3a1Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 20989f00f3a1Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 20999f00f3a1Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 21009f00f3a1Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 21019f00f3a1Smrg fi 21029f00f3a1Smrg fi 21039f00f3a1Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 21049f00f3a1Smrg $RM conftest* 21059f00f3a1Smrg # SGI C++ compiler will create directory out/ii_files/ for 21069f00f3a1Smrg # template instantiation 21079f00f3a1Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 21089f00f3a1Smrg $RM out/* && rmdir out 21099f00f3a1Smrg cd .. 21109f00f3a1Smrg $RM -r conftest 21119f00f3a1Smrg $RM conftest* 21129f00f3a1Smrg]) 21139f00f3a1Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 21149f00f3a1Smrg [Does compiler simultaneously support -c and -o options?]) 21159f00f3a1Smrg])# _LT_COMPILER_C_O 21169f00f3a1Smrg 21179f00f3a1Smrg 21189f00f3a1Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 21199f00f3a1Smrg# ---------------------------------- 21209f00f3a1Smrg# Check to see if we can do hard links to lock some files if needed 21219f00f3a1Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 21229f00f3a1Smrg[m4_require([_LT_ENABLE_LOCK])dnl 21239f00f3a1Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 21249f00f3a1Smrg_LT_COMPILER_C_O([$1]) 21259f00f3a1Smrg 2126edce3322Smrghard_links=nottested 2127edce3322Smrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 21289f00f3a1Smrg # do not overwrite the value of need_locks provided by the user 21299f00f3a1Smrg AC_MSG_CHECKING([if we can lock with hard links]) 21309f00f3a1Smrg hard_links=yes 21319f00f3a1Smrg $RM conftest* 21329f00f3a1Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 21339f00f3a1Smrg touch conftest.a 21349f00f3a1Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 21359f00f3a1Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 21369f00f3a1Smrg AC_MSG_RESULT([$hard_links]) 2137edce3322Smrg if test no = "$hard_links"; then 2138edce3322Smrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 21399f00f3a1Smrg need_locks=warn 21409f00f3a1Smrg fi 21419f00f3a1Smrgelse 21429f00f3a1Smrg need_locks=no 21439f00f3a1Smrgfi 21449f00f3a1Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 21459f00f3a1Smrg])# _LT_COMPILER_FILE_LOCKS 21469f00f3a1Smrg 21479f00f3a1Smrg 21489f00f3a1Smrg# _LT_CHECK_OBJDIR 21499f00f3a1Smrg# ---------------- 21509f00f3a1Smrgm4_defun([_LT_CHECK_OBJDIR], 21519f00f3a1Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 21529f00f3a1Smrg[rm -f .libs 2>/dev/null 21539f00f3a1Smrgmkdir .libs 2>/dev/null 21549f00f3a1Smrgif test -d .libs; then 21559f00f3a1Smrg lt_cv_objdir=.libs 21569f00f3a1Smrgelse 21579f00f3a1Smrg # MS-DOS does not allow filenames that begin with a dot. 21589f00f3a1Smrg lt_cv_objdir=_libs 21599f00f3a1Smrgfi 21609f00f3a1Smrgrmdir .libs 2>/dev/null]) 21619f00f3a1Smrgobjdir=$lt_cv_objdir 21629f00f3a1Smrg_LT_DECL([], [objdir], [0], 21639f00f3a1Smrg [The name of the directory that contains temporary libtool files])dnl 21649f00f3a1Smrgm4_pattern_allow([LT_OBJDIR])dnl 2165edce3322SmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 2166edce3322Smrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 21679f00f3a1Smrg])# _LT_CHECK_OBJDIR 21689f00f3a1Smrg 21699f00f3a1Smrg 21709f00f3a1Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 21719f00f3a1Smrg# -------------------------------------- 21729f00f3a1Smrg# Check hardcoding attributes. 21739f00f3a1Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 21749f00f3a1Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 21759f00f3a1Smrg_LT_TAGVAR(hardcode_action, $1)= 21769f00f3a1Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 21779f00f3a1Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 2178edce3322Smrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 21799f00f3a1Smrg 21809f00f3a1Smrg # We can hardcode non-existent directories. 2181edce3322Smrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 21829f00f3a1Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 21839f00f3a1Smrg # have to relink, otherwise we might link with an installed library 21849f00f3a1Smrg # when we should be linking with a yet-to-be-installed one 2185edce3322Smrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 2186edce3322Smrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 21879f00f3a1Smrg # Linking always hardcodes the temporary library directory. 21889f00f3a1Smrg _LT_TAGVAR(hardcode_action, $1)=relink 21899f00f3a1Smrg else 21909f00f3a1Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 21919f00f3a1Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 21929f00f3a1Smrg fi 21939f00f3a1Smrgelse 21949f00f3a1Smrg # We cannot hardcode anything, or else we can only hardcode existing 21959f00f3a1Smrg # directories. 21969f00f3a1Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 21979f00f3a1Smrgfi 21989f00f3a1SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 21999f00f3a1Smrg 2200edce3322Smrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 2201edce3322Smrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 22029f00f3a1Smrg # Fast installation is not supported 22039f00f3a1Smrg enable_fast_install=no 2204edce3322Smrgelif test yes = "$shlibpath_overrides_runpath" || 2205edce3322Smrg test no = "$enable_shared"; then 22069f00f3a1Smrg # Fast installation is not necessary 22079f00f3a1Smrg enable_fast_install=needless 22089f00f3a1Smrgfi 22099f00f3a1Smrg_LT_TAGDECL([], [hardcode_action], [0], 22109f00f3a1Smrg [How to hardcode a shared library path into an executable]) 22119f00f3a1Smrg])# _LT_LINKER_HARDCODE_LIBPATH 22129f00f3a1Smrg 22139f00f3a1Smrg 22149f00f3a1Smrg# _LT_CMD_STRIPLIB 22159f00f3a1Smrg# ---------------- 22169f00f3a1Smrgm4_defun([_LT_CMD_STRIPLIB], 22179f00f3a1Smrg[m4_require([_LT_DECL_EGREP]) 22189f00f3a1Smrgstriplib= 22199f00f3a1Smrgold_striplib= 22209f00f3a1SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 222174835918Smrgif test -z "$STRIP"; then 222274835918Smrg AC_MSG_RESULT([no]) 22239f00f3a1Smrgelse 222474835918Smrg if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 222574835918Smrg old_striplib="$STRIP --strip-debug" 222674835918Smrg striplib="$STRIP --strip-unneeded" 222774835918Smrg AC_MSG_RESULT([yes]) 222874835918Smrg else 222974835918Smrg case $host_os in 223074835918Smrg darwin*) 223174835918Smrg # FIXME - insert some real tests, host_os isn't really good enough 22329f00f3a1Smrg striplib="$STRIP -x" 22339f00f3a1Smrg old_striplib="$STRIP -S" 22349f00f3a1Smrg AC_MSG_RESULT([yes]) 223574835918Smrg ;; 223674835918Smrg freebsd*) 223774835918Smrg if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 223874835918Smrg old_striplib="$STRIP --strip-debug" 223974835918Smrg striplib="$STRIP --strip-unneeded" 224074835918Smrg AC_MSG_RESULT([yes]) 224174835918Smrg else 224274835918Smrg AC_MSG_RESULT([no]) 224374835918Smrg fi 224474835918Smrg ;; 224574835918Smrg *) 22469f00f3a1Smrg AC_MSG_RESULT([no]) 224774835918Smrg ;; 224874835918Smrg esac 224974835918Smrg fi 22509f00f3a1Smrgfi 22519f00f3a1Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 22529f00f3a1Smrg_LT_DECL([], [striplib], [1]) 22539f00f3a1Smrg])# _LT_CMD_STRIPLIB 22549f00f3a1Smrg 22559f00f3a1Smrg 2256edce3322Smrg# _LT_PREPARE_MUNGE_PATH_LIST 2257edce3322Smrg# --------------------------- 2258edce3322Smrg# Make sure func_munge_path_list() is defined correctly. 2259edce3322Smrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 2260edce3322Smrg[[# func_munge_path_list VARIABLE PATH 2261edce3322Smrg# ----------------------------------- 2262edce3322Smrg# VARIABLE is name of variable containing _space_ separated list of 2263edce3322Smrg# directories to be munged by the contents of PATH, which is string 2264edce3322Smrg# having a format: 2265edce3322Smrg# "DIR[:DIR]:" 2266edce3322Smrg# string "DIR[ DIR]" will be prepended to VARIABLE 2267edce3322Smrg# ":DIR[:DIR]" 2268edce3322Smrg# string "DIR[ DIR]" will be appended to VARIABLE 2269edce3322Smrg# "DIRP[:DIRP]::[DIRA:]DIRA" 2270edce3322Smrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 2271edce3322Smrg# "DIRA[ DIRA]" will be appended to VARIABLE 2272edce3322Smrg# "DIR[:DIR]" 2273edce3322Smrg# VARIABLE will be replaced by "DIR[ DIR]" 2274edce3322Smrgfunc_munge_path_list () 2275edce3322Smrg{ 2276edce3322Smrg case x@S|@2 in 2277edce3322Smrg x) 2278edce3322Smrg ;; 2279edce3322Smrg *:) 2280edce3322Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 2281edce3322Smrg ;; 2282edce3322Smrg x:*) 2283edce3322Smrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 2284edce3322Smrg ;; 2285edce3322Smrg *::*) 2286edce3322Smrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 2287edce3322Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 2288edce3322Smrg ;; 2289edce3322Smrg *) 2290edce3322Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 2291edce3322Smrg ;; 2292edce3322Smrg esac 2293edce3322Smrg} 2294edce3322Smrg]])# _LT_PREPARE_PATH_LIST 2295edce3322Smrg 2296edce3322Smrg 22979f00f3a1Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 22989f00f3a1Smrg# ----------------------------- 22999f00f3a1Smrg# PORTME Fill in your ld.so characteristics 23009f00f3a1Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 23019f00f3a1Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 23029f00f3a1Smrgm4_require([_LT_DECL_EGREP])dnl 23039f00f3a1Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 23049f00f3a1Smrgm4_require([_LT_DECL_OBJDUMP])dnl 23059f00f3a1Smrgm4_require([_LT_DECL_SED])dnl 23069f00f3a1Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2307edce3322Smrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 23089f00f3a1SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 23099f00f3a1Smrgm4_if([$1], 23109f00f3a1Smrg [], [ 2311edce3322Smrgif test yes = "$GCC"; then 23129f00f3a1Smrg case $host_os in 2313edce3322Smrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 2314edce3322Smrg *) lt_awk_arg='/^libraries:/' ;; 23159f00f3a1Smrg esac 23169f00f3a1Smrg case $host_os in 2317edce3322Smrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 2318edce3322Smrg *) lt_sed_strip_eq='s|=/|/|g' ;; 23199f00f3a1Smrg esac 23209f00f3a1Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 23219f00f3a1Smrg case $lt_search_path_spec in 23229f00f3a1Smrg *\;*) 23239f00f3a1Smrg # if the path contains ";" then we assume it to be the separator 23249f00f3a1Smrg # otherwise default to the standard path separator (i.e. ":") - it is 23259f00f3a1Smrg # assumed that no part of a normal pathname contains ";" but that should 23269f00f3a1Smrg # okay in the real world where ";" in dirpaths is itself problematic. 23279f00f3a1Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 23289f00f3a1Smrg ;; 23299f00f3a1Smrg *) 23309f00f3a1Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 23319f00f3a1Smrg ;; 23329f00f3a1Smrg esac 23339f00f3a1Smrg # Ok, now we have the path, separated by spaces, we can step through it 2334edce3322Smrg # and add multilib dir if necessary... 23359f00f3a1Smrg lt_tmp_lt_search_path_spec= 2336edce3322Smrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2337edce3322Smrg # ...but if some path component already ends with the multilib dir we assume 2338edce3322Smrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 2339edce3322Smrg case "$lt_multi_os_dir; $lt_search_path_spec " in 2340edce3322Smrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 2341edce3322Smrg lt_multi_os_dir= 2342edce3322Smrg ;; 2343edce3322Smrg esac 23449f00f3a1Smrg for lt_sys_path in $lt_search_path_spec; do 2345edce3322Smrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 2346edce3322Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 2347edce3322Smrg elif test -n "$lt_multi_os_dir"; then 23489f00f3a1Smrg test -d "$lt_sys_path" && \ 23499f00f3a1Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 23509f00f3a1Smrg fi 23519f00f3a1Smrg done 23529f00f3a1Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2353edce3322SmrgBEGIN {RS = " "; FS = "/|\n";} { 2354edce3322Smrg lt_foo = ""; 2355edce3322Smrg lt_count = 0; 23569f00f3a1Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 23579f00f3a1Smrg if ($lt_i != "" && $lt_i != ".") { 23589f00f3a1Smrg if ($lt_i == "..") { 23599f00f3a1Smrg lt_count++; 23609f00f3a1Smrg } else { 23619f00f3a1Smrg if (lt_count == 0) { 2362edce3322Smrg lt_foo = "/" $lt_i lt_foo; 23639f00f3a1Smrg } else { 23649f00f3a1Smrg lt_count--; 23659f00f3a1Smrg } 23669f00f3a1Smrg } 23679f00f3a1Smrg } 23689f00f3a1Smrg } 23699f00f3a1Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 23709f00f3a1Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 23719f00f3a1Smrg}'` 23729f00f3a1Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 23739f00f3a1Smrg # for these hosts. 23749f00f3a1Smrg case $host_os in 23759f00f3a1Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2376edce3322Smrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 23779f00f3a1Smrg esac 23789f00f3a1Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 23799f00f3a1Smrgelse 23809f00f3a1Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 23819f00f3a1Smrgfi]) 23829f00f3a1Smrglibrary_names_spec= 23839f00f3a1Smrglibname_spec='lib$name' 23849f00f3a1Smrgsoname_spec= 2385edce3322Smrgshrext_cmds=.so 23869f00f3a1Smrgpostinstall_cmds= 23879f00f3a1Smrgpostuninstall_cmds= 23889f00f3a1Smrgfinish_cmds= 23899f00f3a1Smrgfinish_eval= 23909f00f3a1Smrgshlibpath_var= 23919f00f3a1Smrgshlibpath_overrides_runpath=unknown 23929f00f3a1Smrgversion_type=none 23939f00f3a1Smrgdynamic_linker="$host_os ld.so" 23949f00f3a1Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 23959f00f3a1Smrgneed_lib_prefix=unknown 23969f00f3a1Smrghardcode_into_libs=no 23979f00f3a1Smrg 23989f00f3a1Smrg# when you set need_version to no, make sure it does not cause -set_version 23999f00f3a1Smrg# flags to be left without arguments 24009f00f3a1Smrgneed_version=unknown 24019f00f3a1Smrg 2402edce3322SmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 2403edce3322Smrg[User-defined run-time library search path.]) 2404edce3322Smrg 24059f00f3a1Smrgcase $host_os in 24069f00f3a1Smrgaix3*) 24079f00f3a1Smrg version_type=linux # correct to gnu/linux during the next big refactor 2408edce3322Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 24099f00f3a1Smrg shlibpath_var=LIBPATH 24109f00f3a1Smrg 24119f00f3a1Smrg # AIX 3 has no versioning support, so we append a major version to the name. 2412edce3322Smrg soname_spec='$libname$release$shared_ext$major' 24139f00f3a1Smrg ;; 24149f00f3a1Smrg 24159f00f3a1Smrgaix[[4-9]]*) 24169f00f3a1Smrg version_type=linux # correct to gnu/linux during the next big refactor 24179f00f3a1Smrg need_lib_prefix=no 24189f00f3a1Smrg need_version=no 24199f00f3a1Smrg hardcode_into_libs=yes 2420edce3322Smrg if test ia64 = "$host_cpu"; then 24219f00f3a1Smrg # AIX 5 supports IA64 2422edce3322Smrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 24239f00f3a1Smrg shlibpath_var=LD_LIBRARY_PATH 24249f00f3a1Smrg else 24259f00f3a1Smrg # With GCC up to 2.95.x, collect2 would create an import file 24269f00f3a1Smrg # for dependence libraries. The import file would start with 2427edce3322Smrg # the line '#! .'. This would cause the generated library to 2428edce3322Smrg # depend on '.', always an invalid library. This was fixed in 24299f00f3a1Smrg # development snapshots of GCC prior to 3.0. 24309f00f3a1Smrg case $host_os in 24319f00f3a1Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 24329f00f3a1Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 24339f00f3a1Smrg echo ' yes ' 2434edce3322Smrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 24359f00f3a1Smrg : 24369f00f3a1Smrg else 24379f00f3a1Smrg can_build_shared=no 24389f00f3a1Smrg fi 24399f00f3a1Smrg ;; 24409f00f3a1Smrg esac 2441edce3322Smrg # Using Import Files as archive members, it is possible to support 2442edce3322Smrg # filename-based versioning of shared library archives on AIX. While 2443edce3322Smrg # this would work for both with and without runtime linking, it will 2444edce3322Smrg # prevent static linking of such archives. So we do filename-based 2445edce3322Smrg # shared library versioning with .so extension only, which is used 2446edce3322Smrg # when both runtime linking and shared linking is enabled. 2447edce3322Smrg # Unfortunately, runtime linking may impact performance, so we do 2448edce3322Smrg # not want this to be the default eventually. Also, we use the 2449edce3322Smrg # versioned .so libs for executables only if there is the -brtl 2450edce3322Smrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 2451edce3322Smrg # To allow for filename-based versioning support, we need to create 2452edce3322Smrg # libNAME.so.V as an archive file, containing: 2453edce3322Smrg # *) an Import File, referring to the versioned filename of the 2454edce3322Smrg # archive as well as the shared archive member, telling the 2455edce3322Smrg # bitwidth (32 or 64) of that shared object, and providing the 2456edce3322Smrg # list of exported symbols of that shared object, eventually 2457edce3322Smrg # decorated with the 'weak' keyword 2458edce3322Smrg # *) the shared object with the F_LOADONLY flag set, to really avoid 2459edce3322Smrg # it being seen by the linker. 2460edce3322Smrg # At run time we better use the real file rather than another symlink, 2461edce3322Smrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 2462edce3322Smrg 2463edce3322Smrg case $with_aix_soname,$aix_use_runtimelinking in 2464edce3322Smrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 24659f00f3a1Smrg # soname into executable. Probably we can add versioning support to 24669f00f3a1Smrg # collect2, so additional links can be useful in future. 2467edce3322Smrg aix,yes) # traditional libtool 2468edce3322Smrg dynamic_linker='AIX unversionable lib.so' 24699f00f3a1Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 24709f00f3a1Smrg # instead of lib<name>.a to let people know that these are not 24719f00f3a1Smrg # typical AIX shared libraries. 2472edce3322Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2473edce3322Smrg ;; 2474edce3322Smrg aix,no) # traditional AIX only 2475edce3322Smrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 24769f00f3a1Smrg # We preserve .a as extension for shared libraries through AIX4.2 24779f00f3a1Smrg # and later when we are not doing run time linking. 2478edce3322Smrg library_names_spec='$libname$release.a $libname.a' 2479edce3322Smrg soname_spec='$libname$release$shared_ext$major' 2480edce3322Smrg ;; 2481edce3322Smrg svr4,*) # full svr4 only 2482edce3322Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 2483edce3322Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2484edce3322Smrg # We do not specify a path in Import Files, so LIBPATH fires. 2485edce3322Smrg shlibpath_overrides_runpath=yes 2486edce3322Smrg ;; 2487edce3322Smrg *,yes) # both, prefer svr4 2488edce3322Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 2489edce3322Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2490edce3322Smrg # unpreferred sharedlib libNAME.a needs extra handling 2491edce3322Smrg 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"' 2492edce3322Smrg 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"' 2493edce3322Smrg # We do not specify a path in Import Files, so LIBPATH fires. 2494edce3322Smrg shlibpath_overrides_runpath=yes 2495edce3322Smrg ;; 2496edce3322Smrg *,no) # both, prefer aix 2497edce3322Smrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 2498edce3322Smrg library_names_spec='$libname$release.a $libname.a' 2499edce3322Smrg soname_spec='$libname$release$shared_ext$major' 2500edce3322Smrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 2501edce3322Smrg 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)' 2502edce3322Smrg 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"' 2503edce3322Smrg ;; 2504edce3322Smrg esac 25059f00f3a1Smrg shlibpath_var=LIBPATH 25069f00f3a1Smrg fi 25079f00f3a1Smrg ;; 25089f00f3a1Smrg 25099f00f3a1Smrgamigaos*) 25109f00f3a1Smrg case $host_cpu in 25119f00f3a1Smrg powerpc) 25129f00f3a1Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 25139f00f3a1Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2514edce3322Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 25159f00f3a1Smrg ;; 25169f00f3a1Smrg m68k) 25179f00f3a1Smrg library_names_spec='$libname.ixlibrary $libname.a' 25189f00f3a1Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2519edce3322Smrg 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' 25209f00f3a1Smrg ;; 25219f00f3a1Smrg esac 25229f00f3a1Smrg ;; 25239f00f3a1Smrg 25249f00f3a1Smrgbeos*) 2525edce3322Smrg library_names_spec='$libname$shared_ext' 25269f00f3a1Smrg dynamic_linker="$host_os ld.so" 25279f00f3a1Smrg shlibpath_var=LIBRARY_PATH 25289f00f3a1Smrg ;; 25299f00f3a1Smrg 25309f00f3a1Smrgbsdi[[45]]*) 25319f00f3a1Smrg version_type=linux # correct to gnu/linux during the next big refactor 25329f00f3a1Smrg need_version=no 2533edce3322Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2534edce3322Smrg soname_spec='$libname$release$shared_ext$major' 25359f00f3a1Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 25369f00f3a1Smrg shlibpath_var=LD_LIBRARY_PATH 25379f00f3a1Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 25389f00f3a1Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 25399f00f3a1Smrg # the default ld.so.conf also contains /usr/contrib/lib and 25409f00f3a1Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 25419f00f3a1Smrg # libtool to hard-code these into programs 25429f00f3a1Smrg ;; 25439f00f3a1Smrg 25449f00f3a1Smrgcygwin* | mingw* | pw32* | cegcc*) 25459f00f3a1Smrg version_type=windows 2546edce3322Smrg shrext_cmds=.dll 25479f00f3a1Smrg need_version=no 25489f00f3a1Smrg need_lib_prefix=no 25499f00f3a1Smrg 25509f00f3a1Smrg case $GCC,$cc_basename in 25519f00f3a1Smrg yes,*) 25529f00f3a1Smrg # gcc 25539f00f3a1Smrg library_names_spec='$libname.dll.a' 25549f00f3a1Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2555edce3322Smrg postinstall_cmds='base_file=`basename \$file`~ 2556edce3322Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 25579f00f3a1Smrg dldir=$destdir/`dirname \$dlpath`~ 25589f00f3a1Smrg test -d \$dldir || mkdir -p \$dldir~ 25599f00f3a1Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 25609f00f3a1Smrg chmod a+x \$dldir/$dlname~ 25619f00f3a1Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 25629f00f3a1Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 25639f00f3a1Smrg fi' 25649f00f3a1Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 25659f00f3a1Smrg dlpath=$dir/\$dldll~ 25669f00f3a1Smrg $RM \$dlpath' 25679f00f3a1Smrg shlibpath_overrides_runpath=yes 25689f00f3a1Smrg 25699f00f3a1Smrg case $host_os in 25709f00f3a1Smrg cygwin*) 25719f00f3a1Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 257274835918Smrg soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25739f00f3a1Smrgm4_if([$1], [],[ 25749f00f3a1Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 25759f00f3a1Smrg ;; 25769f00f3a1Smrg mingw* | cegcc*) 25779f00f3a1Smrg # MinGW DLLs use traditional 'lib' prefix 2578edce3322Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25799f00f3a1Smrg ;; 25809f00f3a1Smrg pw32*) 25819f00f3a1Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 258274835918Smrg library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25839f00f3a1Smrg ;; 25849f00f3a1Smrg esac 25859f00f3a1Smrg dynamic_linker='Win32 ld.exe' 25869f00f3a1Smrg ;; 25879f00f3a1Smrg 258874835918Smrg *,cl* | *,icl*) 258974835918Smrg # Native MSVC or ICC 25909f00f3a1Smrg libname_spec='$name' 2591edce3322Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2592edce3322Smrg library_names_spec='$libname.dll.lib' 25939f00f3a1Smrg 25949f00f3a1Smrg case $build_os in 25959f00f3a1Smrg mingw*) 25969f00f3a1Smrg sys_lib_search_path_spec= 25979f00f3a1Smrg lt_save_ifs=$IFS 25989f00f3a1Smrg IFS=';' 25999f00f3a1Smrg for lt_path in $LIB 26009f00f3a1Smrg do 26019f00f3a1Smrg IFS=$lt_save_ifs 26029f00f3a1Smrg # Let DOS variable expansion print the short 8.3 style file name. 26039f00f3a1Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 26049f00f3a1Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 26059f00f3a1Smrg done 26069f00f3a1Smrg IFS=$lt_save_ifs 26079f00f3a1Smrg # Convert to MSYS style. 260874835918Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 26099f00f3a1Smrg ;; 26109f00f3a1Smrg cygwin*) 26119f00f3a1Smrg # Convert to unix form, then to dos form, then back to unix form 26129f00f3a1Smrg # but this time dos style (no spaces!) so that the unix form looks 26139f00f3a1Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 26149f00f3a1Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 26159f00f3a1Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 26169f00f3a1Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 26179f00f3a1Smrg ;; 26189f00f3a1Smrg *) 2619edce3322Smrg sys_lib_search_path_spec=$LIB 26209f00f3a1Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 26219f00f3a1Smrg # It is most probably a Windows format PATH. 26229f00f3a1Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 26239f00f3a1Smrg else 26249f00f3a1Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 26259f00f3a1Smrg fi 26269f00f3a1Smrg # FIXME: find the short name or the path components, as spaces are 26279f00f3a1Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 26289f00f3a1Smrg ;; 26299f00f3a1Smrg esac 26309f00f3a1Smrg 26319f00f3a1Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2632edce3322Smrg postinstall_cmds='base_file=`basename \$file`~ 2633edce3322Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 26349f00f3a1Smrg dldir=$destdir/`dirname \$dlpath`~ 26359f00f3a1Smrg test -d \$dldir || mkdir -p \$dldir~ 26369f00f3a1Smrg $install_prog $dir/$dlname \$dldir/$dlname' 26379f00f3a1Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 26389f00f3a1Smrg dlpath=$dir/\$dldll~ 26399f00f3a1Smrg $RM \$dlpath' 26409f00f3a1Smrg shlibpath_overrides_runpath=yes 26419f00f3a1Smrg dynamic_linker='Win32 link.exe' 26429f00f3a1Smrg ;; 26439f00f3a1Smrg 26449f00f3a1Smrg *) 264574835918Smrg # Assume MSVC and ICC wrapper 2646edce3322Smrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 26479f00f3a1Smrg dynamic_linker='Win32 ld.exe' 26489f00f3a1Smrg ;; 26499f00f3a1Smrg esac 26509f00f3a1Smrg # FIXME: first we should search . and the directory the executable is in 26519f00f3a1Smrg shlibpath_var=PATH 26529f00f3a1Smrg ;; 26539f00f3a1Smrg 26549f00f3a1Smrgdarwin* | rhapsody*) 26559f00f3a1Smrg dynamic_linker="$host_os dyld" 26569f00f3a1Smrg version_type=darwin 26579f00f3a1Smrg need_lib_prefix=no 26589f00f3a1Smrg need_version=no 265952dc082bSmrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 2660edce3322Smrg soname_spec='$libname$release$major$shared_ext' 26619f00f3a1Smrg shlibpath_overrides_runpath=yes 26629f00f3a1Smrg shlibpath_var=DYLD_LIBRARY_PATH 266352dc082bSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 26649f00f3a1Smrgm4_if([$1], [],[ 26659f00f3a1Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 26669f00f3a1Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 26679f00f3a1Smrg ;; 26689f00f3a1Smrg 26699f00f3a1Smrgdgux*) 26709f00f3a1Smrg version_type=linux # correct to gnu/linux during the next big refactor 26719f00f3a1Smrg need_lib_prefix=no 26729f00f3a1Smrg need_version=no 2673edce3322Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2674edce3322Smrg soname_spec='$libname$release$shared_ext$major' 26759f00f3a1Smrg shlibpath_var=LD_LIBRARY_PATH 26769f00f3a1Smrg ;; 26779f00f3a1Smrg 267874835918Smrgfreebsd* | dragonfly* | midnightbsd*) 26799f00f3a1Smrg # DragonFly does not have aout. When/if they implement a new 26809f00f3a1Smrg # versioning mechanism, adjust this. 26819f00f3a1Smrg if test -x /usr/bin/objformat; then 26829f00f3a1Smrg objformat=`/usr/bin/objformat` 26839f00f3a1Smrg else 26849f00f3a1Smrg case $host_os in 26859f00f3a1Smrg freebsd[[23]].*) objformat=aout ;; 26869f00f3a1Smrg *) objformat=elf ;; 26879f00f3a1Smrg esac 26889f00f3a1Smrg fi 268952dc082bSmrg version_type=freebsd-$objformat 26909f00f3a1Smrg case $version_type in 26919f00f3a1Smrg freebsd-elf*) 2692edce3322Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2693edce3322Smrg soname_spec='$libname$release$shared_ext$major' 26949f00f3a1Smrg need_version=no 26959f00f3a1Smrg need_lib_prefix=no 26969f00f3a1Smrg ;; 26979f00f3a1Smrg freebsd-*) 2698edce3322Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 26999f00f3a1Smrg need_version=yes 27009f00f3a1Smrg ;; 27019f00f3a1Smrg esac 27029f00f3a1Smrg shlibpath_var=LD_LIBRARY_PATH 27039f00f3a1Smrg case $host_os in 27049f00f3a1Smrg freebsd2.*) 27059f00f3a1Smrg shlibpath_overrides_runpath=yes 27069f00f3a1Smrg ;; 27079f00f3a1Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 27089f00f3a1Smrg shlibpath_overrides_runpath=yes 27099f00f3a1Smrg hardcode_into_libs=yes 27109f00f3a1Smrg ;; 27119f00f3a1Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 27129f00f3a1Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 27139f00f3a1Smrg shlibpath_overrides_runpath=no 27149f00f3a1Smrg hardcode_into_libs=yes 27159f00f3a1Smrg ;; 27169f00f3a1Smrg *) # from 4.6 on, and DragonFly 27179f00f3a1Smrg shlibpath_overrides_runpath=yes 27189f00f3a1Smrg hardcode_into_libs=yes 27199f00f3a1Smrg ;; 27209f00f3a1Smrg esac 27219f00f3a1Smrg ;; 27229f00f3a1Smrg 27239f00f3a1Smrghaiku*) 27249f00f3a1Smrg version_type=linux # correct to gnu/linux during the next big refactor 27259f00f3a1Smrg need_lib_prefix=no 27269f00f3a1Smrg need_version=no 27279f00f3a1Smrg dynamic_linker="$host_os runtime_loader" 2728edce3322Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2729edce3322Smrg soname_spec='$libname$release$shared_ext$major' 27309f00f3a1Smrg shlibpath_var=LIBRARY_PATH 2731edce3322Smrg shlibpath_overrides_runpath=no 27329f00f3a1Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 27339f00f3a1Smrg hardcode_into_libs=yes 27349f00f3a1Smrg ;; 27359f00f3a1Smrg 27369f00f3a1Smrghpux9* | hpux10* | hpux11*) 27379f00f3a1Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 27389f00f3a1Smrg # link against other versions. 27399f00f3a1Smrg version_type=sunos 27409f00f3a1Smrg need_lib_prefix=no 27419f00f3a1Smrg need_version=no 27429f00f3a1Smrg case $host_cpu in 27439f00f3a1Smrg ia64*) 27449f00f3a1Smrg shrext_cmds='.so' 27459f00f3a1Smrg hardcode_into_libs=yes 27469f00f3a1Smrg dynamic_linker="$host_os dld.so" 27479f00f3a1Smrg shlibpath_var=LD_LIBRARY_PATH 27489f00f3a1Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2749edce3322Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2750edce3322Smrg soname_spec='$libname$release$shared_ext$major' 2751edce3322Smrg if test 32 = "$HPUX_IA64_MODE"; then 27529f00f3a1Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2753edce3322Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 27549f00f3a1Smrg else 27559f00f3a1Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2756edce3322Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 27579f00f3a1Smrg fi 27589f00f3a1Smrg ;; 27599f00f3a1Smrg hppa*64*) 27609f00f3a1Smrg shrext_cmds='.sl' 27619f00f3a1Smrg hardcode_into_libs=yes 27629f00f3a1Smrg dynamic_linker="$host_os dld.sl" 27639f00f3a1Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 27649f00f3a1Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2765edce3322Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2766edce3322Smrg soname_spec='$libname$release$shared_ext$major' 27679f00f3a1Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 27689f00f3a1Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 27699f00f3a1Smrg ;; 27709f00f3a1Smrg *) 27719f00f3a1Smrg shrext_cmds='.sl' 27729f00f3a1Smrg dynamic_linker="$host_os dld.sl" 27739f00f3a1Smrg shlibpath_var=SHLIB_PATH 27749f00f3a1Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2775edce3322Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2776edce3322Smrg soname_spec='$libname$release$shared_ext$major' 27779f00f3a1Smrg ;; 27789f00f3a1Smrg esac 27799f00f3a1Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 27809f00f3a1Smrg postinstall_cmds='chmod 555 $lib' 27819f00f3a1Smrg # or fails outright, so override atomically: 27829f00f3a1Smrg install_override_mode=555 27839f00f3a1Smrg ;; 27849f00f3a1Smrg 27859f00f3a1Smrginterix[[3-9]]*) 27869f00f3a1Smrg version_type=linux # correct to gnu/linux during the next big refactor 27879f00f3a1Smrg need_lib_prefix=no 27889f00f3a1Smrg need_version=no 2789edce3322Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2790edce3322Smrg soname_spec='$libname$release$shared_ext$major' 27919f00f3a1Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 27929f00f3a1Smrg shlibpath_var=LD_LIBRARY_PATH 27939f00f3a1Smrg shlibpath_overrides_runpath=no 27949f00f3a1Smrg hardcode_into_libs=yes 27959f00f3a1Smrg ;; 27969f00f3a1Smrg 27979f00f3a1Smrgirix5* | irix6* | nonstopux*) 27989f00f3a1Smrg case $host_os in 27999f00f3a1Smrg nonstopux*) version_type=nonstopux ;; 28009f00f3a1Smrg *) 2801edce3322Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 28029f00f3a1Smrg version_type=linux # correct to gnu/linux during the next big refactor 28039f00f3a1Smrg else 28049f00f3a1Smrg version_type=irix 28059f00f3a1Smrg fi ;; 28069f00f3a1Smrg esac 28079f00f3a1Smrg need_lib_prefix=no 28089f00f3a1Smrg need_version=no 2809edce3322Smrg soname_spec='$libname$release$shared_ext$major' 2810edce3322Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 28119f00f3a1Smrg case $host_os in 28129f00f3a1Smrg irix5* | nonstopux*) 28139f00f3a1Smrg libsuff= shlibsuff= 28149f00f3a1Smrg ;; 28159f00f3a1Smrg *) 28169f00f3a1Smrg case $LD in # libtool.m4 will add one of these switches to LD 28179f00f3a1Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 28189f00f3a1Smrg libsuff= shlibsuff= libmagic=32-bit;; 28199f00f3a1Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 28209f00f3a1Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 28219f00f3a1Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 28229f00f3a1Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 28239f00f3a1Smrg *) libsuff= shlibsuff= libmagic=never-match;; 28249f00f3a1Smrg esac 28259f00f3a1Smrg ;; 28269f00f3a1Smrg esac 28279f00f3a1Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 28289f00f3a1Smrg shlibpath_overrides_runpath=no 2829edce3322Smrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 2830edce3322Smrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 28319f00f3a1Smrg hardcode_into_libs=yes 28329f00f3a1Smrg ;; 28339f00f3a1Smrg 28349f00f3a1Smrg# No shared lib support for Linux oldld, aout, or coff. 28359f00f3a1Smrglinux*oldld* | linux*aout* | linux*coff*) 28369f00f3a1Smrg dynamic_linker=no 28379f00f3a1Smrg ;; 28389f00f3a1Smrg 2839edce3322Smrglinux*android*) 2840edce3322Smrg version_type=none # Android doesn't support versioned libraries. 2841edce3322Smrg need_lib_prefix=no 2842edce3322Smrg need_version=no 2843edce3322Smrg library_names_spec='$libname$release$shared_ext' 2844edce3322Smrg soname_spec='$libname$release$shared_ext' 2845edce3322Smrg finish_cmds= 2846edce3322Smrg shlibpath_var=LD_LIBRARY_PATH 2847edce3322Smrg shlibpath_overrides_runpath=yes 2848edce3322Smrg 2849edce3322Smrg # This implies no fast_install, which is unacceptable. 2850edce3322Smrg # Some rework will be needed to allow for fast_install 2851edce3322Smrg # before this can be enabled. 2852edce3322Smrg hardcode_into_libs=yes 2853edce3322Smrg 2854edce3322Smrg dynamic_linker='Android linker' 2855edce3322Smrg # Don't embed -rpath directories since the linker doesn't support them. 2856edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 2857edce3322Smrg ;; 2858edce3322Smrg 28599f00f3a1Smrg# This must be glibc/ELF. 28609f00f3a1Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 28619f00f3a1Smrg version_type=linux # correct to gnu/linux during the next big refactor 28629f00f3a1Smrg need_lib_prefix=no 28639f00f3a1Smrg need_version=no 2864edce3322Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2865edce3322Smrg soname_spec='$libname$release$shared_ext$major' 28669f00f3a1Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 28679f00f3a1Smrg shlibpath_var=LD_LIBRARY_PATH 28689f00f3a1Smrg shlibpath_overrides_runpath=no 28699f00f3a1Smrg 28709f00f3a1Smrg # Some binutils ld are patched to set DT_RUNPATH 28719f00f3a1Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 28729f00f3a1Smrg [lt_cv_shlibpath_overrides_runpath=no 28739f00f3a1Smrg save_LDFLAGS=$LDFLAGS 28749f00f3a1Smrg save_libdir=$libdir 28759f00f3a1Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 28769f00f3a1Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 28779f00f3a1Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 28789f00f3a1Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 28799f00f3a1Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 28809f00f3a1Smrg LDFLAGS=$save_LDFLAGS 28819f00f3a1Smrg libdir=$save_libdir 28829f00f3a1Smrg ]) 28839f00f3a1Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 28849f00f3a1Smrg 28859f00f3a1Smrg # This implies no fast_install, which is unacceptable. 28869f00f3a1Smrg # Some rework will be needed to allow for fast_install 28879f00f3a1Smrg # before this can be enabled. 28889f00f3a1Smrg hardcode_into_libs=yes 28899f00f3a1Smrg 2890edce3322Smrg # Ideally, we could use ldconfig to report *all* directores which are 2891edce3322Smrg # searched for libraries, however this is still not possible. Aside from not 2892edce3322Smrg # being certain /sbin/ldconfig is available, command 2893edce3322Smrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 2894edce3322Smrg # even though it is searched at run-time. Try to do the best guess by 2895edce3322Smrg # appending ld.so.conf contents (and includes) to the search path. 28969f00f3a1Smrg if test -f /etc/ld.so.conf; then 28979f00f3a1Smrg 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' ' '` 289819569120Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 28999f00f3a1Smrg fi 29009f00f3a1Smrg 29019f00f3a1Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 29029f00f3a1Smrg # powerpc, because MkLinux only supported shared libraries with the 29039f00f3a1Smrg # GNU dynamic linker. Since this was broken with cross compilers, 29049f00f3a1Smrg # most powerpc-linux boxes support dynamic linking these days and 29059f00f3a1Smrg # people can always --disable-shared, the test was removed, and we 29069f00f3a1Smrg # assume the GNU/Linux dynamic linker is in use. 29079f00f3a1Smrg dynamic_linker='GNU/Linux ld.so' 29089f00f3a1Smrg ;; 29099f00f3a1Smrg 29109f00f3a1Smrgnetbsd*) 29119f00f3a1Smrg version_type=sunos 29129f00f3a1Smrg need_lib_prefix=no 29139f00f3a1Smrg need_version=no 29149f00f3a1Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2915edce3322Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 29169f00f3a1Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 29179f00f3a1Smrg dynamic_linker='NetBSD (a.out) ld.so' 29189f00f3a1Smrg else 2919edce3322Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2920edce3322Smrg soname_spec='$libname$release$shared_ext$major' 29219f00f3a1Smrg dynamic_linker='NetBSD ld.elf_so' 29229f00f3a1Smrg fi 29239f00f3a1Smrg shlibpath_var=LD_LIBRARY_PATH 29249f00f3a1Smrg shlibpath_overrides_runpath=yes 29259f00f3a1Smrg hardcode_into_libs=yes 29269f00f3a1Smrg ;; 29279f00f3a1Smrg 29289f00f3a1Smrgnewsos6) 29299f00f3a1Smrg version_type=linux # correct to gnu/linux during the next big refactor 2930edce3322Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 29319f00f3a1Smrg shlibpath_var=LD_LIBRARY_PATH 29329f00f3a1Smrg shlibpath_overrides_runpath=yes 29339f00f3a1Smrg ;; 29349f00f3a1Smrg 29359f00f3a1Smrg*nto* | *qnx*) 29369f00f3a1Smrg version_type=qnx 29379f00f3a1Smrg need_lib_prefix=no 29389f00f3a1Smrg need_version=no 2939edce3322Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2940edce3322Smrg soname_spec='$libname$release$shared_ext$major' 29419f00f3a1Smrg shlibpath_var=LD_LIBRARY_PATH 29429f00f3a1Smrg shlibpath_overrides_runpath=no 29439f00f3a1Smrg hardcode_into_libs=yes 29449f00f3a1Smrg dynamic_linker='ldqnx.so' 29459f00f3a1Smrg ;; 29469f00f3a1Smrg 2947edce3322Smrgopenbsd* | bitrig*) 29489f00f3a1Smrg version_type=sunos 2949edce3322Smrg sys_lib_dlsearch_path_spec=/usr/lib 29509f00f3a1Smrg need_lib_prefix=no 2951edce3322Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 2952edce3322Smrg need_version=no 29539f00f3a1Smrg else 2954edce3322Smrg need_version=yes 29559f00f3a1Smrg fi 2956edce3322Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2957edce3322Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2958edce3322Smrg shlibpath_var=LD_LIBRARY_PATH 2959edce3322Smrg shlibpath_overrides_runpath=yes 29609f00f3a1Smrg ;; 29619f00f3a1Smrg 29629f00f3a1Smrgos2*) 29639f00f3a1Smrg libname_spec='$name' 2964edce3322Smrg version_type=windows 2965edce3322Smrg shrext_cmds=.dll 2966edce3322Smrg need_version=no 29679f00f3a1Smrg need_lib_prefix=no 2968edce3322Smrg # OS/2 can only load a DLL with a base name of 8 characters or less. 2969edce3322Smrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 2970edce3322Smrg v=$($ECHO $release$versuffix | tr -d .-); 2971edce3322Smrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 2972edce3322Smrg $ECHO $n$v`$shared_ext' 2973edce3322Smrg library_names_spec='${libname}_dll.$libext' 29749f00f3a1Smrg dynamic_linker='OS/2 ld.exe' 2975edce3322Smrg shlibpath_var=BEGINLIBPATH 2976edce3322Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2977edce3322Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2978edce3322Smrg postinstall_cmds='base_file=`basename \$file`~ 2979edce3322Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 2980edce3322Smrg dldir=$destdir/`dirname \$dlpath`~ 2981edce3322Smrg test -d \$dldir || mkdir -p \$dldir~ 2982edce3322Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 2983edce3322Smrg chmod a+x \$dldir/$dlname~ 2984edce3322Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2985edce3322Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2986edce3322Smrg fi' 2987edce3322Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 2988edce3322Smrg dlpath=$dir/\$dldll~ 2989edce3322Smrg $RM \$dlpath' 29909f00f3a1Smrg ;; 29919f00f3a1Smrg 29929f00f3a1Smrgosf3* | osf4* | osf5*) 29939f00f3a1Smrg version_type=osf 29949f00f3a1Smrg need_lib_prefix=no 29959f00f3a1Smrg need_version=no 2996edce3322Smrg soname_spec='$libname$release$shared_ext$major' 2997edce3322Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 29989f00f3a1Smrg shlibpath_var=LD_LIBRARY_PATH 29999f00f3a1Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 3000edce3322Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 30019f00f3a1Smrg ;; 30029f00f3a1Smrg 30039f00f3a1Smrgrdos*) 30049f00f3a1Smrg dynamic_linker=no 30059f00f3a1Smrg ;; 30069f00f3a1Smrg 30079f00f3a1Smrgsolaris*) 30089f00f3a1Smrg version_type=linux # correct to gnu/linux during the next big refactor 30099f00f3a1Smrg need_lib_prefix=no 30109f00f3a1Smrg need_version=no 3011edce3322Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3012edce3322Smrg soname_spec='$libname$release$shared_ext$major' 30139f00f3a1Smrg shlibpath_var=LD_LIBRARY_PATH 30149f00f3a1Smrg shlibpath_overrides_runpath=yes 30159f00f3a1Smrg hardcode_into_libs=yes 30169f00f3a1Smrg # ldd complains unless libraries are executable 30179f00f3a1Smrg postinstall_cmds='chmod +x $lib' 30189f00f3a1Smrg ;; 30199f00f3a1Smrg 30209f00f3a1Smrgsunos4*) 30219f00f3a1Smrg version_type=sunos 3022edce3322Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 30239f00f3a1Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 30249f00f3a1Smrg shlibpath_var=LD_LIBRARY_PATH 30259f00f3a1Smrg shlibpath_overrides_runpath=yes 3026edce3322Smrg if test yes = "$with_gnu_ld"; then 30279f00f3a1Smrg need_lib_prefix=no 30289f00f3a1Smrg fi 30299f00f3a1Smrg need_version=yes 30309f00f3a1Smrg ;; 30319f00f3a1Smrg 30329f00f3a1Smrgsysv4 | sysv4.3*) 30339f00f3a1Smrg version_type=linux # correct to gnu/linux during the next big refactor 3034edce3322Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3035edce3322Smrg soname_spec='$libname$release$shared_ext$major' 30369f00f3a1Smrg shlibpath_var=LD_LIBRARY_PATH 30379f00f3a1Smrg case $host_vendor in 30389f00f3a1Smrg sni) 30399f00f3a1Smrg shlibpath_overrides_runpath=no 30409f00f3a1Smrg need_lib_prefix=no 30419f00f3a1Smrg runpath_var=LD_RUN_PATH 30429f00f3a1Smrg ;; 30439f00f3a1Smrg siemens) 30449f00f3a1Smrg need_lib_prefix=no 30459f00f3a1Smrg ;; 30469f00f3a1Smrg motorola) 30479f00f3a1Smrg need_lib_prefix=no 30489f00f3a1Smrg need_version=no 30499f00f3a1Smrg shlibpath_overrides_runpath=no 30509f00f3a1Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 30519f00f3a1Smrg ;; 30529f00f3a1Smrg esac 30539f00f3a1Smrg ;; 30549f00f3a1Smrg 30559f00f3a1Smrgsysv4*MP*) 3056edce3322Smrg if test -d /usr/nec; then 30579f00f3a1Smrg version_type=linux # correct to gnu/linux during the next big refactor 3058edce3322Smrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 3059edce3322Smrg soname_spec='$libname$shared_ext.$major' 30609f00f3a1Smrg shlibpath_var=LD_LIBRARY_PATH 30619f00f3a1Smrg fi 30629f00f3a1Smrg ;; 30639f00f3a1Smrg 30649f00f3a1Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3065edce3322Smrg version_type=sco 30669f00f3a1Smrg need_lib_prefix=no 30679f00f3a1Smrg need_version=no 3068edce3322Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 3069edce3322Smrg soname_spec='$libname$release$shared_ext$major' 30709f00f3a1Smrg shlibpath_var=LD_LIBRARY_PATH 30719f00f3a1Smrg shlibpath_overrides_runpath=yes 30729f00f3a1Smrg hardcode_into_libs=yes 3073edce3322Smrg if test yes = "$with_gnu_ld"; then 30749f00f3a1Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 30759f00f3a1Smrg else 30769f00f3a1Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 30779f00f3a1Smrg case $host_os in 30789f00f3a1Smrg sco3.2v5*) 30799f00f3a1Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 30809f00f3a1Smrg ;; 30819f00f3a1Smrg esac 30829f00f3a1Smrg fi 30839f00f3a1Smrg sys_lib_dlsearch_path_spec='/usr/lib' 30849f00f3a1Smrg ;; 30859f00f3a1Smrg 30869f00f3a1Smrgtpf*) 30879f00f3a1Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 30889f00f3a1Smrg version_type=linux # correct to gnu/linux during the next big refactor 30899f00f3a1Smrg need_lib_prefix=no 30909f00f3a1Smrg need_version=no 3091edce3322Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30929f00f3a1Smrg shlibpath_var=LD_LIBRARY_PATH 30939f00f3a1Smrg shlibpath_overrides_runpath=no 30949f00f3a1Smrg hardcode_into_libs=yes 30959f00f3a1Smrg ;; 30969f00f3a1Smrg 30979f00f3a1Smrguts4*) 30989f00f3a1Smrg version_type=linux # correct to gnu/linux during the next big refactor 3099edce3322Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3100edce3322Smrg soname_spec='$libname$release$shared_ext$major' 31019f00f3a1Smrg shlibpath_var=LD_LIBRARY_PATH 31029f00f3a1Smrg ;; 31039f00f3a1Smrg 31049f00f3a1Smrg*) 31059f00f3a1Smrg dynamic_linker=no 31069f00f3a1Smrg ;; 31079f00f3a1Smrgesac 31089f00f3a1SmrgAC_MSG_RESULT([$dynamic_linker]) 3109edce3322Smrgtest no = "$dynamic_linker" && can_build_shared=no 31109f00f3a1Smrg 31119f00f3a1Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 3112edce3322Smrgif test yes = "$GCC"; then 31139f00f3a1Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 31149f00f3a1Smrgfi 31159f00f3a1Smrg 3116edce3322Smrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 3117edce3322Smrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 31189f00f3a1Smrgfi 3119edce3322Smrg 3120edce3322Smrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 3121edce3322Smrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 31229f00f3a1Smrgfi 31239f00f3a1Smrg 3124edce3322Smrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 3125edce3322Smrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 3126edce3322Smrg 3127edce3322Smrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 3128edce3322Smrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 3129edce3322Smrg 3130edce3322Smrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 3131edce3322Smrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 3132edce3322Smrg 31339f00f3a1Smrg_LT_DECL([], [variables_saved_for_relink], [1], 31349f00f3a1Smrg [Variables whose values should be saved in libtool wrapper scripts and 31359f00f3a1Smrg restored at link time]) 31369f00f3a1Smrg_LT_DECL([], [need_lib_prefix], [0], 31379f00f3a1Smrg [Do we need the "lib" prefix for modules?]) 31389f00f3a1Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 31399f00f3a1Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 31409f00f3a1Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 31419f00f3a1Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 31429f00f3a1Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 31439f00f3a1Smrg [Is shlibpath searched before the hard-coded library search path?]) 31449f00f3a1Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 31459f00f3a1Smrg_LT_DECL([], [library_names_spec], [1], 31469f00f3a1Smrg [[List of archive names. First name is the real one, the rest are links. 31479f00f3a1Smrg The last name is the one that the linker finds with -lNAME]]) 31489f00f3a1Smrg_LT_DECL([], [soname_spec], [1], 31499f00f3a1Smrg [[The coded name of the library, if different from the real name]]) 31509f00f3a1Smrg_LT_DECL([], [install_override_mode], [1], 31519f00f3a1Smrg [Permission mode override for installation of shared libraries]) 31529f00f3a1Smrg_LT_DECL([], [postinstall_cmds], [2], 31539f00f3a1Smrg [Command to use after installation of a shared archive]) 31549f00f3a1Smrg_LT_DECL([], [postuninstall_cmds], [2], 31559f00f3a1Smrg [Command to use after uninstallation of a shared archive]) 31569f00f3a1Smrg_LT_DECL([], [finish_cmds], [2], 31579f00f3a1Smrg [Commands used to finish a libtool library installation in a directory]) 31589f00f3a1Smrg_LT_DECL([], [finish_eval], [1], 31599f00f3a1Smrg [[As "finish_cmds", except a single script fragment to be evaled but 31609f00f3a1Smrg not shown]]) 31619f00f3a1Smrg_LT_DECL([], [hardcode_into_libs], [0], 31629f00f3a1Smrg [Whether we should hardcode library paths into libraries]) 31639f00f3a1Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 31649f00f3a1Smrg [Compile-time system search path for libraries]) 3165edce3322Smrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 3166edce3322Smrg [Detected run-time system search path for libraries]) 3167edce3322Smrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 3168edce3322Smrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 31699f00f3a1Smrg])# _LT_SYS_DYNAMIC_LINKER 31709f00f3a1Smrg 31719f00f3a1Smrg 31729f00f3a1Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 31739f00f3a1Smrg# -------------------------- 3174edce3322Smrg# find a file program that can recognize shared library 31759f00f3a1SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 31769f00f3a1Smrg[m4_require([_LT_DECL_EGREP])dnl 31779f00f3a1SmrgAC_MSG_CHECKING([for $1]) 31789f00f3a1SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 31799f00f3a1Smrg[case $MAGIC_CMD in 31809f00f3a1Smrg[[\\/*] | ?:[\\/]*]) 3181edce3322Smrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 31829f00f3a1Smrg ;; 31839f00f3a1Smrg*) 3184edce3322Smrg lt_save_MAGIC_CMD=$MAGIC_CMD 3185edce3322Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 31869f00f3a1Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 31879f00f3a1Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 31889f00f3a1Smrgdnl not every word. This closes a longstanding sh security hole. 31899f00f3a1Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 31909f00f3a1Smrg for ac_dir in $ac_dummy; do 3191edce3322Smrg IFS=$lt_save_ifs 31929f00f3a1Smrg test -z "$ac_dir" && ac_dir=. 3193edce3322Smrg if test -f "$ac_dir/$1"; then 3194edce3322Smrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 31959f00f3a1Smrg if test -n "$file_magic_test_file"; then 31969f00f3a1Smrg case $deplibs_check_method in 31979f00f3a1Smrg "file_magic "*) 31989f00f3a1Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 3199edce3322Smrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 32009f00f3a1Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 32019f00f3a1Smrg $EGREP "$file_magic_regex" > /dev/null; then 32029f00f3a1Smrg : 32039f00f3a1Smrg else 32049f00f3a1Smrg cat <<_LT_EOF 1>&2 32059f00f3a1Smrg 32069f00f3a1Smrg*** Warning: the command libtool uses to detect shared libraries, 32079f00f3a1Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 32089f00f3a1Smrg*** The result is that libtool may fail to recognize shared libraries 32099f00f3a1Smrg*** as such. This will affect the creation of libtool libraries that 32109f00f3a1Smrg*** depend on shared libraries, but programs linked with such libtool 32119f00f3a1Smrg*** libraries will work regardless of this problem. Nevertheless, you 32129f00f3a1Smrg*** may want to report the problem to your system manager and/or to 32139f00f3a1Smrg*** bug-libtool@gnu.org 32149f00f3a1Smrg 32159f00f3a1Smrg_LT_EOF 32169f00f3a1Smrg fi ;; 32179f00f3a1Smrg esac 32189f00f3a1Smrg fi 32199f00f3a1Smrg break 32209f00f3a1Smrg fi 32219f00f3a1Smrg done 3222edce3322Smrg IFS=$lt_save_ifs 3223edce3322Smrg MAGIC_CMD=$lt_save_MAGIC_CMD 32249f00f3a1Smrg ;; 32259f00f3a1Smrgesac]) 3226edce3322SmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 32279f00f3a1Smrgif test -n "$MAGIC_CMD"; then 32289f00f3a1Smrg AC_MSG_RESULT($MAGIC_CMD) 32299f00f3a1Smrgelse 32309f00f3a1Smrg AC_MSG_RESULT(no) 32319f00f3a1Smrgfi 32329f00f3a1Smrg_LT_DECL([], [MAGIC_CMD], [0], 32339f00f3a1Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 32349f00f3a1Smrg])# _LT_PATH_TOOL_PREFIX 32359f00f3a1Smrg 32369f00f3a1Smrg# Old name: 32379f00f3a1SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 32389f00f3a1Smrgdnl aclocal-1.4 backwards compatibility: 32399f00f3a1Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 32409f00f3a1Smrg 32419f00f3a1Smrg 32429f00f3a1Smrg# _LT_PATH_MAGIC 32439f00f3a1Smrg# -------------- 3244edce3322Smrg# find a file program that can recognize a shared library 32459f00f3a1Smrgm4_defun([_LT_PATH_MAGIC], 32469f00f3a1Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 32479f00f3a1Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 32489f00f3a1Smrg if test -n "$ac_tool_prefix"; then 32499f00f3a1Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 32509f00f3a1Smrg else 32519f00f3a1Smrg MAGIC_CMD=: 32529f00f3a1Smrg fi 32539f00f3a1Smrgfi 32549f00f3a1Smrg])# _LT_PATH_MAGIC 32559f00f3a1Smrg 32569f00f3a1Smrg 32579f00f3a1Smrg# LT_PATH_LD 32589f00f3a1Smrg# ---------- 32599f00f3a1Smrg# find the pathname to the GNU or non-GNU linker 32609f00f3a1SmrgAC_DEFUN([LT_PATH_LD], 32619f00f3a1Smrg[AC_REQUIRE([AC_PROG_CC])dnl 32629f00f3a1SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 32639f00f3a1SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 32649f00f3a1Smrgm4_require([_LT_DECL_SED])dnl 32659f00f3a1Smrgm4_require([_LT_DECL_EGREP])dnl 32669f00f3a1Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 32679f00f3a1Smrg 32689f00f3a1SmrgAC_ARG_WITH([gnu-ld], 32699f00f3a1Smrg [AS_HELP_STRING([--with-gnu-ld], 32709f00f3a1Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3271edce3322Smrg [test no = "$withval" || with_gnu_ld=yes], 32729f00f3a1Smrg [with_gnu_ld=no])dnl 32739f00f3a1Smrg 32749f00f3a1Smrgac_prog=ld 3275edce3322Smrgif test yes = "$GCC"; then 32769f00f3a1Smrg # Check if gcc -print-prog-name=ld gives a path. 32779f00f3a1Smrg AC_MSG_CHECKING([for ld used by $CC]) 32789f00f3a1Smrg case $host in 32799f00f3a1Smrg *-*-mingw*) 3280edce3322Smrg # gcc leaves a trailing carriage return, which upsets mingw 32819f00f3a1Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 32829f00f3a1Smrg *) 32839f00f3a1Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 32849f00f3a1Smrg esac 32859f00f3a1Smrg case $ac_prog in 32869f00f3a1Smrg # Accept absolute paths. 32879f00f3a1Smrg [[\\/]]* | ?:[[\\/]]*) 32889f00f3a1Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 32899f00f3a1Smrg # Canonicalize the pathname of ld 32909f00f3a1Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 32919f00f3a1Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 32929f00f3a1Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 32939f00f3a1Smrg done 3294edce3322Smrg test -z "$LD" && LD=$ac_prog 32959f00f3a1Smrg ;; 32969f00f3a1Smrg "") 32979f00f3a1Smrg # If it fails, then pretend we aren't using GCC. 32989f00f3a1Smrg ac_prog=ld 32999f00f3a1Smrg ;; 33009f00f3a1Smrg *) 33019f00f3a1Smrg # If it is relative, then search for the first ld in PATH. 33029f00f3a1Smrg with_gnu_ld=unknown 33039f00f3a1Smrg ;; 33049f00f3a1Smrg esac 3305edce3322Smrgelif test yes = "$with_gnu_ld"; then 33069f00f3a1Smrg AC_MSG_CHECKING([for GNU ld]) 33079f00f3a1Smrgelse 33089f00f3a1Smrg AC_MSG_CHECKING([for non-GNU ld]) 33099f00f3a1Smrgfi 33109f00f3a1SmrgAC_CACHE_VAL(lt_cv_path_LD, 33119f00f3a1Smrg[if test -z "$LD"; then 3312edce3322Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 33139f00f3a1Smrg for ac_dir in $PATH; do 3314edce3322Smrg IFS=$lt_save_ifs 33159f00f3a1Smrg test -z "$ac_dir" && ac_dir=. 33169f00f3a1Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3317edce3322Smrg lt_cv_path_LD=$ac_dir/$ac_prog 33189f00f3a1Smrg # Check to see if the program is GNU ld. I'd rather use --version, 33199f00f3a1Smrg # but apparently some variants of GNU ld only accept -v. 33209f00f3a1Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 33219f00f3a1Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 33229f00f3a1Smrg *GNU* | *'with BFD'*) 3323edce3322Smrg test no != "$with_gnu_ld" && break 33249f00f3a1Smrg ;; 33259f00f3a1Smrg *) 3326edce3322Smrg test yes != "$with_gnu_ld" && break 33279f00f3a1Smrg ;; 33289f00f3a1Smrg esac 33299f00f3a1Smrg fi 33309f00f3a1Smrg done 3331edce3322Smrg IFS=$lt_save_ifs 33329f00f3a1Smrgelse 3333edce3322Smrg lt_cv_path_LD=$LD # Let the user override the test with a path. 33349f00f3a1Smrgfi]) 3335edce3322SmrgLD=$lt_cv_path_LD 33369f00f3a1Smrgif test -n "$LD"; then 33379f00f3a1Smrg AC_MSG_RESULT($LD) 33389f00f3a1Smrgelse 33399f00f3a1Smrg AC_MSG_RESULT(no) 33409f00f3a1Smrgfi 33419f00f3a1Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 33429f00f3a1Smrg_LT_PATH_LD_GNU 33439f00f3a1SmrgAC_SUBST([LD]) 33449f00f3a1Smrg 33459f00f3a1Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 33469f00f3a1Smrg])# LT_PATH_LD 33479f00f3a1Smrg 33489f00f3a1Smrg# Old names: 33499f00f3a1SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 33509f00f3a1SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 33519f00f3a1Smrgdnl aclocal-1.4 backwards compatibility: 33529f00f3a1Smrgdnl AC_DEFUN([AM_PROG_LD], []) 33539f00f3a1Smrgdnl AC_DEFUN([AC_PROG_LD], []) 33549f00f3a1Smrg 33559f00f3a1Smrg 33569f00f3a1Smrg# _LT_PATH_LD_GNU 33579f00f3a1Smrg#- -------------- 33589f00f3a1Smrgm4_defun([_LT_PATH_LD_GNU], 33599f00f3a1Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 33609f00f3a1Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 33619f00f3a1Smrgcase `$LD -v 2>&1 </dev/null` in 33629f00f3a1Smrg*GNU* | *'with BFD'*) 33639f00f3a1Smrg lt_cv_prog_gnu_ld=yes 33649f00f3a1Smrg ;; 33659f00f3a1Smrg*) 33669f00f3a1Smrg lt_cv_prog_gnu_ld=no 33679f00f3a1Smrg ;; 33689f00f3a1Smrgesac]) 33699f00f3a1Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 33709f00f3a1Smrg])# _LT_PATH_LD_GNU 33719f00f3a1Smrg 33729f00f3a1Smrg 33739f00f3a1Smrg# _LT_CMD_RELOAD 33749f00f3a1Smrg# -------------- 33759f00f3a1Smrg# find reload flag for linker 33769f00f3a1Smrg# -- PORTME Some linkers may need a different reload flag. 33779f00f3a1Smrgm4_defun([_LT_CMD_RELOAD], 33789f00f3a1Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 33799f00f3a1Smrg lt_cv_ld_reload_flag, 33809f00f3a1Smrg [lt_cv_ld_reload_flag='-r']) 33819f00f3a1Smrgreload_flag=$lt_cv_ld_reload_flag 33829f00f3a1Smrgcase $reload_flag in 33839f00f3a1Smrg"" | " "*) ;; 33849f00f3a1Smrg*) reload_flag=" $reload_flag" ;; 33859f00f3a1Smrgesac 33869f00f3a1Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 33879f00f3a1Smrgcase $host_os in 33889f00f3a1Smrg cygwin* | mingw* | pw32* | cegcc*) 3389edce3322Smrg if test yes != "$GCC"; then 33909f00f3a1Smrg reload_cmds=false 33919f00f3a1Smrg fi 33929f00f3a1Smrg ;; 33939f00f3a1Smrg darwin*) 3394edce3322Smrg if test yes = "$GCC"; then 3395edce3322Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 33969f00f3a1Smrg else 33979f00f3a1Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 33989f00f3a1Smrg fi 33999f00f3a1Smrg ;; 34009f00f3a1Smrgesac 34019f00f3a1Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 34029f00f3a1Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 34039f00f3a1Smrg])# _LT_CMD_RELOAD 34049f00f3a1Smrg 34059f00f3a1Smrg 3406edce3322Smrg# _LT_PATH_DD 3407edce3322Smrg# ----------- 3408edce3322Smrg# find a working dd 3409edce3322Smrgm4_defun([_LT_PATH_DD], 3410edce3322Smrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 3411edce3322Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 3412edce3322Smrgcat conftest.i conftest.i >conftest2.i 3413edce3322Smrg: ${lt_DD:=$DD} 3414edce3322SmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 3415edce3322Smrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3416edce3322Smrg cmp -s conftest.i conftest.out \ 3417edce3322Smrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 3418edce3322Smrgfi]) 3419edce3322Smrgrm -f conftest.i conftest2.i conftest.out]) 3420edce3322Smrg])# _LT_PATH_DD 3421edce3322Smrg 3422edce3322Smrg 3423edce3322Smrg# _LT_CMD_TRUNCATE 3424edce3322Smrg# ---------------- 3425edce3322Smrg# find command to truncate a binary pipe 3426edce3322Smrgm4_defun([_LT_CMD_TRUNCATE], 3427edce3322Smrg[m4_require([_LT_PATH_DD]) 3428edce3322SmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 3429edce3322Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 3430edce3322Smrgcat conftest.i conftest.i >conftest2.i 3431edce3322Smrglt_cv_truncate_bin= 3432edce3322Smrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3433edce3322Smrg cmp -s conftest.i conftest.out \ 3434edce3322Smrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 3435edce3322Smrgfi 3436edce3322Smrgrm -f conftest.i conftest2.i conftest.out 3437edce3322Smrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 3438edce3322Smrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 3439edce3322Smrg [Command to truncate a binary pipe]) 3440edce3322Smrg])# _LT_CMD_TRUNCATE 3441edce3322Smrg 3442edce3322Smrg 34439f00f3a1Smrg# _LT_CHECK_MAGIC_METHOD 34449f00f3a1Smrg# ---------------------- 34459f00f3a1Smrg# how to check for library dependencies 34469f00f3a1Smrg# -- PORTME fill in with the dynamic library characteristics 34479f00f3a1Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 34489f00f3a1Smrg[m4_require([_LT_DECL_EGREP]) 34499f00f3a1Smrgm4_require([_LT_DECL_OBJDUMP]) 34509f00f3a1SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 34519f00f3a1Smrglt_cv_deplibs_check_method, 34529f00f3a1Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 34539f00f3a1Smrglt_cv_file_magic_test_file= 34549f00f3a1Smrglt_cv_deplibs_check_method='unknown' 34559f00f3a1Smrg# Need to set the preceding variable on all platforms that support 34569f00f3a1Smrg# interlibrary dependencies. 34579f00f3a1Smrg# 'none' -- dependencies not supported. 3458edce3322Smrg# 'unknown' -- same as none, but documents that we really don't know. 34599f00f3a1Smrg# 'pass_all' -- all dependencies passed with no checks. 34609f00f3a1Smrg# 'test_compile' -- check by making test program. 34619f00f3a1Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 3462edce3322Smrg# that responds to the $file_magic_cmd with a given extended regex. 3463edce3322Smrg# If you have 'file' or equivalent on your system and you're not sure 3464edce3322Smrg# whether 'pass_all' will *always* work, you probably want this one. 34659f00f3a1Smrg 34669f00f3a1Smrgcase $host_os in 34679f00f3a1Smrgaix[[4-9]]*) 34689f00f3a1Smrg lt_cv_deplibs_check_method=pass_all 34699f00f3a1Smrg ;; 34709f00f3a1Smrg 34719f00f3a1Smrgbeos*) 34729f00f3a1Smrg lt_cv_deplibs_check_method=pass_all 34739f00f3a1Smrg ;; 34749f00f3a1Smrg 34759f00f3a1Smrgbsdi[[45]]*) 34769f00f3a1Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 347774835918Smrg lt_cv_file_magic_cmd='$FILECMD -L' 34789f00f3a1Smrg lt_cv_file_magic_test_file=/shlib/libc.so 34799f00f3a1Smrg ;; 34809f00f3a1Smrg 34819f00f3a1Smrgcygwin*) 34829f00f3a1Smrg # func_win32_libid is a shell function defined in ltmain.sh 34839f00f3a1Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 34849f00f3a1Smrg lt_cv_file_magic_cmd='func_win32_libid' 34859f00f3a1Smrg ;; 34869f00f3a1Smrg 34879f00f3a1Smrgmingw* | pw32*) 34889f00f3a1Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 34899f00f3a1Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 34909f00f3a1Smrg # unless we find 'file', for example because we are cross-compiling. 3491edce3322Smrg if ( file / ) >/dev/null 2>&1; then 34929f00f3a1Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 34939f00f3a1Smrg lt_cv_file_magic_cmd='func_win32_libid' 34949f00f3a1Smrg else 34959f00f3a1Smrg # Keep this pattern in sync with the one in func_win32_libid. 34969f00f3a1Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 34979f00f3a1Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 34989f00f3a1Smrg fi 34999f00f3a1Smrg ;; 35009f00f3a1Smrg 35019f00f3a1Smrgcegcc*) 35029f00f3a1Smrg # use the weaker test based on 'objdump'. See mingw*. 35039f00f3a1Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 35049f00f3a1Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 35059f00f3a1Smrg ;; 35069f00f3a1Smrg 35079f00f3a1Smrgdarwin* | rhapsody*) 35089f00f3a1Smrg lt_cv_deplibs_check_method=pass_all 35099f00f3a1Smrg ;; 35109f00f3a1Smrg 351174835918Smrgfreebsd* | dragonfly* | midnightbsd*) 35129f00f3a1Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 35139f00f3a1Smrg case $host_cpu in 35149f00f3a1Smrg i*86 ) 35159f00f3a1Smrg # Not sure whether the presence of OpenBSD here was a mistake. 35169f00f3a1Smrg # Let's accept both of them until this is cleared up. 35179f00f3a1Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 351874835918Smrg lt_cv_file_magic_cmd=$FILECMD 35199f00f3a1Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 35209f00f3a1Smrg ;; 35219f00f3a1Smrg esac 35229f00f3a1Smrg else 35239f00f3a1Smrg lt_cv_deplibs_check_method=pass_all 35249f00f3a1Smrg fi 35259f00f3a1Smrg ;; 35269f00f3a1Smrg 35279f00f3a1Smrghaiku*) 35289f00f3a1Smrg lt_cv_deplibs_check_method=pass_all 35299f00f3a1Smrg ;; 35309f00f3a1Smrg 35319f00f3a1Smrghpux10.20* | hpux11*) 353274835918Smrg lt_cv_file_magic_cmd=$FILECMD 35339f00f3a1Smrg case $host_cpu in 35349f00f3a1Smrg ia64*) 35359f00f3a1Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 35369f00f3a1Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 35379f00f3a1Smrg ;; 35389f00f3a1Smrg hppa*64*) 35399f00f3a1Smrg [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]'] 35409f00f3a1Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 35419f00f3a1Smrg ;; 35429f00f3a1Smrg *) 35439f00f3a1Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 35449f00f3a1Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 35459f00f3a1Smrg ;; 35469f00f3a1Smrg esac 35479f00f3a1Smrg ;; 35489f00f3a1Smrg 35499f00f3a1Smrginterix[[3-9]]*) 35509f00f3a1Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 35519f00f3a1Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 35529f00f3a1Smrg ;; 35539f00f3a1Smrg 35549f00f3a1Smrgirix5* | irix6* | nonstopux*) 35559f00f3a1Smrg case $LD in 35569f00f3a1Smrg *-32|*"-32 ") libmagic=32-bit;; 35579f00f3a1Smrg *-n32|*"-n32 ") libmagic=N32;; 35589f00f3a1Smrg *-64|*"-64 ") libmagic=64-bit;; 35599f00f3a1Smrg *) libmagic=never-match;; 35609f00f3a1Smrg esac 35619f00f3a1Smrg lt_cv_deplibs_check_method=pass_all 35629f00f3a1Smrg ;; 35639f00f3a1Smrg 35649f00f3a1Smrg# This must be glibc/ELF. 35659f00f3a1Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 35669f00f3a1Smrg lt_cv_deplibs_check_method=pass_all 35679f00f3a1Smrg ;; 35689f00f3a1Smrg 3569edce3322Smrgnetbsd*) 35709f00f3a1Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 35719f00f3a1Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 35729f00f3a1Smrg else 35739f00f3a1Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 35749f00f3a1Smrg fi 35759f00f3a1Smrg ;; 35769f00f3a1Smrg 35779f00f3a1Smrgnewos6*) 35789f00f3a1Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 357974835918Smrg lt_cv_file_magic_cmd=$FILECMD 35809f00f3a1Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 35819f00f3a1Smrg ;; 35829f00f3a1Smrg 35839f00f3a1Smrg*nto* | *qnx*) 35849f00f3a1Smrg lt_cv_deplibs_check_method=pass_all 35859f00f3a1Smrg ;; 35869f00f3a1Smrg 3587edce3322Smrgopenbsd* | bitrig*) 3588edce3322Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 35899f00f3a1Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 35909f00f3a1Smrg else 35919f00f3a1Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 35929f00f3a1Smrg fi 35939f00f3a1Smrg ;; 35949f00f3a1Smrg 35959f00f3a1Smrgosf3* | osf4* | osf5*) 35969f00f3a1Smrg lt_cv_deplibs_check_method=pass_all 35979f00f3a1Smrg ;; 35989f00f3a1Smrg 35999f00f3a1Smrgrdos*) 36009f00f3a1Smrg lt_cv_deplibs_check_method=pass_all 36019f00f3a1Smrg ;; 36029f00f3a1Smrg 36039f00f3a1Smrgsolaris*) 36049f00f3a1Smrg lt_cv_deplibs_check_method=pass_all 36059f00f3a1Smrg ;; 36069f00f3a1Smrg 36079f00f3a1Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 36089f00f3a1Smrg lt_cv_deplibs_check_method=pass_all 36099f00f3a1Smrg ;; 36109f00f3a1Smrg 36119f00f3a1Smrgsysv4 | sysv4.3*) 36129f00f3a1Smrg case $host_vendor in 36139f00f3a1Smrg motorola) 36149f00f3a1Smrg 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]]' 36159f00f3a1Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 36169f00f3a1Smrg ;; 36179f00f3a1Smrg ncr) 36189f00f3a1Smrg lt_cv_deplibs_check_method=pass_all 36199f00f3a1Smrg ;; 36209f00f3a1Smrg sequent) 36219f00f3a1Smrg lt_cv_file_magic_cmd='/bin/file' 36229f00f3a1Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 36239f00f3a1Smrg ;; 36249f00f3a1Smrg sni) 36259f00f3a1Smrg lt_cv_file_magic_cmd='/bin/file' 36269f00f3a1Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 36279f00f3a1Smrg lt_cv_file_magic_test_file=/lib/libc.so 36289f00f3a1Smrg ;; 36299f00f3a1Smrg siemens) 36309f00f3a1Smrg lt_cv_deplibs_check_method=pass_all 36319f00f3a1Smrg ;; 36329f00f3a1Smrg pc) 36339f00f3a1Smrg lt_cv_deplibs_check_method=pass_all 36349f00f3a1Smrg ;; 36359f00f3a1Smrg esac 36369f00f3a1Smrg ;; 36379f00f3a1Smrg 36389f00f3a1Smrgtpf*) 36399f00f3a1Smrg lt_cv_deplibs_check_method=pass_all 36409f00f3a1Smrg ;; 3641edce3322Smrgos2*) 3642edce3322Smrg lt_cv_deplibs_check_method=pass_all 3643edce3322Smrg ;; 36449f00f3a1Smrgesac 36459f00f3a1Smrg]) 36469f00f3a1Smrg 36479f00f3a1Smrgfile_magic_glob= 36489f00f3a1Smrgwant_nocaseglob=no 36499f00f3a1Smrgif test "$build" = "$host"; then 36509f00f3a1Smrg case $host_os in 36519f00f3a1Smrg mingw* | pw32*) 36529f00f3a1Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 36539f00f3a1Smrg want_nocaseglob=yes 36549f00f3a1Smrg else 36559f00f3a1Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 36569f00f3a1Smrg fi 36579f00f3a1Smrg ;; 36589f00f3a1Smrg esac 36599f00f3a1Smrgfi 36609f00f3a1Smrg 36619f00f3a1Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 36629f00f3a1Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 36639f00f3a1Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 36649f00f3a1Smrg 36659f00f3a1Smrg_LT_DECL([], [deplibs_check_method], [1], 36669f00f3a1Smrg [Method to check whether dependent libraries are shared objects]) 36679f00f3a1Smrg_LT_DECL([], [file_magic_cmd], [1], 36689f00f3a1Smrg [Command to use when deplibs_check_method = "file_magic"]) 36699f00f3a1Smrg_LT_DECL([], [file_magic_glob], [1], 36709f00f3a1Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 36719f00f3a1Smrg_LT_DECL([], [want_nocaseglob], [1], 36729f00f3a1Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 36739f00f3a1Smrg])# _LT_CHECK_MAGIC_METHOD 36749f00f3a1Smrg 36759f00f3a1Smrg 36769f00f3a1Smrg# LT_PATH_NM 36779f00f3a1Smrg# ---------- 36789f00f3a1Smrg# find the pathname to a BSD- or MS-compatible name lister 36799f00f3a1SmrgAC_DEFUN([LT_PATH_NM], 36809f00f3a1Smrg[AC_REQUIRE([AC_PROG_CC])dnl 36819f00f3a1SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 36829f00f3a1Smrg[if test -n "$NM"; then 36839f00f3a1Smrg # Let the user override the test. 3684edce3322Smrg lt_cv_path_NM=$NM 36859f00f3a1Smrgelse 3686edce3322Smrg lt_nm_to_check=${ac_tool_prefix}nm 36879f00f3a1Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 36889f00f3a1Smrg lt_nm_to_check="$lt_nm_to_check nm" 36899f00f3a1Smrg fi 36909f00f3a1Smrg for lt_tmp_nm in $lt_nm_to_check; do 3691edce3322Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 36929f00f3a1Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3693edce3322Smrg IFS=$lt_save_ifs 36949f00f3a1Smrg test -z "$ac_dir" && ac_dir=. 3695edce3322Smrg tmp_nm=$ac_dir/$lt_tmp_nm 3696edce3322Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 36979f00f3a1Smrg # Check to see if the nm accepts a BSD-compat flag. 3698edce3322Smrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 36999f00f3a1Smrg # nm: unknown option "B" ignored 37009f00f3a1Smrg # Tru64's nm complains that /dev/null is an invalid object file 3701edce3322Smrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 3702edce3322Smrg case $build_os in 3703edce3322Smrg mingw*) lt_bad_file=conftest.nm/nofile ;; 3704edce3322Smrg *) lt_bad_file=/dev/null ;; 3705edce3322Smrg esac 370674835918Smrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in 3707edce3322Smrg *$lt_bad_file* | *'Invalid file or object type'*) 37089f00f3a1Smrg lt_cv_path_NM="$tmp_nm -B" 3709edce3322Smrg break 2 37109f00f3a1Smrg ;; 37119f00f3a1Smrg *) 371274835918Smrg case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in 37139f00f3a1Smrg */dev/null*) 37149f00f3a1Smrg lt_cv_path_NM="$tmp_nm -p" 3715edce3322Smrg break 2 37169f00f3a1Smrg ;; 37179f00f3a1Smrg *) 37189f00f3a1Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 37199f00f3a1Smrg continue # so that we can try to find one that supports BSD flags 37209f00f3a1Smrg ;; 37219f00f3a1Smrg esac 37229f00f3a1Smrg ;; 37239f00f3a1Smrg esac 37249f00f3a1Smrg fi 37259f00f3a1Smrg done 3726edce3322Smrg IFS=$lt_save_ifs 37279f00f3a1Smrg done 37289f00f3a1Smrg : ${lt_cv_path_NM=no} 37299f00f3a1Smrgfi]) 3730edce3322Smrgif test no != "$lt_cv_path_NM"; then 3731edce3322Smrg NM=$lt_cv_path_NM 37329f00f3a1Smrgelse 37339f00f3a1Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 37349f00f3a1Smrg if test -n "$DUMPBIN"; then : 37359f00f3a1Smrg # Let the user override the test. 37369f00f3a1Smrg else 37379f00f3a1Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 373874835918Smrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in 37399f00f3a1Smrg *COFF*) 3740edce3322Smrg DUMPBIN="$DUMPBIN -symbols -headers" 37419f00f3a1Smrg ;; 37429f00f3a1Smrg *) 37439f00f3a1Smrg DUMPBIN=: 37449f00f3a1Smrg ;; 37459f00f3a1Smrg esac 37469f00f3a1Smrg fi 37479f00f3a1Smrg AC_SUBST([DUMPBIN]) 3748edce3322Smrg if test : != "$DUMPBIN"; then 3749edce3322Smrg NM=$DUMPBIN 37509f00f3a1Smrg fi 37519f00f3a1Smrgfi 37529f00f3a1Smrgtest -z "$NM" && NM=nm 37539f00f3a1SmrgAC_SUBST([NM]) 37549f00f3a1Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 37559f00f3a1Smrg 37569f00f3a1SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 37579f00f3a1Smrg [lt_cv_nm_interface="BSD nm" 37589f00f3a1Smrg echo "int some_variable = 0;" > conftest.$ac_ext 37599f00f3a1Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 37609f00f3a1Smrg (eval "$ac_compile" 2>conftest.err) 37619f00f3a1Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 37629f00f3a1Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 37639f00f3a1Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 37649f00f3a1Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 37659f00f3a1Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 37669f00f3a1Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 37679f00f3a1Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 37689f00f3a1Smrg lt_cv_nm_interface="MS dumpbin" 37699f00f3a1Smrg fi 37709f00f3a1Smrg rm -f conftest*]) 37719f00f3a1Smrg])# LT_PATH_NM 37729f00f3a1Smrg 37739f00f3a1Smrg# Old names: 37749f00f3a1SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 37759f00f3a1SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 37769f00f3a1Smrgdnl aclocal-1.4 backwards compatibility: 37779f00f3a1Smrgdnl AC_DEFUN([AM_PROG_NM], []) 37789f00f3a1Smrgdnl AC_DEFUN([AC_PROG_NM], []) 37799f00f3a1Smrg 37809f00f3a1Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 37819f00f3a1Smrg# -------------------------------- 37829f00f3a1Smrg# how to determine the name of the shared library 37839f00f3a1Smrg# associated with a specific link library. 37849f00f3a1Smrg# -- PORTME fill in with the dynamic library characteristics 37859f00f3a1Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 37869f00f3a1Smrg[m4_require([_LT_DECL_EGREP]) 37879f00f3a1Smrgm4_require([_LT_DECL_OBJDUMP]) 37889f00f3a1Smrgm4_require([_LT_DECL_DLLTOOL]) 37899f00f3a1SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 37909f00f3a1Smrglt_cv_sharedlib_from_linklib_cmd, 37919f00f3a1Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 37929f00f3a1Smrg 37939f00f3a1Smrgcase $host_os in 37949f00f3a1Smrgcygwin* | mingw* | pw32* | cegcc*) 3795edce3322Smrg # two different shell functions defined in ltmain.sh; 3796edce3322Smrg # decide which one to use based on capabilities of $DLLTOOL 37979f00f3a1Smrg case `$DLLTOOL --help 2>&1` in 37989f00f3a1Smrg *--identify-strict*) 37999f00f3a1Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 38009f00f3a1Smrg ;; 38019f00f3a1Smrg *) 38029f00f3a1Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 38039f00f3a1Smrg ;; 38049f00f3a1Smrg esac 38059f00f3a1Smrg ;; 38069f00f3a1Smrg*) 38079f00f3a1Smrg # fallback: assume linklib IS sharedlib 3808edce3322Smrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 38099f00f3a1Smrg ;; 38109f00f3a1Smrgesac 38119f00f3a1Smrg]) 38129f00f3a1Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 38139f00f3a1Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 38149f00f3a1Smrg 38159f00f3a1Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 38169f00f3a1Smrg [Command to associate shared and link libraries]) 38179f00f3a1Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 38189f00f3a1Smrg 38199f00f3a1Smrg 38209f00f3a1Smrg# _LT_PATH_MANIFEST_TOOL 38219f00f3a1Smrg# ---------------------- 38229f00f3a1Smrg# locate the manifest tool 38239f00f3a1Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 38249f00f3a1Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 38259f00f3a1Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 38269f00f3a1SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 38279f00f3a1Smrg [lt_cv_path_mainfest_tool=no 38289f00f3a1Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 38299f00f3a1Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 38309f00f3a1Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 38319f00f3a1Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 38329f00f3a1Smrg lt_cv_path_mainfest_tool=yes 38339f00f3a1Smrg fi 38349f00f3a1Smrg rm -f conftest*]) 3835edce3322Smrgif test yes != "$lt_cv_path_mainfest_tool"; then 38369f00f3a1Smrg MANIFEST_TOOL=: 38379f00f3a1Smrgfi 38389f00f3a1Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 38399f00f3a1Smrg])# _LT_PATH_MANIFEST_TOOL 38409f00f3a1Smrg 38419f00f3a1Smrg 3842edce3322Smrg# _LT_DLL_DEF_P([FILE]) 3843edce3322Smrg# --------------------- 3844edce3322Smrg# True iff FILE is a Windows DLL '.def' file. 3845edce3322Smrg# Keep in sync with func_dll_def_p in the libtool script 3846edce3322SmrgAC_DEFUN([_LT_DLL_DEF_P], 3847edce3322Smrg[dnl 3848edce3322Smrg test DEF = "`$SED -n dnl 3849edce3322Smrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 3850edce3322Smrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 3851edce3322Smrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 3852edce3322Smrg -e q dnl Only consider the first "real" line 3853edce3322Smrg $1`" dnl 3854edce3322Smrg])# _LT_DLL_DEF_P 3855edce3322Smrg 3856edce3322Smrg 38579f00f3a1Smrg# LT_LIB_M 38589f00f3a1Smrg# -------- 38599f00f3a1Smrg# check for math library 38609f00f3a1SmrgAC_DEFUN([LT_LIB_M], 38619f00f3a1Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 38629f00f3a1SmrgLIBM= 38639f00f3a1Smrgcase $host in 38649f00f3a1Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 38659f00f3a1Smrg # These system don't have libm, or don't need it 38669f00f3a1Smrg ;; 38679f00f3a1Smrg*-ncr-sysv4.3*) 3868edce3322Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 38699f00f3a1Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 38709f00f3a1Smrg ;; 38719f00f3a1Smrg*) 3872edce3322Smrg AC_CHECK_LIB(m, cos, LIBM=-lm) 38739f00f3a1Smrg ;; 38749f00f3a1Smrgesac 38759f00f3a1SmrgAC_SUBST([LIBM]) 38769f00f3a1Smrg])# LT_LIB_M 38779f00f3a1Smrg 38789f00f3a1Smrg# Old name: 38799f00f3a1SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 38809f00f3a1Smrgdnl aclocal-1.4 backwards compatibility: 38819f00f3a1Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 38829f00f3a1Smrg 38839f00f3a1Smrg 38849f00f3a1Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 38859f00f3a1Smrg# ------------------------------- 38869f00f3a1Smrgm4_defun([_LT_COMPILER_NO_RTTI], 38879f00f3a1Smrg[m4_require([_LT_TAG_COMPILER])dnl 38889f00f3a1Smrg 38899f00f3a1Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 38909f00f3a1Smrg 3891edce3322Smrgif test yes = "$GCC"; then 38929f00f3a1Smrg case $cc_basename in 38939f00f3a1Smrg nvcc*) 38949f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 38959f00f3a1Smrg *) 38969f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 38979f00f3a1Smrg esac 38989f00f3a1Smrg 38999f00f3a1Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 39009f00f3a1Smrg lt_cv_prog_compiler_rtti_exceptions, 39019f00f3a1Smrg [-fno-rtti -fno-exceptions], [], 39029f00f3a1Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 39039f00f3a1Smrgfi 39049f00f3a1Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 39059f00f3a1Smrg [Compiler flag to turn off builtin functions]) 39069f00f3a1Smrg])# _LT_COMPILER_NO_RTTI 39079f00f3a1Smrg 39089f00f3a1Smrg 39099f00f3a1Smrg# _LT_CMD_GLOBAL_SYMBOLS 39109f00f3a1Smrg# ---------------------- 39119f00f3a1Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 39129f00f3a1Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 39139f00f3a1SmrgAC_REQUIRE([AC_PROG_CC])dnl 39149f00f3a1SmrgAC_REQUIRE([AC_PROG_AWK])dnl 39159f00f3a1SmrgAC_REQUIRE([LT_PATH_NM])dnl 39169f00f3a1SmrgAC_REQUIRE([LT_PATH_LD])dnl 39179f00f3a1Smrgm4_require([_LT_DECL_SED])dnl 39189f00f3a1Smrgm4_require([_LT_DECL_EGREP])dnl 39199f00f3a1Smrgm4_require([_LT_TAG_COMPILER])dnl 39209f00f3a1Smrg 39219f00f3a1Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 39229f00f3a1SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 39239f00f3a1SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 39249f00f3a1Smrg[ 39259f00f3a1Smrg# These are sane defaults that work on at least a few old systems. 39269f00f3a1Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 39279f00f3a1Smrg 39289f00f3a1Smrg# Character class describing NM global symbol codes. 39299f00f3a1Smrgsymcode='[[BCDEGRST]]' 39309f00f3a1Smrg 39319f00f3a1Smrg# Regexp to match symbols that can be accessed directly from C. 39329f00f3a1Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 39339f00f3a1Smrg 39349f00f3a1Smrg# Define system-specific variables. 39359f00f3a1Smrgcase $host_os in 39369f00f3a1Smrgaix*) 39379f00f3a1Smrg symcode='[[BCDT]]' 39389f00f3a1Smrg ;; 39399f00f3a1Smrgcygwin* | mingw* | pw32* | cegcc*) 39409f00f3a1Smrg symcode='[[ABCDGISTW]]' 39419f00f3a1Smrg ;; 39429f00f3a1Smrghpux*) 3943edce3322Smrg if test ia64 = "$host_cpu"; then 39449f00f3a1Smrg symcode='[[ABCDEGRST]]' 39459f00f3a1Smrg fi 39469f00f3a1Smrg ;; 39479f00f3a1Smrgirix* | nonstopux*) 39489f00f3a1Smrg symcode='[[BCDEGRST]]' 39499f00f3a1Smrg ;; 39509f00f3a1Smrgosf*) 39519f00f3a1Smrg symcode='[[BCDEGQRST]]' 39529f00f3a1Smrg ;; 39539f00f3a1Smrgsolaris*) 39549f00f3a1Smrg symcode='[[BDRT]]' 39559f00f3a1Smrg ;; 39569f00f3a1Smrgsco3.2v5*) 39579f00f3a1Smrg symcode='[[DT]]' 39589f00f3a1Smrg ;; 39599f00f3a1Smrgsysv4.2uw2*) 39609f00f3a1Smrg symcode='[[DT]]' 39619f00f3a1Smrg ;; 39629f00f3a1Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 39639f00f3a1Smrg symcode='[[ABDT]]' 39649f00f3a1Smrg ;; 39659f00f3a1Smrgsysv4) 39669f00f3a1Smrg symcode='[[DFNSTU]]' 39679f00f3a1Smrg ;; 39689f00f3a1Smrgesac 39699f00f3a1Smrg 39709f00f3a1Smrg# If we're using GNU nm, then use its standard symbol codes. 39719f00f3a1Smrgcase `$NM -V 2>&1` in 39729f00f3a1Smrg*GNU* | *'with BFD'*) 39739f00f3a1Smrg symcode='[[ABCDGIRSTW]]' ;; 39749f00f3a1Smrgesac 39759f00f3a1Smrg 3976edce3322Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 3977edce3322Smrg # Gets list of data symbols to import. 397874835918Smrg lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" 3979edce3322Smrg # Adjust the below global symbol transforms to fixup imported variables. 3980edce3322Smrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 3981edce3322Smrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 3982edce3322Smrg lt_c_name_lib_hook="\ 3983edce3322Smrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 3984edce3322Smrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 3985edce3322Smrgelse 3986edce3322Smrg # Disable hooks by default. 3987edce3322Smrg lt_cv_sys_global_symbol_to_import= 3988edce3322Smrg lt_cdecl_hook= 3989edce3322Smrg lt_c_name_hook= 3990edce3322Smrg lt_c_name_lib_hook= 3991edce3322Smrgfi 3992edce3322Smrg 39939f00f3a1Smrg# Transform an extracted symbol line into a proper C declaration. 39949f00f3a1Smrg# Some systems (esp. on ia64) link data and code symbols differently, 39959f00f3a1Smrg# so use this general approach. 399674835918Smrglt_cv_sys_global_symbol_to_cdecl="$SED -n"\ 3997edce3322Smrg$lt_cdecl_hook\ 3998edce3322Smrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 3999edce3322Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 40009f00f3a1Smrg 40019f00f3a1Smrg# Transform an extracted symbol line into symbol name and symbol address 400274835918Smrglt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ 4003edce3322Smrg$lt_c_name_hook\ 4004edce3322Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4005edce3322Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 4006edce3322Smrg 4007edce3322Smrg# Transform an extracted symbol line into symbol name with lib prefix and 4008edce3322Smrg# symbol address. 400974835918Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ 4010edce3322Smrg$lt_c_name_lib_hook\ 4011edce3322Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4012edce3322Smrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 4013edce3322Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 40149f00f3a1Smrg 40159f00f3a1Smrg# Handle CRLF in mingw tool chain 40169f00f3a1Smrgopt_cr= 40179f00f3a1Smrgcase $build_os in 40189f00f3a1Smrgmingw*) 40199f00f3a1Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 40209f00f3a1Smrg ;; 40219f00f3a1Smrgesac 40229f00f3a1Smrg 40239f00f3a1Smrg# Try without a prefix underscore, then with it. 40249f00f3a1Smrgfor ac_symprfx in "" "_"; do 40259f00f3a1Smrg 40269f00f3a1Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 40279f00f3a1Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 40289f00f3a1Smrg 40299f00f3a1Smrg # Write the raw and C identifiers. 40309f00f3a1Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4031edce3322Smrg # Fake it for dumpbin and say T for any non-static function, 4032edce3322Smrg # D for any global variable and I for any imported variable. 403374835918Smrg # Also find C++ and __fastcall symbols from MSVC++ or ICC, 40349f00f3a1Smrg # which start with @ or ?. 40359f00f3a1Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 40369f00f3a1Smrg" {last_section=section; section=\$ 3};"\ 40379f00f3a1Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 40389f00f3a1Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 4039edce3322Smrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 4040edce3322Smrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 4041edce3322Smrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 40429f00f3a1Smrg" \$ 0!~/External *\|/{next};"\ 40439f00f3a1Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 40449f00f3a1Smrg" {if(hide[section]) next};"\ 4045edce3322Smrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 4046edce3322Smrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 4047edce3322Smrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 4048edce3322Smrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 40499f00f3a1Smrg" ' prfx=^$ac_symprfx]" 40509f00f3a1Smrg else 405174835918Smrg lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 40529f00f3a1Smrg fi 405374835918Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" 40549f00f3a1Smrg 40559f00f3a1Smrg # Check to see that the pipe works correctly. 40569f00f3a1Smrg pipe_works=no 40579f00f3a1Smrg 40589f00f3a1Smrg rm -f conftest* 40599f00f3a1Smrg cat > conftest.$ac_ext <<_LT_EOF 40609f00f3a1Smrg#ifdef __cplusplus 40619f00f3a1Smrgextern "C" { 40629f00f3a1Smrg#endif 40639f00f3a1Smrgchar nm_test_var; 40649f00f3a1Smrgvoid nm_test_func(void); 40659f00f3a1Smrgvoid nm_test_func(void){} 40669f00f3a1Smrg#ifdef __cplusplus 40679f00f3a1Smrg} 40689f00f3a1Smrg#endif 40699f00f3a1Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 40709f00f3a1Smrg_LT_EOF 40719f00f3a1Smrg 40729f00f3a1Smrg if AC_TRY_EVAL(ac_compile); then 40739f00f3a1Smrg # Now try to grab the symbols. 40749f00f3a1Smrg nlist=conftest.nm 40759f00f3a1Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 40769f00f3a1Smrg # Try sorting and uniquifying the output. 40779f00f3a1Smrg if sort "$nlist" | uniq > "$nlist"T; then 40789f00f3a1Smrg mv -f "$nlist"T "$nlist" 40799f00f3a1Smrg else 40809f00f3a1Smrg rm -f "$nlist"T 40819f00f3a1Smrg fi 40829f00f3a1Smrg 40839f00f3a1Smrg # Make sure that we snagged all the symbols we need. 40849f00f3a1Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 40859f00f3a1Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 40869f00f3a1Smrg cat <<_LT_EOF > conftest.$ac_ext 40879f00f3a1Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4088edce3322Smrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 4089edce3322Smrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 40909f00f3a1Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 40919f00f3a1Smrg# define LT@&t@_DLSYM_CONST 4092edce3322Smrg#elif defined __osf__ 40939f00f3a1Smrg/* This system does not cope well with relocations in const data. */ 40949f00f3a1Smrg# define LT@&t@_DLSYM_CONST 40959f00f3a1Smrg#else 40969f00f3a1Smrg# define LT@&t@_DLSYM_CONST const 40979f00f3a1Smrg#endif 40989f00f3a1Smrg 40999f00f3a1Smrg#ifdef __cplusplus 41009f00f3a1Smrgextern "C" { 41019f00f3a1Smrg#endif 41029f00f3a1Smrg 41039f00f3a1Smrg_LT_EOF 41049f00f3a1Smrg # Now generate the symbol file. 41059f00f3a1Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 41069f00f3a1Smrg 41079f00f3a1Smrg cat <<_LT_EOF >> conftest.$ac_ext 41089f00f3a1Smrg 41099f00f3a1Smrg/* The mapping between symbol names and symbols. */ 41109f00f3a1SmrgLT@&t@_DLSYM_CONST struct { 41119f00f3a1Smrg const char *name; 41129f00f3a1Smrg void *address; 41139f00f3a1Smrg} 41149f00f3a1Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 41159f00f3a1Smrg{ 41169f00f3a1Smrg { "@PROGRAM@", (void *) 0 }, 41179f00f3a1Smrg_LT_EOF 4118edce3322Smrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 41199f00f3a1Smrg cat <<\_LT_EOF >> conftest.$ac_ext 41209f00f3a1Smrg {0, (void *) 0} 41219f00f3a1Smrg}; 41229f00f3a1Smrg 41239f00f3a1Smrg/* This works around a problem in FreeBSD linker */ 41249f00f3a1Smrg#ifdef FREEBSD_WORKAROUND 41259f00f3a1Smrgstatic const void *lt_preloaded_setup() { 41269f00f3a1Smrg return lt__PROGRAM__LTX_preloaded_symbols; 41279f00f3a1Smrg} 41289f00f3a1Smrg#endif 41299f00f3a1Smrg 41309f00f3a1Smrg#ifdef __cplusplus 41319f00f3a1Smrg} 41329f00f3a1Smrg#endif 41339f00f3a1Smrg_LT_EOF 41349f00f3a1Smrg # Now try linking the two files. 41359f00f3a1Smrg mv conftest.$ac_objext conftstm.$ac_objext 41369f00f3a1Smrg lt_globsym_save_LIBS=$LIBS 41379f00f3a1Smrg lt_globsym_save_CFLAGS=$CFLAGS 4138edce3322Smrg LIBS=conftstm.$ac_objext 41399f00f3a1Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4140edce3322Smrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 41419f00f3a1Smrg pipe_works=yes 41429f00f3a1Smrg fi 41439f00f3a1Smrg LIBS=$lt_globsym_save_LIBS 41449f00f3a1Smrg CFLAGS=$lt_globsym_save_CFLAGS 41459f00f3a1Smrg else 41469f00f3a1Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 41479f00f3a1Smrg fi 41489f00f3a1Smrg else 41499f00f3a1Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 41509f00f3a1Smrg fi 41519f00f3a1Smrg else 41529f00f3a1Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 41539f00f3a1Smrg fi 41549f00f3a1Smrg else 41559f00f3a1Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 41569f00f3a1Smrg cat conftest.$ac_ext >&5 41579f00f3a1Smrg fi 41589f00f3a1Smrg rm -rf conftest* conftst* 41599f00f3a1Smrg 41609f00f3a1Smrg # Do not use the global_symbol_pipe unless it works. 4161edce3322Smrg if test yes = "$pipe_works"; then 41629f00f3a1Smrg break 41639f00f3a1Smrg else 41649f00f3a1Smrg lt_cv_sys_global_symbol_pipe= 41659f00f3a1Smrg fi 41669f00f3a1Smrgdone 41679f00f3a1Smrg]) 41689f00f3a1Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 41699f00f3a1Smrg lt_cv_sys_global_symbol_to_cdecl= 41709f00f3a1Smrgfi 41719f00f3a1Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 41729f00f3a1Smrg AC_MSG_RESULT(failed) 41739f00f3a1Smrgelse 41749f00f3a1Smrg AC_MSG_RESULT(ok) 41759f00f3a1Smrgfi 41769f00f3a1Smrg 41779f00f3a1Smrg# Response file support. 41789f00f3a1Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 41799f00f3a1Smrg nm_file_list_spec='@' 41809f00f3a1Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 41819f00f3a1Smrg nm_file_list_spec='@' 41829f00f3a1Smrgfi 41839f00f3a1Smrg 41849f00f3a1Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 41859f00f3a1Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 41869f00f3a1Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 41879f00f3a1Smrg [Transform the output of nm in a proper C declaration]) 4188edce3322Smrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 4189edce3322Smrg [Transform the output of nm into a list of symbols to manually relocate]) 41909f00f3a1Smrg_LT_DECL([global_symbol_to_c_name_address], 41919f00f3a1Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 41929f00f3a1Smrg [Transform the output of nm in a C name address pair]) 41939f00f3a1Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 41949f00f3a1Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 41959f00f3a1Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 4196edce3322Smrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 4197edce3322Smrg [The name lister interface]) 41989f00f3a1Smrg_LT_DECL([], [nm_file_list_spec], [1], 41999f00f3a1Smrg [Specify filename containing input files for $NM]) 42009f00f3a1Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 42019f00f3a1Smrg 42029f00f3a1Smrg 42039f00f3a1Smrg# _LT_COMPILER_PIC([TAGNAME]) 42049f00f3a1Smrg# --------------------------- 42059f00f3a1Smrgm4_defun([_LT_COMPILER_PIC], 42069f00f3a1Smrg[m4_require([_LT_TAG_COMPILER])dnl 42079f00f3a1Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 42089f00f3a1Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 42099f00f3a1Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 42109f00f3a1Smrg 42119f00f3a1Smrgm4_if([$1], [CXX], [ 42129f00f3a1Smrg # C++ specific cases for pic, static, wl, etc. 4213edce3322Smrg if test yes = "$GXX"; then 42149f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 42159f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 42169f00f3a1Smrg 42179f00f3a1Smrg case $host_os in 42189f00f3a1Smrg aix*) 42199f00f3a1Smrg # All AIX code is PIC. 4220edce3322Smrg if test ia64 = "$host_cpu"; then 42219f00f3a1Smrg # AIX 5 now supports IA64 processor 42229f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 42239f00f3a1Smrg fi 4224edce3322Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42259f00f3a1Smrg ;; 42269f00f3a1Smrg 42279f00f3a1Smrg amigaos*) 42289f00f3a1Smrg case $host_cpu in 42299f00f3a1Smrg powerpc) 42309f00f3a1Smrg # see comment about AmigaOS4 .so support 42319f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42329f00f3a1Smrg ;; 42339f00f3a1Smrg m68k) 42349f00f3a1Smrg # FIXME: we need at least 68020 code to build shared libraries, but 4235edce3322Smrg # adding the '-m68020' flag to GCC prevents building anything better, 4236edce3322Smrg # like '-m68040'. 42379f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 42389f00f3a1Smrg ;; 42399f00f3a1Smrg esac 42409f00f3a1Smrg ;; 42419f00f3a1Smrg 42429f00f3a1Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 42439f00f3a1Smrg # PIC is the default for these OSes. 42449f00f3a1Smrg ;; 42459f00f3a1Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 42469f00f3a1Smrg # This hack is so that the source file can tell whether it is being 42479f00f3a1Smrg # built for inclusion in a dll (and should export symbols for example). 42489f00f3a1Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 42499f00f3a1Smrg # (--disable-auto-import) libraries 42509f00f3a1Smrg m4_if([$1], [GCJ], [], 42519f00f3a1Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4252edce3322Smrg case $host_os in 4253edce3322Smrg os2*) 4254edce3322Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4255edce3322Smrg ;; 4256edce3322Smrg esac 42579f00f3a1Smrg ;; 42589f00f3a1Smrg darwin* | rhapsody*) 42599f00f3a1Smrg # PIC is the default on this platform 42609f00f3a1Smrg # Common symbols not allowed in MH_DYLIB files 42619f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 42629f00f3a1Smrg ;; 42639f00f3a1Smrg *djgpp*) 42649f00f3a1Smrg # DJGPP does not support shared libraries at all 42659f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 42669f00f3a1Smrg ;; 42679f00f3a1Smrg haiku*) 42689f00f3a1Smrg # PIC is the default for Haiku. 42699f00f3a1Smrg # The "-static" flag exists, but is broken. 42709f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 42719f00f3a1Smrg ;; 42729f00f3a1Smrg interix[[3-9]]*) 42739f00f3a1Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 42749f00f3a1Smrg # Instead, we relocate shared libraries at runtime. 42759f00f3a1Smrg ;; 42769f00f3a1Smrg sysv4*MP*) 42779f00f3a1Smrg if test -d /usr/nec; then 42789f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 42799f00f3a1Smrg fi 42809f00f3a1Smrg ;; 42819f00f3a1Smrg hpux*) 42829f00f3a1Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 42839f00f3a1Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 42849f00f3a1Smrg # sets the default TLS model and affects inlining. 42859f00f3a1Smrg case $host_cpu in 42869f00f3a1Smrg hppa*64*) 42879f00f3a1Smrg ;; 42889f00f3a1Smrg *) 42899f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42909f00f3a1Smrg ;; 42919f00f3a1Smrg esac 42929f00f3a1Smrg ;; 42939f00f3a1Smrg *qnx* | *nto*) 42949f00f3a1Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 42959f00f3a1Smrg # it will coredump. 42969f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 42979f00f3a1Smrg ;; 42989f00f3a1Smrg *) 42999f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43009f00f3a1Smrg ;; 43019f00f3a1Smrg esac 43029f00f3a1Smrg else 43039f00f3a1Smrg case $host_os in 43049f00f3a1Smrg aix[[4-9]]*) 43059f00f3a1Smrg # All AIX code is PIC. 4306edce3322Smrg if test ia64 = "$host_cpu"; then 43079f00f3a1Smrg # AIX 5 now supports IA64 processor 43089f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43099f00f3a1Smrg else 43109f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 43119f00f3a1Smrg fi 43129f00f3a1Smrg ;; 43139f00f3a1Smrg chorus*) 43149f00f3a1Smrg case $cc_basename in 43159f00f3a1Smrg cxch68*) 43169f00f3a1Smrg # Green Hills C++ Compiler 43179f00f3a1Smrg # _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" 43189f00f3a1Smrg ;; 43199f00f3a1Smrg esac 43209f00f3a1Smrg ;; 43219f00f3a1Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 43229f00f3a1Smrg # This hack is so that the source file can tell whether it is being 43239f00f3a1Smrg # built for inclusion in a dll (and should export symbols for example). 43249f00f3a1Smrg m4_if([$1], [GCJ], [], 43259f00f3a1Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 43269f00f3a1Smrg ;; 43279f00f3a1Smrg dgux*) 43289f00f3a1Smrg case $cc_basename in 43299f00f3a1Smrg ec++*) 43309f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 43319f00f3a1Smrg ;; 43329f00f3a1Smrg ghcx*) 43339f00f3a1Smrg # Green Hills C++ Compiler 43349f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 43359f00f3a1Smrg ;; 43369f00f3a1Smrg *) 43379f00f3a1Smrg ;; 43389f00f3a1Smrg esac 43399f00f3a1Smrg ;; 434074835918Smrg freebsd* | dragonfly* | midnightbsd*) 43419f00f3a1Smrg # FreeBSD uses GNU C++ 43429f00f3a1Smrg ;; 43439f00f3a1Smrg hpux9* | hpux10* | hpux11*) 43449f00f3a1Smrg case $cc_basename in 43459f00f3a1Smrg CC*) 43469f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4347edce3322Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4348edce3322Smrg if test ia64 != "$host_cpu"; then 43499f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 43509f00f3a1Smrg fi 43519f00f3a1Smrg ;; 43529f00f3a1Smrg aCC*) 43539f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4354edce3322Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 43559f00f3a1Smrg case $host_cpu in 43569f00f3a1Smrg hppa*64*|ia64*) 43579f00f3a1Smrg # +Z the default 43589f00f3a1Smrg ;; 43599f00f3a1Smrg *) 43609f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 43619f00f3a1Smrg ;; 43629f00f3a1Smrg esac 43639f00f3a1Smrg ;; 43649f00f3a1Smrg *) 43659f00f3a1Smrg ;; 43669f00f3a1Smrg esac 43679f00f3a1Smrg ;; 43689f00f3a1Smrg interix*) 43699f00f3a1Smrg # This is c89, which is MS Visual C++ (no shared libs) 43709f00f3a1Smrg # Anyone wants to do a port? 43719f00f3a1Smrg ;; 43729f00f3a1Smrg irix5* | irix6* | nonstopux*) 43739f00f3a1Smrg case $cc_basename in 43749f00f3a1Smrg CC*) 43759f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43769f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 43779f00f3a1Smrg # CC pic flag -KPIC is the default. 43789f00f3a1Smrg ;; 43799f00f3a1Smrg *) 43809f00f3a1Smrg ;; 43819f00f3a1Smrg esac 43829f00f3a1Smrg ;; 43839f00f3a1Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 43849f00f3a1Smrg case $cc_basename in 43859f00f3a1Smrg KCC*) 43869f00f3a1Smrg # KAI C++ Compiler 43879f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 43889f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43899f00f3a1Smrg ;; 43909f00f3a1Smrg ecpc* ) 4391edce3322Smrg # old Intel C++ for x86_64, which still supported -KPIC. 43929f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43939f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 43949f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 43959f00f3a1Smrg ;; 43969f00f3a1Smrg icpc* ) 43979f00f3a1Smrg # Intel C++, used to be incompatible with GCC. 43989f00f3a1Smrg # ICC 10 doesn't accept -KPIC any more. 43999f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44009f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 44019f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 44029f00f3a1Smrg ;; 44039f00f3a1Smrg pgCC* | pgcpp*) 44049f00f3a1Smrg # Portland Group C++ compiler 44059f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44069f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 44079f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44089f00f3a1Smrg ;; 44099f00f3a1Smrg cxx*) 44109f00f3a1Smrg # Compaq C++ 44119f00f3a1Smrg # Make sure the PIC flag is empty. It appears that all Alpha 44129f00f3a1Smrg # Linux and Compaq Tru64 Unix objects are PIC. 44139f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 44149f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44159f00f3a1Smrg ;; 44169f00f3a1Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 44179f00f3a1Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 44189f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44199f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 44209f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 44219f00f3a1Smrg ;; 44229f00f3a1Smrg *) 442374835918Smrg case `$CC -V 2>&1 | $SED 5q` in 44249f00f3a1Smrg *Sun\ C*) 44259f00f3a1Smrg # Sun C++ 5.9 44269f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44279f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44289f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44299f00f3a1Smrg ;; 44309f00f3a1Smrg esac 44319f00f3a1Smrg ;; 44329f00f3a1Smrg esac 44339f00f3a1Smrg ;; 44349f00f3a1Smrg lynxos*) 44359f00f3a1Smrg ;; 44369f00f3a1Smrg m88k*) 44379f00f3a1Smrg ;; 44389f00f3a1Smrg mvs*) 44399f00f3a1Smrg case $cc_basename in 44409f00f3a1Smrg cxx*) 44419f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 44429f00f3a1Smrg ;; 44439f00f3a1Smrg *) 44449f00f3a1Smrg ;; 44459f00f3a1Smrg esac 44469f00f3a1Smrg ;; 4447edce3322Smrg netbsd*) 44489f00f3a1Smrg ;; 44499f00f3a1Smrg *qnx* | *nto*) 44509f00f3a1Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 44519f00f3a1Smrg # it will coredump. 44529f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 44539f00f3a1Smrg ;; 44549f00f3a1Smrg osf3* | osf4* | osf5*) 44559f00f3a1Smrg case $cc_basename in 44569f00f3a1Smrg KCC*) 44579f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 44589f00f3a1Smrg ;; 44599f00f3a1Smrg RCC*) 44609f00f3a1Smrg # Rational C++ 2.4.1 44619f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 44629f00f3a1Smrg ;; 44639f00f3a1Smrg cxx*) 44649f00f3a1Smrg # Digital/Compaq C++ 44659f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44669f00f3a1Smrg # Make sure the PIC flag is empty. It appears that all Alpha 44679f00f3a1Smrg # Linux and Compaq Tru64 Unix objects are PIC. 44689f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 44699f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44709f00f3a1Smrg ;; 44719f00f3a1Smrg *) 44729f00f3a1Smrg ;; 44739f00f3a1Smrg esac 44749f00f3a1Smrg ;; 44759f00f3a1Smrg psos*) 44769f00f3a1Smrg ;; 44779f00f3a1Smrg solaris*) 44789f00f3a1Smrg case $cc_basename in 44799f00f3a1Smrg CC* | sunCC*) 44809f00f3a1Smrg # Sun C++ 4.2, 5.x and Centerline C++ 44819f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44829f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44839f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44849f00f3a1Smrg ;; 44859f00f3a1Smrg gcx*) 44869f00f3a1Smrg # Green Hills C++ Compiler 44879f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 44889f00f3a1Smrg ;; 44899f00f3a1Smrg *) 44909f00f3a1Smrg ;; 44919f00f3a1Smrg esac 44929f00f3a1Smrg ;; 44939f00f3a1Smrg sunos4*) 44949f00f3a1Smrg case $cc_basename in 44959f00f3a1Smrg CC*) 44969f00f3a1Smrg # Sun C++ 4.x 44979f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 44989f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44999f00f3a1Smrg ;; 45009f00f3a1Smrg lcc*) 45019f00f3a1Smrg # Lucid 45029f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 45039f00f3a1Smrg ;; 45049f00f3a1Smrg *) 45059f00f3a1Smrg ;; 45069f00f3a1Smrg esac 45079f00f3a1Smrg ;; 45089f00f3a1Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 45099f00f3a1Smrg case $cc_basename in 45109f00f3a1Smrg CC*) 45119f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45129f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 45139f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45149f00f3a1Smrg ;; 45159f00f3a1Smrg esac 45169f00f3a1Smrg ;; 45179f00f3a1Smrg tandem*) 45189f00f3a1Smrg case $cc_basename in 45199f00f3a1Smrg NCC*) 45209f00f3a1Smrg # NonStop-UX NCC 3.20 45219f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 45229f00f3a1Smrg ;; 45239f00f3a1Smrg *) 45249f00f3a1Smrg ;; 45259f00f3a1Smrg esac 45269f00f3a1Smrg ;; 45279f00f3a1Smrg vxworks*) 45289f00f3a1Smrg ;; 45299f00f3a1Smrg *) 45309f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 45319f00f3a1Smrg ;; 45329f00f3a1Smrg esac 45339f00f3a1Smrg fi 45349f00f3a1Smrg], 45359f00f3a1Smrg[ 4536edce3322Smrg if test yes = "$GCC"; then 45379f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45389f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 45399f00f3a1Smrg 45409f00f3a1Smrg case $host_os in 45419f00f3a1Smrg aix*) 45429f00f3a1Smrg # All AIX code is PIC. 4543edce3322Smrg if test ia64 = "$host_cpu"; then 45449f00f3a1Smrg # AIX 5 now supports IA64 processor 45459f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45469f00f3a1Smrg fi 4547edce3322Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 45489f00f3a1Smrg ;; 45499f00f3a1Smrg 45509f00f3a1Smrg amigaos*) 45519f00f3a1Smrg case $host_cpu in 45529f00f3a1Smrg powerpc) 45539f00f3a1Smrg # see comment about AmigaOS4 .so support 45549f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 45559f00f3a1Smrg ;; 45569f00f3a1Smrg m68k) 45579f00f3a1Smrg # FIXME: we need at least 68020 code to build shared libraries, but 4558edce3322Smrg # adding the '-m68020' flag to GCC prevents building anything better, 4559edce3322Smrg # like '-m68040'. 45609f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 45619f00f3a1Smrg ;; 45629f00f3a1Smrg esac 45639f00f3a1Smrg ;; 45649f00f3a1Smrg 45659f00f3a1Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 45669f00f3a1Smrg # PIC is the default for these OSes. 45679f00f3a1Smrg ;; 45689f00f3a1Smrg 45699f00f3a1Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 45709f00f3a1Smrg # This hack is so that the source file can tell whether it is being 45719f00f3a1Smrg # built for inclusion in a dll (and should export symbols for example). 45729f00f3a1Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 45739f00f3a1Smrg # (--disable-auto-import) libraries 45749f00f3a1Smrg m4_if([$1], [GCJ], [], 45759f00f3a1Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4576edce3322Smrg case $host_os in 4577edce3322Smrg os2*) 4578edce3322Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4579edce3322Smrg ;; 4580edce3322Smrg esac 45819f00f3a1Smrg ;; 45829f00f3a1Smrg 45839f00f3a1Smrg darwin* | rhapsody*) 45849f00f3a1Smrg # PIC is the default on this platform 45859f00f3a1Smrg # Common symbols not allowed in MH_DYLIB files 45869f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 45879f00f3a1Smrg ;; 45889f00f3a1Smrg 45899f00f3a1Smrg haiku*) 45909f00f3a1Smrg # PIC is the default for Haiku. 45919f00f3a1Smrg # The "-static" flag exists, but is broken. 45929f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 45939f00f3a1Smrg ;; 45949f00f3a1Smrg 45959f00f3a1Smrg hpux*) 45969f00f3a1Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 45979f00f3a1Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 45989f00f3a1Smrg # sets the default TLS model and affects inlining. 45999f00f3a1Smrg case $host_cpu in 46009f00f3a1Smrg hppa*64*) 46019f00f3a1Smrg # +Z the default 46029f00f3a1Smrg ;; 46039f00f3a1Smrg *) 46049f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 46059f00f3a1Smrg ;; 46069f00f3a1Smrg esac 46079f00f3a1Smrg ;; 46089f00f3a1Smrg 46099f00f3a1Smrg interix[[3-9]]*) 46109f00f3a1Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 46119f00f3a1Smrg # Instead, we relocate shared libraries at runtime. 46129f00f3a1Smrg ;; 46139f00f3a1Smrg 46149f00f3a1Smrg msdosdjgpp*) 46159f00f3a1Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 46169f00f3a1Smrg # on systems that don't support them. 46179f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 46189f00f3a1Smrg enable_shared=no 46199f00f3a1Smrg ;; 46209f00f3a1Smrg 46219f00f3a1Smrg *nto* | *qnx*) 46229f00f3a1Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 46239f00f3a1Smrg # it will coredump. 46249f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 46259f00f3a1Smrg ;; 46269f00f3a1Smrg 46279f00f3a1Smrg sysv4*MP*) 46289f00f3a1Smrg if test -d /usr/nec; then 46299f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 46309f00f3a1Smrg fi 46319f00f3a1Smrg ;; 46329f00f3a1Smrg 46339f00f3a1Smrg *) 46349f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 46359f00f3a1Smrg ;; 46369f00f3a1Smrg esac 46379f00f3a1Smrg 46389f00f3a1Smrg case $cc_basename in 46399f00f3a1Smrg nvcc*) # Cuda Compiler Driver 2.2 46409f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 46419f00f3a1Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 46429f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 46439f00f3a1Smrg fi 46449f00f3a1Smrg ;; 46459f00f3a1Smrg esac 46469f00f3a1Smrg else 46479f00f3a1Smrg # PORTME Check for flag to pass linker flags through the system compiler. 46489f00f3a1Smrg case $host_os in 46499f00f3a1Smrg aix*) 46509f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4651edce3322Smrg if test ia64 = "$host_cpu"; then 46529f00f3a1Smrg # AIX 5 now supports IA64 processor 46539f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 46549f00f3a1Smrg else 46559f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 46569f00f3a1Smrg fi 46579f00f3a1Smrg ;; 46589f00f3a1Smrg 4659edce3322Smrg darwin* | rhapsody*) 4660edce3322Smrg # PIC is the default on this platform 4661edce3322Smrg # Common symbols not allowed in MH_DYLIB files 4662edce3322Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4663edce3322Smrg case $cc_basename in 4664edce3322Smrg nagfor*) 4665edce3322Smrg # NAG Fortran compiler 4666edce3322Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4667edce3322Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4668edce3322Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4669edce3322Smrg ;; 4670edce3322Smrg esac 4671edce3322Smrg ;; 4672edce3322Smrg 46739f00f3a1Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 46749f00f3a1Smrg # This hack is so that the source file can tell whether it is being 46759f00f3a1Smrg # built for inclusion in a dll (and should export symbols for example). 46769f00f3a1Smrg m4_if([$1], [GCJ], [], 46779f00f3a1Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4678edce3322Smrg case $host_os in 4679edce3322Smrg os2*) 4680edce3322Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4681edce3322Smrg ;; 4682edce3322Smrg esac 46839f00f3a1Smrg ;; 46849f00f3a1Smrg 46859f00f3a1Smrg hpux9* | hpux10* | hpux11*) 46869f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 46879f00f3a1Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 46889f00f3a1Smrg # not for PA HP-UX. 46899f00f3a1Smrg case $host_cpu in 46909f00f3a1Smrg hppa*64*|ia64*) 46919f00f3a1Smrg # +Z the default 46929f00f3a1Smrg ;; 46939f00f3a1Smrg *) 46949f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 46959f00f3a1Smrg ;; 46969f00f3a1Smrg esac 46979f00f3a1Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 4698edce3322Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 46999f00f3a1Smrg ;; 47009f00f3a1Smrg 47019f00f3a1Smrg irix5* | irix6* | nonstopux*) 47029f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47039f00f3a1Smrg # PIC (with -KPIC) is the default. 47049f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 47059f00f3a1Smrg ;; 47069f00f3a1Smrg 47079f00f3a1Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 47089f00f3a1Smrg case $cc_basename in 4709edce3322Smrg # old Intel for x86_64, which still supported -KPIC. 47109f00f3a1Smrg ecc*) 47119f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47129f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47139f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47149f00f3a1Smrg ;; 47159f00f3a1Smrg # icc used to be incompatible with GCC. 47169f00f3a1Smrg # ICC 10 doesn't accept -KPIC any more. 47179f00f3a1Smrg icc* | ifort*) 47189f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47199f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 47209f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47219f00f3a1Smrg ;; 47229f00f3a1Smrg # Lahey Fortran 8.1. 47239f00f3a1Smrg lf95*) 47249f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47259f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 47269f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 47279f00f3a1Smrg ;; 47289f00f3a1Smrg nagfor*) 47299f00f3a1Smrg # NAG Fortran compiler 47309f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 47319f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 47329f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47339f00f3a1Smrg ;; 4734edce3322Smrg tcc*) 4735edce3322Smrg # Fabrice Bellard et al's Tiny C Compiler 4736edce3322Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4737edce3322Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4738edce3322Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4739edce3322Smrg ;; 47409f00f3a1Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 47419f00f3a1Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 47429f00f3a1Smrg # which looks to be a dead project) 47439f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47449f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 47459f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47469f00f3a1Smrg ;; 47479f00f3a1Smrg ccc*) 47489f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47499f00f3a1Smrg # All Alpha code is PIC. 47509f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 47519f00f3a1Smrg ;; 47529f00f3a1Smrg xl* | bgxl* | bgf* | mpixl*) 47539f00f3a1Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 47549f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47559f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 47569f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 47579f00f3a1Smrg ;; 47589f00f3a1Smrg *) 475974835918Smrg case `$CC -V 2>&1 | $SED 5q` in 47609f00f3a1Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 47619f00f3a1Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 47629f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47639f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47649f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 47659f00f3a1Smrg ;; 47669f00f3a1Smrg *Sun\ F* | *Sun*Fortran*) 47679f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47689f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47699f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 47709f00f3a1Smrg ;; 47719f00f3a1Smrg *Sun\ C*) 47729f00f3a1Smrg # Sun C 5.9 47739f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47749f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47759f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47769f00f3a1Smrg ;; 47779f00f3a1Smrg *Intel*\ [[CF]]*Compiler*) 47789f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47799f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 47809f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47819f00f3a1Smrg ;; 47829f00f3a1Smrg *Portland\ Group*) 47839f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47849f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 47859f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47869f00f3a1Smrg ;; 47879f00f3a1Smrg esac 47889f00f3a1Smrg ;; 47899f00f3a1Smrg esac 47909f00f3a1Smrg ;; 47919f00f3a1Smrg 47929f00f3a1Smrg newsos6) 47939f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47949f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47959f00f3a1Smrg ;; 47969f00f3a1Smrg 47979f00f3a1Smrg *nto* | *qnx*) 47989f00f3a1Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 47999f00f3a1Smrg # it will coredump. 48009f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 48019f00f3a1Smrg ;; 48029f00f3a1Smrg 48039f00f3a1Smrg osf3* | osf4* | osf5*) 48049f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48059f00f3a1Smrg # All OSF/1 code is PIC. 48069f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 48079f00f3a1Smrg ;; 48089f00f3a1Smrg 48099f00f3a1Smrg rdos*) 48109f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 48119f00f3a1Smrg ;; 48129f00f3a1Smrg 48139f00f3a1Smrg solaris*) 48149f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48159f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48169f00f3a1Smrg case $cc_basename in 48179f00f3a1Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 48189f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 48199f00f3a1Smrg *) 48209f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 48219f00f3a1Smrg esac 48229f00f3a1Smrg ;; 48239f00f3a1Smrg 48249f00f3a1Smrg sunos4*) 48259f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 48269f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 48279f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48289f00f3a1Smrg ;; 48299f00f3a1Smrg 48309f00f3a1Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 48319f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48329f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48339f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48349f00f3a1Smrg ;; 48359f00f3a1Smrg 48369f00f3a1Smrg sysv4*MP*) 4837edce3322Smrg if test -d /usr/nec; then 48389f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 48399f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48409f00f3a1Smrg fi 48419f00f3a1Smrg ;; 48429f00f3a1Smrg 48439f00f3a1Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 48449f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48459f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48469f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48479f00f3a1Smrg ;; 48489f00f3a1Smrg 48499f00f3a1Smrg unicos*) 48509f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48519f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 48529f00f3a1Smrg ;; 48539f00f3a1Smrg 48549f00f3a1Smrg uts4*) 48559f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 48569f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48579f00f3a1Smrg ;; 48589f00f3a1Smrg 48599f00f3a1Smrg *) 48609f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 48619f00f3a1Smrg ;; 48629f00f3a1Smrg esac 48639f00f3a1Smrg fi 48649f00f3a1Smrg]) 48659f00f3a1Smrgcase $host_os in 4866edce3322Smrg # For platforms that do not support PIC, -DPIC is meaningless: 48679f00f3a1Smrg *djgpp*) 48689f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 48699f00f3a1Smrg ;; 48709f00f3a1Smrg *) 48719f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 48729f00f3a1Smrg ;; 48739f00f3a1Smrgesac 48749f00f3a1Smrg 48759f00f3a1SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 48769f00f3a1Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 48779f00f3a1Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 48789f00f3a1Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 48799f00f3a1Smrg 48809f00f3a1Smrg# 48819f00f3a1Smrg# Check to make sure the PIC flag actually works. 48829f00f3a1Smrg# 48839f00f3a1Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 48849f00f3a1Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 48859f00f3a1Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 48869f00f3a1Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 48879f00f3a1Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 48889f00f3a1Smrg "" | " "*) ;; 48899f00f3a1Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 48909f00f3a1Smrg esac], 48919f00f3a1Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 48929f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 48939f00f3a1Smrgfi 48949f00f3a1Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 48959f00f3a1Smrg [Additional compiler flags for building library objects]) 48969f00f3a1Smrg 48979f00f3a1Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 48989f00f3a1Smrg [How to pass a linker flag through the compiler]) 48999f00f3a1Smrg# 49009f00f3a1Smrg# Check to make sure the static flag actually works. 49019f00f3a1Smrg# 49029f00f3a1Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 49039f00f3a1Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 49049f00f3a1Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 49059f00f3a1Smrg $lt_tmp_static_flag, 49069f00f3a1Smrg [], 49079f00f3a1Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 49089f00f3a1Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 49099f00f3a1Smrg [Compiler flag to prevent dynamic linking]) 49109f00f3a1Smrg])# _LT_COMPILER_PIC 49119f00f3a1Smrg 49129f00f3a1Smrg 49139f00f3a1Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 49149f00f3a1Smrg# ---------------------------- 49159f00f3a1Smrg# See if the linker supports building shared libraries. 49169f00f3a1Smrgm4_defun([_LT_LINKER_SHLIBS], 49179f00f3a1Smrg[AC_REQUIRE([LT_PATH_LD])dnl 49189f00f3a1SmrgAC_REQUIRE([LT_PATH_NM])dnl 49199f00f3a1Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 49209f00f3a1Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 49219f00f3a1Smrgm4_require([_LT_DECL_EGREP])dnl 49229f00f3a1Smrgm4_require([_LT_DECL_SED])dnl 49239f00f3a1Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 49249f00f3a1Smrgm4_require([_LT_TAG_COMPILER])dnl 49259f00f3a1SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 49269f00f3a1Smrgm4_if([$1], [CXX], [ 49279f00f3a1Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 49289f00f3a1Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 49299f00f3a1Smrg case $host_os in 49309f00f3a1Smrg aix[[4-9]]*) 49319f00f3a1Smrg # If we're using GNU nm, then we don't want the "-C" option. 4932edce3322Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 4933edce3322Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 4934edce3322Smrg # weak defined symbols like other global defined symbols, whereas 4935edce3322Smrg # GNU nm marks them as "W". 4936edce3322Smrg # While the 'weak' keyword is ignored in the Export File, we need 4937edce3322Smrg # it in the Import File for the 'aix-soname' feature, so we have 4938edce3322Smrg # to replace the "-B" option with "-P" for AIX nm. 49399f00f3a1Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4940edce3322Smrg _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' 49419f00f3a1Smrg else 494274835918Smrg _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' 49439f00f3a1Smrg fi 49449f00f3a1Smrg ;; 49459f00f3a1Smrg pw32*) 4946edce3322Smrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 49479f00f3a1Smrg ;; 49489f00f3a1Smrg cygwin* | mingw* | cegcc*) 49499f00f3a1Smrg case $cc_basename in 495074835918Smrg cl* | icl*) 49519f00f3a1Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 49529f00f3a1Smrg ;; 49539f00f3a1Smrg *) 49549f00f3a1Smrg _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' 49559f00f3a1Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 49569f00f3a1Smrg ;; 49579f00f3a1Smrg esac 49589f00f3a1Smrg ;; 49599f00f3a1Smrg *) 49609f00f3a1Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 49619f00f3a1Smrg ;; 49629f00f3a1Smrg esac 49639f00f3a1Smrg], [ 49649f00f3a1Smrg runpath_var= 49659f00f3a1Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 49669f00f3a1Smrg _LT_TAGVAR(always_export_symbols, $1)=no 49679f00f3a1Smrg _LT_TAGVAR(archive_cmds, $1)= 49689f00f3a1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 49699f00f3a1Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 49709f00f3a1Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 49719f00f3a1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 49729f00f3a1Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 49739f00f3a1Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 49749f00f3a1Smrg _LT_TAGVAR(hardcode_direct, $1)=no 49759f00f3a1Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 49769f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 49779f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 49789f00f3a1Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 49799f00f3a1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 49809f00f3a1Smrg _LT_TAGVAR(inherit_rpath, $1)=no 49819f00f3a1Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 49829f00f3a1Smrg _LT_TAGVAR(module_cmds, $1)= 49839f00f3a1Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 49849f00f3a1Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 49859f00f3a1Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 49869f00f3a1Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 49879f00f3a1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 49889f00f3a1Smrg # include_expsyms should be a list of space-separated symbols to be *always* 49899f00f3a1Smrg # included in the symbol list 49909f00f3a1Smrg _LT_TAGVAR(include_expsyms, $1)= 49919f00f3a1Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 4992edce3322Smrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 4993edce3322Smrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 4994edce3322Smrg # as well as any symbol that contains 'd'. 49959f00f3a1Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 49969f00f3a1Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 49979f00f3a1Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 49989f00f3a1Smrg # the symbol is explicitly referenced. Since portable code cannot 49999f00f3a1Smrg # rely on this symbol name, it's probably fine to never include it in 50009f00f3a1Smrg # preloaded symbol tables. 50019f00f3a1Smrg # Exclude shared library initialization/finalization symbols. 50029f00f3a1Smrgdnl Note also adjust exclude_expsyms for C++ above. 50039f00f3a1Smrg extract_expsyms_cmds= 50049f00f3a1Smrg 50059f00f3a1Smrg case $host_os in 50069f00f3a1Smrg cygwin* | mingw* | pw32* | cegcc*) 500774835918Smrg # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 50089f00f3a1Smrg # When not using gcc, we currently assume that we are using 500974835918Smrg # Microsoft Visual C++ or Intel C++ Compiler. 5010edce3322Smrg if test yes != "$GCC"; then 50119f00f3a1Smrg with_gnu_ld=no 50129f00f3a1Smrg fi 50139f00f3a1Smrg ;; 50149f00f3a1Smrg interix*) 501574835918Smrg # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 50169f00f3a1Smrg with_gnu_ld=yes 50179f00f3a1Smrg ;; 5018edce3322Smrg openbsd* | bitrig*) 50199f00f3a1Smrg with_gnu_ld=no 50209f00f3a1Smrg ;; 50219f00f3a1Smrg esac 50229f00f3a1Smrg 50239f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 50249f00f3a1Smrg 50259f00f3a1Smrg # On some targets, GNU ld is compatible enough with the native linker 50269f00f3a1Smrg # that we're better off using the native interface for both. 50279f00f3a1Smrg lt_use_gnu_ld_interface=no 5028edce3322Smrg if test yes = "$with_gnu_ld"; then 50299f00f3a1Smrg case $host_os in 50309f00f3a1Smrg aix*) 50319f00f3a1Smrg # The AIX port of GNU ld has always aspired to compatibility 50329f00f3a1Smrg # with the native linker. However, as the warning in the GNU ld 50339f00f3a1Smrg # block says, versions before 2.19.5* couldn't really create working 50349f00f3a1Smrg # shared libraries, regardless of the interface used. 50359f00f3a1Smrg case `$LD -v 2>&1` in 50369f00f3a1Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 50379f00f3a1Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 50389f00f3a1Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 50399f00f3a1Smrg *) 50409f00f3a1Smrg lt_use_gnu_ld_interface=yes 50419f00f3a1Smrg ;; 50429f00f3a1Smrg esac 50439f00f3a1Smrg ;; 50449f00f3a1Smrg *) 50459f00f3a1Smrg lt_use_gnu_ld_interface=yes 50469f00f3a1Smrg ;; 50479f00f3a1Smrg esac 50489f00f3a1Smrg fi 50499f00f3a1Smrg 5050edce3322Smrg if test yes = "$lt_use_gnu_ld_interface"; then 50519f00f3a1Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 5052edce3322Smrg wlarc='$wl' 50539f00f3a1Smrg 50549f00f3a1Smrg # Set some defaults for GNU ld with shared library support. These 50559f00f3a1Smrg # are reset later if shared libraries are not supported. Putting them 50569f00f3a1Smrg # here allows them to be overridden if necessary. 50579f00f3a1Smrg runpath_var=LD_RUN_PATH 5058edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5059edce3322Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 50609f00f3a1Smrg # ancient GNU ld didn't support --whole-archive et. al. 50619f00f3a1Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 5062edce3322Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 50639f00f3a1Smrg else 50649f00f3a1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 50659f00f3a1Smrg fi 50669f00f3a1Smrg supports_anon_versioning=no 506774835918Smrg case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in 50689f00f3a1Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 50699f00f3a1Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 50709f00f3a1Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 50719f00f3a1Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 50729f00f3a1Smrg *\ 2.11.*) ;; # other 2.11 versions 50739f00f3a1Smrg *) supports_anon_versioning=yes ;; 50749f00f3a1Smrg esac 50759f00f3a1Smrg 50769f00f3a1Smrg # See if GNU ld supports shared libraries. 50779f00f3a1Smrg case $host_os in 50789f00f3a1Smrg aix[[3-9]]*) 50799f00f3a1Smrg # On AIX/PPC, the GNU linker is very broken 5080edce3322Smrg if test ia64 != "$host_cpu"; then 50819f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 50829f00f3a1Smrg cat <<_LT_EOF 1>&2 50839f00f3a1Smrg 50849f00f3a1Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 50859f00f3a1Smrg*** to be unable to reliably create shared libraries on AIX. 50869f00f3a1Smrg*** Therefore, libtool is disabling shared libraries support. If you 50879f00f3a1Smrg*** really care for shared libraries, you may want to install binutils 50889f00f3a1Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 50899f00f3a1Smrg*** You will then need to restart the configuration process. 50909f00f3a1Smrg 50919f00f3a1Smrg_LT_EOF 50929f00f3a1Smrg fi 50939f00f3a1Smrg ;; 50949f00f3a1Smrg 50959f00f3a1Smrg amigaos*) 50969f00f3a1Smrg case $host_cpu in 50979f00f3a1Smrg powerpc) 50989f00f3a1Smrg # see comment about AmigaOS4 .so support 5099edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 51009f00f3a1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 51019f00f3a1Smrg ;; 51029f00f3a1Smrg m68k) 51039f00f3a1Smrg _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)' 51049f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51059f00f3a1Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 51069f00f3a1Smrg ;; 51079f00f3a1Smrg esac 51089f00f3a1Smrg ;; 51099f00f3a1Smrg 51109f00f3a1Smrg beos*) 51119f00f3a1Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 51129f00f3a1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51139f00f3a1Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 51149f00f3a1Smrg # support --undefined. This deserves some investigation. FIXME 5115edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 51169f00f3a1Smrg else 51179f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 51189f00f3a1Smrg fi 51199f00f3a1Smrg ;; 51209f00f3a1Smrg 51219f00f3a1Smrg cygwin* | mingw* | pw32* | cegcc*) 51229f00f3a1Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 51239f00f3a1Smrg # as there is no search path for DLLs. 51249f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5125edce3322Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 51269f00f3a1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51279f00f3a1Smrg _LT_TAGVAR(always_export_symbols, $1)=no 51289f00f3a1Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 51299f00f3a1Smrg _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' 51309f00f3a1Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 51319f00f3a1Smrg 51329f00f3a1Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5133edce3322Smrg _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' 5134edce3322Smrg # If the export-symbols file already is a .def file, use it as 5135edce3322Smrg # is; otherwise, prepend EXPORTS... 5136edce3322Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5137edce3322Smrg cp $export_symbols $output_objdir/$soname.def; 5138edce3322Smrg else 5139edce3322Smrg echo EXPORTS > $output_objdir/$soname.def; 5140edce3322Smrg cat $export_symbols >> $output_objdir/$soname.def; 5141edce3322Smrg fi~ 5142edce3322Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 51439f00f3a1Smrg else 51449f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 51459f00f3a1Smrg fi 51469f00f3a1Smrg ;; 51479f00f3a1Smrg 51489f00f3a1Smrg haiku*) 5149edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 51509f00f3a1Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 51519f00f3a1Smrg ;; 51529f00f3a1Smrg 5153edce3322Smrg os2*) 5154edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5155edce3322Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5156edce3322Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5157edce3322Smrg shrext_cmds=.dll 5158edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5159edce3322Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5160edce3322Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5161edce3322Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5162edce3322Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5163edce3322Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5164edce3322Smrg emximp -o $lib $output_objdir/$libname.def' 5165edce3322Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5166edce3322Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5167edce3322Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5168edce3322Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5169edce3322Smrg prefix_cmds="$SED"~ 5170edce3322Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 5171edce3322Smrg prefix_cmds="$prefix_cmds -e 1d"; 5172edce3322Smrg fi~ 5173edce3322Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5174edce3322Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5175edce3322Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5176edce3322Smrg emximp -o $lib $output_objdir/$libname.def' 5177edce3322Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5178edce3322Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 517974835918Smrg _LT_TAGVAR(file_list_spec, $1)='@' 5180edce3322Smrg ;; 5181edce3322Smrg 51829f00f3a1Smrg interix[[3-9]]*) 51839f00f3a1Smrg _LT_TAGVAR(hardcode_direct, $1)=no 51849f00f3a1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5185edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5186edce3322Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 51879f00f3a1Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 51889f00f3a1Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 51899f00f3a1Smrg # default) and relocated if they conflict, which is a slow very memory 51909f00f3a1Smrg # consuming and fragmenting process. To avoid this, we pick a random, 51919f00f3a1Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 51929f00f3a1Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5193edce3322Smrg _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' 519474835918Smrg _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' 51959f00f3a1Smrg ;; 51969f00f3a1Smrg 51979f00f3a1Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 51989f00f3a1Smrg tmp_diet=no 5199edce3322Smrg if test linux-dietlibc = "$host_os"; then 52009f00f3a1Smrg case $cc_basename in 52019f00f3a1Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 52029f00f3a1Smrg esac 52039f00f3a1Smrg fi 52049f00f3a1Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5205edce3322Smrg && test no = "$tmp_diet" 52069f00f3a1Smrg then 52079f00f3a1Smrg tmp_addflag=' $pic_flag' 52089f00f3a1Smrg tmp_sharedflag='-shared' 52099f00f3a1Smrg case $cc_basename,$host_cpu in 52109f00f3a1Smrg pgcc*) # Portland Group C compiler 5211edce3322Smrg _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' 52129f00f3a1Smrg tmp_addflag=' $pic_flag' 52139f00f3a1Smrg ;; 52149f00f3a1Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 52159f00f3a1Smrg # Portland Group f77 and f90 compilers 5216edce3322Smrg _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' 52179f00f3a1Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 52189f00f3a1Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 52199f00f3a1Smrg tmp_addflag=' -i_dynamic' ;; 52209f00f3a1Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 52219f00f3a1Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 52229f00f3a1Smrg ifc* | ifort*) # Intel Fortran compiler 52239f00f3a1Smrg tmp_addflag=' -nofor_main' ;; 52249f00f3a1Smrg lf95*) # Lahey Fortran 8.1 52259f00f3a1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 52269f00f3a1Smrg tmp_sharedflag='--shared' ;; 5227edce3322Smrg nagfor*) # NAGFOR 5.3 5228edce3322Smrg tmp_sharedflag='-Wl,-shared' ;; 52299f00f3a1Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 52309f00f3a1Smrg tmp_sharedflag='-qmkshrobj' 52319f00f3a1Smrg tmp_addflag= ;; 52329f00f3a1Smrg nvcc*) # Cuda Compiler Driver 2.2 5233edce3322Smrg _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' 52349f00f3a1Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 52359f00f3a1Smrg ;; 52369f00f3a1Smrg esac 523774835918Smrg case `$CC -V 2>&1 | $SED 5q` in 52389f00f3a1Smrg *Sun\ C*) # Sun C 5.9 5239edce3322Smrg _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' 52409f00f3a1Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 52419f00f3a1Smrg tmp_sharedflag='-G' ;; 52429f00f3a1Smrg *Sun\ F*) # Sun Fortran 8.3 52439f00f3a1Smrg tmp_sharedflag='-G' ;; 52449f00f3a1Smrg esac 5245edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 52469f00f3a1Smrg 5247edce3322Smrg if test yes = "$supports_anon_versioning"; then 52489f00f3a1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 524974835918Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5250edce3322Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5251edce3322Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 52529f00f3a1Smrg fi 52539f00f3a1Smrg 52549f00f3a1Smrg case $cc_basename in 5255edce3322Smrg tcc*) 5256edce3322Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 5257edce3322Smrg ;; 52589f00f3a1Smrg xlf* | bgf* | bgxlf* | mpixlf*) 52599f00f3a1Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 52609f00f3a1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5261edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 52629f00f3a1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 5263edce3322Smrg if test yes = "$supports_anon_versioning"; then 52649f00f3a1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 526574835918Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5266edce3322Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5267edce3322Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 52689f00f3a1Smrg fi 52699f00f3a1Smrg ;; 52709f00f3a1Smrg esac 52719f00f3a1Smrg else 52729f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 52739f00f3a1Smrg fi 52749f00f3a1Smrg ;; 52759f00f3a1Smrg 5276edce3322Smrg netbsd*) 52779f00f3a1Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 52789f00f3a1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 52799f00f3a1Smrg wlarc= 52809f00f3a1Smrg else 5281edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5282edce3322Smrg _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' 52839f00f3a1Smrg fi 52849f00f3a1Smrg ;; 52859f00f3a1Smrg 52869f00f3a1Smrg solaris*) 52879f00f3a1Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 52889f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 52899f00f3a1Smrg cat <<_LT_EOF 1>&2 52909f00f3a1Smrg 52919f00f3a1Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 52929f00f3a1Smrg*** create shared libraries on Solaris systems. Therefore, libtool 52939f00f3a1Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 52949f00f3a1Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 52959f00f3a1Smrg*** your PATH or compiler configuration so that the native linker is 52969f00f3a1Smrg*** used, and then restart. 52979f00f3a1Smrg 52989f00f3a1Smrg_LT_EOF 52999f00f3a1Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5300edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5301edce3322Smrg _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' 53029f00f3a1Smrg else 53039f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 53049f00f3a1Smrg fi 53059f00f3a1Smrg ;; 53069f00f3a1Smrg 53079f00f3a1Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 53089f00f3a1Smrg case `$LD -v 2>&1` in 53099f00f3a1Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 53109f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 53119f00f3a1Smrg cat <<_LT_EOF 1>&2 53129f00f3a1Smrg 5313edce3322Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 53149f00f3a1Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 53159f00f3a1Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 53169f00f3a1Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 53179f00f3a1Smrg*** your PATH or compiler configuration so that the native linker is 53189f00f3a1Smrg*** used, and then restart. 53199f00f3a1Smrg 53209f00f3a1Smrg_LT_EOF 53219f00f3a1Smrg ;; 53229f00f3a1Smrg *) 53239f00f3a1Smrg # For security reasons, it is highly recommended that you always 53249f00f3a1Smrg # use absolute paths for naming shared libraries, and exclude the 53259f00f3a1Smrg # DT_RUNPATH tag from executables and libraries. But doing so 53269f00f3a1Smrg # requires that you compile everything twice, which is a pain. 53279f00f3a1Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5328edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5329edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5330edce3322Smrg _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' 53319f00f3a1Smrg else 53329f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 53339f00f3a1Smrg fi 53349f00f3a1Smrg ;; 53359f00f3a1Smrg esac 53369f00f3a1Smrg ;; 53379f00f3a1Smrg 53389f00f3a1Smrg sunos4*) 53399f00f3a1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 53409f00f3a1Smrg wlarc= 53419f00f3a1Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 53429f00f3a1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53439f00f3a1Smrg ;; 53449f00f3a1Smrg 53459f00f3a1Smrg *) 53469f00f3a1Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5347edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5348edce3322Smrg _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' 53499f00f3a1Smrg else 53509f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 53519f00f3a1Smrg fi 53529f00f3a1Smrg ;; 53539f00f3a1Smrg esac 53549f00f3a1Smrg 5355edce3322Smrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 53569f00f3a1Smrg runpath_var= 53579f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 53589f00f3a1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 53599f00f3a1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 53609f00f3a1Smrg fi 53619f00f3a1Smrg else 53629f00f3a1Smrg # PORTME fill in a description of your system's linker (not GNU ld) 53639f00f3a1Smrg case $host_os in 53649f00f3a1Smrg aix3*) 53659f00f3a1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 53669f00f3a1Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 53679f00f3a1Smrg _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' 53689f00f3a1Smrg # Note: this linker hardcodes the directories in LIBPATH if there 53699f00f3a1Smrg # are no directories specified by -L. 53709f00f3a1Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5371edce3322Smrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 53729f00f3a1Smrg # Neither direct hardcoding nor static linking is supported with a 53739f00f3a1Smrg # broken collect2. 53749f00f3a1Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 53759f00f3a1Smrg fi 53769f00f3a1Smrg ;; 53779f00f3a1Smrg 53789f00f3a1Smrg aix[[4-9]]*) 5379edce3322Smrg if test ia64 = "$host_cpu"; then 53809f00f3a1Smrg # On IA64, the linker does run time linking by default, so we don't 53819f00f3a1Smrg # have to do anything special. 53829f00f3a1Smrg aix_use_runtimelinking=no 53839f00f3a1Smrg exp_sym_flag='-Bexport' 5384edce3322Smrg no_entry_flag= 53859f00f3a1Smrg else 53869f00f3a1Smrg # If we're using GNU nm, then we don't want the "-C" option. 5387edce3322Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 5388edce3322Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 5389edce3322Smrg # weak defined symbols like other global defined symbols, whereas 5390edce3322Smrg # GNU nm marks them as "W". 5391edce3322Smrg # While the 'weak' keyword is ignored in the Export File, we need 5392edce3322Smrg # it in the Import File for the 'aix-soname' feature, so we have 5393edce3322Smrg # to replace the "-B" option with "-P" for AIX nm. 53949f00f3a1Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5395edce3322Smrg _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' 53969f00f3a1Smrg else 539774835918Smrg _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' 53989f00f3a1Smrg fi 53999f00f3a1Smrg aix_use_runtimelinking=no 54009f00f3a1Smrg 54019f00f3a1Smrg # Test if we are trying to use run time linking or normal 54029f00f3a1Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5403edce3322Smrg # have runtime linking enabled, and use it for executables. 5404edce3322Smrg # For shared libraries, we enable/disable runtime linking 5405edce3322Smrg # depending on the kind of the shared library created - 5406edce3322Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 5407edce3322Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 5408edce3322Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 5409edce3322Smrg # lib.a static archive 5410edce3322Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 5411edce3322Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 5412edce3322Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 5413edce3322Smrg # lib.a(lib.so.V) shared, rtl:no 5414edce3322Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 5415edce3322Smrg # lib.a static archive 54169f00f3a1Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 54179f00f3a1Smrg for ld_flag in $LDFLAGS; do 5418edce3322Smrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 54199f00f3a1Smrg aix_use_runtimelinking=yes 54209f00f3a1Smrg break 54219f00f3a1Smrg fi 54229f00f3a1Smrg done 5423edce3322Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 5424edce3322Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 5425edce3322Smrg # so we don't have lib.a shared libs to link our executables. 5426edce3322Smrg # We have to force runtime linking in this case. 5427edce3322Smrg aix_use_runtimelinking=yes 5428edce3322Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 5429edce3322Smrg fi 54309f00f3a1Smrg ;; 54319f00f3a1Smrg esac 54329f00f3a1Smrg 54339f00f3a1Smrg exp_sym_flag='-bexport' 54349f00f3a1Smrg no_entry_flag='-bnoentry' 54359f00f3a1Smrg fi 54369f00f3a1Smrg 54379f00f3a1Smrg # When large executables or shared objects are built, AIX ld can 54389f00f3a1Smrg # have problems creating the table of contents. If linking a library 54399f00f3a1Smrg # or program results in "error TOC overflow" add -mminimal-toc to 54409f00f3a1Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 54419f00f3a1Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 54429f00f3a1Smrg 54439f00f3a1Smrg _LT_TAGVAR(archive_cmds, $1)='' 54449f00f3a1Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 54459f00f3a1Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 54469f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 54479f00f3a1Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5448edce3322Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 5449edce3322Smrg case $with_aix_soname,$aix_use_runtimelinking in 5450edce3322Smrg aix,*) ;; # traditional, no import file 5451edce3322Smrg svr4,* | *,yes) # use import file 5452edce3322Smrg # The Import File defines what to hardcode. 5453edce3322Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5454edce3322Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5455edce3322Smrg ;; 5456edce3322Smrg esac 54579f00f3a1Smrg 5458edce3322Smrg if test yes = "$GCC"; then 54599f00f3a1Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 54609f00f3a1Smrg # We only want to do this on AIX 4.2 and lower, the check 54619f00f3a1Smrg # below for broken collect2 doesn't work under 4.3+ 5462edce3322Smrg collect2name=`$CC -print-prog-name=collect2` 54639f00f3a1Smrg if test -f "$collect2name" && 54649f00f3a1Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 54659f00f3a1Smrg then 54669f00f3a1Smrg # We have reworked collect2 54679f00f3a1Smrg : 54689f00f3a1Smrg else 54699f00f3a1Smrg # We have old collect2 54709f00f3a1Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 54719f00f3a1Smrg # It fails to find uninstalled libraries when the uninstalled 54729f00f3a1Smrg # path is not listed in the libpath. Setting hardcode_minus_L 54739f00f3a1Smrg # to unsupported forces relinking 54749f00f3a1Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 54759f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 54769f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 54779f00f3a1Smrg fi 54789f00f3a1Smrg ;; 54799f00f3a1Smrg esac 54809f00f3a1Smrg shared_flag='-shared' 5481edce3322Smrg if test yes = "$aix_use_runtimelinking"; then 5482edce3322Smrg shared_flag="$shared_flag "'$wl-G' 54839f00f3a1Smrg fi 5484edce3322Smrg # Need to ensure runtime linking is disabled for the traditional 5485edce3322Smrg # shared library, or the linker may eventually find shared libraries 5486edce3322Smrg # /with/ Import File - we do not want to mix them. 5487edce3322Smrg shared_flag_aix='-shared' 5488edce3322Smrg shared_flag_svr4='-shared $wl-G' 54899f00f3a1Smrg else 54909f00f3a1Smrg # not using gcc 5491edce3322Smrg if test ia64 = "$host_cpu"; then 54929f00f3a1Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 54939f00f3a1Smrg # chokes on -Wl,-G. The following line is correct: 54949f00f3a1Smrg shared_flag='-G' 54959f00f3a1Smrg else 5496edce3322Smrg if test yes = "$aix_use_runtimelinking"; then 5497edce3322Smrg shared_flag='$wl-G' 54989f00f3a1Smrg else 5499edce3322Smrg shared_flag='$wl-bM:SRE' 55009f00f3a1Smrg fi 5501edce3322Smrg shared_flag_aix='$wl-bM:SRE' 5502edce3322Smrg shared_flag_svr4='$wl-G' 55039f00f3a1Smrg fi 55049f00f3a1Smrg fi 55059f00f3a1Smrg 5506edce3322Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 55079f00f3a1Smrg # It seems that -bexpall does not export symbols beginning with 55089f00f3a1Smrg # underscore (_), so it is better to generate a list of symbols to export. 55099f00f3a1Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5510edce3322Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 55119f00f3a1Smrg # Warning - without using the other runtime loading flags (-brtl), 55129f00f3a1Smrg # -berok will link without error, but may produce a broken library. 55139f00f3a1Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 55149f00f3a1Smrg # Determine the default libpath from the value encoded in an 55159f00f3a1Smrg # empty executable. 55169f00f3a1Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 5517edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5518edce3322Smrg _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 55199f00f3a1Smrg else 5520edce3322Smrg if test ia64 = "$host_cpu"; then 5521edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 55229f00f3a1Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5523edce3322Smrg _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" 55249f00f3a1Smrg else 55259f00f3a1Smrg # Determine the default libpath from the value encoded in an 55269f00f3a1Smrg # empty executable. 55279f00f3a1Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 5528edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 55299f00f3a1Smrg # Warning - without using the other run time loading flags, 55309f00f3a1Smrg # -berok will link without error, but may produce a broken library. 5531edce3322Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 5532edce3322Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 5533edce3322Smrg if test yes = "$with_gnu_ld"; then 55349f00f3a1Smrg # We only use this code for GNU lds that support --whole-archive. 5535edce3322Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 55369f00f3a1Smrg else 55379f00f3a1Smrg # Exported symbols can be pulled into shared objects from archives 55389f00f3a1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 55399f00f3a1Smrg fi 55409f00f3a1Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5541edce3322Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 5542edce3322Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 5543edce3322Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 5544edce3322Smrg if test svr4 != "$with_aix_soname"; then 5545edce3322Smrg # This is similar to how AIX traditionally builds its shared libraries. 5546edce3322Smrg _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' 5547edce3322Smrg fi 5548edce3322Smrg if test aix != "$with_aix_soname"; then 5549edce3322Smrg _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' 5550edce3322Smrg else 5551edce3322Smrg # used by -dlpreopen to get the symbols 5552edce3322Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 5553edce3322Smrg fi 5554edce3322Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 55559f00f3a1Smrg fi 55569f00f3a1Smrg fi 55579f00f3a1Smrg ;; 55589f00f3a1Smrg 55599f00f3a1Smrg amigaos*) 55609f00f3a1Smrg case $host_cpu in 55619f00f3a1Smrg powerpc) 55629f00f3a1Smrg # see comment about AmigaOS4 .so support 5563edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 55649f00f3a1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 55659f00f3a1Smrg ;; 55669f00f3a1Smrg m68k) 55679f00f3a1Smrg _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)' 55689f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 55699f00f3a1Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 55709f00f3a1Smrg ;; 55719f00f3a1Smrg esac 55729f00f3a1Smrg ;; 55739f00f3a1Smrg 55749f00f3a1Smrg bsdi[[45]]*) 55759f00f3a1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 55769f00f3a1Smrg ;; 55779f00f3a1Smrg 55789f00f3a1Smrg cygwin* | mingw* | pw32* | cegcc*) 55799f00f3a1Smrg # When not using gcc, we currently assume that we are using 558074835918Smrg # Microsoft Visual C++ or Intel C++ Compiler. 55819f00f3a1Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 55829f00f3a1Smrg # no search path for DLLs. 55839f00f3a1Smrg case $cc_basename in 558474835918Smrg cl* | icl*) 558574835918Smrg # Native MSVC or ICC 55869f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 55879f00f3a1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 55889f00f3a1Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 55899f00f3a1Smrg _LT_TAGVAR(file_list_spec, $1)='@' 55909f00f3a1Smrg # Tell ltmain to make .lib files, not .a files. 55919f00f3a1Smrg libext=lib 55929f00f3a1Smrg # Tell ltmain to make .dll files, not .so files. 5593edce3322Smrg shrext_cmds=.dll 55949f00f3a1Smrg # FIXME: Setting linknames here is a bad hack. 5595edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 5596edce3322Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5597edce3322Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 5598edce3322Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 5599edce3322Smrg else 5600edce3322Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 5601edce3322Smrg fi~ 5602edce3322Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5603edce3322Smrg linknames=' 56049f00f3a1Smrg # The linker will not automatically build a static lib if we build a DLL. 56059f00f3a1Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 56069f00f3a1Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 56079f00f3a1Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 56089f00f3a1Smrg _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' 56099f00f3a1Smrg # Don't use ranlib 56109f00f3a1Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 56119f00f3a1Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5612edce3322Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 5613edce3322Smrg case $lt_outputfile in 5614edce3322Smrg *.exe|*.EXE) ;; 5615edce3322Smrg *) 5616edce3322Smrg lt_outputfile=$lt_outputfile.exe 5617edce3322Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 5618edce3322Smrg ;; 5619edce3322Smrg esac~ 5620edce3322Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 5621edce3322Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5622edce3322Smrg $RM "$lt_outputfile.manifest"; 5623edce3322Smrg fi' 56249f00f3a1Smrg ;; 56259f00f3a1Smrg *) 562674835918Smrg # Assume MSVC and ICC wrapper 56279f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 56289f00f3a1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 56299f00f3a1Smrg # Tell ltmain to make .lib files, not .a files. 56309f00f3a1Smrg libext=lib 56319f00f3a1Smrg # Tell ltmain to make .dll files, not .so files. 5632edce3322Smrg shrext_cmds=.dll 56339f00f3a1Smrg # FIXME: Setting linknames here is a bad hack. 56349f00f3a1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 56359f00f3a1Smrg # The linker will automatically build a .lib file if we build a DLL. 56369f00f3a1Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 56379f00f3a1Smrg # FIXME: Should let the user specify the lib program. 56389f00f3a1Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 56399f00f3a1Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 56409f00f3a1Smrg ;; 56419f00f3a1Smrg esac 56429f00f3a1Smrg ;; 56439f00f3a1Smrg 56449f00f3a1Smrg darwin* | rhapsody*) 56459f00f3a1Smrg _LT_DARWIN_LINKER_FEATURES($1) 56469f00f3a1Smrg ;; 56479f00f3a1Smrg 56489f00f3a1Smrg dgux*) 56499f00f3a1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 56509f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 56519f00f3a1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56529f00f3a1Smrg ;; 56539f00f3a1Smrg 56549f00f3a1Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 56559f00f3a1Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 56569f00f3a1Smrg # does not break anything, and helps significantly (at the cost of a little 56579f00f3a1Smrg # extra space). 56589f00f3a1Smrg freebsd2.2*) 56599f00f3a1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 56609f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 56619f00f3a1Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 56629f00f3a1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56639f00f3a1Smrg ;; 56649f00f3a1Smrg 56659f00f3a1Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 56669f00f3a1Smrg freebsd2.*) 56679f00f3a1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 56689f00f3a1Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 56699f00f3a1Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 56709f00f3a1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56719f00f3a1Smrg ;; 56729f00f3a1Smrg 56739f00f3a1Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 567474835918Smrg freebsd* | dragonfly* | midnightbsd*) 56759f00f3a1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 56769f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 56779f00f3a1Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 56789f00f3a1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56799f00f3a1Smrg ;; 56809f00f3a1Smrg 56819f00f3a1Smrg hpux9*) 5682edce3322Smrg if test yes = "$GCC"; then 5683edce3322Smrg _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' 56849f00f3a1Smrg else 5685edce3322Smrg _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' 56869f00f3a1Smrg fi 5687edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 56889f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 56899f00f3a1Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 56909f00f3a1Smrg 56919f00f3a1Smrg # hardcode_minus_L: Not really in the search PATH, 56929f00f3a1Smrg # but as the default location of the library. 56939f00f3a1Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5694edce3322Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 56959f00f3a1Smrg ;; 56969f00f3a1Smrg 56979f00f3a1Smrg hpux10*) 5698edce3322Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 5699edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 57009f00f3a1Smrg else 57019f00f3a1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 57029f00f3a1Smrg fi 5703edce3322Smrg if test no = "$with_gnu_ld"; then 5704edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 57059f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57069f00f3a1Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 57079f00f3a1Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5708edce3322Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 57099f00f3a1Smrg # hardcode_minus_L: Not really in the search PATH, 57109f00f3a1Smrg # but as the default location of the library. 57119f00f3a1Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57129f00f3a1Smrg fi 57139f00f3a1Smrg ;; 57149f00f3a1Smrg 57159f00f3a1Smrg hpux11*) 5716edce3322Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 57179f00f3a1Smrg case $host_cpu in 57189f00f3a1Smrg hppa*64*) 5719edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 57209f00f3a1Smrg ;; 57219f00f3a1Smrg ia64*) 5722edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 57239f00f3a1Smrg ;; 57249f00f3a1Smrg *) 5725edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 57269f00f3a1Smrg ;; 57279f00f3a1Smrg esac 57289f00f3a1Smrg else 57299f00f3a1Smrg case $host_cpu in 57309f00f3a1Smrg hppa*64*) 5731edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 57329f00f3a1Smrg ;; 57339f00f3a1Smrg ia64*) 5734edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 57359f00f3a1Smrg ;; 57369f00f3a1Smrg *) 57379f00f3a1Smrg m4_if($1, [], [ 57389f00f3a1Smrg # Older versions of the 11.00 compiler do not understand -b yet 57399f00f3a1Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 57409f00f3a1Smrg _LT_LINKER_OPTION([if $CC understands -b], 57419f00f3a1Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5742edce3322Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 57439f00f3a1Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5744edce3322Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 57459f00f3a1Smrg ;; 57469f00f3a1Smrg esac 57479f00f3a1Smrg fi 5748edce3322Smrg if test no = "$with_gnu_ld"; then 5749edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 57509f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57519f00f3a1Smrg 57529f00f3a1Smrg case $host_cpu in 57539f00f3a1Smrg hppa*64*|ia64*) 57549f00f3a1Smrg _LT_TAGVAR(hardcode_direct, $1)=no 57559f00f3a1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 57569f00f3a1Smrg ;; 57579f00f3a1Smrg *) 57589f00f3a1Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 57599f00f3a1Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5760edce3322Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 57619f00f3a1Smrg 57629f00f3a1Smrg # hardcode_minus_L: Not really in the search PATH, 57639f00f3a1Smrg # but as the default location of the library. 57649f00f3a1Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57659f00f3a1Smrg ;; 57669f00f3a1Smrg esac 57679f00f3a1Smrg fi 57689f00f3a1Smrg ;; 57699f00f3a1Smrg 57709f00f3a1Smrg irix5* | irix6* | nonstopux*) 5771edce3322Smrg if test yes = "$GCC"; then 5772edce3322Smrg _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' 57739f00f3a1Smrg # Try to use the -exported_symbol ld option, if it does not 57749f00f3a1Smrg # work, assume that -exports_file does not work either and 57759f00f3a1Smrg # implicitly export all symbols. 57769f00f3a1Smrg # This should be the same for all languages, so no per-tag cache variable. 57779f00f3a1Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 57789f00f3a1Smrg [lt_cv_irix_exported_symbol], 5779edce3322Smrg [save_LDFLAGS=$LDFLAGS 5780edce3322Smrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 57819f00f3a1Smrg AC_LINK_IFELSE( 57829f00f3a1Smrg [AC_LANG_SOURCE( 57839f00f3a1Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 57849f00f3a1Smrg [C++], [[int foo (void) { return 0; }]], 57859f00f3a1Smrg [Fortran 77], [[ 57869f00f3a1Smrg subroutine foo 57879f00f3a1Smrg end]], 57889f00f3a1Smrg [Fortran], [[ 57899f00f3a1Smrg subroutine foo 57909f00f3a1Smrg end]])])], 57919f00f3a1Smrg [lt_cv_irix_exported_symbol=yes], 57929f00f3a1Smrg [lt_cv_irix_exported_symbol=no]) 5793edce3322Smrg LDFLAGS=$save_LDFLAGS]) 5794edce3322Smrg if test yes = "$lt_cv_irix_exported_symbol"; then 5795edce3322Smrg _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' 57969f00f3a1Smrg fi 57979f00f3a1Smrg else 5798edce3322Smrg _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' 5799edce3322Smrg _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' 58009f00f3a1Smrg fi 58019f00f3a1Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5802edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 58039f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58049f00f3a1Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 58059f00f3a1Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 58069f00f3a1Smrg ;; 58079f00f3a1Smrg 5808edce3322Smrg linux*) 5809edce3322Smrg case $cc_basename in 5810edce3322Smrg tcc*) 5811edce3322Smrg # Fabrice Bellard et al's Tiny C Compiler 5812edce3322Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5813edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5814edce3322Smrg ;; 5815edce3322Smrg esac 5816edce3322Smrg ;; 5817edce3322Smrg 5818edce3322Smrg netbsd*) 58199f00f3a1Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 58209f00f3a1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 58219f00f3a1Smrg else 58229f00f3a1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 58239f00f3a1Smrg fi 58249f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 58259f00f3a1Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 58269f00f3a1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58279f00f3a1Smrg ;; 58289f00f3a1Smrg 58299f00f3a1Smrg newsos6) 58309f00f3a1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 58319f00f3a1Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5832edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 58339f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58349f00f3a1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58359f00f3a1Smrg ;; 58369f00f3a1Smrg 58379f00f3a1Smrg *nto* | *qnx*) 58389f00f3a1Smrg ;; 58399f00f3a1Smrg 5840edce3322Smrg openbsd* | bitrig*) 58419f00f3a1Smrg if test -f /usr/libexec/ld.so; then 58429f00f3a1Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 58439f00f3a1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58449f00f3a1Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5845edce3322Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 58469f00f3a1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5847edce3322Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 5848edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5849edce3322Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 58509f00f3a1Smrg else 5851edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5852edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 58539f00f3a1Smrg fi 58549f00f3a1Smrg else 58559f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 58569f00f3a1Smrg fi 58579f00f3a1Smrg ;; 58589f00f3a1Smrg 58599f00f3a1Smrg os2*) 58609f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 58619f00f3a1Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 58629f00f3a1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5863edce3322Smrg shrext_cmds=.dll 5864edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5865edce3322Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5866edce3322Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5867edce3322Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5868edce3322Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5869edce3322Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5870edce3322Smrg emximp -o $lib $output_objdir/$libname.def' 5871edce3322Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5872edce3322Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5873edce3322Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5874edce3322Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5875edce3322Smrg prefix_cmds="$SED"~ 5876edce3322Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 5877edce3322Smrg prefix_cmds="$prefix_cmds -e 1d"; 5878edce3322Smrg fi~ 5879edce3322Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5880edce3322Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5881edce3322Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5882edce3322Smrg emximp -o $lib $output_objdir/$libname.def' 5883edce3322Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5884edce3322Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 588574835918Smrg _LT_TAGVAR(file_list_spec, $1)='@' 58869f00f3a1Smrg ;; 58879f00f3a1Smrg 58889f00f3a1Smrg osf3*) 5889edce3322Smrg if test yes = "$GCC"; then 5890edce3322Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5891edce3322Smrg _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' 58929f00f3a1Smrg else 58939f00f3a1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5894edce3322Smrg _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' 58959f00f3a1Smrg fi 58969f00f3a1Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5897edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 58989f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58999f00f3a1Smrg ;; 59009f00f3a1Smrg 59019f00f3a1Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 5902edce3322Smrg if test yes = "$GCC"; then 5903edce3322Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5904edce3322Smrg _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' 5905edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 59069f00f3a1Smrg else 59079f00f3a1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5908edce3322Smrg _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' 59099f00f3a1Smrg _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~ 5910edce3322Smrg $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' 59119f00f3a1Smrg 59129f00f3a1Smrg # Both c and cxx compiler support -rpath directly 59139f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 59149f00f3a1Smrg fi 59159f00f3a1Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 59169f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 59179f00f3a1Smrg ;; 59189f00f3a1Smrg 59199f00f3a1Smrg solaris*) 59209f00f3a1Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5921edce3322Smrg if test yes = "$GCC"; then 5922edce3322Smrg wlarc='$wl' 5923edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 59249f00f3a1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5925edce3322Smrg $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' 59269f00f3a1Smrg else 59279f00f3a1Smrg case `$CC -V 2>&1` in 59289f00f3a1Smrg *"Compilers 5.0"*) 59299f00f3a1Smrg wlarc='' 5930edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 59319f00f3a1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5932edce3322Smrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 59339f00f3a1Smrg ;; 59349f00f3a1Smrg *) 5935edce3322Smrg wlarc='$wl' 5936edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 59379f00f3a1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5938edce3322Smrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 59399f00f3a1Smrg ;; 59409f00f3a1Smrg esac 59419f00f3a1Smrg fi 59429f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 59439f00f3a1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59449f00f3a1Smrg case $host_os in 59459f00f3a1Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 59469f00f3a1Smrg *) 59479f00f3a1Smrg # The compiler driver will combine and reorder linker options, 5948edce3322Smrg # but understands '-z linker_flag'. GCC discards it without '$wl', 59499f00f3a1Smrg # but is careful enough not to reorder. 59509f00f3a1Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 5951edce3322Smrg if test yes = "$GCC"; then 5952edce3322Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 59539f00f3a1Smrg else 59549f00f3a1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 59559f00f3a1Smrg fi 59569f00f3a1Smrg ;; 59579f00f3a1Smrg esac 59589f00f3a1Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 59599f00f3a1Smrg ;; 59609f00f3a1Smrg 59619f00f3a1Smrg sunos4*) 5962edce3322Smrg if test sequent = "$host_vendor"; then 59639f00f3a1Smrg # Use $CC to link under sequent, because it throws in some extra .o 59649f00f3a1Smrg # files that make .init and .fini sections work. 5965edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 59669f00f3a1Smrg else 59679f00f3a1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 59689f00f3a1Smrg fi 59699f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 59709f00f3a1Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 59719f00f3a1Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 59729f00f3a1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59739f00f3a1Smrg ;; 59749f00f3a1Smrg 59759f00f3a1Smrg sysv4) 59769f00f3a1Smrg case $host_vendor in 59779f00f3a1Smrg sni) 59789f00f3a1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 59799f00f3a1Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 59809f00f3a1Smrg ;; 59819f00f3a1Smrg siemens) 59829f00f3a1Smrg ## LD is ld it makes a PLAMLIB 59839f00f3a1Smrg ## CC just makes a GrossModule. 59849f00f3a1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 59859f00f3a1Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 59869f00f3a1Smrg _LT_TAGVAR(hardcode_direct, $1)=no 59879f00f3a1Smrg ;; 59889f00f3a1Smrg motorola) 59899f00f3a1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 59909f00f3a1Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 59919f00f3a1Smrg ;; 59929f00f3a1Smrg esac 59939f00f3a1Smrg runpath_var='LD_RUN_PATH' 59949f00f3a1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59959f00f3a1Smrg ;; 59969f00f3a1Smrg 59979f00f3a1Smrg sysv4.3*) 59989f00f3a1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 59999f00f3a1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60009f00f3a1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 60019f00f3a1Smrg ;; 60029f00f3a1Smrg 60039f00f3a1Smrg sysv4*MP*) 60049f00f3a1Smrg if test -d /usr/nec; then 60059f00f3a1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60069f00f3a1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60079f00f3a1Smrg runpath_var=LD_RUN_PATH 60089f00f3a1Smrg hardcode_runpath_var=yes 60099f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 60109f00f3a1Smrg fi 60119f00f3a1Smrg ;; 60129f00f3a1Smrg 60139f00f3a1Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6014edce3322Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 60159f00f3a1Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 60169f00f3a1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60179f00f3a1Smrg runpath_var='LD_RUN_PATH' 60189f00f3a1Smrg 6019edce3322Smrg if test yes = "$GCC"; then 6020edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6021edce3322Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60229f00f3a1Smrg else 6023edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6024edce3322Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60259f00f3a1Smrg fi 60269f00f3a1Smrg ;; 60279f00f3a1Smrg 60289f00f3a1Smrg sysv5* | sco3.2v5* | sco5v6*) 6029edce3322Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 60309f00f3a1Smrg # link with -lc, and that would cause any symbols used from libc to 60319f00f3a1Smrg # always be unresolved, which means just about no library would 60329f00f3a1Smrg # ever link correctly. If we're not using GNU ld we use -z text 60339f00f3a1Smrg # though, which does catch some bad symbols but isn't as heavy-handed 60349f00f3a1Smrg # as -z defs. 6035edce3322Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6036edce3322Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 60379f00f3a1Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 60389f00f3a1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6039edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 60409f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 60419f00f3a1Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6042edce3322Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 60439f00f3a1Smrg runpath_var='LD_RUN_PATH' 60449f00f3a1Smrg 6045edce3322Smrg if test yes = "$GCC"; then 6046edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6047edce3322Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60489f00f3a1Smrg else 6049edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6050edce3322Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60519f00f3a1Smrg fi 60529f00f3a1Smrg ;; 60539f00f3a1Smrg 60549f00f3a1Smrg uts4*) 60559f00f3a1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60569f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 60579f00f3a1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60589f00f3a1Smrg ;; 60599f00f3a1Smrg 60609f00f3a1Smrg *) 60619f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60629f00f3a1Smrg ;; 60639f00f3a1Smrg esac 60649f00f3a1Smrg 6065edce3322Smrg if test sni = "$host_vendor"; then 60669f00f3a1Smrg case $host in 60679f00f3a1Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6068edce3322Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 60699f00f3a1Smrg ;; 60709f00f3a1Smrg esac 60719f00f3a1Smrg fi 60729f00f3a1Smrg fi 60739f00f3a1Smrg]) 60749f00f3a1SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6075edce3322Smrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 60769f00f3a1Smrg 60779f00f3a1Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 60789f00f3a1Smrg 60799f00f3a1Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 60809f00f3a1Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 60819f00f3a1Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 60829f00f3a1Smrg [The commands to extract the exported symbol list from a shared archive]) 60839f00f3a1Smrg 60849f00f3a1Smrg# 60859f00f3a1Smrg# Do we need to explicitly link libc? 60869f00f3a1Smrg# 60879f00f3a1Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 60889f00f3a1Smrgx|xyes) 60899f00f3a1Smrg # Assume -lc should be added 60909f00f3a1Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 60919f00f3a1Smrg 6092edce3322Smrg if test yes,yes = "$GCC,$enable_shared"; then 60939f00f3a1Smrg case $_LT_TAGVAR(archive_cmds, $1) in 60949f00f3a1Smrg *'~'*) 60959f00f3a1Smrg # FIXME: we may have to deal with multi-command sequences. 60969f00f3a1Smrg ;; 60979f00f3a1Smrg '$CC '*) 60989f00f3a1Smrg # Test whether the compiler implicitly links with -lc since on some 60999f00f3a1Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 61009f00f3a1Smrg # to ld, don't add -lc before -lgcc. 61019f00f3a1Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 61029f00f3a1Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 61039f00f3a1Smrg [$RM conftest* 61049f00f3a1Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 61059f00f3a1Smrg 61069f00f3a1Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 61079f00f3a1Smrg soname=conftest 61089f00f3a1Smrg lib=conftest 61099f00f3a1Smrg libobjs=conftest.$ac_objext 61109f00f3a1Smrg deplibs= 61119f00f3a1Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 61129f00f3a1Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 61139f00f3a1Smrg compiler_flags=-v 61149f00f3a1Smrg linker_flags=-v 61159f00f3a1Smrg verstring= 61169f00f3a1Smrg output_objdir=. 61179f00f3a1Smrg libname=conftest 61189f00f3a1Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 61199f00f3a1Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 61209f00f3a1Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 61219f00f3a1Smrg then 61229f00f3a1Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 61239f00f3a1Smrg else 61249f00f3a1Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 61259f00f3a1Smrg fi 61269f00f3a1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 61279f00f3a1Smrg else 61289f00f3a1Smrg cat conftest.err 1>&5 61299f00f3a1Smrg fi 61309f00f3a1Smrg $RM conftest* 61319f00f3a1Smrg ]) 61329f00f3a1Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 61339f00f3a1Smrg ;; 61349f00f3a1Smrg esac 61359f00f3a1Smrg fi 61369f00f3a1Smrg ;; 61379f00f3a1Smrgesac 61389f00f3a1Smrg 61399f00f3a1Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 61409f00f3a1Smrg [Whether or not to add -lc for building shared libraries]) 61419f00f3a1Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 61429f00f3a1Smrg [enable_shared_with_static_runtimes], [0], 61439f00f3a1Smrg [Whether or not to disallow shared libs when runtime libs are static]) 61449f00f3a1Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 61459f00f3a1Smrg [Compiler flag to allow reflexive dlopens]) 61469f00f3a1Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 61479f00f3a1Smrg [Compiler flag to generate shared objects directly from archives]) 61489f00f3a1Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 61499f00f3a1Smrg [Whether the compiler copes with passing no objects directly]) 61509f00f3a1Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 61519f00f3a1Smrg [Create an old-style archive from a shared archive]) 61529f00f3a1Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 61539f00f3a1Smrg [Create a temporary old-style archive to link instead of a shared archive]) 61549f00f3a1Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 61559f00f3a1Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 61569f00f3a1Smrg_LT_TAGDECL([], [module_cmds], [2], 61579f00f3a1Smrg [Commands used to build a loadable module if different from building 61589f00f3a1Smrg a shared archive.]) 61599f00f3a1Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 61609f00f3a1Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 61619f00f3a1Smrg [Whether we are building with GNU ld or not]) 61629f00f3a1Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 61639f00f3a1Smrg [Flag that allows shared libraries with undefined symbols to be built]) 61649f00f3a1Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 61659f00f3a1Smrg [Flag that enforces no undefined symbols]) 61669f00f3a1Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 61679f00f3a1Smrg [Flag to hardcode $libdir into a binary during linking. 61689f00f3a1Smrg This must work even if $libdir does not exist]) 61699f00f3a1Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 61709f00f3a1Smrg [Whether we need a single "-rpath" flag with a separated argument]) 61719f00f3a1Smrg_LT_TAGDECL([], [hardcode_direct], [0], 6172edce3322Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 61739f00f3a1Smrg DIR into the resulting binary]) 61749f00f3a1Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6175edce3322Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 61769f00f3a1Smrg DIR into the resulting binary and the resulting library dependency is 6177edce3322Smrg "absolute", i.e impossible to change by setting $shlibpath_var if the 61789f00f3a1Smrg library is relocated]) 61799f00f3a1Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 61809f00f3a1Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 61819f00f3a1Smrg into the resulting binary]) 61829f00f3a1Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 61839f00f3a1Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 61849f00f3a1Smrg into the resulting binary]) 61859f00f3a1Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 61869f00f3a1Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 61879f00f3a1Smrg into the library and all subsequent libraries and executables linked 61889f00f3a1Smrg against it]) 61899f00f3a1Smrg_LT_TAGDECL([], [inherit_rpath], [0], 61909f00f3a1Smrg [Set to yes if linker adds runtime paths of dependent libraries 61919f00f3a1Smrg to runtime path list]) 61929f00f3a1Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 61939f00f3a1Smrg [Whether libtool must link a program against all its dependency libraries]) 61949f00f3a1Smrg_LT_TAGDECL([], [always_export_symbols], [0], 61959f00f3a1Smrg [Set to "yes" if exported symbols are required]) 61969f00f3a1Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 61979f00f3a1Smrg [The commands to list exported symbols]) 61989f00f3a1Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 61999f00f3a1Smrg [Symbols that should not be listed in the preloaded symbols]) 62009f00f3a1Smrg_LT_TAGDECL([], [include_expsyms], [1], 62019f00f3a1Smrg [Symbols that must always be exported]) 62029f00f3a1Smrg_LT_TAGDECL([], [prelink_cmds], [2], 62039f00f3a1Smrg [Commands necessary for linking programs (against libraries) with templates]) 62049f00f3a1Smrg_LT_TAGDECL([], [postlink_cmds], [2], 62059f00f3a1Smrg [Commands necessary for finishing linking programs]) 62069f00f3a1Smrg_LT_TAGDECL([], [file_list_spec], [1], 62079f00f3a1Smrg [Specify filename containing input files]) 62089f00f3a1Smrgdnl FIXME: Not yet implemented 62099f00f3a1Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 62109f00f3a1Smrgdnl [Compiler flag to generate thread safe objects]) 62119f00f3a1Smrg])# _LT_LINKER_SHLIBS 62129f00f3a1Smrg 62139f00f3a1Smrg 62149f00f3a1Smrg# _LT_LANG_C_CONFIG([TAG]) 62159f00f3a1Smrg# ------------------------ 62169f00f3a1Smrg# Ensure that the configuration variables for a C compiler are suitably 62179f00f3a1Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 6218edce3322Smrg# the compiler configuration to 'libtool'. 62199f00f3a1Smrgm4_defun([_LT_LANG_C_CONFIG], 62209f00f3a1Smrg[m4_require([_LT_DECL_EGREP])dnl 6221edce3322Smrglt_save_CC=$CC 62229f00f3a1SmrgAC_LANG_PUSH(C) 62239f00f3a1Smrg 62249f00f3a1Smrg# Source file extension for C test sources. 62259f00f3a1Smrgac_ext=c 62269f00f3a1Smrg 62279f00f3a1Smrg# Object file extension for compiled C test sources. 62289f00f3a1Smrgobjext=o 62299f00f3a1Smrg_LT_TAGVAR(objext, $1)=$objext 62309f00f3a1Smrg 62319f00f3a1Smrg# Code to be used in simple compile tests 62329f00f3a1Smrglt_simple_compile_test_code="int some_variable = 0;" 62339f00f3a1Smrg 62349f00f3a1Smrg# Code to be used in simple link tests 62359f00f3a1Smrglt_simple_link_test_code='int main(){return(0);}' 62369f00f3a1Smrg 62379f00f3a1Smrg_LT_TAG_COMPILER 62389f00f3a1Smrg# Save the default compiler, since it gets overwritten when the other 62399f00f3a1Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 62409f00f3a1Smrgcompiler_DEFAULT=$CC 62419f00f3a1Smrg 62429f00f3a1Smrg# save warnings/boilerplate of simple test code 62439f00f3a1Smrg_LT_COMPILER_BOILERPLATE 62449f00f3a1Smrg_LT_LINKER_BOILERPLATE 62459f00f3a1Smrg 62469f00f3a1Smrg## CAVEAT EMPTOR: 62479f00f3a1Smrg## There is no encapsulation within the following macros, do not change 62489f00f3a1Smrg## the running order or otherwise move them around unless you know exactly 62499f00f3a1Smrg## what you are doing... 62509f00f3a1Smrgif test -n "$compiler"; then 62519f00f3a1Smrg _LT_COMPILER_NO_RTTI($1) 62529f00f3a1Smrg _LT_COMPILER_PIC($1) 62539f00f3a1Smrg _LT_COMPILER_C_O($1) 62549f00f3a1Smrg _LT_COMPILER_FILE_LOCKS($1) 62559f00f3a1Smrg _LT_LINKER_SHLIBS($1) 62569f00f3a1Smrg _LT_SYS_DYNAMIC_LINKER($1) 62579f00f3a1Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 62589f00f3a1Smrg LT_SYS_DLOPEN_SELF 62599f00f3a1Smrg _LT_CMD_STRIPLIB 62609f00f3a1Smrg 6261edce3322Smrg # Report what library types will actually be built 62629f00f3a1Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 62639f00f3a1Smrg AC_MSG_RESULT([$can_build_shared]) 62649f00f3a1Smrg 62659f00f3a1Smrg AC_MSG_CHECKING([whether to build shared libraries]) 6266edce3322Smrg test no = "$can_build_shared" && enable_shared=no 62679f00f3a1Smrg 62689f00f3a1Smrg # On AIX, shared libraries and static libraries use the same namespace, and 62699f00f3a1Smrg # are all built from PIC. 62709f00f3a1Smrg case $host_os in 62719f00f3a1Smrg aix3*) 6272edce3322Smrg test yes = "$enable_shared" && enable_static=no 62739f00f3a1Smrg if test -n "$RANLIB"; then 62749f00f3a1Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 62759f00f3a1Smrg postinstall_cmds='$RANLIB $lib' 62769f00f3a1Smrg fi 62779f00f3a1Smrg ;; 62789f00f3a1Smrg 62799f00f3a1Smrg aix[[4-9]]*) 6280edce3322Smrg if test ia64 != "$host_cpu"; then 6281edce3322Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 6282edce3322Smrg yes,aix,yes) ;; # shared object as lib.so file only 6283edce3322Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 6284edce3322Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 6285edce3322Smrg esac 62869f00f3a1Smrg fi 62879f00f3a1Smrg ;; 62889f00f3a1Smrg esac 62899f00f3a1Smrg AC_MSG_RESULT([$enable_shared]) 62909f00f3a1Smrg 62919f00f3a1Smrg AC_MSG_CHECKING([whether to build static libraries]) 62929f00f3a1Smrg # Make sure either enable_shared or enable_static is yes. 6293edce3322Smrg test yes = "$enable_shared" || enable_static=yes 62949f00f3a1Smrg AC_MSG_RESULT([$enable_static]) 62959f00f3a1Smrg 62969f00f3a1Smrg _LT_CONFIG($1) 62979f00f3a1Smrgfi 62989f00f3a1SmrgAC_LANG_POP 6299edce3322SmrgCC=$lt_save_CC 63009f00f3a1Smrg])# _LT_LANG_C_CONFIG 63019f00f3a1Smrg 63029f00f3a1Smrg 63039f00f3a1Smrg# _LT_LANG_CXX_CONFIG([TAG]) 63049f00f3a1Smrg# -------------------------- 63059f00f3a1Smrg# Ensure that the configuration variables for a C++ compiler are suitably 63069f00f3a1Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 6307edce3322Smrg# the compiler configuration to 'libtool'. 63089f00f3a1Smrgm4_defun([_LT_LANG_CXX_CONFIG], 63099f00f3a1Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 63109f00f3a1Smrgm4_require([_LT_DECL_EGREP])dnl 63119f00f3a1Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 6312edce3322Smrgif test -n "$CXX" && ( test no != "$CXX" && 6313edce3322Smrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 6314edce3322Smrg (test g++ != "$CXX"))); then 63159f00f3a1Smrg AC_PROG_CXXCPP 63169f00f3a1Smrgelse 63179f00f3a1Smrg _lt_caught_CXX_error=yes 63189f00f3a1Smrgfi 63199f00f3a1Smrg 63209f00f3a1SmrgAC_LANG_PUSH(C++) 63219f00f3a1Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 63229f00f3a1Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 63239f00f3a1Smrg_LT_TAGVAR(always_export_symbols, $1)=no 63249f00f3a1Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 63259f00f3a1Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 63269f00f3a1Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 63279f00f3a1Smrg_LT_TAGVAR(hardcode_direct, $1)=no 63289f00f3a1Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 63299f00f3a1Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 63309f00f3a1Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 63319f00f3a1Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 63329f00f3a1Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 63339f00f3a1Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 63349f00f3a1Smrg_LT_TAGVAR(inherit_rpath, $1)=no 63359f00f3a1Smrg_LT_TAGVAR(module_cmds, $1)= 63369f00f3a1Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 63379f00f3a1Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 63389f00f3a1Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 63399f00f3a1Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 63409f00f3a1Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 63419f00f3a1Smrg_LT_TAGVAR(no_undefined_flag, $1)= 63429f00f3a1Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 63439f00f3a1Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 63449f00f3a1Smrg 63459f00f3a1Smrg# Source file extension for C++ test sources. 63469f00f3a1Smrgac_ext=cpp 63479f00f3a1Smrg 63489f00f3a1Smrg# Object file extension for compiled C++ test sources. 63499f00f3a1Smrgobjext=o 63509f00f3a1Smrg_LT_TAGVAR(objext, $1)=$objext 63519f00f3a1Smrg 63529f00f3a1Smrg# No sense in running all these tests if we already determined that 63539f00f3a1Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 63549f00f3a1Smrg# are currently assumed to apply to all compilers on this platform, 63559f00f3a1Smrg# and will be corrupted by setting them based on a non-working compiler. 6356edce3322Smrgif test yes != "$_lt_caught_CXX_error"; then 63579f00f3a1Smrg # Code to be used in simple compile tests 63589f00f3a1Smrg lt_simple_compile_test_code="int some_variable = 0;" 63599f00f3a1Smrg 63609f00f3a1Smrg # Code to be used in simple link tests 63619f00f3a1Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 63629f00f3a1Smrg 63639f00f3a1Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 63649f00f3a1Smrg _LT_TAG_COMPILER 63659f00f3a1Smrg 63669f00f3a1Smrg # save warnings/boilerplate of simple test code 63679f00f3a1Smrg _LT_COMPILER_BOILERPLATE 63689f00f3a1Smrg _LT_LINKER_BOILERPLATE 63699f00f3a1Smrg 63709f00f3a1Smrg # Allow CC to be a program name with arguments. 63719f00f3a1Smrg lt_save_CC=$CC 63729f00f3a1Smrg lt_save_CFLAGS=$CFLAGS 63739f00f3a1Smrg lt_save_LD=$LD 63749f00f3a1Smrg lt_save_GCC=$GCC 63759f00f3a1Smrg GCC=$GXX 63769f00f3a1Smrg lt_save_with_gnu_ld=$with_gnu_ld 63779f00f3a1Smrg lt_save_path_LD=$lt_cv_path_LD 63789f00f3a1Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 63799f00f3a1Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 63809f00f3a1Smrg else 63819f00f3a1Smrg $as_unset lt_cv_prog_gnu_ld 63829f00f3a1Smrg fi 63839f00f3a1Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 63849f00f3a1Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 63859f00f3a1Smrg else 63869f00f3a1Smrg $as_unset lt_cv_path_LD 63879f00f3a1Smrg fi 63889f00f3a1Smrg test -z "${LDCXX+set}" || LD=$LDCXX 63899f00f3a1Smrg CC=${CXX-"c++"} 63909f00f3a1Smrg CFLAGS=$CXXFLAGS 63919f00f3a1Smrg compiler=$CC 63929f00f3a1Smrg _LT_TAGVAR(compiler, $1)=$CC 63939f00f3a1Smrg _LT_CC_BASENAME([$compiler]) 63949f00f3a1Smrg 63959f00f3a1Smrg if test -n "$compiler"; then 63969f00f3a1Smrg # We don't want -fno-exception when compiling C++ code, so set the 63979f00f3a1Smrg # no_builtin_flag separately 6398edce3322Smrg if test yes = "$GXX"; then 63999f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 64009f00f3a1Smrg else 64019f00f3a1Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 64029f00f3a1Smrg fi 64039f00f3a1Smrg 6404edce3322Smrg if test yes = "$GXX"; then 64059f00f3a1Smrg # Set up default GNU C++ configuration 64069f00f3a1Smrg 64079f00f3a1Smrg LT_PATH_LD 64089f00f3a1Smrg 64099f00f3a1Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 64109f00f3a1Smrg # archiving commands below assume that GNU ld is being used. 6411edce3322Smrg if test yes = "$with_gnu_ld"; then 6412edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6413edce3322Smrg _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' 64149f00f3a1Smrg 6415edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6416edce3322Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 64179f00f3a1Smrg 64189f00f3a1Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 64199f00f3a1Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 64209f00f3a1Smrg # investigate it a little bit more. (MM) 6421edce3322Smrg wlarc='$wl' 64229f00f3a1Smrg 64239f00f3a1Smrg # ancient GNU ld didn't support --whole-archive et. al. 64249f00f3a1Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 64259f00f3a1Smrg $GREP 'no-whole-archive' > /dev/null; then 6426edce3322Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 64279f00f3a1Smrg else 64289f00f3a1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 64299f00f3a1Smrg fi 64309f00f3a1Smrg else 64319f00f3a1Smrg with_gnu_ld=no 64329f00f3a1Smrg wlarc= 64339f00f3a1Smrg 64349f00f3a1Smrg # A generic and very simple default shared library creation 64359f00f3a1Smrg # command for GNU C++ for the case where it uses the native 64369f00f3a1Smrg # linker, instead of GNU ld. If possible, this setting should 64379f00f3a1Smrg # overridden to take advantage of the native linker features on 64389f00f3a1Smrg # the platform it is being used on. 64399f00f3a1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 64409f00f3a1Smrg fi 64419f00f3a1Smrg 64429f00f3a1Smrg # Commands to make compiler produce verbose output that lists 64439f00f3a1Smrg # what "hidden" libraries, object files and flags are used when 64449f00f3a1Smrg # linking a shared library. 64459f00f3a1Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 64469f00f3a1Smrg 64479f00f3a1Smrg else 64489f00f3a1Smrg GXX=no 64499f00f3a1Smrg with_gnu_ld=no 64509f00f3a1Smrg wlarc= 64519f00f3a1Smrg fi 64529f00f3a1Smrg 64539f00f3a1Smrg # PORTME: fill in a description of your system's C++ link characteristics 64549f00f3a1Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 64559f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 64569f00f3a1Smrg case $host_os in 64579f00f3a1Smrg aix3*) 64589f00f3a1Smrg # FIXME: insert proper C++ library support 64599f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 64609f00f3a1Smrg ;; 64619f00f3a1Smrg aix[[4-9]]*) 6462edce3322Smrg if test ia64 = "$host_cpu"; then 64639f00f3a1Smrg # On IA64, the linker does run time linking by default, so we don't 64649f00f3a1Smrg # have to do anything special. 64659f00f3a1Smrg aix_use_runtimelinking=no 64669f00f3a1Smrg exp_sym_flag='-Bexport' 6467edce3322Smrg no_entry_flag= 64689f00f3a1Smrg else 64699f00f3a1Smrg aix_use_runtimelinking=no 64709f00f3a1Smrg 64719f00f3a1Smrg # Test if we are trying to use run time linking or normal 64729f00f3a1Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6473edce3322Smrg # have runtime linking enabled, and use it for executables. 6474edce3322Smrg # For shared libraries, we enable/disable runtime linking 6475edce3322Smrg # depending on the kind of the shared library created - 6476edce3322Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 6477edce3322Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 6478edce3322Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 6479edce3322Smrg # lib.a static archive 6480edce3322Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 6481edce3322Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 6482edce3322Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 6483edce3322Smrg # lib.a(lib.so.V) shared, rtl:no 6484edce3322Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 6485edce3322Smrg # lib.a static archive 64869f00f3a1Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 64879f00f3a1Smrg for ld_flag in $LDFLAGS; do 64889f00f3a1Smrg case $ld_flag in 64899f00f3a1Smrg *-brtl*) 64909f00f3a1Smrg aix_use_runtimelinking=yes 64919f00f3a1Smrg break 64929f00f3a1Smrg ;; 64939f00f3a1Smrg esac 64949f00f3a1Smrg done 6495edce3322Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 6496edce3322Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 6497edce3322Smrg # so we don't have lib.a shared libs to link our executables. 6498edce3322Smrg # We have to force runtime linking in this case. 6499edce3322Smrg aix_use_runtimelinking=yes 6500edce3322Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 6501edce3322Smrg fi 65029f00f3a1Smrg ;; 65039f00f3a1Smrg esac 65049f00f3a1Smrg 65059f00f3a1Smrg exp_sym_flag='-bexport' 65069f00f3a1Smrg no_entry_flag='-bnoentry' 65079f00f3a1Smrg fi 65089f00f3a1Smrg 65099f00f3a1Smrg # When large executables or shared objects are built, AIX ld can 65109f00f3a1Smrg # have problems creating the table of contents. If linking a library 65119f00f3a1Smrg # or program results in "error TOC overflow" add -mminimal-toc to 65129f00f3a1Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 65139f00f3a1Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 65149f00f3a1Smrg 65159f00f3a1Smrg _LT_TAGVAR(archive_cmds, $1)='' 65169f00f3a1Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 65179f00f3a1Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 65189f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 65199f00f3a1Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6520edce3322Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 6521edce3322Smrg case $with_aix_soname,$aix_use_runtimelinking in 6522edce3322Smrg aix,*) ;; # no import file 6523edce3322Smrg svr4,* | *,yes) # use import file 6524edce3322Smrg # The Import File defines what to hardcode. 6525edce3322Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6526edce3322Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 6527edce3322Smrg ;; 6528edce3322Smrg esac 65299f00f3a1Smrg 6530edce3322Smrg if test yes = "$GXX"; then 65319f00f3a1Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 65329f00f3a1Smrg # We only want to do this on AIX 4.2 and lower, the check 65339f00f3a1Smrg # below for broken collect2 doesn't work under 4.3+ 6534edce3322Smrg collect2name=`$CC -print-prog-name=collect2` 65359f00f3a1Smrg if test -f "$collect2name" && 65369f00f3a1Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 65379f00f3a1Smrg then 65389f00f3a1Smrg # We have reworked collect2 65399f00f3a1Smrg : 65409f00f3a1Smrg else 65419f00f3a1Smrg # We have old collect2 65429f00f3a1Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 65439f00f3a1Smrg # It fails to find uninstalled libraries when the uninstalled 65449f00f3a1Smrg # path is not listed in the libpath. Setting hardcode_minus_L 65459f00f3a1Smrg # to unsupported forces relinking 65469f00f3a1Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 65479f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 65489f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 65499f00f3a1Smrg fi 65509f00f3a1Smrg esac 65519f00f3a1Smrg shared_flag='-shared' 6552edce3322Smrg if test yes = "$aix_use_runtimelinking"; then 6553edce3322Smrg shared_flag=$shared_flag' $wl-G' 65549f00f3a1Smrg fi 6555edce3322Smrg # Need to ensure runtime linking is disabled for the traditional 6556edce3322Smrg # shared library, or the linker may eventually find shared libraries 6557edce3322Smrg # /with/ Import File - we do not want to mix them. 6558edce3322Smrg shared_flag_aix='-shared' 6559edce3322Smrg shared_flag_svr4='-shared $wl-G' 65609f00f3a1Smrg else 65619f00f3a1Smrg # not using gcc 6562edce3322Smrg if test ia64 = "$host_cpu"; then 65639f00f3a1Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 65649f00f3a1Smrg # chokes on -Wl,-G. The following line is correct: 65659f00f3a1Smrg shared_flag='-G' 65669f00f3a1Smrg else 6567edce3322Smrg if test yes = "$aix_use_runtimelinking"; then 6568edce3322Smrg shared_flag='$wl-G' 65699f00f3a1Smrg else 6570edce3322Smrg shared_flag='$wl-bM:SRE' 65719f00f3a1Smrg fi 6572edce3322Smrg shared_flag_aix='$wl-bM:SRE' 6573edce3322Smrg shared_flag_svr4='$wl-G' 65749f00f3a1Smrg fi 65759f00f3a1Smrg fi 65769f00f3a1Smrg 6577edce3322Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 65789f00f3a1Smrg # It seems that -bexpall does not export symbols beginning with 65799f00f3a1Smrg # underscore (_), so it is better to generate a list of symbols to 65809f00f3a1Smrg # export. 65819f00f3a1Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 6582edce3322Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 65839f00f3a1Smrg # Warning - without using the other runtime loading flags (-brtl), 65849f00f3a1Smrg # -berok will link without error, but may produce a broken library. 6585edce3322Smrg # The "-G" linker flag allows undefined symbols. 6586edce3322Smrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 65879f00f3a1Smrg # Determine the default libpath from the value encoded in an empty 65889f00f3a1Smrg # executable. 65899f00f3a1Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 6590edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 65919f00f3a1Smrg 6592edce3322Smrg _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 65939f00f3a1Smrg else 6594edce3322Smrg if test ia64 = "$host_cpu"; then 6595edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 65969f00f3a1Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6597edce3322Smrg _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" 65989f00f3a1Smrg else 65999f00f3a1Smrg # Determine the default libpath from the value encoded in an 66009f00f3a1Smrg # empty executable. 66019f00f3a1Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 6602edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 66039f00f3a1Smrg # Warning - without using the other run time loading flags, 66049f00f3a1Smrg # -berok will link without error, but may produce a broken library. 6605edce3322Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 6606edce3322Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 6607edce3322Smrg if test yes = "$with_gnu_ld"; then 66089f00f3a1Smrg # We only use this code for GNU lds that support --whole-archive. 6609edce3322Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 66109f00f3a1Smrg else 66119f00f3a1Smrg # Exported symbols can be pulled into shared objects from archives 66129f00f3a1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 66139f00f3a1Smrg fi 66149f00f3a1Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6615edce3322Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 6616edce3322Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 6617edce3322Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 6618edce3322Smrg if test svr4 != "$with_aix_soname"; then 6619edce3322Smrg # This is similar to how AIX traditionally builds its shared 6620edce3322Smrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 6621edce3322Smrg _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' 6622edce3322Smrg fi 6623edce3322Smrg if test aix != "$with_aix_soname"; then 6624edce3322Smrg _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' 6625edce3322Smrg else 6626edce3322Smrg # used by -dlpreopen to get the symbols 6627edce3322Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 6628edce3322Smrg fi 6629edce3322Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 66309f00f3a1Smrg fi 66319f00f3a1Smrg fi 66329f00f3a1Smrg ;; 66339f00f3a1Smrg 66349f00f3a1Smrg beos*) 66359f00f3a1Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 66369f00f3a1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 66379f00f3a1Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 66389f00f3a1Smrg # support --undefined. This deserves some investigation. FIXME 6639edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 66409f00f3a1Smrg else 66419f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66429f00f3a1Smrg fi 66439f00f3a1Smrg ;; 66449f00f3a1Smrg 66459f00f3a1Smrg chorus*) 66469f00f3a1Smrg case $cc_basename in 66479f00f3a1Smrg *) 66489f00f3a1Smrg # FIXME: insert proper C++ library support 66499f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66509f00f3a1Smrg ;; 66519f00f3a1Smrg esac 66529f00f3a1Smrg ;; 66539f00f3a1Smrg 66549f00f3a1Smrg cygwin* | mingw* | pw32* | cegcc*) 66559f00f3a1Smrg case $GXX,$cc_basename in 665674835918Smrg ,cl* | no,cl* | ,icl* | no,icl*) 665774835918Smrg # Native MSVC or ICC 66589f00f3a1Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 66599f00f3a1Smrg # no search path for DLLs. 66609f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 66619f00f3a1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 66629f00f3a1Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 66639f00f3a1Smrg _LT_TAGVAR(file_list_spec, $1)='@' 66649f00f3a1Smrg # Tell ltmain to make .lib files, not .a files. 66659f00f3a1Smrg libext=lib 66669f00f3a1Smrg # Tell ltmain to make .dll files, not .so files. 6667edce3322Smrg shrext_cmds=.dll 66689f00f3a1Smrg # FIXME: Setting linknames here is a bad hack. 6669edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 6670edce3322Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6671edce3322Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 6672edce3322Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 6673edce3322Smrg else 6674edce3322Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 6675edce3322Smrg fi~ 6676edce3322Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6677edce3322Smrg linknames=' 66789f00f3a1Smrg # The linker will not automatically build a static lib if we build a DLL. 66799f00f3a1Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 66809f00f3a1Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 66819f00f3a1Smrg # Don't use ranlib 66829f00f3a1Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 66839f00f3a1Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6684edce3322Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 6685edce3322Smrg case $lt_outputfile in 6686edce3322Smrg *.exe|*.EXE) ;; 6687edce3322Smrg *) 6688edce3322Smrg lt_outputfile=$lt_outputfile.exe 6689edce3322Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 6690edce3322Smrg ;; 6691edce3322Smrg esac~ 6692edce3322Smrg func_to_tool_file "$lt_outputfile"~ 6693edce3322Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 6694edce3322Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6695edce3322Smrg $RM "$lt_outputfile.manifest"; 6696edce3322Smrg fi' 66979f00f3a1Smrg ;; 66989f00f3a1Smrg *) 66999f00f3a1Smrg # g++ 67009f00f3a1Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 67019f00f3a1Smrg # as there is no search path for DLLs. 67029f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6703edce3322Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 67049f00f3a1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 67059f00f3a1Smrg _LT_TAGVAR(always_export_symbols, $1)=no 67069f00f3a1Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 67079f00f3a1Smrg 67089f00f3a1Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6709edce3322Smrg _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' 6710edce3322Smrg # If the export-symbols file already is a .def file, use it as 6711edce3322Smrg # is; otherwise, prepend EXPORTS... 6712edce3322Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6713edce3322Smrg cp $export_symbols $output_objdir/$soname.def; 6714edce3322Smrg else 6715edce3322Smrg echo EXPORTS > $output_objdir/$soname.def; 6716edce3322Smrg cat $export_symbols >> $output_objdir/$soname.def; 6717edce3322Smrg fi~ 6718edce3322Smrg $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' 67199f00f3a1Smrg else 67209f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67219f00f3a1Smrg fi 67229f00f3a1Smrg ;; 67239f00f3a1Smrg esac 67249f00f3a1Smrg ;; 67259f00f3a1Smrg darwin* | rhapsody*) 67269f00f3a1Smrg _LT_DARWIN_LINKER_FEATURES($1) 67279f00f3a1Smrg ;; 67289f00f3a1Smrg 6729edce3322Smrg os2*) 6730edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6731edce3322Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6732edce3322Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6733edce3322Smrg shrext_cmds=.dll 6734edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6735edce3322Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6736edce3322Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6737edce3322Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 6738edce3322Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 6739edce3322Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6740edce3322Smrg emximp -o $lib $output_objdir/$libname.def' 6741edce3322Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6742edce3322Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6743edce3322Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6744edce3322Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 6745edce3322Smrg prefix_cmds="$SED"~ 6746edce3322Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 6747edce3322Smrg prefix_cmds="$prefix_cmds -e 1d"; 6748edce3322Smrg fi~ 6749edce3322Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 6750edce3322Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 6751edce3322Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6752edce3322Smrg emximp -o $lib $output_objdir/$libname.def' 6753edce3322Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 6754edce3322Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 675574835918Smrg _LT_TAGVAR(file_list_spec, $1)='@' 6756edce3322Smrg ;; 6757edce3322Smrg 67589f00f3a1Smrg dgux*) 67599f00f3a1Smrg case $cc_basename in 67609f00f3a1Smrg ec++*) 67619f00f3a1Smrg # FIXME: insert proper C++ library support 67629f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67639f00f3a1Smrg ;; 67649f00f3a1Smrg ghcx*) 67659f00f3a1Smrg # Green Hills C++ Compiler 67669f00f3a1Smrg # FIXME: insert proper C++ library support 67679f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67689f00f3a1Smrg ;; 67699f00f3a1Smrg *) 67709f00f3a1Smrg # FIXME: insert proper C++ library support 67719f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67729f00f3a1Smrg ;; 67739f00f3a1Smrg esac 67749f00f3a1Smrg ;; 67759f00f3a1Smrg 67769f00f3a1Smrg freebsd2.*) 67779f00f3a1Smrg # C++ shared libraries reported to be fairly broken before 67789f00f3a1Smrg # switch to ELF 67799f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67809f00f3a1Smrg ;; 67819f00f3a1Smrg 67829f00f3a1Smrg freebsd-elf*) 67839f00f3a1Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 67849f00f3a1Smrg ;; 67859f00f3a1Smrg 678674835918Smrg freebsd* | dragonfly* | midnightbsd*) 67879f00f3a1Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 67889f00f3a1Smrg # conventions 67899f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 67909f00f3a1Smrg ;; 67919f00f3a1Smrg 67929f00f3a1Smrg haiku*) 6793edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 67949f00f3a1Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 67959f00f3a1Smrg ;; 67969f00f3a1Smrg 67979f00f3a1Smrg hpux9*) 6798edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 67999f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6800edce3322Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 68019f00f3a1Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 68029f00f3a1Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 68039f00f3a1Smrg # but as the default 68049f00f3a1Smrg # location of the library. 68059f00f3a1Smrg 68069f00f3a1Smrg case $cc_basename in 68079f00f3a1Smrg CC*) 68089f00f3a1Smrg # FIXME: insert proper C++ library support 68099f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68109f00f3a1Smrg ;; 68119f00f3a1Smrg aCC*) 6812edce3322Smrg _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' 68139f00f3a1Smrg # Commands to make compiler produce verbose output that lists 68149f00f3a1Smrg # what "hidden" libraries, object files and flags are used when 68159f00f3a1Smrg # linking a shared library. 68169f00f3a1Smrg # 68179f00f3a1Smrg # There doesn't appear to be a way to prevent this compiler from 68189f00f3a1Smrg # explicitly linking system object files so we need to strip them 68199f00f3a1Smrg # from the output so that they don't get included in the library 68209f00f3a1Smrg # dependencies. 6821edce3322Smrg 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"' 68229f00f3a1Smrg ;; 68239f00f3a1Smrg *) 6824edce3322Smrg if test yes = "$GXX"; then 6825edce3322Smrg _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' 68269f00f3a1Smrg else 68279f00f3a1Smrg # FIXME: insert proper C++ library support 68289f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68299f00f3a1Smrg fi 68309f00f3a1Smrg ;; 68319f00f3a1Smrg esac 68329f00f3a1Smrg ;; 68339f00f3a1Smrg 68349f00f3a1Smrg hpux10*|hpux11*) 6835edce3322Smrg if test no = "$with_gnu_ld"; then 6836edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 68379f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 68389f00f3a1Smrg 68399f00f3a1Smrg case $host_cpu in 68409f00f3a1Smrg hppa*64*|ia64*) 68419f00f3a1Smrg ;; 68429f00f3a1Smrg *) 6843edce3322Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 68449f00f3a1Smrg ;; 68459f00f3a1Smrg esac 68469f00f3a1Smrg fi 68479f00f3a1Smrg case $host_cpu in 68489f00f3a1Smrg hppa*64*|ia64*) 68499f00f3a1Smrg _LT_TAGVAR(hardcode_direct, $1)=no 68509f00f3a1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 68519f00f3a1Smrg ;; 68529f00f3a1Smrg *) 68539f00f3a1Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 68549f00f3a1Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 68559f00f3a1Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 68569f00f3a1Smrg # but as the default 68579f00f3a1Smrg # location of the library. 68589f00f3a1Smrg ;; 68599f00f3a1Smrg esac 68609f00f3a1Smrg 68619f00f3a1Smrg case $cc_basename in 68629f00f3a1Smrg CC*) 68639f00f3a1Smrg # FIXME: insert proper C++ library support 68649f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68659f00f3a1Smrg ;; 68669f00f3a1Smrg aCC*) 68679f00f3a1Smrg case $host_cpu in 68689f00f3a1Smrg hppa*64*) 6869edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 68709f00f3a1Smrg ;; 68719f00f3a1Smrg ia64*) 6872edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 68739f00f3a1Smrg ;; 68749f00f3a1Smrg *) 6875edce3322Smrg _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' 68769f00f3a1Smrg ;; 68779f00f3a1Smrg esac 68789f00f3a1Smrg # Commands to make compiler produce verbose output that lists 68799f00f3a1Smrg # what "hidden" libraries, object files and flags are used when 68809f00f3a1Smrg # linking a shared library. 68819f00f3a1Smrg # 68829f00f3a1Smrg # There doesn't appear to be a way to prevent this compiler from 68839f00f3a1Smrg # explicitly linking system object files so we need to strip them 68849f00f3a1Smrg # from the output so that they don't get included in the library 68859f00f3a1Smrg # dependencies. 6886edce3322Smrg 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"' 68879f00f3a1Smrg ;; 68889f00f3a1Smrg *) 6889edce3322Smrg if test yes = "$GXX"; then 6890edce3322Smrg if test no = "$with_gnu_ld"; then 68919f00f3a1Smrg case $host_cpu in 68929f00f3a1Smrg hppa*64*) 6893edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 68949f00f3a1Smrg ;; 68959f00f3a1Smrg ia64*) 6896edce3322Smrg _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' 68979f00f3a1Smrg ;; 68989f00f3a1Smrg *) 6899edce3322Smrg _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' 69009f00f3a1Smrg ;; 69019f00f3a1Smrg esac 69029f00f3a1Smrg fi 69039f00f3a1Smrg else 69049f00f3a1Smrg # FIXME: insert proper C++ library support 69059f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 69069f00f3a1Smrg fi 69079f00f3a1Smrg ;; 69089f00f3a1Smrg esac 69099f00f3a1Smrg ;; 69109f00f3a1Smrg 69119f00f3a1Smrg interix[[3-9]]*) 69129f00f3a1Smrg _LT_TAGVAR(hardcode_direct, $1)=no 69139f00f3a1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6914edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6915edce3322Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 69169f00f3a1Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 69179f00f3a1Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 69189f00f3a1Smrg # default) and relocated if they conflict, which is a slow very memory 69199f00f3a1Smrg # consuming and fragmenting process. To avoid this, we pick a random, 69209f00f3a1Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 69219f00f3a1Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6922edce3322Smrg _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' 692374835918Smrg _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' 69249f00f3a1Smrg ;; 69259f00f3a1Smrg irix5* | irix6*) 69269f00f3a1Smrg case $cc_basename in 69279f00f3a1Smrg CC*) 69289f00f3a1Smrg # SGI C++ 6929edce3322Smrg _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' 69309f00f3a1Smrg 69319f00f3a1Smrg # Archives containing C++ object files must be created using 69329f00f3a1Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 69339f00f3a1Smrg # necessary to make sure instantiated templates are included 69349f00f3a1Smrg # in the archive. 69359f00f3a1Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 69369f00f3a1Smrg ;; 69379f00f3a1Smrg *) 6938edce3322Smrg if test yes = "$GXX"; then 6939edce3322Smrg if test no = "$with_gnu_ld"; then 6940edce3322Smrg _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' 69419f00f3a1Smrg else 6942edce3322Smrg _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' 69439f00f3a1Smrg fi 69449f00f3a1Smrg fi 69459f00f3a1Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 69469f00f3a1Smrg ;; 69479f00f3a1Smrg esac 6948edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 69499f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 69509f00f3a1Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 69519f00f3a1Smrg ;; 69529f00f3a1Smrg 69539f00f3a1Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 69549f00f3a1Smrg case $cc_basename in 69559f00f3a1Smrg KCC*) 69569f00f3a1Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 69579f00f3a1Smrg 69589f00f3a1Smrg # KCC will only create a shared library if the output file 69599f00f3a1Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 69609f00f3a1Smrg # to its proper name (with version) after linking. 6961edce3322Smrg _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' 6962edce3322Smrg _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' 69639f00f3a1Smrg # Commands to make compiler produce verbose output that lists 69649f00f3a1Smrg # what "hidden" libraries, object files and flags are used when 69659f00f3a1Smrg # linking a shared library. 69669f00f3a1Smrg # 69679f00f3a1Smrg # There doesn't appear to be a way to prevent this compiler from 69689f00f3a1Smrg # explicitly linking system object files so we need to strip them 69699f00f3a1Smrg # from the output so that they don't get included in the library 69709f00f3a1Smrg # dependencies. 6971edce3322Smrg 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"' 69729f00f3a1Smrg 6973edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6974edce3322Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 69759f00f3a1Smrg 69769f00f3a1Smrg # Archives containing C++ object files must be created using 69779f00f3a1Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 69789f00f3a1Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 69799f00f3a1Smrg ;; 69809f00f3a1Smrg icpc* | ecpc* ) 69819f00f3a1Smrg # Intel C++ 69829f00f3a1Smrg with_gnu_ld=yes 69839f00f3a1Smrg # version 8.0 and above of icpc choke on multiply defined symbols 69849f00f3a1Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 69859f00f3a1Smrg # earlier do not add the objects themselves. 69869f00f3a1Smrg case `$CC -V 2>&1` in 69879f00f3a1Smrg *"Version 7."*) 6988edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6989edce3322Smrg _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' 69909f00f3a1Smrg ;; 69919f00f3a1Smrg *) # Version 8.0 or newer 69929f00f3a1Smrg tmp_idyn= 69939f00f3a1Smrg case $host_cpu in 69949f00f3a1Smrg ia64*) tmp_idyn=' -i_dynamic';; 69959f00f3a1Smrg esac 6996edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6997edce3322Smrg _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' 69989f00f3a1Smrg ;; 69999f00f3a1Smrg esac 70009f00f3a1Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7001edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7002edce3322Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7003edce3322Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 70049f00f3a1Smrg ;; 70059f00f3a1Smrg pgCC* | pgcpp*) 70069f00f3a1Smrg # Portland Group C++ compiler 70079f00f3a1Smrg case `$CC -V` in 70089f00f3a1Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 70099f00f3a1Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 7010edce3322Smrg rm -rf $tpldir~ 7011edce3322Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 7012edce3322Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 70139f00f3a1Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 7014edce3322Smrg rm -rf $tpldir~ 7015edce3322Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 7016edce3322Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 7017edce3322Smrg $RANLIB $oldlib' 70189f00f3a1Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 7019edce3322Smrg rm -rf $tpldir~ 7020edce3322Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7021edce3322Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 70229f00f3a1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 7023edce3322Smrg rm -rf $tpldir~ 7024edce3322Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7025edce3322Smrg $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' 70269f00f3a1Smrg ;; 70279f00f3a1Smrg *) # Version 6 and above use weak symbols 7028edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7029edce3322Smrg _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' 70309f00f3a1Smrg ;; 70319f00f3a1Smrg esac 70329f00f3a1Smrg 7033edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 7034edce3322Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7035edce3322Smrg _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' 70369f00f3a1Smrg ;; 70379f00f3a1Smrg cxx*) 70389f00f3a1Smrg # Compaq C++ 7039edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7040edce3322Smrg _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' 70419f00f3a1Smrg 70429f00f3a1Smrg runpath_var=LD_RUN_PATH 70439f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 70449f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 70459f00f3a1Smrg 70469f00f3a1Smrg # Commands to make compiler produce verbose output that lists 70479f00f3a1Smrg # what "hidden" libraries, object files and flags are used when 70489f00f3a1Smrg # linking a shared library. 70499f00f3a1Smrg # 70509f00f3a1Smrg # There doesn't appear to be a way to prevent this compiler from 70519f00f3a1Smrg # explicitly linking system object files so we need to strip them 70529f00f3a1Smrg # from the output so that they don't get included in the library 70539f00f3a1Smrg # dependencies. 7054edce3322Smrg 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' 70559f00f3a1Smrg ;; 70569f00f3a1Smrg xl* | mpixl* | bgxl*) 70579f00f3a1Smrg # IBM XL 8.0 on PPC, with GNU ld 7058edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7059edce3322Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7060edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7061edce3322Smrg if test yes = "$supports_anon_versioning"; then 70629f00f3a1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 706374835918Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7064edce3322Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 7065edce3322Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 70669f00f3a1Smrg fi 70679f00f3a1Smrg ;; 70689f00f3a1Smrg *) 706974835918Smrg case `$CC -V 2>&1 | $SED 5q` in 70709f00f3a1Smrg *Sun\ C*) 70719f00f3a1Smrg # Sun C++ 5.9 70729f00f3a1Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7073edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7074edce3322Smrg _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' 70759f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7076edce3322Smrg _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' 70779f00f3a1Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 70789f00f3a1Smrg 70799f00f3a1Smrg # Not sure whether something based on 70809f00f3a1Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 70819f00f3a1Smrg # would be better. 70829f00f3a1Smrg output_verbose_link_cmd='func_echo_all' 70839f00f3a1Smrg 70849f00f3a1Smrg # Archives containing C++ object files must be created using 70859f00f3a1Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 70869f00f3a1Smrg # necessary to make sure instantiated templates are included 70879f00f3a1Smrg # in the archive. 70889f00f3a1Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 70899f00f3a1Smrg ;; 70909f00f3a1Smrg esac 70919f00f3a1Smrg ;; 70929f00f3a1Smrg esac 70939f00f3a1Smrg ;; 70949f00f3a1Smrg 70959f00f3a1Smrg lynxos*) 70969f00f3a1Smrg # FIXME: insert proper C++ library support 70979f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 70989f00f3a1Smrg ;; 70999f00f3a1Smrg 71009f00f3a1Smrg m88k*) 71019f00f3a1Smrg # FIXME: insert proper C++ library support 71029f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71039f00f3a1Smrg ;; 71049f00f3a1Smrg 71059f00f3a1Smrg mvs*) 71069f00f3a1Smrg case $cc_basename in 71079f00f3a1Smrg cxx*) 71089f00f3a1Smrg # FIXME: insert proper C++ library support 71099f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71109f00f3a1Smrg ;; 71119f00f3a1Smrg *) 71129f00f3a1Smrg # FIXME: insert proper C++ library support 71139f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71149f00f3a1Smrg ;; 71159f00f3a1Smrg esac 71169f00f3a1Smrg ;; 71179f00f3a1Smrg 71189f00f3a1Smrg netbsd*) 71199f00f3a1Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 71209f00f3a1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 71219f00f3a1Smrg wlarc= 71229f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 71239f00f3a1Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 71249f00f3a1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 71259f00f3a1Smrg fi 71269f00f3a1Smrg # Workaround some broken pre-1.5 toolchains 71279f00f3a1Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 71289f00f3a1Smrg ;; 71299f00f3a1Smrg 71309f00f3a1Smrg *nto* | *qnx*) 71319f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 71329f00f3a1Smrg ;; 71339f00f3a1Smrg 7134edce3322Smrg openbsd* | bitrig*) 71359f00f3a1Smrg if test -f /usr/libexec/ld.so; then 71369f00f3a1Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 71379f00f3a1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 71389f00f3a1Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 71399f00f3a1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7140edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7141edce3322Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 7142edce3322Smrg _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' 7143edce3322Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 7144edce3322Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 71459f00f3a1Smrg fi 71469f00f3a1Smrg output_verbose_link_cmd=func_echo_all 71479f00f3a1Smrg else 71489f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71499f00f3a1Smrg fi 71509f00f3a1Smrg ;; 71519f00f3a1Smrg 71529f00f3a1Smrg osf3* | osf4* | osf5*) 71539f00f3a1Smrg case $cc_basename in 71549f00f3a1Smrg KCC*) 71559f00f3a1Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 71569f00f3a1Smrg 71579f00f3a1Smrg # KCC will only create a shared library if the output file 71589f00f3a1Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 71599f00f3a1Smrg # to its proper name (with version) after linking. 7160edce3322Smrg _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' 71619f00f3a1Smrg 7162edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 71639f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 71649f00f3a1Smrg 71659f00f3a1Smrg # Archives containing C++ object files must be created using 71669f00f3a1Smrg # the KAI C++ compiler. 71679f00f3a1Smrg case $host in 71689f00f3a1Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 71699f00f3a1Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 71709f00f3a1Smrg esac 71719f00f3a1Smrg ;; 71729f00f3a1Smrg RCC*) 71739f00f3a1Smrg # Rational C++ 2.4.1 71749f00f3a1Smrg # FIXME: insert proper C++ library support 71759f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71769f00f3a1Smrg ;; 71779f00f3a1Smrg cxx*) 71789f00f3a1Smrg case $host in 71799f00f3a1Smrg osf3*) 7180edce3322Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7181edce3322Smrg _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' 7182edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 71839f00f3a1Smrg ;; 71849f00f3a1Smrg *) 71859f00f3a1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7186edce3322Smrg _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' 71879f00f3a1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7188edce3322Smrg echo "-hidden">> $lib.exp~ 7189edce3322Smrg $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~ 7190edce3322Smrg $RM $lib.exp' 71919f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 71929f00f3a1Smrg ;; 71939f00f3a1Smrg esac 71949f00f3a1Smrg 71959f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 71969f00f3a1Smrg 71979f00f3a1Smrg # Commands to make compiler produce verbose output that lists 71989f00f3a1Smrg # what "hidden" libraries, object files and flags are used when 71999f00f3a1Smrg # linking a shared library. 72009f00f3a1Smrg # 72019f00f3a1Smrg # There doesn't appear to be a way to prevent this compiler from 72029f00f3a1Smrg # explicitly linking system object files so we need to strip them 72039f00f3a1Smrg # from the output so that they don't get included in the library 72049f00f3a1Smrg # dependencies. 7205edce3322Smrg 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"' 72069f00f3a1Smrg ;; 72079f00f3a1Smrg *) 7208edce3322Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 7209edce3322Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 72109f00f3a1Smrg case $host in 72119f00f3a1Smrg osf3*) 7212edce3322Smrg _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' 72139f00f3a1Smrg ;; 72149f00f3a1Smrg *) 7215edce3322Smrg _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' 72169f00f3a1Smrg ;; 72179f00f3a1Smrg esac 72189f00f3a1Smrg 7219edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 72209f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 72219f00f3a1Smrg 72229f00f3a1Smrg # Commands to make compiler produce verbose output that lists 72239f00f3a1Smrg # what "hidden" libraries, object files and flags are used when 72249f00f3a1Smrg # linking a shared library. 72259f00f3a1Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 72269f00f3a1Smrg 72279f00f3a1Smrg else 72289f00f3a1Smrg # FIXME: insert proper C++ library support 72299f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72309f00f3a1Smrg fi 72319f00f3a1Smrg ;; 72329f00f3a1Smrg esac 72339f00f3a1Smrg ;; 72349f00f3a1Smrg 72359f00f3a1Smrg psos*) 72369f00f3a1Smrg # FIXME: insert proper C++ library support 72379f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72389f00f3a1Smrg ;; 72399f00f3a1Smrg 72409f00f3a1Smrg sunos4*) 72419f00f3a1Smrg case $cc_basename in 72429f00f3a1Smrg CC*) 72439f00f3a1Smrg # Sun C++ 4.x 72449f00f3a1Smrg # FIXME: insert proper C++ library support 72459f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72469f00f3a1Smrg ;; 72479f00f3a1Smrg lcc*) 72489f00f3a1Smrg # Lucid 72499f00f3a1Smrg # FIXME: insert proper C++ library support 72509f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72519f00f3a1Smrg ;; 72529f00f3a1Smrg *) 72539f00f3a1Smrg # FIXME: insert proper C++ library support 72549f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72559f00f3a1Smrg ;; 72569f00f3a1Smrg esac 72579f00f3a1Smrg ;; 72589f00f3a1Smrg 72599f00f3a1Smrg solaris*) 72609f00f3a1Smrg case $cc_basename in 72619f00f3a1Smrg CC* | sunCC*) 72629f00f3a1Smrg # Sun C++ 4.2, 5.x and Centerline C++ 72639f00f3a1Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 72649f00f3a1Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7265edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 72669f00f3a1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7267edce3322Smrg $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' 72689f00f3a1Smrg 72699f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 72709f00f3a1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 72719f00f3a1Smrg case $host_os in 72729f00f3a1Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 72739f00f3a1Smrg *) 72749f00f3a1Smrg # The compiler driver will combine and reorder linker options, 7275edce3322Smrg # but understands '-z linker_flag'. 72769f00f3a1Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 72779f00f3a1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 72789f00f3a1Smrg ;; 72799f00f3a1Smrg esac 72809f00f3a1Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 72819f00f3a1Smrg 72829f00f3a1Smrg output_verbose_link_cmd='func_echo_all' 72839f00f3a1Smrg 72849f00f3a1Smrg # Archives containing C++ object files must be created using 72859f00f3a1Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 72869f00f3a1Smrg # necessary to make sure instantiated templates are included 72879f00f3a1Smrg # in the archive. 72889f00f3a1Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 72899f00f3a1Smrg ;; 72909f00f3a1Smrg gcx*) 72919f00f3a1Smrg # Green Hills C++ Compiler 7292edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 72939f00f3a1Smrg 72949f00f3a1Smrg # The C++ compiler must be used to create the archive. 72959f00f3a1Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 72969f00f3a1Smrg ;; 72979f00f3a1Smrg *) 72989f00f3a1Smrg # GNU C++ compiler with Solaris linker 7299edce3322Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 7300edce3322Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 73019f00f3a1Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7302edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 73039f00f3a1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7304edce3322Smrg $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' 73059f00f3a1Smrg 73069f00f3a1Smrg # Commands to make compiler produce verbose output that lists 73079f00f3a1Smrg # what "hidden" libraries, object files and flags are used when 73089f00f3a1Smrg # linking a shared library. 73099f00f3a1Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 73109f00f3a1Smrg else 7311edce3322Smrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 73129f00f3a1Smrg # platform. 7313edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 73149f00f3a1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7315edce3322Smrg $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' 73169f00f3a1Smrg 73179f00f3a1Smrg # Commands to make compiler produce verbose output that lists 73189f00f3a1Smrg # what "hidden" libraries, object files and flags are used when 73199f00f3a1Smrg # linking a shared library. 73209f00f3a1Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 73219f00f3a1Smrg fi 73229f00f3a1Smrg 7323edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 73249f00f3a1Smrg case $host_os in 73259f00f3a1Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 73269f00f3a1Smrg *) 7327edce3322Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 73289f00f3a1Smrg ;; 73299f00f3a1Smrg esac 73309f00f3a1Smrg fi 73319f00f3a1Smrg ;; 73329f00f3a1Smrg esac 73339f00f3a1Smrg ;; 73349f00f3a1Smrg 73359f00f3a1Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7336edce3322Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 73379f00f3a1Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 73389f00f3a1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 73399f00f3a1Smrg runpath_var='LD_RUN_PATH' 73409f00f3a1Smrg 73419f00f3a1Smrg case $cc_basename in 73429f00f3a1Smrg CC*) 7343edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7344edce3322Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73459f00f3a1Smrg ;; 73469f00f3a1Smrg *) 7347edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7348edce3322Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73499f00f3a1Smrg ;; 73509f00f3a1Smrg esac 73519f00f3a1Smrg ;; 73529f00f3a1Smrg 73539f00f3a1Smrg sysv5* | sco3.2v5* | sco5v6*) 7354edce3322Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 73559f00f3a1Smrg # link with -lc, and that would cause any symbols used from libc to 73569f00f3a1Smrg # always be unresolved, which means just about no library would 73579f00f3a1Smrg # ever link correctly. If we're not using GNU ld we use -z text 73589f00f3a1Smrg # though, which does catch some bad symbols but isn't as heavy-handed 73599f00f3a1Smrg # as -z defs. 7360edce3322Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7361edce3322Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 73629f00f3a1Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 73639f00f3a1Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7364edce3322Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 73659f00f3a1Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 73669f00f3a1Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7367edce3322Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 73689f00f3a1Smrg runpath_var='LD_RUN_PATH' 73699f00f3a1Smrg 73709f00f3a1Smrg case $cc_basename in 73719f00f3a1Smrg CC*) 7372edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7373edce3322Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73749f00f3a1Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 7375edce3322Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 73769f00f3a1Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 7377edce3322Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 73789f00f3a1Smrg ;; 73799f00f3a1Smrg *) 7380edce3322Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7381edce3322Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73829f00f3a1Smrg ;; 73839f00f3a1Smrg esac 73849f00f3a1Smrg ;; 73859f00f3a1Smrg 73869f00f3a1Smrg tandem*) 73879f00f3a1Smrg case $cc_basename in 73889f00f3a1Smrg NCC*) 73899f00f3a1Smrg # NonStop-UX NCC 3.20 73909f00f3a1Smrg # FIXME: insert proper C++ library support 73919f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73929f00f3a1Smrg ;; 73939f00f3a1Smrg *) 73949f00f3a1Smrg # FIXME: insert proper C++ library support 73959f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73969f00f3a1Smrg ;; 73979f00f3a1Smrg esac 73989f00f3a1Smrg ;; 73999f00f3a1Smrg 74009f00f3a1Smrg vxworks*) 74019f00f3a1Smrg # FIXME: insert proper C++ library support 74029f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74039f00f3a1Smrg ;; 74049f00f3a1Smrg 74059f00f3a1Smrg *) 74069f00f3a1Smrg # FIXME: insert proper C++ library support 74079f00f3a1Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74089f00f3a1Smrg ;; 74099f00f3a1Smrg esac 74109f00f3a1Smrg 74119f00f3a1Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7412edce3322Smrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 74139f00f3a1Smrg 7414edce3322Smrg _LT_TAGVAR(GCC, $1)=$GXX 7415edce3322Smrg _LT_TAGVAR(LD, $1)=$LD 74169f00f3a1Smrg 74179f00f3a1Smrg ## CAVEAT EMPTOR: 74189f00f3a1Smrg ## There is no encapsulation within the following macros, do not change 74199f00f3a1Smrg ## the running order or otherwise move them around unless you know exactly 74209f00f3a1Smrg ## what you are doing... 74219f00f3a1Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 74229f00f3a1Smrg _LT_COMPILER_PIC($1) 74239f00f3a1Smrg _LT_COMPILER_C_O($1) 74249f00f3a1Smrg _LT_COMPILER_FILE_LOCKS($1) 74259f00f3a1Smrg _LT_LINKER_SHLIBS($1) 74269f00f3a1Smrg _LT_SYS_DYNAMIC_LINKER($1) 74279f00f3a1Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 74289f00f3a1Smrg 74299f00f3a1Smrg _LT_CONFIG($1) 74309f00f3a1Smrg fi # test -n "$compiler" 74319f00f3a1Smrg 74329f00f3a1Smrg CC=$lt_save_CC 74339f00f3a1Smrg CFLAGS=$lt_save_CFLAGS 74349f00f3a1Smrg LDCXX=$LD 74359f00f3a1Smrg LD=$lt_save_LD 74369f00f3a1Smrg GCC=$lt_save_GCC 74379f00f3a1Smrg with_gnu_ld=$lt_save_with_gnu_ld 74389f00f3a1Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 74399f00f3a1Smrg lt_cv_path_LD=$lt_save_path_LD 74409f00f3a1Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 74419f00f3a1Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 7442edce3322Smrgfi # test yes != "$_lt_caught_CXX_error" 74439f00f3a1Smrg 74449f00f3a1SmrgAC_LANG_POP 74459f00f3a1Smrg])# _LT_LANG_CXX_CONFIG 74469f00f3a1Smrg 74479f00f3a1Smrg 74489f00f3a1Smrg# _LT_FUNC_STRIPNAME_CNF 74499f00f3a1Smrg# ---------------------- 74509f00f3a1Smrg# func_stripname_cnf prefix suffix name 74519f00f3a1Smrg# strip PREFIX and SUFFIX off of NAME. 74529f00f3a1Smrg# PREFIX and SUFFIX must not contain globbing or regex special 74539f00f3a1Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 74549f00f3a1Smrg# dot (in which case that matches only a dot). 74559f00f3a1Smrg# 74569f00f3a1Smrg# This function is identical to the (non-XSI) version of func_stripname, 74579f00f3a1Smrg# except this one can be used by m4 code that may be executed by configure, 74589f00f3a1Smrg# rather than the libtool script. 74599f00f3a1Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 74609f00f3a1SmrgAC_REQUIRE([_LT_DECL_SED]) 74619f00f3a1SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 74629f00f3a1Smrgfunc_stripname_cnf () 74639f00f3a1Smrg{ 7464edce3322Smrg case @S|@2 in 7465edce3322Smrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 7466edce3322Smrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 74679f00f3a1Smrg esac 74689f00f3a1Smrg} # func_stripname_cnf 74699f00f3a1Smrg])# _LT_FUNC_STRIPNAME_CNF 74709f00f3a1Smrg 7471edce3322Smrg 74729f00f3a1Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 74739f00f3a1Smrg# --------------------------------- 74749f00f3a1Smrg# Figure out "hidden" library dependencies from verbose 74759f00f3a1Smrg# compiler output when linking a shared library. 74769f00f3a1Smrg# Parse the compiler output and extract the necessary 74779f00f3a1Smrg# objects, libraries and library flags. 74789f00f3a1Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 74799f00f3a1Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 74809f00f3a1SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 74819f00f3a1Smrg# Dependencies to place before and after the object being linked: 74829f00f3a1Smrg_LT_TAGVAR(predep_objects, $1)= 74839f00f3a1Smrg_LT_TAGVAR(postdep_objects, $1)= 74849f00f3a1Smrg_LT_TAGVAR(predeps, $1)= 74859f00f3a1Smrg_LT_TAGVAR(postdeps, $1)= 74869f00f3a1Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 74879f00f3a1Smrg 74889f00f3a1Smrgdnl we can't use the lt_simple_compile_test_code here, 74899f00f3a1Smrgdnl because it contains code intended for an executable, 74909f00f3a1Smrgdnl not a library. It's possible we should let each 74919f00f3a1Smrgdnl tag define a new lt_????_link_test_code variable, 74929f00f3a1Smrgdnl but it's only used here... 74939f00f3a1Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 74949f00f3a1Smrgint a; 74959f00f3a1Smrgvoid foo (void) { a = 0; } 74969f00f3a1Smrg_LT_EOF 74979f00f3a1Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 74989f00f3a1Smrgclass Foo 74999f00f3a1Smrg{ 75009f00f3a1Smrgpublic: 75019f00f3a1Smrg Foo (void) { a = 0; } 75029f00f3a1Smrgprivate: 75039f00f3a1Smrg int a; 75049f00f3a1Smrg}; 75059f00f3a1Smrg_LT_EOF 75069f00f3a1Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 75079f00f3a1Smrg subroutine foo 75089f00f3a1Smrg implicit none 75099f00f3a1Smrg integer*4 a 75109f00f3a1Smrg a=0 75119f00f3a1Smrg return 75129f00f3a1Smrg end 75139f00f3a1Smrg_LT_EOF 75149f00f3a1Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 75159f00f3a1Smrg subroutine foo 75169f00f3a1Smrg implicit none 75179f00f3a1Smrg integer a 75189f00f3a1Smrg a=0 75199f00f3a1Smrg return 75209f00f3a1Smrg end 75219f00f3a1Smrg_LT_EOF 75229f00f3a1Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 75239f00f3a1Smrgpublic class foo { 75249f00f3a1Smrg private int a; 75259f00f3a1Smrg public void bar (void) { 75269f00f3a1Smrg a = 0; 75279f00f3a1Smrg } 75289f00f3a1Smrg}; 75299f00f3a1Smrg_LT_EOF 75309f00f3a1Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 75319f00f3a1Smrgpackage foo 75329f00f3a1Smrgfunc foo() { 75339f00f3a1Smrg} 75349f00f3a1Smrg_LT_EOF 75359f00f3a1Smrg]) 75369f00f3a1Smrg 75379f00f3a1Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 75389f00f3a1Smrgcase "$CC $CFLAGS " in #( 75399f00f3a1Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 75409f00f3a1Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 75419f00f3a1Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 75429f00f3a1Smrgesac 75439f00f3a1Smrg 75449f00f3a1Smrgdnl Parse the compiler output and extract the necessary 75459f00f3a1Smrgdnl objects, libraries and library flags. 75469f00f3a1Smrgif AC_TRY_EVAL(ac_compile); then 75479f00f3a1Smrg # Parse the compiler output and extract the necessary 75489f00f3a1Smrg # objects, libraries and library flags. 75499f00f3a1Smrg 75509f00f3a1Smrg # Sentinel used to keep track of whether or not we are before 75519f00f3a1Smrg # the conftest object file. 75529f00f3a1Smrg pre_test_object_deps_done=no 75539f00f3a1Smrg 75549f00f3a1Smrg for p in `eval "$output_verbose_link_cmd"`; do 7555edce3322Smrg case $prev$p in 75569f00f3a1Smrg 75579f00f3a1Smrg -L* | -R* | -l*) 75589f00f3a1Smrg # Some compilers place space between "-{L,R}" and the path. 75599f00f3a1Smrg # Remove the space. 7560edce3322Smrg if test x-L = "$p" || 7561edce3322Smrg test x-R = "$p"; then 75629f00f3a1Smrg prev=$p 75639f00f3a1Smrg continue 75649f00f3a1Smrg fi 75659f00f3a1Smrg 75669f00f3a1Smrg # Expand the sysroot to ease extracting the directories later. 75679f00f3a1Smrg if test -z "$prev"; then 75689f00f3a1Smrg case $p in 75699f00f3a1Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 75709f00f3a1Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 75719f00f3a1Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 75729f00f3a1Smrg esac 75739f00f3a1Smrg fi 75749f00f3a1Smrg case $p in 75759f00f3a1Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 75769f00f3a1Smrg esac 7577edce3322Smrg if test no = "$pre_test_object_deps_done"; then 7578edce3322Smrg case $prev in 75799f00f3a1Smrg -L | -R) 75809f00f3a1Smrg # Internal compiler library paths should come after those 75819f00f3a1Smrg # provided the user. The postdeps already come after the 75829f00f3a1Smrg # user supplied libs so there is no need to process them. 75839f00f3a1Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 7584edce3322Smrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 75859f00f3a1Smrg else 7586edce3322Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 75879f00f3a1Smrg fi 75889f00f3a1Smrg ;; 75899f00f3a1Smrg # The "-l" case would never come before the object being 75909f00f3a1Smrg # linked, so don't bother handling this case. 75919f00f3a1Smrg esac 75929f00f3a1Smrg else 75939f00f3a1Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 7594edce3322Smrg _LT_TAGVAR(postdeps, $1)=$prev$p 75959f00f3a1Smrg else 7596edce3322Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 75979f00f3a1Smrg fi 75989f00f3a1Smrg fi 75999f00f3a1Smrg prev= 76009f00f3a1Smrg ;; 76019f00f3a1Smrg 76029f00f3a1Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 76039f00f3a1Smrg *.$objext) 76049f00f3a1Smrg # This assumes that the test object file only shows up 76059f00f3a1Smrg # once in the compiler output. 76069f00f3a1Smrg if test "$p" = "conftest.$objext"; then 76079f00f3a1Smrg pre_test_object_deps_done=yes 76089f00f3a1Smrg continue 76099f00f3a1Smrg fi 76109f00f3a1Smrg 7611edce3322Smrg if test no = "$pre_test_object_deps_done"; then 76129f00f3a1Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7613edce3322Smrg _LT_TAGVAR(predep_objects, $1)=$p 76149f00f3a1Smrg else 76159f00f3a1Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 76169f00f3a1Smrg fi 76179f00f3a1Smrg else 76189f00f3a1Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7619edce3322Smrg _LT_TAGVAR(postdep_objects, $1)=$p 76209f00f3a1Smrg else 76219f00f3a1Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 76229f00f3a1Smrg fi 76239f00f3a1Smrg fi 76249f00f3a1Smrg ;; 76259f00f3a1Smrg 76269f00f3a1Smrg *) ;; # Ignore the rest. 76279f00f3a1Smrg 76289f00f3a1Smrg esac 76299f00f3a1Smrg done 76309f00f3a1Smrg 76319f00f3a1Smrg # Clean up. 76329f00f3a1Smrg rm -f a.out a.exe 76339f00f3a1Smrgelse 76349f00f3a1Smrg echo "libtool.m4: error: problem compiling $1 test program" 76359f00f3a1Smrgfi 76369f00f3a1Smrg 76379f00f3a1Smrg$RM -f confest.$objext 76389f00f3a1SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 76399f00f3a1Smrg 76409f00f3a1Smrg# PORTME: override above test on systems where it is broken 76419f00f3a1Smrgm4_if([$1], [CXX], 76429f00f3a1Smrg[case $host_os in 76439f00f3a1Smrginterix[[3-9]]*) 76449f00f3a1Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 76459f00f3a1Smrg # hack all around it, let's just trust "g++" to DTRT. 76469f00f3a1Smrg _LT_TAGVAR(predep_objects,$1)= 76479f00f3a1Smrg _LT_TAGVAR(postdep_objects,$1)= 76489f00f3a1Smrg _LT_TAGVAR(postdeps,$1)= 76499f00f3a1Smrg ;; 76509f00f3a1Smrgesac 76519f00f3a1Smrg]) 76529f00f3a1Smrg 76539f00f3a1Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 76549f00f3a1Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 76559f00f3a1Smrgesac 76569f00f3a1Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 76579f00f3a1Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7658edce3322Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 76599f00f3a1Smrgfi 76609f00f3a1Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 76619f00f3a1Smrg [The directories searched by this compiler when creating a shared library]) 76629f00f3a1Smrg_LT_TAGDECL([], [predep_objects], [1], 76639f00f3a1Smrg [Dependencies to place before and after the objects being linked to 76649f00f3a1Smrg create a shared library]) 76659f00f3a1Smrg_LT_TAGDECL([], [postdep_objects], [1]) 76669f00f3a1Smrg_LT_TAGDECL([], [predeps], [1]) 76679f00f3a1Smrg_LT_TAGDECL([], [postdeps], [1]) 76689f00f3a1Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 76699f00f3a1Smrg [The library search path used internally by the compiler when linking 76709f00f3a1Smrg a shared library]) 76719f00f3a1Smrg])# _LT_SYS_HIDDEN_LIBDEPS 76729f00f3a1Smrg 76739f00f3a1Smrg 76749f00f3a1Smrg# _LT_LANG_F77_CONFIG([TAG]) 76759f00f3a1Smrg# -------------------------- 76769f00f3a1Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 76779f00f3a1Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7678edce3322Smrg# to write the compiler configuration to 'libtool'. 76799f00f3a1Smrgm4_defun([_LT_LANG_F77_CONFIG], 76809f00f3a1Smrg[AC_LANG_PUSH(Fortran 77) 7681edce3322Smrgif test -z "$F77" || test no = "$F77"; then 76829f00f3a1Smrg _lt_disable_F77=yes 76839f00f3a1Smrgfi 76849f00f3a1Smrg 76859f00f3a1Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 76869f00f3a1Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 76879f00f3a1Smrg_LT_TAGVAR(always_export_symbols, $1)=no 76889f00f3a1Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 76899f00f3a1Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 76909f00f3a1Smrg_LT_TAGVAR(hardcode_direct, $1)=no 76919f00f3a1Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 76929f00f3a1Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 76939f00f3a1Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 76949f00f3a1Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 76959f00f3a1Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 76969f00f3a1Smrg_LT_TAGVAR(inherit_rpath, $1)=no 76979f00f3a1Smrg_LT_TAGVAR(module_cmds, $1)= 76989f00f3a1Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 76999f00f3a1Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 77009f00f3a1Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 77019f00f3a1Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 77029f00f3a1Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 77039f00f3a1Smrg_LT_TAGVAR(no_undefined_flag, $1)= 77049f00f3a1Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 77059f00f3a1Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 77069f00f3a1Smrg 77079f00f3a1Smrg# Source file extension for f77 test sources. 77089f00f3a1Smrgac_ext=f 77099f00f3a1Smrg 77109f00f3a1Smrg# Object file extension for compiled f77 test sources. 77119f00f3a1Smrgobjext=o 77129f00f3a1Smrg_LT_TAGVAR(objext, $1)=$objext 77139f00f3a1Smrg 77149f00f3a1Smrg# No sense in running all these tests if we already determined that 77159f00f3a1Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 77169f00f3a1Smrg# are currently assumed to apply to all compilers on this platform, 77179f00f3a1Smrg# and will be corrupted by setting them based on a non-working compiler. 7718edce3322Smrgif test yes != "$_lt_disable_F77"; then 77199f00f3a1Smrg # Code to be used in simple compile tests 77209f00f3a1Smrg lt_simple_compile_test_code="\ 77219f00f3a1Smrg subroutine t 77229f00f3a1Smrg return 77239f00f3a1Smrg end 77249f00f3a1Smrg" 77259f00f3a1Smrg 77269f00f3a1Smrg # Code to be used in simple link tests 77279f00f3a1Smrg lt_simple_link_test_code="\ 77289f00f3a1Smrg program t 77299f00f3a1Smrg end 77309f00f3a1Smrg" 77319f00f3a1Smrg 77329f00f3a1Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 77339f00f3a1Smrg _LT_TAG_COMPILER 77349f00f3a1Smrg 77359f00f3a1Smrg # save warnings/boilerplate of simple test code 77369f00f3a1Smrg _LT_COMPILER_BOILERPLATE 77379f00f3a1Smrg _LT_LINKER_BOILERPLATE 77389f00f3a1Smrg 77399f00f3a1Smrg # Allow CC to be a program name with arguments. 7740edce3322Smrg lt_save_CC=$CC 77419f00f3a1Smrg lt_save_GCC=$GCC 77429f00f3a1Smrg lt_save_CFLAGS=$CFLAGS 77439f00f3a1Smrg CC=${F77-"f77"} 77449f00f3a1Smrg CFLAGS=$FFLAGS 77459f00f3a1Smrg compiler=$CC 77469f00f3a1Smrg _LT_TAGVAR(compiler, $1)=$CC 77479f00f3a1Smrg _LT_CC_BASENAME([$compiler]) 77489f00f3a1Smrg GCC=$G77 77499f00f3a1Smrg if test -n "$compiler"; then 77509f00f3a1Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 77519f00f3a1Smrg AC_MSG_RESULT([$can_build_shared]) 77529f00f3a1Smrg 77539f00f3a1Smrg AC_MSG_CHECKING([whether to build shared libraries]) 7754edce3322Smrg test no = "$can_build_shared" && enable_shared=no 77559f00f3a1Smrg 77569f00f3a1Smrg # On AIX, shared libraries and static libraries use the same namespace, and 77579f00f3a1Smrg # are all built from PIC. 77589f00f3a1Smrg case $host_os in 77599f00f3a1Smrg aix3*) 7760edce3322Smrg test yes = "$enable_shared" && enable_static=no 77619f00f3a1Smrg if test -n "$RANLIB"; then 77629f00f3a1Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 77639f00f3a1Smrg postinstall_cmds='$RANLIB $lib' 77649f00f3a1Smrg fi 77659f00f3a1Smrg ;; 77669f00f3a1Smrg aix[[4-9]]*) 7767edce3322Smrg if test ia64 != "$host_cpu"; then 7768edce3322Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7769edce3322Smrg yes,aix,yes) ;; # shared object as lib.so file only 7770edce3322Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 7771edce3322Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 7772edce3322Smrg esac 77739f00f3a1Smrg fi 77749f00f3a1Smrg ;; 77759f00f3a1Smrg esac 77769f00f3a1Smrg AC_MSG_RESULT([$enable_shared]) 77779f00f3a1Smrg 77789f00f3a1Smrg AC_MSG_CHECKING([whether to build static libraries]) 77799f00f3a1Smrg # Make sure either enable_shared or enable_static is yes. 7780edce3322Smrg test yes = "$enable_shared" || enable_static=yes 77819f00f3a1Smrg AC_MSG_RESULT([$enable_static]) 77829f00f3a1Smrg 7783edce3322Smrg _LT_TAGVAR(GCC, $1)=$G77 7784edce3322Smrg _LT_TAGVAR(LD, $1)=$LD 77859f00f3a1Smrg 77869f00f3a1Smrg ## CAVEAT EMPTOR: 77879f00f3a1Smrg ## There is no encapsulation within the following macros, do not change 77889f00f3a1Smrg ## the running order or otherwise move them around unless you know exactly 77899f00f3a1Smrg ## what you are doing... 77909f00f3a1Smrg _LT_COMPILER_PIC($1) 77919f00f3a1Smrg _LT_COMPILER_C_O($1) 77929f00f3a1Smrg _LT_COMPILER_FILE_LOCKS($1) 77939f00f3a1Smrg _LT_LINKER_SHLIBS($1) 77949f00f3a1Smrg _LT_SYS_DYNAMIC_LINKER($1) 77959f00f3a1Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 77969f00f3a1Smrg 77979f00f3a1Smrg _LT_CONFIG($1) 77989f00f3a1Smrg fi # test -n "$compiler" 77999f00f3a1Smrg 78009f00f3a1Smrg GCC=$lt_save_GCC 7801edce3322Smrg CC=$lt_save_CC 7802edce3322Smrg CFLAGS=$lt_save_CFLAGS 7803edce3322Smrgfi # test yes != "$_lt_disable_F77" 78049f00f3a1Smrg 78059f00f3a1SmrgAC_LANG_POP 78069f00f3a1Smrg])# _LT_LANG_F77_CONFIG 78079f00f3a1Smrg 78089f00f3a1Smrg 78099f00f3a1Smrg# _LT_LANG_FC_CONFIG([TAG]) 78109f00f3a1Smrg# ------------------------- 78119f00f3a1Smrg# Ensure that the configuration variables for a Fortran compiler are 78129f00f3a1Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7813edce3322Smrg# to write the compiler configuration to 'libtool'. 78149f00f3a1Smrgm4_defun([_LT_LANG_FC_CONFIG], 78159f00f3a1Smrg[AC_LANG_PUSH(Fortran) 78169f00f3a1Smrg 7817edce3322Smrgif test -z "$FC" || test no = "$FC"; then 78189f00f3a1Smrg _lt_disable_FC=yes 78199f00f3a1Smrgfi 78209f00f3a1Smrg 78219f00f3a1Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 78229f00f3a1Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 78239f00f3a1Smrg_LT_TAGVAR(always_export_symbols, $1)=no 78249f00f3a1Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 78259f00f3a1Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 78269f00f3a1Smrg_LT_TAGVAR(hardcode_direct, $1)=no 78279f00f3a1Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 78289f00f3a1Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 78299f00f3a1Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 78309f00f3a1Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 78319f00f3a1Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 78329f00f3a1Smrg_LT_TAGVAR(inherit_rpath, $1)=no 78339f00f3a1Smrg_LT_TAGVAR(module_cmds, $1)= 78349f00f3a1Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 78359f00f3a1Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 78369f00f3a1Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 78379f00f3a1Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 78389f00f3a1Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 78399f00f3a1Smrg_LT_TAGVAR(no_undefined_flag, $1)= 78409f00f3a1Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 78419f00f3a1Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 78429f00f3a1Smrg 78439f00f3a1Smrg# Source file extension for fc test sources. 78449f00f3a1Smrgac_ext=${ac_fc_srcext-f} 78459f00f3a1Smrg 78469f00f3a1Smrg# Object file extension for compiled fc test sources. 78479f00f3a1Smrgobjext=o 78489f00f3a1Smrg_LT_TAGVAR(objext, $1)=$objext 78499f00f3a1Smrg 78509f00f3a1Smrg# No sense in running all these tests if we already determined that 78519f00f3a1Smrg# the FC compiler isn't working. Some variables (like enable_shared) 78529f00f3a1Smrg# are currently assumed to apply to all compilers on this platform, 78539f00f3a1Smrg# and will be corrupted by setting them based on a non-working compiler. 7854edce3322Smrgif test yes != "$_lt_disable_FC"; then 78559f00f3a1Smrg # Code to be used in simple compile tests 78569f00f3a1Smrg lt_simple_compile_test_code="\ 78579f00f3a1Smrg subroutine t 78589f00f3a1Smrg return 78599f00f3a1Smrg end 78609f00f3a1Smrg" 78619f00f3a1Smrg 78629f00f3a1Smrg # Code to be used in simple link tests 78639f00f3a1Smrg lt_simple_link_test_code="\ 78649f00f3a1Smrg program t 78659f00f3a1Smrg end 78669f00f3a1Smrg" 78679f00f3a1Smrg 78689f00f3a1Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 78699f00f3a1Smrg _LT_TAG_COMPILER 78709f00f3a1Smrg 78719f00f3a1Smrg # save warnings/boilerplate of simple test code 78729f00f3a1Smrg _LT_COMPILER_BOILERPLATE 78739f00f3a1Smrg _LT_LINKER_BOILERPLATE 78749f00f3a1Smrg 78759f00f3a1Smrg # Allow CC to be a program name with arguments. 7876edce3322Smrg lt_save_CC=$CC 78779f00f3a1Smrg lt_save_GCC=$GCC 78789f00f3a1Smrg lt_save_CFLAGS=$CFLAGS 78799f00f3a1Smrg CC=${FC-"f95"} 78809f00f3a1Smrg CFLAGS=$FCFLAGS 78819f00f3a1Smrg compiler=$CC 78829f00f3a1Smrg GCC=$ac_cv_fc_compiler_gnu 78839f00f3a1Smrg 78849f00f3a1Smrg _LT_TAGVAR(compiler, $1)=$CC 78859f00f3a1Smrg _LT_CC_BASENAME([$compiler]) 78869f00f3a1Smrg 78879f00f3a1Smrg if test -n "$compiler"; then 78889f00f3a1Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 78899f00f3a1Smrg AC_MSG_RESULT([$can_build_shared]) 78909f00f3a1Smrg 78919f00f3a1Smrg AC_MSG_CHECKING([whether to build shared libraries]) 7892edce3322Smrg test no = "$can_build_shared" && enable_shared=no 78939f00f3a1Smrg 78949f00f3a1Smrg # On AIX, shared libraries and static libraries use the same namespace, and 78959f00f3a1Smrg # are all built from PIC. 78969f00f3a1Smrg case $host_os in 78979f00f3a1Smrg aix3*) 7898edce3322Smrg test yes = "$enable_shared" && enable_static=no 78999f00f3a1Smrg if test -n "$RANLIB"; then 79009f00f3a1Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 79019f00f3a1Smrg postinstall_cmds='$RANLIB $lib' 79029f00f3a1Smrg fi 79039f00f3a1Smrg ;; 79049f00f3a1Smrg aix[[4-9]]*) 7905edce3322Smrg if test ia64 != "$host_cpu"; then 7906edce3322Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7907edce3322Smrg yes,aix,yes) ;; # shared object as lib.so file only 7908edce3322Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 7909edce3322Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 7910edce3322Smrg esac 79119f00f3a1Smrg fi 79129f00f3a1Smrg ;; 79139f00f3a1Smrg esac 79149f00f3a1Smrg AC_MSG_RESULT([$enable_shared]) 79159f00f3a1Smrg 79169f00f3a1Smrg AC_MSG_CHECKING([whether to build static libraries]) 79179f00f3a1Smrg # Make sure either enable_shared or enable_static is yes. 7918edce3322Smrg test yes = "$enable_shared" || enable_static=yes 79199f00f3a1Smrg AC_MSG_RESULT([$enable_static]) 79209f00f3a1Smrg 7921edce3322Smrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 7922edce3322Smrg _LT_TAGVAR(LD, $1)=$LD 79239f00f3a1Smrg 79249f00f3a1Smrg ## CAVEAT EMPTOR: 79259f00f3a1Smrg ## There is no encapsulation within the following macros, do not change 79269f00f3a1Smrg ## the running order or otherwise move them around unless you know exactly 79279f00f3a1Smrg ## what you are doing... 79289f00f3a1Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 79299f00f3a1Smrg _LT_COMPILER_PIC($1) 79309f00f3a1Smrg _LT_COMPILER_C_O($1) 79319f00f3a1Smrg _LT_COMPILER_FILE_LOCKS($1) 79329f00f3a1Smrg _LT_LINKER_SHLIBS($1) 79339f00f3a1Smrg _LT_SYS_DYNAMIC_LINKER($1) 79349f00f3a1Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 79359f00f3a1Smrg 79369f00f3a1Smrg _LT_CONFIG($1) 79379f00f3a1Smrg fi # test -n "$compiler" 79389f00f3a1Smrg 79399f00f3a1Smrg GCC=$lt_save_GCC 79409f00f3a1Smrg CC=$lt_save_CC 79419f00f3a1Smrg CFLAGS=$lt_save_CFLAGS 7942edce3322Smrgfi # test yes != "$_lt_disable_FC" 79439f00f3a1Smrg 79449f00f3a1SmrgAC_LANG_POP 79459f00f3a1Smrg])# _LT_LANG_FC_CONFIG 79469f00f3a1Smrg 79479f00f3a1Smrg 79489f00f3a1Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 79499f00f3a1Smrg# -------------------------- 79509f00f3a1Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 79519f00f3a1Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7952edce3322Smrg# to write the compiler configuration to 'libtool'. 79539f00f3a1Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 79549f00f3a1Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 79559f00f3a1SmrgAC_LANG_SAVE 79569f00f3a1Smrg 79579f00f3a1Smrg# Source file extension for Java test sources. 79589f00f3a1Smrgac_ext=java 79599f00f3a1Smrg 79609f00f3a1Smrg# Object file extension for compiled Java test sources. 79619f00f3a1Smrgobjext=o 79629f00f3a1Smrg_LT_TAGVAR(objext, $1)=$objext 79639f00f3a1Smrg 79649f00f3a1Smrg# Code to be used in simple compile tests 79659f00f3a1Smrglt_simple_compile_test_code="class foo {}" 79669f00f3a1Smrg 79679f00f3a1Smrg# Code to be used in simple link tests 79689f00f3a1Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 79699f00f3a1Smrg 79709f00f3a1Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 79719f00f3a1Smrg_LT_TAG_COMPILER 79729f00f3a1Smrg 79739f00f3a1Smrg# save warnings/boilerplate of simple test code 79749f00f3a1Smrg_LT_COMPILER_BOILERPLATE 79759f00f3a1Smrg_LT_LINKER_BOILERPLATE 79769f00f3a1Smrg 79779f00f3a1Smrg# Allow CC to be a program name with arguments. 79789f00f3a1Smrglt_save_CC=$CC 79799f00f3a1Smrglt_save_CFLAGS=$CFLAGS 79809f00f3a1Smrglt_save_GCC=$GCC 79819f00f3a1SmrgGCC=yes 79829f00f3a1SmrgCC=${GCJ-"gcj"} 79839f00f3a1SmrgCFLAGS=$GCJFLAGS 79849f00f3a1Smrgcompiler=$CC 79859f00f3a1Smrg_LT_TAGVAR(compiler, $1)=$CC 7986edce3322Smrg_LT_TAGVAR(LD, $1)=$LD 79879f00f3a1Smrg_LT_CC_BASENAME([$compiler]) 79889f00f3a1Smrg 79899f00f3a1Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 79909f00f3a1Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 79919f00f3a1Smrg 79929f00f3a1Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 79939f00f3a1Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 79949f00f3a1Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 79959f00f3a1Smrg 79969f00f3a1Smrg## CAVEAT EMPTOR: 79979f00f3a1Smrg## There is no encapsulation within the following macros, do not change 79989f00f3a1Smrg## the running order or otherwise move them around unless you know exactly 79999f00f3a1Smrg## what you are doing... 80009f00f3a1Smrgif test -n "$compiler"; then 80019f00f3a1Smrg _LT_COMPILER_NO_RTTI($1) 80029f00f3a1Smrg _LT_COMPILER_PIC($1) 80039f00f3a1Smrg _LT_COMPILER_C_O($1) 80049f00f3a1Smrg _LT_COMPILER_FILE_LOCKS($1) 80059f00f3a1Smrg _LT_LINKER_SHLIBS($1) 80069f00f3a1Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 80079f00f3a1Smrg 80089f00f3a1Smrg _LT_CONFIG($1) 80099f00f3a1Smrgfi 80109f00f3a1Smrg 80119f00f3a1SmrgAC_LANG_RESTORE 80129f00f3a1Smrg 80139f00f3a1SmrgGCC=$lt_save_GCC 80149f00f3a1SmrgCC=$lt_save_CC 80159f00f3a1SmrgCFLAGS=$lt_save_CFLAGS 80169f00f3a1Smrg])# _LT_LANG_GCJ_CONFIG 80179f00f3a1Smrg 80189f00f3a1Smrg 80199f00f3a1Smrg# _LT_LANG_GO_CONFIG([TAG]) 80209f00f3a1Smrg# -------------------------- 80219f00f3a1Smrg# Ensure that the configuration variables for the GNU Go compiler 80229f00f3a1Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8023edce3322Smrg# to write the compiler configuration to 'libtool'. 80249f00f3a1Smrgm4_defun([_LT_LANG_GO_CONFIG], 80259f00f3a1Smrg[AC_REQUIRE([LT_PROG_GO])dnl 80269f00f3a1SmrgAC_LANG_SAVE 80279f00f3a1Smrg 80289f00f3a1Smrg# Source file extension for Go test sources. 80299f00f3a1Smrgac_ext=go 80309f00f3a1Smrg 80319f00f3a1Smrg# Object file extension for compiled Go test sources. 80329f00f3a1Smrgobjext=o 80339f00f3a1Smrg_LT_TAGVAR(objext, $1)=$objext 80349f00f3a1Smrg 80359f00f3a1Smrg# Code to be used in simple compile tests 80369f00f3a1Smrglt_simple_compile_test_code="package main; func main() { }" 80379f00f3a1Smrg 80389f00f3a1Smrg# Code to be used in simple link tests 80399f00f3a1Smrglt_simple_link_test_code='package main; func main() { }' 80409f00f3a1Smrg 80419f00f3a1Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 80429f00f3a1Smrg_LT_TAG_COMPILER 80439f00f3a1Smrg 80449f00f3a1Smrg# save warnings/boilerplate of simple test code 80459f00f3a1Smrg_LT_COMPILER_BOILERPLATE 80469f00f3a1Smrg_LT_LINKER_BOILERPLATE 80479f00f3a1Smrg 80489f00f3a1Smrg# Allow CC to be a program name with arguments. 80499f00f3a1Smrglt_save_CC=$CC 80509f00f3a1Smrglt_save_CFLAGS=$CFLAGS 80519f00f3a1Smrglt_save_GCC=$GCC 80529f00f3a1SmrgGCC=yes 80539f00f3a1SmrgCC=${GOC-"gccgo"} 80549f00f3a1SmrgCFLAGS=$GOFLAGS 80559f00f3a1Smrgcompiler=$CC 80569f00f3a1Smrg_LT_TAGVAR(compiler, $1)=$CC 8057edce3322Smrg_LT_TAGVAR(LD, $1)=$LD 80589f00f3a1Smrg_LT_CC_BASENAME([$compiler]) 80599f00f3a1Smrg 80609f00f3a1Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 80619f00f3a1Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 80629f00f3a1Smrg 80639f00f3a1Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 80649f00f3a1Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 80659f00f3a1Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 80669f00f3a1Smrg 80679f00f3a1Smrg## CAVEAT EMPTOR: 80689f00f3a1Smrg## There is no encapsulation within the following macros, do not change 80699f00f3a1Smrg## the running order or otherwise move them around unless you know exactly 80709f00f3a1Smrg## what you are doing... 80719f00f3a1Smrgif test -n "$compiler"; then 80729f00f3a1Smrg _LT_COMPILER_NO_RTTI($1) 80739f00f3a1Smrg _LT_COMPILER_PIC($1) 80749f00f3a1Smrg _LT_COMPILER_C_O($1) 80759f00f3a1Smrg _LT_COMPILER_FILE_LOCKS($1) 80769f00f3a1Smrg _LT_LINKER_SHLIBS($1) 80779f00f3a1Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 80789f00f3a1Smrg 80799f00f3a1Smrg _LT_CONFIG($1) 80809f00f3a1Smrgfi 80819f00f3a1Smrg 80829f00f3a1SmrgAC_LANG_RESTORE 80839f00f3a1Smrg 80849f00f3a1SmrgGCC=$lt_save_GCC 80859f00f3a1SmrgCC=$lt_save_CC 80869f00f3a1SmrgCFLAGS=$lt_save_CFLAGS 80879f00f3a1Smrg])# _LT_LANG_GO_CONFIG 80889f00f3a1Smrg 80899f00f3a1Smrg 80909f00f3a1Smrg# _LT_LANG_RC_CONFIG([TAG]) 80919f00f3a1Smrg# ------------------------- 80929f00f3a1Smrg# Ensure that the configuration variables for the Windows resource compiler 80939f00f3a1Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8094edce3322Smrg# to write the compiler configuration to 'libtool'. 80959f00f3a1Smrgm4_defun([_LT_LANG_RC_CONFIG], 80969f00f3a1Smrg[AC_REQUIRE([LT_PROG_RC])dnl 80979f00f3a1SmrgAC_LANG_SAVE 80989f00f3a1Smrg 80999f00f3a1Smrg# Source file extension for RC test sources. 81009f00f3a1Smrgac_ext=rc 81019f00f3a1Smrg 81029f00f3a1Smrg# Object file extension for compiled RC test sources. 81039f00f3a1Smrgobjext=o 81049f00f3a1Smrg_LT_TAGVAR(objext, $1)=$objext 81059f00f3a1Smrg 81069f00f3a1Smrg# Code to be used in simple compile tests 81079f00f3a1Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 81089f00f3a1Smrg 81099f00f3a1Smrg# Code to be used in simple link tests 8110edce3322Smrglt_simple_link_test_code=$lt_simple_compile_test_code 81119f00f3a1Smrg 81129f00f3a1Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 81139f00f3a1Smrg_LT_TAG_COMPILER 81149f00f3a1Smrg 81159f00f3a1Smrg# save warnings/boilerplate of simple test code 81169f00f3a1Smrg_LT_COMPILER_BOILERPLATE 81179f00f3a1Smrg_LT_LINKER_BOILERPLATE 81189f00f3a1Smrg 81199f00f3a1Smrg# Allow CC to be a program name with arguments. 8120edce3322Smrglt_save_CC=$CC 81219f00f3a1Smrglt_save_CFLAGS=$CFLAGS 81229f00f3a1Smrglt_save_GCC=$GCC 81239f00f3a1SmrgGCC= 81249f00f3a1SmrgCC=${RC-"windres"} 81259f00f3a1SmrgCFLAGS= 81269f00f3a1Smrgcompiler=$CC 81279f00f3a1Smrg_LT_TAGVAR(compiler, $1)=$CC 81289f00f3a1Smrg_LT_CC_BASENAME([$compiler]) 81299f00f3a1Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 81309f00f3a1Smrg 81319f00f3a1Smrgif test -n "$compiler"; then 81329f00f3a1Smrg : 81339f00f3a1Smrg _LT_CONFIG($1) 81349f00f3a1Smrgfi 81359f00f3a1Smrg 81369f00f3a1SmrgGCC=$lt_save_GCC 81379f00f3a1SmrgAC_LANG_RESTORE 81389f00f3a1SmrgCC=$lt_save_CC 81399f00f3a1SmrgCFLAGS=$lt_save_CFLAGS 81409f00f3a1Smrg])# _LT_LANG_RC_CONFIG 81419f00f3a1Smrg 81429f00f3a1Smrg 81439f00f3a1Smrg# LT_PROG_GCJ 81449f00f3a1Smrg# ----------- 81459f00f3a1SmrgAC_DEFUN([LT_PROG_GCJ], 81469f00f3a1Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 81479f00f3a1Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 81489f00f3a1Smrg [AC_CHECK_TOOL(GCJ, gcj,) 8149edce3322Smrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 81509f00f3a1Smrg AC_SUBST(GCJFLAGS)])])[]dnl 81519f00f3a1Smrg]) 81529f00f3a1Smrg 81539f00f3a1Smrg# Old name: 81549f00f3a1SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 81559f00f3a1Smrgdnl aclocal-1.4 backwards compatibility: 81569f00f3a1Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 81579f00f3a1Smrg 81589f00f3a1Smrg 81599f00f3a1Smrg# LT_PROG_GO 81609f00f3a1Smrg# ---------- 81619f00f3a1SmrgAC_DEFUN([LT_PROG_GO], 81629f00f3a1Smrg[AC_CHECK_TOOL(GOC, gccgo,) 81639f00f3a1Smrg]) 81649f00f3a1Smrg 81659f00f3a1Smrg 81669f00f3a1Smrg# LT_PROG_RC 81679f00f3a1Smrg# ---------- 81689f00f3a1SmrgAC_DEFUN([LT_PROG_RC], 81699f00f3a1Smrg[AC_CHECK_TOOL(RC, windres,) 81709f00f3a1Smrg]) 81719f00f3a1Smrg 81729f00f3a1Smrg# Old name: 81739f00f3a1SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 81749f00f3a1Smrgdnl aclocal-1.4 backwards compatibility: 81759f00f3a1Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 81769f00f3a1Smrg 81779f00f3a1Smrg 81789f00f3a1Smrg# _LT_DECL_EGREP 81799f00f3a1Smrg# -------------- 81809f00f3a1Smrg# If we don't have a new enough Autoconf to choose the best grep 81819f00f3a1Smrg# available, choose the one first in the user's PATH. 81829f00f3a1Smrgm4_defun([_LT_DECL_EGREP], 81839f00f3a1Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 81849f00f3a1SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 81859f00f3a1Smrgtest -z "$GREP" && GREP=grep 81869f00f3a1Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 81879f00f3a1Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 81889f00f3a1Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 81899f00f3a1Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 81909f00f3a1SmrgAC_SUBST([GREP]) 81919f00f3a1Smrg]) 81929f00f3a1Smrg 81939f00f3a1Smrg 81949f00f3a1Smrg# _LT_DECL_OBJDUMP 81959f00f3a1Smrg# -------------- 81969f00f3a1Smrg# If we don't have a new enough Autoconf to choose the best objdump 81979f00f3a1Smrg# available, choose the one first in the user's PATH. 81989f00f3a1Smrgm4_defun([_LT_DECL_OBJDUMP], 81999f00f3a1Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 82009f00f3a1Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 82019f00f3a1Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 82029f00f3a1SmrgAC_SUBST([OBJDUMP]) 82039f00f3a1Smrg]) 82049f00f3a1Smrg 82059f00f3a1Smrg# _LT_DECL_DLLTOOL 82069f00f3a1Smrg# ---------------- 82079f00f3a1Smrg# Ensure DLLTOOL variable is set. 82089f00f3a1Smrgm4_defun([_LT_DECL_DLLTOOL], 82099f00f3a1Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 82109f00f3a1Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 82119f00f3a1Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 82129f00f3a1SmrgAC_SUBST([DLLTOOL]) 82139f00f3a1Smrg]) 82149f00f3a1Smrg 821574835918Smrg# _LT_DECL_FILECMD 821674835918Smrg# ---------------- 821774835918Smrg# Check for a file(cmd) program that can be used to detect file type and magic 821874835918Smrgm4_defun([_LT_DECL_FILECMD], 821974835918Smrg[AC_CHECK_TOOL([FILECMD], [file], [:]) 822074835918Smrg_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) 822174835918Smrg])# _LD_DECL_FILECMD 822274835918Smrg 82239f00f3a1Smrg# _LT_DECL_SED 82249f00f3a1Smrg# ------------ 82259f00f3a1Smrg# Check for a fully-functional sed program, that truncates 82269f00f3a1Smrg# as few characters as possible. Prefer GNU sed if found. 82279f00f3a1Smrgm4_defun([_LT_DECL_SED], 82289f00f3a1Smrg[AC_PROG_SED 82299f00f3a1Smrgtest -z "$SED" && SED=sed 82309f00f3a1SmrgXsed="$SED -e 1s/^X//" 82319f00f3a1Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 82329f00f3a1Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 82339f00f3a1Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 82349f00f3a1Smrg])# _LT_DECL_SED 82359f00f3a1Smrg 82369f00f3a1Smrgm4_ifndef([AC_PROG_SED], [ 82379f00f3a1Smrg############################################################ 82389f00f3a1Smrg# NOTE: This macro has been submitted for inclusion into # 82399f00f3a1Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 82409f00f3a1Smrg# a released version of Autoconf we should remove this # 82419f00f3a1Smrg# macro and use it instead. # 82429f00f3a1Smrg############################################################ 82439f00f3a1Smrg 82449f00f3a1Smrgm4_defun([AC_PROG_SED], 82459f00f3a1Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 82469f00f3a1SmrgAC_CACHE_VAL(lt_cv_path_SED, 82479f00f3a1Smrg[# Loop through the user's path and test for sed and gsed. 82489f00f3a1Smrg# Then use that list of sed's as ones to test for truncation. 82499f00f3a1Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 82509f00f3a1Smrgfor as_dir in $PATH 82519f00f3a1Smrgdo 82529f00f3a1Smrg IFS=$as_save_IFS 82539f00f3a1Smrg test -z "$as_dir" && as_dir=. 82549f00f3a1Smrg for lt_ac_prog in sed gsed; do 82559f00f3a1Smrg for ac_exec_ext in '' $ac_executable_extensions; do 82569f00f3a1Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 82579f00f3a1Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 82589f00f3a1Smrg fi 82599f00f3a1Smrg done 82609f00f3a1Smrg done 82619f00f3a1Smrgdone 82629f00f3a1SmrgIFS=$as_save_IFS 82639f00f3a1Smrglt_ac_max=0 82649f00f3a1Smrglt_ac_count=0 82659f00f3a1Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 82669f00f3a1Smrg# along with /bin/sed that truncates output. 82679f00f3a1Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8268edce3322Smrg test ! -f "$lt_ac_sed" && continue 82699f00f3a1Smrg cat /dev/null > conftest.in 82709f00f3a1Smrg lt_ac_count=0 82719f00f3a1Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 82729f00f3a1Smrg # Check for GNU sed and select it if it is found. 82739f00f3a1Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 82749f00f3a1Smrg lt_cv_path_SED=$lt_ac_sed 82759f00f3a1Smrg break 82769f00f3a1Smrg fi 82779f00f3a1Smrg while true; do 82789f00f3a1Smrg cat conftest.in conftest.in >conftest.tmp 82799f00f3a1Smrg mv conftest.tmp conftest.in 82809f00f3a1Smrg cp conftest.in conftest.nl 82819f00f3a1Smrg echo >>conftest.nl 82829f00f3a1Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 82839f00f3a1Smrg cmp -s conftest.out conftest.nl || break 82849f00f3a1Smrg # 10000 chars as input seems more than enough 8285edce3322Smrg test 10 -lt "$lt_ac_count" && break 82869f00f3a1Smrg lt_ac_count=`expr $lt_ac_count + 1` 8287edce3322Smrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 82889f00f3a1Smrg lt_ac_max=$lt_ac_count 82899f00f3a1Smrg lt_cv_path_SED=$lt_ac_sed 82909f00f3a1Smrg fi 82919f00f3a1Smrg done 82929f00f3a1Smrgdone 82939f00f3a1Smrg]) 82949f00f3a1SmrgSED=$lt_cv_path_SED 82959f00f3a1SmrgAC_SUBST([SED]) 82969f00f3a1SmrgAC_MSG_RESULT([$SED]) 82979f00f3a1Smrg])#AC_PROG_SED 82989f00f3a1Smrg])#m4_ifndef 82999f00f3a1Smrg 83009f00f3a1Smrg# Old name: 83019f00f3a1SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 83029f00f3a1Smrgdnl aclocal-1.4 backwards compatibility: 83039f00f3a1Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 83049f00f3a1Smrg 83059f00f3a1Smrg 83069f00f3a1Smrg# _LT_CHECK_SHELL_FEATURES 83079f00f3a1Smrg# ------------------------ 83089f00f3a1Smrg# Find out whether the shell is Bourne or XSI compatible, 83099f00f3a1Smrg# or has some other useful features. 83109f00f3a1Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 8311edce3322Smrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 83129f00f3a1Smrg lt_unset=unset 83139f00f3a1Smrgelse 83149f00f3a1Smrg lt_unset=false 83159f00f3a1Smrgfi 83169f00f3a1Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 83179f00f3a1Smrg 83189f00f3a1Smrg# test EBCDIC or ASCII 83199f00f3a1Smrgcase `echo X|tr X '\101'` in 83209f00f3a1Smrg A) # ASCII based system 83219f00f3a1Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 83229f00f3a1Smrg lt_SP2NL='tr \040 \012' 83239f00f3a1Smrg lt_NL2SP='tr \015\012 \040\040' 83249f00f3a1Smrg ;; 83259f00f3a1Smrg *) # EBCDIC based system 83269f00f3a1Smrg lt_SP2NL='tr \100 \n' 83279f00f3a1Smrg lt_NL2SP='tr \r\n \100\100' 83289f00f3a1Smrg ;; 83299f00f3a1Smrgesac 83309f00f3a1Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 83319f00f3a1Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 83329f00f3a1Smrg])# _LT_CHECK_SHELL_FEATURES 83339f00f3a1Smrg 83349f00f3a1Smrg 83359f00f3a1Smrg# _LT_PATH_CONVERSION_FUNCTIONS 83369f00f3a1Smrg# ----------------------------- 8337edce3322Smrg# Determine what file name conversion functions should be used by 83389f00f3a1Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 83399f00f3a1Smrg# for certain cross-compile configurations and native mingw. 83409f00f3a1Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 83419f00f3a1Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 83429f00f3a1SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 83439f00f3a1SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 83449f00f3a1SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 83459f00f3a1Smrg[case $host in 83469f00f3a1Smrg *-*-mingw* ) 83479f00f3a1Smrg case $build in 83489f00f3a1Smrg *-*-mingw* ) # actually msys 83499f00f3a1Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 83509f00f3a1Smrg ;; 83519f00f3a1Smrg *-*-cygwin* ) 83529f00f3a1Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 83539f00f3a1Smrg ;; 83549f00f3a1Smrg * ) # otherwise, assume *nix 83559f00f3a1Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 83569f00f3a1Smrg ;; 83579f00f3a1Smrg esac 83589f00f3a1Smrg ;; 83599f00f3a1Smrg *-*-cygwin* ) 83609f00f3a1Smrg case $build in 83619f00f3a1Smrg *-*-mingw* ) # actually msys 83629f00f3a1Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 83639f00f3a1Smrg ;; 83649f00f3a1Smrg *-*-cygwin* ) 83659f00f3a1Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 83669f00f3a1Smrg ;; 83679f00f3a1Smrg * ) # otherwise, assume *nix 83689f00f3a1Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 83699f00f3a1Smrg ;; 83709f00f3a1Smrg esac 83719f00f3a1Smrg ;; 83729f00f3a1Smrg * ) # unhandled hosts (and "normal" native builds) 83739f00f3a1Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 83749f00f3a1Smrg ;; 83759f00f3a1Smrgesac 83769f00f3a1Smrg]) 83779f00f3a1Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 83789f00f3a1SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 83799f00f3a1Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 83809f00f3a1Smrg [0], [convert $build file names to $host format])dnl 83819f00f3a1Smrg 83829f00f3a1SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 83839f00f3a1SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 83849f00f3a1Smrg[#assume ordinary cross tools, or native build. 83859f00f3a1Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 83869f00f3a1Smrgcase $host in 83879f00f3a1Smrg *-*-mingw* ) 83889f00f3a1Smrg case $build in 83899f00f3a1Smrg *-*-mingw* ) # actually msys 83909f00f3a1Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 83919f00f3a1Smrg ;; 83929f00f3a1Smrg esac 83939f00f3a1Smrg ;; 83949f00f3a1Smrgesac 83959f00f3a1Smrg]) 83969f00f3a1Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 83979f00f3a1SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 83989f00f3a1Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 83999f00f3a1Smrg [0], [convert $build files to toolchain format])dnl 84009f00f3a1Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 8401