1*132f818dSEnji Cooper# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2*132f818dSEnji Cooper# 3*132f818dSEnji Cooper# Copyright (C) 1996-2001, 2003-2019, 2021-2024 Free Software 4*132f818dSEnji Cooper# Foundation, Inc. 5*132f818dSEnji Cooper# Written by Gordon Matzigkeit, 1996 6*132f818dSEnji Cooper# 7*132f818dSEnji Cooper# This file is free software; the Free Software Foundation gives 8*132f818dSEnji Cooper# unlimited permission to copy and/or distribute it, with or without 9*132f818dSEnji Cooper# modifications, as long as this notice is preserved. 10*132f818dSEnji Cooper 11*132f818dSEnji Cooperm4_define([_LT_COPYING], [dnl 12*132f818dSEnji Cooper# Copyright (C) 2024 Free Software Foundation, Inc. 13*132f818dSEnji Cooper# This is free software; see the source for copying conditions. There is NO 14*132f818dSEnji Cooper# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15*132f818dSEnji Cooper 16*132f818dSEnji Cooper# GNU Libtool is free software; you can redistribute it and/or modify 17*132f818dSEnji Cooper# it under the terms of the GNU General Public License as published by 18*132f818dSEnji Cooper# the Free Software Foundation; either version 2 of the License, or 19*132f818dSEnji Cooper# (at your option) any later version. 20*132f818dSEnji Cooper# 21*132f818dSEnji Cooper# As a special exception to the GNU General Public License, if you 22*132f818dSEnji Cooper# distribute this file as part of a program or library that is built 23*132f818dSEnji Cooper# using GNU Libtool, you may include this file under the same 24*132f818dSEnji Cooper# distribution terms that you use for the rest of that program. 25*132f818dSEnji Cooper# 26*132f818dSEnji Cooper# GNU Libtool is distributed in the hope that it will be useful, but 27*132f818dSEnji Cooper# WITHOUT ANY WARRANTY; without even the implied warranty of 28*132f818dSEnji Cooper# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29*132f818dSEnji Cooper# GNU General Public License for more details. 30*132f818dSEnji Cooper# 31*132f818dSEnji Cooper# You should have received a copy of the GNU General Public License 32*132f818dSEnji Cooper# along with this program. If not, see <http://www.gnu.org/licenses/>. 33*132f818dSEnji Cooper]) 34*132f818dSEnji Cooper 35*132f818dSEnji Cooper# serial 63 LT_INIT 36*132f818dSEnji Cooper 37*132f818dSEnji Cooper 38*132f818dSEnji Cooper# LT_PREREQ(VERSION) 39*132f818dSEnji Cooper# ------------------ 40*132f818dSEnji Cooper# Complain and exit if this libtool version is less that VERSION. 41*132f818dSEnji Cooperm4_defun([LT_PREREQ], 42*132f818dSEnji Cooper[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 43*132f818dSEnji Cooper [m4_default([$3], 44*132f818dSEnji Cooper [m4_fatal([Libtool version $1 or higher is required], 45*132f818dSEnji Cooper 63)])], 46*132f818dSEnji Cooper [$2])]) 47*132f818dSEnji Cooper 48*132f818dSEnji Cooper 49*132f818dSEnji Cooper# _LT_CHECK_BUILDDIR 50*132f818dSEnji Cooper# ------------------ 51*132f818dSEnji Cooper# Complain if the absolute build directory name contains unusual characters 52*132f818dSEnji Cooperm4_defun([_LT_CHECK_BUILDDIR], 53*132f818dSEnji Cooper[case `pwd` in 54*132f818dSEnji Cooper *\ * | *\ *) 55*132f818dSEnji Cooper AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 56*132f818dSEnji Cooperesac 57*132f818dSEnji Cooper]) 58*132f818dSEnji Cooper 59*132f818dSEnji Cooper 60*132f818dSEnji Cooper# LT_INIT([OPTIONS]) 61*132f818dSEnji Cooper# ------------------ 62*132f818dSEnji CooperAC_DEFUN([LT_INIT], 63*132f818dSEnji Cooper[AC_PREREQ([2.64])dnl We use AC_PATH_PROGS_FEATURE_CHECK 64*132f818dSEnji CooperAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 65*132f818dSEnji CooperAC_BEFORE([$0], [LT_LANG])dnl 66*132f818dSEnji CooperAC_BEFORE([$0], [LT_OUTPUT])dnl 67*132f818dSEnji CooperAC_BEFORE([$0], [LTDL_INIT])dnl 68*132f818dSEnji Cooperm4_require([_LT_CHECK_BUILDDIR])dnl 69*132f818dSEnji Cooper 70*132f818dSEnji Cooperdnl Autoconf doesn't catch unexpanded LT_ macros by default: 71*132f818dSEnji Cooperm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 72*132f818dSEnji Cooperm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 73*132f818dSEnji Cooperdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 74*132f818dSEnji Cooperdnl unless we require an AC_DEFUNed macro: 75*132f818dSEnji CooperAC_REQUIRE([LTOPTIONS_VERSION])dnl 76*132f818dSEnji CooperAC_REQUIRE([LTSUGAR_VERSION])dnl 77*132f818dSEnji CooperAC_REQUIRE([LTVERSION_VERSION])dnl 78*132f818dSEnji CooperAC_REQUIRE([LTOBSOLETE_VERSION])dnl 79*132f818dSEnji Cooperm4_require([_LT_PROG_LTMAIN])dnl 80*132f818dSEnji Cooper 81*132f818dSEnji Cooper_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 82*132f818dSEnji Cooper 83*132f818dSEnji Cooperdnl Parse OPTIONS 84*132f818dSEnji Cooper_LT_SET_OPTIONS([$0], [$1]) 85*132f818dSEnji Cooper 86*132f818dSEnji Cooper# This can be used to rebuild libtool when needed 87*132f818dSEnji CooperLIBTOOL_DEPS=$ltmain 88*132f818dSEnji Cooper 89*132f818dSEnji Cooper# Always use our own libtool. 90*132f818dSEnji CooperLIBTOOL='$(SHELL) $(top_builddir)/libtool' 91*132f818dSEnji CooperAC_SUBST(LIBTOOL)dnl 92*132f818dSEnji Cooper 93*132f818dSEnji Cooper_LT_SETUP 94*132f818dSEnji Cooper 95*132f818dSEnji Cooper# Only expand once: 96*132f818dSEnji Cooperm4_define([LT_INIT]) 97*132f818dSEnji Cooper])# LT_INIT 98*132f818dSEnji Cooper 99*132f818dSEnji Cooper# Old names: 100*132f818dSEnji CooperAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 101*132f818dSEnji CooperAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 102*132f818dSEnji Cooperdnl aclocal-1.4 backwards compatibility: 103*132f818dSEnji Cooperdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 104*132f818dSEnji Cooperdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 105*132f818dSEnji Cooper 106*132f818dSEnji Cooper 107*132f818dSEnji Cooper# _LT_PREPARE_CC_BASENAME 108*132f818dSEnji Cooper# ----------------------- 109*132f818dSEnji Cooperm4_defun([_LT_PREPARE_CC_BASENAME], [ 110*132f818dSEnji Cooper# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 111*132f818dSEnji Cooperfunc_cc_basename () 112*132f818dSEnji Cooper{ 113*132f818dSEnji Cooper for cc_temp in @S|@*""; do 114*132f818dSEnji Cooper case $cc_temp in 115*132f818dSEnji Cooper compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 116*132f818dSEnji Cooper distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 117*132f818dSEnji Cooper \-*) ;; 118*132f818dSEnji Cooper *) break;; 119*132f818dSEnji Cooper esac 120*132f818dSEnji Cooper done 121*132f818dSEnji Cooper func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 122*132f818dSEnji Cooper} 123*132f818dSEnji Cooper])# _LT_PREPARE_CC_BASENAME 124*132f818dSEnji Cooper 125*132f818dSEnji Cooper 126*132f818dSEnji Cooper# _LT_CC_BASENAME(CC) 127*132f818dSEnji Cooper# ------------------- 128*132f818dSEnji Cooper# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 129*132f818dSEnji Cooper# but that macro is also expanded into generated libtool script, which 130*132f818dSEnji Cooper# arranges for $SED and $ECHO to be set by different means. 131*132f818dSEnji Cooperm4_defun([_LT_CC_BASENAME], 132*132f818dSEnji Cooper[m4_require([_LT_PREPARE_CC_BASENAME])dnl 133*132f818dSEnji CooperAC_REQUIRE([_LT_DECL_SED])dnl 134*132f818dSEnji CooperAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 135*132f818dSEnji Cooperfunc_cc_basename $1 136*132f818dSEnji Coopercc_basename=$func_cc_basename_result 137*132f818dSEnji Cooper]) 138*132f818dSEnji Cooper 139*132f818dSEnji Cooper 140*132f818dSEnji Cooper# _LT_FILEUTILS_DEFAULTS 141*132f818dSEnji Cooper# ---------------------- 142*132f818dSEnji Cooper# It is okay to use these file commands and assume they have been set 143*132f818dSEnji Cooper# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 144*132f818dSEnji Cooperm4_defun([_LT_FILEUTILS_DEFAULTS], 145*132f818dSEnji Cooper[: ${CP="cp -f"} 146*132f818dSEnji Cooper: ${MV="mv -f"} 147*132f818dSEnji Cooper: ${RM="rm -f"} 148*132f818dSEnji Cooper])# _LT_FILEUTILS_DEFAULTS 149*132f818dSEnji Cooper 150*132f818dSEnji Cooper 151*132f818dSEnji Cooper# _LT_SETUP 152*132f818dSEnji Cooper# --------- 153*132f818dSEnji Cooperm4_defun([_LT_SETUP], 154*132f818dSEnji Cooper[AC_REQUIRE([AC_CANONICAL_HOST])dnl 155*132f818dSEnji CooperAC_REQUIRE([AC_CANONICAL_BUILD])dnl 156*132f818dSEnji CooperAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 157*132f818dSEnji CooperAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 158*132f818dSEnji Cooper 159*132f818dSEnji Cooper_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 160*132f818dSEnji Cooperdnl 161*132f818dSEnji Cooper_LT_DECL([], [host_alias], [0], [The host system])dnl 162*132f818dSEnji Cooper_LT_DECL([], [host], [0])dnl 163*132f818dSEnji Cooper_LT_DECL([], [host_os], [0])dnl 164*132f818dSEnji Cooperdnl 165*132f818dSEnji Cooper_LT_DECL([], [build_alias], [0], [The build system])dnl 166*132f818dSEnji Cooper_LT_DECL([], [build], [0])dnl 167*132f818dSEnji Cooper_LT_DECL([], [build_os], [0])dnl 168*132f818dSEnji Cooperdnl 169*132f818dSEnji CooperAC_REQUIRE([AC_PROG_CC])dnl 170*132f818dSEnji CooperAC_REQUIRE([LT_PATH_LD])dnl 171*132f818dSEnji CooperAC_REQUIRE([LT_PATH_NM])dnl 172*132f818dSEnji Cooperdnl 173*132f818dSEnji CooperAC_REQUIRE([AC_PROG_LN_S])dnl 174*132f818dSEnji Coopertest -z "$LN_S" && LN_S="ln -s" 175*132f818dSEnji Cooper_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 176*132f818dSEnji Cooperdnl 177*132f818dSEnji CooperAC_REQUIRE([LT_CMD_MAX_LEN])dnl 178*132f818dSEnji Cooper_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 179*132f818dSEnji Cooper_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 180*132f818dSEnji Cooperdnl 181*132f818dSEnji Cooperm4_require([_LT_FILEUTILS_DEFAULTS])dnl 182*132f818dSEnji Cooperm4_require([_LT_CHECK_SHELL_FEATURES])dnl 183*132f818dSEnji Cooperm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 184*132f818dSEnji Cooperm4_require([_LT_CMD_RELOAD])dnl 185*132f818dSEnji Cooperm4_require([_LT_DECL_FILECMD])dnl 186*132f818dSEnji Cooperm4_require([_LT_CHECK_MAGIC_METHOD])dnl 187*132f818dSEnji Cooperm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 188*132f818dSEnji Cooperm4_require([_LT_CMD_OLD_ARCHIVE])dnl 189*132f818dSEnji Cooperm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 190*132f818dSEnji Cooperm4_require([_LT_WITH_SYSROOT])dnl 191*132f818dSEnji Cooperm4_require([_LT_CMD_TRUNCATE])dnl 192*132f818dSEnji Cooper 193*132f818dSEnji Cooper_LT_CONFIG_LIBTOOL_INIT([ 194*132f818dSEnji Cooper# See if we are running on zsh, and set the options that allow our 195*132f818dSEnji Cooper# commands through without removal of \ escapes INIT. 196*132f818dSEnji Cooperif test -n "\${ZSH_VERSION+set}"; then 197*132f818dSEnji Cooper setopt NO_GLOB_SUBST 198*132f818dSEnji Cooperfi 199*132f818dSEnji Cooper]) 200*132f818dSEnji Cooperif test -n "${ZSH_VERSION+set}"; then 201*132f818dSEnji Cooper setopt NO_GLOB_SUBST 202*132f818dSEnji Cooperfi 203*132f818dSEnji Cooper 204*132f818dSEnji Cooper_LT_CHECK_OBJDIR 205*132f818dSEnji Cooper 206*132f818dSEnji Cooperm4_require([_LT_TAG_COMPILER])dnl 207*132f818dSEnji Cooper 208*132f818dSEnji Coopercase $host_os in 209*132f818dSEnji Cooperaix3*) 210*132f818dSEnji Cooper # AIX sometimes has problems with the GCC collect2 program. For some 211*132f818dSEnji Cooper # reason, if we set the COLLECT_NAMES environment variable, the problems 212*132f818dSEnji Cooper # vanish in a puff of smoke. 213*132f818dSEnji Cooper if test set != "${COLLECT_NAMES+set}"; then 214*132f818dSEnji Cooper COLLECT_NAMES= 215*132f818dSEnji Cooper export COLLECT_NAMES 216*132f818dSEnji Cooper fi 217*132f818dSEnji Cooper ;; 218*132f818dSEnji Cooperesac 219*132f818dSEnji Cooper 220*132f818dSEnji Cooper# Global variables: 221*132f818dSEnji Cooperofile=libtool 222*132f818dSEnji Coopercan_build_shared=yes 223*132f818dSEnji Cooper 224*132f818dSEnji Cooper# All known linkers require a '.a' archive for static linking (except MSVC and 225*132f818dSEnji Cooper# ICC, which need '.lib'). 226*132f818dSEnji Cooperlibext=a 227*132f818dSEnji Cooper 228*132f818dSEnji Cooperwith_gnu_ld=$lt_cv_prog_gnu_ld 229*132f818dSEnji Cooper 230*132f818dSEnji Cooperold_CC=$CC 231*132f818dSEnji Cooperold_CFLAGS=$CFLAGS 232*132f818dSEnji Cooper 233*132f818dSEnji Cooper# Set sane defaults for various variables 234*132f818dSEnji Coopertest -z "$CC" && CC=cc 235*132f818dSEnji Coopertest -z "$LTCC" && LTCC=$CC 236*132f818dSEnji Coopertest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 237*132f818dSEnji Coopertest -z "$LD" && LD=ld 238*132f818dSEnji Coopertest -z "$ac_objext" && ac_objext=o 239*132f818dSEnji Cooper 240*132f818dSEnji Cooper_LT_CC_BASENAME([$compiler]) 241*132f818dSEnji Cooper 242*132f818dSEnji Cooper# Only perform the check for file, if the check method requires it 243*132f818dSEnji Coopertest -z "$MAGIC_CMD" && MAGIC_CMD=file 244*132f818dSEnji Coopercase $deplibs_check_method in 245*132f818dSEnji Cooperfile_magic*) 246*132f818dSEnji Cooper if test "$file_magic_cmd" = '$MAGIC_CMD'; then 247*132f818dSEnji Cooper _LT_PATH_MAGIC 248*132f818dSEnji Cooper fi 249*132f818dSEnji Cooper ;; 250*132f818dSEnji Cooperesac 251*132f818dSEnji Cooper 252*132f818dSEnji Cooper# Use C for the default configuration in the libtool script 253*132f818dSEnji CooperLT_SUPPORTED_TAG([CC]) 254*132f818dSEnji Cooper_LT_LANG_C_CONFIG 255*132f818dSEnji Cooper_LT_LANG_DEFAULT_CONFIG 256*132f818dSEnji Cooper_LT_CONFIG_COMMANDS 257*132f818dSEnji Cooper])# _LT_SETUP 258*132f818dSEnji Cooper 259*132f818dSEnji Cooper 260*132f818dSEnji Cooper# _LT_PREPARE_SED_QUOTE_VARS 261*132f818dSEnji Cooper# -------------------------- 262*132f818dSEnji Cooper# Define a few sed substitution that help us do robust quoting. 263*132f818dSEnji Cooperm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 264*132f818dSEnji Cooper[# Backslashify metacharacters that are still active within 265*132f818dSEnji Cooper# double-quoted strings. 266*132f818dSEnji Coopersed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 267*132f818dSEnji Cooper 268*132f818dSEnji Cooper# Same as above, but do not quote variable references. 269*132f818dSEnji Cooperdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 270*132f818dSEnji Cooper 271*132f818dSEnji Cooper# Sed substitution to delay expansion of an escaped shell variable in a 272*132f818dSEnji Cooper# double_quote_subst'ed string. 273*132f818dSEnji Cooperdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 274*132f818dSEnji Cooper 275*132f818dSEnji Cooper# Sed substitution to delay expansion of an escaped single quote. 276*132f818dSEnji Cooperdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 277*132f818dSEnji Cooper 278*132f818dSEnji Cooper# Sed substitution to avoid accidental globbing in evaled expressions 279*132f818dSEnji Cooperno_glob_subst='s/\*/\\\*/g' 280*132f818dSEnji Cooper]) 281*132f818dSEnji Cooper 282*132f818dSEnji Cooper# _LT_PROG_LTMAIN 283*132f818dSEnji Cooper# --------------- 284*132f818dSEnji Cooper# Note that this code is called both from 'configure', and 'config.status' 285*132f818dSEnji Cooper# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 286*132f818dSEnji Cooper# 'config.status' has no value for ac_aux_dir unless we are using Automake, 287*132f818dSEnji Cooper# so we pass a copy along to make sure it has a sensible value anyway. 288*132f818dSEnji Cooperm4_defun([_LT_PROG_LTMAIN], 289*132f818dSEnji Cooper[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 290*132f818dSEnji Cooper_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 291*132f818dSEnji Cooperltmain=$ac_aux_dir/ltmain.sh 292*132f818dSEnji Cooper])# _LT_PROG_LTMAIN 293*132f818dSEnji Cooper 294*132f818dSEnji Cooper 295*132f818dSEnji Cooper## ------------------------------------- ## 296*132f818dSEnji Cooper## Accumulate code for creating libtool. ## 297*132f818dSEnji Cooper## ------------------------------------- ## 298*132f818dSEnji Cooper 299*132f818dSEnji Cooper# So that we can recreate a full libtool script including additional 300*132f818dSEnji Cooper# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 301*132f818dSEnji Cooper# in macros and then make a single call at the end using the 'libtool' 302*132f818dSEnji Cooper# label. 303*132f818dSEnji Cooper 304*132f818dSEnji Cooper 305*132f818dSEnji Cooper# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 306*132f818dSEnji Cooper# ---------------------------------------- 307*132f818dSEnji Cooper# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 308*132f818dSEnji Cooperm4_define([_LT_CONFIG_LIBTOOL_INIT], 309*132f818dSEnji Cooper[m4_ifval([$1], 310*132f818dSEnji Cooper [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 311*132f818dSEnji Cooper [$1 312*132f818dSEnji Cooper])])]) 313*132f818dSEnji Cooper 314*132f818dSEnji Cooper# Initialize. 315*132f818dSEnji Cooperm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 316*132f818dSEnji Cooper 317*132f818dSEnji Cooper 318*132f818dSEnji Cooper# _LT_CONFIG_LIBTOOL([COMMANDS]) 319*132f818dSEnji Cooper# ------------------------------ 320*132f818dSEnji Cooper# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 321*132f818dSEnji Cooperm4_define([_LT_CONFIG_LIBTOOL], 322*132f818dSEnji Cooper[m4_ifval([$1], 323*132f818dSEnji Cooper [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 324*132f818dSEnji Cooper [$1 325*132f818dSEnji Cooper])])]) 326*132f818dSEnji Cooper 327*132f818dSEnji Cooper# Initialize. 328*132f818dSEnji Cooperm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 329*132f818dSEnji Cooper 330*132f818dSEnji Cooper 331*132f818dSEnji Cooper# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 332*132f818dSEnji Cooper# ----------------------------------------------------- 333*132f818dSEnji Cooperm4_defun([_LT_CONFIG_SAVE_COMMANDS], 334*132f818dSEnji Cooper[_LT_CONFIG_LIBTOOL([$1]) 335*132f818dSEnji Cooper_LT_CONFIG_LIBTOOL_INIT([$2]) 336*132f818dSEnji Cooper]) 337*132f818dSEnji Cooper 338*132f818dSEnji Cooper 339*132f818dSEnji Cooper# _LT_FORMAT_COMMENT([COMMENT]) 340*132f818dSEnji Cooper# ----------------------------- 341*132f818dSEnji Cooper# Add leading comment marks to the start of each line, and a trailing 342*132f818dSEnji Cooper# full-stop to the whole comment if one is not present already. 343*132f818dSEnji Cooperm4_define([_LT_FORMAT_COMMENT], 344*132f818dSEnji Cooper[m4_ifval([$1], [ 345*132f818dSEnji Cooperm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 346*132f818dSEnji Cooper [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 347*132f818dSEnji Cooper)]) 348*132f818dSEnji Cooper 349*132f818dSEnji Cooper 350*132f818dSEnji Cooper 351*132f818dSEnji Cooper## ------------------------ ## 352*132f818dSEnji Cooper## FIXME: Eliminate VARNAME ## 353*132f818dSEnji Cooper## ------------------------ ## 354*132f818dSEnji Cooper 355*132f818dSEnji Cooper 356*132f818dSEnji Cooper# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 357*132f818dSEnji Cooper# ------------------------------------------------------------------- 358*132f818dSEnji Cooper# CONFIGNAME is the name given to the value in the libtool script. 359*132f818dSEnji Cooper# VARNAME is the (base) name used in the configure script. 360*132f818dSEnji Cooper# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 361*132f818dSEnji Cooper# VARNAME. Any other value will be used directly. 362*132f818dSEnji Cooperm4_define([_LT_DECL], 363*132f818dSEnji Cooper[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 364*132f818dSEnji Cooper [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 365*132f818dSEnji Cooper [m4_ifval([$1], [$1], [$2])]) 366*132f818dSEnji Cooper lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 367*132f818dSEnji Cooper m4_ifval([$4], 368*132f818dSEnji Cooper [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 369*132f818dSEnji Cooper lt_dict_add_subkey([lt_decl_dict], [$2], 370*132f818dSEnji Cooper [tagged?], [m4_ifval([$5], [yes], [no])])]) 371*132f818dSEnji Cooper]) 372*132f818dSEnji Cooper 373*132f818dSEnji Cooper 374*132f818dSEnji Cooper# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 375*132f818dSEnji Cooper# -------------------------------------------------------- 376*132f818dSEnji Cooperm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 377*132f818dSEnji Cooper 378*132f818dSEnji Cooper 379*132f818dSEnji Cooper# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 380*132f818dSEnji Cooper# ------------------------------------------------ 381*132f818dSEnji Cooperm4_define([lt_decl_tag_varnames], 382*132f818dSEnji Cooper[_lt_decl_filter([tagged?], [yes], $@)]) 383*132f818dSEnji Cooper 384*132f818dSEnji Cooper 385*132f818dSEnji Cooper# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 386*132f818dSEnji Cooper# --------------------------------------------------------- 387*132f818dSEnji Cooperm4_define([_lt_decl_filter], 388*132f818dSEnji Cooper[m4_case([$#], 389*132f818dSEnji Cooper [0], [m4_fatal([$0: too few arguments: $#])], 390*132f818dSEnji Cooper [1], [m4_fatal([$0: too few arguments: $#: $1])], 391*132f818dSEnji Cooper [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 392*132f818dSEnji Cooper [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 393*132f818dSEnji Cooper [lt_dict_filter([lt_decl_dict], $@)])[]dnl 394*132f818dSEnji Cooper]) 395*132f818dSEnji Cooper 396*132f818dSEnji Cooper 397*132f818dSEnji Cooper# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 398*132f818dSEnji Cooper# -------------------------------------------------- 399*132f818dSEnji Cooperm4_define([lt_decl_quote_varnames], 400*132f818dSEnji Cooper[_lt_decl_filter([value], [1], $@)]) 401*132f818dSEnji Cooper 402*132f818dSEnji Cooper 403*132f818dSEnji Cooper# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 404*132f818dSEnji Cooper# --------------------------------------------------- 405*132f818dSEnji Cooperm4_define([lt_decl_dquote_varnames], 406*132f818dSEnji Cooper[_lt_decl_filter([value], [2], $@)]) 407*132f818dSEnji Cooper 408*132f818dSEnji Cooper 409*132f818dSEnji Cooper# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 410*132f818dSEnji Cooper# --------------------------------------------------- 411*132f818dSEnji Cooperm4_define([lt_decl_varnames_tagged], 412*132f818dSEnji Cooper[m4_assert([$# <= 2])dnl 413*132f818dSEnji Cooper_$0(m4_quote(m4_default([$1], [[, ]])), 414*132f818dSEnji Cooper m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 415*132f818dSEnji Cooper m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 416*132f818dSEnji Cooperm4_define([_lt_decl_varnames_tagged], 417*132f818dSEnji Cooper[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 418*132f818dSEnji Cooper 419*132f818dSEnji Cooper 420*132f818dSEnji Cooper# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 421*132f818dSEnji Cooper# ------------------------------------------------ 422*132f818dSEnji Cooperm4_define([lt_decl_all_varnames], 423*132f818dSEnji Cooper[_$0(m4_quote(m4_default([$1], [[, ]])), 424*132f818dSEnji Cooper m4_if([$2], [], 425*132f818dSEnji Cooper m4_quote(lt_decl_varnames), 426*132f818dSEnji Cooper m4_quote(m4_shift($@))))[]dnl 427*132f818dSEnji Cooper]) 428*132f818dSEnji Cooperm4_define([_lt_decl_all_varnames], 429*132f818dSEnji Cooper[lt_join($@, lt_decl_varnames_tagged([$1], 430*132f818dSEnji Cooper lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 431*132f818dSEnji Cooper]) 432*132f818dSEnji Cooper 433*132f818dSEnji Cooper 434*132f818dSEnji Cooper# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 435*132f818dSEnji Cooper# ------------------------------------ 436*132f818dSEnji Cooper# Quote a variable value, and forward it to 'config.status' so that its 437*132f818dSEnji Cooper# declaration there will have the same value as in 'configure'. VARNAME 438*132f818dSEnji Cooper# must have a single quote delimited value for this to work. 439*132f818dSEnji Cooperm4_define([_LT_CONFIG_STATUS_DECLARE], 440*132f818dSEnji Cooper[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 441*132f818dSEnji Cooper 442*132f818dSEnji Cooper 443*132f818dSEnji Cooper# _LT_CONFIG_STATUS_DECLARATIONS 444*132f818dSEnji Cooper# ------------------------------ 445*132f818dSEnji Cooper# We delimit libtool config variables with single quotes, so when 446*132f818dSEnji Cooper# we write them to config.status, we have to be sure to quote all 447*132f818dSEnji Cooper# embedded single quotes properly. In configure, this macro expands 448*132f818dSEnji Cooper# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 449*132f818dSEnji Cooper# 450*132f818dSEnji Cooper# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 451*132f818dSEnji Cooperm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 452*132f818dSEnji Cooper[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 453*132f818dSEnji Cooper [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 454*132f818dSEnji Cooper 455*132f818dSEnji Cooper 456*132f818dSEnji Cooper# _LT_LIBTOOL_TAGS 457*132f818dSEnji Cooper# ---------------- 458*132f818dSEnji Cooper# Output comment and list of tags supported by the script 459*132f818dSEnji Cooperm4_defun([_LT_LIBTOOL_TAGS], 460*132f818dSEnji Cooper[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 461*132f818dSEnji Cooperavailable_tags='_LT_TAGS'dnl 462*132f818dSEnji Cooper]) 463*132f818dSEnji Cooper 464*132f818dSEnji Cooper 465*132f818dSEnji Cooper# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 466*132f818dSEnji Cooper# ----------------------------------- 467*132f818dSEnji Cooper# Extract the dictionary values for VARNAME (optionally with TAG) and 468*132f818dSEnji Cooper# expand to a commented shell variable setting: 469*132f818dSEnji Cooper# 470*132f818dSEnji Cooper# # Some comment about what VAR is for. 471*132f818dSEnji Cooper# visible_name=$lt_internal_name 472*132f818dSEnji Cooperm4_define([_LT_LIBTOOL_DECLARE], 473*132f818dSEnji Cooper[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 474*132f818dSEnji Cooper [description])))[]dnl 475*132f818dSEnji Cooperm4_pushdef([_libtool_name], 476*132f818dSEnji Cooper m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 477*132f818dSEnji Cooperm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 478*132f818dSEnji Cooper [0], [_libtool_name=[$]$1], 479*132f818dSEnji Cooper [1], [_libtool_name=$lt_[]$1], 480*132f818dSEnji Cooper [2], [_libtool_name=$lt_[]$1], 481*132f818dSEnji Cooper [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 482*132f818dSEnji Cooperm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 483*132f818dSEnji Cooper]) 484*132f818dSEnji Cooper 485*132f818dSEnji Cooper 486*132f818dSEnji Cooper# _LT_LIBTOOL_CONFIG_VARS 487*132f818dSEnji Cooper# ----------------------- 488*132f818dSEnji Cooper# Produce commented declarations of non-tagged libtool config variables 489*132f818dSEnji Cooper# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 490*132f818dSEnji Cooper# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 491*132f818dSEnji Cooper# section) are produced by _LT_LIBTOOL_TAG_VARS. 492*132f818dSEnji Cooperm4_defun([_LT_LIBTOOL_CONFIG_VARS], 493*132f818dSEnji Cooper[m4_foreach([_lt_var], 494*132f818dSEnji Cooper m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 495*132f818dSEnji Cooper [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 496*132f818dSEnji Cooper 497*132f818dSEnji Cooper 498*132f818dSEnji Cooper# _LT_LIBTOOL_TAG_VARS(TAG) 499*132f818dSEnji Cooper# ------------------------- 500*132f818dSEnji Cooperm4_define([_LT_LIBTOOL_TAG_VARS], 501*132f818dSEnji Cooper[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 502*132f818dSEnji Cooper [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 503*132f818dSEnji Cooper 504*132f818dSEnji Cooper 505*132f818dSEnji Cooper# _LT_TAGVAR(VARNAME, [TAGNAME]) 506*132f818dSEnji Cooper# ------------------------------ 507*132f818dSEnji Cooperm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 508*132f818dSEnji Cooper 509*132f818dSEnji Cooper 510*132f818dSEnji Cooper# _LT_CONFIG_COMMANDS 511*132f818dSEnji Cooper# ------------------- 512*132f818dSEnji Cooper# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 513*132f818dSEnji Cooper# variables for single and double quote escaping we saved from calls 514*132f818dSEnji Cooper# to _LT_DECL, we can put quote escaped variables declarations 515*132f818dSEnji Cooper# into 'config.status', and then the shell code to quote escape them in 516*132f818dSEnji Cooper# for loops in 'config.status'. Finally, any additional code accumulated 517*132f818dSEnji Cooper# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 518*132f818dSEnji Cooperm4_defun([_LT_CONFIG_COMMANDS], 519*132f818dSEnji Cooper[AC_PROVIDE_IFELSE([LT_OUTPUT], 520*132f818dSEnji Cooper dnl If the libtool generation code has been placed in $CONFIG_LT, 521*132f818dSEnji Cooper dnl instead of duplicating it all over again into config.status, 522*132f818dSEnji Cooper dnl then we will have config.status run $CONFIG_LT later, so it 523*132f818dSEnji Cooper dnl needs to know what name is stored there: 524*132f818dSEnji Cooper [AC_CONFIG_COMMANDS([libtool], 525*132f818dSEnji Cooper [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 526*132f818dSEnji Cooper dnl If the libtool generation code is destined for config.status, 527*132f818dSEnji Cooper dnl expand the accumulated commands and init code now: 528*132f818dSEnji Cooper [AC_CONFIG_COMMANDS([libtool], 529*132f818dSEnji Cooper [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 530*132f818dSEnji Cooper])#_LT_CONFIG_COMMANDS 531*132f818dSEnji Cooper 532*132f818dSEnji Cooper 533*132f818dSEnji Cooper# Initialize. 534*132f818dSEnji Cooperm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 535*132f818dSEnji Cooper[ 536*132f818dSEnji Cooper 537*132f818dSEnji Cooper# The HP-UX ksh and POSIX shell print the target directory to stdout 538*132f818dSEnji Cooper# if CDPATH is set. 539*132f818dSEnji Cooper(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 540*132f818dSEnji Cooper 541*132f818dSEnji Coopersed_quote_subst='$sed_quote_subst' 542*132f818dSEnji Cooperdouble_quote_subst='$double_quote_subst' 543*132f818dSEnji Cooperdelay_variable_subst='$delay_variable_subst' 544*132f818dSEnji Cooper_LT_CONFIG_STATUS_DECLARATIONS 545*132f818dSEnji CooperLTCC='$LTCC' 546*132f818dSEnji CooperLTCFLAGS='$LTCFLAGS' 547*132f818dSEnji Coopercompiler='$compiler_DEFAULT' 548*132f818dSEnji Cooper 549*132f818dSEnji Cooper# A function that is used when there is no print builtin or printf. 550*132f818dSEnji Cooperfunc_fallback_echo () 551*132f818dSEnji Cooper{ 552*132f818dSEnji Cooper eval 'cat <<_LTECHO_EOF 553*132f818dSEnji Cooper\$[]1 554*132f818dSEnji Cooper_LTECHO_EOF' 555*132f818dSEnji Cooper} 556*132f818dSEnji Cooper 557*132f818dSEnji Cooper# Quote evaled strings. 558*132f818dSEnji Cooperfor var in lt_decl_all_varnames([[ \ 559*132f818dSEnji Cooper]], lt_decl_quote_varnames); do 560*132f818dSEnji Cooper case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 561*132f818dSEnji Cooper *[[\\\\\\\`\\"\\\$]]*) 562*132f818dSEnji Cooper eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 563*132f818dSEnji Cooper ;; 564*132f818dSEnji Cooper *) 565*132f818dSEnji Cooper eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 566*132f818dSEnji Cooper ;; 567*132f818dSEnji Cooper esac 568*132f818dSEnji Cooperdone 569*132f818dSEnji Cooper 570*132f818dSEnji Cooper# Double-quote double-evaled strings. 571*132f818dSEnji Cooperfor var in lt_decl_all_varnames([[ \ 572*132f818dSEnji Cooper]], lt_decl_dquote_varnames); do 573*132f818dSEnji Cooper case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 574*132f818dSEnji Cooper *[[\\\\\\\`\\"\\\$]]*) 575*132f818dSEnji Cooper eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 576*132f818dSEnji Cooper ;; 577*132f818dSEnji Cooper *) 578*132f818dSEnji Cooper eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 579*132f818dSEnji Cooper ;; 580*132f818dSEnji Cooper esac 581*132f818dSEnji Cooperdone 582*132f818dSEnji Cooper 583*132f818dSEnji Cooper_LT_OUTPUT_LIBTOOL_INIT 584*132f818dSEnji Cooper]) 585*132f818dSEnji Cooper 586*132f818dSEnji Cooper# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 587*132f818dSEnji Cooper# ------------------------------------ 588*132f818dSEnji Cooper# Generate a child script FILE with all initialization necessary to 589*132f818dSEnji Cooper# reuse the environment learned by the parent script, and make the 590*132f818dSEnji Cooper# file executable. If COMMENT is supplied, it is inserted after the 591*132f818dSEnji Cooper# '#!' sequence but before initialization text begins. After this 592*132f818dSEnji Cooper# macro, additional text can be appended to FILE to form the body of 593*132f818dSEnji Cooper# the child script. The macro ends with non-zero status if the 594*132f818dSEnji Cooper# file could not be fully written (such as if the disk is full). 595*132f818dSEnji Cooperm4_ifdef([AS_INIT_GENERATED], 596*132f818dSEnji Cooper[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 597*132f818dSEnji Cooper[m4_defun([_LT_GENERATED_FILE_INIT], 598*132f818dSEnji Cooper[m4_require([AS_PREPARE])]dnl 599*132f818dSEnji Cooper[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 600*132f818dSEnji Cooper[lt_write_fail=0 601*132f818dSEnji Coopercat >$1 <<_ASEOF || lt_write_fail=1 602*132f818dSEnji Cooper#! $SHELL 603*132f818dSEnji Cooper# Generated by $as_me. 604*132f818dSEnji Cooper$2 605*132f818dSEnji CooperSHELL=\${CONFIG_SHELL-$SHELL} 606*132f818dSEnji Cooperexport SHELL 607*132f818dSEnji Cooper_ASEOF 608*132f818dSEnji Coopercat >>$1 <<\_ASEOF || lt_write_fail=1 609*132f818dSEnji CooperAS_SHELL_SANITIZE 610*132f818dSEnji Cooper_AS_PREPARE 611*132f818dSEnji Cooperexec AS_MESSAGE_FD>&1 612*132f818dSEnji Cooper_ASEOF 613*132f818dSEnji Coopertest 0 = "$lt_write_fail" && chmod +x $1[]dnl 614*132f818dSEnji Cooperm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 615*132f818dSEnji Cooper 616*132f818dSEnji Cooper# LT_OUTPUT 617*132f818dSEnji Cooper# --------- 618*132f818dSEnji Cooper# This macro allows early generation of the libtool script (before 619*132f818dSEnji Cooper# AC_OUTPUT is called), in case it is used in configure for compilation 620*132f818dSEnji Cooper# tests. 621*132f818dSEnji CooperAC_DEFUN([LT_OUTPUT], 622*132f818dSEnji Cooper[: ${CONFIG_LT=./config.lt} 623*132f818dSEnji CooperAC_MSG_NOTICE([creating $CONFIG_LT]) 624*132f818dSEnji Cooper_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 625*132f818dSEnji Cooper[# Run this file to recreate a libtool stub with the current configuration.]) 626*132f818dSEnji Cooper 627*132f818dSEnji Coopercat >>"$CONFIG_LT" <<\_LTEOF 628*132f818dSEnji Cooperlt_cl_silent=false 629*132f818dSEnji Cooperexec AS_MESSAGE_LOG_FD>>config.log 630*132f818dSEnji Cooper{ 631*132f818dSEnji Cooper echo 632*132f818dSEnji Cooper AS_BOX([Running $as_me.]) 633*132f818dSEnji Cooper} >&AS_MESSAGE_LOG_FD 634*132f818dSEnji Cooper 635*132f818dSEnji Cooperlt_cl_help="\ 636*132f818dSEnji Cooper'$as_me' creates a local libtool stub from the current configuration, 637*132f818dSEnji Cooperfor use in further configure time tests before the real libtool is 638*132f818dSEnji Coopergenerated. 639*132f818dSEnji Cooper 640*132f818dSEnji CooperUsage: $[0] [[OPTIONS]] 641*132f818dSEnji Cooper 642*132f818dSEnji Cooper -h, --help print this help, then exit 643*132f818dSEnji Cooper -V, --version print version number, then exit 644*132f818dSEnji Cooper -q, --quiet do not print progress messages 645*132f818dSEnji Cooper -d, --debug don't remove temporary files 646*132f818dSEnji Cooper 647*132f818dSEnji CooperReport bugs to <bug-libtool@gnu.org>." 648*132f818dSEnji Cooper 649*132f818dSEnji Cooperlt_cl_version="\ 650*132f818dSEnji Cooperm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 651*132f818dSEnji Cooperm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 652*132f818dSEnji Cooperconfigured by $[0], generated by m4_PACKAGE_STRING. 653*132f818dSEnji Cooper 654*132f818dSEnji CooperCopyright (C) 2024 Free Software Foundation, Inc. 655*132f818dSEnji CooperThis config.lt script is free software; the Free Software Foundation 656*132f818dSEnji Coopergives unlimited permission to copy, distribute and modify it." 657*132f818dSEnji Cooper 658*132f818dSEnji Cooperwhile test 0 != $[#] 659*132f818dSEnji Cooperdo 660*132f818dSEnji Cooper case $[1] in 661*132f818dSEnji Cooper --version | --v* | -V ) 662*132f818dSEnji Cooper echo "$lt_cl_version"; exit 0 ;; 663*132f818dSEnji Cooper --help | --h* | -h ) 664*132f818dSEnji Cooper echo "$lt_cl_help"; exit 0 ;; 665*132f818dSEnji Cooper --debug | --d* | -d ) 666*132f818dSEnji Cooper debug=: ;; 667*132f818dSEnji Cooper --quiet | --q* | --silent | --s* | -q ) 668*132f818dSEnji Cooper lt_cl_silent=: ;; 669*132f818dSEnji Cooper 670*132f818dSEnji Cooper -*) AC_MSG_ERROR([unrecognized option: $[1] 671*132f818dSEnji CooperTry '$[0] --help' for more information.]) ;; 672*132f818dSEnji Cooper 673*132f818dSEnji Cooper *) AC_MSG_ERROR([unrecognized argument: $[1] 674*132f818dSEnji CooperTry '$[0] --help' for more information.]) ;; 675*132f818dSEnji Cooper esac 676*132f818dSEnji Cooper shift 677*132f818dSEnji Cooperdone 678*132f818dSEnji Cooper 679*132f818dSEnji Cooperif $lt_cl_silent; then 680*132f818dSEnji Cooper exec AS_MESSAGE_FD>/dev/null 681*132f818dSEnji Cooperfi 682*132f818dSEnji Cooper_LTEOF 683*132f818dSEnji Cooper 684*132f818dSEnji Coopercat >>"$CONFIG_LT" <<_LTEOF 685*132f818dSEnji Cooper_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 686*132f818dSEnji Cooper_LTEOF 687*132f818dSEnji Cooper 688*132f818dSEnji Coopercat >>"$CONFIG_LT" <<\_LTEOF 689*132f818dSEnji CooperAC_MSG_NOTICE([creating $ofile]) 690*132f818dSEnji Cooper_LT_OUTPUT_LIBTOOL_COMMANDS 691*132f818dSEnji CooperAS_EXIT(0) 692*132f818dSEnji Cooper_LTEOF 693*132f818dSEnji Cooperchmod +x "$CONFIG_LT" 694*132f818dSEnji Cooper 695*132f818dSEnji Cooper# configure is writing to config.log, but config.lt does its own redirection, 696*132f818dSEnji Cooper# appending to config.log, which fails on DOS, as config.log is still kept 697*132f818dSEnji Cooper# open by configure. Here we exec the FD to /dev/null, effectively closing 698*132f818dSEnji Cooper# config.log, so it can be properly (re)opened and appended to by config.lt. 699*132f818dSEnji Cooperlt_cl_success=: 700*132f818dSEnji Coopertest yes = "$silent" && 701*132f818dSEnji Cooper lt_config_lt_args="$lt_config_lt_args --quiet" 702*132f818dSEnji Cooperexec AS_MESSAGE_LOG_FD>/dev/null 703*132f818dSEnji Cooper$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 704*132f818dSEnji Cooperexec AS_MESSAGE_LOG_FD>>config.log 705*132f818dSEnji Cooper$lt_cl_success || AS_EXIT(1) 706*132f818dSEnji Cooper])# LT_OUTPUT 707*132f818dSEnji Cooper 708*132f818dSEnji Cooper 709*132f818dSEnji Cooper# _LT_CONFIG(TAG) 710*132f818dSEnji Cooper# --------------- 711*132f818dSEnji Cooper# If TAG is the built-in tag, create an initial libtool script with a 712*132f818dSEnji Cooper# default configuration from the untagged config vars. Otherwise add code 713*132f818dSEnji Cooper# to config.status for appending the configuration named by TAG from the 714*132f818dSEnji Cooper# matching tagged config vars. 715*132f818dSEnji Cooperm4_defun([_LT_CONFIG], 716*132f818dSEnji Cooper[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 717*132f818dSEnji Cooper_LT_CONFIG_SAVE_COMMANDS([ 718*132f818dSEnji Cooper m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 719*132f818dSEnji Cooper m4_if(_LT_TAG, [C], [ 720*132f818dSEnji Cooper # See if we are running on zsh, and set the options that allow our 721*132f818dSEnji Cooper # commands through without removal of \ escapes. 722*132f818dSEnji Cooper if test -n "${ZSH_VERSION+set}"; then 723*132f818dSEnji Cooper setopt NO_GLOB_SUBST 724*132f818dSEnji Cooper fi 725*132f818dSEnji Cooper 726*132f818dSEnji Cooper cfgfile=${ofile}T 727*132f818dSEnji Cooper trap "$RM \"$cfgfile\"; exit 1" 1 2 15 728*132f818dSEnji Cooper $RM "$cfgfile" 729*132f818dSEnji Cooper 730*132f818dSEnji Cooper cat <<_LT_EOF >> "$cfgfile" 731*132f818dSEnji Cooper#! $SHELL 732*132f818dSEnji Cooper# Generated automatically by $as_me ($PACKAGE) $VERSION 733*132f818dSEnji Cooper# NOTE: Changes made to this file will be lost: look at ltmain.sh. 734*132f818dSEnji Cooper 735*132f818dSEnji Cooper# Provide generalized library-building support services. 736*132f818dSEnji Cooper# Written by Gordon Matzigkeit, 1996 737*132f818dSEnji Cooper 738*132f818dSEnji Cooper_LT_COPYING 739*132f818dSEnji Cooper_LT_LIBTOOL_TAGS 740*132f818dSEnji Cooper 741*132f818dSEnji Cooper# Configured defaults for sys_lib_dlsearch_path munging. 742*132f818dSEnji Cooper: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 743*132f818dSEnji Cooper 744*132f818dSEnji Cooper# ### BEGIN LIBTOOL CONFIG 745*132f818dSEnji Cooper_LT_LIBTOOL_CONFIG_VARS 746*132f818dSEnji Cooper_LT_LIBTOOL_TAG_VARS 747*132f818dSEnji Cooper# ### END LIBTOOL CONFIG 748*132f818dSEnji Cooper 749*132f818dSEnji Cooper_LT_EOF 750*132f818dSEnji Cooper 751*132f818dSEnji Cooper cat <<'_LT_EOF' >> "$cfgfile" 752*132f818dSEnji Cooper 753*132f818dSEnji Cooper# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 754*132f818dSEnji Cooper 755*132f818dSEnji Cooper_LT_PREPARE_MUNGE_PATH_LIST 756*132f818dSEnji Cooper_LT_PREPARE_CC_BASENAME 757*132f818dSEnji Cooper 758*132f818dSEnji Cooper# ### END FUNCTIONS SHARED WITH CONFIGURE 759*132f818dSEnji Cooper 760*132f818dSEnji Cooper_LT_EOF 761*132f818dSEnji Cooper 762*132f818dSEnji Cooper case $host_os in 763*132f818dSEnji Cooper aix3*) 764*132f818dSEnji Cooper cat <<\_LT_EOF >> "$cfgfile" 765*132f818dSEnji Cooper# AIX sometimes has problems with the GCC collect2 program. For some 766*132f818dSEnji Cooper# reason, if we set the COLLECT_NAMES environment variable, the problems 767*132f818dSEnji Cooper# vanish in a puff of smoke. 768*132f818dSEnji Cooperif test set != "${COLLECT_NAMES+set}"; then 769*132f818dSEnji Cooper COLLECT_NAMES= 770*132f818dSEnji Cooper export COLLECT_NAMES 771*132f818dSEnji Cooperfi 772*132f818dSEnji Cooper_LT_EOF 773*132f818dSEnji Cooper ;; 774*132f818dSEnji Cooper esac 775*132f818dSEnji Cooper 776*132f818dSEnji Cooper _LT_PROG_LTMAIN 777*132f818dSEnji Cooper 778*132f818dSEnji Cooper # We use sed instead of cat because bash on DJGPP gets confused if 779*132f818dSEnji Cooper # if finds mixed CR/LF and LF-only lines. Since sed operates in 780*132f818dSEnji Cooper # text mode, it properly converts lines to CR/LF. This bash problem 781*132f818dSEnji Cooper # is reportedly fixed, but why not run on old versions too? 782*132f818dSEnji Cooper $SED '$q' "$ltmain" >> "$cfgfile" \ 783*132f818dSEnji Cooper || (rm -f "$cfgfile"; exit 1) 784*132f818dSEnji Cooper 785*132f818dSEnji Cooper mv -f "$cfgfile" "$ofile" || 786*132f818dSEnji Cooper (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 787*132f818dSEnji Cooper chmod +x "$ofile" 788*132f818dSEnji Cooper], 789*132f818dSEnji Cooper[cat <<_LT_EOF >> "$ofile" 790*132f818dSEnji Cooper 791*132f818dSEnji Cooperdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 792*132f818dSEnji Cooperdnl in a comment (ie after a #). 793*132f818dSEnji Cooper# ### BEGIN LIBTOOL TAG CONFIG: $1 794*132f818dSEnji Cooper_LT_LIBTOOL_TAG_VARS(_LT_TAG) 795*132f818dSEnji Cooper# ### END LIBTOOL TAG CONFIG: $1 796*132f818dSEnji Cooper_LT_EOF 797*132f818dSEnji Cooper])dnl /m4_if 798*132f818dSEnji Cooper], 799*132f818dSEnji Cooper[m4_if([$1], [], [ 800*132f818dSEnji Cooper PACKAGE='$PACKAGE' 801*132f818dSEnji Cooper VERSION='$VERSION' 802*132f818dSEnji Cooper RM='$RM' 803*132f818dSEnji Cooper ofile='$ofile'], []) 804*132f818dSEnji Cooper])dnl /_LT_CONFIG_SAVE_COMMANDS 805*132f818dSEnji Cooper])# _LT_CONFIG 806*132f818dSEnji Cooper 807*132f818dSEnji Cooper 808*132f818dSEnji Cooper# LT_SUPPORTED_TAG(TAG) 809*132f818dSEnji Cooper# --------------------- 810*132f818dSEnji Cooper# Trace this macro to discover what tags are supported by the libtool 811*132f818dSEnji Cooper# --tag option, using: 812*132f818dSEnji Cooper# autoconf --trace 'LT_SUPPORTED_TAG:$1' 813*132f818dSEnji CooperAC_DEFUN([LT_SUPPORTED_TAG], []) 814*132f818dSEnji Cooper 815*132f818dSEnji Cooper 816*132f818dSEnji Cooper# C support is built-in for now 817*132f818dSEnji Cooperm4_define([_LT_LANG_C_enabled], []) 818*132f818dSEnji Cooperm4_define([_LT_TAGS], []) 819*132f818dSEnji Cooper 820*132f818dSEnji Cooper 821*132f818dSEnji Cooper# LT_LANG(LANG) 822*132f818dSEnji Cooper# ------------- 823*132f818dSEnji Cooper# Enable libtool support for the given language if not already enabled. 824*132f818dSEnji CooperAC_DEFUN([LT_LANG], 825*132f818dSEnji Cooper[AC_BEFORE([$0], [LT_OUTPUT])dnl 826*132f818dSEnji Cooperm4_case([$1], 827*132f818dSEnji Cooper [C], [_LT_LANG(C)], 828*132f818dSEnji Cooper [C++], [_LT_LANG(CXX)], 829*132f818dSEnji Cooper [Go], [_LT_LANG(GO)], 830*132f818dSEnji Cooper [Java], [_LT_LANG(GCJ)], 831*132f818dSEnji Cooper [Fortran 77], [_LT_LANG(F77)], 832*132f818dSEnji Cooper [Fortran], [_LT_LANG(FC)], 833*132f818dSEnji Cooper [Windows Resource], [_LT_LANG(RC)], 834*132f818dSEnji Cooper [m4_ifdef([_LT_LANG_]$1[_CONFIG], 835*132f818dSEnji Cooper [_LT_LANG($1)], 836*132f818dSEnji Cooper [m4_fatal([$0: unsupported language: "$1"])])])dnl 837*132f818dSEnji Cooper])# LT_LANG 838*132f818dSEnji Cooper 839*132f818dSEnji Cooper 840*132f818dSEnji Cooper# _LT_LANG(LANGNAME) 841*132f818dSEnji Cooper# ------------------ 842*132f818dSEnji Cooperm4_defun([_LT_LANG], 843*132f818dSEnji Cooper[m4_ifdef([_LT_LANG_]$1[_enabled], [], 844*132f818dSEnji Cooper [LT_SUPPORTED_TAG([$1])dnl 845*132f818dSEnji Cooper m4_append([_LT_TAGS], [$1 ])dnl 846*132f818dSEnji Cooper m4_define([_LT_LANG_]$1[_enabled], [])dnl 847*132f818dSEnji Cooper _LT_LANG_$1_CONFIG($1)])dnl 848*132f818dSEnji Cooper])# _LT_LANG 849*132f818dSEnji Cooper 850*132f818dSEnji Cooper 851*132f818dSEnji Cooperm4_ifndef([AC_PROG_GO], [ 852*132f818dSEnji Cooper############################################################ 853*132f818dSEnji Cooper# NOTE: This macro has been submitted for inclusion into # 854*132f818dSEnji Cooper# GNU Autoconf as AC_PROG_GO. When it is available in # 855*132f818dSEnji Cooper# a released version of Autoconf we should remove this # 856*132f818dSEnji Cooper# macro and use it instead. # 857*132f818dSEnji Cooper############################################################ 858*132f818dSEnji Cooperm4_defun([AC_PROG_GO], 859*132f818dSEnji Cooper[AC_LANG_PUSH(Go)dnl 860*132f818dSEnji CooperAC_ARG_VAR([GOC], [Go compiler command])dnl 861*132f818dSEnji CooperAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 862*132f818dSEnji Cooper_AC_ARG_VAR_LDFLAGS()dnl 863*132f818dSEnji CooperAC_CHECK_TOOL(GOC, gccgo) 864*132f818dSEnji Cooperif test -z "$GOC"; then 865*132f818dSEnji Cooper if test -n "$ac_tool_prefix"; then 866*132f818dSEnji Cooper AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 867*132f818dSEnji Cooper fi 868*132f818dSEnji Cooperfi 869*132f818dSEnji Cooperif test -z "$GOC"; then 870*132f818dSEnji Cooper AC_CHECK_PROG(GOC, gccgo, gccgo, false) 871*132f818dSEnji Cooperfi 872*132f818dSEnji Cooper])#m4_defun 873*132f818dSEnji Cooper])#m4_ifndef 874*132f818dSEnji Cooper 875*132f818dSEnji Cooper 876*132f818dSEnji Cooper# _LT_LANG_DEFAULT_CONFIG 877*132f818dSEnji Cooper# ----------------------- 878*132f818dSEnji Cooperm4_defun([_LT_LANG_DEFAULT_CONFIG], 879*132f818dSEnji Cooper[AC_PROVIDE_IFELSE([AC_PROG_CXX], 880*132f818dSEnji Cooper [LT_LANG(CXX)], 881*132f818dSEnji Cooper [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 882*132f818dSEnji Cooper 883*132f818dSEnji CooperAC_PROVIDE_IFELSE([AC_PROG_F77], 884*132f818dSEnji Cooper [LT_LANG(F77)], 885*132f818dSEnji Cooper [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 886*132f818dSEnji Cooper 887*132f818dSEnji CooperAC_PROVIDE_IFELSE([AC_PROG_FC], 888*132f818dSEnji Cooper [LT_LANG(FC)], 889*132f818dSEnji Cooper [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 890*132f818dSEnji Cooper 891*132f818dSEnji Cooperdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 892*132f818dSEnji Cooperdnl pulling things in needlessly. 893*132f818dSEnji CooperAC_PROVIDE_IFELSE([AC_PROG_GCJ], 894*132f818dSEnji Cooper [LT_LANG(GCJ)], 895*132f818dSEnji Cooper [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 896*132f818dSEnji Cooper [LT_LANG(GCJ)], 897*132f818dSEnji Cooper [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 898*132f818dSEnji Cooper [LT_LANG(GCJ)], 899*132f818dSEnji Cooper [m4_ifdef([AC_PROG_GCJ], 900*132f818dSEnji Cooper [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 901*132f818dSEnji Cooper m4_ifdef([A][M_PROG_GCJ], 902*132f818dSEnji Cooper [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 903*132f818dSEnji Cooper m4_ifdef([LT_PROG_GCJ], 904*132f818dSEnji Cooper [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 905*132f818dSEnji Cooper 906*132f818dSEnji CooperAC_PROVIDE_IFELSE([AC_PROG_GO], 907*132f818dSEnji Cooper [LT_LANG(GO)], 908*132f818dSEnji Cooper [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 909*132f818dSEnji Cooper 910*132f818dSEnji CooperAC_PROVIDE_IFELSE([LT_PROG_RC], 911*132f818dSEnji Cooper [LT_LANG(RC)], 912*132f818dSEnji Cooper [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 913*132f818dSEnji Cooper])# _LT_LANG_DEFAULT_CONFIG 914*132f818dSEnji Cooper 915*132f818dSEnji Cooper# Obsolete macros: 916*132f818dSEnji CooperAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 917*132f818dSEnji CooperAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 918*132f818dSEnji CooperAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 919*132f818dSEnji CooperAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 920*132f818dSEnji CooperAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 921*132f818dSEnji Cooperdnl aclocal-1.4 backwards compatibility: 922*132f818dSEnji Cooperdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 923*132f818dSEnji Cooperdnl AC_DEFUN([AC_LIBTOOL_F77], []) 924*132f818dSEnji Cooperdnl AC_DEFUN([AC_LIBTOOL_FC], []) 925*132f818dSEnji Cooperdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 926*132f818dSEnji Cooperdnl AC_DEFUN([AC_LIBTOOL_RC], []) 927*132f818dSEnji Cooper 928*132f818dSEnji Cooper 929*132f818dSEnji Cooper# _LT_TAG_COMPILER 930*132f818dSEnji Cooper# ---------------- 931*132f818dSEnji Cooperm4_defun([_LT_TAG_COMPILER], 932*132f818dSEnji Cooper[AC_REQUIRE([AC_PROG_CC])dnl 933*132f818dSEnji Cooper 934*132f818dSEnji Cooper_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 935*132f818dSEnji Cooper_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 936*132f818dSEnji Cooper_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 937*132f818dSEnji Cooper_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 938*132f818dSEnji Cooper 939*132f818dSEnji Cooper# If no C compiler was specified, use CC. 940*132f818dSEnji CooperLTCC=${LTCC-"$CC"} 941*132f818dSEnji Cooper 942*132f818dSEnji Cooper# If no C compiler flags were specified, use CFLAGS. 943*132f818dSEnji CooperLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 944*132f818dSEnji Cooper 945*132f818dSEnji Cooper# Allow CC to be a program name with arguments. 946*132f818dSEnji Coopercompiler=$CC 947*132f818dSEnji Cooper])# _LT_TAG_COMPILER 948*132f818dSEnji Cooper 949*132f818dSEnji Cooper 950*132f818dSEnji Cooper# _LT_COMPILER_BOILERPLATE 951*132f818dSEnji Cooper# ------------------------ 952*132f818dSEnji Cooper# Check for compiler boilerplate output or warnings with 953*132f818dSEnji Cooper# the simple compiler test code. 954*132f818dSEnji Cooperm4_defun([_LT_COMPILER_BOILERPLATE], 955*132f818dSEnji Cooper[m4_require([_LT_DECL_SED])dnl 956*132f818dSEnji Cooperac_outfile=conftest.$ac_objext 957*132f818dSEnji Cooperecho "$lt_simple_compile_test_code" >conftest.$ac_ext 958*132f818dSEnji Coopereval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 959*132f818dSEnji Cooper_lt_compiler_boilerplate=`cat conftest.err` 960*132f818dSEnji Cooper$RM conftest* 961*132f818dSEnji Cooper])# _LT_COMPILER_BOILERPLATE 962*132f818dSEnji Cooper 963*132f818dSEnji Cooper 964*132f818dSEnji Cooper# _LT_LINKER_BOILERPLATE 965*132f818dSEnji Cooper# ---------------------- 966*132f818dSEnji Cooper# Check for linker boilerplate output or warnings with 967*132f818dSEnji Cooper# the simple link test code. 968*132f818dSEnji Cooperm4_defun([_LT_LINKER_BOILERPLATE], 969*132f818dSEnji Cooper[m4_require([_LT_DECL_SED])dnl 970*132f818dSEnji Cooperac_outfile=conftest.$ac_objext 971*132f818dSEnji Cooperecho "$lt_simple_link_test_code" >conftest.$ac_ext 972*132f818dSEnji Coopereval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 973*132f818dSEnji Cooper_lt_linker_boilerplate=`cat conftest.err` 974*132f818dSEnji Cooper$RM -r conftest* 975*132f818dSEnji Cooper])# _LT_LINKER_BOILERPLATE 976*132f818dSEnji Cooper 977*132f818dSEnji Cooper 978*132f818dSEnji Cooper# _LT_REQUIRED_DARWIN_CHECKS 979*132f818dSEnji Cooper# ------------------------- 980*132f818dSEnji Cooperm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 981*132f818dSEnji Cooper case $host_os in 982*132f818dSEnji Cooper rhapsody* | darwin*) 983*132f818dSEnji Cooper AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 984*132f818dSEnji Cooper AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 985*132f818dSEnji Cooper AC_CHECK_TOOL([LIPO], [lipo], [:]) 986*132f818dSEnji Cooper AC_CHECK_TOOL([OTOOL], [otool], [:]) 987*132f818dSEnji Cooper AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 988*132f818dSEnji Cooper _LT_DECL([], [DSYMUTIL], [1], 989*132f818dSEnji Cooper [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 990*132f818dSEnji Cooper _LT_DECL([], [NMEDIT], [1], 991*132f818dSEnji Cooper [Tool to change global to local symbols on Mac OS X]) 992*132f818dSEnji Cooper _LT_DECL([], [LIPO], [1], 993*132f818dSEnji Cooper [Tool to manipulate fat objects and archives on Mac OS X]) 994*132f818dSEnji Cooper _LT_DECL([], [OTOOL], [1], 995*132f818dSEnji Cooper [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 996*132f818dSEnji Cooper _LT_DECL([], [OTOOL64], [1], 997*132f818dSEnji Cooper [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 998*132f818dSEnji Cooper 999*132f818dSEnji Cooper AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 1000*132f818dSEnji Cooper [lt_cv_apple_cc_single_mod=no 1001*132f818dSEnji Cooper if test -z "$LT_MULTI_MODULE"; then 1002*132f818dSEnji Cooper # By default we will add the -single_module flag. You can override 1003*132f818dSEnji Cooper # by either setting the environment variable LT_MULTI_MODULE 1004*132f818dSEnji Cooper # non-empty at configure time, or by adding -multi_module to the 1005*132f818dSEnji Cooper # link flags. 1006*132f818dSEnji Cooper rm -rf libconftest.dylib* 1007*132f818dSEnji Cooper echo "int foo(void){return 1;}" > conftest.c 1008*132f818dSEnji Cooper echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1009*132f818dSEnji Cooper-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 1010*132f818dSEnji Cooper $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1011*132f818dSEnji Cooper -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 1012*132f818dSEnji Cooper _lt_result=$? 1013*132f818dSEnji Cooper # If there is a non-empty error log, and "single_module" 1014*132f818dSEnji Cooper # appears in it, assume the flag caused a linker warning 1015*132f818dSEnji Cooper if test -s conftest.err && $GREP single_module conftest.err; then 1016*132f818dSEnji Cooper cat conftest.err >&AS_MESSAGE_LOG_FD 1017*132f818dSEnji Cooper # Otherwise, if the output was created with a 0 exit code from 1018*132f818dSEnji Cooper # the compiler, it worked. 1019*132f818dSEnji Cooper elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 1020*132f818dSEnji Cooper lt_cv_apple_cc_single_mod=yes 1021*132f818dSEnji Cooper else 1022*132f818dSEnji Cooper cat conftest.err >&AS_MESSAGE_LOG_FD 1023*132f818dSEnji Cooper fi 1024*132f818dSEnji Cooper rm -rf libconftest.dylib* 1025*132f818dSEnji Cooper rm -f conftest.* 1026*132f818dSEnji Cooper fi]) 1027*132f818dSEnji Cooper 1028*132f818dSEnji Cooper # Feature test to disable chained fixups since it is not 1029*132f818dSEnji Cooper # compatible with '-undefined dynamic_lookup' 1030*132f818dSEnji Cooper AC_CACHE_CHECK([for -no_fixup_chains linker flag], 1031*132f818dSEnji Cooper [lt_cv_support_no_fixup_chains], 1032*132f818dSEnji Cooper [ save_LDFLAGS=$LDFLAGS 1033*132f818dSEnji Cooper LDFLAGS="$LDFLAGS -Wl,-no_fixup_chains" 1034*132f818dSEnji Cooper AC_LINK_IFELSE( 1035*132f818dSEnji Cooper [AC_LANG_PROGRAM([],[])], 1036*132f818dSEnji Cooper lt_cv_support_no_fixup_chains=yes, 1037*132f818dSEnji Cooper lt_cv_support_no_fixup_chains=no 1038*132f818dSEnji Cooper ) 1039*132f818dSEnji Cooper LDFLAGS=$save_LDFLAGS 1040*132f818dSEnji Cooper ] 1041*132f818dSEnji Cooper ) 1042*132f818dSEnji Cooper 1043*132f818dSEnji Cooper AC_CACHE_CHECK([for -exported_symbols_list linker flag], 1044*132f818dSEnji Cooper [lt_cv_ld_exported_symbols_list], 1045*132f818dSEnji Cooper [lt_cv_ld_exported_symbols_list=no 1046*132f818dSEnji Cooper save_LDFLAGS=$LDFLAGS 1047*132f818dSEnji Cooper echo "_main" > conftest.sym 1048*132f818dSEnji Cooper LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 1049*132f818dSEnji Cooper AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 1050*132f818dSEnji Cooper [lt_cv_ld_exported_symbols_list=yes], 1051*132f818dSEnji Cooper [lt_cv_ld_exported_symbols_list=no]) 1052*132f818dSEnji Cooper LDFLAGS=$save_LDFLAGS 1053*132f818dSEnji Cooper ]) 1054*132f818dSEnji Cooper 1055*132f818dSEnji Cooper AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 1056*132f818dSEnji Cooper [lt_cv_ld_force_load=no 1057*132f818dSEnji Cooper cat > conftest.c << _LT_EOF 1058*132f818dSEnji Cooperint forced_loaded() { return 2;} 1059*132f818dSEnji Cooper_LT_EOF 1060*132f818dSEnji Cooper echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 1061*132f818dSEnji Cooper $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1062*132f818dSEnji Cooper echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1063*132f818dSEnji Cooper $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1064*132f818dSEnji Cooper echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1065*132f818dSEnji Cooper $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1066*132f818dSEnji Cooper cat > conftest.c << _LT_EOF 1067*132f818dSEnji Cooperint main(void) { return 0;} 1068*132f818dSEnji Cooper_LT_EOF 1069*132f818dSEnji Cooper echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1070*132f818dSEnji Cooper $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1071*132f818dSEnji Cooper _lt_result=$? 1072*132f818dSEnji Cooper if test -s conftest.err && $GREP force_load conftest.err; then 1073*132f818dSEnji Cooper cat conftest.err >&AS_MESSAGE_LOG_FD 1074*132f818dSEnji Cooper elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 1075*132f818dSEnji Cooper lt_cv_ld_force_load=yes 1076*132f818dSEnji Cooper else 1077*132f818dSEnji Cooper cat conftest.err >&AS_MESSAGE_LOG_FD 1078*132f818dSEnji Cooper fi 1079*132f818dSEnji Cooper rm -f conftest.err libconftest.a conftest conftest.c 1080*132f818dSEnji Cooper rm -rf conftest.dSYM 1081*132f818dSEnji Cooper ]) 1082*132f818dSEnji Cooper case $host_os in 1083*132f818dSEnji Cooper rhapsody* | darwin1.[[012]]) 1084*132f818dSEnji Cooper _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 1085*132f818dSEnji Cooper darwin1.*) 1086*132f818dSEnji Cooper _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1087*132f818dSEnji Cooper darwin*) 1088*132f818dSEnji Cooper case $MACOSX_DEPLOYMENT_TARGET,$host in 1089*132f818dSEnji Cooper 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) 1090*132f818dSEnji Cooper _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1091*132f818dSEnji Cooper *) 1092*132f818dSEnji Cooper _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' 1093*132f818dSEnji Cooper if test yes = "$lt_cv_support_no_fixup_chains"; then 1094*132f818dSEnji Cooper AS_VAR_APPEND([_lt_dar_allow_undefined], [' $wl-no_fixup_chains']) 1095*132f818dSEnji Cooper fi 1096*132f818dSEnji Cooper ;; 1097*132f818dSEnji Cooper esac 1098*132f818dSEnji Cooper ;; 1099*132f818dSEnji Cooper esac 1100*132f818dSEnji Cooper if test yes = "$lt_cv_apple_cc_single_mod"; then 1101*132f818dSEnji Cooper _lt_dar_single_mod='$single_module' 1102*132f818dSEnji Cooper fi 1103*132f818dSEnji Cooper _lt_dar_needs_single_mod=no 1104*132f818dSEnji Cooper case $host_os in 1105*132f818dSEnji Cooper rhapsody* | darwin1.*) 1106*132f818dSEnji Cooper _lt_dar_needs_single_mod=yes ;; 1107*132f818dSEnji Cooper darwin*) 1108*132f818dSEnji Cooper # When targeting Mac OS X 10.4 (darwin 8) or later, 1109*132f818dSEnji Cooper # -single_module is the default and -multi_module is unsupported. 1110*132f818dSEnji Cooper # The toolchain on macOS 10.14 (darwin 18) and later cannot 1111*132f818dSEnji Cooper # target any OS version that needs -single_module. 1112*132f818dSEnji Cooper case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1113*132f818dSEnji Cooper 10.0,*-darwin[[567]].*|10.[[0-3]],*-darwin[[5-9]].*|10.[[0-3]],*-darwin1[[0-7]].*) 1114*132f818dSEnji Cooper _lt_dar_needs_single_mod=yes ;; 1115*132f818dSEnji Cooper esac 1116*132f818dSEnji Cooper ;; 1117*132f818dSEnji Cooper esac 1118*132f818dSEnji Cooper if test yes = "$lt_cv_ld_exported_symbols_list"; then 1119*132f818dSEnji Cooper _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 1120*132f818dSEnji Cooper else 1121*132f818dSEnji Cooper _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 1122*132f818dSEnji Cooper fi 1123*132f818dSEnji Cooper if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 1124*132f818dSEnji Cooper _lt_dsymutil='~$DSYMUTIL $lib || :' 1125*132f818dSEnji Cooper else 1126*132f818dSEnji Cooper _lt_dsymutil= 1127*132f818dSEnji Cooper fi 1128*132f818dSEnji Cooper ;; 1129*132f818dSEnji Cooper esac 1130*132f818dSEnji Cooper]) 1131*132f818dSEnji Cooper 1132*132f818dSEnji Cooper 1133*132f818dSEnji Cooper# _LT_DARWIN_LINKER_FEATURES([TAG]) 1134*132f818dSEnji Cooper# --------------------------------- 1135*132f818dSEnji Cooper# Checks for linker and compiler features on darwin 1136*132f818dSEnji Cooperm4_defun([_LT_DARWIN_LINKER_FEATURES], 1137*132f818dSEnji Cooper[ 1138*132f818dSEnji Cooper m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1139*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1140*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct, $1)=no 1141*132f818dSEnji Cooper _LT_TAGVAR(hardcode_automatic, $1)=yes 1142*132f818dSEnji Cooper _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1143*132f818dSEnji Cooper if test yes = "$lt_cv_ld_force_load"; then 1144*132f818dSEnji Cooper _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\"`' 1145*132f818dSEnji Cooper m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1146*132f818dSEnji Cooper [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1147*132f818dSEnji Cooper else 1148*132f818dSEnji Cooper _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1149*132f818dSEnji Cooper fi 1150*132f818dSEnji Cooper _LT_TAGVAR(link_all_deplibs, $1)=yes 1151*132f818dSEnji Cooper _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 1152*132f818dSEnji Cooper case $cc_basename in 1153*132f818dSEnji Cooper ifort*|nagfor*) _lt_dar_can_shared=yes ;; 1154*132f818dSEnji Cooper *) _lt_dar_can_shared=$GCC ;; 1155*132f818dSEnji Cooper esac 1156*132f818dSEnji Cooper if test yes = "$_lt_dar_can_shared"; then 1157*132f818dSEnji Cooper output_verbose_link_cmd=func_echo_all 1158*132f818dSEnji Cooper _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" 1159*132f818dSEnji Cooper _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 1160*132f818dSEnji Cooper _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" 1161*132f818dSEnji Cooper _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" 1162*132f818dSEnji Cooper m4_if([$1], [CXX], 1163*132f818dSEnji Cooper[ if test yes = "$_lt_dar_needs_single_mod" -a yes != "$lt_cv_apple_cc_single_mod"; then 1164*132f818dSEnji Cooper _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" 1165*132f818dSEnji Cooper _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" 1166*132f818dSEnji Cooper fi 1167*132f818dSEnji Cooper],[]) 1168*132f818dSEnji Cooper else 1169*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 1170*132f818dSEnji Cooper fi 1171*132f818dSEnji Cooper]) 1172*132f818dSEnji Cooper 1173*132f818dSEnji Cooper# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1174*132f818dSEnji Cooper# ---------------------------------- 1175*132f818dSEnji Cooper# Links a minimal program and checks the executable 1176*132f818dSEnji Cooper# for the system default hardcoded library path. In most cases, 1177*132f818dSEnji Cooper# this is /usr/lib:/lib, but when the MPI compilers are used 1178*132f818dSEnji Cooper# the location of the communication and MPI libs are included too. 1179*132f818dSEnji Cooper# If we don't find anything, use the default library path according 1180*132f818dSEnji Cooper# to the aix ld manual. 1181*132f818dSEnji Cooper# Store the results from the different compilers for each TAGNAME. 1182*132f818dSEnji Cooper# Allow to override them for all tags through lt_cv_aix_libpath. 1183*132f818dSEnji Cooperm4_defun([_LT_SYS_MODULE_PATH_AIX], 1184*132f818dSEnji Cooper[m4_require([_LT_DECL_SED])dnl 1185*132f818dSEnji Cooperif test set = "${lt_cv_aix_libpath+set}"; then 1186*132f818dSEnji Cooper aix_libpath=$lt_cv_aix_libpath 1187*132f818dSEnji Cooperelse 1188*132f818dSEnji Cooper AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1189*132f818dSEnji Cooper [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1190*132f818dSEnji Cooper lt_aix_libpath_sed='[ 1191*132f818dSEnji Cooper /Import File Strings/,/^$/ { 1192*132f818dSEnji Cooper /^0/ { 1193*132f818dSEnji Cooper s/^0 *\([^ ]*\) *$/\1/ 1194*132f818dSEnji Cooper p 1195*132f818dSEnji Cooper } 1196*132f818dSEnji Cooper }]' 1197*132f818dSEnji Cooper _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1198*132f818dSEnji Cooper # Check for a 64-bit object if we didn't find anything. 1199*132f818dSEnji Cooper if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1200*132f818dSEnji Cooper _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1201*132f818dSEnji Cooper fi],[]) 1202*132f818dSEnji Cooper if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1203*132f818dSEnji Cooper _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 1204*132f818dSEnji Cooper fi 1205*132f818dSEnji Cooper ]) 1206*132f818dSEnji Cooper aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1207*132f818dSEnji Cooperfi 1208*132f818dSEnji Cooper])# _LT_SYS_MODULE_PATH_AIX 1209*132f818dSEnji Cooper 1210*132f818dSEnji Cooper 1211*132f818dSEnji Cooper# _LT_SHELL_INIT(ARG) 1212*132f818dSEnji Cooper# ------------------- 1213*132f818dSEnji Cooperm4_define([_LT_SHELL_INIT], 1214*132f818dSEnji Cooper[m4_divert_text([M4SH-INIT], [$1 1215*132f818dSEnji Cooper])])# _LT_SHELL_INIT 1216*132f818dSEnji Cooper 1217*132f818dSEnji Cooper 1218*132f818dSEnji Cooper 1219*132f818dSEnji Cooper# _LT_PROG_ECHO_BACKSLASH 1220*132f818dSEnji Cooper# ----------------------- 1221*132f818dSEnji Cooper# Find how we can fake an echo command that does not interpret backslash. 1222*132f818dSEnji Cooper# In particular, with Autoconf 2.60 or later we add some code to the start 1223*132f818dSEnji Cooper# of the generated configure script that will find a shell with a builtin 1224*132f818dSEnji Cooper# printf (that we can use as an echo command). 1225*132f818dSEnji Cooperm4_defun([_LT_PROG_ECHO_BACKSLASH], 1226*132f818dSEnji Cooper[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1227*132f818dSEnji CooperECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1228*132f818dSEnji CooperECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1229*132f818dSEnji Cooper 1230*132f818dSEnji CooperAC_MSG_CHECKING([how to print strings]) 1231*132f818dSEnji Cooper# Test print first, because it will be a builtin if present. 1232*132f818dSEnji Cooperif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1233*132f818dSEnji Cooper test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1234*132f818dSEnji Cooper ECHO='print -r --' 1235*132f818dSEnji Cooperelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1236*132f818dSEnji Cooper ECHO='printf %s\n' 1237*132f818dSEnji Cooperelse 1238*132f818dSEnji Cooper # Use this function as a fallback that always works. 1239*132f818dSEnji Cooper func_fallback_echo () 1240*132f818dSEnji Cooper { 1241*132f818dSEnji Cooper eval 'cat <<_LTECHO_EOF 1242*132f818dSEnji Cooper$[]1 1243*132f818dSEnji Cooper_LTECHO_EOF' 1244*132f818dSEnji Cooper } 1245*132f818dSEnji Cooper ECHO='func_fallback_echo' 1246*132f818dSEnji Cooperfi 1247*132f818dSEnji Cooper 1248*132f818dSEnji Cooper# func_echo_all arg... 1249*132f818dSEnji Cooper# Invoke $ECHO with all args, space-separated. 1250*132f818dSEnji Cooperfunc_echo_all () 1251*132f818dSEnji Cooper{ 1252*132f818dSEnji Cooper $ECHO "$*" 1253*132f818dSEnji Cooper} 1254*132f818dSEnji Cooper 1255*132f818dSEnji Coopercase $ECHO in 1256*132f818dSEnji Cooper printf*) AC_MSG_RESULT([printf]) ;; 1257*132f818dSEnji Cooper print*) AC_MSG_RESULT([print -r]) ;; 1258*132f818dSEnji Cooper *) AC_MSG_RESULT([cat]) ;; 1259*132f818dSEnji Cooperesac 1260*132f818dSEnji Cooper 1261*132f818dSEnji Cooperm4_ifdef([_AS_DETECT_SUGGESTED], 1262*132f818dSEnji Cooper[_AS_DETECT_SUGGESTED([ 1263*132f818dSEnji Cooper test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1264*132f818dSEnji Cooper ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1265*132f818dSEnji Cooper ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1266*132f818dSEnji Cooper ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1267*132f818dSEnji Cooper PATH=/empty FPATH=/empty; export PATH FPATH 1268*132f818dSEnji Cooper test "X`printf %s $ECHO`" = "X$ECHO" \ 1269*132f818dSEnji Cooper || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1270*132f818dSEnji Cooper 1271*132f818dSEnji Cooper_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1272*132f818dSEnji Cooper_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1273*132f818dSEnji Cooper])# _LT_PROG_ECHO_BACKSLASH 1274*132f818dSEnji Cooper 1275*132f818dSEnji Cooper 1276*132f818dSEnji Cooper# _LT_WITH_SYSROOT 1277*132f818dSEnji Cooper# ---------------- 1278*132f818dSEnji CooperAC_DEFUN([_LT_WITH_SYSROOT], 1279*132f818dSEnji Cooper[m4_require([_LT_DECL_SED])dnl 1280*132f818dSEnji CooperAC_MSG_CHECKING([for sysroot]) 1281*132f818dSEnji CooperAC_ARG_WITH([sysroot], 1282*132f818dSEnji Cooper[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 1283*132f818dSEnji Cooper [Search for dependent libraries within DIR (or the compiler's sysroot 1284*132f818dSEnji Cooper if not specified).])], 1285*132f818dSEnji Cooper[], [with_sysroot=no]) 1286*132f818dSEnji Cooper 1287*132f818dSEnji Cooperdnl lt_sysroot will always be passed unquoted. We quote it here 1288*132f818dSEnji Cooperdnl in case the user passed a directory name. 1289*132f818dSEnji Cooperlt_sysroot= 1290*132f818dSEnji Coopercase $with_sysroot in #( 1291*132f818dSEnji Cooper yes) 1292*132f818dSEnji Cooper if test yes = "$GCC"; then 1293*132f818dSEnji Cooper # Trim trailing / since we'll always append absolute paths and we want 1294*132f818dSEnji Cooper # to avoid //, if only for less confusing output for the user. 1295*132f818dSEnji Cooper lt_sysroot=`$CC --print-sysroot 2>/dev/null | $SED 's:/\+$::'` 1296*132f818dSEnji Cooper fi 1297*132f818dSEnji Cooper ;; #( 1298*132f818dSEnji Cooper /*) 1299*132f818dSEnji Cooper lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` 1300*132f818dSEnji Cooper ;; #( 1301*132f818dSEnji Cooper no|'') 1302*132f818dSEnji Cooper ;; #( 1303*132f818dSEnji Cooper *) 1304*132f818dSEnji Cooper AC_MSG_RESULT([$with_sysroot]) 1305*132f818dSEnji Cooper AC_MSG_ERROR([The sysroot must be an absolute path.]) 1306*132f818dSEnji Cooper ;; 1307*132f818dSEnji Cooperesac 1308*132f818dSEnji Cooper 1309*132f818dSEnji Cooper AC_MSG_RESULT([${lt_sysroot:-no}]) 1310*132f818dSEnji Cooper_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1311*132f818dSEnji Cooper[dependent libraries, and where our libraries should be installed.])]) 1312*132f818dSEnji Cooper 1313*132f818dSEnji Cooper# _LT_ENABLE_LOCK 1314*132f818dSEnji Cooper# --------------- 1315*132f818dSEnji Cooperm4_defun([_LT_ENABLE_LOCK], 1316*132f818dSEnji Cooper[AC_ARG_ENABLE([libtool-lock], 1317*132f818dSEnji Cooper [AS_HELP_STRING([--disable-libtool-lock], 1318*132f818dSEnji Cooper [avoid locking (might break parallel builds)])]) 1319*132f818dSEnji Coopertest no = "$enable_libtool_lock" || enable_libtool_lock=yes 1320*132f818dSEnji Cooper 1321*132f818dSEnji Cooper# Some flags need to be propagated to the compiler or linker for good 1322*132f818dSEnji Cooper# libtool support. 1323*132f818dSEnji Coopercase $host in 1324*132f818dSEnji Cooperia64-*-hpux*) 1325*132f818dSEnji Cooper # Find out what ABI is being produced by ac_compile, and set mode 1326*132f818dSEnji Cooper # options accordingly. 1327*132f818dSEnji Cooper echo 'int i;' > conftest.$ac_ext 1328*132f818dSEnji Cooper if AC_TRY_EVAL(ac_compile); then 1329*132f818dSEnji Cooper case `$FILECMD conftest.$ac_objext` in 1330*132f818dSEnji Cooper *ELF-32*) 1331*132f818dSEnji Cooper HPUX_IA64_MODE=32 1332*132f818dSEnji Cooper ;; 1333*132f818dSEnji Cooper *ELF-64*) 1334*132f818dSEnji Cooper HPUX_IA64_MODE=64 1335*132f818dSEnji Cooper ;; 1336*132f818dSEnji Cooper esac 1337*132f818dSEnji Cooper fi 1338*132f818dSEnji Cooper rm -rf conftest* 1339*132f818dSEnji Cooper ;; 1340*132f818dSEnji Cooper*-*-irix6*) 1341*132f818dSEnji Cooper # Find out what ABI is being produced by ac_compile, and set linker 1342*132f818dSEnji Cooper # options accordingly. 1343*132f818dSEnji Cooper echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1344*132f818dSEnji Cooper if AC_TRY_EVAL(ac_compile); then 1345*132f818dSEnji Cooper if test yes = "$lt_cv_prog_gnu_ld"; then 1346*132f818dSEnji Cooper case `$FILECMD conftest.$ac_objext` in 1347*132f818dSEnji Cooper *32-bit*) 1348*132f818dSEnji Cooper LD="${LD-ld} -melf32bsmip" 1349*132f818dSEnji Cooper ;; 1350*132f818dSEnji Cooper *N32*) 1351*132f818dSEnji Cooper LD="${LD-ld} -melf32bmipn32" 1352*132f818dSEnji Cooper ;; 1353*132f818dSEnji Cooper *64-bit*) 1354*132f818dSEnji Cooper LD="${LD-ld} -melf64bmip" 1355*132f818dSEnji Cooper ;; 1356*132f818dSEnji Cooper esac 1357*132f818dSEnji Cooper else 1358*132f818dSEnji Cooper case `$FILECMD conftest.$ac_objext` in 1359*132f818dSEnji Cooper *32-bit*) 1360*132f818dSEnji Cooper LD="${LD-ld} -32" 1361*132f818dSEnji Cooper ;; 1362*132f818dSEnji Cooper *N32*) 1363*132f818dSEnji Cooper LD="${LD-ld} -n32" 1364*132f818dSEnji Cooper ;; 1365*132f818dSEnji Cooper *64-bit*) 1366*132f818dSEnji Cooper LD="${LD-ld} -64" 1367*132f818dSEnji Cooper ;; 1368*132f818dSEnji Cooper esac 1369*132f818dSEnji Cooper fi 1370*132f818dSEnji Cooper fi 1371*132f818dSEnji Cooper rm -rf conftest* 1372*132f818dSEnji Cooper ;; 1373*132f818dSEnji Cooper 1374*132f818dSEnji Coopermips64*-*linux*) 1375*132f818dSEnji Cooper # Find out what ABI is being produced by ac_compile, and set linker 1376*132f818dSEnji Cooper # options accordingly. 1377*132f818dSEnji Cooper echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1378*132f818dSEnji Cooper if AC_TRY_EVAL(ac_compile); then 1379*132f818dSEnji Cooper emul=elf 1380*132f818dSEnji Cooper case `$FILECMD conftest.$ac_objext` in 1381*132f818dSEnji Cooper *32-bit*) 1382*132f818dSEnji Cooper emul="${emul}32" 1383*132f818dSEnji Cooper ;; 1384*132f818dSEnji Cooper *64-bit*) 1385*132f818dSEnji Cooper emul="${emul}64" 1386*132f818dSEnji Cooper ;; 1387*132f818dSEnji Cooper esac 1388*132f818dSEnji Cooper case `$FILECMD conftest.$ac_objext` in 1389*132f818dSEnji Cooper *MSB*) 1390*132f818dSEnji Cooper emul="${emul}btsmip" 1391*132f818dSEnji Cooper ;; 1392*132f818dSEnji Cooper *LSB*) 1393*132f818dSEnji Cooper emul="${emul}ltsmip" 1394*132f818dSEnji Cooper ;; 1395*132f818dSEnji Cooper esac 1396*132f818dSEnji Cooper case `$FILECMD conftest.$ac_objext` in 1397*132f818dSEnji Cooper *N32*) 1398*132f818dSEnji Cooper emul="${emul}n32" 1399*132f818dSEnji Cooper ;; 1400*132f818dSEnji Cooper esac 1401*132f818dSEnji Cooper LD="${LD-ld} -m $emul" 1402*132f818dSEnji Cooper fi 1403*132f818dSEnji Cooper rm -rf conftest* 1404*132f818dSEnji Cooper ;; 1405*132f818dSEnji Cooper 1406*132f818dSEnji Cooperx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 1407*132f818dSEnji Coopers390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*) 1408*132f818dSEnji Cooper # Find out what ABI is being produced by ac_compile, and set linker 1409*132f818dSEnji Cooper # options accordingly. Note that the listed cases only cover the 1410*132f818dSEnji Cooper # situations where additional linker options are needed (such as when 1411*132f818dSEnji Cooper # doing 32-bit compilation for a host where ld defaults to 64-bit, or 1412*132f818dSEnji Cooper # vice versa); the common cases where no linker options are needed do 1413*132f818dSEnji Cooper # not appear in the list. 1414*132f818dSEnji Cooper echo 'int i;' > conftest.$ac_ext 1415*132f818dSEnji Cooper if AC_TRY_EVAL(ac_compile); then 1416*132f818dSEnji Cooper case `$FILECMD conftest.o` in 1417*132f818dSEnji Cooper *32-bit*) 1418*132f818dSEnji Cooper case $host in 1419*132f818dSEnji Cooper x86_64-*kfreebsd*-gnu) 1420*132f818dSEnji Cooper LD="${LD-ld} -m elf_i386_fbsd" 1421*132f818dSEnji Cooper ;; 1422*132f818dSEnji Cooper x86_64-*linux*|x86_64-gnu*) 1423*132f818dSEnji Cooper case `$FILECMD conftest.o` in 1424*132f818dSEnji Cooper *x86-64*) 1425*132f818dSEnji Cooper LD="${LD-ld} -m elf32_x86_64" 1426*132f818dSEnji Cooper ;; 1427*132f818dSEnji Cooper *) 1428*132f818dSEnji Cooper LD="${LD-ld} -m elf_i386" 1429*132f818dSEnji Cooper ;; 1430*132f818dSEnji Cooper esac 1431*132f818dSEnji Cooper ;; 1432*132f818dSEnji Cooper powerpc64le-*linux*) 1433*132f818dSEnji Cooper LD="${LD-ld} -m elf32lppclinux" 1434*132f818dSEnji Cooper ;; 1435*132f818dSEnji Cooper powerpc64-*linux*) 1436*132f818dSEnji Cooper LD="${LD-ld} -m elf32ppclinux" 1437*132f818dSEnji Cooper ;; 1438*132f818dSEnji Cooper s390x-*linux*) 1439*132f818dSEnji Cooper LD="${LD-ld} -m elf_s390" 1440*132f818dSEnji Cooper ;; 1441*132f818dSEnji Cooper sparc64-*linux*) 1442*132f818dSEnji Cooper LD="${LD-ld} -m elf32_sparc" 1443*132f818dSEnji Cooper ;; 1444*132f818dSEnji Cooper esac 1445*132f818dSEnji Cooper ;; 1446*132f818dSEnji Cooper *64-bit*) 1447*132f818dSEnji Cooper case $host in 1448*132f818dSEnji Cooper x86_64-*kfreebsd*-gnu) 1449*132f818dSEnji Cooper LD="${LD-ld} -m elf_x86_64_fbsd" 1450*132f818dSEnji Cooper ;; 1451*132f818dSEnji Cooper x86_64-*linux*|x86_64-gnu*) 1452*132f818dSEnji Cooper LD="${LD-ld} -m elf_x86_64" 1453*132f818dSEnji Cooper ;; 1454*132f818dSEnji Cooper powerpcle-*linux*) 1455*132f818dSEnji Cooper LD="${LD-ld} -m elf64lppc" 1456*132f818dSEnji Cooper ;; 1457*132f818dSEnji Cooper powerpc-*linux*) 1458*132f818dSEnji Cooper LD="${LD-ld} -m elf64ppc" 1459*132f818dSEnji Cooper ;; 1460*132f818dSEnji Cooper s390*-*linux*|s390*-*tpf*) 1461*132f818dSEnji Cooper LD="${LD-ld} -m elf64_s390" 1462*132f818dSEnji Cooper ;; 1463*132f818dSEnji Cooper sparc*-*linux*) 1464*132f818dSEnji Cooper LD="${LD-ld} -m elf64_sparc" 1465*132f818dSEnji Cooper ;; 1466*132f818dSEnji Cooper esac 1467*132f818dSEnji Cooper ;; 1468*132f818dSEnji Cooper esac 1469*132f818dSEnji Cooper fi 1470*132f818dSEnji Cooper rm -rf conftest* 1471*132f818dSEnji Cooper ;; 1472*132f818dSEnji Cooper 1473*132f818dSEnji Cooper*-*-sco3.2v5*) 1474*132f818dSEnji Cooper # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1475*132f818dSEnji Cooper SAVE_CFLAGS=$CFLAGS 1476*132f818dSEnji Cooper CFLAGS="$CFLAGS -belf" 1477*132f818dSEnji Cooper AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1478*132f818dSEnji Cooper [AC_LANG_PUSH(C) 1479*132f818dSEnji Cooper AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1480*132f818dSEnji Cooper AC_LANG_POP]) 1481*132f818dSEnji Cooper if test yes != "$lt_cv_cc_needs_belf"; then 1482*132f818dSEnji Cooper # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1483*132f818dSEnji Cooper CFLAGS=$SAVE_CFLAGS 1484*132f818dSEnji Cooper fi 1485*132f818dSEnji Cooper ;; 1486*132f818dSEnji Cooper*-*solaris*) 1487*132f818dSEnji Cooper # Find out what ABI is being produced by ac_compile, and set linker 1488*132f818dSEnji Cooper # options accordingly. 1489*132f818dSEnji Cooper echo 'int i;' > conftest.$ac_ext 1490*132f818dSEnji Cooper if AC_TRY_EVAL(ac_compile); then 1491*132f818dSEnji Cooper case `$FILECMD conftest.o` in 1492*132f818dSEnji Cooper *64-bit*) 1493*132f818dSEnji Cooper case $lt_cv_prog_gnu_ld in 1494*132f818dSEnji Cooper yes*) 1495*132f818dSEnji Cooper case $host in 1496*132f818dSEnji Cooper i?86-*-solaris*|x86_64-*-solaris*) 1497*132f818dSEnji Cooper LD="${LD-ld} -m elf_x86_64" 1498*132f818dSEnji Cooper ;; 1499*132f818dSEnji Cooper sparc*-*-solaris*) 1500*132f818dSEnji Cooper LD="${LD-ld} -m elf64_sparc" 1501*132f818dSEnji Cooper ;; 1502*132f818dSEnji Cooper esac 1503*132f818dSEnji Cooper # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1504*132f818dSEnji Cooper if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1505*132f818dSEnji Cooper LD=${LD-ld}_sol2 1506*132f818dSEnji Cooper fi 1507*132f818dSEnji Cooper ;; 1508*132f818dSEnji Cooper *) 1509*132f818dSEnji Cooper if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1510*132f818dSEnji Cooper LD="${LD-ld} -64" 1511*132f818dSEnji Cooper fi 1512*132f818dSEnji Cooper ;; 1513*132f818dSEnji Cooper esac 1514*132f818dSEnji Cooper ;; 1515*132f818dSEnji Cooper esac 1516*132f818dSEnji Cooper fi 1517*132f818dSEnji Cooper rm -rf conftest* 1518*132f818dSEnji Cooper ;; 1519*132f818dSEnji Cooperesac 1520*132f818dSEnji Cooper 1521*132f818dSEnji Cooperneed_locks=$enable_libtool_lock 1522*132f818dSEnji Cooper])# _LT_ENABLE_LOCK 1523*132f818dSEnji Cooper 1524*132f818dSEnji Cooper 1525*132f818dSEnji Cooper# _LT_PROG_AR 1526*132f818dSEnji Cooper# ----------- 1527*132f818dSEnji Cooperm4_defun([_LT_PROG_AR], 1528*132f818dSEnji Cooper[AC_CHECK_TOOLS(AR, [ar], false) 1529*132f818dSEnji Cooper: ${AR=ar} 1530*132f818dSEnji Cooper_LT_DECL([], [AR], [1], [The archiver]) 1531*132f818dSEnji Cooper 1532*132f818dSEnji Cooper# Use ARFLAGS variable as AR's operation code to sync the variable naming with 1533*132f818dSEnji Cooper# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 1534*132f818dSEnji Cooper# higher priority because that's what people were doing historically (setting 1535*132f818dSEnji Cooper# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 1536*132f818dSEnji Cooper# variable obsoleted/removed. 1537*132f818dSEnji Cooper 1538*132f818dSEnji Coopertest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 1539*132f818dSEnji Cooperlt_ar_flags=$AR_FLAGS 1540*132f818dSEnji Cooper_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 1541*132f818dSEnji Cooper 1542*132f818dSEnji Cooper# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 1543*132f818dSEnji Cooper# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 1544*132f818dSEnji Cooper_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 1545*132f818dSEnji Cooper [Flags to create an archive]) 1546*132f818dSEnji Cooper 1547*132f818dSEnji CooperAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1548*132f818dSEnji Cooper [lt_cv_ar_at_file=no 1549*132f818dSEnji Cooper AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1550*132f818dSEnji Cooper [echo conftest.$ac_objext > conftest.lst 1551*132f818dSEnji Cooper lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1552*132f818dSEnji Cooper AC_TRY_EVAL([lt_ar_try]) 1553*132f818dSEnji Cooper if test 0 -eq "$ac_status"; then 1554*132f818dSEnji Cooper # Ensure the archiver fails upon bogus file names. 1555*132f818dSEnji Cooper rm -f conftest.$ac_objext libconftest.a 1556*132f818dSEnji Cooper AC_TRY_EVAL([lt_ar_try]) 1557*132f818dSEnji Cooper if test 0 -ne "$ac_status"; then 1558*132f818dSEnji Cooper lt_cv_ar_at_file=@ 1559*132f818dSEnji Cooper fi 1560*132f818dSEnji Cooper fi 1561*132f818dSEnji Cooper rm -f conftest.* libconftest.a 1562*132f818dSEnji Cooper ]) 1563*132f818dSEnji Cooper ]) 1564*132f818dSEnji Cooper 1565*132f818dSEnji Cooperif test no = "$lt_cv_ar_at_file"; then 1566*132f818dSEnji Cooper archiver_list_spec= 1567*132f818dSEnji Cooperelse 1568*132f818dSEnji Cooper archiver_list_spec=$lt_cv_ar_at_file 1569*132f818dSEnji Cooperfi 1570*132f818dSEnji Cooper_LT_DECL([], [archiver_list_spec], [1], 1571*132f818dSEnji Cooper [How to feed a file listing to the archiver]) 1572*132f818dSEnji Cooper])# _LT_PROG_AR 1573*132f818dSEnji Cooper 1574*132f818dSEnji Cooper 1575*132f818dSEnji Cooper# _LT_CMD_OLD_ARCHIVE 1576*132f818dSEnji Cooper# ------------------- 1577*132f818dSEnji Cooperm4_defun([_LT_CMD_OLD_ARCHIVE], 1578*132f818dSEnji Cooper[_LT_PROG_AR 1579*132f818dSEnji Cooper 1580*132f818dSEnji CooperAC_CHECK_TOOL(STRIP, strip, :) 1581*132f818dSEnji Coopertest -z "$STRIP" && STRIP=: 1582*132f818dSEnji Cooper_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1583*132f818dSEnji Cooper 1584*132f818dSEnji CooperAC_REQUIRE([AC_PROG_RANLIB]) 1585*132f818dSEnji Coopertest -z "$RANLIB" && RANLIB=: 1586*132f818dSEnji Cooper_LT_DECL([], [RANLIB], [1], 1587*132f818dSEnji Cooper [Commands used to install an old-style archive]) 1588*132f818dSEnji Cooper 1589*132f818dSEnji Cooper# Determine commands to create old-style static archives. 1590*132f818dSEnji Cooperold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1591*132f818dSEnji Cooperold_postinstall_cmds='chmod 644 $oldlib' 1592*132f818dSEnji Cooperold_postuninstall_cmds= 1593*132f818dSEnji Cooper 1594*132f818dSEnji Cooperif test -n "$RANLIB"; then 1595*132f818dSEnji Cooper old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 1596*132f818dSEnji Cooper old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1597*132f818dSEnji Cooperfi 1598*132f818dSEnji Cooper 1599*132f818dSEnji Coopercase $host_os in 1600*132f818dSEnji Cooper darwin*) 1601*132f818dSEnji Cooper lock_old_archive_extraction=yes ;; 1602*132f818dSEnji Cooper *) 1603*132f818dSEnji Cooper lock_old_archive_extraction=no ;; 1604*132f818dSEnji Cooperesac 1605*132f818dSEnji Cooper_LT_DECL([], [old_postinstall_cmds], [2]) 1606*132f818dSEnji Cooper_LT_DECL([], [old_postuninstall_cmds], [2]) 1607*132f818dSEnji Cooper_LT_TAGDECL([], [old_archive_cmds], [2], 1608*132f818dSEnji Cooper [Commands used to build an old-style archive]) 1609*132f818dSEnji Cooper_LT_DECL([], [lock_old_archive_extraction], [0], 1610*132f818dSEnji Cooper [Whether to use a lock for old archive extraction]) 1611*132f818dSEnji Cooper])# _LT_CMD_OLD_ARCHIVE 1612*132f818dSEnji Cooper 1613*132f818dSEnji Cooper 1614*132f818dSEnji Cooper# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1615*132f818dSEnji Cooper# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1616*132f818dSEnji Cooper# ---------------------------------------------------------------- 1617*132f818dSEnji Cooper# Check whether the given compiler option works 1618*132f818dSEnji CooperAC_DEFUN([_LT_COMPILER_OPTION], 1619*132f818dSEnji Cooper[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1620*132f818dSEnji Cooperm4_require([_LT_DECL_SED])dnl 1621*132f818dSEnji CooperAC_CACHE_CHECK([$1], [$2], 1622*132f818dSEnji Cooper [$2=no 1623*132f818dSEnji Cooper m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1624*132f818dSEnji Cooper echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1625*132f818dSEnji Cooper lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 1626*132f818dSEnji Cooper # Insert the option either (1) after the last *FLAGS variable, or 1627*132f818dSEnji Cooper # (2) before a word containing "conftest.", or (3) at the end. 1628*132f818dSEnji Cooper # Note that $ac_compile itself does not contain backslashes and begins 1629*132f818dSEnji Cooper # with a dollar sign (not a hyphen), so the echo should work correctly. 1630*132f818dSEnji Cooper # The option is referenced via a variable to avoid confusing sed. 1631*132f818dSEnji Cooper lt_compile=`echo "$ac_compile" | $SED \ 1632*132f818dSEnji Cooper -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1633*132f818dSEnji Cooper -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1634*132f818dSEnji Cooper -e 's:$: $lt_compiler_flag:'` 1635*132f818dSEnji Cooper (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1636*132f818dSEnji Cooper (eval "$lt_compile" 2>conftest.err) 1637*132f818dSEnji Cooper ac_status=$? 1638*132f818dSEnji Cooper cat conftest.err >&AS_MESSAGE_LOG_FD 1639*132f818dSEnji Cooper echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1640*132f818dSEnji Cooper if (exit $ac_status) && test -s "$ac_outfile"; then 1641*132f818dSEnji Cooper # The compiler can only warn and ignore the option if not recognized 1642*132f818dSEnji Cooper # So say no if there are warnings other than the usual output. 1643*132f818dSEnji Cooper $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 1644*132f818dSEnji Cooper $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1645*132f818dSEnji Cooper if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1646*132f818dSEnji Cooper $2=yes 1647*132f818dSEnji Cooper fi 1648*132f818dSEnji Cooper fi 1649*132f818dSEnji Cooper $RM conftest* 1650*132f818dSEnji Cooper]) 1651*132f818dSEnji Cooper 1652*132f818dSEnji Cooperif test yes = "[$]$2"; then 1653*132f818dSEnji Cooper m4_if([$5], , :, [$5]) 1654*132f818dSEnji Cooperelse 1655*132f818dSEnji Cooper m4_if([$6], , :, [$6]) 1656*132f818dSEnji Cooperfi 1657*132f818dSEnji Cooper])# _LT_COMPILER_OPTION 1658*132f818dSEnji Cooper 1659*132f818dSEnji Cooper# Old name: 1660*132f818dSEnji CooperAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1661*132f818dSEnji Cooperdnl aclocal-1.4 backwards compatibility: 1662*132f818dSEnji Cooperdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1663*132f818dSEnji Cooper 1664*132f818dSEnji Cooper 1665*132f818dSEnji Cooper# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1666*132f818dSEnji Cooper# [ACTION-SUCCESS], [ACTION-FAILURE]) 1667*132f818dSEnji Cooper# ---------------------------------------------------- 1668*132f818dSEnji Cooper# Check whether the given linker option works 1669*132f818dSEnji CooperAC_DEFUN([_LT_LINKER_OPTION], 1670*132f818dSEnji Cooper[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1671*132f818dSEnji Cooperm4_require([_LT_DECL_SED])dnl 1672*132f818dSEnji CooperAC_CACHE_CHECK([$1], [$2], 1673*132f818dSEnji Cooper [$2=no 1674*132f818dSEnji Cooper save_LDFLAGS=$LDFLAGS 1675*132f818dSEnji Cooper LDFLAGS="$LDFLAGS $3" 1676*132f818dSEnji Cooper echo "$lt_simple_link_test_code" > conftest.$ac_ext 1677*132f818dSEnji Cooper if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1678*132f818dSEnji Cooper # The linker can only warn and ignore the option if not recognized 1679*132f818dSEnji Cooper # So say no if there are warnings 1680*132f818dSEnji Cooper if test -s conftest.err; then 1681*132f818dSEnji Cooper # Append any errors to the config.log. 1682*132f818dSEnji Cooper cat conftest.err 1>&AS_MESSAGE_LOG_FD 1683*132f818dSEnji Cooper $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 1684*132f818dSEnji Cooper $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1685*132f818dSEnji Cooper if diff conftest.exp conftest.er2 >/dev/null; then 1686*132f818dSEnji Cooper $2=yes 1687*132f818dSEnji Cooper fi 1688*132f818dSEnji Cooper else 1689*132f818dSEnji Cooper $2=yes 1690*132f818dSEnji Cooper fi 1691*132f818dSEnji Cooper fi 1692*132f818dSEnji Cooper $RM -r conftest* 1693*132f818dSEnji Cooper LDFLAGS=$save_LDFLAGS 1694*132f818dSEnji Cooper]) 1695*132f818dSEnji Cooper 1696*132f818dSEnji Cooperif test yes = "[$]$2"; then 1697*132f818dSEnji Cooper m4_if([$4], , :, [$4]) 1698*132f818dSEnji Cooperelse 1699*132f818dSEnji Cooper m4_if([$5], , :, [$5]) 1700*132f818dSEnji Cooperfi 1701*132f818dSEnji Cooper])# _LT_LINKER_OPTION 1702*132f818dSEnji Cooper 1703*132f818dSEnji Cooper# Old name: 1704*132f818dSEnji CooperAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1705*132f818dSEnji Cooperdnl aclocal-1.4 backwards compatibility: 1706*132f818dSEnji Cooperdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1707*132f818dSEnji Cooper 1708*132f818dSEnji Cooper 1709*132f818dSEnji Cooper# LT_CMD_MAX_LEN 1710*132f818dSEnji Cooper#--------------- 1711*132f818dSEnji CooperAC_DEFUN([LT_CMD_MAX_LEN], 1712*132f818dSEnji Cooper[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1713*132f818dSEnji Cooper# find the maximum length of command line arguments 1714*132f818dSEnji CooperAC_MSG_CHECKING([the maximum length of command line arguments]) 1715*132f818dSEnji CooperAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1716*132f818dSEnji Cooper i=0 1717*132f818dSEnji Cooper teststring=ABCD 1718*132f818dSEnji Cooper 1719*132f818dSEnji Cooper case $build_os in 1720*132f818dSEnji Cooper msdosdjgpp*) 1721*132f818dSEnji Cooper # On DJGPP, this test can blow up pretty badly due to problems in libc 1722*132f818dSEnji Cooper # (any single argument exceeding 2000 bytes causes a buffer overrun 1723*132f818dSEnji Cooper # during glob expansion). Even if it were fixed, the result of this 1724*132f818dSEnji Cooper # check would be larger than it should be. 1725*132f818dSEnji Cooper lt_cv_sys_max_cmd_len=12288; # 12K is about right 1726*132f818dSEnji Cooper ;; 1727*132f818dSEnji Cooper 1728*132f818dSEnji Cooper gnu* | ironclad*) 1729*132f818dSEnji Cooper # Under GNU Hurd and Ironclad, this test is not required because there 1730*132f818dSEnji Cooper # is no limit to the length of command line arguments. 1731*132f818dSEnji Cooper # Libtool will interpret -1 as no limit whatsoever 1732*132f818dSEnji Cooper lt_cv_sys_max_cmd_len=-1; 1733*132f818dSEnji Cooper ;; 1734*132f818dSEnji Cooper 1735*132f818dSEnji Cooper cygwin* | mingw* | windows* | cegcc*) 1736*132f818dSEnji Cooper # On Win9x/ME, this test blows up -- it succeeds, but takes 1737*132f818dSEnji Cooper # about 5 minutes as the teststring grows exponentially. 1738*132f818dSEnji Cooper # Worse, since 9x/ME are not pre-emptively multitasking, 1739*132f818dSEnji Cooper # you end up with a "frozen" computer, even though with patience 1740*132f818dSEnji Cooper # the test eventually succeeds (with a max line length of 256k). 1741*132f818dSEnji Cooper # Instead, let's just punt: use the minimum linelength reported by 1742*132f818dSEnji Cooper # all of the supported platforms: 8192 (on NT/2K/XP). 1743*132f818dSEnji Cooper lt_cv_sys_max_cmd_len=8192; 1744*132f818dSEnji Cooper ;; 1745*132f818dSEnji Cooper 1746*132f818dSEnji Cooper mint*) 1747*132f818dSEnji Cooper # On MiNT this can take a long time and run out of memory. 1748*132f818dSEnji Cooper lt_cv_sys_max_cmd_len=8192; 1749*132f818dSEnji Cooper ;; 1750*132f818dSEnji Cooper 1751*132f818dSEnji Cooper amigaos*) 1752*132f818dSEnji Cooper # On AmigaOS with pdksh, this test takes hours, literally. 1753*132f818dSEnji Cooper # So we just punt and use a minimum line length of 8192. 1754*132f818dSEnji Cooper lt_cv_sys_max_cmd_len=8192; 1755*132f818dSEnji Cooper ;; 1756*132f818dSEnji Cooper 1757*132f818dSEnji Cooper darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) 1758*132f818dSEnji Cooper # This has been around since 386BSD, at least. Likely further. 1759*132f818dSEnji Cooper if test -x /sbin/sysctl; then 1760*132f818dSEnji Cooper lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1761*132f818dSEnji Cooper elif test -x /usr/sbin/sysctl; then 1762*132f818dSEnji Cooper lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1763*132f818dSEnji Cooper else 1764*132f818dSEnji Cooper lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1765*132f818dSEnji Cooper fi 1766*132f818dSEnji Cooper # And add a safety zone 1767*132f818dSEnji Cooper lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1768*132f818dSEnji Cooper lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1769*132f818dSEnji Cooper ;; 1770*132f818dSEnji Cooper 1771*132f818dSEnji Cooper interix*) 1772*132f818dSEnji Cooper # We know the value 262144 and hardcode it with a safety zone (like BSD) 1773*132f818dSEnji Cooper lt_cv_sys_max_cmd_len=196608 1774*132f818dSEnji Cooper ;; 1775*132f818dSEnji Cooper 1776*132f818dSEnji Cooper os2*) 1777*132f818dSEnji Cooper # The test takes a long time on OS/2. 1778*132f818dSEnji Cooper lt_cv_sys_max_cmd_len=8192 1779*132f818dSEnji Cooper ;; 1780*132f818dSEnji Cooper 1781*132f818dSEnji Cooper osf*) 1782*132f818dSEnji Cooper # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1783*132f818dSEnji Cooper # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1784*132f818dSEnji Cooper # nice to cause kernel panics so lets avoid the loop below. 1785*132f818dSEnji Cooper # First set a reasonable default. 1786*132f818dSEnji Cooper lt_cv_sys_max_cmd_len=16384 1787*132f818dSEnji Cooper # 1788*132f818dSEnji Cooper if test -x /sbin/sysconfig; then 1789*132f818dSEnji Cooper case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1790*132f818dSEnji Cooper *1*) lt_cv_sys_max_cmd_len=-1 ;; 1791*132f818dSEnji Cooper esac 1792*132f818dSEnji Cooper fi 1793*132f818dSEnji Cooper ;; 1794*132f818dSEnji Cooper sco3.2v5*) 1795*132f818dSEnji Cooper lt_cv_sys_max_cmd_len=102400 1796*132f818dSEnji Cooper ;; 1797*132f818dSEnji Cooper sysv5* | sco5v6* | sysv4.2uw2*) 1798*132f818dSEnji Cooper kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1799*132f818dSEnji Cooper if test -n "$kargmax"; then 1800*132f818dSEnji Cooper lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` 1801*132f818dSEnji Cooper else 1802*132f818dSEnji Cooper lt_cv_sys_max_cmd_len=32768 1803*132f818dSEnji Cooper fi 1804*132f818dSEnji Cooper ;; 1805*132f818dSEnji Cooper *) 1806*132f818dSEnji Cooper lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1807*132f818dSEnji Cooper if test -n "$lt_cv_sys_max_cmd_len" && \ 1808*132f818dSEnji Cooper test undefined != "$lt_cv_sys_max_cmd_len"; then 1809*132f818dSEnji Cooper lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1810*132f818dSEnji Cooper lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1811*132f818dSEnji Cooper else 1812*132f818dSEnji Cooper # Make teststring a little bigger before we do anything with it. 1813*132f818dSEnji Cooper # a 1K string should be a reasonable start. 1814*132f818dSEnji Cooper for i in 1 2 3 4 5 6 7 8; do 1815*132f818dSEnji Cooper teststring=$teststring$teststring 1816*132f818dSEnji Cooper done 1817*132f818dSEnji Cooper SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1818*132f818dSEnji Cooper # If test is not a shell built-in, we'll probably end up computing a 1819*132f818dSEnji Cooper # maximum length that is only half of the actual maximum length, but 1820*132f818dSEnji Cooper # we can't tell. 1821*132f818dSEnji Cooper while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 1822*132f818dSEnji Cooper = "X$teststring$teststring"; } >/dev/null 2>&1 && 1823*132f818dSEnji Cooper test 17 != "$i" # 1/2 MB should be enough 1824*132f818dSEnji Cooper do 1825*132f818dSEnji Cooper i=`expr $i + 1` 1826*132f818dSEnji Cooper teststring=$teststring$teststring 1827*132f818dSEnji Cooper done 1828*132f818dSEnji Cooper # Only check the string length outside the loop. 1829*132f818dSEnji Cooper lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1830*132f818dSEnji Cooper teststring= 1831*132f818dSEnji Cooper # Add a significant safety factor because C++ compilers can tack on 1832*132f818dSEnji Cooper # massive amounts of additional arguments before passing them to the 1833*132f818dSEnji Cooper # linker. It appears as though 1/2 is a usable value. 1834*132f818dSEnji Cooper lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1835*132f818dSEnji Cooper fi 1836*132f818dSEnji Cooper ;; 1837*132f818dSEnji Cooper esac 1838*132f818dSEnji Cooper]) 1839*132f818dSEnji Cooperif test -n "$lt_cv_sys_max_cmd_len"; then 1840*132f818dSEnji Cooper AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1841*132f818dSEnji Cooperelse 1842*132f818dSEnji Cooper AC_MSG_RESULT(none) 1843*132f818dSEnji Cooperfi 1844*132f818dSEnji Coopermax_cmd_len=$lt_cv_sys_max_cmd_len 1845*132f818dSEnji Cooper_LT_DECL([], [max_cmd_len], [0], 1846*132f818dSEnji Cooper [What is the maximum length of a command?]) 1847*132f818dSEnji Cooper])# LT_CMD_MAX_LEN 1848*132f818dSEnji Cooper 1849*132f818dSEnji Cooper# Old name: 1850*132f818dSEnji CooperAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1851*132f818dSEnji Cooperdnl aclocal-1.4 backwards compatibility: 1852*132f818dSEnji Cooperdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1853*132f818dSEnji Cooper 1854*132f818dSEnji Cooper 1855*132f818dSEnji Cooper# _LT_HEADER_DLFCN 1856*132f818dSEnji Cooper# ---------------- 1857*132f818dSEnji Cooperm4_defun([_LT_HEADER_DLFCN], 1858*132f818dSEnji Cooper[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1859*132f818dSEnji Cooper])# _LT_HEADER_DLFCN 1860*132f818dSEnji Cooper 1861*132f818dSEnji Cooper 1862*132f818dSEnji Cooper# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1863*132f818dSEnji Cooper# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1864*132f818dSEnji Cooper# ---------------------------------------------------------------- 1865*132f818dSEnji Cooperm4_defun([_LT_TRY_DLOPEN_SELF], 1866*132f818dSEnji Cooper[m4_require([_LT_HEADER_DLFCN])dnl 1867*132f818dSEnji Cooperif test yes = "$cross_compiling"; then : 1868*132f818dSEnji Cooper [$4] 1869*132f818dSEnji Cooperelse 1870*132f818dSEnji Cooper lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1871*132f818dSEnji Cooper lt_status=$lt_dlunknown 1872*132f818dSEnji Cooper cat > conftest.$ac_ext <<_LT_EOF 1873*132f818dSEnji Cooper[#line $LINENO "configure" 1874*132f818dSEnji Cooper#include "confdefs.h" 1875*132f818dSEnji Cooper 1876*132f818dSEnji Cooper#if HAVE_DLFCN_H 1877*132f818dSEnji Cooper#include <dlfcn.h> 1878*132f818dSEnji Cooper#endif 1879*132f818dSEnji Cooper 1880*132f818dSEnji Cooper#include <stdio.h> 1881*132f818dSEnji Cooper 1882*132f818dSEnji Cooper#ifdef RTLD_GLOBAL 1883*132f818dSEnji Cooper# define LT_DLGLOBAL RTLD_GLOBAL 1884*132f818dSEnji Cooper#else 1885*132f818dSEnji Cooper# ifdef DL_GLOBAL 1886*132f818dSEnji Cooper# define LT_DLGLOBAL DL_GLOBAL 1887*132f818dSEnji Cooper# else 1888*132f818dSEnji Cooper# define LT_DLGLOBAL 0 1889*132f818dSEnji Cooper# endif 1890*132f818dSEnji Cooper#endif 1891*132f818dSEnji Cooper 1892*132f818dSEnji Cooper/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1893*132f818dSEnji Cooper find out it does not work in some platform. */ 1894*132f818dSEnji Cooper#ifndef LT_DLLAZY_OR_NOW 1895*132f818dSEnji Cooper# ifdef RTLD_LAZY 1896*132f818dSEnji Cooper# define LT_DLLAZY_OR_NOW RTLD_LAZY 1897*132f818dSEnji Cooper# else 1898*132f818dSEnji Cooper# ifdef DL_LAZY 1899*132f818dSEnji Cooper# define LT_DLLAZY_OR_NOW DL_LAZY 1900*132f818dSEnji Cooper# else 1901*132f818dSEnji Cooper# ifdef RTLD_NOW 1902*132f818dSEnji Cooper# define LT_DLLAZY_OR_NOW RTLD_NOW 1903*132f818dSEnji Cooper# else 1904*132f818dSEnji Cooper# ifdef DL_NOW 1905*132f818dSEnji Cooper# define LT_DLLAZY_OR_NOW DL_NOW 1906*132f818dSEnji Cooper# else 1907*132f818dSEnji Cooper# define LT_DLLAZY_OR_NOW 0 1908*132f818dSEnji Cooper# endif 1909*132f818dSEnji Cooper# endif 1910*132f818dSEnji Cooper# endif 1911*132f818dSEnji Cooper# endif 1912*132f818dSEnji Cooper#endif 1913*132f818dSEnji Cooper 1914*132f818dSEnji Cooper/* When -fvisibility=hidden is used, assume the code has been annotated 1915*132f818dSEnji Cooper correspondingly for the symbols needed. */ 1916*132f818dSEnji Cooper#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1917*132f818dSEnji Cooperint fnord (void) __attribute__((visibility("default"))); 1918*132f818dSEnji Cooper#endif 1919*132f818dSEnji Cooper 1920*132f818dSEnji Cooperint fnord (void) { return 42; } 1921*132f818dSEnji Cooperint main (void) 1922*132f818dSEnji Cooper{ 1923*132f818dSEnji Cooper void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1924*132f818dSEnji Cooper int status = $lt_dlunknown; 1925*132f818dSEnji Cooper 1926*132f818dSEnji Cooper if (self) 1927*132f818dSEnji Cooper { 1928*132f818dSEnji Cooper if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1929*132f818dSEnji Cooper else 1930*132f818dSEnji Cooper { 1931*132f818dSEnji Cooper if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1932*132f818dSEnji Cooper else puts (dlerror ()); 1933*132f818dSEnji Cooper } 1934*132f818dSEnji Cooper /* dlclose (self); */ 1935*132f818dSEnji Cooper } 1936*132f818dSEnji Cooper else 1937*132f818dSEnji Cooper puts (dlerror ()); 1938*132f818dSEnji Cooper 1939*132f818dSEnji Cooper return status; 1940*132f818dSEnji Cooper}] 1941*132f818dSEnji Cooper_LT_EOF 1942*132f818dSEnji Cooper if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 1943*132f818dSEnji Cooper (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1944*132f818dSEnji Cooper lt_status=$? 1945*132f818dSEnji Cooper case x$lt_status in 1946*132f818dSEnji Cooper x$lt_dlno_uscore) $1 ;; 1947*132f818dSEnji Cooper x$lt_dlneed_uscore) $2 ;; 1948*132f818dSEnji Cooper x$lt_dlunknown|x*) $3 ;; 1949*132f818dSEnji Cooper esac 1950*132f818dSEnji Cooper else : 1951*132f818dSEnji Cooper # compilation failed 1952*132f818dSEnji Cooper $3 1953*132f818dSEnji Cooper fi 1954*132f818dSEnji Cooperfi 1955*132f818dSEnji Cooperrm -fr conftest* 1956*132f818dSEnji Cooper])# _LT_TRY_DLOPEN_SELF 1957*132f818dSEnji Cooper 1958*132f818dSEnji Cooper 1959*132f818dSEnji Cooper# LT_SYS_DLOPEN_SELF 1960*132f818dSEnji Cooper# ------------------ 1961*132f818dSEnji CooperAC_DEFUN([LT_SYS_DLOPEN_SELF], 1962*132f818dSEnji Cooper[m4_require([_LT_HEADER_DLFCN])dnl 1963*132f818dSEnji Cooperif test yes != "$enable_dlopen"; then 1964*132f818dSEnji Cooper enable_dlopen=unknown 1965*132f818dSEnji Cooper enable_dlopen_self=unknown 1966*132f818dSEnji Cooper enable_dlopen_self_static=unknown 1967*132f818dSEnji Cooperelse 1968*132f818dSEnji Cooper lt_cv_dlopen=no 1969*132f818dSEnji Cooper lt_cv_dlopen_libs= 1970*132f818dSEnji Cooper 1971*132f818dSEnji Cooper case $host_os in 1972*132f818dSEnji Cooper beos*) 1973*132f818dSEnji Cooper lt_cv_dlopen=load_add_on 1974*132f818dSEnji Cooper lt_cv_dlopen_libs= 1975*132f818dSEnji Cooper lt_cv_dlopen_self=yes 1976*132f818dSEnji Cooper ;; 1977*132f818dSEnji Cooper 1978*132f818dSEnji Cooper mingw* | windows* | pw32* | cegcc*) 1979*132f818dSEnji Cooper lt_cv_dlopen=LoadLibrary 1980*132f818dSEnji Cooper lt_cv_dlopen_libs= 1981*132f818dSEnji Cooper ;; 1982*132f818dSEnji Cooper 1983*132f818dSEnji Cooper cygwin*) 1984*132f818dSEnji Cooper lt_cv_dlopen=dlopen 1985*132f818dSEnji Cooper lt_cv_dlopen_libs= 1986*132f818dSEnji Cooper ;; 1987*132f818dSEnji Cooper 1988*132f818dSEnji Cooper darwin*) 1989*132f818dSEnji Cooper # if libdl is installed we need to link against it 1990*132f818dSEnji Cooper AC_CHECK_LIB([dl], [dlopen], 1991*132f818dSEnji Cooper [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 1992*132f818dSEnji Cooper lt_cv_dlopen=dyld 1993*132f818dSEnji Cooper lt_cv_dlopen_libs= 1994*132f818dSEnji Cooper lt_cv_dlopen_self=yes 1995*132f818dSEnji Cooper ]) 1996*132f818dSEnji Cooper ;; 1997*132f818dSEnji Cooper 1998*132f818dSEnji Cooper tpf*) 1999*132f818dSEnji Cooper # Don't try to run any link tests for TPF. We know it's impossible 2000*132f818dSEnji Cooper # because TPF is a cross-compiler, and we know how we open DSOs. 2001*132f818dSEnji Cooper lt_cv_dlopen=dlopen 2002*132f818dSEnji Cooper lt_cv_dlopen_libs= 2003*132f818dSEnji Cooper lt_cv_dlopen_self=no 2004*132f818dSEnji Cooper ;; 2005*132f818dSEnji Cooper 2006*132f818dSEnji Cooper *) 2007*132f818dSEnji Cooper AC_CHECK_FUNC([shl_load], 2008*132f818dSEnji Cooper [lt_cv_dlopen=shl_load], 2009*132f818dSEnji Cooper [AC_CHECK_LIB([dld], [shl_load], 2010*132f818dSEnji Cooper [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 2011*132f818dSEnji Cooper [AC_CHECK_FUNC([dlopen], 2012*132f818dSEnji Cooper [lt_cv_dlopen=dlopen], 2013*132f818dSEnji Cooper [AC_CHECK_LIB([dl], [dlopen], 2014*132f818dSEnji Cooper [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 2015*132f818dSEnji Cooper [AC_CHECK_LIB([svld], [dlopen], 2016*132f818dSEnji Cooper [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 2017*132f818dSEnji Cooper [AC_CHECK_LIB([dld], [dld_link], 2018*132f818dSEnji Cooper [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 2019*132f818dSEnji Cooper ]) 2020*132f818dSEnji Cooper ]) 2021*132f818dSEnji Cooper ]) 2022*132f818dSEnji Cooper ]) 2023*132f818dSEnji Cooper ]) 2024*132f818dSEnji Cooper ;; 2025*132f818dSEnji Cooper esac 2026*132f818dSEnji Cooper 2027*132f818dSEnji Cooper if test no = "$lt_cv_dlopen"; then 2028*132f818dSEnji Cooper enable_dlopen=no 2029*132f818dSEnji Cooper else 2030*132f818dSEnji Cooper enable_dlopen=yes 2031*132f818dSEnji Cooper fi 2032*132f818dSEnji Cooper 2033*132f818dSEnji Cooper case $lt_cv_dlopen in 2034*132f818dSEnji Cooper dlopen) 2035*132f818dSEnji Cooper save_CPPFLAGS=$CPPFLAGS 2036*132f818dSEnji Cooper test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 2037*132f818dSEnji Cooper 2038*132f818dSEnji Cooper save_LDFLAGS=$LDFLAGS 2039*132f818dSEnji Cooper wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 2040*132f818dSEnji Cooper 2041*132f818dSEnji Cooper save_LIBS=$LIBS 2042*132f818dSEnji Cooper LIBS="$lt_cv_dlopen_libs $LIBS" 2043*132f818dSEnji Cooper 2044*132f818dSEnji Cooper AC_CACHE_CHECK([whether a program can dlopen itself], 2045*132f818dSEnji Cooper lt_cv_dlopen_self, [dnl 2046*132f818dSEnji Cooper _LT_TRY_DLOPEN_SELF( 2047*132f818dSEnji Cooper lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 2048*132f818dSEnji Cooper lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 2049*132f818dSEnji Cooper ]) 2050*132f818dSEnji Cooper 2051*132f818dSEnji Cooper if test yes = "$lt_cv_dlopen_self"; then 2052*132f818dSEnji Cooper wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 2053*132f818dSEnji Cooper AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 2054*132f818dSEnji Cooper lt_cv_dlopen_self_static, [dnl 2055*132f818dSEnji Cooper _LT_TRY_DLOPEN_SELF( 2056*132f818dSEnji Cooper lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 2057*132f818dSEnji Cooper lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 2058*132f818dSEnji Cooper ]) 2059*132f818dSEnji Cooper fi 2060*132f818dSEnji Cooper 2061*132f818dSEnji Cooper CPPFLAGS=$save_CPPFLAGS 2062*132f818dSEnji Cooper LDFLAGS=$save_LDFLAGS 2063*132f818dSEnji Cooper LIBS=$save_LIBS 2064*132f818dSEnji Cooper ;; 2065*132f818dSEnji Cooper esac 2066*132f818dSEnji Cooper 2067*132f818dSEnji Cooper case $lt_cv_dlopen_self in 2068*132f818dSEnji Cooper yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 2069*132f818dSEnji Cooper *) enable_dlopen_self=unknown ;; 2070*132f818dSEnji Cooper esac 2071*132f818dSEnji Cooper 2072*132f818dSEnji Cooper case $lt_cv_dlopen_self_static in 2073*132f818dSEnji Cooper yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 2074*132f818dSEnji Cooper *) enable_dlopen_self_static=unknown ;; 2075*132f818dSEnji Cooper esac 2076*132f818dSEnji Cooperfi 2077*132f818dSEnji Cooper_LT_DECL([dlopen_support], [enable_dlopen], [0], 2078*132f818dSEnji Cooper [Whether dlopen is supported]) 2079*132f818dSEnji Cooper_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 2080*132f818dSEnji Cooper [Whether dlopen of programs is supported]) 2081*132f818dSEnji Cooper_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 2082*132f818dSEnji Cooper [Whether dlopen of statically linked programs is supported]) 2083*132f818dSEnji Cooper])# LT_SYS_DLOPEN_SELF 2084*132f818dSEnji Cooper 2085*132f818dSEnji Cooper# Old name: 2086*132f818dSEnji CooperAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 2087*132f818dSEnji Cooperdnl aclocal-1.4 backwards compatibility: 2088*132f818dSEnji Cooperdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 2089*132f818dSEnji Cooper 2090*132f818dSEnji Cooper 2091*132f818dSEnji Cooper# _LT_COMPILER_C_O([TAGNAME]) 2092*132f818dSEnji Cooper# --------------------------- 2093*132f818dSEnji Cooper# Check to see if options -c and -o are simultaneously supported by compiler. 2094*132f818dSEnji Cooper# This macro does not hard code the compiler like AC_PROG_CC_C_O. 2095*132f818dSEnji Cooperm4_defun([_LT_COMPILER_C_O], 2096*132f818dSEnji Cooper[m4_require([_LT_DECL_SED])dnl 2097*132f818dSEnji Cooperm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2098*132f818dSEnji Cooperm4_require([_LT_TAG_COMPILER])dnl 2099*132f818dSEnji CooperAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 2100*132f818dSEnji Cooper [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 2101*132f818dSEnji Cooper [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 2102*132f818dSEnji Cooper $RM -r conftest 2>/dev/null 2103*132f818dSEnji Cooper mkdir conftest 2104*132f818dSEnji Cooper cd conftest 2105*132f818dSEnji Cooper mkdir out 2106*132f818dSEnji Cooper echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2107*132f818dSEnji Cooper 2108*132f818dSEnji Cooper lt_compiler_flag="-o out/conftest2.$ac_objext" 2109*132f818dSEnji Cooper # Insert the option either (1) after the last *FLAGS variable, or 2110*132f818dSEnji Cooper # (2) before a word containing "conftest.", or (3) at the end. 2111*132f818dSEnji Cooper # Note that $ac_compile itself does not contain backslashes and begins 2112*132f818dSEnji Cooper # with a dollar sign (not a hyphen), so the echo should work correctly. 2113*132f818dSEnji Cooper lt_compile=`echo "$ac_compile" | $SED \ 2114*132f818dSEnji Cooper -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2115*132f818dSEnji Cooper -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2116*132f818dSEnji Cooper -e 's:$: $lt_compiler_flag:'` 2117*132f818dSEnji Cooper (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2118*132f818dSEnji Cooper (eval "$lt_compile" 2>out/conftest.err) 2119*132f818dSEnji Cooper ac_status=$? 2120*132f818dSEnji Cooper cat out/conftest.err >&AS_MESSAGE_LOG_FD 2121*132f818dSEnji Cooper echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2122*132f818dSEnji Cooper if (exit $ac_status) && test -s out/conftest2.$ac_objext 2123*132f818dSEnji Cooper then 2124*132f818dSEnji Cooper # The compiler can only warn and ignore the option if not recognized 2125*132f818dSEnji Cooper # So say no if there are warnings 2126*132f818dSEnji Cooper $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 2127*132f818dSEnji Cooper $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 2128*132f818dSEnji Cooper if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2129*132f818dSEnji Cooper _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2130*132f818dSEnji Cooper fi 2131*132f818dSEnji Cooper fi 2132*132f818dSEnji Cooper chmod u+w . 2>&AS_MESSAGE_LOG_FD 2133*132f818dSEnji Cooper $RM conftest* 2134*132f818dSEnji Cooper # SGI C++ compiler will create directory out/ii_files/ for 2135*132f818dSEnji Cooper # template instantiation 2136*132f818dSEnji Cooper test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 2137*132f818dSEnji Cooper $RM out/* && rmdir out 2138*132f818dSEnji Cooper cd .. 2139*132f818dSEnji Cooper $RM -r conftest 2140*132f818dSEnji Cooper $RM conftest* 2141*132f818dSEnji Cooper]) 2142*132f818dSEnji Cooper_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 2143*132f818dSEnji Cooper [Does compiler simultaneously support -c and -o options?]) 2144*132f818dSEnji Cooper])# _LT_COMPILER_C_O 2145*132f818dSEnji Cooper 2146*132f818dSEnji Cooper 2147*132f818dSEnji Cooper# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 2148*132f818dSEnji Cooper# ---------------------------------- 2149*132f818dSEnji Cooper# Check to see if we can do hard links to lock some files if needed 2150*132f818dSEnji Cooperm4_defun([_LT_COMPILER_FILE_LOCKS], 2151*132f818dSEnji Cooper[m4_require([_LT_ENABLE_LOCK])dnl 2152*132f818dSEnji Cooperm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2153*132f818dSEnji Cooper_LT_COMPILER_C_O([$1]) 2154*132f818dSEnji Cooper 2155*132f818dSEnji Cooperhard_links=nottested 2156*132f818dSEnji Cooperif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 2157*132f818dSEnji Cooper # do not overwrite the value of need_locks provided by the user 2158*132f818dSEnji Cooper AC_MSG_CHECKING([if we can lock with hard links]) 2159*132f818dSEnji Cooper hard_links=yes 2160*132f818dSEnji Cooper $RM conftest* 2161*132f818dSEnji Cooper ln conftest.a conftest.b 2>/dev/null && hard_links=no 2162*132f818dSEnji Cooper touch conftest.a 2163*132f818dSEnji Cooper ln conftest.a conftest.b 2>&5 || hard_links=no 2164*132f818dSEnji Cooper ln conftest.a conftest.b 2>/dev/null && hard_links=no 2165*132f818dSEnji Cooper AC_MSG_RESULT([$hard_links]) 2166*132f818dSEnji Cooper if test no = "$hard_links"; then 2167*132f818dSEnji Cooper AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 2168*132f818dSEnji Cooper need_locks=warn 2169*132f818dSEnji Cooper fi 2170*132f818dSEnji Cooperelse 2171*132f818dSEnji Cooper need_locks=no 2172*132f818dSEnji Cooperfi 2173*132f818dSEnji Cooper_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2174*132f818dSEnji Cooper])# _LT_COMPILER_FILE_LOCKS 2175*132f818dSEnji Cooper 2176*132f818dSEnji Cooper 2177*132f818dSEnji Cooper# _LT_CHECK_OBJDIR 2178*132f818dSEnji Cooper# ---------------- 2179*132f818dSEnji Cooperm4_defun([_LT_CHECK_OBJDIR], 2180*132f818dSEnji Cooper[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2181*132f818dSEnji Cooper[rm -f .libs 2>/dev/null 2182*132f818dSEnji Coopermkdir .libs 2>/dev/null 2183*132f818dSEnji Cooperif test -d .libs; then 2184*132f818dSEnji Cooper lt_cv_objdir=.libs 2185*132f818dSEnji Cooperelse 2186*132f818dSEnji Cooper # MS-DOS does not allow filenames that begin with a dot. 2187*132f818dSEnji Cooper lt_cv_objdir=_libs 2188*132f818dSEnji Cooperfi 2189*132f818dSEnji Cooperrmdir .libs 2>/dev/null]) 2190*132f818dSEnji Cooperobjdir=$lt_cv_objdir 2191*132f818dSEnji Cooper_LT_DECL([], [objdir], [0], 2192*132f818dSEnji Cooper [The name of the directory that contains temporary libtool files])dnl 2193*132f818dSEnji Cooperm4_pattern_allow([LT_OBJDIR])dnl 2194*132f818dSEnji CooperAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 2195*132f818dSEnji Cooper [Define to the sub-directory where libtool stores uninstalled libraries.]) 2196*132f818dSEnji Cooper])# _LT_CHECK_OBJDIR 2197*132f818dSEnji Cooper 2198*132f818dSEnji Cooper 2199*132f818dSEnji Cooper# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2200*132f818dSEnji Cooper# -------------------------------------- 2201*132f818dSEnji Cooper# Check hardcoding attributes. 2202*132f818dSEnji Cooperm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2203*132f818dSEnji Cooper[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2204*132f818dSEnji Cooper_LT_TAGVAR(hardcode_action, $1)= 2205*132f818dSEnji Cooperif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2206*132f818dSEnji Cooper test -n "$_LT_TAGVAR(runpath_var, $1)" || 2207*132f818dSEnji Cooper test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 2208*132f818dSEnji Cooper 2209*132f818dSEnji Cooper # We can hardcode non-existent directories. 2210*132f818dSEnji Cooper if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 2211*132f818dSEnji Cooper # If the only mechanism to avoid hardcoding is shlibpath_var, we 2212*132f818dSEnji Cooper # have to relink, otherwise we might link with an installed library 2213*132f818dSEnji Cooper # when we should be linking with a yet-to-be-installed one 2214*132f818dSEnji Cooper ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 2215*132f818dSEnji Cooper test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 2216*132f818dSEnji Cooper # Linking always hardcodes the temporary library directory. 2217*132f818dSEnji Cooper _LT_TAGVAR(hardcode_action, $1)=relink 2218*132f818dSEnji Cooper else 2219*132f818dSEnji Cooper # We can link without hardcoding, and we can hardcode nonexisting dirs. 2220*132f818dSEnji Cooper _LT_TAGVAR(hardcode_action, $1)=immediate 2221*132f818dSEnji Cooper fi 2222*132f818dSEnji Cooperelse 2223*132f818dSEnji Cooper # We cannot hardcode anything, or else we can only hardcode existing 2224*132f818dSEnji Cooper # directories. 2225*132f818dSEnji Cooper _LT_TAGVAR(hardcode_action, $1)=unsupported 2226*132f818dSEnji Cooperfi 2227*132f818dSEnji CooperAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2228*132f818dSEnji Cooper 2229*132f818dSEnji Cooperif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 2230*132f818dSEnji Cooper test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 2231*132f818dSEnji Cooper # Fast installation is not supported 2232*132f818dSEnji Cooper enable_fast_install=no 2233*132f818dSEnji Cooperelif test yes = "$shlibpath_overrides_runpath" || 2234*132f818dSEnji Cooper test no = "$enable_shared"; then 2235*132f818dSEnji Cooper # Fast installation is not necessary 2236*132f818dSEnji Cooper enable_fast_install=needless 2237*132f818dSEnji Cooperfi 2238*132f818dSEnji Cooper_LT_TAGDECL([], [hardcode_action], [0], 2239*132f818dSEnji Cooper [How to hardcode a shared library path into an executable]) 2240*132f818dSEnji Cooper])# _LT_LINKER_HARDCODE_LIBPATH 2241*132f818dSEnji Cooper 2242*132f818dSEnji Cooper 2243*132f818dSEnji Cooper# _LT_CMD_STRIPLIB 2244*132f818dSEnji Cooper# ---------------- 2245*132f818dSEnji Cooperm4_defun([_LT_CMD_STRIPLIB], 2246*132f818dSEnji Cooper[m4_require([_LT_DECL_EGREP]) 2247*132f818dSEnji Cooperstriplib= 2248*132f818dSEnji Cooperold_striplib= 2249*132f818dSEnji CooperAC_MSG_CHECKING([whether stripping libraries is possible]) 2250*132f818dSEnji Cooperif test -z "$STRIP"; then 2251*132f818dSEnji Cooper AC_MSG_RESULT([no]) 2252*132f818dSEnji Cooperelse 2253*132f818dSEnji Cooper if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2254*132f818dSEnji Cooper old_striplib="$STRIP --strip-debug" 2255*132f818dSEnji Cooper striplib="$STRIP --strip-unneeded" 2256*132f818dSEnji Cooper AC_MSG_RESULT([yes]) 2257*132f818dSEnji Cooper else 2258*132f818dSEnji Cooper case $host_os in 2259*132f818dSEnji Cooper darwin*) 2260*132f818dSEnji Cooper # FIXME - insert some real tests, host_os isn't really good enough 2261*132f818dSEnji Cooper striplib="$STRIP -x" 2262*132f818dSEnji Cooper old_striplib="$STRIP -S" 2263*132f818dSEnji Cooper AC_MSG_RESULT([yes]) 2264*132f818dSEnji Cooper ;; 2265*132f818dSEnji Cooper freebsd*) 2266*132f818dSEnji Cooper if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 2267*132f818dSEnji Cooper old_striplib="$STRIP --strip-debug" 2268*132f818dSEnji Cooper striplib="$STRIP --strip-unneeded" 2269*132f818dSEnji Cooper AC_MSG_RESULT([yes]) 2270*132f818dSEnji Cooper else 2271*132f818dSEnji Cooper AC_MSG_RESULT([no]) 2272*132f818dSEnji Cooper fi 2273*132f818dSEnji Cooper ;; 2274*132f818dSEnji Cooper *) 2275*132f818dSEnji Cooper AC_MSG_RESULT([no]) 2276*132f818dSEnji Cooper ;; 2277*132f818dSEnji Cooper esac 2278*132f818dSEnji Cooper fi 2279*132f818dSEnji Cooperfi 2280*132f818dSEnji Cooper_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2281*132f818dSEnji Cooper_LT_DECL([], [striplib], [1]) 2282*132f818dSEnji Cooper])# _LT_CMD_STRIPLIB 2283*132f818dSEnji Cooper 2284*132f818dSEnji Cooper 2285*132f818dSEnji Cooper# _LT_PREPARE_MUNGE_PATH_LIST 2286*132f818dSEnji Cooper# --------------------------- 2287*132f818dSEnji Cooper# Make sure func_munge_path_list() is defined correctly. 2288*132f818dSEnji Cooperm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 2289*132f818dSEnji Cooper[[# func_munge_path_list VARIABLE PATH 2290*132f818dSEnji Cooper# ----------------------------------- 2291*132f818dSEnji Cooper# VARIABLE is name of variable containing _space_ separated list of 2292*132f818dSEnji Cooper# directories to be munged by the contents of PATH, which is string 2293*132f818dSEnji Cooper# having a format: 2294*132f818dSEnji Cooper# "DIR[:DIR]:" 2295*132f818dSEnji Cooper# string "DIR[ DIR]" will be prepended to VARIABLE 2296*132f818dSEnji Cooper# ":DIR[:DIR]" 2297*132f818dSEnji Cooper# string "DIR[ DIR]" will be appended to VARIABLE 2298*132f818dSEnji Cooper# "DIRP[:DIRP]::[DIRA:]DIRA" 2299*132f818dSEnji Cooper# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 2300*132f818dSEnji Cooper# "DIRA[ DIRA]" will be appended to VARIABLE 2301*132f818dSEnji Cooper# "DIR[:DIR]" 2302*132f818dSEnji Cooper# VARIABLE will be replaced by "DIR[ DIR]" 2303*132f818dSEnji Cooperfunc_munge_path_list () 2304*132f818dSEnji Cooper{ 2305*132f818dSEnji Cooper case x@S|@2 in 2306*132f818dSEnji Cooper x) 2307*132f818dSEnji Cooper ;; 2308*132f818dSEnji Cooper *:) 2309*132f818dSEnji Cooper eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 2310*132f818dSEnji Cooper ;; 2311*132f818dSEnji Cooper x:*) 2312*132f818dSEnji Cooper eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 2313*132f818dSEnji Cooper ;; 2314*132f818dSEnji Cooper *::*) 2315*132f818dSEnji Cooper eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 2316*132f818dSEnji Cooper eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 2317*132f818dSEnji Cooper ;; 2318*132f818dSEnji Cooper *) 2319*132f818dSEnji Cooper eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 2320*132f818dSEnji Cooper ;; 2321*132f818dSEnji Cooper esac 2322*132f818dSEnji Cooper} 2323*132f818dSEnji Cooper]])# _LT_PREPARE_PATH_LIST 2324*132f818dSEnji Cooper 2325*132f818dSEnji Cooper 2326*132f818dSEnji Cooper# _LT_SYS_DYNAMIC_LINKER([TAG]) 2327*132f818dSEnji Cooper# ----------------------------- 2328*132f818dSEnji Cooper# PORTME Fill in your ld.so characteristics 2329*132f818dSEnji Cooperm4_defun([_LT_SYS_DYNAMIC_LINKER], 2330*132f818dSEnji Cooper[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2331*132f818dSEnji Cooperm4_require([_LT_DECL_EGREP])dnl 2332*132f818dSEnji Cooperm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2333*132f818dSEnji Cooperm4_require([_LT_DECL_OBJDUMP])dnl 2334*132f818dSEnji Cooperm4_require([_LT_DECL_SED])dnl 2335*132f818dSEnji Cooperm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2336*132f818dSEnji Cooperm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 2337*132f818dSEnji CooperAC_MSG_CHECKING([dynamic linker characteristics]) 2338*132f818dSEnji Cooperm4_if([$1], 2339*132f818dSEnji Cooper [], [ 2340*132f818dSEnji Cooperif test yes = "$GCC"; then 2341*132f818dSEnji Cooper case $host_os in 2342*132f818dSEnji Cooper darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 2343*132f818dSEnji Cooper *) lt_awk_arg='/^libraries:/' ;; 2344*132f818dSEnji Cooper esac 2345*132f818dSEnji Cooper case $host_os in 2346*132f818dSEnji Cooper mingw* | windows* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 2347*132f818dSEnji Cooper *) lt_sed_strip_eq='s|=/|/|g' ;; 2348*132f818dSEnji Cooper esac 2349*132f818dSEnji Cooper lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2350*132f818dSEnji Cooper case $lt_search_path_spec in 2351*132f818dSEnji Cooper *\;*) 2352*132f818dSEnji Cooper # if the path contains ";" then we assume it to be the separator 2353*132f818dSEnji Cooper # otherwise default to the standard path separator (i.e. ":") - it is 2354*132f818dSEnji Cooper # assumed that no part of a normal pathname contains ";" but that should 2355*132f818dSEnji Cooper # okay in the real world where ";" in dirpaths is itself problematic. 2356*132f818dSEnji Cooper lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2357*132f818dSEnji Cooper ;; 2358*132f818dSEnji Cooper *) 2359*132f818dSEnji Cooper lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2360*132f818dSEnji Cooper ;; 2361*132f818dSEnji Cooper esac 2362*132f818dSEnji Cooper # Ok, now we have the path, separated by spaces, we can step through it 2363*132f818dSEnji Cooper # and add multilib dir if necessary... 2364*132f818dSEnji Cooper lt_tmp_lt_search_path_spec= 2365*132f818dSEnji Cooper lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2366*132f818dSEnji Cooper # ...but if some path component already ends with the multilib dir we assume 2367*132f818dSEnji Cooper # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 2368*132f818dSEnji Cooper case "$lt_multi_os_dir; $lt_search_path_spec " in 2369*132f818dSEnji Cooper "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 2370*132f818dSEnji Cooper lt_multi_os_dir= 2371*132f818dSEnji Cooper ;; 2372*132f818dSEnji Cooper esac 2373*132f818dSEnji Cooper for lt_sys_path in $lt_search_path_spec; do 2374*132f818dSEnji Cooper if test -d "$lt_sys_path$lt_multi_os_dir"; then 2375*132f818dSEnji Cooper lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 2376*132f818dSEnji Cooper elif test -n "$lt_multi_os_dir"; then 2377*132f818dSEnji Cooper test -d "$lt_sys_path" && \ 2378*132f818dSEnji Cooper lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2379*132f818dSEnji Cooper fi 2380*132f818dSEnji Cooper done 2381*132f818dSEnji Cooper lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2382*132f818dSEnji CooperBEGIN {RS = " "; FS = "/|\n";} { 2383*132f818dSEnji Cooper lt_foo = ""; 2384*132f818dSEnji Cooper lt_count = 0; 2385*132f818dSEnji Cooper for (lt_i = NF; lt_i > 0; lt_i--) { 2386*132f818dSEnji Cooper if ($lt_i != "" && $lt_i != ".") { 2387*132f818dSEnji Cooper if ($lt_i == "..") { 2388*132f818dSEnji Cooper lt_count++; 2389*132f818dSEnji Cooper } else { 2390*132f818dSEnji Cooper if (lt_count == 0) { 2391*132f818dSEnji Cooper lt_foo = "/" $lt_i lt_foo; 2392*132f818dSEnji Cooper } else { 2393*132f818dSEnji Cooper lt_count--; 2394*132f818dSEnji Cooper } 2395*132f818dSEnji Cooper } 2396*132f818dSEnji Cooper } 2397*132f818dSEnji Cooper } 2398*132f818dSEnji Cooper if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2399*132f818dSEnji Cooper if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2400*132f818dSEnji Cooper}'` 2401*132f818dSEnji Cooper # AWK program above erroneously prepends '/' to C:/dos/paths 2402*132f818dSEnji Cooper # for these hosts. 2403*132f818dSEnji Cooper case $host_os in 2404*132f818dSEnji Cooper mingw* | windows* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2405*132f818dSEnji Cooper $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 2406*132f818dSEnji Cooper esac 2407*132f818dSEnji Cooper sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2408*132f818dSEnji Cooperelse 2409*132f818dSEnji Cooper sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2410*132f818dSEnji Cooperfi]) 2411*132f818dSEnji Cooperlibrary_names_spec= 2412*132f818dSEnji Cooperlibname_spec='lib$name' 2413*132f818dSEnji Coopersoname_spec= 2414*132f818dSEnji Coopershrext_cmds=.so 2415*132f818dSEnji Cooperpostinstall_cmds= 2416*132f818dSEnji Cooperpostuninstall_cmds= 2417*132f818dSEnji Cooperfinish_cmds= 2418*132f818dSEnji Cooperfinish_eval= 2419*132f818dSEnji Coopershlibpath_var= 2420*132f818dSEnji Coopershlibpath_overrides_runpath=unknown 2421*132f818dSEnji Cooperversion_type=none 2422*132f818dSEnji Cooperdynamic_linker="$host_os ld.so" 2423*132f818dSEnji Coopersys_lib_dlsearch_path_spec="/lib /usr/lib" 2424*132f818dSEnji Cooperneed_lib_prefix=unknown 2425*132f818dSEnji Cooperhardcode_into_libs=no 2426*132f818dSEnji Cooper 2427*132f818dSEnji Cooper# when you set need_version to no, make sure it does not cause -set_version 2428*132f818dSEnji Cooper# flags to be left without arguments 2429*132f818dSEnji Cooperneed_version=unknown 2430*132f818dSEnji Cooper 2431*132f818dSEnji CooperAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 2432*132f818dSEnji Cooper[User-defined run-time library search path.]) 2433*132f818dSEnji Cooper 2434*132f818dSEnji Coopercase $host_os in 2435*132f818dSEnji Cooperaix3*) 2436*132f818dSEnji Cooper version_type=linux # correct to gnu/linux during the next big refactor 2437*132f818dSEnji Cooper library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 2438*132f818dSEnji Cooper shlibpath_var=LIBPATH 2439*132f818dSEnji Cooper 2440*132f818dSEnji Cooper # AIX 3 has no versioning support, so we append a major version to the name. 2441*132f818dSEnji Cooper soname_spec='$libname$release$shared_ext$major' 2442*132f818dSEnji Cooper ;; 2443*132f818dSEnji Cooper 2444*132f818dSEnji Cooperaix[[4-9]]*) 2445*132f818dSEnji Cooper version_type=linux # correct to gnu/linux during the next big refactor 2446*132f818dSEnji Cooper need_lib_prefix=no 2447*132f818dSEnji Cooper need_version=no 2448*132f818dSEnji Cooper hardcode_into_libs=yes 2449*132f818dSEnji Cooper if test ia64 = "$host_cpu"; then 2450*132f818dSEnji Cooper # AIX 5 supports IA64 2451*132f818dSEnji Cooper library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 2452*132f818dSEnji Cooper shlibpath_var=LD_LIBRARY_PATH 2453*132f818dSEnji Cooper else 2454*132f818dSEnji Cooper # With GCC up to 2.95.x, collect2 would create an import file 2455*132f818dSEnji Cooper # for dependence libraries. The import file would start with 2456*132f818dSEnji Cooper # the line '#! .'. This would cause the generated library to 2457*132f818dSEnji Cooper # depend on '.', always an invalid library. This was fixed in 2458*132f818dSEnji Cooper # development snapshots of GCC prior to 3.0. 2459*132f818dSEnji Cooper case $host_os in 2460*132f818dSEnji Cooper aix4 | aix4.[[01]] | aix4.[[01]].*) 2461*132f818dSEnji Cooper if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2462*132f818dSEnji Cooper echo ' yes ' 2463*132f818dSEnji Cooper echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 2464*132f818dSEnji Cooper : 2465*132f818dSEnji Cooper else 2466*132f818dSEnji Cooper can_build_shared=no 2467*132f818dSEnji Cooper fi 2468*132f818dSEnji Cooper ;; 2469*132f818dSEnji Cooper esac 2470*132f818dSEnji Cooper # Using Import Files as archive members, it is possible to support 2471*132f818dSEnji Cooper # filename-based versioning of shared library archives on AIX. While 2472*132f818dSEnji Cooper # this would work for both with and without runtime linking, it will 2473*132f818dSEnji Cooper # prevent static linking of such archives. So we do filename-based 2474*132f818dSEnji Cooper # shared library versioning with .so extension only, which is used 2475*132f818dSEnji Cooper # when both runtime linking and shared linking is enabled. 2476*132f818dSEnji Cooper # Unfortunately, runtime linking may impact performance, so we do 2477*132f818dSEnji Cooper # not want this to be the default eventually. Also, we use the 2478*132f818dSEnji Cooper # versioned .so libs for executables only if there is the -brtl 2479*132f818dSEnji Cooper # linker flag in LDFLAGS as well, or --enable-aix-soname=svr4 only. 2480*132f818dSEnji Cooper # To allow for filename-based versioning support, we need to create 2481*132f818dSEnji Cooper # libNAME.so.V as an archive file, containing: 2482*132f818dSEnji Cooper # *) an Import File, referring to the versioned filename of the 2483*132f818dSEnji Cooper # archive as well as the shared archive member, telling the 2484*132f818dSEnji Cooper # bitwidth (32 or 64) of that shared object, and providing the 2485*132f818dSEnji Cooper # list of exported symbols of that shared object, eventually 2486*132f818dSEnji Cooper # decorated with the 'weak' keyword 2487*132f818dSEnji Cooper # *) the shared object with the F_LOADONLY flag set, to really avoid 2488*132f818dSEnji Cooper # it being seen by the linker. 2489*132f818dSEnji Cooper # At run time we better use the real file rather than another symlink, 2490*132f818dSEnji Cooper # but for link time we create the symlink libNAME.so -> libNAME.so.V 2491*132f818dSEnji Cooper 2492*132f818dSEnji Cooper case $with_aix_soname,$aix_use_runtimelinking in 2493*132f818dSEnji Cooper # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 2494*132f818dSEnji Cooper # soname into executable. Probably we can add versioning support to 2495*132f818dSEnji Cooper # collect2, so additional links can be useful in future. 2496*132f818dSEnji Cooper aix,yes) # traditional libtool 2497*132f818dSEnji Cooper dynamic_linker='AIX unversionable lib.so' 2498*132f818dSEnji Cooper # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2499*132f818dSEnji Cooper # instead of lib<name>.a to let people know that these are not 2500*132f818dSEnji Cooper # typical AIX shared libraries. 2501*132f818dSEnji Cooper library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2502*132f818dSEnji Cooper ;; 2503*132f818dSEnji Cooper aix,no) # traditional AIX only 2504*132f818dSEnji Cooper dynamic_linker='AIX lib.a[(]lib.so.V[)]' 2505*132f818dSEnji Cooper # We preserve .a as extension for shared libraries through AIX4.2 2506*132f818dSEnji Cooper # and later when we are not doing run time linking. 2507*132f818dSEnji Cooper library_names_spec='$libname$release.a $libname.a' 2508*132f818dSEnji Cooper soname_spec='$libname$release$shared_ext$major' 2509*132f818dSEnji Cooper ;; 2510*132f818dSEnji Cooper svr4,*) # full svr4 only 2511*132f818dSEnji Cooper dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 2512*132f818dSEnji Cooper library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2513*132f818dSEnji Cooper # We do not specify a path in Import Files, so LIBPATH fires. 2514*132f818dSEnji Cooper shlibpath_overrides_runpath=yes 2515*132f818dSEnji Cooper ;; 2516*132f818dSEnji Cooper *,yes) # both, prefer svr4 2517*132f818dSEnji Cooper dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 2518*132f818dSEnji Cooper library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2519*132f818dSEnji Cooper # unpreferred sharedlib libNAME.a needs extra handling 2520*132f818dSEnji Cooper 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"' 2521*132f818dSEnji Cooper 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"' 2522*132f818dSEnji Cooper # We do not specify a path in Import Files, so LIBPATH fires. 2523*132f818dSEnji Cooper shlibpath_overrides_runpath=yes 2524*132f818dSEnji Cooper ;; 2525*132f818dSEnji Cooper *,no) # both, prefer aix 2526*132f818dSEnji Cooper dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 2527*132f818dSEnji Cooper library_names_spec='$libname$release.a $libname.a' 2528*132f818dSEnji Cooper soname_spec='$libname$release$shared_ext$major' 2529*132f818dSEnji Cooper # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 2530*132f818dSEnji Cooper 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)' 2531*132f818dSEnji Cooper 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"' 2532*132f818dSEnji Cooper ;; 2533*132f818dSEnji Cooper esac 2534*132f818dSEnji Cooper shlibpath_var=LIBPATH 2535*132f818dSEnji Cooper fi 2536*132f818dSEnji Cooper ;; 2537*132f818dSEnji Cooper 2538*132f818dSEnji Cooperamigaos*) 2539*132f818dSEnji Cooper case $host_cpu in 2540*132f818dSEnji Cooper powerpc) 2541*132f818dSEnji Cooper # Since July 2007 AmigaOS4 officially supports .so libraries. 2542*132f818dSEnji Cooper # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2543*132f818dSEnji Cooper library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2544*132f818dSEnji Cooper ;; 2545*132f818dSEnji Cooper m68k) 2546*132f818dSEnji Cooper library_names_spec='$libname.ixlibrary $libname.a' 2547*132f818dSEnji Cooper # Create ${libname}_ixlibrary.a entries in /sys/libs. 2548*132f818dSEnji Cooper 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' 2549*132f818dSEnji Cooper ;; 2550*132f818dSEnji Cooper esac 2551*132f818dSEnji Cooper ;; 2552*132f818dSEnji Cooper 2553*132f818dSEnji Cooperbeos*) 2554*132f818dSEnji Cooper library_names_spec='$libname$shared_ext' 2555*132f818dSEnji Cooper dynamic_linker="$host_os ld.so" 2556*132f818dSEnji Cooper shlibpath_var=LIBRARY_PATH 2557*132f818dSEnji Cooper ;; 2558*132f818dSEnji Cooper 2559*132f818dSEnji Cooperbsdi[[45]]*) 2560*132f818dSEnji Cooper version_type=linux # correct to gnu/linux during the next big refactor 2561*132f818dSEnji Cooper need_version=no 2562*132f818dSEnji Cooper library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2563*132f818dSEnji Cooper soname_spec='$libname$release$shared_ext$major' 2564*132f818dSEnji Cooper finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2565*132f818dSEnji Cooper shlibpath_var=LD_LIBRARY_PATH 2566*132f818dSEnji Cooper sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2567*132f818dSEnji Cooper sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2568*132f818dSEnji Cooper # the default ld.so.conf also contains /usr/contrib/lib and 2569*132f818dSEnji Cooper # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2570*132f818dSEnji Cooper # libtool to hard-code these into programs 2571*132f818dSEnji Cooper ;; 2572*132f818dSEnji Cooper 2573*132f818dSEnji Coopercygwin* | mingw* | windows* | pw32* | cegcc*) 2574*132f818dSEnji Cooper version_type=windows 2575*132f818dSEnji Cooper shrext_cmds=.dll 2576*132f818dSEnji Cooper need_version=no 2577*132f818dSEnji Cooper need_lib_prefix=no 2578*132f818dSEnji Cooper 2579*132f818dSEnji Cooper case $GCC,$cc_basename in 2580*132f818dSEnji Cooper yes,*) 2581*132f818dSEnji Cooper # gcc 2582*132f818dSEnji Cooper library_names_spec='$libname.dll.a' 2583*132f818dSEnji Cooper # DLL is installed to $(libdir)/../bin by postinstall_cmds 2584*132f818dSEnji Cooper # If user builds GCC with multilib enabled, 2585*132f818dSEnji Cooper # it should just install on $(libdir) 2586*132f818dSEnji Cooper # not on $(libdir)/../bin or 32 bits dlls would override 64 bit ones. 2587*132f818dSEnji Cooper if test xyes = x"$multilib"; then 2588*132f818dSEnji Cooper postinstall_cmds='base_file=`basename \$file`~ 2589*132f818dSEnji Cooper dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2590*132f818dSEnji Cooper dldir=$destdir/`dirname \$dlpath`~ 2591*132f818dSEnji Cooper $install_prog $dir/$dlname $destdir/$dlname~ 2592*132f818dSEnji Cooper chmod a+x $destdir/$dlname~ 2593*132f818dSEnji Cooper if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2594*132f818dSEnji Cooper eval '\''$striplib $destdir/$dlname'\'' || exit \$?; 2595*132f818dSEnji Cooper fi' 2596*132f818dSEnji Cooper else 2597*132f818dSEnji Cooper postinstall_cmds='base_file=`basename \$file`~ 2598*132f818dSEnji Cooper dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2599*132f818dSEnji Cooper dldir=$destdir/`dirname \$dlpath`~ 2600*132f818dSEnji Cooper test -d \$dldir || mkdir -p \$dldir~ 2601*132f818dSEnji Cooper $install_prog $dir/$dlname \$dldir/$dlname~ 2602*132f818dSEnji Cooper chmod a+x \$dldir/$dlname~ 2603*132f818dSEnji Cooper if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2604*132f818dSEnji Cooper eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2605*132f818dSEnji Cooper fi' 2606*132f818dSEnji Cooper fi 2607*132f818dSEnji Cooper postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2608*132f818dSEnji Cooper dlpath=$dir/\$dldll~ 2609*132f818dSEnji Cooper $RM \$dlpath' 2610*132f818dSEnji Cooper shlibpath_overrides_runpath=yes 2611*132f818dSEnji Cooper 2612*132f818dSEnji Cooper case $host_os in 2613*132f818dSEnji Cooper cygwin*) 2614*132f818dSEnji Cooper # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2615*132f818dSEnji Cooper soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2616*132f818dSEnji Cooperm4_if([$1], [],[ 2617*132f818dSEnji Cooper sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2618*132f818dSEnji Cooper ;; 2619*132f818dSEnji Cooper mingw* | windows* | cegcc*) 2620*132f818dSEnji Cooper # MinGW DLLs use traditional 'lib' prefix 2621*132f818dSEnji Cooper soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2622*132f818dSEnji Cooper ;; 2623*132f818dSEnji Cooper pw32*) 2624*132f818dSEnji Cooper # pw32 DLLs use 'pw' prefix rather than 'lib' 2625*132f818dSEnji Cooper library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2626*132f818dSEnji Cooper ;; 2627*132f818dSEnji Cooper esac 2628*132f818dSEnji Cooper dynamic_linker='Win32 ld.exe' 2629*132f818dSEnji Cooper ;; 2630*132f818dSEnji Cooper 2631*132f818dSEnji Cooper *,cl* | *,icl*) 2632*132f818dSEnji Cooper # Native MSVC or ICC 2633*132f818dSEnji Cooper libname_spec='$name' 2634*132f818dSEnji Cooper soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2635*132f818dSEnji Cooper library_names_spec='$libname.dll.lib' 2636*132f818dSEnji Cooper 2637*132f818dSEnji Cooper case $build_os in 2638*132f818dSEnji Cooper mingw* | windows*) 2639*132f818dSEnji Cooper sys_lib_search_path_spec= 2640*132f818dSEnji Cooper lt_save_ifs=$IFS 2641*132f818dSEnji Cooper IFS=';' 2642*132f818dSEnji Cooper for lt_path in $LIB 2643*132f818dSEnji Cooper do 2644*132f818dSEnji Cooper IFS=$lt_save_ifs 2645*132f818dSEnji Cooper # Let DOS variable expansion print the short 8.3 style file name. 2646*132f818dSEnji Cooper lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2647*132f818dSEnji Cooper sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2648*132f818dSEnji Cooper done 2649*132f818dSEnji Cooper IFS=$lt_save_ifs 2650*132f818dSEnji Cooper # Convert to MSYS style. 2651*132f818dSEnji Cooper sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2652*132f818dSEnji Cooper ;; 2653*132f818dSEnji Cooper cygwin*) 2654*132f818dSEnji Cooper # Convert to unix form, then to dos form, then back to unix form 2655*132f818dSEnji Cooper # but this time dos style (no spaces!) so that the unix form looks 2656*132f818dSEnji Cooper # like /cygdrive/c/PROGRA~1:/cygdr... 2657*132f818dSEnji Cooper sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2658*132f818dSEnji Cooper sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2659*132f818dSEnji Cooper sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2660*132f818dSEnji Cooper ;; 2661*132f818dSEnji Cooper *) 2662*132f818dSEnji Cooper sys_lib_search_path_spec=$LIB 2663*132f818dSEnji Cooper if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2664*132f818dSEnji Cooper # It is most probably a Windows format PATH. 2665*132f818dSEnji Cooper sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2666*132f818dSEnji Cooper else 2667*132f818dSEnji Cooper sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2668*132f818dSEnji Cooper fi 2669*132f818dSEnji Cooper # FIXME: find the short name or the path components, as spaces are 2670*132f818dSEnji Cooper # common. (e.g. "Program Files" -> "PROGRA~1") 2671*132f818dSEnji Cooper ;; 2672*132f818dSEnji Cooper esac 2673*132f818dSEnji Cooper 2674*132f818dSEnji Cooper # DLL is installed to $(libdir)/../bin by postinstall_cmds 2675*132f818dSEnji Cooper postinstall_cmds='base_file=`basename \$file`~ 2676*132f818dSEnji Cooper dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2677*132f818dSEnji Cooper dldir=$destdir/`dirname \$dlpath`~ 2678*132f818dSEnji Cooper test -d \$dldir || mkdir -p \$dldir~ 2679*132f818dSEnji Cooper $install_prog $dir/$dlname \$dldir/$dlname' 2680*132f818dSEnji Cooper postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2681*132f818dSEnji Cooper dlpath=$dir/\$dldll~ 2682*132f818dSEnji Cooper $RM \$dlpath' 2683*132f818dSEnji Cooper shlibpath_overrides_runpath=yes 2684*132f818dSEnji Cooper dynamic_linker='Win32 link.exe' 2685*132f818dSEnji Cooper ;; 2686*132f818dSEnji Cooper 2687*132f818dSEnji Cooper *) 2688*132f818dSEnji Cooper # Assume MSVC and ICC wrapper 2689*132f818dSEnji Cooper library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 2690*132f818dSEnji Cooper dynamic_linker='Win32 ld.exe' 2691*132f818dSEnji Cooper ;; 2692*132f818dSEnji Cooper esac 2693*132f818dSEnji Cooper # FIXME: first we should search . and the directory the executable is in 2694*132f818dSEnji Cooper shlibpath_var=PATH 2695*132f818dSEnji Cooper ;; 2696*132f818dSEnji Cooper 2697*132f818dSEnji Cooperdarwin* | rhapsody*) 2698*132f818dSEnji Cooper dynamic_linker="$host_os dyld" 2699*132f818dSEnji Cooper version_type=darwin 2700*132f818dSEnji Cooper need_lib_prefix=no 2701*132f818dSEnji Cooper need_version=no 2702*132f818dSEnji Cooper library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 2703*132f818dSEnji Cooper soname_spec='$libname$release$major$shared_ext' 2704*132f818dSEnji Cooper shlibpath_overrides_runpath=yes 2705*132f818dSEnji Cooper shlibpath_var=DYLD_LIBRARY_PATH 2706*132f818dSEnji Cooper shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2707*132f818dSEnji Cooperm4_if([$1], [],[ 2708*132f818dSEnji Cooper sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2709*132f818dSEnji Cooper sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2710*132f818dSEnji Cooper ;; 2711*132f818dSEnji Cooper 2712*132f818dSEnji Cooperdgux*) 2713*132f818dSEnji Cooper version_type=linux # correct to gnu/linux during the next big refactor 2714*132f818dSEnji Cooper need_lib_prefix=no 2715*132f818dSEnji Cooper need_version=no 2716*132f818dSEnji Cooper library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2717*132f818dSEnji Cooper soname_spec='$libname$release$shared_ext$major' 2718*132f818dSEnji Cooper shlibpath_var=LD_LIBRARY_PATH 2719*132f818dSEnji Cooper ;; 2720*132f818dSEnji Cooper 2721*132f818dSEnji Cooperfreebsd* | dragonfly* | midnightbsd*) 2722*132f818dSEnji Cooper # DragonFly does not have aout. When/if they implement a new 2723*132f818dSEnji Cooper # versioning mechanism, adjust this. 2724*132f818dSEnji Cooper if test -x /usr/bin/objformat; then 2725*132f818dSEnji Cooper objformat=`/usr/bin/objformat` 2726*132f818dSEnji Cooper else 2727*132f818dSEnji Cooper case $host_os in 2728*132f818dSEnji Cooper freebsd[[23]].*) objformat=aout ;; 2729*132f818dSEnji Cooper *) objformat=elf ;; 2730*132f818dSEnji Cooper esac 2731*132f818dSEnji Cooper fi 2732*132f818dSEnji Cooper version_type=freebsd-$objformat 2733*132f818dSEnji Cooper case $version_type in 2734*132f818dSEnji Cooper freebsd-elf*) 2735*132f818dSEnji Cooper library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2736*132f818dSEnji Cooper soname_spec='$libname$release$shared_ext$major' 2737*132f818dSEnji Cooper need_version=no 2738*132f818dSEnji Cooper need_lib_prefix=no 2739*132f818dSEnji Cooper ;; 2740*132f818dSEnji Cooper freebsd-*) 2741*132f818dSEnji Cooper library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2742*132f818dSEnji Cooper need_version=yes 2743*132f818dSEnji Cooper ;; 2744*132f818dSEnji Cooper esac 2745*132f818dSEnji Cooper case $host_cpu in 2746*132f818dSEnji Cooper powerpc64) 2747*132f818dSEnji Cooper # On FreeBSD bi-arch platforms, a different variable is used for 32-bit 2748*132f818dSEnji Cooper # binaries. See <https://man.freebsd.org/cgi/man.cgi?query=ld.so>. 2749*132f818dSEnji Cooper AC_COMPILE_IFELSE( 2750*132f818dSEnji Cooper [AC_LANG_SOURCE( 2751*132f818dSEnji Cooper [[int test_pointer_size[sizeof (void *) - 5]; 2752*132f818dSEnji Cooper ]])], 2753*132f818dSEnji Cooper [shlibpath_var=LD_LIBRARY_PATH], 2754*132f818dSEnji Cooper [shlibpath_var=LD_32_LIBRARY_PATH]) 2755*132f818dSEnji Cooper ;; 2756*132f818dSEnji Cooper *) 2757*132f818dSEnji Cooper shlibpath_var=LD_LIBRARY_PATH 2758*132f818dSEnji Cooper ;; 2759*132f818dSEnji Cooper esac 2760*132f818dSEnji Cooper case $host_os in 2761*132f818dSEnji Cooper freebsd2.*) 2762*132f818dSEnji Cooper shlibpath_overrides_runpath=yes 2763*132f818dSEnji Cooper ;; 2764*132f818dSEnji Cooper freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2765*132f818dSEnji Cooper shlibpath_overrides_runpath=yes 2766*132f818dSEnji Cooper hardcode_into_libs=yes 2767*132f818dSEnji Cooper ;; 2768*132f818dSEnji Cooper freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2769*132f818dSEnji Cooper freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2770*132f818dSEnji Cooper shlibpath_overrides_runpath=no 2771*132f818dSEnji Cooper hardcode_into_libs=yes 2772*132f818dSEnji Cooper ;; 2773*132f818dSEnji Cooper *) # from 4.6 on, and DragonFly 2774*132f818dSEnji Cooper shlibpath_overrides_runpath=yes 2775*132f818dSEnji Cooper hardcode_into_libs=yes 2776*132f818dSEnji Cooper ;; 2777*132f818dSEnji Cooper esac 2778*132f818dSEnji Cooper ;; 2779*132f818dSEnji Cooper 2780*132f818dSEnji Cooperhaiku*) 2781*132f818dSEnji Cooper version_type=linux # correct to gnu/linux during the next big refactor 2782*132f818dSEnji Cooper need_lib_prefix=no 2783*132f818dSEnji Cooper need_version=no 2784*132f818dSEnji Cooper dynamic_linker="$host_os runtime_loader" 2785*132f818dSEnji Cooper library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2786*132f818dSEnji Cooper soname_spec='$libname$release$shared_ext$major' 2787*132f818dSEnji Cooper shlibpath_var=LIBRARY_PATH 2788*132f818dSEnji Cooper shlibpath_overrides_runpath=no 2789*132f818dSEnji Cooper sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib' 2790*132f818dSEnji Cooper sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib' 2791*132f818dSEnji Cooper hardcode_into_libs=no 2792*132f818dSEnji Cooper ;; 2793*132f818dSEnji Cooper 2794*132f818dSEnji Cooperhpux9* | hpux10* | hpux11*) 2795*132f818dSEnji Cooper # Give a soname corresponding to the major version so that dld.sl refuses to 2796*132f818dSEnji Cooper # link against other versions. 2797*132f818dSEnji Cooper version_type=sunos 2798*132f818dSEnji Cooper need_lib_prefix=no 2799*132f818dSEnji Cooper need_version=no 2800*132f818dSEnji Cooper case $host_cpu in 2801*132f818dSEnji Cooper ia64*) 2802*132f818dSEnji Cooper shrext_cmds='.so' 2803*132f818dSEnji Cooper hardcode_into_libs=yes 2804*132f818dSEnji Cooper dynamic_linker="$host_os dld.so" 2805*132f818dSEnji Cooper shlibpath_var=LD_LIBRARY_PATH 2806*132f818dSEnji Cooper shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2807*132f818dSEnji Cooper library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2808*132f818dSEnji Cooper soname_spec='$libname$release$shared_ext$major' 2809*132f818dSEnji Cooper if test 32 = "$HPUX_IA64_MODE"; then 2810*132f818dSEnji Cooper sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2811*132f818dSEnji Cooper sys_lib_dlsearch_path_spec=/usr/lib/hpux32 2812*132f818dSEnji Cooper else 2813*132f818dSEnji Cooper sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2814*132f818dSEnji Cooper sys_lib_dlsearch_path_spec=/usr/lib/hpux64 2815*132f818dSEnji Cooper fi 2816*132f818dSEnji Cooper ;; 2817*132f818dSEnji Cooper hppa*64*) 2818*132f818dSEnji Cooper shrext_cmds='.sl' 2819*132f818dSEnji Cooper hardcode_into_libs=yes 2820*132f818dSEnji Cooper dynamic_linker="$host_os dld.sl" 2821*132f818dSEnji Cooper shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2822*132f818dSEnji Cooper shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2823*132f818dSEnji Cooper library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2824*132f818dSEnji Cooper soname_spec='$libname$release$shared_ext$major' 2825*132f818dSEnji Cooper sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2826*132f818dSEnji Cooper sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2827*132f818dSEnji Cooper ;; 2828*132f818dSEnji Cooper *) 2829*132f818dSEnji Cooper shrext_cmds='.sl' 2830*132f818dSEnji Cooper dynamic_linker="$host_os dld.sl" 2831*132f818dSEnji Cooper shlibpath_var=SHLIB_PATH 2832*132f818dSEnji Cooper shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2833*132f818dSEnji Cooper library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2834*132f818dSEnji Cooper soname_spec='$libname$release$shared_ext$major' 2835*132f818dSEnji Cooper ;; 2836*132f818dSEnji Cooper esac 2837*132f818dSEnji Cooper # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2838*132f818dSEnji Cooper postinstall_cmds='chmod 555 $lib' 2839*132f818dSEnji Cooper # or fails outright, so override atomically: 2840*132f818dSEnji Cooper install_override_mode=555 2841*132f818dSEnji Cooper ;; 2842*132f818dSEnji Cooper 2843*132f818dSEnji Cooperinterix[[3-9]]*) 2844*132f818dSEnji Cooper version_type=linux # correct to gnu/linux during the next big refactor 2845*132f818dSEnji Cooper need_lib_prefix=no 2846*132f818dSEnji Cooper need_version=no 2847*132f818dSEnji Cooper library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2848*132f818dSEnji Cooper soname_spec='$libname$release$shared_ext$major' 2849*132f818dSEnji Cooper dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2850*132f818dSEnji Cooper shlibpath_var=LD_LIBRARY_PATH 2851*132f818dSEnji Cooper shlibpath_overrides_runpath=no 2852*132f818dSEnji Cooper hardcode_into_libs=yes 2853*132f818dSEnji Cooper ;; 2854*132f818dSEnji Cooper 2855*132f818dSEnji Cooperirix5* | irix6* | nonstopux*) 2856*132f818dSEnji Cooper case $host_os in 2857*132f818dSEnji Cooper nonstopux*) version_type=nonstopux ;; 2858*132f818dSEnji Cooper *) 2859*132f818dSEnji Cooper if test yes = "$lt_cv_prog_gnu_ld"; then 2860*132f818dSEnji Cooper version_type=linux # correct to gnu/linux during the next big refactor 2861*132f818dSEnji Cooper else 2862*132f818dSEnji Cooper version_type=irix 2863*132f818dSEnji Cooper fi ;; 2864*132f818dSEnji Cooper esac 2865*132f818dSEnji Cooper need_lib_prefix=no 2866*132f818dSEnji Cooper need_version=no 2867*132f818dSEnji Cooper soname_spec='$libname$release$shared_ext$major' 2868*132f818dSEnji Cooper library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 2869*132f818dSEnji Cooper case $host_os in 2870*132f818dSEnji Cooper irix5* | nonstopux*) 2871*132f818dSEnji Cooper libsuff= shlibsuff= 2872*132f818dSEnji Cooper ;; 2873*132f818dSEnji Cooper *) 2874*132f818dSEnji Cooper case $LD in # libtool.m4 will add one of these switches to LD 2875*132f818dSEnji Cooper *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2876*132f818dSEnji Cooper libsuff= shlibsuff= libmagic=32-bit;; 2877*132f818dSEnji Cooper *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2878*132f818dSEnji Cooper libsuff=32 shlibsuff=N32 libmagic=N32;; 2879*132f818dSEnji Cooper *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2880*132f818dSEnji Cooper libsuff=64 shlibsuff=64 libmagic=64-bit;; 2881*132f818dSEnji Cooper *) libsuff= shlibsuff= libmagic=never-match;; 2882*132f818dSEnji Cooper esac 2883*132f818dSEnji Cooper ;; 2884*132f818dSEnji Cooper esac 2885*132f818dSEnji Cooper shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2886*132f818dSEnji Cooper shlibpath_overrides_runpath=no 2887*132f818dSEnji Cooper sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 2888*132f818dSEnji Cooper sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 2889*132f818dSEnji Cooper hardcode_into_libs=yes 2890*132f818dSEnji Cooper ;; 2891*132f818dSEnji Cooper 2892*132f818dSEnji Cooper# No shared lib support for Linux oldld, aout, or coff. 2893*132f818dSEnji Cooperlinux*oldld* | linux*aout* | linux*coff*) 2894*132f818dSEnji Cooper dynamic_linker=no 2895*132f818dSEnji Cooper ;; 2896*132f818dSEnji Cooper 2897*132f818dSEnji Cooperlinux*android*) 2898*132f818dSEnji Cooper version_type=none # Android doesn't support versioned libraries. 2899*132f818dSEnji Cooper need_lib_prefix=no 2900*132f818dSEnji Cooper need_version=no 2901*132f818dSEnji Cooper library_names_spec='$libname$release$shared_ext $libname$shared_ext' 2902*132f818dSEnji Cooper soname_spec='$libname$release$shared_ext' 2903*132f818dSEnji Cooper finish_cmds= 2904*132f818dSEnji Cooper shlibpath_var=LD_LIBRARY_PATH 2905*132f818dSEnji Cooper shlibpath_overrides_runpath=yes 2906*132f818dSEnji Cooper 2907*132f818dSEnji Cooper # This implies no fast_install, which is unacceptable. 2908*132f818dSEnji Cooper # Some rework will be needed to allow for fast_install 2909*132f818dSEnji Cooper # before this can be enabled. 2910*132f818dSEnji Cooper hardcode_into_libs=yes 2911*132f818dSEnji Cooper 2912*132f818dSEnji Cooper dynamic_linker='Android linker' 2913*132f818dSEnji Cooper # -rpath works at least for libraries that are not overridden by 2914*132f818dSEnji Cooper # libraries installed in system locations. 2915*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 2916*132f818dSEnji Cooper ;; 2917*132f818dSEnji Cooper 2918*132f818dSEnji Cooper# This must be glibc/ELF. 2919*132f818dSEnji Cooperlinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 2920*132f818dSEnji Cooper version_type=linux # correct to gnu/linux during the next big refactor 2921*132f818dSEnji Cooper need_lib_prefix=no 2922*132f818dSEnji Cooper need_version=no 2923*132f818dSEnji Cooper library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2924*132f818dSEnji Cooper soname_spec='$libname$release$shared_ext$major' 2925*132f818dSEnji Cooper finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2926*132f818dSEnji Cooper shlibpath_var=LD_LIBRARY_PATH 2927*132f818dSEnji Cooper shlibpath_overrides_runpath=no 2928*132f818dSEnji Cooper 2929*132f818dSEnji Cooper # Some binutils ld are patched to set DT_RUNPATH 2930*132f818dSEnji Cooper AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2931*132f818dSEnji Cooper [lt_cv_shlibpath_overrides_runpath=no 2932*132f818dSEnji Cooper save_LDFLAGS=$LDFLAGS 2933*132f818dSEnji Cooper save_libdir=$libdir 2934*132f818dSEnji Cooper eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2935*132f818dSEnji Cooper LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2936*132f818dSEnji Cooper AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2937*132f818dSEnji Cooper [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2938*132f818dSEnji Cooper [lt_cv_shlibpath_overrides_runpath=yes])]) 2939*132f818dSEnji Cooper LDFLAGS=$save_LDFLAGS 2940*132f818dSEnji Cooper libdir=$save_libdir 2941*132f818dSEnji Cooper ]) 2942*132f818dSEnji Cooper shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2943*132f818dSEnji Cooper 2944*132f818dSEnji Cooper # This implies no fast_install, which is unacceptable. 2945*132f818dSEnji Cooper # Some rework will be needed to allow for fast_install 2946*132f818dSEnji Cooper # before this can be enabled. 2947*132f818dSEnji Cooper hardcode_into_libs=yes 2948*132f818dSEnji Cooper 2949*132f818dSEnji Cooper # Ideally, we could use ldconfig to report *all* directories which are 2950*132f818dSEnji Cooper # searched for libraries, however this is still not possible. Aside from not 2951*132f818dSEnji Cooper # being certain /sbin/ldconfig is available, command 2952*132f818dSEnji Cooper # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 2953*132f818dSEnji Cooper # even though it is searched at run-time. Try to do the best guess by 2954*132f818dSEnji Cooper # appending ld.so.conf contents (and includes) to the search path. 2955*132f818dSEnji Cooper if test -f /etc/ld.so.conf; then 2956*132f818dSEnji Cooper 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' ' '` 2957*132f818dSEnji Cooper sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 2958*132f818dSEnji Cooper fi 2959*132f818dSEnji Cooper 2960*132f818dSEnji Cooper # We used to test for /lib/ld.so.1 and disable shared libraries on 2961*132f818dSEnji Cooper # powerpc, because MkLinux only supported shared libraries with the 2962*132f818dSEnji Cooper # GNU dynamic linker. Since this was broken with cross compilers, 2963*132f818dSEnji Cooper # most powerpc-linux boxes support dynamic linking these days and 2964*132f818dSEnji Cooper # people can always --disable-shared, the test was removed, and we 2965*132f818dSEnji Cooper # assume the GNU/Linux dynamic linker is in use. 2966*132f818dSEnji Cooper dynamic_linker='GNU/Linux ld.so' 2967*132f818dSEnji Cooper ;; 2968*132f818dSEnji Cooper 2969*132f818dSEnji Coopernetbsdelf*-gnu) 2970*132f818dSEnji Cooper version_type=linux 2971*132f818dSEnji Cooper need_lib_prefix=no 2972*132f818dSEnji Cooper need_version=no 2973*132f818dSEnji Cooper library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2974*132f818dSEnji Cooper soname_spec='$libname$release$shared_ext$major' 2975*132f818dSEnji Cooper shlibpath_var=LD_LIBRARY_PATH 2976*132f818dSEnji Cooper shlibpath_overrides_runpath=no 2977*132f818dSEnji Cooper hardcode_into_libs=yes 2978*132f818dSEnji Cooper dynamic_linker='NetBSD ld.elf_so' 2979*132f818dSEnji Cooper ;; 2980*132f818dSEnji Cooper 2981*132f818dSEnji Coopernetbsd*) 2982*132f818dSEnji Cooper version_type=sunos 2983*132f818dSEnji Cooper need_lib_prefix=no 2984*132f818dSEnji Cooper need_version=no 2985*132f818dSEnji Cooper if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2986*132f818dSEnji Cooper library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2987*132f818dSEnji Cooper finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2988*132f818dSEnji Cooper dynamic_linker='NetBSD (a.out) ld.so' 2989*132f818dSEnji Cooper else 2990*132f818dSEnji Cooper library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2991*132f818dSEnji Cooper soname_spec='$libname$release$shared_ext$major' 2992*132f818dSEnji Cooper dynamic_linker='NetBSD ld.elf_so' 2993*132f818dSEnji Cooper fi 2994*132f818dSEnji Cooper shlibpath_var=LD_LIBRARY_PATH 2995*132f818dSEnji Cooper shlibpath_overrides_runpath=yes 2996*132f818dSEnji Cooper hardcode_into_libs=yes 2997*132f818dSEnji Cooper ;; 2998*132f818dSEnji Cooper 2999*132f818dSEnji Cooper*-mlibc) 3000*132f818dSEnji Cooper version_type=linux # correct to gnu/linux during the next big refactor 3001*132f818dSEnji Cooper need_lib_prefix=no 3002*132f818dSEnji Cooper need_version=no 3003*132f818dSEnji Cooper library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3004*132f818dSEnji Cooper soname_spec='$libname$release$shared_ext$major' 3005*132f818dSEnji Cooper dynamic_linker='mlibc ld.so' 3006*132f818dSEnji Cooper shlibpath_var=LD_LIBRARY_PATH 3007*132f818dSEnji Cooper shlibpath_overrides_runpath=no 3008*132f818dSEnji Cooper hardcode_into_libs=yes 3009*132f818dSEnji Cooper ;; 3010*132f818dSEnji Cooper 3011*132f818dSEnji Coopernewsos6) 3012*132f818dSEnji Cooper version_type=linux # correct to gnu/linux during the next big refactor 3013*132f818dSEnji Cooper library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3014*132f818dSEnji Cooper shlibpath_var=LD_LIBRARY_PATH 3015*132f818dSEnji Cooper shlibpath_overrides_runpath=yes 3016*132f818dSEnji Cooper ;; 3017*132f818dSEnji Cooper 3018*132f818dSEnji Cooper*nto* | *qnx*) 3019*132f818dSEnji Cooper version_type=qnx 3020*132f818dSEnji Cooper need_lib_prefix=no 3021*132f818dSEnji Cooper need_version=no 3022*132f818dSEnji Cooper library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3023*132f818dSEnji Cooper soname_spec='$libname$release$shared_ext$major' 3024*132f818dSEnji Cooper shlibpath_var=LD_LIBRARY_PATH 3025*132f818dSEnji Cooper shlibpath_overrides_runpath=no 3026*132f818dSEnji Cooper hardcode_into_libs=yes 3027*132f818dSEnji Cooper dynamic_linker='ldqnx.so' 3028*132f818dSEnji Cooper ;; 3029*132f818dSEnji Cooper 3030*132f818dSEnji Cooperopenbsd*) 3031*132f818dSEnji Cooper version_type=sunos 3032*132f818dSEnji Cooper sys_lib_dlsearch_path_spec=/usr/lib 3033*132f818dSEnji Cooper need_lib_prefix=no 3034*132f818dSEnji Cooper if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 3035*132f818dSEnji Cooper need_version=no 3036*132f818dSEnji Cooper else 3037*132f818dSEnji Cooper need_version=yes 3038*132f818dSEnji Cooper fi 3039*132f818dSEnji Cooper library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 3040*132f818dSEnji Cooper finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 3041*132f818dSEnji Cooper shlibpath_var=LD_LIBRARY_PATH 3042*132f818dSEnji Cooper shlibpath_overrides_runpath=yes 3043*132f818dSEnji Cooper ;; 3044*132f818dSEnji Cooper 3045*132f818dSEnji Cooperos2*) 3046*132f818dSEnji Cooper libname_spec='$name' 3047*132f818dSEnji Cooper version_type=windows 3048*132f818dSEnji Cooper shrext_cmds=.dll 3049*132f818dSEnji Cooper need_version=no 3050*132f818dSEnji Cooper need_lib_prefix=no 3051*132f818dSEnji Cooper # OS/2 can only load a DLL with a base name of 8 characters or less. 3052*132f818dSEnji Cooper soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 3053*132f818dSEnji Cooper v=$($ECHO $release$versuffix | tr -d .-); 3054*132f818dSEnji Cooper n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 3055*132f818dSEnji Cooper $ECHO $n$v`$shared_ext' 3056*132f818dSEnji Cooper library_names_spec='${libname}_dll.$libext' 3057*132f818dSEnji Cooper dynamic_linker='OS/2 ld.exe' 3058*132f818dSEnji Cooper shlibpath_var=BEGINLIBPATH 3059*132f818dSEnji Cooper sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 3060*132f818dSEnji Cooper sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3061*132f818dSEnji Cooper postinstall_cmds='base_file=`basename \$file`~ 3062*132f818dSEnji Cooper dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 3063*132f818dSEnji Cooper dldir=$destdir/`dirname \$dlpath`~ 3064*132f818dSEnji Cooper test -d \$dldir || mkdir -p \$dldir~ 3065*132f818dSEnji Cooper $install_prog $dir/$dlname \$dldir/$dlname~ 3066*132f818dSEnji Cooper chmod a+x \$dldir/$dlname~ 3067*132f818dSEnji Cooper if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 3068*132f818dSEnji Cooper eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 3069*132f818dSEnji Cooper fi' 3070*132f818dSEnji Cooper postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 3071*132f818dSEnji Cooper dlpath=$dir/\$dldll~ 3072*132f818dSEnji Cooper $RM \$dlpath' 3073*132f818dSEnji Cooper ;; 3074*132f818dSEnji Cooper 3075*132f818dSEnji Cooperosf3* | osf4* | osf5*) 3076*132f818dSEnji Cooper version_type=osf 3077*132f818dSEnji Cooper need_lib_prefix=no 3078*132f818dSEnji Cooper need_version=no 3079*132f818dSEnji Cooper soname_spec='$libname$release$shared_ext$major' 3080*132f818dSEnji Cooper library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3081*132f818dSEnji Cooper shlibpath_var=LD_LIBRARY_PATH 3082*132f818dSEnji Cooper sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 3083*132f818dSEnji Cooper sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3084*132f818dSEnji Cooper ;; 3085*132f818dSEnji Cooper 3086*132f818dSEnji Cooperrdos*) 3087*132f818dSEnji Cooper dynamic_linker=no 3088*132f818dSEnji Cooper ;; 3089*132f818dSEnji Cooper 3090*132f818dSEnji Cooperserenity*) 3091*132f818dSEnji Cooper version_type=linux # correct to gnu/linux during the next big refactor 3092*132f818dSEnji Cooper need_lib_prefix=no 3093*132f818dSEnji Cooper need_version=no 3094*132f818dSEnji Cooper library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3095*132f818dSEnji Cooper soname_spec='$libname$release$shared_ext$major' 3096*132f818dSEnji Cooper shlibpath_var=LD_LIBRARY_PATH 3097*132f818dSEnji Cooper shlibpath_overrides_runpath=no 3098*132f818dSEnji Cooper dynamic_linker='SerenityOS LibELF' 3099*132f818dSEnji Cooper ;; 3100*132f818dSEnji Cooper 3101*132f818dSEnji Coopersolaris*) 3102*132f818dSEnji Cooper version_type=linux # correct to gnu/linux during the next big refactor 3103*132f818dSEnji Cooper need_lib_prefix=no 3104*132f818dSEnji Cooper need_version=no 3105*132f818dSEnji Cooper library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3106*132f818dSEnji Cooper soname_spec='$libname$release$shared_ext$major' 3107*132f818dSEnji Cooper shlibpath_var=LD_LIBRARY_PATH 3108*132f818dSEnji Cooper shlibpath_overrides_runpath=yes 3109*132f818dSEnji Cooper hardcode_into_libs=yes 3110*132f818dSEnji Cooper # ldd complains unless libraries are executable 3111*132f818dSEnji Cooper postinstall_cmds='chmod +x $lib' 3112*132f818dSEnji Cooper ;; 3113*132f818dSEnji Cooper 3114*132f818dSEnji Coopersunos4*) 3115*132f818dSEnji Cooper version_type=sunos 3116*132f818dSEnji Cooper library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 3117*132f818dSEnji Cooper finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 3118*132f818dSEnji Cooper shlibpath_var=LD_LIBRARY_PATH 3119*132f818dSEnji Cooper shlibpath_overrides_runpath=yes 3120*132f818dSEnji Cooper if test yes = "$with_gnu_ld"; then 3121*132f818dSEnji Cooper need_lib_prefix=no 3122*132f818dSEnji Cooper fi 3123*132f818dSEnji Cooper need_version=yes 3124*132f818dSEnji Cooper ;; 3125*132f818dSEnji Cooper 3126*132f818dSEnji Coopersysv4 | sysv4.3*) 3127*132f818dSEnji Cooper version_type=linux # correct to gnu/linux during the next big refactor 3128*132f818dSEnji Cooper library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3129*132f818dSEnji Cooper soname_spec='$libname$release$shared_ext$major' 3130*132f818dSEnji Cooper shlibpath_var=LD_LIBRARY_PATH 3131*132f818dSEnji Cooper case $host_vendor in 3132*132f818dSEnji Cooper sni) 3133*132f818dSEnji Cooper shlibpath_overrides_runpath=no 3134*132f818dSEnji Cooper need_lib_prefix=no 3135*132f818dSEnji Cooper runpath_var=LD_RUN_PATH 3136*132f818dSEnji Cooper ;; 3137*132f818dSEnji Cooper siemens) 3138*132f818dSEnji Cooper need_lib_prefix=no 3139*132f818dSEnji Cooper ;; 3140*132f818dSEnji Cooper motorola) 3141*132f818dSEnji Cooper need_lib_prefix=no 3142*132f818dSEnji Cooper need_version=no 3143*132f818dSEnji Cooper shlibpath_overrides_runpath=no 3144*132f818dSEnji Cooper sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3145*132f818dSEnji Cooper ;; 3146*132f818dSEnji Cooper esac 3147*132f818dSEnji Cooper ;; 3148*132f818dSEnji Cooper 3149*132f818dSEnji Coopersysv4*MP*) 3150*132f818dSEnji Cooper if test -d /usr/nec; then 3151*132f818dSEnji Cooper version_type=linux # correct to gnu/linux during the next big refactor 3152*132f818dSEnji Cooper library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 3153*132f818dSEnji Cooper soname_spec='$libname$shared_ext.$major' 3154*132f818dSEnji Cooper shlibpath_var=LD_LIBRARY_PATH 3155*132f818dSEnji Cooper fi 3156*132f818dSEnji Cooper ;; 3157*132f818dSEnji Cooper 3158*132f818dSEnji Coopersysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3159*132f818dSEnji Cooper version_type=sco 3160*132f818dSEnji Cooper need_lib_prefix=no 3161*132f818dSEnji Cooper need_version=no 3162*132f818dSEnji Cooper library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 3163*132f818dSEnji Cooper soname_spec='$libname$release$shared_ext$major' 3164*132f818dSEnji Cooper shlibpath_var=LD_LIBRARY_PATH 3165*132f818dSEnji Cooper shlibpath_overrides_runpath=yes 3166*132f818dSEnji Cooper hardcode_into_libs=yes 3167*132f818dSEnji Cooper if test yes = "$with_gnu_ld"; then 3168*132f818dSEnji Cooper sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3169*132f818dSEnji Cooper else 3170*132f818dSEnji Cooper sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 3171*132f818dSEnji Cooper case $host_os in 3172*132f818dSEnji Cooper sco3.2v5*) 3173*132f818dSEnji Cooper sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 3174*132f818dSEnji Cooper ;; 3175*132f818dSEnji Cooper esac 3176*132f818dSEnji Cooper fi 3177*132f818dSEnji Cooper sys_lib_dlsearch_path_spec='/usr/lib' 3178*132f818dSEnji Cooper ;; 3179*132f818dSEnji Cooper 3180*132f818dSEnji Coopertpf*) 3181*132f818dSEnji Cooper # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3182*132f818dSEnji Cooper version_type=linux # correct to gnu/linux during the next big refactor 3183*132f818dSEnji Cooper need_lib_prefix=no 3184*132f818dSEnji Cooper need_version=no 3185*132f818dSEnji Cooper library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3186*132f818dSEnji Cooper shlibpath_var=LD_LIBRARY_PATH 3187*132f818dSEnji Cooper shlibpath_overrides_runpath=no 3188*132f818dSEnji Cooper hardcode_into_libs=yes 3189*132f818dSEnji Cooper ;; 3190*132f818dSEnji Cooper 3191*132f818dSEnji Cooperuts4*) 3192*132f818dSEnji Cooper version_type=linux # correct to gnu/linux during the next big refactor 3193*132f818dSEnji Cooper library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3194*132f818dSEnji Cooper soname_spec='$libname$release$shared_ext$major' 3195*132f818dSEnji Cooper shlibpath_var=LD_LIBRARY_PATH 3196*132f818dSEnji Cooper ;; 3197*132f818dSEnji Cooper 3198*132f818dSEnji Cooperemscripten*) 3199*132f818dSEnji Cooper version_type=none 3200*132f818dSEnji Cooper need_lib_prefix=no 3201*132f818dSEnji Cooper need_version=no 3202*132f818dSEnji Cooper library_names_spec='$libname$release$shared_ext' 3203*132f818dSEnji Cooper soname_spec='$libname$release$shared_ext' 3204*132f818dSEnji Cooper finish_cmds= 3205*132f818dSEnji Cooper dynamic_linker="Emscripten linker" 3206*132f818dSEnji Cooper _LT_COMPILER_PIC($1)='-fPIC' 3207*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib' 3208*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib -s EXPORTED_FUNCTIONS=@$output_objdir/$soname.expsym' 3209*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds_need_lc, $1)=no 3210*132f818dSEnji Cooper _LT_TAGVAR(no_undefined_flag, $1)= 3211*132f818dSEnji Cooper ;; 3212*132f818dSEnji Cooper 3213*132f818dSEnji Cooper*) 3214*132f818dSEnji Cooper dynamic_linker=no 3215*132f818dSEnji Cooper ;; 3216*132f818dSEnji Cooperesac 3217*132f818dSEnji CooperAC_MSG_RESULT([$dynamic_linker]) 3218*132f818dSEnji Coopertest no = "$dynamic_linker" && can_build_shared=no 3219*132f818dSEnji Cooper 3220*132f818dSEnji Coopervariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 3221*132f818dSEnji Cooperif test yes = "$GCC"; then 3222*132f818dSEnji Cooper variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 3223*132f818dSEnji Cooperfi 3224*132f818dSEnji Cooper 3225*132f818dSEnji Cooperif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 3226*132f818dSEnji Cooper sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 3227*132f818dSEnji Cooperfi 3228*132f818dSEnji Cooper 3229*132f818dSEnji Cooperif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 3230*132f818dSEnji Cooper sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 3231*132f818dSEnji Cooperfi 3232*132f818dSEnji Cooper 3233*132f818dSEnji Cooper# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 3234*132f818dSEnji Cooperconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 3235*132f818dSEnji Cooper 3236*132f818dSEnji Cooper# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 3237*132f818dSEnji Cooperfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 3238*132f818dSEnji Cooper 3239*132f818dSEnji Cooper# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 3240*132f818dSEnji Cooperconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 3241*132f818dSEnji Cooper 3242*132f818dSEnji Cooper_LT_DECL([], [variables_saved_for_relink], [1], 3243*132f818dSEnji Cooper [Variables whose values should be saved in libtool wrapper scripts and 3244*132f818dSEnji Cooper restored at link time]) 3245*132f818dSEnji Cooper_LT_DECL([], [need_lib_prefix], [0], 3246*132f818dSEnji Cooper [Do we need the "lib" prefix for modules?]) 3247*132f818dSEnji Cooper_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 3248*132f818dSEnji Cooper_LT_DECL([], [version_type], [0], [Library versioning type]) 3249*132f818dSEnji Cooper_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 3250*132f818dSEnji Cooper_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 3251*132f818dSEnji Cooper_LT_DECL([], [shlibpath_overrides_runpath], [0], 3252*132f818dSEnji Cooper [Is shlibpath searched before the hard-coded library search path?]) 3253*132f818dSEnji Cooper_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 3254*132f818dSEnji Cooper_LT_DECL([], [library_names_spec], [1], 3255*132f818dSEnji Cooper [[List of archive names. First name is the real one, the rest are links. 3256*132f818dSEnji Cooper The last name is the one that the linker finds with -lNAME]]) 3257*132f818dSEnji Cooper_LT_DECL([], [soname_spec], [1], 3258*132f818dSEnji Cooper [[The coded name of the library, if different from the real name]]) 3259*132f818dSEnji Cooper_LT_DECL([], [install_override_mode], [1], 3260*132f818dSEnji Cooper [Permission mode override for installation of shared libraries]) 3261*132f818dSEnji Cooper_LT_DECL([], [postinstall_cmds], [2], 3262*132f818dSEnji Cooper [Command to use after installation of a shared archive]) 3263*132f818dSEnji Cooper_LT_DECL([], [postuninstall_cmds], [2], 3264*132f818dSEnji Cooper [Command to use after uninstallation of a shared archive]) 3265*132f818dSEnji Cooper_LT_DECL([], [finish_cmds], [2], 3266*132f818dSEnji Cooper [Commands used to finish a libtool library installation in a directory]) 3267*132f818dSEnji Cooper_LT_DECL([], [finish_eval], [1], 3268*132f818dSEnji Cooper [[As "finish_cmds", except a single script fragment to be evaled but 3269*132f818dSEnji Cooper not shown]]) 3270*132f818dSEnji Cooper_LT_DECL([], [hardcode_into_libs], [0], 3271*132f818dSEnji Cooper [Whether we should hardcode library paths into libraries]) 3272*132f818dSEnji Cooper_LT_DECL([], [sys_lib_search_path_spec], [2], 3273*132f818dSEnji Cooper [Compile-time system search path for libraries]) 3274*132f818dSEnji Cooper_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 3275*132f818dSEnji Cooper [Detected run-time system search path for libraries]) 3276*132f818dSEnji Cooper_LT_DECL([], [configure_time_lt_sys_library_path], [2], 3277*132f818dSEnji Cooper [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 3278*132f818dSEnji Cooper])# _LT_SYS_DYNAMIC_LINKER 3279*132f818dSEnji Cooper 3280*132f818dSEnji Cooper 3281*132f818dSEnji Cooper# _LT_PATH_TOOL_PREFIX(TOOL) 3282*132f818dSEnji Cooper# -------------------------- 3283*132f818dSEnji Cooper# find a file program that can recognize shared library 3284*132f818dSEnji CooperAC_DEFUN([_LT_PATH_TOOL_PREFIX], 3285*132f818dSEnji Cooper[m4_require([_LT_DECL_EGREP])dnl 3286*132f818dSEnji CooperAC_MSG_CHECKING([for $1]) 3287*132f818dSEnji CooperAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 3288*132f818dSEnji Cooper[case $MAGIC_CMD in 3289*132f818dSEnji Cooper[[\\/*] | ?:[\\/]*]) 3290*132f818dSEnji Cooper lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 3291*132f818dSEnji Cooper ;; 3292*132f818dSEnji Cooper*) 3293*132f818dSEnji Cooper lt_save_MAGIC_CMD=$MAGIC_CMD 3294*132f818dSEnji Cooper lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3295*132f818dSEnji Cooperdnl $ac_dummy forces splitting on constant user-supplied paths. 3296*132f818dSEnji Cooperdnl POSIX.2 word splitting is done only on the output of word expansions, 3297*132f818dSEnji Cooperdnl not every word. This closes a longstanding sh security hole. 3298*132f818dSEnji Cooper ac_dummy="m4_if([$2], , $PATH, [$2])" 3299*132f818dSEnji Cooper for ac_dir in $ac_dummy; do 3300*132f818dSEnji Cooper IFS=$lt_save_ifs 3301*132f818dSEnji Cooper test -z "$ac_dir" && ac_dir=. 3302*132f818dSEnji Cooper if test -f "$ac_dir/$1"; then 3303*132f818dSEnji Cooper lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 3304*132f818dSEnji Cooper if test -n "$file_magic_test_file"; then 3305*132f818dSEnji Cooper case $deplibs_check_method in 3306*132f818dSEnji Cooper "file_magic "*) 3307*132f818dSEnji Cooper file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 3308*132f818dSEnji Cooper MAGIC_CMD=$lt_cv_path_MAGIC_CMD 3309*132f818dSEnji Cooper if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 3310*132f818dSEnji Cooper $EGREP "$file_magic_regex" > /dev/null; then 3311*132f818dSEnji Cooper : 3312*132f818dSEnji Cooper else 3313*132f818dSEnji Cooper cat <<_LT_EOF 1>&2 3314*132f818dSEnji Cooper 3315*132f818dSEnji Cooper*** Warning: the command libtool uses to detect shared libraries, 3316*132f818dSEnji Cooper*** $file_magic_cmd, produces output that libtool cannot recognize. 3317*132f818dSEnji Cooper*** The result is that libtool may fail to recognize shared libraries 3318*132f818dSEnji Cooper*** as such. This will affect the creation of libtool libraries that 3319*132f818dSEnji Cooper*** depend on shared libraries, but programs linked with such libtool 3320*132f818dSEnji Cooper*** libraries will work regardless of this problem. Nevertheless, you 3321*132f818dSEnji Cooper*** may want to report the problem to your system manager and/or to 3322*132f818dSEnji Cooper*** bug-libtool@gnu.org 3323*132f818dSEnji Cooper 3324*132f818dSEnji Cooper_LT_EOF 3325*132f818dSEnji Cooper fi ;; 3326*132f818dSEnji Cooper esac 3327*132f818dSEnji Cooper fi 3328*132f818dSEnji Cooper break 3329*132f818dSEnji Cooper fi 3330*132f818dSEnji Cooper done 3331*132f818dSEnji Cooper IFS=$lt_save_ifs 3332*132f818dSEnji Cooper MAGIC_CMD=$lt_save_MAGIC_CMD 3333*132f818dSEnji Cooper ;; 3334*132f818dSEnji Cooperesac]) 3335*132f818dSEnji CooperMAGIC_CMD=$lt_cv_path_MAGIC_CMD 3336*132f818dSEnji Cooperif test -n "$MAGIC_CMD"; then 3337*132f818dSEnji Cooper AC_MSG_RESULT($MAGIC_CMD) 3338*132f818dSEnji Cooperelse 3339*132f818dSEnji Cooper AC_MSG_RESULT(no) 3340*132f818dSEnji Cooperfi 3341*132f818dSEnji Cooper_LT_DECL([], [MAGIC_CMD], [0], 3342*132f818dSEnji Cooper [Used to examine libraries when file_magic_cmd begins with "file"])dnl 3343*132f818dSEnji Cooper])# _LT_PATH_TOOL_PREFIX 3344*132f818dSEnji Cooper 3345*132f818dSEnji Cooper# Old name: 3346*132f818dSEnji CooperAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 3347*132f818dSEnji Cooperdnl aclocal-1.4 backwards compatibility: 3348*132f818dSEnji Cooperdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 3349*132f818dSEnji Cooper 3350*132f818dSEnji Cooper 3351*132f818dSEnji Cooper# _LT_PATH_MAGIC 3352*132f818dSEnji Cooper# -------------- 3353*132f818dSEnji Cooper# find a file program that can recognize a shared library 3354*132f818dSEnji Cooperm4_defun([_LT_PATH_MAGIC], 3355*132f818dSEnji Cooper[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3356*132f818dSEnji Cooperif test -z "$lt_cv_path_MAGIC_CMD"; then 3357*132f818dSEnji Cooper if test -n "$ac_tool_prefix"; then 3358*132f818dSEnji Cooper _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 3359*132f818dSEnji Cooper else 3360*132f818dSEnji Cooper MAGIC_CMD=: 3361*132f818dSEnji Cooper fi 3362*132f818dSEnji Cooperfi 3363*132f818dSEnji Cooper])# _LT_PATH_MAGIC 3364*132f818dSEnji Cooper 3365*132f818dSEnji Cooper 3366*132f818dSEnji Cooper# LT_PATH_LD 3367*132f818dSEnji Cooper# ---------- 3368*132f818dSEnji Cooper# find the pathname to the GNU or non-GNU linker 3369*132f818dSEnji CooperAC_DEFUN([LT_PATH_LD], 3370*132f818dSEnji Cooper[AC_REQUIRE([AC_PROG_CC])dnl 3371*132f818dSEnji CooperAC_REQUIRE([AC_CANONICAL_HOST])dnl 3372*132f818dSEnji CooperAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3373*132f818dSEnji Cooperm4_require([_LT_DECL_SED])dnl 3374*132f818dSEnji Cooperm4_require([_LT_DECL_EGREP])dnl 3375*132f818dSEnji Cooperm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 3376*132f818dSEnji Cooper 3377*132f818dSEnji CooperAC_ARG_WITH([gnu-ld], 3378*132f818dSEnji Cooper [AS_HELP_STRING([--with-gnu-ld], 3379*132f818dSEnji Cooper [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3380*132f818dSEnji Cooper [test no = "$withval" || with_gnu_ld=yes], 3381*132f818dSEnji Cooper [with_gnu_ld=no])dnl 3382*132f818dSEnji Cooper 3383*132f818dSEnji Cooperac_prog=ld 3384*132f818dSEnji Cooperif test yes = "$GCC"; then 3385*132f818dSEnji Cooper # Check if gcc -print-prog-name=ld gives a path. 3386*132f818dSEnji Cooper AC_MSG_CHECKING([for ld used by $CC]) 3387*132f818dSEnji Cooper case $host in 3388*132f818dSEnji Cooper *-*-mingw* | *-*-windows*) 3389*132f818dSEnji Cooper # gcc leaves a trailing carriage return, which upsets mingw 3390*132f818dSEnji Cooper ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3391*132f818dSEnji Cooper *) 3392*132f818dSEnji Cooper ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3393*132f818dSEnji Cooper esac 3394*132f818dSEnji Cooper case $ac_prog in 3395*132f818dSEnji Cooper # Accept absolute paths. 3396*132f818dSEnji Cooper [[\\/]]* | ?:[[\\/]]*) 3397*132f818dSEnji Cooper re_direlt='/[[^/]][[^/]]*/\.\./' 3398*132f818dSEnji Cooper # Canonicalize the pathname of ld 3399*132f818dSEnji Cooper ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3400*132f818dSEnji Cooper while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3401*132f818dSEnji Cooper ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3402*132f818dSEnji Cooper done 3403*132f818dSEnji Cooper test -z "$LD" && LD=$ac_prog 3404*132f818dSEnji Cooper ;; 3405*132f818dSEnji Cooper "") 3406*132f818dSEnji Cooper # If it fails, then pretend we aren't using GCC. 3407*132f818dSEnji Cooper ac_prog=ld 3408*132f818dSEnji Cooper ;; 3409*132f818dSEnji Cooper *) 3410*132f818dSEnji Cooper # If it is relative, then search for the first ld in PATH. 3411*132f818dSEnji Cooper with_gnu_ld=unknown 3412*132f818dSEnji Cooper ;; 3413*132f818dSEnji Cooper esac 3414*132f818dSEnji Cooperelif test yes = "$with_gnu_ld"; then 3415*132f818dSEnji Cooper AC_MSG_CHECKING([for GNU ld]) 3416*132f818dSEnji Cooperelse 3417*132f818dSEnji Cooper AC_MSG_CHECKING([for non-GNU ld]) 3418*132f818dSEnji Cooperfi 3419*132f818dSEnji CooperAC_CACHE_VAL(lt_cv_path_LD, 3420*132f818dSEnji Cooper[if test -z "$LD"; then 3421*132f818dSEnji Cooper lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3422*132f818dSEnji Cooper for ac_dir in $PATH; do 3423*132f818dSEnji Cooper IFS=$lt_save_ifs 3424*132f818dSEnji Cooper test -z "$ac_dir" && ac_dir=. 3425*132f818dSEnji Cooper if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3426*132f818dSEnji Cooper lt_cv_path_LD=$ac_dir/$ac_prog 3427*132f818dSEnji Cooper # Check to see if the program is GNU ld. I'd rather use --version, 3428*132f818dSEnji Cooper # but apparently some variants of GNU ld only accept -v. 3429*132f818dSEnji Cooper # Break only if it was the GNU/non-GNU ld that we prefer. 3430*132f818dSEnji Cooper case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3431*132f818dSEnji Cooper *GNU* | *'with BFD'*) 3432*132f818dSEnji Cooper test no != "$with_gnu_ld" && break 3433*132f818dSEnji Cooper ;; 3434*132f818dSEnji Cooper *) 3435*132f818dSEnji Cooper test yes != "$with_gnu_ld" && break 3436*132f818dSEnji Cooper ;; 3437*132f818dSEnji Cooper esac 3438*132f818dSEnji Cooper fi 3439*132f818dSEnji Cooper done 3440*132f818dSEnji Cooper IFS=$lt_save_ifs 3441*132f818dSEnji Cooperelse 3442*132f818dSEnji Cooper lt_cv_path_LD=$LD # Let the user override the test with a path. 3443*132f818dSEnji Cooperfi]) 3444*132f818dSEnji CooperLD=$lt_cv_path_LD 3445*132f818dSEnji Cooperif test -n "$LD"; then 3446*132f818dSEnji Cooper AC_MSG_RESULT($LD) 3447*132f818dSEnji Cooperelse 3448*132f818dSEnji Cooper AC_MSG_RESULT(no) 3449*132f818dSEnji Cooperfi 3450*132f818dSEnji Coopertest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3451*132f818dSEnji Cooper_LT_PATH_LD_GNU 3452*132f818dSEnji CooperAC_SUBST([LD]) 3453*132f818dSEnji Cooper 3454*132f818dSEnji Cooper_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3455*132f818dSEnji Cooper])# LT_PATH_LD 3456*132f818dSEnji Cooper 3457*132f818dSEnji Cooper# Old names: 3458*132f818dSEnji CooperAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3459*132f818dSEnji CooperAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3460*132f818dSEnji Cooperdnl aclocal-1.4 backwards compatibility: 3461*132f818dSEnji Cooperdnl AC_DEFUN([AM_PROG_LD], []) 3462*132f818dSEnji Cooperdnl AC_DEFUN([AC_PROG_LD], []) 3463*132f818dSEnji Cooper 3464*132f818dSEnji Cooper 3465*132f818dSEnji Cooper# _LT_PATH_LD_GNU 3466*132f818dSEnji Cooper#- -------------- 3467*132f818dSEnji Cooperm4_defun([_LT_PATH_LD_GNU], 3468*132f818dSEnji Cooper[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3469*132f818dSEnji Cooper[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3470*132f818dSEnji Coopercase `$LD -v 2>&1 </dev/null` in 3471*132f818dSEnji Cooper*GNU* | *'with BFD'*) 3472*132f818dSEnji Cooper lt_cv_prog_gnu_ld=yes 3473*132f818dSEnji Cooper ;; 3474*132f818dSEnji Cooper*) 3475*132f818dSEnji Cooper lt_cv_prog_gnu_ld=no 3476*132f818dSEnji Cooper ;; 3477*132f818dSEnji Cooperesac]) 3478*132f818dSEnji Cooperwith_gnu_ld=$lt_cv_prog_gnu_ld 3479*132f818dSEnji Cooper])# _LT_PATH_LD_GNU 3480*132f818dSEnji Cooper 3481*132f818dSEnji Cooper 3482*132f818dSEnji Cooper# _LT_CMD_RELOAD 3483*132f818dSEnji Cooper# -------------- 3484*132f818dSEnji Cooper# find reload flag for linker 3485*132f818dSEnji Cooper# -- PORTME Some linkers may need a different reload flag. 3486*132f818dSEnji Cooperm4_defun([_LT_CMD_RELOAD], 3487*132f818dSEnji Cooper[AC_CACHE_CHECK([for $LD option to reload object files], 3488*132f818dSEnji Cooper lt_cv_ld_reload_flag, 3489*132f818dSEnji Cooper [lt_cv_ld_reload_flag='-r']) 3490*132f818dSEnji Cooperreload_flag=$lt_cv_ld_reload_flag 3491*132f818dSEnji Coopercase $reload_flag in 3492*132f818dSEnji Cooper"" | " "*) ;; 3493*132f818dSEnji Cooper*) reload_flag=" $reload_flag" ;; 3494*132f818dSEnji Cooperesac 3495*132f818dSEnji Cooperreload_cmds='$LD$reload_flag -o $output$reload_objs' 3496*132f818dSEnji Coopercase $host_os in 3497*132f818dSEnji Cooper cygwin* | mingw* | windows* | pw32* | cegcc*) 3498*132f818dSEnji Cooper if test yes != "$GCC"; then 3499*132f818dSEnji Cooper reload_cmds=false 3500*132f818dSEnji Cooper fi 3501*132f818dSEnji Cooper ;; 3502*132f818dSEnji Cooper darwin*) 3503*132f818dSEnji Cooper if test yes = "$GCC"; then 3504*132f818dSEnji Cooper reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 3505*132f818dSEnji Cooper else 3506*132f818dSEnji Cooper reload_cmds='$LD$reload_flag -o $output$reload_objs' 3507*132f818dSEnji Cooper fi 3508*132f818dSEnji Cooper ;; 3509*132f818dSEnji Cooperesac 3510*132f818dSEnji Cooper_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3511*132f818dSEnji Cooper_LT_TAGDECL([], [reload_cmds], [2])dnl 3512*132f818dSEnji Cooper])# _LT_CMD_RELOAD 3513*132f818dSEnji Cooper 3514*132f818dSEnji Cooper 3515*132f818dSEnji Cooper# _LT_PATH_DD 3516*132f818dSEnji Cooper# ----------- 3517*132f818dSEnji Cooper# find a working dd 3518*132f818dSEnji Cooperm4_defun([_LT_PATH_DD], 3519*132f818dSEnji Cooper[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 3520*132f818dSEnji Cooper[printf 0123456789abcdef0123456789abcdef >conftest.i 3521*132f818dSEnji Coopercat conftest.i conftest.i >conftest2.i 3522*132f818dSEnji Cooper: ${lt_DD:=$DD} 3523*132f818dSEnji CooperAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 3524*132f818dSEnji Cooper[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3525*132f818dSEnji Cooper cmp -s conftest.i conftest.out \ 3526*132f818dSEnji Cooper && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 3527*132f818dSEnji Cooperfi]) 3528*132f818dSEnji Cooperrm -f conftest.i conftest2.i conftest.out]) 3529*132f818dSEnji Cooper])# _LT_PATH_DD 3530*132f818dSEnji Cooper 3531*132f818dSEnji Cooper 3532*132f818dSEnji Cooper# _LT_CMD_TRUNCATE 3533*132f818dSEnji Cooper# ---------------- 3534*132f818dSEnji Cooper# find command to truncate a binary pipe 3535*132f818dSEnji Cooperm4_defun([_LT_CMD_TRUNCATE], 3536*132f818dSEnji Cooper[m4_require([_LT_PATH_DD]) 3537*132f818dSEnji CooperAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 3538*132f818dSEnji Cooper[printf 0123456789abcdef0123456789abcdef >conftest.i 3539*132f818dSEnji Coopercat conftest.i conftest.i >conftest2.i 3540*132f818dSEnji Cooperlt_cv_truncate_bin= 3541*132f818dSEnji Cooperif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3542*132f818dSEnji Cooper cmp -s conftest.i conftest.out \ 3543*132f818dSEnji Cooper && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 3544*132f818dSEnji Cooperfi 3545*132f818dSEnji Cooperrm -f conftest.i conftest2.i conftest.out 3546*132f818dSEnji Coopertest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 3547*132f818dSEnji Cooper_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 3548*132f818dSEnji Cooper [Command to truncate a binary pipe]) 3549*132f818dSEnji Cooper])# _LT_CMD_TRUNCATE 3550*132f818dSEnji Cooper 3551*132f818dSEnji Cooper 3552*132f818dSEnji Cooper# _LT_CHECK_MAGIC_METHOD 3553*132f818dSEnji Cooper# ---------------------- 3554*132f818dSEnji Cooper# how to check for library dependencies 3555*132f818dSEnji Cooper# -- PORTME fill in with the dynamic library characteristics 3556*132f818dSEnji Cooperm4_defun([_LT_CHECK_MAGIC_METHOD], 3557*132f818dSEnji Cooper[m4_require([_LT_DECL_EGREP]) 3558*132f818dSEnji Cooperm4_require([_LT_DECL_OBJDUMP]) 3559*132f818dSEnji CooperAC_CACHE_CHECK([how to recognize dependent libraries], 3560*132f818dSEnji Cooperlt_cv_deplibs_check_method, 3561*132f818dSEnji Cooper[lt_cv_file_magic_cmd='$MAGIC_CMD' 3562*132f818dSEnji Cooperlt_cv_file_magic_test_file= 3563*132f818dSEnji Cooperlt_cv_deplibs_check_method='unknown' 3564*132f818dSEnji Cooper# Need to set the preceding variable on all platforms that support 3565*132f818dSEnji Cooper# interlibrary dependencies. 3566*132f818dSEnji Cooper# 'none' -- dependencies not supported. 3567*132f818dSEnji Cooper# 'unknown' -- same as none, but documents that we really don't know. 3568*132f818dSEnji Cooper# 'pass_all' -- all dependencies passed with no checks. 3569*132f818dSEnji Cooper# 'file_magic [[regex]]' -- check by looking for files in library path 3570*132f818dSEnji Cooper# that responds to the $file_magic_cmd with a given extended regex. 3571*132f818dSEnji Cooper# If you have 'file' or equivalent on your system and you're not sure 3572*132f818dSEnji Cooper# whether 'pass_all' will *always* work, you probably want this one. 3573*132f818dSEnji Cooper 3574*132f818dSEnji Coopercase $host_os in 3575*132f818dSEnji Cooperaix[[4-9]]*) 3576*132f818dSEnji Cooper lt_cv_deplibs_check_method=pass_all 3577*132f818dSEnji Cooper ;; 3578*132f818dSEnji Cooper 3579*132f818dSEnji Cooperbeos*) 3580*132f818dSEnji Cooper lt_cv_deplibs_check_method=pass_all 3581*132f818dSEnji Cooper ;; 3582*132f818dSEnji Cooper 3583*132f818dSEnji Cooperbsdi[[45]]*) 3584*132f818dSEnji Cooper lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3585*132f818dSEnji Cooper lt_cv_file_magic_cmd='$FILECMD -L' 3586*132f818dSEnji Cooper lt_cv_file_magic_test_file=/shlib/libc.so 3587*132f818dSEnji Cooper ;; 3588*132f818dSEnji Cooper 3589*132f818dSEnji Coopercygwin*) 3590*132f818dSEnji Cooper # func_win32_libid is a shell function defined in ltmain.sh 3591*132f818dSEnji Cooper lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3592*132f818dSEnji Cooper lt_cv_file_magic_cmd='func_win32_libid' 3593*132f818dSEnji Cooper ;; 3594*132f818dSEnji Cooper 3595*132f818dSEnji Coopermingw* | windows* | pw32*) 3596*132f818dSEnji Cooper # Base MSYS/MinGW do not provide the 'file' command needed by 3597*132f818dSEnji Cooper # func_win32_libid shell function, so use a weaker test based on 'objdump', 3598*132f818dSEnji Cooper # unless we find 'file', for example because we are cross-compiling. 3599*132f818dSEnji Cooper if ( file / ) >/dev/null 2>&1; then 3600*132f818dSEnji Cooper lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3601*132f818dSEnji Cooper lt_cv_file_magic_cmd='func_win32_libid' 3602*132f818dSEnji Cooper else 3603*132f818dSEnji Cooper # Keep this pattern in sync with the one in func_win32_libid. 3604*132f818dSEnji Cooper lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|pe-aarch64)' 3605*132f818dSEnji Cooper lt_cv_file_magic_cmd='$OBJDUMP -f' 3606*132f818dSEnji Cooper fi 3607*132f818dSEnji Cooper ;; 3608*132f818dSEnji Cooper 3609*132f818dSEnji Coopercegcc*) 3610*132f818dSEnji Cooper # use the weaker test based on 'objdump'. See mingw*. 3611*132f818dSEnji Cooper lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3612*132f818dSEnji Cooper lt_cv_file_magic_cmd='$OBJDUMP -f' 3613*132f818dSEnji Cooper ;; 3614*132f818dSEnji Cooper 3615*132f818dSEnji Cooperdarwin* | rhapsody*) 3616*132f818dSEnji Cooper lt_cv_deplibs_check_method=pass_all 3617*132f818dSEnji Cooper ;; 3618*132f818dSEnji Cooper 3619*132f818dSEnji Cooperfreebsd* | dragonfly* | midnightbsd*) 3620*132f818dSEnji Cooper if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3621*132f818dSEnji Cooper case $host_cpu in 3622*132f818dSEnji Cooper i*86 ) 3623*132f818dSEnji Cooper # Not sure whether the presence of OpenBSD here was a mistake. 3624*132f818dSEnji Cooper # Let's accept both of them until this is cleared up. 3625*132f818dSEnji Cooper lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3626*132f818dSEnji Cooper lt_cv_file_magic_cmd=$FILECMD 3627*132f818dSEnji Cooper lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3628*132f818dSEnji Cooper ;; 3629*132f818dSEnji Cooper esac 3630*132f818dSEnji Cooper else 3631*132f818dSEnji Cooper lt_cv_deplibs_check_method=pass_all 3632*132f818dSEnji Cooper fi 3633*132f818dSEnji Cooper ;; 3634*132f818dSEnji Cooper 3635*132f818dSEnji Cooperhaiku*) 3636*132f818dSEnji Cooper lt_cv_deplibs_check_method=pass_all 3637*132f818dSEnji Cooper ;; 3638*132f818dSEnji Cooper 3639*132f818dSEnji Cooperhpux10.20* | hpux11*) 3640*132f818dSEnji Cooper lt_cv_file_magic_cmd=$FILECMD 3641*132f818dSEnji Cooper case $host_cpu in 3642*132f818dSEnji Cooper ia64*) 3643*132f818dSEnji Cooper lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3644*132f818dSEnji Cooper lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3645*132f818dSEnji Cooper ;; 3646*132f818dSEnji Cooper hppa*64*) 3647*132f818dSEnji Cooper [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]'] 3648*132f818dSEnji Cooper lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3649*132f818dSEnji Cooper ;; 3650*132f818dSEnji Cooper *) 3651*132f818dSEnji Cooper lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3652*132f818dSEnji Cooper lt_cv_file_magic_test_file=/usr/lib/libc.sl 3653*132f818dSEnji Cooper ;; 3654*132f818dSEnji Cooper esac 3655*132f818dSEnji Cooper ;; 3656*132f818dSEnji Cooper 3657*132f818dSEnji Cooperinterix[[3-9]]*) 3658*132f818dSEnji Cooper # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3659*132f818dSEnji Cooper lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3660*132f818dSEnji Cooper ;; 3661*132f818dSEnji Cooper 3662*132f818dSEnji Cooperirix5* | irix6* | nonstopux*) 3663*132f818dSEnji Cooper case $LD in 3664*132f818dSEnji Cooper *-32|*"-32 ") libmagic=32-bit;; 3665*132f818dSEnji Cooper *-n32|*"-n32 ") libmagic=N32;; 3666*132f818dSEnji Cooper *-64|*"-64 ") libmagic=64-bit;; 3667*132f818dSEnji Cooper *) libmagic=never-match;; 3668*132f818dSEnji Cooper esac 3669*132f818dSEnji Cooper lt_cv_deplibs_check_method=pass_all 3670*132f818dSEnji Cooper ;; 3671*132f818dSEnji Cooper 3672*132f818dSEnji Cooper# This must be glibc/ELF. 3673*132f818dSEnji Cooperlinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 3674*132f818dSEnji Cooper lt_cv_deplibs_check_method=pass_all 3675*132f818dSEnji Cooper ;; 3676*132f818dSEnji Cooper 3677*132f818dSEnji Cooper*-mlibc) 3678*132f818dSEnji Cooper lt_cv_deplibs_check_method=pass_all 3679*132f818dSEnji Cooper ;; 3680*132f818dSEnji Cooper 3681*132f818dSEnji Coopernetbsd* | netbsdelf*-gnu) 3682*132f818dSEnji Cooper if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3683*132f818dSEnji Cooper lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3684*132f818dSEnji Cooper else 3685*132f818dSEnji Cooper lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3686*132f818dSEnji Cooper fi 3687*132f818dSEnji Cooper ;; 3688*132f818dSEnji Cooper 3689*132f818dSEnji Coopernewos6*) 3690*132f818dSEnji Cooper lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3691*132f818dSEnji Cooper lt_cv_file_magic_cmd=$FILECMD 3692*132f818dSEnji Cooper lt_cv_file_magic_test_file=/usr/lib/libnls.so 3693*132f818dSEnji Cooper ;; 3694*132f818dSEnji Cooper 3695*132f818dSEnji Cooper*nto* | *qnx*) 3696*132f818dSEnji Cooper lt_cv_deplibs_check_method=pass_all 3697*132f818dSEnji Cooper ;; 3698*132f818dSEnji Cooper 3699*132f818dSEnji Cooperopenbsd*) 3700*132f818dSEnji Cooper if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 3701*132f818dSEnji Cooper lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3702*132f818dSEnji Cooper else 3703*132f818dSEnji Cooper lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3704*132f818dSEnji Cooper fi 3705*132f818dSEnji Cooper ;; 3706*132f818dSEnji Cooper 3707*132f818dSEnji Cooperosf3* | osf4* | osf5*) 3708*132f818dSEnji Cooper lt_cv_deplibs_check_method=pass_all 3709*132f818dSEnji Cooper ;; 3710*132f818dSEnji Cooper 3711*132f818dSEnji Cooperrdos*) 3712*132f818dSEnji Cooper lt_cv_deplibs_check_method=pass_all 3713*132f818dSEnji Cooper ;; 3714*132f818dSEnji Cooper 3715*132f818dSEnji Cooperserenity*) 3716*132f818dSEnji Cooper lt_cv_deplibs_check_method=pass_all 3717*132f818dSEnji Cooper ;; 3718*132f818dSEnji Cooper 3719*132f818dSEnji Coopersolaris*) 3720*132f818dSEnji Cooper lt_cv_deplibs_check_method=pass_all 3721*132f818dSEnji Cooper ;; 3722*132f818dSEnji Cooper 3723*132f818dSEnji Coopersysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3724*132f818dSEnji Cooper lt_cv_deplibs_check_method=pass_all 3725*132f818dSEnji Cooper ;; 3726*132f818dSEnji Cooper 3727*132f818dSEnji Coopersysv4 | sysv4.3*) 3728*132f818dSEnji Cooper case $host_vendor in 3729*132f818dSEnji Cooper motorola) 3730*132f818dSEnji Cooper 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]]' 3731*132f818dSEnji Cooper lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3732*132f818dSEnji Cooper ;; 3733*132f818dSEnji Cooper ncr) 3734*132f818dSEnji Cooper lt_cv_deplibs_check_method=pass_all 3735*132f818dSEnji Cooper ;; 3736*132f818dSEnji Cooper sequent) 3737*132f818dSEnji Cooper lt_cv_file_magic_cmd='/bin/file' 3738*132f818dSEnji Cooper lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3739*132f818dSEnji Cooper ;; 3740*132f818dSEnji Cooper sni) 3741*132f818dSEnji Cooper lt_cv_file_magic_cmd='/bin/file' 3742*132f818dSEnji Cooper lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3743*132f818dSEnji Cooper lt_cv_file_magic_test_file=/lib/libc.so 3744*132f818dSEnji Cooper ;; 3745*132f818dSEnji Cooper siemens) 3746*132f818dSEnji Cooper lt_cv_deplibs_check_method=pass_all 3747*132f818dSEnji Cooper ;; 3748*132f818dSEnji Cooper pc) 3749*132f818dSEnji Cooper lt_cv_deplibs_check_method=pass_all 3750*132f818dSEnji Cooper ;; 3751*132f818dSEnji Cooper esac 3752*132f818dSEnji Cooper ;; 3753*132f818dSEnji Cooper 3754*132f818dSEnji Coopertpf*) 3755*132f818dSEnji Cooper lt_cv_deplibs_check_method=pass_all 3756*132f818dSEnji Cooper ;; 3757*132f818dSEnji Cooperos2*) 3758*132f818dSEnji Cooper lt_cv_deplibs_check_method=pass_all 3759*132f818dSEnji Cooper ;; 3760*132f818dSEnji Cooperesac 3761*132f818dSEnji Cooper]) 3762*132f818dSEnji Cooper 3763*132f818dSEnji Cooperfile_magic_glob= 3764*132f818dSEnji Cooperwant_nocaseglob=no 3765*132f818dSEnji Cooperif test "$build" = "$host"; then 3766*132f818dSEnji Cooper case $host_os in 3767*132f818dSEnji Cooper mingw* | windows* | pw32*) 3768*132f818dSEnji Cooper if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3769*132f818dSEnji Cooper want_nocaseglob=yes 3770*132f818dSEnji Cooper else 3771*132f818dSEnji Cooper file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3772*132f818dSEnji Cooper fi 3773*132f818dSEnji Cooper ;; 3774*132f818dSEnji Cooper esac 3775*132f818dSEnji Cooperfi 3776*132f818dSEnji Cooper 3777*132f818dSEnji Cooperfile_magic_cmd=$lt_cv_file_magic_cmd 3778*132f818dSEnji Cooperdeplibs_check_method=$lt_cv_deplibs_check_method 3779*132f818dSEnji Coopertest -z "$deplibs_check_method" && deplibs_check_method=unknown 3780*132f818dSEnji Cooper 3781*132f818dSEnji Cooper_LT_DECL([], [deplibs_check_method], [1], 3782*132f818dSEnji Cooper [Method to check whether dependent libraries are shared objects]) 3783*132f818dSEnji Cooper_LT_DECL([], [file_magic_cmd], [1], 3784*132f818dSEnji Cooper [Command to use when deplibs_check_method = "file_magic"]) 3785*132f818dSEnji Cooper_LT_DECL([], [file_magic_glob], [1], 3786*132f818dSEnji Cooper [How to find potential files when deplibs_check_method = "file_magic"]) 3787*132f818dSEnji Cooper_LT_DECL([], [want_nocaseglob], [1], 3788*132f818dSEnji Cooper [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3789*132f818dSEnji Cooper])# _LT_CHECK_MAGIC_METHOD 3790*132f818dSEnji Cooper 3791*132f818dSEnji Cooper 3792*132f818dSEnji Cooper# LT_PATH_NM 3793*132f818dSEnji Cooper# ---------- 3794*132f818dSEnji Cooper# find the pathname to a BSD- or MS-compatible name lister 3795*132f818dSEnji CooperAC_DEFUN([LT_PATH_NM], 3796*132f818dSEnji Cooper[AC_REQUIRE([AC_PROG_CC])dnl 3797*132f818dSEnji CooperAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3798*132f818dSEnji Cooper[if test -n "$NM"; then 3799*132f818dSEnji Cooper # Let the user override the test. 3800*132f818dSEnji Cooper lt_cv_path_NM=$NM 3801*132f818dSEnji Cooperelse 3802*132f818dSEnji Cooper lt_nm_to_check=${ac_tool_prefix}nm 3803*132f818dSEnji Cooper if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3804*132f818dSEnji Cooper lt_nm_to_check="$lt_nm_to_check nm" 3805*132f818dSEnji Cooper fi 3806*132f818dSEnji Cooper for lt_tmp_nm in $lt_nm_to_check; do 3807*132f818dSEnji Cooper lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3808*132f818dSEnji Cooper for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3809*132f818dSEnji Cooper IFS=$lt_save_ifs 3810*132f818dSEnji Cooper test -z "$ac_dir" && ac_dir=. 3811*132f818dSEnji Cooper tmp_nm=$ac_dir/$lt_tmp_nm 3812*132f818dSEnji Cooper if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 3813*132f818dSEnji Cooper # Check to see if the nm accepts a BSD-compat flag. 3814*132f818dSEnji Cooper # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 3815*132f818dSEnji Cooper # nm: unknown option "B" ignored 3816*132f818dSEnji Cooper # Tru64's nm complains that /dev/null is an invalid object file 3817*132f818dSEnji Cooper # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 3818*132f818dSEnji Cooper case $build_os in 3819*132f818dSEnji Cooper mingw* | windows*) lt_bad_file=conftest.nm/nofile ;; 3820*132f818dSEnji Cooper *) lt_bad_file=/dev/null ;; 3821*132f818dSEnji Cooper esac 3822*132f818dSEnji Cooper case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in 3823*132f818dSEnji Cooper *$lt_bad_file* | *'Invalid file or object type'*) 3824*132f818dSEnji Cooper lt_cv_path_NM="$tmp_nm -B" 3825*132f818dSEnji Cooper break 2 3826*132f818dSEnji Cooper ;; 3827*132f818dSEnji Cooper *) 3828*132f818dSEnji Cooper case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in 3829*132f818dSEnji Cooper */dev/null*) 3830*132f818dSEnji Cooper lt_cv_path_NM="$tmp_nm -p" 3831*132f818dSEnji Cooper break 2 3832*132f818dSEnji Cooper ;; 3833*132f818dSEnji Cooper *) 3834*132f818dSEnji Cooper lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3835*132f818dSEnji Cooper continue # so that we can try to find one that supports BSD flags 3836*132f818dSEnji Cooper ;; 3837*132f818dSEnji Cooper esac 3838*132f818dSEnji Cooper ;; 3839*132f818dSEnji Cooper esac 3840*132f818dSEnji Cooper fi 3841*132f818dSEnji Cooper done 3842*132f818dSEnji Cooper IFS=$lt_save_ifs 3843*132f818dSEnji Cooper done 3844*132f818dSEnji Cooper : ${lt_cv_path_NM=no} 3845*132f818dSEnji Cooperfi]) 3846*132f818dSEnji Cooperif test no != "$lt_cv_path_NM"; then 3847*132f818dSEnji Cooper NM=$lt_cv_path_NM 3848*132f818dSEnji Cooperelse 3849*132f818dSEnji Cooper # Didn't find any BSD compatible name lister, look for dumpbin. 3850*132f818dSEnji Cooper if test -n "$DUMPBIN"; then : 3851*132f818dSEnji Cooper # Let the user override the test. 3852*132f818dSEnji Cooper else 3853*132f818dSEnji Cooper AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3854*132f818dSEnji Cooper case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in 3855*132f818dSEnji Cooper *COFF*) 3856*132f818dSEnji Cooper DUMPBIN="$DUMPBIN -symbols -headers" 3857*132f818dSEnji Cooper ;; 3858*132f818dSEnji Cooper *) 3859*132f818dSEnji Cooper DUMPBIN=: 3860*132f818dSEnji Cooper ;; 3861*132f818dSEnji Cooper esac 3862*132f818dSEnji Cooper fi 3863*132f818dSEnji Cooper AC_SUBST([DUMPBIN]) 3864*132f818dSEnji Cooper if test : != "$DUMPBIN"; then 3865*132f818dSEnji Cooper NM=$DUMPBIN 3866*132f818dSEnji Cooper fi 3867*132f818dSEnji Cooperfi 3868*132f818dSEnji Coopertest -z "$NM" && NM=nm 3869*132f818dSEnji CooperAC_SUBST([NM]) 3870*132f818dSEnji Cooper_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3871*132f818dSEnji Cooper 3872*132f818dSEnji CooperAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3873*132f818dSEnji Cooper [lt_cv_nm_interface="BSD nm" 3874*132f818dSEnji Cooper echo "int some_variable = 0;" > conftest.$ac_ext 3875*132f818dSEnji Cooper (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3876*132f818dSEnji Cooper (eval "$ac_compile" 2>conftest.err) 3877*132f818dSEnji Cooper cat conftest.err >&AS_MESSAGE_LOG_FD 3878*132f818dSEnji Cooper (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3879*132f818dSEnji Cooper (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3880*132f818dSEnji Cooper cat conftest.err >&AS_MESSAGE_LOG_FD 3881*132f818dSEnji Cooper (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3882*132f818dSEnji Cooper cat conftest.out >&AS_MESSAGE_LOG_FD 3883*132f818dSEnji Cooper if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3884*132f818dSEnji Cooper lt_cv_nm_interface="MS dumpbin" 3885*132f818dSEnji Cooper fi 3886*132f818dSEnji Cooper rm -f conftest*]) 3887*132f818dSEnji Cooper])# LT_PATH_NM 3888*132f818dSEnji Cooper 3889*132f818dSEnji Cooper# Old names: 3890*132f818dSEnji CooperAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3891*132f818dSEnji CooperAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3892*132f818dSEnji Cooperdnl aclocal-1.4 backwards compatibility: 3893*132f818dSEnji Cooperdnl AC_DEFUN([AM_PROG_NM], []) 3894*132f818dSEnji Cooperdnl AC_DEFUN([AC_PROG_NM], []) 3895*132f818dSEnji Cooper 3896*132f818dSEnji Cooper# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3897*132f818dSEnji Cooper# -------------------------------- 3898*132f818dSEnji Cooper# how to determine the name of the shared library 3899*132f818dSEnji Cooper# associated with a specific link library. 3900*132f818dSEnji Cooper# -- PORTME fill in with the dynamic library characteristics 3901*132f818dSEnji Cooperm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3902*132f818dSEnji Cooper[m4_require([_LT_DECL_EGREP]) 3903*132f818dSEnji Cooperm4_require([_LT_DECL_OBJDUMP]) 3904*132f818dSEnji Cooperm4_require([_LT_DECL_DLLTOOL]) 3905*132f818dSEnji CooperAC_CACHE_CHECK([how to associate runtime and link libraries], 3906*132f818dSEnji Cooperlt_cv_sharedlib_from_linklib_cmd, 3907*132f818dSEnji Cooper[lt_cv_sharedlib_from_linklib_cmd='unknown' 3908*132f818dSEnji Cooper 3909*132f818dSEnji Coopercase $host_os in 3910*132f818dSEnji Coopercygwin* | mingw* | windows* | pw32* | cegcc*) 3911*132f818dSEnji Cooper # two different shell functions defined in ltmain.sh; 3912*132f818dSEnji Cooper # decide which one to use based on capabilities of $DLLTOOL 3913*132f818dSEnji Cooper case `$DLLTOOL --help 2>&1` in 3914*132f818dSEnji Cooper *--identify-strict*) 3915*132f818dSEnji Cooper lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3916*132f818dSEnji Cooper ;; 3917*132f818dSEnji Cooper *) 3918*132f818dSEnji Cooper lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3919*132f818dSEnji Cooper ;; 3920*132f818dSEnji Cooper esac 3921*132f818dSEnji Cooper ;; 3922*132f818dSEnji Cooper*) 3923*132f818dSEnji Cooper # fallback: assume linklib IS sharedlib 3924*132f818dSEnji Cooper lt_cv_sharedlib_from_linklib_cmd=$ECHO 3925*132f818dSEnji Cooper ;; 3926*132f818dSEnji Cooperesac 3927*132f818dSEnji Cooper]) 3928*132f818dSEnji Coopersharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3929*132f818dSEnji Coopertest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3930*132f818dSEnji Cooper 3931*132f818dSEnji Cooper_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3932*132f818dSEnji Cooper [Command to associate shared and link libraries]) 3933*132f818dSEnji Cooper])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3934*132f818dSEnji Cooper 3935*132f818dSEnji Cooper 3936*132f818dSEnji Cooper# _LT_PATH_MANIFEST_TOOL 3937*132f818dSEnji Cooper# ---------------------- 3938*132f818dSEnji Cooper# locate the manifest tool 3939*132f818dSEnji Cooperm4_defun([_LT_PATH_MANIFEST_TOOL], 3940*132f818dSEnji Cooper[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3941*132f818dSEnji Coopertest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3942*132f818dSEnji CooperAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_manifest_tool], 3943*132f818dSEnji Cooper [lt_cv_path_manifest_tool=no 3944*132f818dSEnji Cooper echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3945*132f818dSEnji Cooper $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3946*132f818dSEnji Cooper cat conftest.err >&AS_MESSAGE_LOG_FD 3947*132f818dSEnji Cooper if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3948*132f818dSEnji Cooper lt_cv_path_manifest_tool=yes 3949*132f818dSEnji Cooper fi 3950*132f818dSEnji Cooper rm -f conftest*]) 3951*132f818dSEnji Cooperif test yes != "$lt_cv_path_manifest_tool"; then 3952*132f818dSEnji Cooper MANIFEST_TOOL=: 3953*132f818dSEnji Cooperfi 3954*132f818dSEnji Cooper_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3955*132f818dSEnji Cooper])# _LT_PATH_MANIFEST_TOOL 3956*132f818dSEnji Cooper 3957*132f818dSEnji Cooper 3958*132f818dSEnji Cooper# _LT_DLL_DEF_P([FILE]) 3959*132f818dSEnji Cooper# --------------------- 3960*132f818dSEnji Cooper# True iff FILE is a Windows DLL '.def' file. 3961*132f818dSEnji Cooper# Keep in sync with func_dll_def_p in the libtool script 3962*132f818dSEnji CooperAC_DEFUN([_LT_DLL_DEF_P], 3963*132f818dSEnji Cooper[dnl 3964*132f818dSEnji Cooper test DEF = "`$SED -n dnl 3965*132f818dSEnji Cooper -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 3966*132f818dSEnji Cooper -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 3967*132f818dSEnji Cooper -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 3968*132f818dSEnji Cooper -e q dnl Only consider the first "real" line 3969*132f818dSEnji Cooper $1`" dnl 3970*132f818dSEnji Cooper])# _LT_DLL_DEF_P 3971*132f818dSEnji Cooper 3972*132f818dSEnji Cooper 3973*132f818dSEnji Cooper# LT_LIB_M 3974*132f818dSEnji Cooper# -------- 3975*132f818dSEnji Cooper# check for math library 3976*132f818dSEnji CooperAC_DEFUN([LT_LIB_M], 3977*132f818dSEnji Cooper[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3978*132f818dSEnji CooperLIBM= 3979*132f818dSEnji Coopercase $host in 3980*132f818dSEnji Cooper*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-mingw* | *-*-pw32* | *-*-darwin*) 3981*132f818dSEnji Cooper # These system don't have libm, or don't need it 3982*132f818dSEnji Cooper ;; 3983*132f818dSEnji Cooper*-ncr-sysv4.3*) 3984*132f818dSEnji Cooper AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 3985*132f818dSEnji Cooper AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3986*132f818dSEnji Cooper ;; 3987*132f818dSEnji Cooper*) 3988*132f818dSEnji Cooper AC_CHECK_LIB(m, cos, LIBM=-lm) 3989*132f818dSEnji Cooper ;; 3990*132f818dSEnji Cooperesac 3991*132f818dSEnji CooperAC_SUBST([LIBM]) 3992*132f818dSEnji Cooper])# LT_LIB_M 3993*132f818dSEnji Cooper 3994*132f818dSEnji Cooper# Old name: 3995*132f818dSEnji CooperAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3996*132f818dSEnji Cooperdnl aclocal-1.4 backwards compatibility: 3997*132f818dSEnji Cooperdnl AC_DEFUN([AC_CHECK_LIBM], []) 3998*132f818dSEnji Cooper 3999*132f818dSEnji Cooper 4000*132f818dSEnji Cooper# _LT_COMPILER_NO_RTTI([TAGNAME]) 4001*132f818dSEnji Cooper# ------------------------------- 4002*132f818dSEnji Cooperm4_defun([_LT_COMPILER_NO_RTTI], 4003*132f818dSEnji Cooper[m4_require([_LT_TAG_COMPILER])dnl 4004*132f818dSEnji Cooper 4005*132f818dSEnji Cooper_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4006*132f818dSEnji Cooper 4007*132f818dSEnji Cooperif test yes = "$GCC"; then 4008*132f818dSEnji Cooper case $cc_basename in 4009*132f818dSEnji Cooper nvcc*) 4010*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 4011*132f818dSEnji Cooper *) 4012*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 4013*132f818dSEnji Cooper esac 4014*132f818dSEnji Cooper 4015*132f818dSEnji Cooper _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 4016*132f818dSEnji Cooper lt_cv_prog_compiler_rtti_exceptions, 4017*132f818dSEnji Cooper [-fno-rtti -fno-exceptions], [], 4018*132f818dSEnji Cooper [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 4019*132f818dSEnji Cooperfi 4020*132f818dSEnji Cooper_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 4021*132f818dSEnji Cooper [Compiler flag to turn off builtin functions]) 4022*132f818dSEnji Cooper])# _LT_COMPILER_NO_RTTI 4023*132f818dSEnji Cooper 4024*132f818dSEnji Cooper 4025*132f818dSEnji Cooper# _LT_CMD_GLOBAL_SYMBOLS 4026*132f818dSEnji Cooper# ---------------------- 4027*132f818dSEnji Cooperm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 4028*132f818dSEnji Cooper[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4029*132f818dSEnji CooperAC_REQUIRE([AC_PROG_CC])dnl 4030*132f818dSEnji CooperAC_REQUIRE([AC_PROG_AWK])dnl 4031*132f818dSEnji CooperAC_REQUIRE([LT_PATH_NM])dnl 4032*132f818dSEnji CooperAC_REQUIRE([LT_PATH_LD])dnl 4033*132f818dSEnji Cooperm4_require([_LT_DECL_SED])dnl 4034*132f818dSEnji Cooperm4_require([_LT_DECL_EGREP])dnl 4035*132f818dSEnji Cooperm4_require([_LT_TAG_COMPILER])dnl 4036*132f818dSEnji Cooper 4037*132f818dSEnji Cooper# Check for command to grab the raw symbol name followed by C symbol from nm. 4038*132f818dSEnji CooperAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 4039*132f818dSEnji CooperAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 4040*132f818dSEnji Cooper[ 4041*132f818dSEnji Cooper# These are sane defaults that work on at least a few old systems. 4042*132f818dSEnji Cooper# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4043*132f818dSEnji Cooper 4044*132f818dSEnji Cooper# Character class describing NM global symbol codes. 4045*132f818dSEnji Coopersymcode='[[BCDEGRST]]' 4046*132f818dSEnji Cooper 4047*132f818dSEnji Cooper# Regexp to match symbols that can be accessed directly from C. 4048*132f818dSEnji Coopersympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4049*132f818dSEnji Cooper 4050*132f818dSEnji Cooper# Define system-specific variables. 4051*132f818dSEnji Coopercase $host_os in 4052*132f818dSEnji Cooperaix*) 4053*132f818dSEnji Cooper symcode='[[BCDT]]' 4054*132f818dSEnji Cooper ;; 4055*132f818dSEnji Coopercygwin* | mingw* | windows* | pw32* | cegcc*) 4056*132f818dSEnji Cooper symcode='[[ABCDGISTW]]' 4057*132f818dSEnji Cooper ;; 4058*132f818dSEnji Cooperhpux*) 4059*132f818dSEnji Cooper if test ia64 = "$host_cpu"; then 4060*132f818dSEnji Cooper symcode='[[ABCDEGRST]]' 4061*132f818dSEnji Cooper fi 4062*132f818dSEnji Cooper ;; 4063*132f818dSEnji Cooperirix* | nonstopux*) 4064*132f818dSEnji Cooper symcode='[[BCDEGRST]]' 4065*132f818dSEnji Cooper ;; 4066*132f818dSEnji Cooperosf*) 4067*132f818dSEnji Cooper symcode='[[BCDEGQRST]]' 4068*132f818dSEnji Cooper ;; 4069*132f818dSEnji Coopersolaris*) 4070*132f818dSEnji Cooper symcode='[[BCDRT]]' 4071*132f818dSEnji Cooper ;; 4072*132f818dSEnji Coopersco3.2v5*) 4073*132f818dSEnji Cooper symcode='[[DT]]' 4074*132f818dSEnji Cooper ;; 4075*132f818dSEnji Coopersysv4.2uw2*) 4076*132f818dSEnji Cooper symcode='[[DT]]' 4077*132f818dSEnji Cooper ;; 4078*132f818dSEnji Coopersysv5* | sco5v6* | unixware* | OpenUNIX*) 4079*132f818dSEnji Cooper symcode='[[ABDT]]' 4080*132f818dSEnji Cooper ;; 4081*132f818dSEnji Coopersysv4) 4082*132f818dSEnji Cooper symcode='[[DFNSTU]]' 4083*132f818dSEnji Cooper ;; 4084*132f818dSEnji Cooperesac 4085*132f818dSEnji Cooper 4086*132f818dSEnji Cooper# If we're using GNU nm, then use its standard symbol codes. 4087*132f818dSEnji Coopercase `$NM -V 2>&1` in 4088*132f818dSEnji Cooper*GNU* | *'with BFD'*) 4089*132f818dSEnji Cooper symcode='[[ABCDGIRSTW]]' ;; 4090*132f818dSEnji Cooperesac 4091*132f818dSEnji Cooper 4092*132f818dSEnji Cooperif test "$lt_cv_nm_interface" = "MS dumpbin"; then 4093*132f818dSEnji Cooper # Gets list of data symbols to import. 4094*132f818dSEnji Cooper lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" 4095*132f818dSEnji Cooper # Adjust the below global symbol transforms to fixup imported variables. 4096*132f818dSEnji Cooper lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 4097*132f818dSEnji Cooper lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 4098*132f818dSEnji Cooper lt_c_name_lib_hook="\ 4099*132f818dSEnji Cooper -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 4100*132f818dSEnji Cooper -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 4101*132f818dSEnji Cooperelse 4102*132f818dSEnji Cooper # Disable hooks by default. 4103*132f818dSEnji Cooper lt_cv_sys_global_symbol_to_import= 4104*132f818dSEnji Cooper lt_cdecl_hook= 4105*132f818dSEnji Cooper lt_c_name_hook= 4106*132f818dSEnji Cooper lt_c_name_lib_hook= 4107*132f818dSEnji Cooperfi 4108*132f818dSEnji Cooper 4109*132f818dSEnji Cooper# Transform an extracted symbol line into a proper C declaration. 4110*132f818dSEnji Cooper# Some systems (esp. on ia64) link data and code symbols differently, 4111*132f818dSEnji Cooper# so use this general approach. 4112*132f818dSEnji Cooperlt_cv_sys_global_symbol_to_cdecl="$SED -n"\ 4113*132f818dSEnji Cooper$lt_cdecl_hook\ 4114*132f818dSEnji Cooper" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 4115*132f818dSEnji Cooper" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 4116*132f818dSEnji Cooper 4117*132f818dSEnji Cooper# Transform an extracted symbol line into symbol name and symbol address 4118*132f818dSEnji Cooperlt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ 4119*132f818dSEnji Cooper$lt_c_name_hook\ 4120*132f818dSEnji Cooper" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4121*132f818dSEnji Cooper" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 4122*132f818dSEnji Cooper 4123*132f818dSEnji Cooper# Transform an extracted symbol line into symbol name with lib prefix and 4124*132f818dSEnji Cooper# symbol address. 4125*132f818dSEnji Cooperlt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ 4126*132f818dSEnji Cooper$lt_c_name_lib_hook\ 4127*132f818dSEnji Cooper" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4128*132f818dSEnji Cooper" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 4129*132f818dSEnji Cooper" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 4130*132f818dSEnji Cooper 4131*132f818dSEnji Cooper# Handle CRLF in mingw tool chain 4132*132f818dSEnji Cooperopt_cr= 4133*132f818dSEnji Coopercase $build_os in 4134*132f818dSEnji Coopermingw* | windows*) 4135*132f818dSEnji Cooper opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4136*132f818dSEnji Cooper ;; 4137*132f818dSEnji Cooperesac 4138*132f818dSEnji Cooper 4139*132f818dSEnji Cooper# Try without a prefix underscore, then with it. 4140*132f818dSEnji Cooperfor ac_symprfx in "" "_"; do 4141*132f818dSEnji Cooper 4142*132f818dSEnji Cooper # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4143*132f818dSEnji Cooper symxfrm="\\1 $ac_symprfx\\2 \\2" 4144*132f818dSEnji Cooper 4145*132f818dSEnji Cooper # Write the raw and C identifiers. 4146*132f818dSEnji Cooper if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4147*132f818dSEnji Cooper # Fake it for dumpbin and say T for any non-static function, 4148*132f818dSEnji Cooper # D for any global variable and I for any imported variable. 4149*132f818dSEnji Cooper # Also find C++ and __fastcall symbols from MSVC++ or ICC, 4150*132f818dSEnji Cooper # which start with @ or ?. 4151*132f818dSEnji Cooper lt_cv_sys_global_symbol_pipe="$AWK ['"\ 4152*132f818dSEnji Cooper" {last_section=section; section=\$ 3};"\ 4153*132f818dSEnji Cooper" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 4154*132f818dSEnji Cooper" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 4155*132f818dSEnji Cooper" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 4156*132f818dSEnji Cooper" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 4157*132f818dSEnji Cooper" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 4158*132f818dSEnji Cooper" \$ 0!~/External *\|/{next};"\ 4159*132f818dSEnji Cooper" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 4160*132f818dSEnji Cooper" {if(hide[section]) next};"\ 4161*132f818dSEnji Cooper" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 4162*132f818dSEnji Cooper" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 4163*132f818dSEnji Cooper" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 4164*132f818dSEnji Cooper" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 4165*132f818dSEnji Cooper" ' prfx=^$ac_symprfx]" 4166*132f818dSEnji Cooper else 4167*132f818dSEnji Cooper lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4168*132f818dSEnji Cooper fi 4169*132f818dSEnji Cooper lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" 4170*132f818dSEnji Cooper 4171*132f818dSEnji Cooper # Check to see that the pipe works correctly. 4172*132f818dSEnji Cooper pipe_works=no 4173*132f818dSEnji Cooper 4174*132f818dSEnji Cooper rm -f conftest* 4175*132f818dSEnji Cooper cat > conftest.$ac_ext <<_LT_EOF 4176*132f818dSEnji Cooper#ifdef __cplusplus 4177*132f818dSEnji Cooperextern "C" { 4178*132f818dSEnji Cooper#endif 4179*132f818dSEnji Cooperchar nm_test_var; 4180*132f818dSEnji Coopervoid nm_test_func(void); 4181*132f818dSEnji Coopervoid nm_test_func(void){} 4182*132f818dSEnji Cooper#ifdef __cplusplus 4183*132f818dSEnji Cooper} 4184*132f818dSEnji Cooper#endif 4185*132f818dSEnji Cooperint main(void){nm_test_var='a';nm_test_func();return(0);} 4186*132f818dSEnji Cooper_LT_EOF 4187*132f818dSEnji Cooper 4188*132f818dSEnji Cooper if AC_TRY_EVAL(ac_compile); then 4189*132f818dSEnji Cooper # Now try to grab the symbols. 4190*132f818dSEnji Cooper nlist=conftest.nm 4191*132f818dSEnji Cooper $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD 4192*132f818dSEnji Cooper if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then 4193*132f818dSEnji Cooper # Try sorting and uniquifying the output. 4194*132f818dSEnji Cooper if sort "$nlist" | uniq > "$nlist"T; then 4195*132f818dSEnji Cooper mv -f "$nlist"T "$nlist" 4196*132f818dSEnji Cooper else 4197*132f818dSEnji Cooper rm -f "$nlist"T 4198*132f818dSEnji Cooper fi 4199*132f818dSEnji Cooper 4200*132f818dSEnji Cooper # Make sure that we snagged all the symbols we need. 4201*132f818dSEnji Cooper if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 4202*132f818dSEnji Cooper if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 4203*132f818dSEnji Cooper cat <<_LT_EOF > conftest.$ac_ext 4204*132f818dSEnji Cooper/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4205*132f818dSEnji Cooper#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 4206*132f818dSEnji Cooper/* DATA imports from DLLs on WIN32 can't be const, because runtime 4207*132f818dSEnji Cooper relocations are performed -- see ld's documentation on pseudo-relocs. */ 4208*132f818dSEnji Cooper# define LT@&t@_DLSYM_CONST 4209*132f818dSEnji Cooper#elif defined __osf__ 4210*132f818dSEnji Cooper/* This system does not cope well with relocations in const data. */ 4211*132f818dSEnji Cooper# define LT@&t@_DLSYM_CONST 4212*132f818dSEnji Cooper#else 4213*132f818dSEnji Cooper# define LT@&t@_DLSYM_CONST const 4214*132f818dSEnji Cooper#endif 4215*132f818dSEnji Cooper 4216*132f818dSEnji Cooper#ifdef __cplusplus 4217*132f818dSEnji Cooperextern "C" { 4218*132f818dSEnji Cooper#endif 4219*132f818dSEnji Cooper 4220*132f818dSEnji Cooper_LT_EOF 4221*132f818dSEnji Cooper # Now generate the symbol file. 4222*132f818dSEnji Cooper eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4223*132f818dSEnji Cooper 4224*132f818dSEnji Cooper cat <<_LT_EOF >> conftest.$ac_ext 4225*132f818dSEnji Cooper 4226*132f818dSEnji Cooper/* The mapping between symbol names and symbols. */ 4227*132f818dSEnji CooperLT@&t@_DLSYM_CONST struct { 4228*132f818dSEnji Cooper const char *name; 4229*132f818dSEnji Cooper void *address; 4230*132f818dSEnji Cooper} 4231*132f818dSEnji Cooperlt__PROGRAM__LTX_preloaded_symbols[[]] = 4232*132f818dSEnji Cooper{ 4233*132f818dSEnji Cooper { "@PROGRAM@", (void *) 0 }, 4234*132f818dSEnji Cooper_LT_EOF 4235*132f818dSEnji Cooper $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 4236*132f818dSEnji Cooper cat <<\_LT_EOF >> conftest.$ac_ext 4237*132f818dSEnji Cooper {0, (void *) 0} 4238*132f818dSEnji Cooper}; 4239*132f818dSEnji Cooper 4240*132f818dSEnji Cooper/* This works around a problem in FreeBSD linker */ 4241*132f818dSEnji Cooper#ifdef FREEBSD_WORKAROUND 4242*132f818dSEnji Cooperstatic const void *lt_preloaded_setup() { 4243*132f818dSEnji Cooper return lt__PROGRAM__LTX_preloaded_symbols; 4244*132f818dSEnji Cooper} 4245*132f818dSEnji Cooper#endif 4246*132f818dSEnji Cooper 4247*132f818dSEnji Cooper#ifdef __cplusplus 4248*132f818dSEnji Cooper} 4249*132f818dSEnji Cooper#endif 4250*132f818dSEnji Cooper_LT_EOF 4251*132f818dSEnji Cooper # Now try linking the two files. 4252*132f818dSEnji Cooper mv conftest.$ac_objext conftstm.$ac_objext 4253*132f818dSEnji Cooper lt_globsym_save_LIBS=$LIBS 4254*132f818dSEnji Cooper lt_globsym_save_CFLAGS=$CFLAGS 4255*132f818dSEnji Cooper LIBS=conftstm.$ac_objext 4256*132f818dSEnji Cooper CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4257*132f818dSEnji Cooper if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 4258*132f818dSEnji Cooper pipe_works=yes 4259*132f818dSEnji Cooper fi 4260*132f818dSEnji Cooper LIBS=$lt_globsym_save_LIBS 4261*132f818dSEnji Cooper CFLAGS=$lt_globsym_save_CFLAGS 4262*132f818dSEnji Cooper else 4263*132f818dSEnji Cooper echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4264*132f818dSEnji Cooper fi 4265*132f818dSEnji Cooper else 4266*132f818dSEnji Cooper echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4267*132f818dSEnji Cooper fi 4268*132f818dSEnji Cooper else 4269*132f818dSEnji Cooper echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4270*132f818dSEnji Cooper fi 4271*132f818dSEnji Cooper else 4272*132f818dSEnji Cooper echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4273*132f818dSEnji Cooper cat conftest.$ac_ext >&5 4274*132f818dSEnji Cooper fi 4275*132f818dSEnji Cooper rm -rf conftest* conftst* 4276*132f818dSEnji Cooper 4277*132f818dSEnji Cooper # Do not use the global_symbol_pipe unless it works. 4278*132f818dSEnji Cooper if test yes = "$pipe_works"; then 4279*132f818dSEnji Cooper break 4280*132f818dSEnji Cooper else 4281*132f818dSEnji Cooper lt_cv_sys_global_symbol_pipe= 4282*132f818dSEnji Cooper fi 4283*132f818dSEnji Cooperdone 4284*132f818dSEnji Cooper]) 4285*132f818dSEnji Cooperif test -z "$lt_cv_sys_global_symbol_pipe"; then 4286*132f818dSEnji Cooper lt_cv_sys_global_symbol_to_cdecl= 4287*132f818dSEnji Cooperfi 4288*132f818dSEnji Cooperif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4289*132f818dSEnji Cooper AC_MSG_RESULT(failed) 4290*132f818dSEnji Cooperelse 4291*132f818dSEnji Cooper AC_MSG_RESULT(ok) 4292*132f818dSEnji Cooperfi 4293*132f818dSEnji Cooper 4294*132f818dSEnji Cooper# Response file support. 4295*132f818dSEnji Cooperif test "$lt_cv_nm_interface" = "MS dumpbin"; then 4296*132f818dSEnji Cooper nm_file_list_spec='@' 4297*132f818dSEnji Cooperelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 4298*132f818dSEnji Cooper nm_file_list_spec='@' 4299*132f818dSEnji Cooperfi 4300*132f818dSEnji Cooper 4301*132f818dSEnji Cooper_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 4302*132f818dSEnji Cooper [Take the output of nm and produce a listing of raw symbols and C names]) 4303*132f818dSEnji Cooper_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 4304*132f818dSEnji Cooper [Transform the output of nm in a proper C declaration]) 4305*132f818dSEnji Cooper_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 4306*132f818dSEnji Cooper [Transform the output of nm into a list of symbols to manually relocate]) 4307*132f818dSEnji Cooper_LT_DECL([global_symbol_to_c_name_address], 4308*132f818dSEnji Cooper [lt_cv_sys_global_symbol_to_c_name_address], [1], 4309*132f818dSEnji Cooper [Transform the output of nm in a C name address pair]) 4310*132f818dSEnji Cooper_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 4311*132f818dSEnji Cooper [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 4312*132f818dSEnji Cooper [Transform the output of nm in a C name address pair when lib prefix is needed]) 4313*132f818dSEnji Cooper_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 4314*132f818dSEnji Cooper [The name lister interface]) 4315*132f818dSEnji Cooper_LT_DECL([], [nm_file_list_spec], [1], 4316*132f818dSEnji Cooper [Specify filename containing input files for $NM]) 4317*132f818dSEnji Cooper]) # _LT_CMD_GLOBAL_SYMBOLS 4318*132f818dSEnji Cooper 4319*132f818dSEnji Cooper 4320*132f818dSEnji Cooper# _LT_COMPILER_PIC([TAGNAME]) 4321*132f818dSEnji Cooper# --------------------------- 4322*132f818dSEnji Cooperm4_defun([_LT_COMPILER_PIC], 4323*132f818dSEnji Cooper[m4_require([_LT_TAG_COMPILER])dnl 4324*132f818dSEnji Cooper_LT_TAGVAR(lt_prog_compiler_wl, $1)= 4325*132f818dSEnji Cooper_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4326*132f818dSEnji Cooper_LT_TAGVAR(lt_prog_compiler_static, $1)= 4327*132f818dSEnji Cooper 4328*132f818dSEnji Cooperm4_if([$1], [CXX], [ 4329*132f818dSEnji Cooper # C++ specific cases for pic, static, wl, etc. 4330*132f818dSEnji Cooper if test yes = "$GXX"; then 4331*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4332*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4333*132f818dSEnji Cooper 4334*132f818dSEnji Cooper case $host_os in 4335*132f818dSEnji Cooper aix*) 4336*132f818dSEnji Cooper # All AIX code is PIC. 4337*132f818dSEnji Cooper if test ia64 = "$host_cpu"; then 4338*132f818dSEnji Cooper # AIX 5 now supports IA64 processor 4339*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4340*132f818dSEnji Cooper fi 4341*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4342*132f818dSEnji Cooper ;; 4343*132f818dSEnji Cooper 4344*132f818dSEnji Cooper amigaos*) 4345*132f818dSEnji Cooper case $host_cpu in 4346*132f818dSEnji Cooper powerpc) 4347*132f818dSEnji Cooper # see comment about AmigaOS4 .so support 4348*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4349*132f818dSEnji Cooper ;; 4350*132f818dSEnji Cooper m68k) 4351*132f818dSEnji Cooper # FIXME: we need at least 68020 code to build shared libraries, but 4352*132f818dSEnji Cooper # adding the '-m68020' flag to GCC prevents building anything better, 4353*132f818dSEnji Cooper # like '-m68040'. 4354*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4355*132f818dSEnji Cooper ;; 4356*132f818dSEnji Cooper esac 4357*132f818dSEnji Cooper ;; 4358*132f818dSEnji Cooper 4359*132f818dSEnji Cooper beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4360*132f818dSEnji Cooper # PIC is the default for these OSes. 4361*132f818dSEnji Cooper ;; 4362*132f818dSEnji Cooper mingw* | windows* | cygwin* | os2* | pw32* | cegcc*) 4363*132f818dSEnji Cooper # This hack is so that the source file can tell whether it is being 4364*132f818dSEnji Cooper # built for inclusion in a dll (and should export symbols for example). 4365*132f818dSEnji Cooper # Although the cygwin gcc ignores -fPIC, still need this for old-style 4366*132f818dSEnji Cooper # (--disable-auto-import) libraries 4367*132f818dSEnji Cooper m4_if([$1], [GCJ], [], 4368*132f818dSEnji Cooper [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4369*132f818dSEnji Cooper case $host_os in 4370*132f818dSEnji Cooper os2*) 4371*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4372*132f818dSEnji Cooper ;; 4373*132f818dSEnji Cooper esac 4374*132f818dSEnji Cooper ;; 4375*132f818dSEnji Cooper darwin* | rhapsody*) 4376*132f818dSEnji Cooper # PIC is the default on this platform 4377*132f818dSEnji Cooper # Common symbols not allowed in MH_DYLIB files 4378*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4379*132f818dSEnji Cooper ;; 4380*132f818dSEnji Cooper *djgpp*) 4381*132f818dSEnji Cooper # DJGPP does not support shared libraries at all 4382*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4383*132f818dSEnji Cooper ;; 4384*132f818dSEnji Cooper haiku*) 4385*132f818dSEnji Cooper # PIC is the default for Haiku. 4386*132f818dSEnji Cooper # The "-static" flag exists, but is broken. 4387*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)= 4388*132f818dSEnji Cooper ;; 4389*132f818dSEnji Cooper interix[[3-9]]*) 4390*132f818dSEnji Cooper # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4391*132f818dSEnji Cooper # Instead, we relocate shared libraries at runtime. 4392*132f818dSEnji Cooper ;; 4393*132f818dSEnji Cooper sysv4*MP*) 4394*132f818dSEnji Cooper if test -d /usr/nec; then 4395*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4396*132f818dSEnji Cooper fi 4397*132f818dSEnji Cooper ;; 4398*132f818dSEnji Cooper hpux*) 4399*132f818dSEnji Cooper # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4400*132f818dSEnji Cooper # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4401*132f818dSEnji Cooper # sets the default TLS model and affects inlining. 4402*132f818dSEnji Cooper case $host_cpu in 4403*132f818dSEnji Cooper hppa*64*) 4404*132f818dSEnji Cooper ;; 4405*132f818dSEnji Cooper *) 4406*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4407*132f818dSEnji Cooper ;; 4408*132f818dSEnji Cooper esac 4409*132f818dSEnji Cooper ;; 4410*132f818dSEnji Cooper *qnx* | *nto*) 4411*132f818dSEnji Cooper # QNX uses GNU C++, but need to define -shared option too, otherwise 4412*132f818dSEnji Cooper # it will coredump. 4413*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4414*132f818dSEnji Cooper ;; 4415*132f818dSEnji Cooper *) 4416*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4417*132f818dSEnji Cooper ;; 4418*132f818dSEnji Cooper esac 4419*132f818dSEnji Cooper else 4420*132f818dSEnji Cooper case $host_os in 4421*132f818dSEnji Cooper aix[[4-9]]*) 4422*132f818dSEnji Cooper # All AIX code is PIC. 4423*132f818dSEnji Cooper if test ia64 = "$host_cpu"; then 4424*132f818dSEnji Cooper # AIX 5 now supports IA64 processor 4425*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4426*132f818dSEnji Cooper else 4427*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4428*132f818dSEnji Cooper fi 4429*132f818dSEnji Cooper ;; 4430*132f818dSEnji Cooper chorus*) 4431*132f818dSEnji Cooper case $cc_basename in 4432*132f818dSEnji Cooper cxch68*) 4433*132f818dSEnji Cooper # Green Hills C++ Compiler 4434*132f818dSEnji Cooper # _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" 4435*132f818dSEnji Cooper ;; 4436*132f818dSEnji Cooper esac 4437*132f818dSEnji Cooper ;; 4438*132f818dSEnji Cooper mingw* | windows* | cygwin* | os2* | pw32* | cegcc*) 4439*132f818dSEnji Cooper # This hack is so that the source file can tell whether it is being 4440*132f818dSEnji Cooper # built for inclusion in a dll (and should export symbols for example). 4441*132f818dSEnji Cooper m4_if([$1], [GCJ], [], 4442*132f818dSEnji Cooper [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4443*132f818dSEnji Cooper ;; 4444*132f818dSEnji Cooper dgux*) 4445*132f818dSEnji Cooper case $cc_basename in 4446*132f818dSEnji Cooper ec++*) 4447*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4448*132f818dSEnji Cooper ;; 4449*132f818dSEnji Cooper ghcx*) 4450*132f818dSEnji Cooper # Green Hills C++ Compiler 4451*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4452*132f818dSEnji Cooper ;; 4453*132f818dSEnji Cooper *) 4454*132f818dSEnji Cooper ;; 4455*132f818dSEnji Cooper esac 4456*132f818dSEnji Cooper ;; 4457*132f818dSEnji Cooper freebsd* | dragonfly* | midnightbsd*) 4458*132f818dSEnji Cooper # FreeBSD uses GNU C++ 4459*132f818dSEnji Cooper ;; 4460*132f818dSEnji Cooper hpux9* | hpux10* | hpux11*) 4461*132f818dSEnji Cooper case $cc_basename in 4462*132f818dSEnji Cooper CC*) 4463*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4464*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4465*132f818dSEnji Cooper if test ia64 != "$host_cpu"; then 4466*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4467*132f818dSEnji Cooper fi 4468*132f818dSEnji Cooper ;; 4469*132f818dSEnji Cooper aCC*) 4470*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4471*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4472*132f818dSEnji Cooper case $host_cpu in 4473*132f818dSEnji Cooper hppa*64*|ia64*) 4474*132f818dSEnji Cooper # +Z the default 4475*132f818dSEnji Cooper ;; 4476*132f818dSEnji Cooper *) 4477*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4478*132f818dSEnji Cooper ;; 4479*132f818dSEnji Cooper esac 4480*132f818dSEnji Cooper ;; 4481*132f818dSEnji Cooper *) 4482*132f818dSEnji Cooper ;; 4483*132f818dSEnji Cooper esac 4484*132f818dSEnji Cooper ;; 4485*132f818dSEnji Cooper interix*) 4486*132f818dSEnji Cooper # This is c89, which is MS Visual C++ (no shared libs) 4487*132f818dSEnji Cooper # Anyone wants to do a port? 4488*132f818dSEnji Cooper ;; 4489*132f818dSEnji Cooper irix5* | irix6* | nonstopux*) 4490*132f818dSEnji Cooper case $cc_basename in 4491*132f818dSEnji Cooper CC*) 4492*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4493*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4494*132f818dSEnji Cooper # CC pic flag -KPIC is the default. 4495*132f818dSEnji Cooper ;; 4496*132f818dSEnji Cooper *) 4497*132f818dSEnji Cooper ;; 4498*132f818dSEnji Cooper esac 4499*132f818dSEnji Cooper ;; 4500*132f818dSEnji Cooper linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4501*132f818dSEnji Cooper case $cc_basename in 4502*132f818dSEnji Cooper KCC*) 4503*132f818dSEnji Cooper # KAI C++ Compiler 4504*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4505*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4506*132f818dSEnji Cooper ;; 4507*132f818dSEnji Cooper ecpc* ) 4508*132f818dSEnji Cooper # old Intel C++ for x86_64, which still supported -KPIC. 4509*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4510*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4511*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4512*132f818dSEnji Cooper ;; 4513*132f818dSEnji Cooper icpc* ) 4514*132f818dSEnji Cooper # Intel C++, used to be incompatible with GCC. 4515*132f818dSEnji Cooper # ICC 10 doesn't accept -KPIC any more. 4516*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4517*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4518*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4519*132f818dSEnji Cooper ;; 4520*132f818dSEnji Cooper pgCC* | pgcpp*) 4521*132f818dSEnji Cooper # Portland Group C++ compiler 4522*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4523*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4524*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4525*132f818dSEnji Cooper ;; 4526*132f818dSEnji Cooper cxx*) 4527*132f818dSEnji Cooper # Compaq C++ 4528*132f818dSEnji Cooper # Make sure the PIC flag is empty. It appears that all Alpha 4529*132f818dSEnji Cooper # Linux and Compaq Tru64 Unix objects are PIC. 4530*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4531*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4532*132f818dSEnji Cooper ;; 4533*132f818dSEnji Cooper xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4534*132f818dSEnji Cooper # IBM XL 8.0, 9.0 on PPC and BlueGene 4535*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4536*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4537*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4538*132f818dSEnji Cooper ;; 4539*132f818dSEnji Cooper *) 4540*132f818dSEnji Cooper case `$CC -V 2>&1 | $SED 5q` in 4541*132f818dSEnji Cooper *Sun\ C*) 4542*132f818dSEnji Cooper # Sun C++ 5.9 4543*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4544*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4545*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4546*132f818dSEnji Cooper ;; 4547*132f818dSEnji Cooper esac 4548*132f818dSEnji Cooper ;; 4549*132f818dSEnji Cooper esac 4550*132f818dSEnji Cooper ;; 4551*132f818dSEnji Cooper lynxos*) 4552*132f818dSEnji Cooper ;; 4553*132f818dSEnji Cooper m88k*) 4554*132f818dSEnji Cooper ;; 4555*132f818dSEnji Cooper mvs*) 4556*132f818dSEnji Cooper case $cc_basename in 4557*132f818dSEnji Cooper cxx*) 4558*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4559*132f818dSEnji Cooper ;; 4560*132f818dSEnji Cooper *) 4561*132f818dSEnji Cooper ;; 4562*132f818dSEnji Cooper esac 4563*132f818dSEnji Cooper ;; 4564*132f818dSEnji Cooper netbsd* | netbsdelf*-gnu) 4565*132f818dSEnji Cooper ;; 4566*132f818dSEnji Cooper *-mlibc) 4567*132f818dSEnji Cooper ;; 4568*132f818dSEnji Cooper *qnx* | *nto*) 4569*132f818dSEnji Cooper # QNX uses GNU C++, but need to define -shared option too, otherwise 4570*132f818dSEnji Cooper # it will coredump. 4571*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4572*132f818dSEnji Cooper ;; 4573*132f818dSEnji Cooper osf3* | osf4* | osf5*) 4574*132f818dSEnji Cooper case $cc_basename in 4575*132f818dSEnji Cooper KCC*) 4576*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4577*132f818dSEnji Cooper ;; 4578*132f818dSEnji Cooper RCC*) 4579*132f818dSEnji Cooper # Rational C++ 2.4.1 4580*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4581*132f818dSEnji Cooper ;; 4582*132f818dSEnji Cooper cxx*) 4583*132f818dSEnji Cooper # Digital/Compaq C++ 4584*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4585*132f818dSEnji Cooper # Make sure the PIC flag is empty. It appears that all Alpha 4586*132f818dSEnji Cooper # Linux and Compaq Tru64 Unix objects are PIC. 4587*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4588*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4589*132f818dSEnji Cooper ;; 4590*132f818dSEnji Cooper *) 4591*132f818dSEnji Cooper ;; 4592*132f818dSEnji Cooper esac 4593*132f818dSEnji Cooper ;; 4594*132f818dSEnji Cooper psos*) 4595*132f818dSEnji Cooper ;; 4596*132f818dSEnji Cooper serenity*) 4597*132f818dSEnji Cooper ;; 4598*132f818dSEnji Cooper solaris*) 4599*132f818dSEnji Cooper case $cc_basename in 4600*132f818dSEnji Cooper CC* | sunCC*) 4601*132f818dSEnji Cooper # Sun C++ 4.2, 5.x and Centerline C++ 4602*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4603*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4604*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4605*132f818dSEnji Cooper ;; 4606*132f818dSEnji Cooper gcx*) 4607*132f818dSEnji Cooper # Green Hills C++ Compiler 4608*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4609*132f818dSEnji Cooper ;; 4610*132f818dSEnji Cooper *) 4611*132f818dSEnji Cooper ;; 4612*132f818dSEnji Cooper esac 4613*132f818dSEnji Cooper ;; 4614*132f818dSEnji Cooper sunos4*) 4615*132f818dSEnji Cooper case $cc_basename in 4616*132f818dSEnji Cooper CC*) 4617*132f818dSEnji Cooper # Sun C++ 4.x 4618*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4619*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4620*132f818dSEnji Cooper ;; 4621*132f818dSEnji Cooper lcc*) 4622*132f818dSEnji Cooper # Lucid 4623*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4624*132f818dSEnji Cooper ;; 4625*132f818dSEnji Cooper *) 4626*132f818dSEnji Cooper ;; 4627*132f818dSEnji Cooper esac 4628*132f818dSEnji Cooper ;; 4629*132f818dSEnji Cooper sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4630*132f818dSEnji Cooper case $cc_basename in 4631*132f818dSEnji Cooper CC*) 4632*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4633*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4634*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4635*132f818dSEnji Cooper ;; 4636*132f818dSEnji Cooper esac 4637*132f818dSEnji Cooper ;; 4638*132f818dSEnji Cooper tandem*) 4639*132f818dSEnji Cooper case $cc_basename in 4640*132f818dSEnji Cooper NCC*) 4641*132f818dSEnji Cooper # NonStop-UX NCC 3.20 4642*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4643*132f818dSEnji Cooper ;; 4644*132f818dSEnji Cooper *) 4645*132f818dSEnji Cooper ;; 4646*132f818dSEnji Cooper esac 4647*132f818dSEnji Cooper ;; 4648*132f818dSEnji Cooper vxworks*) 4649*132f818dSEnji Cooper ;; 4650*132f818dSEnji Cooper *) 4651*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4652*132f818dSEnji Cooper ;; 4653*132f818dSEnji Cooper esac 4654*132f818dSEnji Cooper fi 4655*132f818dSEnji Cooper], 4656*132f818dSEnji Cooper[ 4657*132f818dSEnji Cooper if test yes = "$GCC"; then 4658*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4659*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4660*132f818dSEnji Cooper 4661*132f818dSEnji Cooper case $host_os in 4662*132f818dSEnji Cooper aix*) 4663*132f818dSEnji Cooper # All AIX code is PIC. 4664*132f818dSEnji Cooper if test ia64 = "$host_cpu"; then 4665*132f818dSEnji Cooper # AIX 5 now supports IA64 processor 4666*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4667*132f818dSEnji Cooper fi 4668*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4669*132f818dSEnji Cooper ;; 4670*132f818dSEnji Cooper 4671*132f818dSEnji Cooper amigaos*) 4672*132f818dSEnji Cooper case $host_cpu in 4673*132f818dSEnji Cooper powerpc) 4674*132f818dSEnji Cooper # see comment about AmigaOS4 .so support 4675*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4676*132f818dSEnji Cooper ;; 4677*132f818dSEnji Cooper m68k) 4678*132f818dSEnji Cooper # FIXME: we need at least 68020 code to build shared libraries, but 4679*132f818dSEnji Cooper # adding the '-m68020' flag to GCC prevents building anything better, 4680*132f818dSEnji Cooper # like '-m68040'. 4681*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4682*132f818dSEnji Cooper ;; 4683*132f818dSEnji Cooper esac 4684*132f818dSEnji Cooper ;; 4685*132f818dSEnji Cooper 4686*132f818dSEnji Cooper beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4687*132f818dSEnji Cooper # PIC is the default for these OSes. 4688*132f818dSEnji Cooper ;; 4689*132f818dSEnji Cooper 4690*132f818dSEnji Cooper mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) 4691*132f818dSEnji Cooper # This hack is so that the source file can tell whether it is being 4692*132f818dSEnji Cooper # built for inclusion in a dll (and should export symbols for example). 4693*132f818dSEnji Cooper # Although the cygwin gcc ignores -fPIC, still need this for old-style 4694*132f818dSEnji Cooper # (--disable-auto-import) libraries 4695*132f818dSEnji Cooper m4_if([$1], [GCJ], [], 4696*132f818dSEnji Cooper [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4697*132f818dSEnji Cooper case $host_os in 4698*132f818dSEnji Cooper os2*) 4699*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4700*132f818dSEnji Cooper ;; 4701*132f818dSEnji Cooper esac 4702*132f818dSEnji Cooper ;; 4703*132f818dSEnji Cooper 4704*132f818dSEnji Cooper darwin* | rhapsody*) 4705*132f818dSEnji Cooper # PIC is the default on this platform 4706*132f818dSEnji Cooper # Common symbols not allowed in MH_DYLIB files 4707*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4708*132f818dSEnji Cooper ;; 4709*132f818dSEnji Cooper 4710*132f818dSEnji Cooper haiku*) 4711*132f818dSEnji Cooper # PIC is the default for Haiku. 4712*132f818dSEnji Cooper # The "-static" flag exists, but is broken. 4713*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)= 4714*132f818dSEnji Cooper ;; 4715*132f818dSEnji Cooper 4716*132f818dSEnji Cooper hpux*) 4717*132f818dSEnji Cooper # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4718*132f818dSEnji Cooper # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4719*132f818dSEnji Cooper # sets the default TLS model and affects inlining. 4720*132f818dSEnji Cooper case $host_cpu in 4721*132f818dSEnji Cooper hppa*64*) 4722*132f818dSEnji Cooper # +Z the default 4723*132f818dSEnji Cooper ;; 4724*132f818dSEnji Cooper *) 4725*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4726*132f818dSEnji Cooper ;; 4727*132f818dSEnji Cooper esac 4728*132f818dSEnji Cooper ;; 4729*132f818dSEnji Cooper 4730*132f818dSEnji Cooper interix[[3-9]]*) 4731*132f818dSEnji Cooper # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4732*132f818dSEnji Cooper # Instead, we relocate shared libraries at runtime. 4733*132f818dSEnji Cooper ;; 4734*132f818dSEnji Cooper 4735*132f818dSEnji Cooper msdosdjgpp*) 4736*132f818dSEnji Cooper # Just because we use GCC doesn't mean we suddenly get shared libraries 4737*132f818dSEnji Cooper # on systems that don't support them. 4738*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4739*132f818dSEnji Cooper enable_shared=no 4740*132f818dSEnji Cooper ;; 4741*132f818dSEnji Cooper 4742*132f818dSEnji Cooper *nto* | *qnx*) 4743*132f818dSEnji Cooper # QNX uses GNU C++, but need to define -shared option too, otherwise 4744*132f818dSEnji Cooper # it will coredump. 4745*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4746*132f818dSEnji Cooper ;; 4747*132f818dSEnji Cooper 4748*132f818dSEnji Cooper sysv4*MP*) 4749*132f818dSEnji Cooper if test -d /usr/nec; then 4750*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4751*132f818dSEnji Cooper fi 4752*132f818dSEnji Cooper ;; 4753*132f818dSEnji Cooper 4754*132f818dSEnji Cooper *) 4755*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4756*132f818dSEnji Cooper ;; 4757*132f818dSEnji Cooper esac 4758*132f818dSEnji Cooper 4759*132f818dSEnji Cooper case $cc_basename in 4760*132f818dSEnji Cooper nvcc*) # Cuda Compiler Driver 2.2 4761*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4762*132f818dSEnji Cooper if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4763*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 4764*132f818dSEnji Cooper fi 4765*132f818dSEnji Cooper ;; 4766*132f818dSEnji Cooper esac 4767*132f818dSEnji Cooper else 4768*132f818dSEnji Cooper # PORTME Check for flag to pass linker flags through the system compiler. 4769*132f818dSEnji Cooper case $host_os in 4770*132f818dSEnji Cooper aix*) 4771*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4772*132f818dSEnji Cooper if test ia64 = "$host_cpu"; then 4773*132f818dSEnji Cooper # AIX 5 now supports IA64 processor 4774*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4775*132f818dSEnji Cooper else 4776*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4777*132f818dSEnji Cooper fi 4778*132f818dSEnji Cooper ;; 4779*132f818dSEnji Cooper 4780*132f818dSEnji Cooper darwin* | rhapsody*) 4781*132f818dSEnji Cooper # PIC is the default on this platform 4782*132f818dSEnji Cooper # Common symbols not allowed in MH_DYLIB files 4783*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4784*132f818dSEnji Cooper case $cc_basename in 4785*132f818dSEnji Cooper nagfor*) 4786*132f818dSEnji Cooper # NAG Fortran compiler 4787*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4788*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4789*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4790*132f818dSEnji Cooper ;; 4791*132f818dSEnji Cooper esac 4792*132f818dSEnji Cooper ;; 4793*132f818dSEnji Cooper 4794*132f818dSEnji Cooper mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) 4795*132f818dSEnji Cooper # This hack is so that the source file can tell whether it is being 4796*132f818dSEnji Cooper # built for inclusion in a dll (and should export symbols for example). 4797*132f818dSEnji Cooper m4_if([$1], [GCJ], [], 4798*132f818dSEnji Cooper [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4799*132f818dSEnji Cooper case $host_os in 4800*132f818dSEnji Cooper os2*) 4801*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4802*132f818dSEnji Cooper ;; 4803*132f818dSEnji Cooper esac 4804*132f818dSEnji Cooper ;; 4805*132f818dSEnji Cooper 4806*132f818dSEnji Cooper hpux9* | hpux10* | hpux11*) 4807*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4808*132f818dSEnji Cooper # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4809*132f818dSEnji Cooper # not for PA HP-UX. 4810*132f818dSEnji Cooper case $host_cpu in 4811*132f818dSEnji Cooper hppa*64*|ia64*) 4812*132f818dSEnji Cooper # +Z the default 4813*132f818dSEnji Cooper ;; 4814*132f818dSEnji Cooper *) 4815*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4816*132f818dSEnji Cooper ;; 4817*132f818dSEnji Cooper esac 4818*132f818dSEnji Cooper # Is there a better lt_prog_compiler_static that works with the bundled CC? 4819*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4820*132f818dSEnji Cooper ;; 4821*132f818dSEnji Cooper 4822*132f818dSEnji Cooper irix5* | irix6* | nonstopux*) 4823*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4824*132f818dSEnji Cooper # PIC (with -KPIC) is the default. 4825*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4826*132f818dSEnji Cooper ;; 4827*132f818dSEnji Cooper 4828*132f818dSEnji Cooper linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | *freebsd*) 4829*132f818dSEnji Cooper case $cc_basename in 4830*132f818dSEnji Cooper # old Intel for x86_64, which still supported -KPIC. 4831*132f818dSEnji Cooper ecc*) 4832*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4833*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4834*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4835*132f818dSEnji Cooper ;; 4836*132f818dSEnji Cooper *flang* | ftn | f18* | f95*) 4837*132f818dSEnji Cooper # Flang compiler. 4838*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4839*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4840*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4841*132f818dSEnji Cooper ;; 4842*132f818dSEnji Cooper # icc used to be incompatible with GCC. 4843*132f818dSEnji Cooper # ICC 10 doesn't accept -KPIC any more. 4844*132f818dSEnji Cooper icc* | ifort*) 4845*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4846*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4847*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4848*132f818dSEnji Cooper ;; 4849*132f818dSEnji Cooper # Lahey Fortran 8.1. 4850*132f818dSEnji Cooper lf95*) 4851*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4852*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4853*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4854*132f818dSEnji Cooper ;; 4855*132f818dSEnji Cooper nagfor*) 4856*132f818dSEnji Cooper # NAG Fortran compiler 4857*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4858*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4859*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4860*132f818dSEnji Cooper ;; 4861*132f818dSEnji Cooper tcc*) 4862*132f818dSEnji Cooper # Fabrice Bellard et al's Tiny C Compiler 4863*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4864*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4865*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4866*132f818dSEnji Cooper ;; 4867*132f818dSEnji Cooper pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4868*132f818dSEnji Cooper # Portland Group compilers (*not* the Pentium gcc compiler, 4869*132f818dSEnji Cooper # which looks to be a dead project) 4870*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4871*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4872*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4873*132f818dSEnji Cooper ;; 4874*132f818dSEnji Cooper ccc*) 4875*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4876*132f818dSEnji Cooper # All Alpha code is PIC. 4877*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4878*132f818dSEnji Cooper ;; 4879*132f818dSEnji Cooper xl* | bgxl* | bgf* | mpixl*) 4880*132f818dSEnji Cooper # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4881*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4882*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4883*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4884*132f818dSEnji Cooper ;; 4885*132f818dSEnji Cooper *) 4886*132f818dSEnji Cooper case `$CC -V 2>&1 | $SED 5q` in 4887*132f818dSEnji Cooper *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 4888*132f818dSEnji Cooper # Sun Fortran 8.3 passes all unrecognized flags to the linker 4889*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4890*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4891*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4892*132f818dSEnji Cooper ;; 4893*132f818dSEnji Cooper *Sun\ F* | *Sun*Fortran*) 4894*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4895*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4896*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4897*132f818dSEnji Cooper ;; 4898*132f818dSEnji Cooper *Sun\ C*) 4899*132f818dSEnji Cooper # Sun C 5.9 4900*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4901*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4902*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4903*132f818dSEnji Cooper ;; 4904*132f818dSEnji Cooper *Intel*\ [[CF]]*Compiler*) 4905*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4906*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4907*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4908*132f818dSEnji Cooper ;; 4909*132f818dSEnji Cooper *Portland\ Group*) 4910*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4911*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4912*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4913*132f818dSEnji Cooper ;; 4914*132f818dSEnji Cooper esac 4915*132f818dSEnji Cooper ;; 4916*132f818dSEnji Cooper esac 4917*132f818dSEnji Cooper ;; 4918*132f818dSEnji Cooper 4919*132f818dSEnji Cooper newsos6) 4920*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4921*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4922*132f818dSEnji Cooper ;; 4923*132f818dSEnji Cooper 4924*132f818dSEnji Cooper *-mlibc) 4925*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4926*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4927*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4928*132f818dSEnji Cooper ;; 4929*132f818dSEnji Cooper 4930*132f818dSEnji Cooper *nto* | *qnx*) 4931*132f818dSEnji Cooper # QNX uses GNU C++, but need to define -shared option too, otherwise 4932*132f818dSEnji Cooper # it will coredump. 4933*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4934*132f818dSEnji Cooper ;; 4935*132f818dSEnji Cooper 4936*132f818dSEnji Cooper osf3* | osf4* | osf5*) 4937*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4938*132f818dSEnji Cooper # All OSF/1 code is PIC. 4939*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4940*132f818dSEnji Cooper ;; 4941*132f818dSEnji Cooper 4942*132f818dSEnji Cooper rdos*) 4943*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4944*132f818dSEnji Cooper ;; 4945*132f818dSEnji Cooper 4946*132f818dSEnji Cooper serenity*) 4947*132f818dSEnji Cooper ;; 4948*132f818dSEnji Cooper 4949*132f818dSEnji Cooper solaris*) 4950*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4951*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4952*132f818dSEnji Cooper case $cc_basename in 4953*132f818dSEnji Cooper f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4954*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4955*132f818dSEnji Cooper *) 4956*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4957*132f818dSEnji Cooper esac 4958*132f818dSEnji Cooper ;; 4959*132f818dSEnji Cooper 4960*132f818dSEnji Cooper sunos4*) 4961*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4962*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4963*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4964*132f818dSEnji Cooper ;; 4965*132f818dSEnji Cooper 4966*132f818dSEnji Cooper sysv4 | sysv4.2uw2* | sysv4.3*) 4967*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4968*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4969*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4970*132f818dSEnji Cooper ;; 4971*132f818dSEnji Cooper 4972*132f818dSEnji Cooper sysv4*MP*) 4973*132f818dSEnji Cooper if test -d /usr/nec; then 4974*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4975*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4976*132f818dSEnji Cooper fi 4977*132f818dSEnji Cooper ;; 4978*132f818dSEnji Cooper 4979*132f818dSEnji Cooper sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4980*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4981*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4982*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4983*132f818dSEnji Cooper ;; 4984*132f818dSEnji Cooper 4985*132f818dSEnji Cooper unicos*) 4986*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4987*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4988*132f818dSEnji Cooper ;; 4989*132f818dSEnji Cooper 4990*132f818dSEnji Cooper uts4*) 4991*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4992*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4993*132f818dSEnji Cooper ;; 4994*132f818dSEnji Cooper 4995*132f818dSEnji Cooper *) 4996*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4997*132f818dSEnji Cooper ;; 4998*132f818dSEnji Cooper esac 4999*132f818dSEnji Cooper fi 5000*132f818dSEnji Cooper]) 5001*132f818dSEnji Coopercase $host_os in 5002*132f818dSEnji Cooper # For platforms that do not support PIC, -DPIC is meaningless: 5003*132f818dSEnji Cooper *djgpp*) 5004*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5005*132f818dSEnji Cooper ;; 5006*132f818dSEnji Cooper *) 5007*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 5008*132f818dSEnji Cooper ;; 5009*132f818dSEnji Cooperesac 5010*132f818dSEnji Cooper 5011*132f818dSEnji CooperAC_CACHE_CHECK([for $compiler option to produce PIC], 5012*132f818dSEnji Cooper [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 5013*132f818dSEnji Cooper [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 5014*132f818dSEnji Cooper_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 5015*132f818dSEnji Cooper 5016*132f818dSEnji Cooper# 5017*132f818dSEnji Cooper# Check to make sure the PIC flag actually works. 5018*132f818dSEnji Cooper# 5019*132f818dSEnji Cooperif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 5020*132f818dSEnji Cooper _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 5021*132f818dSEnji Cooper [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 5022*132f818dSEnji Cooper [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 5023*132f818dSEnji Cooper [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 5024*132f818dSEnji Cooper "" | " "*) ;; 5025*132f818dSEnji Cooper *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 5026*132f818dSEnji Cooper esac], 5027*132f818dSEnji Cooper [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 5028*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 5029*132f818dSEnji Cooperfi 5030*132f818dSEnji Cooper_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 5031*132f818dSEnji Cooper [Additional compiler flags for building library objects]) 5032*132f818dSEnji Cooper 5033*132f818dSEnji Cooper_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 5034*132f818dSEnji Cooper [How to pass a linker flag through the compiler]) 5035*132f818dSEnji Cooper# 5036*132f818dSEnji Cooper# Check to make sure the static flag actually works. 5037*132f818dSEnji Cooper# 5038*132f818dSEnji Cooperwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 5039*132f818dSEnji Cooper_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 5040*132f818dSEnji Cooper _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 5041*132f818dSEnji Cooper $lt_tmp_static_flag, 5042*132f818dSEnji Cooper [], 5043*132f818dSEnji Cooper [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 5044*132f818dSEnji Cooper_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 5045*132f818dSEnji Cooper [Compiler flag to prevent dynamic linking]) 5046*132f818dSEnji Cooper])# _LT_COMPILER_PIC 5047*132f818dSEnji Cooper 5048*132f818dSEnji Cooper 5049*132f818dSEnji Cooper# _LT_LINKER_SHLIBS([TAGNAME]) 5050*132f818dSEnji Cooper# ---------------------------- 5051*132f818dSEnji Cooper# See if the linker supports building shared libraries. 5052*132f818dSEnji Cooperm4_defun([_LT_LINKER_SHLIBS], 5053*132f818dSEnji Cooper[AC_REQUIRE([LT_PATH_LD])dnl 5054*132f818dSEnji CooperAC_REQUIRE([LT_PATH_NM])dnl 5055*132f818dSEnji Cooperm4_require([_LT_PATH_MANIFEST_TOOL])dnl 5056*132f818dSEnji Cooperm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5057*132f818dSEnji Cooperm4_require([_LT_DECL_EGREP])dnl 5058*132f818dSEnji Cooperm4_require([_LT_DECL_SED])dnl 5059*132f818dSEnji Cooperm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 5060*132f818dSEnji Cooperm4_require([_LT_TAG_COMPILER])dnl 5061*132f818dSEnji CooperAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5062*132f818dSEnji Cooperm4_if([$1], [CXX], [ 5063*132f818dSEnji Cooper _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5064*132f818dSEnji Cooper _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5065*132f818dSEnji Cooper case $host_os in 5066*132f818dSEnji Cooper aix[[4-9]]*) 5067*132f818dSEnji Cooper # If we're using GNU nm, then we don't want the "-C" option. 5068*132f818dSEnji Cooper # -C means demangle to GNU nm, but means don't demangle to AIX nm. 5069*132f818dSEnji Cooper # Without the "-l" option, or with the "-B" option, AIX nm treats 5070*132f818dSEnji Cooper # weak defined symbols like other global defined symbols, whereas 5071*132f818dSEnji Cooper # GNU nm marks them as "W". 5072*132f818dSEnji Cooper # While the 'weak' keyword is ignored in the Export File, we need 5073*132f818dSEnji Cooper # it in the Import File for the 'aix-soname' feature, so we have 5074*132f818dSEnji Cooper # to replace the "-B" option with "-P" for AIX nm. 5075*132f818dSEnji Cooper if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5076*132f818dSEnji Cooper _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' 5077*132f818dSEnji Cooper else 5078*132f818dSEnji Cooper _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' 5079*132f818dSEnji Cooper fi 5080*132f818dSEnji Cooper ;; 5081*132f818dSEnji Cooper pw32*) 5082*132f818dSEnji Cooper _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 5083*132f818dSEnji Cooper ;; 5084*132f818dSEnji Cooper cygwin* | mingw* | windows* | cegcc*) 5085*132f818dSEnji Cooper case $cc_basename in 5086*132f818dSEnji Cooper cl* | icl*) 5087*132f818dSEnji Cooper _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5088*132f818dSEnji Cooper ;; 5089*132f818dSEnji Cooper *) 5090*132f818dSEnji Cooper _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' 5091*132f818dSEnji Cooper _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5092*132f818dSEnji Cooper ;; 5093*132f818dSEnji Cooper esac 5094*132f818dSEnji Cooper ;; 5095*132f818dSEnji Cooper *) 5096*132f818dSEnji Cooper _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5097*132f818dSEnji Cooper ;; 5098*132f818dSEnji Cooper esac 5099*132f818dSEnji Cooper], [ 5100*132f818dSEnji Cooper runpath_var= 5101*132f818dSEnji Cooper _LT_TAGVAR(allow_undefined_flag, $1)= 5102*132f818dSEnji Cooper _LT_TAGVAR(always_export_symbols, $1)=no 5103*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)= 5104*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)= 5105*132f818dSEnji Cooper _LT_TAGVAR(compiler_needs_object, $1)=no 5106*132f818dSEnji Cooper _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5107*132f818dSEnji Cooper _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5108*132f818dSEnji Cooper _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5109*132f818dSEnji Cooper _LT_TAGVAR(hardcode_automatic, $1)=no 5110*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct, $1)=no 5111*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5112*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5113*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_separator, $1)= 5114*132f818dSEnji Cooper _LT_TAGVAR(hardcode_minus_L, $1)=no 5115*132f818dSEnji Cooper _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5116*132f818dSEnji Cooper _LT_TAGVAR(inherit_rpath, $1)=no 5117*132f818dSEnji Cooper _LT_TAGVAR(link_all_deplibs, $1)=unknown 5118*132f818dSEnji Cooper _LT_TAGVAR(module_cmds, $1)= 5119*132f818dSEnji Cooper _LT_TAGVAR(module_expsym_cmds, $1)= 5120*132f818dSEnji Cooper _LT_TAGVAR(old_archive_from_new_cmds, $1)= 5121*132f818dSEnji Cooper _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 5122*132f818dSEnji Cooper _LT_TAGVAR(thread_safe_flag_spec, $1)= 5123*132f818dSEnji Cooper _LT_TAGVAR(whole_archive_flag_spec, $1)= 5124*132f818dSEnji Cooper # include_expsyms should be a list of space-separated symbols to be *always* 5125*132f818dSEnji Cooper # included in the symbol list 5126*132f818dSEnji Cooper _LT_TAGVAR(include_expsyms, $1)= 5127*132f818dSEnji Cooper # exclude_expsyms can be an extended regexp of symbols to exclude 5128*132f818dSEnji Cooper # it will be wrapped by ' (' and ')$', so one must not match beginning or 5129*132f818dSEnji Cooper # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 5130*132f818dSEnji Cooper # as well as any symbol that contains 'd'. 5131*132f818dSEnji Cooper _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5132*132f818dSEnji Cooper # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5133*132f818dSEnji Cooper # platforms (ab)use it in PIC code, but their linkers get confused if 5134*132f818dSEnji Cooper # the symbol is explicitly referenced. Since portable code cannot 5135*132f818dSEnji Cooper # rely on this symbol name, it's probably fine to never include it in 5136*132f818dSEnji Cooper # preloaded symbol tables. 5137*132f818dSEnji Cooper # Exclude shared library initialization/finalization symbols. 5138*132f818dSEnji Cooperdnl Note also adjust exclude_expsyms for C++ above. 5139*132f818dSEnji Cooper extract_expsyms_cmds= 5140*132f818dSEnji Cooper 5141*132f818dSEnji Cooper case $host_os in 5142*132f818dSEnji Cooper cygwin* | mingw* | windows* | pw32* | cegcc*) 5143*132f818dSEnji Cooper # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 5144*132f818dSEnji Cooper # When not using gcc, we currently assume that we are using 5145*132f818dSEnji Cooper # Microsoft Visual C++ or Intel C++ Compiler. 5146*132f818dSEnji Cooper if test yes != "$GCC"; then 5147*132f818dSEnji Cooper with_gnu_ld=no 5148*132f818dSEnji Cooper fi 5149*132f818dSEnji Cooper ;; 5150*132f818dSEnji Cooper interix*) 5151*132f818dSEnji Cooper # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 5152*132f818dSEnji Cooper with_gnu_ld=yes 5153*132f818dSEnji Cooper ;; 5154*132f818dSEnji Cooper esac 5155*132f818dSEnji Cooper 5156*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=yes 5157*132f818dSEnji Cooper 5158*132f818dSEnji Cooper # On some targets, GNU ld is compatible enough with the native linker 5159*132f818dSEnji Cooper # that we're better off using the native interface for both. 5160*132f818dSEnji Cooper lt_use_gnu_ld_interface=no 5161*132f818dSEnji Cooper if test yes = "$with_gnu_ld"; then 5162*132f818dSEnji Cooper case $host_os in 5163*132f818dSEnji Cooper aix*) 5164*132f818dSEnji Cooper # The AIX port of GNU ld has always aspired to compatibility 5165*132f818dSEnji Cooper # with the native linker. However, as the warning in the GNU ld 5166*132f818dSEnji Cooper # block says, versions before 2.19.5* couldn't really create working 5167*132f818dSEnji Cooper # shared libraries, regardless of the interface used. 5168*132f818dSEnji Cooper case `$LD -v 2>&1` in 5169*132f818dSEnji Cooper *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 5170*132f818dSEnji Cooper *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 5171*132f818dSEnji Cooper *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 5172*132f818dSEnji Cooper *) 5173*132f818dSEnji Cooper lt_use_gnu_ld_interface=yes 5174*132f818dSEnji Cooper ;; 5175*132f818dSEnji Cooper esac 5176*132f818dSEnji Cooper ;; 5177*132f818dSEnji Cooper *) 5178*132f818dSEnji Cooper lt_use_gnu_ld_interface=yes 5179*132f818dSEnji Cooper ;; 5180*132f818dSEnji Cooper esac 5181*132f818dSEnji Cooper fi 5182*132f818dSEnji Cooper 5183*132f818dSEnji Cooper if test yes = "$lt_use_gnu_ld_interface"; then 5184*132f818dSEnji Cooper # If archive_cmds runs LD, not CC, wlarc should be empty 5185*132f818dSEnji Cooper wlarc='$wl' 5186*132f818dSEnji Cooper 5187*132f818dSEnji Cooper # Set some defaults for GNU ld with shared library support. These 5188*132f818dSEnji Cooper # are reset later if shared libraries are not supported. Putting them 5189*132f818dSEnji Cooper # here allows them to be overridden if necessary. 5190*132f818dSEnji Cooper runpath_var=LD_RUN_PATH 5191*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5192*132f818dSEnji Cooper _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 5193*132f818dSEnji Cooper # ancient GNU ld didn't support --whole-archive et. al. 5194*132f818dSEnji Cooper if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 5195*132f818dSEnji Cooper _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 5196*132f818dSEnji Cooper else 5197*132f818dSEnji Cooper _LT_TAGVAR(whole_archive_flag_spec, $1)= 5198*132f818dSEnji Cooper fi 5199*132f818dSEnji Cooper supports_anon_versioning=no 5200*132f818dSEnji Cooper case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in 5201*132f818dSEnji Cooper *GNU\ gold*) supports_anon_versioning=yes ;; 5202*132f818dSEnji Cooper *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5203*132f818dSEnji Cooper *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5204*132f818dSEnji Cooper *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5205*132f818dSEnji Cooper *\ 2.11.*) ;; # other 2.11 versions 5206*132f818dSEnji Cooper *) supports_anon_versioning=yes ;; 5207*132f818dSEnji Cooper esac 5208*132f818dSEnji Cooper 5209*132f818dSEnji Cooper # See if GNU ld supports shared libraries. 5210*132f818dSEnji Cooper case $host_os in 5211*132f818dSEnji Cooper aix[[3-9]]*) 5212*132f818dSEnji Cooper # On AIX/PPC, the GNU linker is very broken 5213*132f818dSEnji Cooper if test ia64 != "$host_cpu"; then 5214*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 5215*132f818dSEnji Cooper cat <<_LT_EOF 1>&2 5216*132f818dSEnji Cooper 5217*132f818dSEnji Cooper*** Warning: the GNU linker, at least up to release 2.19, is reported 5218*132f818dSEnji Cooper*** to be unable to reliably create shared libraries on AIX. 5219*132f818dSEnji Cooper*** Therefore, libtool is disabling shared libraries support. If you 5220*132f818dSEnji Cooper*** really care for shared libraries, you may want to install binutils 5221*132f818dSEnji Cooper*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 5222*132f818dSEnji Cooper*** You will then need to restart the configuration process. 5223*132f818dSEnji Cooper 5224*132f818dSEnji Cooper_LT_EOF 5225*132f818dSEnji Cooper fi 5226*132f818dSEnji Cooper ;; 5227*132f818dSEnji Cooper 5228*132f818dSEnji Cooper amigaos*) 5229*132f818dSEnji Cooper case $host_cpu in 5230*132f818dSEnji Cooper powerpc) 5231*132f818dSEnji Cooper # see comment about AmigaOS4 .so support 5232*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5233*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)='' 5234*132f818dSEnji Cooper ;; 5235*132f818dSEnji Cooper m68k) 5236*132f818dSEnji Cooper _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)' 5237*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5238*132f818dSEnji Cooper _LT_TAGVAR(hardcode_minus_L, $1)=yes 5239*132f818dSEnji Cooper ;; 5240*132f818dSEnji Cooper esac 5241*132f818dSEnji Cooper ;; 5242*132f818dSEnji Cooper 5243*132f818dSEnji Cooper beos*) 5244*132f818dSEnji Cooper if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5245*132f818dSEnji Cooper _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5246*132f818dSEnji Cooper # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5247*132f818dSEnji Cooper # support --undefined. This deserves some investigation. FIXME 5248*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5249*132f818dSEnji Cooper else 5250*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 5251*132f818dSEnji Cooper fi 5252*132f818dSEnji Cooper ;; 5253*132f818dSEnji Cooper 5254*132f818dSEnji Cooper cygwin* | mingw* | windows* | pw32* | cegcc*) 5255*132f818dSEnji Cooper # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5256*132f818dSEnji Cooper # as there is no search path for DLLs. 5257*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5258*132f818dSEnji Cooper _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 5259*132f818dSEnji Cooper _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5260*132f818dSEnji Cooper _LT_TAGVAR(always_export_symbols, $1)=no 5261*132f818dSEnji Cooper _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5262*132f818dSEnji Cooper _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' 5263*132f818dSEnji Cooper _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5264*132f818dSEnji Cooper _LT_TAGVAR(file_list_spec, $1)='@' 5265*132f818dSEnji Cooper 5266*132f818dSEnji Cooper if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5267*132f818dSEnji Cooper _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' 5268*132f818dSEnji Cooper # If the export-symbols file already is a .def file, use it as 5269*132f818dSEnji Cooper # is; otherwise, prepend EXPORTS... 5270*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5271*132f818dSEnji Cooper cp $export_symbols $output_objdir/$soname.def; 5272*132f818dSEnji Cooper else 5273*132f818dSEnji Cooper echo EXPORTS > $output_objdir/$soname.def; 5274*132f818dSEnji Cooper cat $export_symbols >> $output_objdir/$soname.def; 5275*132f818dSEnji Cooper fi~ 5276*132f818dSEnji Cooper $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5277*132f818dSEnji Cooper else 5278*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 5279*132f818dSEnji Cooper fi 5280*132f818dSEnji Cooper ;; 5281*132f818dSEnji Cooper 5282*132f818dSEnji Cooper haiku*) 5283*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5284*132f818dSEnji Cooper _LT_TAGVAR(link_all_deplibs, $1)=no 5285*132f818dSEnji Cooper ;; 5286*132f818dSEnji Cooper 5287*132f818dSEnji Cooper os2*) 5288*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5289*132f818dSEnji Cooper _LT_TAGVAR(hardcode_minus_L, $1)=yes 5290*132f818dSEnji Cooper _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5291*132f818dSEnji Cooper shrext_cmds=.dll 5292*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5293*132f818dSEnji Cooper $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5294*132f818dSEnji Cooper $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5295*132f818dSEnji Cooper $ECHO EXPORTS >> $output_objdir/$libname.def~ 5296*132f818dSEnji Cooper emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5297*132f818dSEnji Cooper $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5298*132f818dSEnji Cooper emximp -o $lib $output_objdir/$libname.def' 5299*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5300*132f818dSEnji Cooper $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5301*132f818dSEnji Cooper $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5302*132f818dSEnji Cooper $ECHO EXPORTS >> $output_objdir/$libname.def~ 5303*132f818dSEnji Cooper prefix_cmds="$SED"~ 5304*132f818dSEnji Cooper if test EXPORTS = "`$SED 1q $export_symbols`"; then 5305*132f818dSEnji Cooper prefix_cmds="$prefix_cmds -e 1d"; 5306*132f818dSEnji Cooper fi~ 5307*132f818dSEnji Cooper prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5308*132f818dSEnji Cooper cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5309*132f818dSEnji Cooper $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5310*132f818dSEnji Cooper emximp -o $lib $output_objdir/$libname.def' 5311*132f818dSEnji Cooper _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5312*132f818dSEnji Cooper _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5313*132f818dSEnji Cooper _LT_TAGVAR(file_list_spec, $1)='@' 5314*132f818dSEnji Cooper ;; 5315*132f818dSEnji Cooper 5316*132f818dSEnji Cooper interix[[3-9]]*) 5317*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct, $1)=no 5318*132f818dSEnji Cooper _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5319*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5320*132f818dSEnji Cooper _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5321*132f818dSEnji Cooper # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5322*132f818dSEnji Cooper # Instead, shared libraries are loaded at an image base (0x10000000 by 5323*132f818dSEnji Cooper # default) and relocated if they conflict, which is a slow very memory 5324*132f818dSEnji Cooper # consuming and fragmenting process. To avoid this, we pick a random, 5325*132f818dSEnji Cooper # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5326*132f818dSEnji Cooper # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5327*132f818dSEnji Cooper _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' 5328*132f818dSEnji Cooper _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' 5329*132f818dSEnji Cooper ;; 5330*132f818dSEnji Cooper 5331*132f818dSEnji Cooper gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 5332*132f818dSEnji Cooper tmp_diet=no 5333*132f818dSEnji Cooper if test linux-dietlibc = "$host_os"; then 5334*132f818dSEnji Cooper case $cc_basename in 5335*132f818dSEnji Cooper diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5336*132f818dSEnji Cooper esac 5337*132f818dSEnji Cooper fi 5338*132f818dSEnji Cooper if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5339*132f818dSEnji Cooper && test no = "$tmp_diet" 5340*132f818dSEnji Cooper then 5341*132f818dSEnji Cooper tmp_addflag=' $pic_flag' 5342*132f818dSEnji Cooper tmp_sharedflag='-shared' 5343*132f818dSEnji Cooper case $cc_basename,$host_cpu in 5344*132f818dSEnji Cooper pgcc*) # Portland Group C compiler 5345*132f818dSEnji Cooper _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' 5346*132f818dSEnji Cooper tmp_addflag=' $pic_flag' 5347*132f818dSEnji Cooper ;; 5348*132f818dSEnji Cooper pgf77* | pgf90* | pgf95* | pgfortran*) 5349*132f818dSEnji Cooper # Portland Group f77 and f90 compilers 5350*132f818dSEnji Cooper _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' 5351*132f818dSEnji Cooper tmp_addflag=' $pic_flag -Mnomain' ;; 5352*132f818dSEnji Cooper ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5353*132f818dSEnji Cooper tmp_addflag=' -i_dynamic' ;; 5354*132f818dSEnji Cooper efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5355*132f818dSEnji Cooper tmp_addflag=' -i_dynamic -nofor_main' ;; 5356*132f818dSEnji Cooper ifc* | ifort*) # Intel Fortran compiler 5357*132f818dSEnji Cooper tmp_addflag=' -nofor_main' ;; 5358*132f818dSEnji Cooper lf95*) # Lahey Fortran 8.1 5359*132f818dSEnji Cooper _LT_TAGVAR(whole_archive_flag_spec, $1)= 5360*132f818dSEnji Cooper tmp_sharedflag='--shared' ;; 5361*132f818dSEnji Cooper nagfor*) # NAGFOR 5.3 5362*132f818dSEnji Cooper tmp_sharedflag='-Wl,-shared' ;; 5363*132f818dSEnji Cooper xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 5364*132f818dSEnji Cooper tmp_sharedflag='-qmkshrobj' 5365*132f818dSEnji Cooper tmp_addflag= ;; 5366*132f818dSEnji Cooper nvcc*) # Cuda Compiler Driver 2.2 5367*132f818dSEnji Cooper _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' 5368*132f818dSEnji Cooper _LT_TAGVAR(compiler_needs_object, $1)=yes 5369*132f818dSEnji Cooper ;; 5370*132f818dSEnji Cooper esac 5371*132f818dSEnji Cooper case `$CC -V 2>&1 | $SED 5q` in 5372*132f818dSEnji Cooper *Sun\ C*) # Sun C 5.9 5373*132f818dSEnji Cooper _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' 5374*132f818dSEnji Cooper _LT_TAGVAR(compiler_needs_object, $1)=yes 5375*132f818dSEnji Cooper tmp_sharedflag='-G' ;; 5376*132f818dSEnji Cooper *Sun\ F*) # Sun Fortran 8.3 5377*132f818dSEnji Cooper tmp_sharedflag='-G' ;; 5378*132f818dSEnji Cooper esac 5379*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5380*132f818dSEnji Cooper 5381*132f818dSEnji Cooper if test yes = "$supports_anon_versioning"; then 5382*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5383*132f818dSEnji Cooper cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5384*132f818dSEnji Cooper echo "local: *; };" >> $output_objdir/$libname.ver~ 5385*132f818dSEnji Cooper $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 5386*132f818dSEnji Cooper fi 5387*132f818dSEnji Cooper 5388*132f818dSEnji Cooper case $cc_basename in 5389*132f818dSEnji Cooper tcc*) 5390*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5391*132f818dSEnji Cooper _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 5392*132f818dSEnji Cooper ;; 5393*132f818dSEnji Cooper xlf* | bgf* | bgxlf* | mpixlf*) 5394*132f818dSEnji Cooper # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 5395*132f818dSEnji Cooper _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5396*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5397*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 5398*132f818dSEnji Cooper if test yes = "$supports_anon_versioning"; then 5399*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5400*132f818dSEnji Cooper cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5401*132f818dSEnji Cooper echo "local: *; };" >> $output_objdir/$libname.ver~ 5402*132f818dSEnji Cooper $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 5403*132f818dSEnji Cooper fi 5404*132f818dSEnji Cooper ;; 5405*132f818dSEnji Cooper esac 5406*132f818dSEnji Cooper else 5407*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 5408*132f818dSEnji Cooper fi 5409*132f818dSEnji Cooper ;; 5410*132f818dSEnji Cooper 5411*132f818dSEnji Cooper *-mlibc) 5412*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5413*132f818dSEnji Cooper _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' 5414*132f818dSEnji Cooper ;; 5415*132f818dSEnji Cooper 5416*132f818dSEnji Cooper netbsd* | netbsdelf*-gnu) 5417*132f818dSEnji Cooper if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5418*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5419*132f818dSEnji Cooper wlarc= 5420*132f818dSEnji Cooper else 5421*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5422*132f818dSEnji Cooper _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' 5423*132f818dSEnji Cooper fi 5424*132f818dSEnji Cooper ;; 5425*132f818dSEnji Cooper 5426*132f818dSEnji Cooper solaris*) 5427*132f818dSEnji Cooper if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 5428*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 5429*132f818dSEnji Cooper cat <<_LT_EOF 1>&2 5430*132f818dSEnji Cooper 5431*132f818dSEnji Cooper*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5432*132f818dSEnji Cooper*** create shared libraries on Solaris systems. Therefore, libtool 5433*132f818dSEnji Cooper*** is disabling shared libraries support. We urge you to upgrade GNU 5434*132f818dSEnji Cooper*** binutils to release 2.9.1 or newer. Another option is to modify 5435*132f818dSEnji Cooper*** your PATH or compiler configuration so that the native linker is 5436*132f818dSEnji Cooper*** used, and then restart. 5437*132f818dSEnji Cooper 5438*132f818dSEnji Cooper_LT_EOF 5439*132f818dSEnji Cooper elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5440*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5441*132f818dSEnji Cooper _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' 5442*132f818dSEnji Cooper else 5443*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 5444*132f818dSEnji Cooper fi 5445*132f818dSEnji Cooper ;; 5446*132f818dSEnji Cooper 5447*132f818dSEnji Cooper sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5448*132f818dSEnji Cooper case `$LD -v 2>&1` in 5449*132f818dSEnji Cooper *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5450*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 5451*132f818dSEnji Cooper cat <<_LT_EOF 1>&2 5452*132f818dSEnji Cooper 5453*132f818dSEnji Cooper*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 5454*132f818dSEnji Cooper*** reliably create shared libraries on SCO systems. Therefore, libtool 5455*132f818dSEnji Cooper*** is disabling shared libraries support. We urge you to upgrade GNU 5456*132f818dSEnji Cooper*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5457*132f818dSEnji Cooper*** your PATH or compiler configuration so that the native linker is 5458*132f818dSEnji Cooper*** used, and then restart. 5459*132f818dSEnji Cooper 5460*132f818dSEnji Cooper_LT_EOF 5461*132f818dSEnji Cooper ;; 5462*132f818dSEnji Cooper *) 5463*132f818dSEnji Cooper # For security reasons, it is highly recommended that you always 5464*132f818dSEnji Cooper # use absolute paths for naming shared libraries, and exclude the 5465*132f818dSEnji Cooper # DT_RUNPATH tag from executables and libraries. But doing so 5466*132f818dSEnji Cooper # requires that you compile everything twice, which is a pain. 5467*132f818dSEnji Cooper if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5468*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5469*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5470*132f818dSEnji Cooper _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' 5471*132f818dSEnji Cooper else 5472*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 5473*132f818dSEnji Cooper fi 5474*132f818dSEnji Cooper ;; 5475*132f818dSEnji Cooper esac 5476*132f818dSEnji Cooper ;; 5477*132f818dSEnji Cooper 5478*132f818dSEnji Cooper sunos4*) 5479*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5480*132f818dSEnji Cooper wlarc= 5481*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct, $1)=yes 5482*132f818dSEnji Cooper _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5483*132f818dSEnji Cooper ;; 5484*132f818dSEnji Cooper 5485*132f818dSEnji Cooper *) 5486*132f818dSEnji Cooper if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5487*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5488*132f818dSEnji Cooper _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' 5489*132f818dSEnji Cooper else 5490*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 5491*132f818dSEnji Cooper fi 5492*132f818dSEnji Cooper ;; 5493*132f818dSEnji Cooper esac 5494*132f818dSEnji Cooper 5495*132f818dSEnji Cooper if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 5496*132f818dSEnji Cooper runpath_var= 5497*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5498*132f818dSEnji Cooper _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5499*132f818dSEnji Cooper _LT_TAGVAR(whole_archive_flag_spec, $1)= 5500*132f818dSEnji Cooper fi 5501*132f818dSEnji Cooper else 5502*132f818dSEnji Cooper # PORTME fill in a description of your system's linker (not GNU ld) 5503*132f818dSEnji Cooper case $host_os in 5504*132f818dSEnji Cooper aix3*) 5505*132f818dSEnji Cooper _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5506*132f818dSEnji Cooper _LT_TAGVAR(always_export_symbols, $1)=yes 5507*132f818dSEnji Cooper _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' 5508*132f818dSEnji Cooper # Note: this linker hardcodes the directories in LIBPATH if there 5509*132f818dSEnji Cooper # are no directories specified by -L. 5510*132f818dSEnji Cooper _LT_TAGVAR(hardcode_minus_L, $1)=yes 5511*132f818dSEnji Cooper if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 5512*132f818dSEnji Cooper # Neither direct hardcoding nor static linking is supported with a 5513*132f818dSEnji Cooper # broken collect2. 5514*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct, $1)=unsupported 5515*132f818dSEnji Cooper fi 5516*132f818dSEnji Cooper ;; 5517*132f818dSEnji Cooper 5518*132f818dSEnji Cooper aix[[4-9]]*) 5519*132f818dSEnji Cooper if test ia64 = "$host_cpu"; then 5520*132f818dSEnji Cooper # On IA64, the linker does run time linking by default, so we don't 5521*132f818dSEnji Cooper # have to do anything special. 5522*132f818dSEnji Cooper aix_use_runtimelinking=no 5523*132f818dSEnji Cooper exp_sym_flag='-Bexport' 5524*132f818dSEnji Cooper no_entry_flag= 5525*132f818dSEnji Cooper else 5526*132f818dSEnji Cooper # If we're using GNU nm, then we don't want the "-C" option. 5527*132f818dSEnji Cooper # -C means demangle to GNU nm, but means don't demangle to AIX nm. 5528*132f818dSEnji Cooper # Without the "-l" option, or with the "-B" option, AIX nm treats 5529*132f818dSEnji Cooper # weak defined symbols like other global defined symbols, whereas 5530*132f818dSEnji Cooper # GNU nm marks them as "W". 5531*132f818dSEnji Cooper # While the 'weak' keyword is ignored in the Export File, we need 5532*132f818dSEnji Cooper # it in the Import File for the 'aix-soname' feature, so we have 5533*132f818dSEnji Cooper # to replace the "-B" option with "-P" for AIX nm. 5534*132f818dSEnji Cooper if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5535*132f818dSEnji Cooper _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' 5536*132f818dSEnji Cooper else 5537*132f818dSEnji Cooper _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' 5538*132f818dSEnji Cooper fi 5539*132f818dSEnji Cooper aix_use_runtimelinking=no 5540*132f818dSEnji Cooper 5541*132f818dSEnji Cooper # Test if we are trying to use run time linking or normal 5542*132f818dSEnji Cooper # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5543*132f818dSEnji Cooper # have runtime linking enabled, and use it for executables. 5544*132f818dSEnji Cooper # For shared libraries, we enable/disable runtime linking 5545*132f818dSEnji Cooper # depending on the kind of the shared library created - 5546*132f818dSEnji Cooper # when "with_aix_soname,aix_use_runtimelinking" is: 5547*132f818dSEnji Cooper # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 5548*132f818dSEnji Cooper # "aix,yes" lib.so shared, rtl:yes, for executables 5549*132f818dSEnji Cooper # lib.a static archive 5550*132f818dSEnji Cooper # "both,no" lib.so.V(shr.o) shared, rtl:yes 5551*132f818dSEnji Cooper # lib.a(lib.so.V) shared, rtl:no, for executables 5552*132f818dSEnji Cooper # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 5553*132f818dSEnji Cooper # lib.a(lib.so.V) shared, rtl:no 5554*132f818dSEnji Cooper # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 5555*132f818dSEnji Cooper # lib.a static archive 5556*132f818dSEnji Cooper case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5557*132f818dSEnji Cooper for ld_flag in $LDFLAGS; do 5558*132f818dSEnji Cooper if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 5559*132f818dSEnji Cooper aix_use_runtimelinking=yes 5560*132f818dSEnji Cooper break 5561*132f818dSEnji Cooper fi 5562*132f818dSEnji Cooper done 5563*132f818dSEnji Cooper if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 5564*132f818dSEnji Cooper # With aix-soname=svr4, we create the lib.so.V shared archives only, 5565*132f818dSEnji Cooper # so we don't have lib.a shared libs to link our executables. 5566*132f818dSEnji Cooper # We have to force runtime linking in this case. 5567*132f818dSEnji Cooper aix_use_runtimelinking=yes 5568*132f818dSEnji Cooper LDFLAGS="$LDFLAGS -Wl,-brtl" 5569*132f818dSEnji Cooper fi 5570*132f818dSEnji Cooper ;; 5571*132f818dSEnji Cooper esac 5572*132f818dSEnji Cooper 5573*132f818dSEnji Cooper exp_sym_flag='-bexport' 5574*132f818dSEnji Cooper no_entry_flag='-bnoentry' 5575*132f818dSEnji Cooper fi 5576*132f818dSEnji Cooper 5577*132f818dSEnji Cooper # When large executables or shared objects are built, AIX ld can 5578*132f818dSEnji Cooper # have problems creating the table of contents. If linking a library 5579*132f818dSEnji Cooper # or program results in "error TOC overflow" add -mminimal-toc to 5580*132f818dSEnji Cooper # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5581*132f818dSEnji Cooper # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5582*132f818dSEnji Cooper 5583*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='' 5584*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct, $1)=yes 5585*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5586*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5587*132f818dSEnji Cooper _LT_TAGVAR(link_all_deplibs, $1)=yes 5588*132f818dSEnji Cooper _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 5589*132f818dSEnji Cooper case $with_aix_soname,$aix_use_runtimelinking in 5590*132f818dSEnji Cooper aix,*) ;; # traditional, no import file 5591*132f818dSEnji Cooper svr4,* | *,yes) # use import file 5592*132f818dSEnji Cooper # The Import File defines what to hardcode. 5593*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct, $1)=no 5594*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5595*132f818dSEnji Cooper ;; 5596*132f818dSEnji Cooper esac 5597*132f818dSEnji Cooper 5598*132f818dSEnji Cooper if test yes = "$GCC"; then 5599*132f818dSEnji Cooper case $host_os in aix4.[[012]]|aix4.[[012]].*) 5600*132f818dSEnji Cooper # We only want to do this on AIX 4.2 and lower, the check 5601*132f818dSEnji Cooper # below for broken collect2 doesn't work under 4.3+ 5602*132f818dSEnji Cooper collect2name=`$CC -print-prog-name=collect2` 5603*132f818dSEnji Cooper if test -f "$collect2name" && 5604*132f818dSEnji Cooper strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5605*132f818dSEnji Cooper then 5606*132f818dSEnji Cooper # We have reworked collect2 5607*132f818dSEnji Cooper : 5608*132f818dSEnji Cooper else 5609*132f818dSEnji Cooper # We have old collect2 5610*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct, $1)=unsupported 5611*132f818dSEnji Cooper # It fails to find uninstalled libraries when the uninstalled 5612*132f818dSEnji Cooper # path is not listed in the libpath. Setting hardcode_minus_L 5613*132f818dSEnji Cooper # to unsupported forces relinking 5614*132f818dSEnji Cooper _LT_TAGVAR(hardcode_minus_L, $1)=yes 5615*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5616*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_separator, $1)= 5617*132f818dSEnji Cooper fi 5618*132f818dSEnji Cooper ;; 5619*132f818dSEnji Cooper esac 5620*132f818dSEnji Cooper shared_flag='-shared' 5621*132f818dSEnji Cooper if test yes = "$aix_use_runtimelinking"; then 5622*132f818dSEnji Cooper shared_flag="$shared_flag "'$wl-G' 5623*132f818dSEnji Cooper fi 5624*132f818dSEnji Cooper # Need to ensure runtime linking is disabled for the traditional 5625*132f818dSEnji Cooper # shared library, or the linker may eventually find shared libraries 5626*132f818dSEnji Cooper # /with/ Import File - we do not want to mix them. 5627*132f818dSEnji Cooper shared_flag_aix='-shared' 5628*132f818dSEnji Cooper shared_flag_svr4='-shared $wl-G' 5629*132f818dSEnji Cooper else 5630*132f818dSEnji Cooper # not using gcc 5631*132f818dSEnji Cooper if test ia64 = "$host_cpu"; then 5632*132f818dSEnji Cooper # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5633*132f818dSEnji Cooper # chokes on -Wl,-G. The following line is correct: 5634*132f818dSEnji Cooper shared_flag='-G' 5635*132f818dSEnji Cooper else 5636*132f818dSEnji Cooper if test yes = "$aix_use_runtimelinking"; then 5637*132f818dSEnji Cooper shared_flag='$wl-G' 5638*132f818dSEnji Cooper else 5639*132f818dSEnji Cooper shared_flag='$wl-bM:SRE' 5640*132f818dSEnji Cooper fi 5641*132f818dSEnji Cooper shared_flag_aix='$wl-bM:SRE' 5642*132f818dSEnji Cooper shared_flag_svr4='$wl-G' 5643*132f818dSEnji Cooper fi 5644*132f818dSEnji Cooper fi 5645*132f818dSEnji Cooper 5646*132f818dSEnji Cooper _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 5647*132f818dSEnji Cooper # It seems that -bexpall does not export symbols beginning with 5648*132f818dSEnji Cooper # underscore (_), so it is better to generate a list of symbols to export. 5649*132f818dSEnji Cooper _LT_TAGVAR(always_export_symbols, $1)=yes 5650*132f818dSEnji Cooper if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 5651*132f818dSEnji Cooper # Warning - without using the other runtime loading flags (-brtl), 5652*132f818dSEnji Cooper # -berok will link without error, but may produce a broken library. 5653*132f818dSEnji Cooper _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5654*132f818dSEnji Cooper # Determine the default libpath from the value encoded in an 5655*132f818dSEnji Cooper # empty executable. 5656*132f818dSEnji Cooper _LT_SYS_MODULE_PATH_AIX([$1]) 5657*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5658*132f818dSEnji Cooper _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 5659*132f818dSEnji Cooper else 5660*132f818dSEnji Cooper if test ia64 = "$host_cpu"; then 5661*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 5662*132f818dSEnji Cooper _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5663*132f818dSEnji Cooper _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" 5664*132f818dSEnji Cooper else 5665*132f818dSEnji Cooper # Determine the default libpath from the value encoded in an 5666*132f818dSEnji Cooper # empty executable. 5667*132f818dSEnji Cooper _LT_SYS_MODULE_PATH_AIX([$1]) 5668*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5669*132f818dSEnji Cooper # Warning - without using the other run time loading flags, 5670*132f818dSEnji Cooper # -berok will link without error, but may produce a broken library. 5671*132f818dSEnji Cooper _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 5672*132f818dSEnji Cooper _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 5673*132f818dSEnji Cooper if test yes = "$with_gnu_ld"; then 5674*132f818dSEnji Cooper # We only use this code for GNU lds that support --whole-archive. 5675*132f818dSEnji Cooper _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 5676*132f818dSEnji Cooper else 5677*132f818dSEnji Cooper # Exported symbols can be pulled into shared objects from archives 5678*132f818dSEnji Cooper _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5679*132f818dSEnji Cooper fi 5680*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5681*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 5682*132f818dSEnji Cooper # -brtl affects multiple linker settings, -berok does not and is overridden later 5683*132f818dSEnji Cooper compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 5684*132f818dSEnji Cooper if test svr4 != "$with_aix_soname"; then 5685*132f818dSEnji Cooper # This is similar to how AIX traditionally builds its shared libraries. 5686*132f818dSEnji Cooper _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' 5687*132f818dSEnji Cooper fi 5688*132f818dSEnji Cooper if test aix != "$with_aix_soname"; then 5689*132f818dSEnji Cooper _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' 5690*132f818dSEnji Cooper else 5691*132f818dSEnji Cooper # used by -dlpreopen to get the symbols 5692*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 5693*132f818dSEnji Cooper fi 5694*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 5695*132f818dSEnji Cooper fi 5696*132f818dSEnji Cooper fi 5697*132f818dSEnji Cooper ;; 5698*132f818dSEnji Cooper 5699*132f818dSEnji Cooper amigaos*) 5700*132f818dSEnji Cooper case $host_cpu in 5701*132f818dSEnji Cooper powerpc) 5702*132f818dSEnji Cooper # see comment about AmigaOS4 .so support 5703*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5704*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)='' 5705*132f818dSEnji Cooper ;; 5706*132f818dSEnji Cooper m68k) 5707*132f818dSEnji Cooper _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)' 5708*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5709*132f818dSEnji Cooper _LT_TAGVAR(hardcode_minus_L, $1)=yes 5710*132f818dSEnji Cooper ;; 5711*132f818dSEnji Cooper esac 5712*132f818dSEnji Cooper ;; 5713*132f818dSEnji Cooper 5714*132f818dSEnji Cooper bsdi[[45]]*) 5715*132f818dSEnji Cooper _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5716*132f818dSEnji Cooper ;; 5717*132f818dSEnji Cooper 5718*132f818dSEnji Cooper cygwin* | mingw* | windows* | pw32* | cegcc*) 5719*132f818dSEnji Cooper # When not using gcc, we currently assume that we are using 5720*132f818dSEnji Cooper # Microsoft Visual C++ or Intel C++ Compiler. 5721*132f818dSEnji Cooper # hardcode_libdir_flag_spec is actually meaningless, as there is 5722*132f818dSEnji Cooper # no search path for DLLs. 5723*132f818dSEnji Cooper case $cc_basename in 5724*132f818dSEnji Cooper cl* | icl*) 5725*132f818dSEnji Cooper # Native MSVC or ICC 5726*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5727*132f818dSEnji Cooper _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5728*132f818dSEnji Cooper _LT_TAGVAR(always_export_symbols, $1)=yes 5729*132f818dSEnji Cooper _LT_TAGVAR(file_list_spec, $1)='@' 5730*132f818dSEnji Cooper # Tell ltmain to make .lib files, not .a files. 5731*132f818dSEnji Cooper libext=lib 5732*132f818dSEnji Cooper # Tell ltmain to make .dll files, not .so files. 5733*132f818dSEnji Cooper shrext_cmds=.dll 5734*132f818dSEnji Cooper # FIXME: Setting linknames here is a bad hack. 5735*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -Fe$output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 5736*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5737*132f818dSEnji Cooper cp "$export_symbols" "$output_objdir/$soname.def"; 5738*132f818dSEnji Cooper echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 5739*132f818dSEnji Cooper else 5740*132f818dSEnji Cooper $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 5741*132f818dSEnji Cooper fi~ 5742*132f818dSEnji Cooper $CC -Fe$tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5743*132f818dSEnji Cooper linknames=' 5744*132f818dSEnji Cooper # The linker will not automatically build a static lib if we build a DLL. 5745*132f818dSEnji Cooper # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5746*132f818dSEnji Cooper _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5747*132f818dSEnji Cooper _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5748*132f818dSEnji Cooper _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' 5749*132f818dSEnji Cooper # Don't use ranlib 5750*132f818dSEnji Cooper _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5751*132f818dSEnji Cooper _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5752*132f818dSEnji Cooper lt_tool_outputfile="@TOOL_OUTPUT@"~ 5753*132f818dSEnji Cooper case $lt_outputfile in 5754*132f818dSEnji Cooper *.exe|*.EXE) ;; 5755*132f818dSEnji Cooper *) 5756*132f818dSEnji Cooper lt_outputfile=$lt_outputfile.exe 5757*132f818dSEnji Cooper lt_tool_outputfile=$lt_tool_outputfile.exe 5758*132f818dSEnji Cooper ;; 5759*132f818dSEnji Cooper esac~ 5760*132f818dSEnji Cooper if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 5761*132f818dSEnji Cooper $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5762*132f818dSEnji Cooper $RM "$lt_outputfile.manifest"; 5763*132f818dSEnji Cooper fi' 5764*132f818dSEnji Cooper ;; 5765*132f818dSEnji Cooper *) 5766*132f818dSEnji Cooper # Assume MSVC and ICC wrapper 5767*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5768*132f818dSEnji Cooper _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5769*132f818dSEnji Cooper # Tell ltmain to make .lib files, not .a files. 5770*132f818dSEnji Cooper libext=lib 5771*132f818dSEnji Cooper # Tell ltmain to make .dll files, not .so files. 5772*132f818dSEnji Cooper shrext_cmds=.dll 5773*132f818dSEnji Cooper # FIXME: Setting linknames here is a bad hack. 5774*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5775*132f818dSEnji Cooper # The linker will automatically build a .lib file if we build a DLL. 5776*132f818dSEnji Cooper _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5777*132f818dSEnji Cooper # FIXME: Should let the user specify the lib program. 5778*132f818dSEnji Cooper _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5779*132f818dSEnji Cooper _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5780*132f818dSEnji Cooper ;; 5781*132f818dSEnji Cooper esac 5782*132f818dSEnji Cooper ;; 5783*132f818dSEnji Cooper 5784*132f818dSEnji Cooper darwin* | rhapsody*) 5785*132f818dSEnji Cooper _LT_DARWIN_LINKER_FEATURES($1) 5786*132f818dSEnji Cooper ;; 5787*132f818dSEnji Cooper 5788*132f818dSEnji Cooper dgux*) 5789*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5790*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5791*132f818dSEnji Cooper _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5792*132f818dSEnji Cooper ;; 5793*132f818dSEnji Cooper 5794*132f818dSEnji Cooper # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5795*132f818dSEnji Cooper # support. Future versions do this automatically, but an explicit c++rt0.o 5796*132f818dSEnji Cooper # does not break anything, and helps significantly (at the cost of a little 5797*132f818dSEnji Cooper # extra space). 5798*132f818dSEnji Cooper freebsd2.2*) 5799*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5800*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5801*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct, $1)=yes 5802*132f818dSEnji Cooper _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5803*132f818dSEnji Cooper ;; 5804*132f818dSEnji Cooper 5805*132f818dSEnji Cooper # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5806*132f818dSEnji Cooper freebsd2.*) 5807*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5808*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct, $1)=yes 5809*132f818dSEnji Cooper _LT_TAGVAR(hardcode_minus_L, $1)=yes 5810*132f818dSEnji Cooper _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5811*132f818dSEnji Cooper ;; 5812*132f818dSEnji Cooper 5813*132f818dSEnji Cooper # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5814*132f818dSEnji Cooper freebsd* | dragonfly* | midnightbsd*) 5815*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5816*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5817*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct, $1)=yes 5818*132f818dSEnji Cooper _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5819*132f818dSEnji Cooper ;; 5820*132f818dSEnji Cooper 5821*132f818dSEnji Cooper hpux9*) 5822*132f818dSEnji Cooper if test yes = "$GCC"; then 5823*132f818dSEnji Cooper _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' 5824*132f818dSEnji Cooper else 5825*132f818dSEnji Cooper _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' 5826*132f818dSEnji Cooper fi 5827*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5828*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5829*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct, $1)=yes 5830*132f818dSEnji Cooper 5831*132f818dSEnji Cooper # hardcode_minus_L: Not really in the search PATH, 5832*132f818dSEnji Cooper # but as the default location of the library. 5833*132f818dSEnji Cooper _LT_TAGVAR(hardcode_minus_L, $1)=yes 5834*132f818dSEnji Cooper _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5835*132f818dSEnji Cooper ;; 5836*132f818dSEnji Cooper 5837*132f818dSEnji Cooper hpux10*) 5838*132f818dSEnji Cooper if test yes,no = "$GCC,$with_gnu_ld"; then 5839*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5840*132f818dSEnji Cooper else 5841*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5842*132f818dSEnji Cooper fi 5843*132f818dSEnji Cooper if test no = "$with_gnu_ld"; then 5844*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5845*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5846*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct, $1)=yes 5847*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5848*132f818dSEnji Cooper _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5849*132f818dSEnji Cooper # hardcode_minus_L: Not really in the search PATH, 5850*132f818dSEnji Cooper # but as the default location of the library. 5851*132f818dSEnji Cooper _LT_TAGVAR(hardcode_minus_L, $1)=yes 5852*132f818dSEnji Cooper fi 5853*132f818dSEnji Cooper ;; 5854*132f818dSEnji Cooper 5855*132f818dSEnji Cooper hpux11*) 5856*132f818dSEnji Cooper if test yes,no = "$GCC,$with_gnu_ld"; then 5857*132f818dSEnji Cooper case $host_cpu in 5858*132f818dSEnji Cooper hppa*64*) 5859*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5860*132f818dSEnji Cooper ;; 5861*132f818dSEnji Cooper ia64*) 5862*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5863*132f818dSEnji Cooper ;; 5864*132f818dSEnji Cooper *) 5865*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5866*132f818dSEnji Cooper ;; 5867*132f818dSEnji Cooper esac 5868*132f818dSEnji Cooper else 5869*132f818dSEnji Cooper case $host_cpu in 5870*132f818dSEnji Cooper hppa*64*) 5871*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5872*132f818dSEnji Cooper ;; 5873*132f818dSEnji Cooper ia64*) 5874*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5875*132f818dSEnji Cooper ;; 5876*132f818dSEnji Cooper *) 5877*132f818dSEnji Cooper m4_if($1, [], [ 5878*132f818dSEnji Cooper # Older versions of the 11.00 compiler do not understand -b yet 5879*132f818dSEnji Cooper # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5880*132f818dSEnji Cooper _LT_LINKER_OPTION([if $CC understands -b], 5881*132f818dSEnji Cooper _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5882*132f818dSEnji Cooper [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5883*132f818dSEnji Cooper [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5884*132f818dSEnji Cooper [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5885*132f818dSEnji Cooper ;; 5886*132f818dSEnji Cooper esac 5887*132f818dSEnji Cooper fi 5888*132f818dSEnji Cooper if test no = "$with_gnu_ld"; then 5889*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5890*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5891*132f818dSEnji Cooper 5892*132f818dSEnji Cooper case $host_cpu in 5893*132f818dSEnji Cooper hppa*64*|ia64*) 5894*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct, $1)=no 5895*132f818dSEnji Cooper _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5896*132f818dSEnji Cooper ;; 5897*132f818dSEnji Cooper *) 5898*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct, $1)=yes 5899*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5900*132f818dSEnji Cooper _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5901*132f818dSEnji Cooper 5902*132f818dSEnji Cooper # hardcode_minus_L: Not really in the search PATH, 5903*132f818dSEnji Cooper # but as the default location of the library. 5904*132f818dSEnji Cooper _LT_TAGVAR(hardcode_minus_L, $1)=yes 5905*132f818dSEnji Cooper ;; 5906*132f818dSEnji Cooper esac 5907*132f818dSEnji Cooper fi 5908*132f818dSEnji Cooper ;; 5909*132f818dSEnji Cooper 5910*132f818dSEnji Cooper irix5* | irix6* | nonstopux*) 5911*132f818dSEnji Cooper if test yes = "$GCC"; then 5912*132f818dSEnji Cooper _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' 5913*132f818dSEnji Cooper # Try to use the -exported_symbol ld option, if it does not 5914*132f818dSEnji Cooper # work, assume that -exports_file does not work either and 5915*132f818dSEnji Cooper # implicitly export all symbols. 5916*132f818dSEnji Cooper # This should be the same for all languages, so no per-tag cache variable. 5917*132f818dSEnji Cooper AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5918*132f818dSEnji Cooper [lt_cv_irix_exported_symbol], 5919*132f818dSEnji Cooper [save_LDFLAGS=$LDFLAGS 5920*132f818dSEnji Cooper LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 5921*132f818dSEnji Cooper AC_LINK_IFELSE( 5922*132f818dSEnji Cooper [AC_LANG_SOURCE( 5923*132f818dSEnji Cooper [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5924*132f818dSEnji Cooper [C++], [[int foo (void) { return 0; }]], 5925*132f818dSEnji Cooper [Fortran 77], [[ 5926*132f818dSEnji Cooper subroutine foo 5927*132f818dSEnji Cooper end]], 5928*132f818dSEnji Cooper [Fortran], [[ 5929*132f818dSEnji Cooper subroutine foo 5930*132f818dSEnji Cooper end]])])], 5931*132f818dSEnji Cooper [lt_cv_irix_exported_symbol=yes], 5932*132f818dSEnji Cooper [lt_cv_irix_exported_symbol=no]) 5933*132f818dSEnji Cooper LDFLAGS=$save_LDFLAGS]) 5934*132f818dSEnji Cooper if test yes = "$lt_cv_irix_exported_symbol"; then 5935*132f818dSEnji Cooper _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' 5936*132f818dSEnji Cooper fi 5937*132f818dSEnji Cooper else 5938*132f818dSEnji Cooper _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' 5939*132f818dSEnji Cooper _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' 5940*132f818dSEnji Cooper fi 5941*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5942*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5943*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5944*132f818dSEnji Cooper _LT_TAGVAR(inherit_rpath, $1)=yes 5945*132f818dSEnji Cooper _LT_TAGVAR(link_all_deplibs, $1)=yes 5946*132f818dSEnji Cooper ;; 5947*132f818dSEnji Cooper 5948*132f818dSEnji Cooper linux*) 5949*132f818dSEnji Cooper case $cc_basename in 5950*132f818dSEnji Cooper tcc*) 5951*132f818dSEnji Cooper # Fabrice Bellard et al's Tiny C Compiler 5952*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=yes 5953*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5954*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5955*132f818dSEnji Cooper ;; 5956*132f818dSEnji Cooper esac 5957*132f818dSEnji Cooper ;; 5958*132f818dSEnji Cooper 5959*132f818dSEnji Cooper *-mlibc) 5960*132f818dSEnji Cooper ;; 5961*132f818dSEnji Cooper 5962*132f818dSEnji Cooper netbsd* | netbsdelf*-gnu) 5963*132f818dSEnji Cooper if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5964*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5965*132f818dSEnji Cooper else 5966*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5967*132f818dSEnji Cooper fi 5968*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5969*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct, $1)=yes 5970*132f818dSEnji Cooper _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5971*132f818dSEnji Cooper ;; 5972*132f818dSEnji Cooper 5973*132f818dSEnji Cooper newsos6) 5974*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5975*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct, $1)=yes 5976*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5977*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5978*132f818dSEnji Cooper _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5979*132f818dSEnji Cooper ;; 5980*132f818dSEnji Cooper 5981*132f818dSEnji Cooper *nto* | *qnx*) 5982*132f818dSEnji Cooper ;; 5983*132f818dSEnji Cooper 5984*132f818dSEnji Cooper openbsd*) 5985*132f818dSEnji Cooper if test -f /usr/libexec/ld.so; then 5986*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct, $1)=yes 5987*132f818dSEnji Cooper _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5988*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5989*132f818dSEnji Cooper if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 5990*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5991*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 5992*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5993*132f818dSEnji Cooper _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5994*132f818dSEnji Cooper else 5995*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5996*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5997*132f818dSEnji Cooper fi 5998*132f818dSEnji Cooper else 5999*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 6000*132f818dSEnji Cooper fi 6001*132f818dSEnji Cooper ;; 6002*132f818dSEnji Cooper 6003*132f818dSEnji Cooper os2*) 6004*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6005*132f818dSEnji Cooper _LT_TAGVAR(hardcode_minus_L, $1)=yes 6006*132f818dSEnji Cooper _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6007*132f818dSEnji Cooper shrext_cmds=.dll 6008*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6009*132f818dSEnji Cooper $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6010*132f818dSEnji Cooper $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6011*132f818dSEnji Cooper $ECHO EXPORTS >> $output_objdir/$libname.def~ 6012*132f818dSEnji Cooper emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 6013*132f818dSEnji Cooper $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6014*132f818dSEnji Cooper emximp -o $lib $output_objdir/$libname.def' 6015*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6016*132f818dSEnji Cooper $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6017*132f818dSEnji Cooper $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6018*132f818dSEnji Cooper $ECHO EXPORTS >> $output_objdir/$libname.def~ 6019*132f818dSEnji Cooper prefix_cmds="$SED"~ 6020*132f818dSEnji Cooper if test EXPORTS = "`$SED 1q $export_symbols`"; then 6021*132f818dSEnji Cooper prefix_cmds="$prefix_cmds -e 1d"; 6022*132f818dSEnji Cooper fi~ 6023*132f818dSEnji Cooper prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 6024*132f818dSEnji Cooper cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 6025*132f818dSEnji Cooper $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6026*132f818dSEnji Cooper emximp -o $lib $output_objdir/$libname.def' 6027*132f818dSEnji Cooper _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 6028*132f818dSEnji Cooper _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6029*132f818dSEnji Cooper _LT_TAGVAR(file_list_spec, $1)='@' 6030*132f818dSEnji Cooper ;; 6031*132f818dSEnji Cooper 6032*132f818dSEnji Cooper osf3*) 6033*132f818dSEnji Cooper if test yes = "$GCC"; then 6034*132f818dSEnji Cooper _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 6035*132f818dSEnji Cooper _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' 6036*132f818dSEnji Cooper else 6037*132f818dSEnji Cooper _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6038*132f818dSEnji Cooper _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' 6039*132f818dSEnji Cooper fi 6040*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6041*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6042*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6043*132f818dSEnji Cooper ;; 6044*132f818dSEnji Cooper 6045*132f818dSEnji Cooper osf4* | osf5*) # as osf3* with the addition of -msym flag 6046*132f818dSEnji Cooper if test yes = "$GCC"; then 6047*132f818dSEnji Cooper _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 6048*132f818dSEnji Cooper _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' 6049*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6050*132f818dSEnji Cooper else 6051*132f818dSEnji Cooper _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6052*132f818dSEnji Cooper _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' 6053*132f818dSEnji Cooper _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~ 6054*132f818dSEnji Cooper $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' 6055*132f818dSEnji Cooper 6056*132f818dSEnji Cooper # Both c and cxx compiler support -rpath directly 6057*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6058*132f818dSEnji Cooper fi 6059*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6060*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6061*132f818dSEnji Cooper ;; 6062*132f818dSEnji Cooper 6063*132f818dSEnji Cooper serenity*) 6064*132f818dSEnji Cooper ;; 6065*132f818dSEnji Cooper 6066*132f818dSEnji Cooper solaris*) 6067*132f818dSEnji Cooper _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 6068*132f818dSEnji Cooper if test yes = "$GCC"; then 6069*132f818dSEnji Cooper wlarc='$wl' 6070*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 6071*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6072*132f818dSEnji Cooper $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' 6073*132f818dSEnji Cooper else 6074*132f818dSEnji Cooper case `$CC -V 2>&1` in 6075*132f818dSEnji Cooper *"Compilers 5.0"*) 6076*132f818dSEnji Cooper wlarc='' 6077*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 6078*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6079*132f818dSEnji Cooper $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 6080*132f818dSEnji Cooper ;; 6081*132f818dSEnji Cooper *) 6082*132f818dSEnji Cooper wlarc='$wl' 6083*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 6084*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6085*132f818dSEnji Cooper $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 6086*132f818dSEnji Cooper ;; 6087*132f818dSEnji Cooper esac 6088*132f818dSEnji Cooper fi 6089*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6090*132f818dSEnji Cooper _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6091*132f818dSEnji Cooper case $host_os in 6092*132f818dSEnji Cooper solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6093*132f818dSEnji Cooper *) 6094*132f818dSEnji Cooper # The compiler driver will combine and reorder linker options, 6095*132f818dSEnji Cooper # but understands '-z linker_flag'. GCC discards it without '$wl', 6096*132f818dSEnji Cooper # but is careful enough not to reorder. 6097*132f818dSEnji Cooper # Supported since Solaris 2.6 (maybe 2.5.1?) 6098*132f818dSEnji Cooper if test yes = "$GCC"; then 6099*132f818dSEnji Cooper _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 6100*132f818dSEnji Cooper else 6101*132f818dSEnji Cooper _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6102*132f818dSEnji Cooper fi 6103*132f818dSEnji Cooper ;; 6104*132f818dSEnji Cooper esac 6105*132f818dSEnji Cooper _LT_TAGVAR(link_all_deplibs, $1)=yes 6106*132f818dSEnji Cooper ;; 6107*132f818dSEnji Cooper 6108*132f818dSEnji Cooper sunos4*) 6109*132f818dSEnji Cooper if test sequent = "$host_vendor"; then 6110*132f818dSEnji Cooper # Use $CC to link under sequent, because it throws in some extra .o 6111*132f818dSEnji Cooper # files that make .init and .fini sections work. 6112*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 6113*132f818dSEnji Cooper else 6114*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 6115*132f818dSEnji Cooper fi 6116*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6117*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct, $1)=yes 6118*132f818dSEnji Cooper _LT_TAGVAR(hardcode_minus_L, $1)=yes 6119*132f818dSEnji Cooper _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6120*132f818dSEnji Cooper ;; 6121*132f818dSEnji Cooper 6122*132f818dSEnji Cooper sysv4) 6123*132f818dSEnji Cooper case $host_vendor in 6124*132f818dSEnji Cooper sni) 6125*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6126*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 6127*132f818dSEnji Cooper ;; 6128*132f818dSEnji Cooper siemens) 6129*132f818dSEnji Cooper ## LD is ld it makes a PLAMLIB 6130*132f818dSEnji Cooper ## CC just makes a GrossModule. 6131*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 6132*132f818dSEnji Cooper _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 6133*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct, $1)=no 6134*132f818dSEnji Cooper ;; 6135*132f818dSEnji Cooper motorola) 6136*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6137*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 6138*132f818dSEnji Cooper ;; 6139*132f818dSEnji Cooper esac 6140*132f818dSEnji Cooper runpath_var='LD_RUN_PATH' 6141*132f818dSEnji Cooper _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6142*132f818dSEnji Cooper ;; 6143*132f818dSEnji Cooper 6144*132f818dSEnji Cooper sysv4.3*) 6145*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6146*132f818dSEnji Cooper _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6147*132f818dSEnji Cooper _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6148*132f818dSEnji Cooper ;; 6149*132f818dSEnji Cooper 6150*132f818dSEnji Cooper sysv4*MP*) 6151*132f818dSEnji Cooper if test -d /usr/nec; then 6152*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6153*132f818dSEnji Cooper _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6154*132f818dSEnji Cooper runpath_var=LD_RUN_PATH 6155*132f818dSEnji Cooper hardcode_runpath_var=yes 6156*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=yes 6157*132f818dSEnji Cooper fi 6158*132f818dSEnji Cooper ;; 6159*132f818dSEnji Cooper 6160*132f818dSEnji Cooper sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6161*132f818dSEnji Cooper _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6162*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6163*132f818dSEnji Cooper _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6164*132f818dSEnji Cooper runpath_var='LD_RUN_PATH' 6165*132f818dSEnji Cooper 6166*132f818dSEnji Cooper if test yes = "$GCC"; then 6167*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6168*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6169*132f818dSEnji Cooper else 6170*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6171*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6172*132f818dSEnji Cooper fi 6173*132f818dSEnji Cooper ;; 6174*132f818dSEnji Cooper 6175*132f818dSEnji Cooper sysv5* | sco3.2v5* | sco5v6*) 6176*132f818dSEnji Cooper # Note: We CANNOT use -z defs as we might desire, because we do not 6177*132f818dSEnji Cooper # link with -lc, and that would cause any symbols used from libc to 6178*132f818dSEnji Cooper # always be unresolved, which means just about no library would 6179*132f818dSEnji Cooper # ever link correctly. If we're not using GNU ld we use -z text 6180*132f818dSEnji Cooper # though, which does catch some bad symbols but isn't as heavy-handed 6181*132f818dSEnji Cooper # as -z defs. 6182*132f818dSEnji Cooper _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6183*132f818dSEnji Cooper _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 6184*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6185*132f818dSEnji Cooper _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6186*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 6187*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6188*132f818dSEnji Cooper _LT_TAGVAR(link_all_deplibs, $1)=yes 6189*132f818dSEnji Cooper _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 6190*132f818dSEnji Cooper runpath_var='LD_RUN_PATH' 6191*132f818dSEnji Cooper 6192*132f818dSEnji Cooper if test yes = "$GCC"; then 6193*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6194*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6195*132f818dSEnji Cooper else 6196*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6197*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6198*132f818dSEnji Cooper fi 6199*132f818dSEnji Cooper ;; 6200*132f818dSEnji Cooper 6201*132f818dSEnji Cooper uts4*) 6202*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6203*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6204*132f818dSEnji Cooper _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6205*132f818dSEnji Cooper ;; 6206*132f818dSEnji Cooper 6207*132f818dSEnji Cooper *) 6208*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 6209*132f818dSEnji Cooper ;; 6210*132f818dSEnji Cooper esac 6211*132f818dSEnji Cooper 6212*132f818dSEnji Cooper if test sni = "$host_vendor"; then 6213*132f818dSEnji Cooper case $host in 6214*132f818dSEnji Cooper sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6215*132f818dSEnji Cooper _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 6216*132f818dSEnji Cooper ;; 6217*132f818dSEnji Cooper esac 6218*132f818dSEnji Cooper fi 6219*132f818dSEnji Cooper fi 6220*132f818dSEnji Cooper]) 6221*132f818dSEnji CooperAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6222*132f818dSEnji Coopertest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 6223*132f818dSEnji Cooper 6224*132f818dSEnji Cooper_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6225*132f818dSEnji Cooper 6226*132f818dSEnji Cooper_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 6227*132f818dSEnji Cooper_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 6228*132f818dSEnji Cooper_LT_DECL([], [extract_expsyms_cmds], [2], 6229*132f818dSEnji Cooper [The commands to extract the exported symbol list from a shared archive]) 6230*132f818dSEnji Cooper 6231*132f818dSEnji Cooper# 6232*132f818dSEnji Cooper# Do we need to explicitly link libc? 6233*132f818dSEnji Cooper# 6234*132f818dSEnji Coopercase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 6235*132f818dSEnji Cooperx|xyes) 6236*132f818dSEnji Cooper # Assume -lc should be added 6237*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6238*132f818dSEnji Cooper 6239*132f818dSEnji Cooper if test yes,yes = "$GCC,$enable_shared"; then 6240*132f818dSEnji Cooper case $_LT_TAGVAR(archive_cmds, $1) in 6241*132f818dSEnji Cooper *'~'*) 6242*132f818dSEnji Cooper # FIXME: we may have to deal with multi-command sequences. 6243*132f818dSEnji Cooper ;; 6244*132f818dSEnji Cooper '$CC '*) 6245*132f818dSEnji Cooper # Test whether the compiler implicitly links with -lc since on some 6246*132f818dSEnji Cooper # systems, -lgcc has to come before -lc. If gcc already passes -lc 6247*132f818dSEnji Cooper # to ld, don't add -lc before -lgcc. 6248*132f818dSEnji Cooper AC_CACHE_CHECK([whether -lc should be explicitly linked in], 6249*132f818dSEnji Cooper [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 6250*132f818dSEnji Cooper [$RM conftest* 6251*132f818dSEnji Cooper echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6252*132f818dSEnji Cooper 6253*132f818dSEnji Cooper if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6254*132f818dSEnji Cooper soname=conftest 6255*132f818dSEnji Cooper lib=conftest 6256*132f818dSEnji Cooper libobjs=conftest.$ac_objext 6257*132f818dSEnji Cooper deplibs= 6258*132f818dSEnji Cooper wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 6259*132f818dSEnji Cooper pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 6260*132f818dSEnji Cooper compiler_flags=-v 6261*132f818dSEnji Cooper linker_flags=-v 6262*132f818dSEnji Cooper verstring= 6263*132f818dSEnji Cooper output_objdir=. 6264*132f818dSEnji Cooper libname=conftest 6265*132f818dSEnji Cooper lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 6266*132f818dSEnji Cooper _LT_TAGVAR(allow_undefined_flag, $1)= 6267*132f818dSEnji Cooper if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 6268*132f818dSEnji Cooper then 6269*132f818dSEnji Cooper lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6270*132f818dSEnji Cooper else 6271*132f818dSEnji Cooper lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6272*132f818dSEnji Cooper fi 6273*132f818dSEnji Cooper _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6274*132f818dSEnji Cooper else 6275*132f818dSEnji Cooper cat conftest.err 1>&5 6276*132f818dSEnji Cooper fi 6277*132f818dSEnji Cooper $RM conftest* 6278*132f818dSEnji Cooper ]) 6279*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6280*132f818dSEnji Cooper ;; 6281*132f818dSEnji Cooper esac 6282*132f818dSEnji Cooper fi 6283*132f818dSEnji Cooper ;; 6284*132f818dSEnji Cooperesac 6285*132f818dSEnji Cooper 6286*132f818dSEnji Cooper_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 6287*132f818dSEnji Cooper [Whether or not to add -lc for building shared libraries]) 6288*132f818dSEnji Cooper_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 6289*132f818dSEnji Cooper [enable_shared_with_static_runtimes], [0], 6290*132f818dSEnji Cooper [Whether or not to disallow shared libs when runtime libs are static]) 6291*132f818dSEnji Cooper_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 6292*132f818dSEnji Cooper [Compiler flag to allow reflexive dlopens]) 6293*132f818dSEnji Cooper_LT_TAGDECL([], [whole_archive_flag_spec], [1], 6294*132f818dSEnji Cooper [Compiler flag to generate shared objects directly from archives]) 6295*132f818dSEnji Cooper_LT_TAGDECL([], [compiler_needs_object], [1], 6296*132f818dSEnji Cooper [Whether the compiler copes with passing no objects directly]) 6297*132f818dSEnji Cooper_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 6298*132f818dSEnji Cooper [Create an old-style archive from a shared archive]) 6299*132f818dSEnji Cooper_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 6300*132f818dSEnji Cooper [Create a temporary old-style archive to link instead of a shared archive]) 6301*132f818dSEnji Cooper_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 6302*132f818dSEnji Cooper_LT_TAGDECL([], [archive_expsym_cmds], [2]) 6303*132f818dSEnji Cooper_LT_TAGDECL([], [module_cmds], [2], 6304*132f818dSEnji Cooper [Commands used to build a loadable module if different from building 6305*132f818dSEnji Cooper a shared archive.]) 6306*132f818dSEnji Cooper_LT_TAGDECL([], [module_expsym_cmds], [2]) 6307*132f818dSEnji Cooper_LT_TAGDECL([], [with_gnu_ld], [1], 6308*132f818dSEnji Cooper [Whether we are building with GNU ld or not]) 6309*132f818dSEnji Cooper_LT_TAGDECL([], [allow_undefined_flag], [1], 6310*132f818dSEnji Cooper [Flag that allows shared libraries with undefined symbols to be built]) 6311*132f818dSEnji Cooper_LT_TAGDECL([], [no_undefined_flag], [1], 6312*132f818dSEnji Cooper [Flag that enforces no undefined symbols]) 6313*132f818dSEnji Cooper_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 6314*132f818dSEnji Cooper [Flag to hardcode $libdir into a binary during linking. 6315*132f818dSEnji Cooper This must work even if $libdir does not exist]) 6316*132f818dSEnji Cooper_LT_TAGDECL([], [hardcode_libdir_separator], [1], 6317*132f818dSEnji Cooper [Whether we need a single "-rpath" flag with a separated argument]) 6318*132f818dSEnji Cooper_LT_TAGDECL([], [hardcode_direct], [0], 6319*132f818dSEnji Cooper [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6320*132f818dSEnji Cooper DIR into the resulting binary]) 6321*132f818dSEnji Cooper_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6322*132f818dSEnji Cooper [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6323*132f818dSEnji Cooper DIR into the resulting binary and the resulting library dependency is 6324*132f818dSEnji Cooper "absolute", i.e. impossible to change by setting $shlibpath_var if the 6325*132f818dSEnji Cooper library is relocated]) 6326*132f818dSEnji Cooper_LT_TAGDECL([], [hardcode_minus_L], [0], 6327*132f818dSEnji Cooper [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 6328*132f818dSEnji Cooper into the resulting binary]) 6329*132f818dSEnji Cooper_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 6330*132f818dSEnji Cooper [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 6331*132f818dSEnji Cooper into the resulting binary]) 6332*132f818dSEnji Cooper_LT_TAGDECL([], [hardcode_automatic], [0], 6333*132f818dSEnji Cooper [Set to "yes" if building a shared library automatically hardcodes DIR 6334*132f818dSEnji Cooper into the library and all subsequent libraries and executables linked 6335*132f818dSEnji Cooper against it]) 6336*132f818dSEnji Cooper_LT_TAGDECL([], [inherit_rpath], [0], 6337*132f818dSEnji Cooper [Set to yes if linker adds runtime paths of dependent libraries 6338*132f818dSEnji Cooper to runtime path list]) 6339*132f818dSEnji Cooper_LT_TAGDECL([], [link_all_deplibs], [0], 6340*132f818dSEnji Cooper [Whether libtool must link a program against all its dependency libraries]) 6341*132f818dSEnji Cooper_LT_TAGDECL([], [always_export_symbols], [0], 6342*132f818dSEnji Cooper [Set to "yes" if exported symbols are required]) 6343*132f818dSEnji Cooper_LT_TAGDECL([], [export_symbols_cmds], [2], 6344*132f818dSEnji Cooper [The commands to list exported symbols]) 6345*132f818dSEnji Cooper_LT_TAGDECL([], [exclude_expsyms], [1], 6346*132f818dSEnji Cooper [Symbols that should not be listed in the preloaded symbols]) 6347*132f818dSEnji Cooper_LT_TAGDECL([], [include_expsyms], [1], 6348*132f818dSEnji Cooper [Symbols that must always be exported]) 6349*132f818dSEnji Cooper_LT_TAGDECL([], [prelink_cmds], [2], 6350*132f818dSEnji Cooper [Commands necessary for linking programs (against libraries) with templates]) 6351*132f818dSEnji Cooper_LT_TAGDECL([], [postlink_cmds], [2], 6352*132f818dSEnji Cooper [Commands necessary for finishing linking programs]) 6353*132f818dSEnji Cooper_LT_TAGDECL([], [file_list_spec], [1], 6354*132f818dSEnji Cooper [Specify filename containing input files]) 6355*132f818dSEnji Cooperdnl FIXME: Not yet implemented 6356*132f818dSEnji Cooperdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 6357*132f818dSEnji Cooperdnl [Compiler flag to generate thread safe objects]) 6358*132f818dSEnji Cooper])# _LT_LINKER_SHLIBS 6359*132f818dSEnji Cooper 6360*132f818dSEnji Cooper 6361*132f818dSEnji Cooper# _LT_LANG_C_CONFIG([TAG]) 6362*132f818dSEnji Cooper# ------------------------ 6363*132f818dSEnji Cooper# Ensure that the configuration variables for a C compiler are suitably 6364*132f818dSEnji Cooper# defined. These variables are subsequently used by _LT_CONFIG to write 6365*132f818dSEnji Cooper# the compiler configuration to 'libtool'. 6366*132f818dSEnji Cooperm4_defun([_LT_LANG_C_CONFIG], 6367*132f818dSEnji Cooper[m4_require([_LT_DECL_EGREP])dnl 6368*132f818dSEnji Cooperlt_save_CC=$CC 6369*132f818dSEnji CooperAC_LANG_PUSH(C) 6370*132f818dSEnji Cooper 6371*132f818dSEnji Cooper# Source file extension for C test sources. 6372*132f818dSEnji Cooperac_ext=c 6373*132f818dSEnji Cooper 6374*132f818dSEnji Cooper# Object file extension for compiled C test sources. 6375*132f818dSEnji Cooperobjext=o 6376*132f818dSEnji Cooper_LT_TAGVAR(objext, $1)=$objext 6377*132f818dSEnji Cooper 6378*132f818dSEnji Cooper# Code to be used in simple compile tests 6379*132f818dSEnji Cooperlt_simple_compile_test_code="int some_variable = 0;" 6380*132f818dSEnji Cooper 6381*132f818dSEnji Cooper# Code to be used in simple link tests 6382*132f818dSEnji Cooperlt_simple_link_test_code='int main(void){return(0);}' 6383*132f818dSEnji Cooper 6384*132f818dSEnji Cooper_LT_TAG_COMPILER 6385*132f818dSEnji Cooper# Save the default compiler, since it gets overwritten when the other 6386*132f818dSEnji Cooper# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 6387*132f818dSEnji Coopercompiler_DEFAULT=$CC 6388*132f818dSEnji Cooper 6389*132f818dSEnji Cooper# save warnings/boilerplate of simple test code 6390*132f818dSEnji Cooper_LT_COMPILER_BOILERPLATE 6391*132f818dSEnji Cooper_LT_LINKER_BOILERPLATE 6392*132f818dSEnji Cooper 6393*132f818dSEnji Cooper## CAVEAT EMPTOR: 6394*132f818dSEnji Cooper## There is no encapsulation within the following macros, do not change 6395*132f818dSEnji Cooper## the running order or otherwise move them around unless you know exactly 6396*132f818dSEnji Cooper## what you are doing... 6397*132f818dSEnji Cooperif test -n "$compiler"; then 6398*132f818dSEnji Cooper _LT_COMPILER_NO_RTTI($1) 6399*132f818dSEnji Cooper _LT_COMPILER_PIC($1) 6400*132f818dSEnji Cooper _LT_COMPILER_C_O($1) 6401*132f818dSEnji Cooper _LT_COMPILER_FILE_LOCKS($1) 6402*132f818dSEnji Cooper _LT_LINKER_SHLIBS($1) 6403*132f818dSEnji Cooper _LT_SYS_DYNAMIC_LINKER($1) 6404*132f818dSEnji Cooper _LT_LINKER_HARDCODE_LIBPATH($1) 6405*132f818dSEnji Cooper LT_SYS_DLOPEN_SELF 6406*132f818dSEnji Cooper _LT_CMD_STRIPLIB 6407*132f818dSEnji Cooper 6408*132f818dSEnji Cooper # Report what library types will actually be built 6409*132f818dSEnji Cooper AC_MSG_CHECKING([if libtool supports shared libraries]) 6410*132f818dSEnji Cooper AC_MSG_RESULT([$can_build_shared]) 6411*132f818dSEnji Cooper 6412*132f818dSEnji Cooper AC_MSG_CHECKING([whether to build shared libraries]) 6413*132f818dSEnji Cooper test no = "$can_build_shared" && enable_shared=no 6414*132f818dSEnji Cooper 6415*132f818dSEnji Cooper # On AIX, shared libraries and static libraries use the same namespace, and 6416*132f818dSEnji Cooper # are all built from PIC. 6417*132f818dSEnji Cooper case $host_os in 6418*132f818dSEnji Cooper aix3*) 6419*132f818dSEnji Cooper test yes = "$enable_shared" && enable_static=no 6420*132f818dSEnji Cooper if test -n "$RANLIB"; then 6421*132f818dSEnji Cooper archive_cmds="$archive_cmds~\$RANLIB \$lib" 6422*132f818dSEnji Cooper postinstall_cmds='$RANLIB $lib' 6423*132f818dSEnji Cooper fi 6424*132f818dSEnji Cooper ;; 6425*132f818dSEnji Cooper 6426*132f818dSEnji Cooper aix[[4-9]]*) 6427*132f818dSEnji Cooper if test ia64 != "$host_cpu"; then 6428*132f818dSEnji Cooper case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 6429*132f818dSEnji Cooper yes,aix,yes) ;; # shared object as lib.so file only 6430*132f818dSEnji Cooper yes,svr4,*) ;; # shared object as lib.so archive member only 6431*132f818dSEnji Cooper yes,*) enable_static=no ;; # shared object in lib.a archive as well 6432*132f818dSEnji Cooper esac 6433*132f818dSEnji Cooper fi 6434*132f818dSEnji Cooper ;; 6435*132f818dSEnji Cooper esac 6436*132f818dSEnji Cooper AC_MSG_RESULT([$enable_shared]) 6437*132f818dSEnji Cooper 6438*132f818dSEnji Cooper AC_MSG_CHECKING([whether to build static libraries]) 6439*132f818dSEnji Cooper # Make sure either enable_shared or enable_static is yes. 6440*132f818dSEnji Cooper test yes = "$enable_shared" || enable_static=yes 6441*132f818dSEnji Cooper AC_MSG_RESULT([$enable_static]) 6442*132f818dSEnji Cooper 6443*132f818dSEnji Cooper _LT_CONFIG($1) 6444*132f818dSEnji Cooperfi 6445*132f818dSEnji CooperAC_LANG_POP 6446*132f818dSEnji CooperCC=$lt_save_CC 6447*132f818dSEnji Cooper])# _LT_LANG_C_CONFIG 6448*132f818dSEnji Cooper 6449*132f818dSEnji Cooper 6450*132f818dSEnji Cooper# _LT_LANG_CXX_CONFIG([TAG]) 6451*132f818dSEnji Cooper# -------------------------- 6452*132f818dSEnji Cooper# Ensure that the configuration variables for a C++ compiler are suitably 6453*132f818dSEnji Cooper# defined. These variables are subsequently used by _LT_CONFIG to write 6454*132f818dSEnji Cooper# the compiler configuration to 'libtool'. 6455*132f818dSEnji Cooperm4_defun([_LT_LANG_CXX_CONFIG], 6456*132f818dSEnji Cooper[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6457*132f818dSEnji Cooperm4_require([_LT_DECL_EGREP])dnl 6458*132f818dSEnji Cooperm4_require([_LT_PATH_MANIFEST_TOOL])dnl 6459*132f818dSEnji Cooperif test -n "$CXX" && ( test no != "$CXX" && 6460*132f818dSEnji Cooper ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 6461*132f818dSEnji Cooper (test g++ != "$CXX"))); then 6462*132f818dSEnji Cooper AC_PROG_CXXCPP 6463*132f818dSEnji Cooperelse 6464*132f818dSEnji Cooper _lt_caught_CXX_error=yes 6465*132f818dSEnji Cooperfi 6466*132f818dSEnji Cooper 6467*132f818dSEnji CooperAC_LANG_PUSH(C++) 6468*132f818dSEnji Cooper_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6469*132f818dSEnji Cooper_LT_TAGVAR(allow_undefined_flag, $1)= 6470*132f818dSEnji Cooper_LT_TAGVAR(always_export_symbols, $1)=no 6471*132f818dSEnji Cooper_LT_TAGVAR(archive_expsym_cmds, $1)= 6472*132f818dSEnji Cooper_LT_TAGVAR(compiler_needs_object, $1)=no 6473*132f818dSEnji Cooper_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6474*132f818dSEnji Cooper_LT_TAGVAR(hardcode_direct, $1)=no 6475*132f818dSEnji Cooper_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6476*132f818dSEnji Cooper_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6477*132f818dSEnji Cooper_LT_TAGVAR(hardcode_libdir_separator, $1)= 6478*132f818dSEnji Cooper_LT_TAGVAR(hardcode_minus_L, $1)=no 6479*132f818dSEnji Cooper_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6480*132f818dSEnji Cooper_LT_TAGVAR(hardcode_automatic, $1)=no 6481*132f818dSEnji Cooper_LT_TAGVAR(inherit_rpath, $1)=no 6482*132f818dSEnji Cooper_LT_TAGVAR(module_cmds, $1)= 6483*132f818dSEnji Cooper_LT_TAGVAR(module_expsym_cmds, $1)= 6484*132f818dSEnji Cooper_LT_TAGVAR(link_all_deplibs, $1)=unknown 6485*132f818dSEnji Cooper_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6486*132f818dSEnji Cooper_LT_TAGVAR(reload_flag, $1)=$reload_flag 6487*132f818dSEnji Cooper_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6488*132f818dSEnji Cooper_LT_TAGVAR(no_undefined_flag, $1)= 6489*132f818dSEnji Cooper_LT_TAGVAR(whole_archive_flag_spec, $1)= 6490*132f818dSEnji Cooper_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6491*132f818dSEnji Cooper 6492*132f818dSEnji Cooper# Source file extension for C++ test sources. 6493*132f818dSEnji Cooperac_ext=cpp 6494*132f818dSEnji Cooper 6495*132f818dSEnji Cooper# Object file extension for compiled C++ test sources. 6496*132f818dSEnji Cooperobjext=o 6497*132f818dSEnji Cooper_LT_TAGVAR(objext, $1)=$objext 6498*132f818dSEnji Cooper 6499*132f818dSEnji Cooper# No sense in running all these tests if we already determined that 6500*132f818dSEnji Cooper# the CXX compiler isn't working. Some variables (like enable_shared) 6501*132f818dSEnji Cooper# are currently assumed to apply to all compilers on this platform, 6502*132f818dSEnji Cooper# and will be corrupted by setting them based on a non-working compiler. 6503*132f818dSEnji Cooperif test yes != "$_lt_caught_CXX_error"; then 6504*132f818dSEnji Cooper # Code to be used in simple compile tests 6505*132f818dSEnji Cooper lt_simple_compile_test_code="int some_variable = 0;" 6506*132f818dSEnji Cooper 6507*132f818dSEnji Cooper # Code to be used in simple link tests 6508*132f818dSEnji Cooper lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 6509*132f818dSEnji Cooper 6510*132f818dSEnji Cooper # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6511*132f818dSEnji Cooper _LT_TAG_COMPILER 6512*132f818dSEnji Cooper 6513*132f818dSEnji Cooper # save warnings/boilerplate of simple test code 6514*132f818dSEnji Cooper _LT_COMPILER_BOILERPLATE 6515*132f818dSEnji Cooper _LT_LINKER_BOILERPLATE 6516*132f818dSEnji Cooper 6517*132f818dSEnji Cooper # Allow CC to be a program name with arguments. 6518*132f818dSEnji Cooper lt_save_CC=$CC 6519*132f818dSEnji Cooper lt_save_CFLAGS=$CFLAGS 6520*132f818dSEnji Cooper lt_save_LD=$LD 6521*132f818dSEnji Cooper lt_save_GCC=$GCC 6522*132f818dSEnji Cooper GCC=$GXX 6523*132f818dSEnji Cooper lt_save_with_gnu_ld=$with_gnu_ld 6524*132f818dSEnji Cooper lt_save_path_LD=$lt_cv_path_LD 6525*132f818dSEnji Cooper if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 6526*132f818dSEnji Cooper lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 6527*132f818dSEnji Cooper else 6528*132f818dSEnji Cooper $as_unset lt_cv_prog_gnu_ld 6529*132f818dSEnji Cooper fi 6530*132f818dSEnji Cooper if test -n "${lt_cv_path_LDCXX+set}"; then 6531*132f818dSEnji Cooper lt_cv_path_LD=$lt_cv_path_LDCXX 6532*132f818dSEnji Cooper else 6533*132f818dSEnji Cooper $as_unset lt_cv_path_LD 6534*132f818dSEnji Cooper fi 6535*132f818dSEnji Cooper test -z "${LDCXX+set}" || LD=$LDCXX 6536*132f818dSEnji Cooper CC=${CXX-"c++"} 6537*132f818dSEnji Cooper CFLAGS=$CXXFLAGS 6538*132f818dSEnji Cooper compiler=$CC 6539*132f818dSEnji Cooper _LT_TAGVAR(compiler, $1)=$CC 6540*132f818dSEnji Cooper _LT_CC_BASENAME([$compiler]) 6541*132f818dSEnji Cooper 6542*132f818dSEnji Cooper if test -n "$compiler"; then 6543*132f818dSEnji Cooper # We don't want -fno-exception when compiling C++ code, so set the 6544*132f818dSEnji Cooper # no_builtin_flag separately 6545*132f818dSEnji Cooper if test yes = "$GXX"; then 6546*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 6547*132f818dSEnji Cooper else 6548*132f818dSEnji Cooper _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 6549*132f818dSEnji Cooper fi 6550*132f818dSEnji Cooper 6551*132f818dSEnji Cooper if test yes = "$GXX"; then 6552*132f818dSEnji Cooper # Set up default GNU C++ configuration 6553*132f818dSEnji Cooper 6554*132f818dSEnji Cooper LT_PATH_LD 6555*132f818dSEnji Cooper 6556*132f818dSEnji Cooper # Check if GNU C++ uses GNU ld as the underlying linker, since the 6557*132f818dSEnji Cooper # archiving commands below assume that GNU ld is being used. 6558*132f818dSEnji Cooper if test yes = "$with_gnu_ld"; then 6559*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6560*132f818dSEnji Cooper _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' 6561*132f818dSEnji Cooper 6562*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6563*132f818dSEnji Cooper _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6564*132f818dSEnji Cooper 6565*132f818dSEnji Cooper # If archive_cmds runs LD, not CC, wlarc should be empty 6566*132f818dSEnji Cooper # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 6567*132f818dSEnji Cooper # investigate it a little bit more. (MM) 6568*132f818dSEnji Cooper wlarc='$wl' 6569*132f818dSEnji Cooper 6570*132f818dSEnji Cooper # ancient GNU ld didn't support --whole-archive et. al. 6571*132f818dSEnji Cooper if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 6572*132f818dSEnji Cooper _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 6573*132f818dSEnji Cooper else 6574*132f818dSEnji Cooper _LT_TAGVAR(whole_archive_flag_spec, $1)= 6575*132f818dSEnji Cooper fi 6576*132f818dSEnji Cooper else 6577*132f818dSEnji Cooper with_gnu_ld=no 6578*132f818dSEnji Cooper wlarc= 6579*132f818dSEnji Cooper 6580*132f818dSEnji Cooper # A generic and very simple default shared library creation 6581*132f818dSEnji Cooper # command for GNU C++ for the case where it uses the native 6582*132f818dSEnji Cooper # linker, instead of GNU ld. If possible, this setting should 6583*132f818dSEnji Cooper # overridden to take advantage of the native linker features on 6584*132f818dSEnji Cooper # the platform it is being used on. 6585*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6586*132f818dSEnji Cooper fi 6587*132f818dSEnji Cooper 6588*132f818dSEnji Cooper # Commands to make compiler produce verbose output that lists 6589*132f818dSEnji Cooper # what "hidden" libraries, object files and flags are used when 6590*132f818dSEnji Cooper # linking a shared library. 6591*132f818dSEnji Cooper output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"' 6592*132f818dSEnji Cooper 6593*132f818dSEnji Cooper else 6594*132f818dSEnji Cooper GXX=no 6595*132f818dSEnji Cooper with_gnu_ld=no 6596*132f818dSEnji Cooper wlarc= 6597*132f818dSEnji Cooper fi 6598*132f818dSEnji Cooper 6599*132f818dSEnji Cooper # PORTME: fill in a description of your system's C++ link characteristics 6600*132f818dSEnji Cooper AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 6601*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=yes 6602*132f818dSEnji Cooper case $host_os in 6603*132f818dSEnji Cooper aix3*) 6604*132f818dSEnji Cooper # FIXME: insert proper C++ library support 6605*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 6606*132f818dSEnji Cooper ;; 6607*132f818dSEnji Cooper aix[[4-9]]*) 6608*132f818dSEnji Cooper if test ia64 = "$host_cpu"; then 6609*132f818dSEnji Cooper # On IA64, the linker does run time linking by default, so we don't 6610*132f818dSEnji Cooper # have to do anything special. 6611*132f818dSEnji Cooper aix_use_runtimelinking=no 6612*132f818dSEnji Cooper exp_sym_flag='-Bexport' 6613*132f818dSEnji Cooper no_entry_flag= 6614*132f818dSEnji Cooper else 6615*132f818dSEnji Cooper aix_use_runtimelinking=no 6616*132f818dSEnji Cooper 6617*132f818dSEnji Cooper # Test if we are trying to use run time linking or normal 6618*132f818dSEnji Cooper # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6619*132f818dSEnji Cooper # have runtime linking enabled, and use it for executables. 6620*132f818dSEnji Cooper # For shared libraries, we enable/disable runtime linking 6621*132f818dSEnji Cooper # depending on the kind of the shared library created - 6622*132f818dSEnji Cooper # when "with_aix_soname,aix_use_runtimelinking" is: 6623*132f818dSEnji Cooper # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 6624*132f818dSEnji Cooper # "aix,yes" lib.so shared, rtl:yes, for executables 6625*132f818dSEnji Cooper # lib.a static archive 6626*132f818dSEnji Cooper # "both,no" lib.so.V(shr.o) shared, rtl:yes 6627*132f818dSEnji Cooper # lib.a(lib.so.V) shared, rtl:no, for executables 6628*132f818dSEnji Cooper # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 6629*132f818dSEnji Cooper # lib.a(lib.so.V) shared, rtl:no 6630*132f818dSEnji Cooper # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 6631*132f818dSEnji Cooper # lib.a static archive 6632*132f818dSEnji Cooper case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6633*132f818dSEnji Cooper for ld_flag in $LDFLAGS; do 6634*132f818dSEnji Cooper case $ld_flag in 6635*132f818dSEnji Cooper *-brtl*) 6636*132f818dSEnji Cooper aix_use_runtimelinking=yes 6637*132f818dSEnji Cooper break 6638*132f818dSEnji Cooper ;; 6639*132f818dSEnji Cooper esac 6640*132f818dSEnji Cooper done 6641*132f818dSEnji Cooper if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 6642*132f818dSEnji Cooper # With aix-soname=svr4, we create the lib.so.V shared archives only, 6643*132f818dSEnji Cooper # so we don't have lib.a shared libs to link our executables. 6644*132f818dSEnji Cooper # We have to force runtime linking in this case. 6645*132f818dSEnji Cooper aix_use_runtimelinking=yes 6646*132f818dSEnji Cooper LDFLAGS="$LDFLAGS -Wl,-brtl" 6647*132f818dSEnji Cooper fi 6648*132f818dSEnji Cooper ;; 6649*132f818dSEnji Cooper esac 6650*132f818dSEnji Cooper 6651*132f818dSEnji Cooper exp_sym_flag='-bexport' 6652*132f818dSEnji Cooper no_entry_flag='-bnoentry' 6653*132f818dSEnji Cooper fi 6654*132f818dSEnji Cooper 6655*132f818dSEnji Cooper # When large executables or shared objects are built, AIX ld can 6656*132f818dSEnji Cooper # have problems creating the table of contents. If linking a library 6657*132f818dSEnji Cooper # or program results in "error TOC overflow" add -mminimal-toc to 6658*132f818dSEnji Cooper # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6659*132f818dSEnji Cooper # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6660*132f818dSEnji Cooper 6661*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='' 6662*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct, $1)=yes 6663*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6664*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6665*132f818dSEnji Cooper _LT_TAGVAR(link_all_deplibs, $1)=yes 6666*132f818dSEnji Cooper _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 6667*132f818dSEnji Cooper case $with_aix_soname,$aix_use_runtimelinking in 6668*132f818dSEnji Cooper aix,*) ;; # no import file 6669*132f818dSEnji Cooper svr4,* | *,yes) # use import file 6670*132f818dSEnji Cooper # The Import File defines what to hardcode. 6671*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct, $1)=no 6672*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct_absolute, $1)=no 6673*132f818dSEnji Cooper ;; 6674*132f818dSEnji Cooper esac 6675*132f818dSEnji Cooper 6676*132f818dSEnji Cooper if test yes = "$GXX"; then 6677*132f818dSEnji Cooper case $host_os in aix4.[[012]]|aix4.[[012]].*) 6678*132f818dSEnji Cooper # We only want to do this on AIX 4.2 and lower, the check 6679*132f818dSEnji Cooper # below for broken collect2 doesn't work under 4.3+ 6680*132f818dSEnji Cooper collect2name=`$CC -print-prog-name=collect2` 6681*132f818dSEnji Cooper if test -f "$collect2name" && 6682*132f818dSEnji Cooper strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6683*132f818dSEnji Cooper then 6684*132f818dSEnji Cooper # We have reworked collect2 6685*132f818dSEnji Cooper : 6686*132f818dSEnji Cooper else 6687*132f818dSEnji Cooper # We have old collect2 6688*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct, $1)=unsupported 6689*132f818dSEnji Cooper # It fails to find uninstalled libraries when the uninstalled 6690*132f818dSEnji Cooper # path is not listed in the libpath. Setting hardcode_minus_L 6691*132f818dSEnji Cooper # to unsupported forces relinking 6692*132f818dSEnji Cooper _LT_TAGVAR(hardcode_minus_L, $1)=yes 6693*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6694*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_separator, $1)= 6695*132f818dSEnji Cooper fi 6696*132f818dSEnji Cooper esac 6697*132f818dSEnji Cooper shared_flag='-shared' 6698*132f818dSEnji Cooper if test yes = "$aix_use_runtimelinking"; then 6699*132f818dSEnji Cooper shared_flag=$shared_flag' $wl-G' 6700*132f818dSEnji Cooper fi 6701*132f818dSEnji Cooper # Need to ensure runtime linking is disabled for the traditional 6702*132f818dSEnji Cooper # shared library, or the linker may eventually find shared libraries 6703*132f818dSEnji Cooper # /with/ Import File - we do not want to mix them. 6704*132f818dSEnji Cooper shared_flag_aix='-shared' 6705*132f818dSEnji Cooper shared_flag_svr4='-shared $wl-G' 6706*132f818dSEnji Cooper else 6707*132f818dSEnji Cooper # not using gcc 6708*132f818dSEnji Cooper if test ia64 = "$host_cpu"; then 6709*132f818dSEnji Cooper # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6710*132f818dSEnji Cooper # chokes on -Wl,-G. The following line is correct: 6711*132f818dSEnji Cooper shared_flag='-G' 6712*132f818dSEnji Cooper else 6713*132f818dSEnji Cooper if test yes = "$aix_use_runtimelinking"; then 6714*132f818dSEnji Cooper shared_flag='$wl-G' 6715*132f818dSEnji Cooper else 6716*132f818dSEnji Cooper shared_flag='$wl-bM:SRE' 6717*132f818dSEnji Cooper fi 6718*132f818dSEnji Cooper shared_flag_aix='$wl-bM:SRE' 6719*132f818dSEnji Cooper shared_flag_svr4='$wl-G' 6720*132f818dSEnji Cooper fi 6721*132f818dSEnji Cooper fi 6722*132f818dSEnji Cooper 6723*132f818dSEnji Cooper _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 6724*132f818dSEnji Cooper # It seems that -bexpall does not export symbols beginning with 6725*132f818dSEnji Cooper # underscore (_), so it is better to generate a list of symbols to 6726*132f818dSEnji Cooper # export. 6727*132f818dSEnji Cooper _LT_TAGVAR(always_export_symbols, $1)=yes 6728*132f818dSEnji Cooper if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 6729*132f818dSEnji Cooper # Warning - without using the other runtime loading flags (-brtl), 6730*132f818dSEnji Cooper # -berok will link without error, but may produce a broken library. 6731*132f818dSEnji Cooper # The "-G" linker flag allows undefined symbols. 6732*132f818dSEnji Cooper _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 6733*132f818dSEnji Cooper # Determine the default libpath from the value encoded in an empty 6734*132f818dSEnji Cooper # executable. 6735*132f818dSEnji Cooper _LT_SYS_MODULE_PATH_AIX([$1]) 6736*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6737*132f818dSEnji Cooper 6738*132f818dSEnji Cooper _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 6739*132f818dSEnji Cooper else 6740*132f818dSEnji Cooper if test ia64 = "$host_cpu"; then 6741*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 6742*132f818dSEnji Cooper _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6743*132f818dSEnji Cooper _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" 6744*132f818dSEnji Cooper else 6745*132f818dSEnji Cooper # Determine the default libpath from the value encoded in an 6746*132f818dSEnji Cooper # empty executable. 6747*132f818dSEnji Cooper _LT_SYS_MODULE_PATH_AIX([$1]) 6748*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6749*132f818dSEnji Cooper # Warning - without using the other run time loading flags, 6750*132f818dSEnji Cooper # -berok will link without error, but may produce a broken library. 6751*132f818dSEnji Cooper _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 6752*132f818dSEnji Cooper _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 6753*132f818dSEnji Cooper if test yes = "$with_gnu_ld"; then 6754*132f818dSEnji Cooper # We only use this code for GNU lds that support --whole-archive. 6755*132f818dSEnji Cooper _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 6756*132f818dSEnji Cooper else 6757*132f818dSEnji Cooper # Exported symbols can be pulled into shared objects from archives 6758*132f818dSEnji Cooper _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6759*132f818dSEnji Cooper fi 6760*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6761*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 6762*132f818dSEnji Cooper # -brtl affects multiple linker settings, -berok does not and is overridden later 6763*132f818dSEnji Cooper compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 6764*132f818dSEnji Cooper if test svr4 != "$with_aix_soname"; then 6765*132f818dSEnji Cooper # This is similar to how AIX traditionally builds its shared 6766*132f818dSEnji Cooper # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 6767*132f818dSEnji Cooper _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' 6768*132f818dSEnji Cooper fi 6769*132f818dSEnji Cooper if test aix != "$with_aix_soname"; then 6770*132f818dSEnji Cooper _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' 6771*132f818dSEnji Cooper else 6772*132f818dSEnji Cooper # used by -dlpreopen to get the symbols 6773*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 6774*132f818dSEnji Cooper fi 6775*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 6776*132f818dSEnji Cooper fi 6777*132f818dSEnji Cooper fi 6778*132f818dSEnji Cooper ;; 6779*132f818dSEnji Cooper 6780*132f818dSEnji Cooper beos*) 6781*132f818dSEnji Cooper if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6782*132f818dSEnji Cooper _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6783*132f818dSEnji Cooper # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6784*132f818dSEnji Cooper # support --undefined. This deserves some investigation. FIXME 6785*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6786*132f818dSEnji Cooper else 6787*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 6788*132f818dSEnji Cooper fi 6789*132f818dSEnji Cooper ;; 6790*132f818dSEnji Cooper 6791*132f818dSEnji Cooper chorus*) 6792*132f818dSEnji Cooper case $cc_basename in 6793*132f818dSEnji Cooper *) 6794*132f818dSEnji Cooper # FIXME: insert proper C++ library support 6795*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 6796*132f818dSEnji Cooper ;; 6797*132f818dSEnji Cooper esac 6798*132f818dSEnji Cooper ;; 6799*132f818dSEnji Cooper 6800*132f818dSEnji Cooper cygwin* | mingw* | windows* | pw32* | cegcc*) 6801*132f818dSEnji Cooper case $GXX,$cc_basename in 6802*132f818dSEnji Cooper ,cl* | no,cl* | ,icl* | no,icl*) 6803*132f818dSEnji Cooper # Native MSVC or ICC 6804*132f818dSEnji Cooper # hardcode_libdir_flag_spec is actually meaningless, as there is 6805*132f818dSEnji Cooper # no search path for DLLs. 6806*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6807*132f818dSEnji Cooper _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6808*132f818dSEnji Cooper _LT_TAGVAR(always_export_symbols, $1)=yes 6809*132f818dSEnji Cooper _LT_TAGVAR(file_list_spec, $1)='@' 6810*132f818dSEnji Cooper # Tell ltmain to make .lib files, not .a files. 6811*132f818dSEnji Cooper libext=lib 6812*132f818dSEnji Cooper # Tell ltmain to make .dll files, not .so files. 6813*132f818dSEnji Cooper shrext_cmds=.dll 6814*132f818dSEnji Cooper # FIXME: Setting linknames here is a bad hack. 6815*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 6816*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6817*132f818dSEnji Cooper cp "$export_symbols" "$output_objdir/$soname.def"; 6818*132f818dSEnji Cooper echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 6819*132f818dSEnji Cooper else 6820*132f818dSEnji Cooper $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 6821*132f818dSEnji Cooper fi~ 6822*132f818dSEnji Cooper $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6823*132f818dSEnji Cooper linknames=' 6824*132f818dSEnji Cooper # The linker will not automatically build a static lib if we build a DLL. 6825*132f818dSEnji Cooper # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6826*132f818dSEnji Cooper _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6827*132f818dSEnji Cooper # Don't use ranlib 6828*132f818dSEnji Cooper _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6829*132f818dSEnji Cooper _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6830*132f818dSEnji Cooper lt_tool_outputfile="@TOOL_OUTPUT@"~ 6831*132f818dSEnji Cooper case $lt_outputfile in 6832*132f818dSEnji Cooper *.exe|*.EXE) ;; 6833*132f818dSEnji Cooper *) 6834*132f818dSEnji Cooper lt_outputfile=$lt_outputfile.exe 6835*132f818dSEnji Cooper lt_tool_outputfile=$lt_tool_outputfile.exe 6836*132f818dSEnji Cooper ;; 6837*132f818dSEnji Cooper esac~ 6838*132f818dSEnji Cooper func_to_tool_file "$lt_outputfile"~ 6839*132f818dSEnji Cooper if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 6840*132f818dSEnji Cooper $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6841*132f818dSEnji Cooper $RM "$lt_outputfile.manifest"; 6842*132f818dSEnji Cooper fi' 6843*132f818dSEnji Cooper ;; 6844*132f818dSEnji Cooper *) 6845*132f818dSEnji Cooper # g++ 6846*132f818dSEnji Cooper # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6847*132f818dSEnji Cooper # as there is no search path for DLLs. 6848*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6849*132f818dSEnji Cooper _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 6850*132f818dSEnji Cooper _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6851*132f818dSEnji Cooper _LT_TAGVAR(always_export_symbols, $1)=no 6852*132f818dSEnji Cooper _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6853*132f818dSEnji Cooper _LT_TAGVAR(file_list_spec, $1)='@' 6854*132f818dSEnji Cooper 6855*132f818dSEnji Cooper if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6856*132f818dSEnji Cooper _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' 6857*132f818dSEnji Cooper # If the export-symbols file already is a .def file, use it as 6858*132f818dSEnji Cooper # is; otherwise, prepend EXPORTS... 6859*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6860*132f818dSEnji Cooper cp $export_symbols $output_objdir/$soname.def; 6861*132f818dSEnji Cooper else 6862*132f818dSEnji Cooper echo EXPORTS > $output_objdir/$soname.def; 6863*132f818dSEnji Cooper cat $export_symbols >> $output_objdir/$soname.def; 6864*132f818dSEnji Cooper fi~ 6865*132f818dSEnji Cooper $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' 6866*132f818dSEnji Cooper else 6867*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 6868*132f818dSEnji Cooper fi 6869*132f818dSEnji Cooper ;; 6870*132f818dSEnji Cooper esac 6871*132f818dSEnji Cooper ;; 6872*132f818dSEnji Cooper darwin* | rhapsody*) 6873*132f818dSEnji Cooper _LT_DARWIN_LINKER_FEATURES($1) 6874*132f818dSEnji Cooper ;; 6875*132f818dSEnji Cooper 6876*132f818dSEnji Cooper os2*) 6877*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6878*132f818dSEnji Cooper _LT_TAGVAR(hardcode_minus_L, $1)=yes 6879*132f818dSEnji Cooper _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6880*132f818dSEnji Cooper shrext_cmds=.dll 6881*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6882*132f818dSEnji Cooper $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6883*132f818dSEnji Cooper $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6884*132f818dSEnji Cooper $ECHO EXPORTS >> $output_objdir/$libname.def~ 6885*132f818dSEnji Cooper emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 6886*132f818dSEnji Cooper $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6887*132f818dSEnji Cooper emximp -o $lib $output_objdir/$libname.def' 6888*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6889*132f818dSEnji Cooper $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6890*132f818dSEnji Cooper $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6891*132f818dSEnji Cooper $ECHO EXPORTS >> $output_objdir/$libname.def~ 6892*132f818dSEnji Cooper prefix_cmds="$SED"~ 6893*132f818dSEnji Cooper if test EXPORTS = "`$SED 1q $export_symbols`"; then 6894*132f818dSEnji Cooper prefix_cmds="$prefix_cmds -e 1d"; 6895*132f818dSEnji Cooper fi~ 6896*132f818dSEnji Cooper prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 6897*132f818dSEnji Cooper cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 6898*132f818dSEnji Cooper $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6899*132f818dSEnji Cooper emximp -o $lib $output_objdir/$libname.def' 6900*132f818dSEnji Cooper _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 6901*132f818dSEnji Cooper _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6902*132f818dSEnji Cooper _LT_TAGVAR(file_list_spec, $1)='@' 6903*132f818dSEnji Cooper ;; 6904*132f818dSEnji Cooper 6905*132f818dSEnji Cooper dgux*) 6906*132f818dSEnji Cooper case $cc_basename in 6907*132f818dSEnji Cooper ec++*) 6908*132f818dSEnji Cooper # FIXME: insert proper C++ library support 6909*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 6910*132f818dSEnji Cooper ;; 6911*132f818dSEnji Cooper ghcx*) 6912*132f818dSEnji Cooper # Green Hills C++ Compiler 6913*132f818dSEnji Cooper # FIXME: insert proper C++ library support 6914*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 6915*132f818dSEnji Cooper ;; 6916*132f818dSEnji Cooper *) 6917*132f818dSEnji Cooper # FIXME: insert proper C++ library support 6918*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 6919*132f818dSEnji Cooper ;; 6920*132f818dSEnji Cooper esac 6921*132f818dSEnji Cooper ;; 6922*132f818dSEnji Cooper 6923*132f818dSEnji Cooper freebsd2.*) 6924*132f818dSEnji Cooper # C++ shared libraries reported to be fairly broken before 6925*132f818dSEnji Cooper # switch to ELF 6926*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 6927*132f818dSEnji Cooper ;; 6928*132f818dSEnji Cooper 6929*132f818dSEnji Cooper freebsd-elf*) 6930*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6931*132f818dSEnji Cooper ;; 6932*132f818dSEnji Cooper 6933*132f818dSEnji Cooper freebsd* | dragonfly* | midnightbsd*) 6934*132f818dSEnji Cooper # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6935*132f818dSEnji Cooper # conventions 6936*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=yes 6937*132f818dSEnji Cooper ;; 6938*132f818dSEnji Cooper 6939*132f818dSEnji Cooper haiku*) 6940*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6941*132f818dSEnji Cooper _LT_TAGVAR(link_all_deplibs, $1)=no 6942*132f818dSEnji Cooper ;; 6943*132f818dSEnji Cooper 6944*132f818dSEnji Cooper hpux9*) 6945*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6946*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6947*132f818dSEnji Cooper _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6948*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct, $1)=yes 6949*132f818dSEnji Cooper _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6950*132f818dSEnji Cooper # but as the default 6951*132f818dSEnji Cooper # location of the library. 6952*132f818dSEnji Cooper 6953*132f818dSEnji Cooper case $cc_basename in 6954*132f818dSEnji Cooper CC*) 6955*132f818dSEnji Cooper # FIXME: insert proper C++ library support 6956*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 6957*132f818dSEnji Cooper ;; 6958*132f818dSEnji Cooper aCC*) 6959*132f818dSEnji Cooper _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' 6960*132f818dSEnji Cooper # Commands to make compiler produce verbose output that lists 6961*132f818dSEnji Cooper # what "hidden" libraries, object files and flags are used when 6962*132f818dSEnji Cooper # linking a shared library. 6963*132f818dSEnji Cooper # 6964*132f818dSEnji Cooper # There doesn't appear to be a way to prevent this compiler from 6965*132f818dSEnji Cooper # explicitly linking system object files so we need to strip them 6966*132f818dSEnji Cooper # from the output so that they don't get included in the library 6967*132f818dSEnji Cooper # dependencies. 6968*132f818dSEnji Cooper 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"' 6969*132f818dSEnji Cooper ;; 6970*132f818dSEnji Cooper *) 6971*132f818dSEnji Cooper if test yes = "$GXX"; then 6972*132f818dSEnji Cooper _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' 6973*132f818dSEnji Cooper else 6974*132f818dSEnji Cooper # FIXME: insert proper C++ library support 6975*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 6976*132f818dSEnji Cooper fi 6977*132f818dSEnji Cooper ;; 6978*132f818dSEnji Cooper esac 6979*132f818dSEnji Cooper ;; 6980*132f818dSEnji Cooper 6981*132f818dSEnji Cooper hpux10*|hpux11*) 6982*132f818dSEnji Cooper if test no = "$with_gnu_ld"; then 6983*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6984*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6985*132f818dSEnji Cooper 6986*132f818dSEnji Cooper case $host_cpu in 6987*132f818dSEnji Cooper hppa*64*|ia64*) 6988*132f818dSEnji Cooper ;; 6989*132f818dSEnji Cooper *) 6990*132f818dSEnji Cooper _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6991*132f818dSEnji Cooper ;; 6992*132f818dSEnji Cooper esac 6993*132f818dSEnji Cooper fi 6994*132f818dSEnji Cooper case $host_cpu in 6995*132f818dSEnji Cooper hppa*64*|ia64*) 6996*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct, $1)=no 6997*132f818dSEnji Cooper _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6998*132f818dSEnji Cooper ;; 6999*132f818dSEnji Cooper *) 7000*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct, $1)=yes 7001*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7002*132f818dSEnji Cooper _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 7003*132f818dSEnji Cooper # but as the default 7004*132f818dSEnji Cooper # location of the library. 7005*132f818dSEnji Cooper ;; 7006*132f818dSEnji Cooper esac 7007*132f818dSEnji Cooper 7008*132f818dSEnji Cooper case $cc_basename in 7009*132f818dSEnji Cooper CC*) 7010*132f818dSEnji Cooper # FIXME: insert proper C++ library support 7011*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 7012*132f818dSEnji Cooper ;; 7013*132f818dSEnji Cooper aCC*) 7014*132f818dSEnji Cooper case $host_cpu in 7015*132f818dSEnji Cooper hppa*64*) 7016*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7017*132f818dSEnji Cooper ;; 7018*132f818dSEnji Cooper ia64*) 7019*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7020*132f818dSEnji Cooper ;; 7021*132f818dSEnji Cooper *) 7022*132f818dSEnji Cooper _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' 7023*132f818dSEnji Cooper ;; 7024*132f818dSEnji Cooper esac 7025*132f818dSEnji Cooper # Commands to make compiler produce verbose output that lists 7026*132f818dSEnji Cooper # what "hidden" libraries, object files and flags are used when 7027*132f818dSEnji Cooper # linking a shared library. 7028*132f818dSEnji Cooper # 7029*132f818dSEnji Cooper # There doesn't appear to be a way to prevent this compiler from 7030*132f818dSEnji Cooper # explicitly linking system object files so we need to strip them 7031*132f818dSEnji Cooper # from the output so that they don't get included in the library 7032*132f818dSEnji Cooper # dependencies. 7033*132f818dSEnji Cooper 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"' 7034*132f818dSEnji Cooper ;; 7035*132f818dSEnji Cooper *) 7036*132f818dSEnji Cooper if test yes = "$GXX"; then 7037*132f818dSEnji Cooper if test no = "$with_gnu_ld"; then 7038*132f818dSEnji Cooper case $host_cpu in 7039*132f818dSEnji Cooper hppa*64*) 7040*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7041*132f818dSEnji Cooper ;; 7042*132f818dSEnji Cooper ia64*) 7043*132f818dSEnji Cooper _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' 7044*132f818dSEnji Cooper ;; 7045*132f818dSEnji Cooper *) 7046*132f818dSEnji Cooper _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' 7047*132f818dSEnji Cooper ;; 7048*132f818dSEnji Cooper esac 7049*132f818dSEnji Cooper fi 7050*132f818dSEnji Cooper else 7051*132f818dSEnji Cooper # FIXME: insert proper C++ library support 7052*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 7053*132f818dSEnji Cooper fi 7054*132f818dSEnji Cooper ;; 7055*132f818dSEnji Cooper esac 7056*132f818dSEnji Cooper ;; 7057*132f818dSEnji Cooper 7058*132f818dSEnji Cooper interix[[3-9]]*) 7059*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct, $1)=no 7060*132f818dSEnji Cooper _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7061*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7062*132f818dSEnji Cooper _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 7063*132f818dSEnji Cooper # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 7064*132f818dSEnji Cooper # Instead, shared libraries are loaded at an image base (0x10000000 by 7065*132f818dSEnji Cooper # default) and relocated if they conflict, which is a slow very memory 7066*132f818dSEnji Cooper # consuming and fragmenting process. To avoid this, we pick a random, 7067*132f818dSEnji Cooper # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 7068*132f818dSEnji Cooper # time. Moving up from 0x10000000 also allows more sbrk(2) space. 7069*132f818dSEnji Cooper _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' 7070*132f818dSEnji Cooper _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' 7071*132f818dSEnji Cooper ;; 7072*132f818dSEnji Cooper irix5* | irix6*) 7073*132f818dSEnji Cooper case $cc_basename in 7074*132f818dSEnji Cooper CC*) 7075*132f818dSEnji Cooper # SGI C++ 7076*132f818dSEnji Cooper _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' 7077*132f818dSEnji Cooper 7078*132f818dSEnji Cooper # Archives containing C++ object files must be created using 7079*132f818dSEnji Cooper # "CC -ar", where "CC" is the IRIX C++ compiler. This is 7080*132f818dSEnji Cooper # necessary to make sure instantiated templates are included 7081*132f818dSEnji Cooper # in the archive. 7082*132f818dSEnji Cooper _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 7083*132f818dSEnji Cooper ;; 7084*132f818dSEnji Cooper *) 7085*132f818dSEnji Cooper if test yes = "$GXX"; then 7086*132f818dSEnji Cooper if test no = "$with_gnu_ld"; then 7087*132f818dSEnji Cooper _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' 7088*132f818dSEnji Cooper else 7089*132f818dSEnji Cooper _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' 7090*132f818dSEnji Cooper fi 7091*132f818dSEnji Cooper fi 7092*132f818dSEnji Cooper _LT_TAGVAR(link_all_deplibs, $1)=yes 7093*132f818dSEnji Cooper ;; 7094*132f818dSEnji Cooper esac 7095*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7096*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7097*132f818dSEnji Cooper _LT_TAGVAR(inherit_rpath, $1)=yes 7098*132f818dSEnji Cooper ;; 7099*132f818dSEnji Cooper 7100*132f818dSEnji Cooper linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 7101*132f818dSEnji Cooper case $cc_basename in 7102*132f818dSEnji Cooper KCC*) 7103*132f818dSEnji Cooper # Kuck and Associates, Inc. (KAI) C++ Compiler 7104*132f818dSEnji Cooper 7105*132f818dSEnji Cooper # KCC will only create a shared library if the output file 7106*132f818dSEnji Cooper # ends with ".so" (or ".sl" for HP-UX), so rename the library 7107*132f818dSEnji Cooper # to its proper name (with version) after linking. 7108*132f818dSEnji Cooper _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' 7109*132f818dSEnji Cooper _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' 7110*132f818dSEnji Cooper # Commands to make compiler produce verbose output that lists 7111*132f818dSEnji Cooper # what "hidden" libraries, object files and flags are used when 7112*132f818dSEnji Cooper # linking a shared library. 7113*132f818dSEnji Cooper # 7114*132f818dSEnji Cooper # There doesn't appear to be a way to prevent this compiler from 7115*132f818dSEnji Cooper # explicitly linking system object files so we need to strip them 7116*132f818dSEnji Cooper # from the output so that they don't get included in the library 7117*132f818dSEnji Cooper # dependencies. 7118*132f818dSEnji Cooper 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"' 7119*132f818dSEnji Cooper 7120*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7121*132f818dSEnji Cooper _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7122*132f818dSEnji Cooper 7123*132f818dSEnji Cooper # Archives containing C++ object files must be created using 7124*132f818dSEnji Cooper # "CC -Bstatic", where "CC" is the KAI C++ compiler. 7125*132f818dSEnji Cooper _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 7126*132f818dSEnji Cooper ;; 7127*132f818dSEnji Cooper icpc* | ecpc* ) 7128*132f818dSEnji Cooper # Intel C++ 7129*132f818dSEnji Cooper with_gnu_ld=yes 7130*132f818dSEnji Cooper # version 8.0 and above of icpc choke on multiply defined symbols 7131*132f818dSEnji Cooper # if we add $predep_objects and $postdep_objects, however 7.1 and 7132*132f818dSEnji Cooper # earlier do not add the objects themselves. 7133*132f818dSEnji Cooper case `$CC -V 2>&1` in 7134*132f818dSEnji Cooper *"Version 7."*) 7135*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7136*132f818dSEnji Cooper _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' 7137*132f818dSEnji Cooper ;; 7138*132f818dSEnji Cooper *) # Version 8.0 or newer 7139*132f818dSEnji Cooper tmp_idyn= 7140*132f818dSEnji Cooper case $host_cpu in 7141*132f818dSEnji Cooper ia64*) tmp_idyn=' -i_dynamic';; 7142*132f818dSEnji Cooper esac 7143*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7144*132f818dSEnji Cooper _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' 7145*132f818dSEnji Cooper ;; 7146*132f818dSEnji Cooper esac 7147*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7148*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7149*132f818dSEnji Cooper _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7150*132f818dSEnji Cooper _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 7151*132f818dSEnji Cooper ;; 7152*132f818dSEnji Cooper pgCC* | pgcpp*) 7153*132f818dSEnji Cooper # Portland Group C++ compiler 7154*132f818dSEnji Cooper case `$CC -V` in 7155*132f818dSEnji Cooper *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 7156*132f818dSEnji Cooper _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 7157*132f818dSEnji Cooper rm -rf $tpldir~ 7158*132f818dSEnji Cooper $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 7159*132f818dSEnji Cooper compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 7160*132f818dSEnji Cooper _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 7161*132f818dSEnji Cooper rm -rf $tpldir~ 7162*132f818dSEnji Cooper $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 7163*132f818dSEnji Cooper $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 7164*132f818dSEnji Cooper $RANLIB $oldlib' 7165*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 7166*132f818dSEnji Cooper rm -rf $tpldir~ 7167*132f818dSEnji Cooper $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7168*132f818dSEnji Cooper $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7169*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 7170*132f818dSEnji Cooper rm -rf $tpldir~ 7171*132f818dSEnji Cooper $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7172*132f818dSEnji Cooper $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' 7173*132f818dSEnji Cooper ;; 7174*132f818dSEnji Cooper *) # Version 6 and above use weak symbols 7175*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7176*132f818dSEnji Cooper _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' 7177*132f818dSEnji Cooper ;; 7178*132f818dSEnji Cooper esac 7179*132f818dSEnji Cooper 7180*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 7181*132f818dSEnji Cooper _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7182*132f818dSEnji Cooper _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' 7183*132f818dSEnji Cooper ;; 7184*132f818dSEnji Cooper cxx*) 7185*132f818dSEnji Cooper # Compaq C++ 7186*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7187*132f818dSEnji Cooper _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' 7188*132f818dSEnji Cooper 7189*132f818dSEnji Cooper runpath_var=LD_RUN_PATH 7190*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7191*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7192*132f818dSEnji Cooper 7193*132f818dSEnji Cooper # Commands to make compiler produce verbose output that lists 7194*132f818dSEnji Cooper # what "hidden" libraries, object files and flags are used when 7195*132f818dSEnji Cooper # linking a shared library. 7196*132f818dSEnji Cooper # 7197*132f818dSEnji Cooper # There doesn't appear to be a way to prevent this compiler from 7198*132f818dSEnji Cooper # explicitly linking system object files so we need to strip them 7199*132f818dSEnji Cooper # from the output so that they don't get included in the library 7200*132f818dSEnji Cooper # dependencies. 7201*132f818dSEnji Cooper 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' 7202*132f818dSEnji Cooper ;; 7203*132f818dSEnji Cooper xl* | mpixl* | bgxl*) 7204*132f818dSEnji Cooper # IBM XL 8.0 on PPC, with GNU ld 7205*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7206*132f818dSEnji Cooper _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7207*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7208*132f818dSEnji Cooper if test yes = "$supports_anon_versioning"; then 7209*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7210*132f818dSEnji Cooper cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7211*132f818dSEnji Cooper echo "local: *; };" >> $output_objdir/$libname.ver~ 7212*132f818dSEnji Cooper $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 7213*132f818dSEnji Cooper fi 7214*132f818dSEnji Cooper ;; 7215*132f818dSEnji Cooper *) 7216*132f818dSEnji Cooper case `$CC -V 2>&1 | $SED 5q` in 7217*132f818dSEnji Cooper *Sun\ C*) 7218*132f818dSEnji Cooper # Sun C++ 5.9 7219*132f818dSEnji Cooper _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7220*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7221*132f818dSEnji Cooper _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' 7222*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7223*132f818dSEnji Cooper _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' 7224*132f818dSEnji Cooper _LT_TAGVAR(compiler_needs_object, $1)=yes 7225*132f818dSEnji Cooper 7226*132f818dSEnji Cooper # Not sure whether something based on 7227*132f818dSEnji Cooper # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 7228*132f818dSEnji Cooper # would be better. 7229*132f818dSEnji Cooper output_verbose_link_cmd='func_echo_all' 7230*132f818dSEnji Cooper 7231*132f818dSEnji Cooper # Archives containing C++ object files must be created using 7232*132f818dSEnji Cooper # "CC -xar", where "CC" is the Sun C++ compiler. This is 7233*132f818dSEnji Cooper # necessary to make sure instantiated templates are included 7234*132f818dSEnji Cooper # in the archive. 7235*132f818dSEnji Cooper _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7236*132f818dSEnji Cooper ;; 7237*132f818dSEnji Cooper esac 7238*132f818dSEnji Cooper ;; 7239*132f818dSEnji Cooper esac 7240*132f818dSEnji Cooper ;; 7241*132f818dSEnji Cooper 7242*132f818dSEnji Cooper lynxos*) 7243*132f818dSEnji Cooper # FIXME: insert proper C++ library support 7244*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 7245*132f818dSEnji Cooper ;; 7246*132f818dSEnji Cooper 7247*132f818dSEnji Cooper m88k*) 7248*132f818dSEnji Cooper # FIXME: insert proper C++ library support 7249*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 7250*132f818dSEnji Cooper ;; 7251*132f818dSEnji Cooper 7252*132f818dSEnji Cooper mvs*) 7253*132f818dSEnji Cooper case $cc_basename in 7254*132f818dSEnji Cooper cxx*) 7255*132f818dSEnji Cooper # FIXME: insert proper C++ library support 7256*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 7257*132f818dSEnji Cooper ;; 7258*132f818dSEnji Cooper *) 7259*132f818dSEnji Cooper # FIXME: insert proper C++ library support 7260*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 7261*132f818dSEnji Cooper ;; 7262*132f818dSEnji Cooper esac 7263*132f818dSEnji Cooper ;; 7264*132f818dSEnji Cooper 7265*132f818dSEnji Cooper *-mlibc) 7266*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=yes 7267*132f818dSEnji Cooper ;; 7268*132f818dSEnji Cooper 7269*132f818dSEnji Cooper netbsd*) 7270*132f818dSEnji Cooper if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7271*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 7272*132f818dSEnji Cooper wlarc= 7273*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7274*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct, $1)=yes 7275*132f818dSEnji Cooper _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7276*132f818dSEnji Cooper fi 7277*132f818dSEnji Cooper # Workaround some broken pre-1.5 toolchains 7278*132f818dSEnji Cooper output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 7279*132f818dSEnji Cooper ;; 7280*132f818dSEnji Cooper 7281*132f818dSEnji Cooper *nto* | *qnx*) 7282*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=yes 7283*132f818dSEnji Cooper ;; 7284*132f818dSEnji Cooper 7285*132f818dSEnji Cooper openbsd*) 7286*132f818dSEnji Cooper if test -f /usr/libexec/ld.so; then 7287*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct, $1)=yes 7288*132f818dSEnji Cooper _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7289*132f818dSEnji Cooper _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7290*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7291*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7292*132f818dSEnji Cooper if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 7293*132f818dSEnji Cooper _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' 7294*132f818dSEnji Cooper _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 7295*132f818dSEnji Cooper _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 7296*132f818dSEnji Cooper fi 7297*132f818dSEnji Cooper output_verbose_link_cmd=func_echo_all 7298*132f818dSEnji Cooper else 7299*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 7300*132f818dSEnji Cooper fi 7301*132f818dSEnji Cooper ;; 7302*132f818dSEnji Cooper 7303*132f818dSEnji Cooper osf3* | osf4* | osf5*) 7304*132f818dSEnji Cooper case $cc_basename in 7305*132f818dSEnji Cooper KCC*) 7306*132f818dSEnji Cooper # Kuck and Associates, Inc. (KAI) C++ Compiler 7307*132f818dSEnji Cooper 7308*132f818dSEnji Cooper # KCC will only create a shared library if the output file 7309*132f818dSEnji Cooper # ends with ".so" (or ".sl" for HP-UX), so rename the library 7310*132f818dSEnji Cooper # to its proper name (with version) after linking. 7311*132f818dSEnji Cooper _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' 7312*132f818dSEnji Cooper 7313*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7314*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7315*132f818dSEnji Cooper 7316*132f818dSEnji Cooper # Archives containing C++ object files must be created using 7317*132f818dSEnji Cooper # the KAI C++ compiler. 7318*132f818dSEnji Cooper case $host in 7319*132f818dSEnji Cooper osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 7320*132f818dSEnji Cooper *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 7321*132f818dSEnji Cooper esac 7322*132f818dSEnji Cooper ;; 7323*132f818dSEnji Cooper RCC*) 7324*132f818dSEnji Cooper # Rational C++ 2.4.1 7325*132f818dSEnji Cooper # FIXME: insert proper C++ library support 7326*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 7327*132f818dSEnji Cooper ;; 7328*132f818dSEnji Cooper cxx*) 7329*132f818dSEnji Cooper case $host in 7330*132f818dSEnji Cooper osf3*) 7331*132f818dSEnji Cooper _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7332*132f818dSEnji Cooper _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' 7333*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7334*132f818dSEnji Cooper ;; 7335*132f818dSEnji Cooper *) 7336*132f818dSEnji Cooper _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7337*132f818dSEnji Cooper _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' 7338*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7339*132f818dSEnji Cooper echo "-hidden">> $lib.exp~ 7340*132f818dSEnji Cooper $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~ 7341*132f818dSEnji Cooper $RM $lib.exp' 7342*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7343*132f818dSEnji Cooper ;; 7344*132f818dSEnji Cooper esac 7345*132f818dSEnji Cooper 7346*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7347*132f818dSEnji Cooper 7348*132f818dSEnji Cooper # Commands to make compiler produce verbose output that lists 7349*132f818dSEnji Cooper # what "hidden" libraries, object files and flags are used when 7350*132f818dSEnji Cooper # linking a shared library. 7351*132f818dSEnji Cooper # 7352*132f818dSEnji Cooper # There doesn't appear to be a way to prevent this compiler from 7353*132f818dSEnji Cooper # explicitly linking system object files so we need to strip them 7354*132f818dSEnji Cooper # from the output so that they don't get included in the library 7355*132f818dSEnji Cooper # dependencies. 7356*132f818dSEnji Cooper 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"' 7357*132f818dSEnji Cooper ;; 7358*132f818dSEnji Cooper *) 7359*132f818dSEnji Cooper if test yes,no = "$GXX,$with_gnu_ld"; then 7360*132f818dSEnji Cooper _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7361*132f818dSEnji Cooper case $host in 7362*132f818dSEnji Cooper osf3*) 7363*132f818dSEnji Cooper _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' 7364*132f818dSEnji Cooper ;; 7365*132f818dSEnji Cooper *) 7366*132f818dSEnji Cooper _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' 7367*132f818dSEnji Cooper ;; 7368*132f818dSEnji Cooper esac 7369*132f818dSEnji Cooper 7370*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7371*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7372*132f818dSEnji Cooper 7373*132f818dSEnji Cooper # Commands to make compiler produce verbose output that lists 7374*132f818dSEnji Cooper # what "hidden" libraries, object files and flags are used when 7375*132f818dSEnji Cooper # linking a shared library. 7376*132f818dSEnji Cooper output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"' 7377*132f818dSEnji Cooper 7378*132f818dSEnji Cooper else 7379*132f818dSEnji Cooper # FIXME: insert proper C++ library support 7380*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 7381*132f818dSEnji Cooper fi 7382*132f818dSEnji Cooper ;; 7383*132f818dSEnji Cooper esac 7384*132f818dSEnji Cooper ;; 7385*132f818dSEnji Cooper 7386*132f818dSEnji Cooper psos*) 7387*132f818dSEnji Cooper # FIXME: insert proper C++ library support 7388*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 7389*132f818dSEnji Cooper ;; 7390*132f818dSEnji Cooper 7391*132f818dSEnji Cooper serenity*) 7392*132f818dSEnji Cooper ;; 7393*132f818dSEnji Cooper 7394*132f818dSEnji Cooper sunos4*) 7395*132f818dSEnji Cooper case $cc_basename in 7396*132f818dSEnji Cooper CC*) 7397*132f818dSEnji Cooper # Sun C++ 4.x 7398*132f818dSEnji Cooper # FIXME: insert proper C++ library support 7399*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 7400*132f818dSEnji Cooper ;; 7401*132f818dSEnji Cooper lcc*) 7402*132f818dSEnji Cooper # Lucid 7403*132f818dSEnji Cooper # FIXME: insert proper C++ library support 7404*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 7405*132f818dSEnji Cooper ;; 7406*132f818dSEnji Cooper *) 7407*132f818dSEnji Cooper # FIXME: insert proper C++ library support 7408*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 7409*132f818dSEnji Cooper ;; 7410*132f818dSEnji Cooper esac 7411*132f818dSEnji Cooper ;; 7412*132f818dSEnji Cooper 7413*132f818dSEnji Cooper solaris*) 7414*132f818dSEnji Cooper case $cc_basename in 7415*132f818dSEnji Cooper CC* | sunCC*) 7416*132f818dSEnji Cooper # Sun C++ 4.2, 5.x and Centerline C++ 7417*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 7418*132f818dSEnji Cooper _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7419*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7420*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7421*132f818dSEnji Cooper $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' 7422*132f818dSEnji Cooper 7423*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7424*132f818dSEnji Cooper _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7425*132f818dSEnji Cooper case $host_os in 7426*132f818dSEnji Cooper solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7427*132f818dSEnji Cooper *) 7428*132f818dSEnji Cooper # The compiler driver will combine and reorder linker options, 7429*132f818dSEnji Cooper # but understands '-z linker_flag'. 7430*132f818dSEnji Cooper # Supported since Solaris 2.6 (maybe 2.5.1?) 7431*132f818dSEnji Cooper _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7432*132f818dSEnji Cooper ;; 7433*132f818dSEnji Cooper esac 7434*132f818dSEnji Cooper _LT_TAGVAR(link_all_deplibs, $1)=yes 7435*132f818dSEnji Cooper 7436*132f818dSEnji Cooper output_verbose_link_cmd='func_echo_all' 7437*132f818dSEnji Cooper 7438*132f818dSEnji Cooper # Archives containing C++ object files must be created using 7439*132f818dSEnji Cooper # "CC -xar", where "CC" is the Sun C++ compiler. This is 7440*132f818dSEnji Cooper # necessary to make sure instantiated templates are included 7441*132f818dSEnji Cooper # in the archive. 7442*132f818dSEnji Cooper _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7443*132f818dSEnji Cooper ;; 7444*132f818dSEnji Cooper gcx*) 7445*132f818dSEnji Cooper # Green Hills C++ Compiler 7446*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7447*132f818dSEnji Cooper 7448*132f818dSEnji Cooper # The C++ compiler must be used to create the archive. 7449*132f818dSEnji Cooper _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 7450*132f818dSEnji Cooper ;; 7451*132f818dSEnji Cooper *) 7452*132f818dSEnji Cooper # GNU C++ compiler with Solaris linker 7453*132f818dSEnji Cooper if test yes,no = "$GXX,$with_gnu_ld"; then 7454*132f818dSEnji Cooper _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 7455*132f818dSEnji Cooper if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7456*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7457*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7458*132f818dSEnji Cooper $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' 7459*132f818dSEnji Cooper 7460*132f818dSEnji Cooper # Commands to make compiler produce verbose output that lists 7461*132f818dSEnji Cooper # what "hidden" libraries, object files and flags are used when 7462*132f818dSEnji Cooper # linking a shared library. 7463*132f818dSEnji Cooper output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"' 7464*132f818dSEnji Cooper else 7465*132f818dSEnji Cooper # g++ 2.7 appears to require '-G' NOT '-shared' on this 7466*132f818dSEnji Cooper # platform. 7467*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7468*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7469*132f818dSEnji Cooper $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' 7470*132f818dSEnji Cooper 7471*132f818dSEnji Cooper # Commands to make compiler produce verbose output that lists 7472*132f818dSEnji Cooper # what "hidden" libraries, object files and flags are used when 7473*132f818dSEnji Cooper # linking a shared library. 7474*132f818dSEnji Cooper output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"' 7475*132f818dSEnji Cooper fi 7476*132f818dSEnji Cooper 7477*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 7478*132f818dSEnji Cooper case $host_os in 7479*132f818dSEnji Cooper solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7480*132f818dSEnji Cooper *) 7481*132f818dSEnji Cooper _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 7482*132f818dSEnji Cooper ;; 7483*132f818dSEnji Cooper esac 7484*132f818dSEnji Cooper fi 7485*132f818dSEnji Cooper ;; 7486*132f818dSEnji Cooper esac 7487*132f818dSEnji Cooper ;; 7488*132f818dSEnji Cooper 7489*132f818dSEnji Cooper sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7490*132f818dSEnji Cooper _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7491*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7492*132f818dSEnji Cooper _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7493*132f818dSEnji Cooper runpath_var='LD_RUN_PATH' 7494*132f818dSEnji Cooper 7495*132f818dSEnji Cooper case $cc_basename in 7496*132f818dSEnji Cooper CC*) 7497*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7498*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7499*132f818dSEnji Cooper ;; 7500*132f818dSEnji Cooper *) 7501*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7502*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7503*132f818dSEnji Cooper ;; 7504*132f818dSEnji Cooper esac 7505*132f818dSEnji Cooper ;; 7506*132f818dSEnji Cooper 7507*132f818dSEnji Cooper sysv5* | sco3.2v5* | sco5v6*) 7508*132f818dSEnji Cooper # Note: We CANNOT use -z defs as we might desire, because we do not 7509*132f818dSEnji Cooper # link with -lc, and that would cause any symbols used from libc to 7510*132f818dSEnji Cooper # always be unresolved, which means just about no library would 7511*132f818dSEnji Cooper # ever link correctly. If we're not using GNU ld we use -z text 7512*132f818dSEnji Cooper # though, which does catch some bad symbols but isn't as heavy-handed 7513*132f818dSEnji Cooper # as -z defs. 7514*132f818dSEnji Cooper _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7515*132f818dSEnji Cooper _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 7516*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7517*132f818dSEnji Cooper _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7518*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 7519*132f818dSEnji Cooper _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7520*132f818dSEnji Cooper _LT_TAGVAR(link_all_deplibs, $1)=yes 7521*132f818dSEnji Cooper _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 7522*132f818dSEnji Cooper runpath_var='LD_RUN_PATH' 7523*132f818dSEnji Cooper 7524*132f818dSEnji Cooper case $cc_basename in 7525*132f818dSEnji Cooper CC*) 7526*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7527*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7528*132f818dSEnji Cooper _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 7529*132f818dSEnji Cooper '"$_LT_TAGVAR(old_archive_cmds, $1)" 7530*132f818dSEnji Cooper _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 7531*132f818dSEnji Cooper '"$_LT_TAGVAR(reload_cmds, $1)" 7532*132f818dSEnji Cooper ;; 7533*132f818dSEnji Cooper *) 7534*132f818dSEnji Cooper _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7535*132f818dSEnji Cooper _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7536*132f818dSEnji Cooper ;; 7537*132f818dSEnji Cooper esac 7538*132f818dSEnji Cooper ;; 7539*132f818dSEnji Cooper 7540*132f818dSEnji Cooper tandem*) 7541*132f818dSEnji Cooper case $cc_basename in 7542*132f818dSEnji Cooper NCC*) 7543*132f818dSEnji Cooper # NonStop-UX NCC 3.20 7544*132f818dSEnji Cooper # FIXME: insert proper C++ library support 7545*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 7546*132f818dSEnji Cooper ;; 7547*132f818dSEnji Cooper *) 7548*132f818dSEnji Cooper # FIXME: insert proper C++ library support 7549*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 7550*132f818dSEnji Cooper ;; 7551*132f818dSEnji Cooper esac 7552*132f818dSEnji Cooper ;; 7553*132f818dSEnji Cooper 7554*132f818dSEnji Cooper vxworks*) 7555*132f818dSEnji Cooper # FIXME: insert proper C++ library support 7556*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 7557*132f818dSEnji Cooper ;; 7558*132f818dSEnji Cooper 7559*132f818dSEnji Cooper *) 7560*132f818dSEnji Cooper # FIXME: insert proper C++ library support 7561*132f818dSEnji Cooper _LT_TAGVAR(ld_shlibs, $1)=no 7562*132f818dSEnji Cooper ;; 7563*132f818dSEnji Cooper esac 7564*132f818dSEnji Cooper 7565*132f818dSEnji Cooper AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7566*132f818dSEnji Cooper test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 7567*132f818dSEnji Cooper 7568*132f818dSEnji Cooper _LT_TAGVAR(GCC, $1)=$GXX 7569*132f818dSEnji Cooper _LT_TAGVAR(LD, $1)=$LD 7570*132f818dSEnji Cooper 7571*132f818dSEnji Cooper ## CAVEAT EMPTOR: 7572*132f818dSEnji Cooper ## There is no encapsulation within the following macros, do not change 7573*132f818dSEnji Cooper ## the running order or otherwise move them around unless you know exactly 7574*132f818dSEnji Cooper ## what you are doing... 7575*132f818dSEnji Cooper _LT_SYS_HIDDEN_LIBDEPS($1) 7576*132f818dSEnji Cooper _LT_COMPILER_PIC($1) 7577*132f818dSEnji Cooper _LT_COMPILER_C_O($1) 7578*132f818dSEnji Cooper _LT_COMPILER_FILE_LOCKS($1) 7579*132f818dSEnji Cooper _LT_LINKER_SHLIBS($1) 7580*132f818dSEnji Cooper _LT_SYS_DYNAMIC_LINKER($1) 7581*132f818dSEnji Cooper _LT_LINKER_HARDCODE_LIBPATH($1) 7582*132f818dSEnji Cooper 7583*132f818dSEnji Cooper _LT_CONFIG($1) 7584*132f818dSEnji Cooper fi # test -n "$compiler" 7585*132f818dSEnji Cooper 7586*132f818dSEnji Cooper CC=$lt_save_CC 7587*132f818dSEnji Cooper CFLAGS=$lt_save_CFLAGS 7588*132f818dSEnji Cooper LDCXX=$LD 7589*132f818dSEnji Cooper LD=$lt_save_LD 7590*132f818dSEnji Cooper GCC=$lt_save_GCC 7591*132f818dSEnji Cooper with_gnu_ld=$lt_save_with_gnu_ld 7592*132f818dSEnji Cooper lt_cv_path_LDCXX=$lt_cv_path_LD 7593*132f818dSEnji Cooper lt_cv_path_LD=$lt_save_path_LD 7594*132f818dSEnji Cooper lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 7595*132f818dSEnji Cooper lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 7596*132f818dSEnji Cooperfi # test yes != "$_lt_caught_CXX_error" 7597*132f818dSEnji Cooper 7598*132f818dSEnji CooperAC_LANG_POP 7599*132f818dSEnji Cooper])# _LT_LANG_CXX_CONFIG 7600*132f818dSEnji Cooper 7601*132f818dSEnji Cooper 7602*132f818dSEnji Cooper# _LT_FUNC_STRIPNAME_CNF 7603*132f818dSEnji Cooper# ---------------------- 7604*132f818dSEnji Cooper# func_stripname_cnf prefix suffix name 7605*132f818dSEnji Cooper# strip PREFIX and SUFFIX off of NAME. 7606*132f818dSEnji Cooper# PREFIX and SUFFIX must not contain globbing or regex special 7607*132f818dSEnji Cooper# characters, hashes, percent signs, but SUFFIX may contain a leading 7608*132f818dSEnji Cooper# dot (in which case that matches only a dot). 7609*132f818dSEnji Cooper# 7610*132f818dSEnji Cooper# This function is identical to the (non-XSI) version of func_stripname, 7611*132f818dSEnji Cooper# except this one can be used by m4 code that may be executed by configure, 7612*132f818dSEnji Cooper# rather than the libtool script. 7613*132f818dSEnji Cooperm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 7614*132f818dSEnji CooperAC_REQUIRE([_LT_DECL_SED]) 7615*132f818dSEnji CooperAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 7616*132f818dSEnji Cooperfunc_stripname_cnf () 7617*132f818dSEnji Cooper{ 7618*132f818dSEnji Cooper case @S|@2 in 7619*132f818dSEnji Cooper .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 7620*132f818dSEnji Cooper *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 7621*132f818dSEnji Cooper esac 7622*132f818dSEnji Cooper} # func_stripname_cnf 7623*132f818dSEnji Cooper])# _LT_FUNC_STRIPNAME_CNF 7624*132f818dSEnji Cooper 7625*132f818dSEnji Cooper 7626*132f818dSEnji Cooper# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 7627*132f818dSEnji Cooper# --------------------------------- 7628*132f818dSEnji Cooper# Figure out "hidden" library dependencies from verbose 7629*132f818dSEnji Cooper# compiler output when linking a shared library. 7630*132f818dSEnji Cooper# Parse the compiler output and extract the necessary 7631*132f818dSEnji Cooper# objects, libraries and library flags. 7632*132f818dSEnji Cooperm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 7633*132f818dSEnji Cooper[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7634*132f818dSEnji CooperAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 7635*132f818dSEnji Cooper# Dependencies to place before and after the object being linked: 7636*132f818dSEnji Cooper_LT_TAGVAR(predep_objects, $1)= 7637*132f818dSEnji Cooper_LT_TAGVAR(postdep_objects, $1)= 7638*132f818dSEnji Cooper_LT_TAGVAR(predeps, $1)= 7639*132f818dSEnji Cooper_LT_TAGVAR(postdeps, $1)= 7640*132f818dSEnji Cooper_LT_TAGVAR(compiler_lib_search_path, $1)= 7641*132f818dSEnji Cooper 7642*132f818dSEnji Cooperdnl we can't use the lt_simple_compile_test_code here, 7643*132f818dSEnji Cooperdnl because it contains code intended for an executable, 7644*132f818dSEnji Cooperdnl not a library. It's possible we should let each 7645*132f818dSEnji Cooperdnl tag define a new lt_????_link_test_code variable, 7646*132f818dSEnji Cooperdnl but it's only used here... 7647*132f818dSEnji Cooperm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 7648*132f818dSEnji Cooperint a; 7649*132f818dSEnji Coopervoid foo (void) { a = 0; } 7650*132f818dSEnji Cooper_LT_EOF 7651*132f818dSEnji Cooper], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 7652*132f818dSEnji Cooperclass Foo 7653*132f818dSEnji Cooper{ 7654*132f818dSEnji Cooperpublic: 7655*132f818dSEnji Cooper Foo (void) { a = 0; } 7656*132f818dSEnji Cooperprivate: 7657*132f818dSEnji Cooper int a; 7658*132f818dSEnji Cooper}; 7659*132f818dSEnji Cooper_LT_EOF 7660*132f818dSEnji Cooper], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 7661*132f818dSEnji Cooper subroutine foo 7662*132f818dSEnji Cooper implicit none 7663*132f818dSEnji Cooper integer*4 a 7664*132f818dSEnji Cooper a=0 7665*132f818dSEnji Cooper return 7666*132f818dSEnji Cooper end 7667*132f818dSEnji Cooper_LT_EOF 7668*132f818dSEnji Cooper], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 7669*132f818dSEnji Cooper subroutine foo 7670*132f818dSEnji Cooper implicit none 7671*132f818dSEnji Cooper integer a 7672*132f818dSEnji Cooper a=0 7673*132f818dSEnji Cooper return 7674*132f818dSEnji Cooper end 7675*132f818dSEnji Cooper_LT_EOF 7676*132f818dSEnji Cooper], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 7677*132f818dSEnji Cooperpublic class foo { 7678*132f818dSEnji Cooper private int a; 7679*132f818dSEnji Cooper public void bar (void) { 7680*132f818dSEnji Cooper a = 0; 7681*132f818dSEnji Cooper } 7682*132f818dSEnji Cooper}; 7683*132f818dSEnji Cooper_LT_EOF 7684*132f818dSEnji Cooper], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 7685*132f818dSEnji Cooperpackage foo 7686*132f818dSEnji Cooperfunc foo() { 7687*132f818dSEnji Cooper} 7688*132f818dSEnji Cooper_LT_EOF 7689*132f818dSEnji Cooper]) 7690*132f818dSEnji Cooper 7691*132f818dSEnji Cooper_lt_libdeps_save_CFLAGS=$CFLAGS 7692*132f818dSEnji Coopercase "$CC $CFLAGS " in #( 7693*132f818dSEnji Cooper*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 7694*132f818dSEnji Cooper*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 7695*132f818dSEnji Cooper*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 7696*132f818dSEnji Cooperesac 7697*132f818dSEnji Cooper 7698*132f818dSEnji Cooperdnl Parse the compiler output and extract the necessary 7699*132f818dSEnji Cooperdnl objects, libraries and library flags. 7700*132f818dSEnji Cooperif AC_TRY_EVAL(ac_compile); then 7701*132f818dSEnji Cooper # Parse the compiler output and extract the necessary 7702*132f818dSEnji Cooper # objects, libraries and library flags. 7703*132f818dSEnji Cooper 7704*132f818dSEnji Cooper # Sentinel used to keep track of whether or not we are before 7705*132f818dSEnji Cooper # the conftest object file. 7706*132f818dSEnji Cooper pre_test_object_deps_done=no 7707*132f818dSEnji Cooper 7708*132f818dSEnji Cooper for p in `eval "$output_verbose_link_cmd"`; do 7709*132f818dSEnji Cooper case $prev$p in 7710*132f818dSEnji Cooper 7711*132f818dSEnji Cooper -L* | -R* | -l*) 7712*132f818dSEnji Cooper # Some compilers place space between "-{L,R,l}" and the path. 7713*132f818dSEnji Cooper # Remove the space. 7714*132f818dSEnji Cooper if test x-L = x"$p" || 7715*132f818dSEnji Cooper test x-R = x"$p" || 7716*132f818dSEnji Cooper test x-l = x"$p"; then 7717*132f818dSEnji Cooper prev=$p 7718*132f818dSEnji Cooper continue 7719*132f818dSEnji Cooper fi 7720*132f818dSEnji Cooper 7721*132f818dSEnji Cooper # Expand the sysroot to ease extracting the directories later. 7722*132f818dSEnji Cooper if test -z "$prev"; then 7723*132f818dSEnji Cooper case $p in 7724*132f818dSEnji Cooper -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 7725*132f818dSEnji Cooper -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 7726*132f818dSEnji Cooper -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 7727*132f818dSEnji Cooper esac 7728*132f818dSEnji Cooper fi 7729*132f818dSEnji Cooper case $p in 7730*132f818dSEnji Cooper =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 7731*132f818dSEnji Cooper esac 7732*132f818dSEnji Cooper if test no = "$pre_test_object_deps_done"; then 7733*132f818dSEnji Cooper case $prev in 7734*132f818dSEnji Cooper -L | -R) 7735*132f818dSEnji Cooper # Internal compiler library paths should come after those 7736*132f818dSEnji Cooper # provided the user. The postdeps already come after the 7737*132f818dSEnji Cooper # user supplied libs so there is no need to process them. 7738*132f818dSEnji Cooper if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 7739*132f818dSEnji Cooper _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 7740*132f818dSEnji Cooper else 7741*132f818dSEnji Cooper _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 7742*132f818dSEnji Cooper fi 7743*132f818dSEnji Cooper ;; 7744*132f818dSEnji Cooper # The "-l" case would never come before the object being 7745*132f818dSEnji Cooper # linked, so don't bother handling this case. 7746*132f818dSEnji Cooper esac 7747*132f818dSEnji Cooper else 7748*132f818dSEnji Cooper if test -z "$_LT_TAGVAR(postdeps, $1)"; then 7749*132f818dSEnji Cooper _LT_TAGVAR(postdeps, $1)=$prev$p 7750*132f818dSEnji Cooper else 7751*132f818dSEnji Cooper _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 7752*132f818dSEnji Cooper fi 7753*132f818dSEnji Cooper fi 7754*132f818dSEnji Cooper prev= 7755*132f818dSEnji Cooper ;; 7756*132f818dSEnji Cooper 7757*132f818dSEnji Cooper *.lto.$objext) ;; # Ignore GCC LTO objects 7758*132f818dSEnji Cooper *.$objext) 7759*132f818dSEnji Cooper # This assumes that the test object file only shows up 7760*132f818dSEnji Cooper # once in the compiler output. 7761*132f818dSEnji Cooper if test "$p" = "conftest.$objext"; then 7762*132f818dSEnji Cooper pre_test_object_deps_done=yes 7763*132f818dSEnji Cooper continue 7764*132f818dSEnji Cooper fi 7765*132f818dSEnji Cooper 7766*132f818dSEnji Cooper if test no = "$pre_test_object_deps_done"; then 7767*132f818dSEnji Cooper if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7768*132f818dSEnji Cooper _LT_TAGVAR(predep_objects, $1)=$p 7769*132f818dSEnji Cooper else 7770*132f818dSEnji Cooper _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 7771*132f818dSEnji Cooper fi 7772*132f818dSEnji Cooper else 7773*132f818dSEnji Cooper if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7774*132f818dSEnji Cooper _LT_TAGVAR(postdep_objects, $1)=$p 7775*132f818dSEnji Cooper else 7776*132f818dSEnji Cooper _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7777*132f818dSEnji Cooper fi 7778*132f818dSEnji Cooper fi 7779*132f818dSEnji Cooper ;; 7780*132f818dSEnji Cooper 7781*132f818dSEnji Cooper *) ;; # Ignore the rest. 7782*132f818dSEnji Cooper 7783*132f818dSEnji Cooper esac 7784*132f818dSEnji Cooper done 7785*132f818dSEnji Cooper 7786*132f818dSEnji Cooper # Clean up. 7787*132f818dSEnji Cooper rm -f a.out a.exe 7788*132f818dSEnji Cooperelse 7789*132f818dSEnji Cooper echo "libtool.m4: error: problem compiling $1 test program" 7790*132f818dSEnji Cooperfi 7791*132f818dSEnji Cooper 7792*132f818dSEnji Cooper$RM -f confest.$objext 7793*132f818dSEnji CooperCFLAGS=$_lt_libdeps_save_CFLAGS 7794*132f818dSEnji Cooper 7795*132f818dSEnji Cooper# PORTME: override above test on systems where it is broken 7796*132f818dSEnji Cooperm4_if([$1], [CXX], 7797*132f818dSEnji Cooper[case $host_os in 7798*132f818dSEnji Cooperinterix[[3-9]]*) 7799*132f818dSEnji Cooper # Interix 3.5 installs completely hosed .la files for C++, so rather than 7800*132f818dSEnji Cooper # hack all around it, let's just trust "g++" to DTRT. 7801*132f818dSEnji Cooper _LT_TAGVAR(predep_objects,$1)= 7802*132f818dSEnji Cooper _LT_TAGVAR(postdep_objects,$1)= 7803*132f818dSEnji Cooper _LT_TAGVAR(postdeps,$1)= 7804*132f818dSEnji Cooper ;; 7805*132f818dSEnji Cooperesac 7806*132f818dSEnji Cooper]) 7807*132f818dSEnji Cooper 7808*132f818dSEnji Coopercase " $_LT_TAGVAR(postdeps, $1) " in 7809*132f818dSEnji Cooper*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 7810*132f818dSEnji Cooperesac 7811*132f818dSEnji Cooper _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7812*132f818dSEnji Cooperif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7813*132f818dSEnji Cooper _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 7814*132f818dSEnji Cooperfi 7815*132f818dSEnji Cooper_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7816*132f818dSEnji Cooper [The directories searched by this compiler when creating a shared library]) 7817*132f818dSEnji Cooper_LT_TAGDECL([], [predep_objects], [1], 7818*132f818dSEnji Cooper [Dependencies to place before and after the objects being linked to 7819*132f818dSEnji Cooper create a shared library]) 7820*132f818dSEnji Cooper_LT_TAGDECL([], [postdep_objects], [1]) 7821*132f818dSEnji Cooper_LT_TAGDECL([], [predeps], [1]) 7822*132f818dSEnji Cooper_LT_TAGDECL([], [postdeps], [1]) 7823*132f818dSEnji Cooper_LT_TAGDECL([], [compiler_lib_search_path], [1], 7824*132f818dSEnji Cooper [The library search path used internally by the compiler when linking 7825*132f818dSEnji Cooper a shared library]) 7826*132f818dSEnji Cooper])# _LT_SYS_HIDDEN_LIBDEPS 7827*132f818dSEnji Cooper 7828*132f818dSEnji Cooper 7829*132f818dSEnji Cooper# _LT_LANG_F77_CONFIG([TAG]) 7830*132f818dSEnji Cooper# -------------------------- 7831*132f818dSEnji Cooper# Ensure that the configuration variables for a Fortran 77 compiler are 7832*132f818dSEnji Cooper# suitably defined. These variables are subsequently used by _LT_CONFIG 7833*132f818dSEnji Cooper# to write the compiler configuration to 'libtool'. 7834*132f818dSEnji Cooperm4_defun([_LT_LANG_F77_CONFIG], 7835*132f818dSEnji Cooper[AC_LANG_PUSH(Fortran 77) 7836*132f818dSEnji Cooperif test -z "$F77" || test no = "$F77"; then 7837*132f818dSEnji Cooper _lt_disable_F77=yes 7838*132f818dSEnji Cooperfi 7839*132f818dSEnji Cooper 7840*132f818dSEnji Cooper_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7841*132f818dSEnji Cooper_LT_TAGVAR(allow_undefined_flag, $1)= 7842*132f818dSEnji Cooper_LT_TAGVAR(always_export_symbols, $1)=no 7843*132f818dSEnji Cooper_LT_TAGVAR(archive_expsym_cmds, $1)= 7844*132f818dSEnji Cooper_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7845*132f818dSEnji Cooper_LT_TAGVAR(hardcode_direct, $1)=no 7846*132f818dSEnji Cooper_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7847*132f818dSEnji Cooper_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7848*132f818dSEnji Cooper_LT_TAGVAR(hardcode_libdir_separator, $1)= 7849*132f818dSEnji Cooper_LT_TAGVAR(hardcode_minus_L, $1)=no 7850*132f818dSEnji Cooper_LT_TAGVAR(hardcode_automatic, $1)=no 7851*132f818dSEnji Cooper_LT_TAGVAR(inherit_rpath, $1)=no 7852*132f818dSEnji Cooper_LT_TAGVAR(module_cmds, $1)= 7853*132f818dSEnji Cooper_LT_TAGVAR(module_expsym_cmds, $1)= 7854*132f818dSEnji Cooper_LT_TAGVAR(link_all_deplibs, $1)=unknown 7855*132f818dSEnji Cooper_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7856*132f818dSEnji Cooper_LT_TAGVAR(reload_flag, $1)=$reload_flag 7857*132f818dSEnji Cooper_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7858*132f818dSEnji Cooper_LT_TAGVAR(no_undefined_flag, $1)= 7859*132f818dSEnji Cooper_LT_TAGVAR(whole_archive_flag_spec, $1)= 7860*132f818dSEnji Cooper_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7861*132f818dSEnji Cooper 7862*132f818dSEnji Cooper# Source file extension for f77 test sources. 7863*132f818dSEnji Cooperac_ext=f 7864*132f818dSEnji Cooper 7865*132f818dSEnji Cooper# Object file extension for compiled f77 test sources. 7866*132f818dSEnji Cooperobjext=o 7867*132f818dSEnji Cooper_LT_TAGVAR(objext, $1)=$objext 7868*132f818dSEnji Cooper 7869*132f818dSEnji Cooper# No sense in running all these tests if we already determined that 7870*132f818dSEnji Cooper# the F77 compiler isn't working. Some variables (like enable_shared) 7871*132f818dSEnji Cooper# are currently assumed to apply to all compilers on this platform, 7872*132f818dSEnji Cooper# and will be corrupted by setting them based on a non-working compiler. 7873*132f818dSEnji Cooperif test yes != "$_lt_disable_F77"; then 7874*132f818dSEnji Cooper # Code to be used in simple compile tests 7875*132f818dSEnji Cooper lt_simple_compile_test_code="\ 7876*132f818dSEnji Cooper subroutine t 7877*132f818dSEnji Cooper return 7878*132f818dSEnji Cooper end 7879*132f818dSEnji Cooper" 7880*132f818dSEnji Cooper 7881*132f818dSEnji Cooper # Code to be used in simple link tests 7882*132f818dSEnji Cooper lt_simple_link_test_code="\ 7883*132f818dSEnji Cooper program t 7884*132f818dSEnji Cooper end 7885*132f818dSEnji Cooper" 7886*132f818dSEnji Cooper 7887*132f818dSEnji Cooper # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7888*132f818dSEnji Cooper _LT_TAG_COMPILER 7889*132f818dSEnji Cooper 7890*132f818dSEnji Cooper # save warnings/boilerplate of simple test code 7891*132f818dSEnji Cooper _LT_COMPILER_BOILERPLATE 7892*132f818dSEnji Cooper _LT_LINKER_BOILERPLATE 7893*132f818dSEnji Cooper 7894*132f818dSEnji Cooper # Allow CC to be a program name with arguments. 7895*132f818dSEnji Cooper lt_save_CC=$CC 7896*132f818dSEnji Cooper lt_save_GCC=$GCC 7897*132f818dSEnji Cooper lt_save_CFLAGS=$CFLAGS 7898*132f818dSEnji Cooper CC=${F77-"f77"} 7899*132f818dSEnji Cooper CFLAGS=$FFLAGS 7900*132f818dSEnji Cooper compiler=$CC 7901*132f818dSEnji Cooper _LT_TAGVAR(compiler, $1)=$CC 7902*132f818dSEnji Cooper _LT_CC_BASENAME([$compiler]) 7903*132f818dSEnji Cooper GCC=$G77 7904*132f818dSEnji Cooper if test -n "$compiler"; then 7905*132f818dSEnji Cooper AC_MSG_CHECKING([if libtool supports shared libraries]) 7906*132f818dSEnji Cooper AC_MSG_RESULT([$can_build_shared]) 7907*132f818dSEnji Cooper 7908*132f818dSEnji Cooper AC_MSG_CHECKING([whether to build shared libraries]) 7909*132f818dSEnji Cooper test no = "$can_build_shared" && enable_shared=no 7910*132f818dSEnji Cooper 7911*132f818dSEnji Cooper # On AIX, shared libraries and static libraries use the same namespace, and 7912*132f818dSEnji Cooper # are all built from PIC. 7913*132f818dSEnji Cooper case $host_os in 7914*132f818dSEnji Cooper aix3*) 7915*132f818dSEnji Cooper test yes = "$enable_shared" && enable_static=no 7916*132f818dSEnji Cooper if test -n "$RANLIB"; then 7917*132f818dSEnji Cooper archive_cmds="$archive_cmds~\$RANLIB \$lib" 7918*132f818dSEnji Cooper postinstall_cmds='$RANLIB $lib' 7919*132f818dSEnji Cooper fi 7920*132f818dSEnji Cooper ;; 7921*132f818dSEnji Cooper aix[[4-9]]*) 7922*132f818dSEnji Cooper if test ia64 != "$host_cpu"; then 7923*132f818dSEnji Cooper case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7924*132f818dSEnji Cooper yes,aix,yes) ;; # shared object as lib.so file only 7925*132f818dSEnji Cooper yes,svr4,*) ;; # shared object as lib.so archive member only 7926*132f818dSEnji Cooper yes,*) enable_static=no ;; # shared object in lib.a archive as well 7927*132f818dSEnji Cooper esac 7928*132f818dSEnji Cooper fi 7929*132f818dSEnji Cooper ;; 7930*132f818dSEnji Cooper esac 7931*132f818dSEnji Cooper AC_MSG_RESULT([$enable_shared]) 7932*132f818dSEnji Cooper 7933*132f818dSEnji Cooper AC_MSG_CHECKING([whether to build static libraries]) 7934*132f818dSEnji Cooper # Make sure either enable_shared or enable_static is yes. 7935*132f818dSEnji Cooper test yes = "$enable_shared" || enable_static=yes 7936*132f818dSEnji Cooper AC_MSG_RESULT([$enable_static]) 7937*132f818dSEnji Cooper 7938*132f818dSEnji Cooper _LT_TAGVAR(GCC, $1)=$G77 7939*132f818dSEnji Cooper _LT_TAGVAR(LD, $1)=$LD 7940*132f818dSEnji Cooper 7941*132f818dSEnji Cooper ## CAVEAT EMPTOR: 7942*132f818dSEnji Cooper ## There is no encapsulation within the following macros, do not change 7943*132f818dSEnji Cooper ## the running order or otherwise move them around unless you know exactly 7944*132f818dSEnji Cooper ## what you are doing... 7945*132f818dSEnji Cooper _LT_COMPILER_PIC($1) 7946*132f818dSEnji Cooper _LT_COMPILER_C_O($1) 7947*132f818dSEnji Cooper _LT_COMPILER_FILE_LOCKS($1) 7948*132f818dSEnji Cooper _LT_LINKER_SHLIBS($1) 7949*132f818dSEnji Cooper _LT_SYS_DYNAMIC_LINKER($1) 7950*132f818dSEnji Cooper _LT_LINKER_HARDCODE_LIBPATH($1) 7951*132f818dSEnji Cooper 7952*132f818dSEnji Cooper _LT_CONFIG($1) 7953*132f818dSEnji Cooper fi # test -n "$compiler" 7954*132f818dSEnji Cooper 7955*132f818dSEnji Cooper GCC=$lt_save_GCC 7956*132f818dSEnji Cooper CC=$lt_save_CC 7957*132f818dSEnji Cooper CFLAGS=$lt_save_CFLAGS 7958*132f818dSEnji Cooperfi # test yes != "$_lt_disable_F77" 7959*132f818dSEnji Cooper 7960*132f818dSEnji CooperAC_LANG_POP 7961*132f818dSEnji Cooper])# _LT_LANG_F77_CONFIG 7962*132f818dSEnji Cooper 7963*132f818dSEnji Cooper 7964*132f818dSEnji Cooper# _LT_LANG_FC_CONFIG([TAG]) 7965*132f818dSEnji Cooper# ------------------------- 7966*132f818dSEnji Cooper# Ensure that the configuration variables for a Fortran compiler are 7967*132f818dSEnji Cooper# suitably defined. These variables are subsequently used by _LT_CONFIG 7968*132f818dSEnji Cooper# to write the compiler configuration to 'libtool'. 7969*132f818dSEnji Cooperm4_defun([_LT_LANG_FC_CONFIG], 7970*132f818dSEnji Cooper[AC_LANG_PUSH(Fortran) 7971*132f818dSEnji Cooper 7972*132f818dSEnji Cooperif test -z "$FC" || test no = "$FC"; then 7973*132f818dSEnji Cooper _lt_disable_FC=yes 7974*132f818dSEnji Cooperfi 7975*132f818dSEnji Cooper 7976*132f818dSEnji Cooper_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7977*132f818dSEnji Cooper_LT_TAGVAR(allow_undefined_flag, $1)= 7978*132f818dSEnji Cooper_LT_TAGVAR(always_export_symbols, $1)=no 7979*132f818dSEnji Cooper_LT_TAGVAR(archive_expsym_cmds, $1)= 7980*132f818dSEnji Cooper_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7981*132f818dSEnji Cooper_LT_TAGVAR(hardcode_direct, $1)=no 7982*132f818dSEnji Cooper_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7983*132f818dSEnji Cooper_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7984*132f818dSEnji Cooper_LT_TAGVAR(hardcode_libdir_separator, $1)= 7985*132f818dSEnji Cooper_LT_TAGVAR(hardcode_minus_L, $1)=no 7986*132f818dSEnji Cooper_LT_TAGVAR(hardcode_automatic, $1)=no 7987*132f818dSEnji Cooper_LT_TAGVAR(inherit_rpath, $1)=no 7988*132f818dSEnji Cooper_LT_TAGVAR(module_cmds, $1)= 7989*132f818dSEnji Cooper_LT_TAGVAR(module_expsym_cmds, $1)= 7990*132f818dSEnji Cooper_LT_TAGVAR(link_all_deplibs, $1)=unknown 7991*132f818dSEnji Cooper_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7992*132f818dSEnji Cooper_LT_TAGVAR(reload_flag, $1)=$reload_flag 7993*132f818dSEnji Cooper_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7994*132f818dSEnji Cooper_LT_TAGVAR(no_undefined_flag, $1)= 7995*132f818dSEnji Cooper_LT_TAGVAR(whole_archive_flag_spec, $1)= 7996*132f818dSEnji Cooper_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7997*132f818dSEnji Cooper 7998*132f818dSEnji Cooper# Source file extension for fc test sources. 7999*132f818dSEnji Cooperac_ext=${ac_fc_srcext-f} 8000*132f818dSEnji Cooper 8001*132f818dSEnji Cooper# Object file extension for compiled fc test sources. 8002*132f818dSEnji Cooperobjext=o 8003*132f818dSEnji Cooper_LT_TAGVAR(objext, $1)=$objext 8004*132f818dSEnji Cooper 8005*132f818dSEnji Cooper# No sense in running all these tests if we already determined that 8006*132f818dSEnji Cooper# the FC compiler isn't working. Some variables (like enable_shared) 8007*132f818dSEnji Cooper# are currently assumed to apply to all compilers on this platform, 8008*132f818dSEnji Cooper# and will be corrupted by setting them based on a non-working compiler. 8009*132f818dSEnji Cooperif test yes != "$_lt_disable_FC"; then 8010*132f818dSEnji Cooper # Code to be used in simple compile tests 8011*132f818dSEnji Cooper lt_simple_compile_test_code="\ 8012*132f818dSEnji Cooper subroutine t 8013*132f818dSEnji Cooper return 8014*132f818dSEnji Cooper end 8015*132f818dSEnji Cooper" 8016*132f818dSEnji Cooper 8017*132f818dSEnji Cooper # Code to be used in simple link tests 8018*132f818dSEnji Cooper lt_simple_link_test_code="\ 8019*132f818dSEnji Cooper program t 8020*132f818dSEnji Cooper end 8021*132f818dSEnji Cooper" 8022*132f818dSEnji Cooper 8023*132f818dSEnji Cooper # ltmain only uses $CC for tagged configurations so make sure $CC is set. 8024*132f818dSEnji Cooper _LT_TAG_COMPILER 8025*132f818dSEnji Cooper 8026*132f818dSEnji Cooper # save warnings/boilerplate of simple test code 8027*132f818dSEnji Cooper _LT_COMPILER_BOILERPLATE 8028*132f818dSEnji Cooper _LT_LINKER_BOILERPLATE 8029*132f818dSEnji Cooper 8030*132f818dSEnji Cooper # Allow CC to be a program name with arguments. 8031*132f818dSEnji Cooper lt_save_CC=$CC 8032*132f818dSEnji Cooper lt_save_GCC=$GCC 8033*132f818dSEnji Cooper lt_save_CFLAGS=$CFLAGS 8034*132f818dSEnji Cooper CC=${FC-"f95"} 8035*132f818dSEnji Cooper CFLAGS=$FCFLAGS 8036*132f818dSEnji Cooper compiler=$CC 8037*132f818dSEnji Cooper GCC=$ac_cv_fc_compiler_gnu 8038*132f818dSEnji Cooper 8039*132f818dSEnji Cooper _LT_TAGVAR(compiler, $1)=$CC 8040*132f818dSEnji Cooper _LT_CC_BASENAME([$compiler]) 8041*132f818dSEnji Cooper 8042*132f818dSEnji Cooper if test -n "$compiler"; then 8043*132f818dSEnji Cooper AC_MSG_CHECKING([if libtool supports shared libraries]) 8044*132f818dSEnji Cooper AC_MSG_RESULT([$can_build_shared]) 8045*132f818dSEnji Cooper 8046*132f818dSEnji Cooper AC_MSG_CHECKING([whether to build shared libraries]) 8047*132f818dSEnji Cooper test no = "$can_build_shared" && enable_shared=no 8048*132f818dSEnji Cooper 8049*132f818dSEnji Cooper # On AIX, shared libraries and static libraries use the same namespace, and 8050*132f818dSEnji Cooper # are all built from PIC. 8051*132f818dSEnji Cooper case $host_os in 8052*132f818dSEnji Cooper aix3*) 8053*132f818dSEnji Cooper test yes = "$enable_shared" && enable_static=no 8054*132f818dSEnji Cooper if test -n "$RANLIB"; then 8055*132f818dSEnji Cooper archive_cmds="$archive_cmds~\$RANLIB \$lib" 8056*132f818dSEnji Cooper postinstall_cmds='$RANLIB $lib' 8057*132f818dSEnji Cooper fi 8058*132f818dSEnji Cooper ;; 8059*132f818dSEnji Cooper aix[[4-9]]*) 8060*132f818dSEnji Cooper if test ia64 != "$host_cpu"; then 8061*132f818dSEnji Cooper case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 8062*132f818dSEnji Cooper yes,aix,yes) ;; # shared object as lib.so file only 8063*132f818dSEnji Cooper yes,svr4,*) ;; # shared object as lib.so archive member only 8064*132f818dSEnji Cooper yes,*) enable_static=no ;; # shared object in lib.a archive as well 8065*132f818dSEnji Cooper esac 8066*132f818dSEnji Cooper fi 8067*132f818dSEnji Cooper ;; 8068*132f818dSEnji Cooper esac 8069*132f818dSEnji Cooper AC_MSG_RESULT([$enable_shared]) 8070*132f818dSEnji Cooper 8071*132f818dSEnji Cooper AC_MSG_CHECKING([whether to build static libraries]) 8072*132f818dSEnji Cooper # Make sure either enable_shared or enable_static is yes. 8073*132f818dSEnji Cooper test yes = "$enable_shared" || enable_static=yes 8074*132f818dSEnji Cooper AC_MSG_RESULT([$enable_static]) 8075*132f818dSEnji Cooper 8076*132f818dSEnji Cooper _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 8077*132f818dSEnji Cooper _LT_TAGVAR(LD, $1)=$LD 8078*132f818dSEnji Cooper 8079*132f818dSEnji Cooper ## CAVEAT EMPTOR: 8080*132f818dSEnji Cooper ## There is no encapsulation within the following macros, do not change 8081*132f818dSEnji Cooper ## the running order or otherwise move them around unless you know exactly 8082*132f818dSEnji Cooper ## what you are doing... 8083*132f818dSEnji Cooper _LT_SYS_HIDDEN_LIBDEPS($1) 8084*132f818dSEnji Cooper _LT_COMPILER_PIC($1) 8085*132f818dSEnji Cooper _LT_COMPILER_C_O($1) 8086*132f818dSEnji Cooper _LT_COMPILER_FILE_LOCKS($1) 8087*132f818dSEnji Cooper _LT_LINKER_SHLIBS($1) 8088*132f818dSEnji Cooper _LT_SYS_DYNAMIC_LINKER($1) 8089*132f818dSEnji Cooper _LT_LINKER_HARDCODE_LIBPATH($1) 8090*132f818dSEnji Cooper 8091*132f818dSEnji Cooper _LT_CONFIG($1) 8092*132f818dSEnji Cooper fi # test -n "$compiler" 8093*132f818dSEnji Cooper 8094*132f818dSEnji Cooper GCC=$lt_save_GCC 8095*132f818dSEnji Cooper CC=$lt_save_CC 8096*132f818dSEnji Cooper CFLAGS=$lt_save_CFLAGS 8097*132f818dSEnji Cooperfi # test yes != "$_lt_disable_FC" 8098*132f818dSEnji Cooper 8099*132f818dSEnji CooperAC_LANG_POP 8100*132f818dSEnji Cooper])# _LT_LANG_FC_CONFIG 8101*132f818dSEnji Cooper 8102*132f818dSEnji Cooper 8103*132f818dSEnji Cooper# _LT_LANG_GCJ_CONFIG([TAG]) 8104*132f818dSEnji Cooper# -------------------------- 8105*132f818dSEnji Cooper# Ensure that the configuration variables for the GNU Java Compiler compiler 8106*132f818dSEnji Cooper# are suitably defined. These variables are subsequently used by _LT_CONFIG 8107*132f818dSEnji Cooper# to write the compiler configuration to 'libtool'. 8108*132f818dSEnji Cooperm4_defun([_LT_LANG_GCJ_CONFIG], 8109*132f818dSEnji Cooper[AC_REQUIRE([LT_PROG_GCJ])dnl 8110*132f818dSEnji CooperAC_LANG_SAVE 8111*132f818dSEnji Cooper 8112*132f818dSEnji Cooper# Source file extension for Java test sources. 8113*132f818dSEnji Cooperac_ext=java 8114*132f818dSEnji Cooper 8115*132f818dSEnji Cooper# Object file extension for compiled Java test sources. 8116*132f818dSEnji Cooperobjext=o 8117*132f818dSEnji Cooper_LT_TAGVAR(objext, $1)=$objext 8118*132f818dSEnji Cooper 8119*132f818dSEnji Cooper# Code to be used in simple compile tests 8120*132f818dSEnji Cooperlt_simple_compile_test_code="class foo {}" 8121*132f818dSEnji Cooper 8122*132f818dSEnji Cooper# Code to be used in simple link tests 8123*132f818dSEnji Cooperlt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 8124*132f818dSEnji Cooper 8125*132f818dSEnji Cooper# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8126*132f818dSEnji Cooper_LT_TAG_COMPILER 8127*132f818dSEnji Cooper 8128*132f818dSEnji Cooper# save warnings/boilerplate of simple test code 8129*132f818dSEnji Cooper_LT_COMPILER_BOILERPLATE 8130*132f818dSEnji Cooper_LT_LINKER_BOILERPLATE 8131*132f818dSEnji Cooper 8132*132f818dSEnji Cooper# Allow CC to be a program name with arguments. 8133*132f818dSEnji Cooperlt_save_CC=$CC 8134*132f818dSEnji Cooperlt_save_CFLAGS=$CFLAGS 8135*132f818dSEnji Cooperlt_save_GCC=$GCC 8136*132f818dSEnji CooperGCC=yes 8137*132f818dSEnji CooperCC=${GCJ-"gcj"} 8138*132f818dSEnji CooperCFLAGS=$GCJFLAGS 8139*132f818dSEnji Coopercompiler=$CC 8140*132f818dSEnji Cooper_LT_TAGVAR(compiler, $1)=$CC 8141*132f818dSEnji Cooper_LT_TAGVAR(LD, $1)=$LD 8142*132f818dSEnji Cooper_LT_CC_BASENAME([$compiler]) 8143*132f818dSEnji Cooper 8144*132f818dSEnji Cooper# GCJ did not exist at the time GCC didn't implicitly link libc in. 8145*132f818dSEnji Cooper_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8146*132f818dSEnji Cooper 8147*132f818dSEnji Cooper_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8148*132f818dSEnji Cooper_LT_TAGVAR(reload_flag, $1)=$reload_flag 8149*132f818dSEnji Cooper_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8150*132f818dSEnji Cooper 8151*132f818dSEnji Cooper## CAVEAT EMPTOR: 8152*132f818dSEnji Cooper## There is no encapsulation within the following macros, do not change 8153*132f818dSEnji Cooper## the running order or otherwise move them around unless you know exactly 8154*132f818dSEnji Cooper## what you are doing... 8155*132f818dSEnji Cooperif test -n "$compiler"; then 8156*132f818dSEnji Cooper _LT_COMPILER_NO_RTTI($1) 8157*132f818dSEnji Cooper _LT_COMPILER_PIC($1) 8158*132f818dSEnji Cooper _LT_COMPILER_C_O($1) 8159*132f818dSEnji Cooper _LT_COMPILER_FILE_LOCKS($1) 8160*132f818dSEnji Cooper _LT_LINKER_SHLIBS($1) 8161*132f818dSEnji Cooper _LT_LINKER_HARDCODE_LIBPATH($1) 8162*132f818dSEnji Cooper 8163*132f818dSEnji Cooper _LT_CONFIG($1) 8164*132f818dSEnji Cooperfi 8165*132f818dSEnji Cooper 8166*132f818dSEnji CooperAC_LANG_RESTORE 8167*132f818dSEnji Cooper 8168*132f818dSEnji CooperGCC=$lt_save_GCC 8169*132f818dSEnji CooperCC=$lt_save_CC 8170*132f818dSEnji CooperCFLAGS=$lt_save_CFLAGS 8171*132f818dSEnji Cooper])# _LT_LANG_GCJ_CONFIG 8172*132f818dSEnji Cooper 8173*132f818dSEnji Cooper 8174*132f818dSEnji Cooper# _LT_LANG_GO_CONFIG([TAG]) 8175*132f818dSEnji Cooper# -------------------------- 8176*132f818dSEnji Cooper# Ensure that the configuration variables for the GNU Go compiler 8177*132f818dSEnji Cooper# are suitably defined. These variables are subsequently used by _LT_CONFIG 8178*132f818dSEnji Cooper# to write the compiler configuration to 'libtool'. 8179*132f818dSEnji Cooperm4_defun([_LT_LANG_GO_CONFIG], 8180*132f818dSEnji Cooper[AC_REQUIRE([LT_PROG_GO])dnl 8181*132f818dSEnji CooperAC_LANG_SAVE 8182*132f818dSEnji Cooper 8183*132f818dSEnji Cooper# Source file extension for Go test sources. 8184*132f818dSEnji Cooperac_ext=go 8185*132f818dSEnji Cooper 8186*132f818dSEnji Cooper# Object file extension for compiled Go test sources. 8187*132f818dSEnji Cooperobjext=o 8188*132f818dSEnji Cooper_LT_TAGVAR(objext, $1)=$objext 8189*132f818dSEnji Cooper 8190*132f818dSEnji Cooper# Code to be used in simple compile tests 8191*132f818dSEnji Cooperlt_simple_compile_test_code="package main; func main() { }" 8192*132f818dSEnji Cooper 8193*132f818dSEnji Cooper# Code to be used in simple link tests 8194*132f818dSEnji Cooperlt_simple_link_test_code='package main; func main() { }' 8195*132f818dSEnji Cooper 8196*132f818dSEnji Cooper# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8197*132f818dSEnji Cooper_LT_TAG_COMPILER 8198*132f818dSEnji Cooper 8199*132f818dSEnji Cooper# save warnings/boilerplate of simple test code 8200*132f818dSEnji Cooper_LT_COMPILER_BOILERPLATE 8201*132f818dSEnji Cooper_LT_LINKER_BOILERPLATE 8202*132f818dSEnji Cooper 8203*132f818dSEnji Cooper# Allow CC to be a program name with arguments. 8204*132f818dSEnji Cooperlt_save_CC=$CC 8205*132f818dSEnji Cooperlt_save_CFLAGS=$CFLAGS 8206*132f818dSEnji Cooperlt_save_GCC=$GCC 8207*132f818dSEnji CooperGCC=yes 8208*132f818dSEnji CooperCC=${GOC-"gccgo"} 8209*132f818dSEnji CooperCFLAGS=$GOFLAGS 8210*132f818dSEnji Coopercompiler=$CC 8211*132f818dSEnji Cooper_LT_TAGVAR(compiler, $1)=$CC 8212*132f818dSEnji Cooper_LT_TAGVAR(LD, $1)=$LD 8213*132f818dSEnji Cooper_LT_CC_BASENAME([$compiler]) 8214*132f818dSEnji Cooper 8215*132f818dSEnji Cooper# Go did not exist at the time GCC didn't implicitly link libc in. 8216*132f818dSEnji Cooper_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8217*132f818dSEnji Cooper 8218*132f818dSEnji Cooper_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8219*132f818dSEnji Cooper_LT_TAGVAR(reload_flag, $1)=$reload_flag 8220*132f818dSEnji Cooper_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8221*132f818dSEnji Cooper 8222*132f818dSEnji Cooper## CAVEAT EMPTOR: 8223*132f818dSEnji Cooper## There is no encapsulation within the following macros, do not change 8224*132f818dSEnji Cooper## the running order or otherwise move them around unless you know exactly 8225*132f818dSEnji Cooper## what you are doing... 8226*132f818dSEnji Cooperif test -n "$compiler"; then 8227*132f818dSEnji Cooper _LT_COMPILER_NO_RTTI($1) 8228*132f818dSEnji Cooper _LT_COMPILER_PIC($1) 8229*132f818dSEnji Cooper _LT_COMPILER_C_O($1) 8230*132f818dSEnji Cooper _LT_COMPILER_FILE_LOCKS($1) 8231*132f818dSEnji Cooper _LT_LINKER_SHLIBS($1) 8232*132f818dSEnji Cooper _LT_LINKER_HARDCODE_LIBPATH($1) 8233*132f818dSEnji Cooper 8234*132f818dSEnji Cooper _LT_CONFIG($1) 8235*132f818dSEnji Cooperfi 8236*132f818dSEnji Cooper 8237*132f818dSEnji CooperAC_LANG_RESTORE 8238*132f818dSEnji Cooper 8239*132f818dSEnji CooperGCC=$lt_save_GCC 8240*132f818dSEnji CooperCC=$lt_save_CC 8241*132f818dSEnji CooperCFLAGS=$lt_save_CFLAGS 8242*132f818dSEnji Cooper])# _LT_LANG_GO_CONFIG 8243*132f818dSEnji Cooper 8244*132f818dSEnji Cooper 8245*132f818dSEnji Cooper# _LT_LANG_RC_CONFIG([TAG]) 8246*132f818dSEnji Cooper# ------------------------- 8247*132f818dSEnji Cooper# Ensure that the configuration variables for the Windows resource compiler 8248*132f818dSEnji Cooper# are suitably defined. These variables are subsequently used by _LT_CONFIG 8249*132f818dSEnji Cooper# to write the compiler configuration to 'libtool'. 8250*132f818dSEnji Cooperm4_defun([_LT_LANG_RC_CONFIG], 8251*132f818dSEnji Cooper[AC_REQUIRE([LT_PROG_RC])dnl 8252*132f818dSEnji CooperAC_LANG_SAVE 8253*132f818dSEnji Cooper 8254*132f818dSEnji Cooper# Source file extension for RC test sources. 8255*132f818dSEnji Cooperac_ext=rc 8256*132f818dSEnji Cooper 8257*132f818dSEnji Cooper# Object file extension for compiled RC test sources. 8258*132f818dSEnji Cooperobjext=o 8259*132f818dSEnji Cooper_LT_TAGVAR(objext, $1)=$objext 8260*132f818dSEnji Cooper 8261*132f818dSEnji Cooper# Code to be used in simple compile tests 8262*132f818dSEnji Cooperlt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8263*132f818dSEnji Cooper 8264*132f818dSEnji Cooper# Code to be used in simple link tests 8265*132f818dSEnji Cooperlt_simple_link_test_code=$lt_simple_compile_test_code 8266*132f818dSEnji Cooper 8267*132f818dSEnji Cooper# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8268*132f818dSEnji Cooper_LT_TAG_COMPILER 8269*132f818dSEnji Cooper 8270*132f818dSEnji Cooper# save warnings/boilerplate of simple test code 8271*132f818dSEnji Cooper_LT_COMPILER_BOILERPLATE 8272*132f818dSEnji Cooper_LT_LINKER_BOILERPLATE 8273*132f818dSEnji Cooper 8274*132f818dSEnji Cooper# Allow CC to be a program name with arguments. 8275*132f818dSEnji Cooperlt_save_CC=$CC 8276*132f818dSEnji Cooperlt_save_CFLAGS=$CFLAGS 8277*132f818dSEnji Cooperlt_save_GCC=$GCC 8278*132f818dSEnji CooperGCC= 8279*132f818dSEnji CooperCC=${RC-"windres"} 8280*132f818dSEnji CooperCFLAGS= 8281*132f818dSEnji Coopercompiler=$CC 8282*132f818dSEnji Cooper_LT_TAGVAR(compiler, $1)=$CC 8283*132f818dSEnji Cooper_LT_CC_BASENAME([$compiler]) 8284*132f818dSEnji Cooper_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8285*132f818dSEnji Cooper 8286*132f818dSEnji Cooperif test -n "$compiler"; then 8287*132f818dSEnji Cooper : 8288*132f818dSEnji Cooper _LT_CONFIG($1) 8289*132f818dSEnji Cooperfi 8290*132f818dSEnji Cooper 8291*132f818dSEnji CooperGCC=$lt_save_GCC 8292*132f818dSEnji CooperAC_LANG_RESTORE 8293*132f818dSEnji CooperCC=$lt_save_CC 8294*132f818dSEnji CooperCFLAGS=$lt_save_CFLAGS 8295*132f818dSEnji Cooper])# _LT_LANG_RC_CONFIG 8296*132f818dSEnji Cooper 8297*132f818dSEnji Cooper 8298*132f818dSEnji Cooper# LT_PROG_GCJ 8299*132f818dSEnji Cooper# ----------- 8300*132f818dSEnji CooperAC_DEFUN([LT_PROG_GCJ], 8301*132f818dSEnji Cooper[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 8302*132f818dSEnji Cooper [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 8303*132f818dSEnji Cooper [AC_CHECK_TOOL(GCJ, gcj,) 8304*132f818dSEnji Cooper test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 8305*132f818dSEnji Cooper AC_SUBST(GCJFLAGS)])])[]dnl 8306*132f818dSEnji Cooper]) 8307*132f818dSEnji Cooper 8308*132f818dSEnji Cooper# Old name: 8309*132f818dSEnji CooperAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 8310*132f818dSEnji Cooperdnl aclocal-1.4 backwards compatibility: 8311*132f818dSEnji Cooperdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8312*132f818dSEnji Cooper 8313*132f818dSEnji Cooper 8314*132f818dSEnji Cooper# LT_PROG_GO 8315*132f818dSEnji Cooper# ---------- 8316*132f818dSEnji CooperAC_DEFUN([LT_PROG_GO], 8317*132f818dSEnji Cooper[AC_CHECK_TOOL(GOC, gccgo,) 8318*132f818dSEnji Cooper]) 8319*132f818dSEnji Cooper 8320*132f818dSEnji Cooper 8321*132f818dSEnji Cooper# LT_PROG_RC 8322*132f818dSEnji Cooper# ---------- 8323*132f818dSEnji CooperAC_DEFUN([LT_PROG_RC], 8324*132f818dSEnji Cooper[AC_CHECK_TOOL(RC, windres,) 8325*132f818dSEnji Cooper]) 8326*132f818dSEnji Cooper 8327*132f818dSEnji Cooper# Old name: 8328*132f818dSEnji CooperAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 8329*132f818dSEnji Cooperdnl aclocal-1.4 backwards compatibility: 8330*132f818dSEnji Cooperdnl AC_DEFUN([LT_AC_PROG_RC], []) 8331*132f818dSEnji Cooper 8332*132f818dSEnji Cooper 8333*132f818dSEnji Cooper# _LT_DECL_EGREP 8334*132f818dSEnji Cooper# -------------- 8335*132f818dSEnji Cooper# If we don't have a new enough Autoconf to choose the best grep 8336*132f818dSEnji Cooper# available, choose the one first in the user's PATH. 8337*132f818dSEnji Cooperm4_defun([_LT_DECL_EGREP], 8338*132f818dSEnji Cooper[AC_REQUIRE([AC_PROG_EGREP])dnl 8339*132f818dSEnji CooperAC_REQUIRE([AC_PROG_FGREP])dnl 8340*132f818dSEnji Coopertest -z "$GREP" && GREP=grep 8341*132f818dSEnji Cooper_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 8342*132f818dSEnji Cooper_LT_DECL([], [EGREP], [1], [An ERE matcher]) 8343*132f818dSEnji Cooper_LT_DECL([], [FGREP], [1], [A literal string matcher]) 8344*132f818dSEnji Cooperdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 8345*132f818dSEnji CooperAC_SUBST([GREP]) 8346*132f818dSEnji Cooper]) 8347*132f818dSEnji Cooper 8348*132f818dSEnji Cooper 8349*132f818dSEnji Cooper# _LT_DECL_OBJDUMP 8350*132f818dSEnji Cooper# -------------- 8351*132f818dSEnji Cooper# If we don't have a new enough Autoconf to choose the best objdump 8352*132f818dSEnji Cooper# available, choose the one first in the user's PATH. 8353*132f818dSEnji Cooperm4_defun([_LT_DECL_OBJDUMP], 8354*132f818dSEnji Cooper[AC_CHECK_TOOL(OBJDUMP, objdump, false) 8355*132f818dSEnji Coopertest -z "$OBJDUMP" && OBJDUMP=objdump 8356*132f818dSEnji Cooper_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 8357*132f818dSEnji CooperAC_SUBST([OBJDUMP]) 8358*132f818dSEnji Cooper]) 8359*132f818dSEnji Cooper 8360*132f818dSEnji Cooper# _LT_DECL_DLLTOOL 8361*132f818dSEnji Cooper# ---------------- 8362*132f818dSEnji Cooper# Ensure DLLTOOL variable is set. 8363*132f818dSEnji Cooperm4_defun([_LT_DECL_DLLTOOL], 8364*132f818dSEnji Cooper[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8365*132f818dSEnji Coopertest -z "$DLLTOOL" && DLLTOOL=dlltool 8366*132f818dSEnji Cooper_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 8367*132f818dSEnji CooperAC_SUBST([DLLTOOL]) 8368*132f818dSEnji Cooper]) 8369*132f818dSEnji Cooper 8370*132f818dSEnji Cooper# _LT_DECL_FILECMD 8371*132f818dSEnji Cooper# ---------------- 8372*132f818dSEnji Cooper# Check for a file(cmd) program that can be used to detect file type and magic 8373*132f818dSEnji Cooperm4_defun([_LT_DECL_FILECMD], 8374*132f818dSEnji Cooper[AC_CHECK_PROG([FILECMD], [file], [file], [:]) 8375*132f818dSEnji Cooper_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) 8376*132f818dSEnji Cooper])# _LD_DECL_FILECMD 8377*132f818dSEnji Cooper 8378*132f818dSEnji Cooper# _LT_DECL_SED 8379*132f818dSEnji Cooper# ------------ 8380*132f818dSEnji Cooper# Check for a fully-functional sed program, that truncates 8381*132f818dSEnji Cooper# as few characters as possible. Prefer GNU sed if found. 8382*132f818dSEnji Cooperm4_defun([_LT_DECL_SED], 8383*132f818dSEnji Cooper[AC_PROG_SED 8384*132f818dSEnji Coopertest -z "$SED" && SED=sed 8385*132f818dSEnji CooperXsed="$SED -e 1s/^X//" 8386*132f818dSEnji Cooper_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 8387*132f818dSEnji Cooper_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 8388*132f818dSEnji Cooper [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 8389*132f818dSEnji Cooper])# _LT_DECL_SED 8390*132f818dSEnji Cooperdnl aclocal-1.4 backwards compatibility: 8391*132f818dSEnji Cooperdnl AC_DEFUN([LT_AC_PROG_SED], []) 8392*132f818dSEnji Cooper 8393*132f818dSEnji Cooper 8394*132f818dSEnji Cooper# _LT_CHECK_SHELL_FEATURES 8395*132f818dSEnji Cooper# ------------------------ 8396*132f818dSEnji Cooper# Find out whether the shell is Bourne or XSI compatible, 8397*132f818dSEnji Cooper# or has some other useful features. 8398*132f818dSEnji Cooperm4_defun([_LT_CHECK_SHELL_FEATURES], 8399*132f818dSEnji Cooper[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 8400*132f818dSEnji Cooper lt_unset=unset 8401*132f818dSEnji Cooperelse 8402*132f818dSEnji Cooper lt_unset=false 8403*132f818dSEnji Cooperfi 8404*132f818dSEnji Cooper_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8405*132f818dSEnji Cooper 8406*132f818dSEnji Cooper# test EBCDIC or ASCII 8407*132f818dSEnji Coopercase `echo X|tr X '\101'` in 8408*132f818dSEnji Cooper A) # ASCII based system 8409*132f818dSEnji Cooper # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 8410*132f818dSEnji Cooper lt_SP2NL='tr \040 \012' 8411*132f818dSEnji Cooper lt_NL2SP='tr \015\012 \040\040' 8412*132f818dSEnji Cooper ;; 8413*132f818dSEnji Cooper *) # EBCDIC based system 8414*132f818dSEnji Cooper lt_SP2NL='tr \100 \n' 8415*132f818dSEnji Cooper lt_NL2SP='tr \r\n \100\100' 8416*132f818dSEnji Cooper ;; 8417*132f818dSEnji Cooperesac 8418*132f818dSEnji Cooper_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 8419*132f818dSEnji Cooper_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 8420*132f818dSEnji Cooper])# _LT_CHECK_SHELL_FEATURES 8421*132f818dSEnji Cooper 8422*132f818dSEnji Cooper 8423*132f818dSEnji Cooper# _LT_PATH_CONVERSION_FUNCTIONS 8424*132f818dSEnji Cooper# ----------------------------- 8425*132f818dSEnji Cooper# Determine what file name conversion functions should be used by 8426*132f818dSEnji Cooper# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 8427*132f818dSEnji Cooper# for certain cross-compile configurations and native mingw. 8428*132f818dSEnji Cooperm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 8429*132f818dSEnji Cooper[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8430*132f818dSEnji CooperAC_REQUIRE([AC_CANONICAL_BUILD])dnl 8431*132f818dSEnji CooperAC_MSG_CHECKING([how to convert $build file names to $host format]) 8432*132f818dSEnji CooperAC_CACHE_VAL(lt_cv_to_host_file_cmd, 8433*132f818dSEnji Cooper[case $host in 8434*132f818dSEnji Cooper *-*-mingw* ) 8435*132f818dSEnji Cooper case $build in 8436*132f818dSEnji Cooper *-*-mingw* | *-*-windows* ) # actually msys 8437*132f818dSEnji Cooper lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 8438*132f818dSEnji Cooper ;; 8439*132f818dSEnji Cooper *-*-cygwin* ) 8440*132f818dSEnji Cooper lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 8441*132f818dSEnji Cooper ;; 8442*132f818dSEnji Cooper * ) # otherwise, assume *nix 8443*132f818dSEnji Cooper lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 8444*132f818dSEnji Cooper ;; 8445*132f818dSEnji Cooper esac 8446*132f818dSEnji Cooper ;; 8447*132f818dSEnji Cooper *-*-cygwin* ) 8448*132f818dSEnji Cooper case $build in 8449*132f818dSEnji Cooper *-*-mingw* | *-*-windows* ) # actually msys 8450*132f818dSEnji Cooper lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 8451*132f818dSEnji Cooper ;; 8452*132f818dSEnji Cooper *-*-cygwin* ) 8453*132f818dSEnji Cooper lt_cv_to_host_file_cmd=func_convert_file_noop 8454*132f818dSEnji Cooper ;; 8455*132f818dSEnji Cooper * ) # otherwise, assume *nix 8456*132f818dSEnji Cooper lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 8457*132f818dSEnji Cooper ;; 8458*132f818dSEnji Cooper esac 8459*132f818dSEnji Cooper ;; 8460*132f818dSEnji Cooper * ) # unhandled hosts (and "normal" native builds) 8461*132f818dSEnji Cooper lt_cv_to_host_file_cmd=func_convert_file_noop 8462*132f818dSEnji Cooper ;; 8463*132f818dSEnji Cooperesac 8464*132f818dSEnji Cooper]) 8465*132f818dSEnji Cooperto_host_file_cmd=$lt_cv_to_host_file_cmd 8466*132f818dSEnji CooperAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 8467*132f818dSEnji Cooper_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 8468*132f818dSEnji Cooper [0], [convert $build file names to $host format])dnl 8469*132f818dSEnji Cooper 8470*132f818dSEnji CooperAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 8471*132f818dSEnji CooperAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 8472*132f818dSEnji Cooper[#assume ordinary cross tools, or native build. 8473*132f818dSEnji Cooperlt_cv_to_tool_file_cmd=func_convert_file_noop 8474*132f818dSEnji Coopercase $host in 8475*132f818dSEnji Cooper *-*-mingw* | *-*-windows* ) 8476*132f818dSEnji Cooper case $build in 8477*132f818dSEnji Cooper *-*-mingw* | *-*-windows* ) # actually msys 8478*132f818dSEnji Cooper lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 8479*132f818dSEnji Cooper ;; 8480*132f818dSEnji Cooper esac 8481*132f818dSEnji Cooper ;; 8482*132f818dSEnji Cooperesac 8483*132f818dSEnji Cooper]) 8484*132f818dSEnji Cooperto_tool_file_cmd=$lt_cv_to_tool_file_cmd 8485*132f818dSEnji CooperAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 8486*132f818dSEnji Cooper_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 8487*132f818dSEnji Cooper [0], [convert $build files to toolchain format])dnl 8488*132f818dSEnji Cooper])# _LT_PATH_CONVERSION_FUNCTIONS 8489