1*a376eb32SXin Li# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2*a376eb32SXin Li# 3*a376eb32SXin Li# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 4*a376eb32SXin Li# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 5*a376eb32SXin Li# Foundation, Inc. 6*a376eb32SXin Li# Written by Gordon Matzigkeit, 1996 7*a376eb32SXin Li# 8*a376eb32SXin Li# This file is free software; the Free Software Foundation gives 9*a376eb32SXin Li# unlimited permission to copy and/or distribute it, with or without 10*a376eb32SXin Li# modifications, as long as this notice is preserved. 11*a376eb32SXin Li 12*a376eb32SXin Lim4_define([_LT_COPYING], [dnl 13*a376eb32SXin Li# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 14*a376eb32SXin Li# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 15*a376eb32SXin Li# Foundation, Inc. 16*a376eb32SXin Li# Written by Gordon Matzigkeit, 1996 17*a376eb32SXin Li# 18*a376eb32SXin Li# This file is part of GNU Libtool. 19*a376eb32SXin Li# 20*a376eb32SXin Li# GNU Libtool is free software; you can redistribute it and/or 21*a376eb32SXin Li# modify it under the terms of the GNU General Public License as 22*a376eb32SXin Li# published by the Free Software Foundation; either version 2 of 23*a376eb32SXin Li# the License, or (at your option) any later version. 24*a376eb32SXin Li# 25*a376eb32SXin Li# As a special exception to the GNU General Public License, 26*a376eb32SXin Li# if you distribute this file as part of a program or library that 27*a376eb32SXin Li# is built using GNU Libtool, you may include this file under the 28*a376eb32SXin Li# same distribution terms that you use for the rest of that program. 29*a376eb32SXin Li# 30*a376eb32SXin Li# GNU Libtool is distributed in the hope that it will be useful, 31*a376eb32SXin Li# but WITHOUT ANY WARRANTY; without even the implied warranty of 32*a376eb32SXin Li# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 33*a376eb32SXin Li# GNU General Public License for more details. 34*a376eb32SXin Li# 35*a376eb32SXin Li# You should have received a copy of the GNU General Public License 36*a376eb32SXin Li# along with GNU Libtool; see the file COPYING. If not, a copy 37*a376eb32SXin Li# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 38*a376eb32SXin Li# obtained by writing to the Free Software Foundation, Inc., 39*a376eb32SXin Li# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 40*a376eb32SXin Li]) 41*a376eb32SXin Li 42*a376eb32SXin Li# serial 57 LT_INIT 43*a376eb32SXin Li 44*a376eb32SXin Li 45*a376eb32SXin Li# LT_PREREQ(VERSION) 46*a376eb32SXin Li# ------------------ 47*a376eb32SXin Li# Complain and exit if this libtool version is less that VERSION. 48*a376eb32SXin Lim4_defun([LT_PREREQ], 49*a376eb32SXin Li[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 50*a376eb32SXin Li [m4_default([$3], 51*a376eb32SXin Li [m4_fatal([Libtool version $1 or higher is required], 52*a376eb32SXin Li 63)])], 53*a376eb32SXin Li [$2])]) 54*a376eb32SXin Li 55*a376eb32SXin Li 56*a376eb32SXin Li# _LT_CHECK_BUILDDIR 57*a376eb32SXin Li# ------------------ 58*a376eb32SXin Li# Complain if the absolute build directory name contains unusual characters 59*a376eb32SXin Lim4_defun([_LT_CHECK_BUILDDIR], 60*a376eb32SXin Li[case `pwd` in 61*a376eb32SXin Li *\ * | *\ *) 62*a376eb32SXin Li AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 63*a376eb32SXin Liesac 64*a376eb32SXin Li]) 65*a376eb32SXin Li 66*a376eb32SXin Li 67*a376eb32SXin Li# LT_INIT([OPTIONS]) 68*a376eb32SXin Li# ------------------ 69*a376eb32SXin LiAC_DEFUN([LT_INIT], 70*a376eb32SXin Li[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 71*a376eb32SXin LiAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 72*a376eb32SXin LiAC_BEFORE([$0], [LT_LANG])dnl 73*a376eb32SXin LiAC_BEFORE([$0], [LT_OUTPUT])dnl 74*a376eb32SXin LiAC_BEFORE([$0], [LTDL_INIT])dnl 75*a376eb32SXin Lim4_require([_LT_CHECK_BUILDDIR])dnl 76*a376eb32SXin Li 77*a376eb32SXin Lidnl Autoconf doesn't catch unexpanded LT_ macros by default: 78*a376eb32SXin Lim4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 79*a376eb32SXin Lim4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 80*a376eb32SXin Lidnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 81*a376eb32SXin Lidnl unless we require an AC_DEFUNed macro: 82*a376eb32SXin LiAC_REQUIRE([LTOPTIONS_VERSION])dnl 83*a376eb32SXin LiAC_REQUIRE([LTSUGAR_VERSION])dnl 84*a376eb32SXin LiAC_REQUIRE([LTVERSION_VERSION])dnl 85*a376eb32SXin LiAC_REQUIRE([LTOBSOLETE_VERSION])dnl 86*a376eb32SXin Lim4_require([_LT_PROG_LTMAIN])dnl 87*a376eb32SXin Li 88*a376eb32SXin Li_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 89*a376eb32SXin Li 90*a376eb32SXin Lidnl Parse OPTIONS 91*a376eb32SXin Li_LT_SET_OPTIONS([$0], [$1]) 92*a376eb32SXin Li 93*a376eb32SXin Li# This can be used to rebuild libtool when needed 94*a376eb32SXin LiLIBTOOL_DEPS="$ltmain" 95*a376eb32SXin Li 96*a376eb32SXin Li# Always use our own libtool. 97*a376eb32SXin LiLIBTOOL='$(SHELL) $(top_builddir)/libtool' 98*a376eb32SXin LiAC_SUBST(LIBTOOL)dnl 99*a376eb32SXin Li 100*a376eb32SXin Li_LT_SETUP 101*a376eb32SXin Li 102*a376eb32SXin Li# Only expand once: 103*a376eb32SXin Lim4_define([LT_INIT]) 104*a376eb32SXin Li])# LT_INIT 105*a376eb32SXin Li 106*a376eb32SXin Li# Old names: 107*a376eb32SXin LiAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 108*a376eb32SXin LiAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 109*a376eb32SXin Lidnl aclocal-1.4 backwards compatibility: 110*a376eb32SXin Lidnl AC_DEFUN([AC_PROG_LIBTOOL], []) 111*a376eb32SXin Lidnl AC_DEFUN([AM_PROG_LIBTOOL], []) 112*a376eb32SXin Li 113*a376eb32SXin Li 114*a376eb32SXin Li# _LT_CC_BASENAME(CC) 115*a376eb32SXin Li# ------------------- 116*a376eb32SXin Li# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 117*a376eb32SXin Lim4_defun([_LT_CC_BASENAME], 118*a376eb32SXin Li[for cc_temp in $1""; do 119*a376eb32SXin Li case $cc_temp in 120*a376eb32SXin Li compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 121*a376eb32SXin Li distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 122*a376eb32SXin Li \-*) ;; 123*a376eb32SXin Li *) break;; 124*a376eb32SXin Li esac 125*a376eb32SXin Lidone 126*a376eb32SXin Licc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 127*a376eb32SXin Li]) 128*a376eb32SXin Li 129*a376eb32SXin Li 130*a376eb32SXin Li# _LT_FILEUTILS_DEFAULTS 131*a376eb32SXin Li# ---------------------- 132*a376eb32SXin Li# It is okay to use these file commands and assume they have been set 133*a376eb32SXin Li# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 134*a376eb32SXin Lim4_defun([_LT_FILEUTILS_DEFAULTS], 135*a376eb32SXin Li[: ${CP="cp -f"} 136*a376eb32SXin Li: ${MV="mv -f"} 137*a376eb32SXin Li: ${RM="rm -f"} 138*a376eb32SXin Li])# _LT_FILEUTILS_DEFAULTS 139*a376eb32SXin Li 140*a376eb32SXin Li 141*a376eb32SXin Li# _LT_SETUP 142*a376eb32SXin Li# --------- 143*a376eb32SXin Lim4_defun([_LT_SETUP], 144*a376eb32SXin Li[AC_REQUIRE([AC_CANONICAL_HOST])dnl 145*a376eb32SXin LiAC_REQUIRE([AC_CANONICAL_BUILD])dnl 146*a376eb32SXin LiAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 147*a376eb32SXin LiAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 148*a376eb32SXin Li 149*a376eb32SXin Li_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 150*a376eb32SXin Lidnl 151*a376eb32SXin Li_LT_DECL([], [host_alias], [0], [The host system])dnl 152*a376eb32SXin Li_LT_DECL([], [host], [0])dnl 153*a376eb32SXin Li_LT_DECL([], [host_os], [0])dnl 154*a376eb32SXin Lidnl 155*a376eb32SXin Li_LT_DECL([], [build_alias], [0], [The build system])dnl 156*a376eb32SXin Li_LT_DECL([], [build], [0])dnl 157*a376eb32SXin Li_LT_DECL([], [build_os], [0])dnl 158*a376eb32SXin Lidnl 159*a376eb32SXin LiAC_REQUIRE([AC_PROG_CC])dnl 160*a376eb32SXin LiAC_REQUIRE([LT_PATH_LD])dnl 161*a376eb32SXin LiAC_REQUIRE([LT_PATH_NM])dnl 162*a376eb32SXin Lidnl 163*a376eb32SXin LiAC_REQUIRE([AC_PROG_LN_S])dnl 164*a376eb32SXin Litest -z "$LN_S" && LN_S="ln -s" 165*a376eb32SXin Li_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 166*a376eb32SXin Lidnl 167*a376eb32SXin LiAC_REQUIRE([LT_CMD_MAX_LEN])dnl 168*a376eb32SXin Li_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 169*a376eb32SXin Li_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 170*a376eb32SXin Lidnl 171*a376eb32SXin Lim4_require([_LT_FILEUTILS_DEFAULTS])dnl 172*a376eb32SXin Lim4_require([_LT_CHECK_SHELL_FEATURES])dnl 173*a376eb32SXin Lim4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 174*a376eb32SXin Lim4_require([_LT_CMD_RELOAD])dnl 175*a376eb32SXin Lim4_require([_LT_CHECK_MAGIC_METHOD])dnl 176*a376eb32SXin Lim4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 177*a376eb32SXin Lim4_require([_LT_CMD_OLD_ARCHIVE])dnl 178*a376eb32SXin Lim4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 179*a376eb32SXin Lim4_require([_LT_WITH_SYSROOT])dnl 180*a376eb32SXin Li 181*a376eb32SXin Li_LT_CONFIG_LIBTOOL_INIT([ 182*a376eb32SXin Li# See if we are running on zsh, and set the options which allow our 183*a376eb32SXin Li# commands through without removal of \ escapes INIT. 184*a376eb32SXin Liif test -n "\${ZSH_VERSION+set}" ; then 185*a376eb32SXin Li setopt NO_GLOB_SUBST 186*a376eb32SXin Lifi 187*a376eb32SXin Li]) 188*a376eb32SXin Liif test -n "${ZSH_VERSION+set}" ; then 189*a376eb32SXin Li setopt NO_GLOB_SUBST 190*a376eb32SXin Lifi 191*a376eb32SXin Li 192*a376eb32SXin Li_LT_CHECK_OBJDIR 193*a376eb32SXin Li 194*a376eb32SXin Lim4_require([_LT_TAG_COMPILER])dnl 195*a376eb32SXin Li 196*a376eb32SXin Licase $host_os in 197*a376eb32SXin Liaix3*) 198*a376eb32SXin Li # AIX sometimes has problems with the GCC collect2 program. For some 199*a376eb32SXin Li # reason, if we set the COLLECT_NAMES environment variable, the problems 200*a376eb32SXin Li # vanish in a puff of smoke. 201*a376eb32SXin Li if test "X${COLLECT_NAMES+set}" != Xset; then 202*a376eb32SXin Li COLLECT_NAMES= 203*a376eb32SXin Li export COLLECT_NAMES 204*a376eb32SXin Li fi 205*a376eb32SXin Li ;; 206*a376eb32SXin Liesac 207*a376eb32SXin Li 208*a376eb32SXin Li# Global variables: 209*a376eb32SXin Liofile=libtool 210*a376eb32SXin Lican_build_shared=yes 211*a376eb32SXin Li 212*a376eb32SXin Li# All known linkers require a `.a' archive for static linking (except MSVC, 213*a376eb32SXin Li# which needs '.lib'). 214*a376eb32SXin Lilibext=a 215*a376eb32SXin Li 216*a376eb32SXin Liwith_gnu_ld="$lt_cv_prog_gnu_ld" 217*a376eb32SXin Li 218*a376eb32SXin Liold_CC="$CC" 219*a376eb32SXin Liold_CFLAGS="$CFLAGS" 220*a376eb32SXin Li 221*a376eb32SXin Li# Set sane defaults for various variables 222*a376eb32SXin Litest -z "$CC" && CC=cc 223*a376eb32SXin Litest -z "$LTCC" && LTCC=$CC 224*a376eb32SXin Litest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 225*a376eb32SXin Litest -z "$LD" && LD=ld 226*a376eb32SXin Litest -z "$ac_objext" && ac_objext=o 227*a376eb32SXin Li 228*a376eb32SXin Li_LT_CC_BASENAME([$compiler]) 229*a376eb32SXin Li 230*a376eb32SXin Li# Only perform the check for file, if the check method requires it 231*a376eb32SXin Litest -z "$MAGIC_CMD" && MAGIC_CMD=file 232*a376eb32SXin Licase $deplibs_check_method in 233*a376eb32SXin Lifile_magic*) 234*a376eb32SXin Li if test "$file_magic_cmd" = '$MAGIC_CMD'; then 235*a376eb32SXin Li _LT_PATH_MAGIC 236*a376eb32SXin Li fi 237*a376eb32SXin Li ;; 238*a376eb32SXin Liesac 239*a376eb32SXin Li 240*a376eb32SXin Li# Use C for the default configuration in the libtool script 241*a376eb32SXin LiLT_SUPPORTED_TAG([CC]) 242*a376eb32SXin Li_LT_LANG_C_CONFIG 243*a376eb32SXin Li_LT_LANG_DEFAULT_CONFIG 244*a376eb32SXin Li_LT_CONFIG_COMMANDS 245*a376eb32SXin Li])# _LT_SETUP 246*a376eb32SXin Li 247*a376eb32SXin Li 248*a376eb32SXin Li# _LT_PREPARE_SED_QUOTE_VARS 249*a376eb32SXin Li# -------------------------- 250*a376eb32SXin Li# Define a few sed substitution that help us do robust quoting. 251*a376eb32SXin Lim4_defun([_LT_PREPARE_SED_QUOTE_VARS], 252*a376eb32SXin Li[# Backslashify metacharacters that are still active within 253*a376eb32SXin Li# double-quoted strings. 254*a376eb32SXin Lised_quote_subst='s/\([["`$\\]]\)/\\\1/g' 255*a376eb32SXin Li 256*a376eb32SXin Li# Same as above, but do not quote variable references. 257*a376eb32SXin Lidouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 258*a376eb32SXin Li 259*a376eb32SXin Li# Sed substitution to delay expansion of an escaped shell variable in a 260*a376eb32SXin Li# double_quote_subst'ed string. 261*a376eb32SXin Lidelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 262*a376eb32SXin Li 263*a376eb32SXin Li# Sed substitution to delay expansion of an escaped single quote. 264*a376eb32SXin Lidelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 265*a376eb32SXin Li 266*a376eb32SXin Li# Sed substitution to avoid accidental globbing in evaled expressions 267*a376eb32SXin Lino_glob_subst='s/\*/\\\*/g' 268*a376eb32SXin Li]) 269*a376eb32SXin Li 270*a376eb32SXin Li# _LT_PROG_LTMAIN 271*a376eb32SXin Li# --------------- 272*a376eb32SXin Li# Note that this code is called both from `configure', and `config.status' 273*a376eb32SXin Li# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 274*a376eb32SXin Li# `config.status' has no value for ac_aux_dir unless we are using Automake, 275*a376eb32SXin Li# so we pass a copy along to make sure it has a sensible value anyway. 276*a376eb32SXin Lim4_defun([_LT_PROG_LTMAIN], 277*a376eb32SXin Li[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 278*a376eb32SXin Li_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 279*a376eb32SXin Liltmain="$ac_aux_dir/ltmain.sh" 280*a376eb32SXin Li])# _LT_PROG_LTMAIN 281*a376eb32SXin Li 282*a376eb32SXin Li 283*a376eb32SXin Li## ------------------------------------- ## 284*a376eb32SXin Li## Accumulate code for creating libtool. ## 285*a376eb32SXin Li## ------------------------------------- ## 286*a376eb32SXin Li 287*a376eb32SXin Li# So that we can recreate a full libtool script including additional 288*a376eb32SXin Li# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 289*a376eb32SXin Li# in macros and then make a single call at the end using the `libtool' 290*a376eb32SXin Li# label. 291*a376eb32SXin Li 292*a376eb32SXin Li 293*a376eb32SXin Li# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 294*a376eb32SXin Li# ---------------------------------------- 295*a376eb32SXin Li# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 296*a376eb32SXin Lim4_define([_LT_CONFIG_LIBTOOL_INIT], 297*a376eb32SXin Li[m4_ifval([$1], 298*a376eb32SXin Li [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 299*a376eb32SXin Li [$1 300*a376eb32SXin Li])])]) 301*a376eb32SXin Li 302*a376eb32SXin Li# Initialize. 303*a376eb32SXin Lim4_define([_LT_OUTPUT_LIBTOOL_INIT]) 304*a376eb32SXin Li 305*a376eb32SXin Li 306*a376eb32SXin Li# _LT_CONFIG_LIBTOOL([COMMANDS]) 307*a376eb32SXin Li# ------------------------------ 308*a376eb32SXin Li# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 309*a376eb32SXin Lim4_define([_LT_CONFIG_LIBTOOL], 310*a376eb32SXin Li[m4_ifval([$1], 311*a376eb32SXin Li [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 312*a376eb32SXin Li [$1 313*a376eb32SXin Li])])]) 314*a376eb32SXin Li 315*a376eb32SXin Li# Initialize. 316*a376eb32SXin Lim4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 317*a376eb32SXin Li 318*a376eb32SXin Li 319*a376eb32SXin Li# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 320*a376eb32SXin Li# ----------------------------------------------------- 321*a376eb32SXin Lim4_defun([_LT_CONFIG_SAVE_COMMANDS], 322*a376eb32SXin Li[_LT_CONFIG_LIBTOOL([$1]) 323*a376eb32SXin Li_LT_CONFIG_LIBTOOL_INIT([$2]) 324*a376eb32SXin Li]) 325*a376eb32SXin Li 326*a376eb32SXin Li 327*a376eb32SXin Li# _LT_FORMAT_COMMENT([COMMENT]) 328*a376eb32SXin Li# ----------------------------- 329*a376eb32SXin Li# Add leading comment marks to the start of each line, and a trailing 330*a376eb32SXin Li# full-stop to the whole comment if one is not present already. 331*a376eb32SXin Lim4_define([_LT_FORMAT_COMMENT], 332*a376eb32SXin Li[m4_ifval([$1], [ 333*a376eb32SXin Lim4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 334*a376eb32SXin Li [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 335*a376eb32SXin Li)]) 336*a376eb32SXin Li 337*a376eb32SXin Li 338*a376eb32SXin Li 339*a376eb32SXin Li## ------------------------ ## 340*a376eb32SXin Li## FIXME: Eliminate VARNAME ## 341*a376eb32SXin Li## ------------------------ ## 342*a376eb32SXin Li 343*a376eb32SXin Li 344*a376eb32SXin Li# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 345*a376eb32SXin Li# ------------------------------------------------------------------- 346*a376eb32SXin Li# CONFIGNAME is the name given to the value in the libtool script. 347*a376eb32SXin Li# VARNAME is the (base) name used in the configure script. 348*a376eb32SXin Li# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 349*a376eb32SXin Li# VARNAME. Any other value will be used directly. 350*a376eb32SXin Lim4_define([_LT_DECL], 351*a376eb32SXin Li[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 352*a376eb32SXin Li [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 353*a376eb32SXin Li [m4_ifval([$1], [$1], [$2])]) 354*a376eb32SXin Li lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 355*a376eb32SXin Li m4_ifval([$4], 356*a376eb32SXin Li [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 357*a376eb32SXin Li lt_dict_add_subkey([lt_decl_dict], [$2], 358*a376eb32SXin Li [tagged?], [m4_ifval([$5], [yes], [no])])]) 359*a376eb32SXin Li]) 360*a376eb32SXin Li 361*a376eb32SXin Li 362*a376eb32SXin Li# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 363*a376eb32SXin Li# -------------------------------------------------------- 364*a376eb32SXin Lim4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 365*a376eb32SXin Li 366*a376eb32SXin Li 367*a376eb32SXin Li# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 368*a376eb32SXin Li# ------------------------------------------------ 369*a376eb32SXin Lim4_define([lt_decl_tag_varnames], 370*a376eb32SXin Li[_lt_decl_filter([tagged?], [yes], $@)]) 371*a376eb32SXin Li 372*a376eb32SXin Li 373*a376eb32SXin Li# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 374*a376eb32SXin Li# --------------------------------------------------------- 375*a376eb32SXin Lim4_define([_lt_decl_filter], 376*a376eb32SXin Li[m4_case([$#], 377*a376eb32SXin Li [0], [m4_fatal([$0: too few arguments: $#])], 378*a376eb32SXin Li [1], [m4_fatal([$0: too few arguments: $#: $1])], 379*a376eb32SXin Li [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 380*a376eb32SXin Li [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 381*a376eb32SXin Li [lt_dict_filter([lt_decl_dict], $@)])[]dnl 382*a376eb32SXin Li]) 383*a376eb32SXin Li 384*a376eb32SXin Li 385*a376eb32SXin Li# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 386*a376eb32SXin Li# -------------------------------------------------- 387*a376eb32SXin Lim4_define([lt_decl_quote_varnames], 388*a376eb32SXin Li[_lt_decl_filter([value], [1], $@)]) 389*a376eb32SXin Li 390*a376eb32SXin Li 391*a376eb32SXin Li# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 392*a376eb32SXin Li# --------------------------------------------------- 393*a376eb32SXin Lim4_define([lt_decl_dquote_varnames], 394*a376eb32SXin Li[_lt_decl_filter([value], [2], $@)]) 395*a376eb32SXin Li 396*a376eb32SXin Li 397*a376eb32SXin Li# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 398*a376eb32SXin Li# --------------------------------------------------- 399*a376eb32SXin Lim4_define([lt_decl_varnames_tagged], 400*a376eb32SXin Li[m4_assert([$# <= 2])dnl 401*a376eb32SXin Li_$0(m4_quote(m4_default([$1], [[, ]])), 402*a376eb32SXin Li m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 403*a376eb32SXin Li m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 404*a376eb32SXin Lim4_define([_lt_decl_varnames_tagged], 405*a376eb32SXin Li[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 406*a376eb32SXin Li 407*a376eb32SXin Li 408*a376eb32SXin Li# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 409*a376eb32SXin Li# ------------------------------------------------ 410*a376eb32SXin Lim4_define([lt_decl_all_varnames], 411*a376eb32SXin Li[_$0(m4_quote(m4_default([$1], [[, ]])), 412*a376eb32SXin Li m4_if([$2], [], 413*a376eb32SXin Li m4_quote(lt_decl_varnames), 414*a376eb32SXin Li m4_quote(m4_shift($@))))[]dnl 415*a376eb32SXin Li]) 416*a376eb32SXin Lim4_define([_lt_decl_all_varnames], 417*a376eb32SXin Li[lt_join($@, lt_decl_varnames_tagged([$1], 418*a376eb32SXin Li lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 419*a376eb32SXin Li]) 420*a376eb32SXin Li 421*a376eb32SXin Li 422*a376eb32SXin Li# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 423*a376eb32SXin Li# ------------------------------------ 424*a376eb32SXin Li# Quote a variable value, and forward it to `config.status' so that its 425*a376eb32SXin Li# declaration there will have the same value as in `configure'. VARNAME 426*a376eb32SXin Li# must have a single quote delimited value for this to work. 427*a376eb32SXin Lim4_define([_LT_CONFIG_STATUS_DECLARE], 428*a376eb32SXin Li[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 429*a376eb32SXin Li 430*a376eb32SXin Li 431*a376eb32SXin Li# _LT_CONFIG_STATUS_DECLARATIONS 432*a376eb32SXin Li# ------------------------------ 433*a376eb32SXin Li# We delimit libtool config variables with single quotes, so when 434*a376eb32SXin Li# we write them to config.status, we have to be sure to quote all 435*a376eb32SXin Li# embedded single quotes properly. In configure, this macro expands 436*a376eb32SXin Li# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 437*a376eb32SXin Li# 438*a376eb32SXin Li# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 439*a376eb32SXin Lim4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 440*a376eb32SXin Li[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 441*a376eb32SXin Li [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 442*a376eb32SXin Li 443*a376eb32SXin Li 444*a376eb32SXin Li# _LT_LIBTOOL_TAGS 445*a376eb32SXin Li# ---------------- 446*a376eb32SXin Li# Output comment and list of tags supported by the script 447*a376eb32SXin Lim4_defun([_LT_LIBTOOL_TAGS], 448*a376eb32SXin Li[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 449*a376eb32SXin Liavailable_tags="_LT_TAGS"dnl 450*a376eb32SXin Li]) 451*a376eb32SXin Li 452*a376eb32SXin Li 453*a376eb32SXin Li# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 454*a376eb32SXin Li# ----------------------------------- 455*a376eb32SXin Li# Extract the dictionary values for VARNAME (optionally with TAG) and 456*a376eb32SXin Li# expand to a commented shell variable setting: 457*a376eb32SXin Li# 458*a376eb32SXin Li# # Some comment about what VAR is for. 459*a376eb32SXin Li# visible_name=$lt_internal_name 460*a376eb32SXin Lim4_define([_LT_LIBTOOL_DECLARE], 461*a376eb32SXin Li[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 462*a376eb32SXin Li [description])))[]dnl 463*a376eb32SXin Lim4_pushdef([_libtool_name], 464*a376eb32SXin Li m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 465*a376eb32SXin Lim4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 466*a376eb32SXin Li [0], [_libtool_name=[$]$1], 467*a376eb32SXin Li [1], [_libtool_name=$lt_[]$1], 468*a376eb32SXin Li [2], [_libtool_name=$lt_[]$1], 469*a376eb32SXin Li [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 470*a376eb32SXin Lim4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 471*a376eb32SXin Li]) 472*a376eb32SXin Li 473*a376eb32SXin Li 474*a376eb32SXin Li# _LT_LIBTOOL_CONFIG_VARS 475*a376eb32SXin Li# ----------------------- 476*a376eb32SXin Li# Produce commented declarations of non-tagged libtool config variables 477*a376eb32SXin Li# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 478*a376eb32SXin Li# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 479*a376eb32SXin Li# section) are produced by _LT_LIBTOOL_TAG_VARS. 480*a376eb32SXin Lim4_defun([_LT_LIBTOOL_CONFIG_VARS], 481*a376eb32SXin Li[m4_foreach([_lt_var], 482*a376eb32SXin Li m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 483*a376eb32SXin Li [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 484*a376eb32SXin Li 485*a376eb32SXin Li 486*a376eb32SXin Li# _LT_LIBTOOL_TAG_VARS(TAG) 487*a376eb32SXin Li# ------------------------- 488*a376eb32SXin Lim4_define([_LT_LIBTOOL_TAG_VARS], 489*a376eb32SXin Li[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 490*a376eb32SXin Li [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 491*a376eb32SXin Li 492*a376eb32SXin Li 493*a376eb32SXin Li# _LT_TAGVAR(VARNAME, [TAGNAME]) 494*a376eb32SXin Li# ------------------------------ 495*a376eb32SXin Lim4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 496*a376eb32SXin Li 497*a376eb32SXin Li 498*a376eb32SXin Li# _LT_CONFIG_COMMANDS 499*a376eb32SXin Li# ------------------- 500*a376eb32SXin Li# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 501*a376eb32SXin Li# variables for single and double quote escaping we saved from calls 502*a376eb32SXin Li# to _LT_DECL, we can put quote escaped variables declarations 503*a376eb32SXin Li# into `config.status', and then the shell code to quote escape them in 504*a376eb32SXin Li# for loops in `config.status'. Finally, any additional code accumulated 505*a376eb32SXin Li# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 506*a376eb32SXin Lim4_defun([_LT_CONFIG_COMMANDS], 507*a376eb32SXin Li[AC_PROVIDE_IFELSE([LT_OUTPUT], 508*a376eb32SXin Li dnl If the libtool generation code has been placed in $CONFIG_LT, 509*a376eb32SXin Li dnl instead of duplicating it all over again into config.status, 510*a376eb32SXin Li dnl then we will have config.status run $CONFIG_LT later, so it 511*a376eb32SXin Li dnl needs to know what name is stored there: 512*a376eb32SXin Li [AC_CONFIG_COMMANDS([libtool], 513*a376eb32SXin Li [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 514*a376eb32SXin Li dnl If the libtool generation code is destined for config.status, 515*a376eb32SXin Li dnl expand the accumulated commands and init code now: 516*a376eb32SXin Li [AC_CONFIG_COMMANDS([libtool], 517*a376eb32SXin Li [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 518*a376eb32SXin Li])#_LT_CONFIG_COMMANDS 519*a376eb32SXin Li 520*a376eb32SXin Li 521*a376eb32SXin Li# Initialize. 522*a376eb32SXin Lim4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 523*a376eb32SXin Li[ 524*a376eb32SXin Li 525*a376eb32SXin Li# The HP-UX ksh and POSIX shell print the target directory to stdout 526*a376eb32SXin Li# if CDPATH is set. 527*a376eb32SXin Li(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 528*a376eb32SXin Li 529*a376eb32SXin Lised_quote_subst='$sed_quote_subst' 530*a376eb32SXin Lidouble_quote_subst='$double_quote_subst' 531*a376eb32SXin Lidelay_variable_subst='$delay_variable_subst' 532*a376eb32SXin Li_LT_CONFIG_STATUS_DECLARATIONS 533*a376eb32SXin LiLTCC='$LTCC' 534*a376eb32SXin LiLTCFLAGS='$LTCFLAGS' 535*a376eb32SXin Licompiler='$compiler_DEFAULT' 536*a376eb32SXin Li 537*a376eb32SXin Li# A function that is used when there is no print builtin or printf. 538*a376eb32SXin Lifunc_fallback_echo () 539*a376eb32SXin Li{ 540*a376eb32SXin Li eval 'cat <<_LTECHO_EOF 541*a376eb32SXin Li\$[]1 542*a376eb32SXin Li_LTECHO_EOF' 543*a376eb32SXin Li} 544*a376eb32SXin Li 545*a376eb32SXin Li# Quote evaled strings. 546*a376eb32SXin Lifor var in lt_decl_all_varnames([[ \ 547*a376eb32SXin Li]], lt_decl_quote_varnames); do 548*a376eb32SXin Li case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 549*a376eb32SXin Li *[[\\\\\\\`\\"\\\$]]*) 550*a376eb32SXin Li eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 551*a376eb32SXin Li ;; 552*a376eb32SXin Li *) 553*a376eb32SXin Li eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 554*a376eb32SXin Li ;; 555*a376eb32SXin Li esac 556*a376eb32SXin Lidone 557*a376eb32SXin Li 558*a376eb32SXin Li# Double-quote double-evaled strings. 559*a376eb32SXin Lifor var in lt_decl_all_varnames([[ \ 560*a376eb32SXin Li]], lt_decl_dquote_varnames); do 561*a376eb32SXin Li case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 562*a376eb32SXin Li *[[\\\\\\\`\\"\\\$]]*) 563*a376eb32SXin Li eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 564*a376eb32SXin Li ;; 565*a376eb32SXin Li *) 566*a376eb32SXin Li eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 567*a376eb32SXin Li ;; 568*a376eb32SXin Li esac 569*a376eb32SXin Lidone 570*a376eb32SXin Li 571*a376eb32SXin Li_LT_OUTPUT_LIBTOOL_INIT 572*a376eb32SXin Li]) 573*a376eb32SXin Li 574*a376eb32SXin Li# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 575*a376eb32SXin Li# ------------------------------------ 576*a376eb32SXin Li# Generate a child script FILE with all initialization necessary to 577*a376eb32SXin Li# reuse the environment learned by the parent script, and make the 578*a376eb32SXin Li# file executable. If COMMENT is supplied, it is inserted after the 579*a376eb32SXin Li# `#!' sequence but before initialization text begins. After this 580*a376eb32SXin Li# macro, additional text can be appended to FILE to form the body of 581*a376eb32SXin Li# the child script. The macro ends with non-zero status if the 582*a376eb32SXin Li# file could not be fully written (such as if the disk is full). 583*a376eb32SXin Lim4_ifdef([AS_INIT_GENERATED], 584*a376eb32SXin Li[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 585*a376eb32SXin Li[m4_defun([_LT_GENERATED_FILE_INIT], 586*a376eb32SXin Li[m4_require([AS_PREPARE])]dnl 587*a376eb32SXin Li[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 588*a376eb32SXin Li[lt_write_fail=0 589*a376eb32SXin Licat >$1 <<_ASEOF || lt_write_fail=1 590*a376eb32SXin Li#! $SHELL 591*a376eb32SXin Li# Generated by $as_me. 592*a376eb32SXin Li$2 593*a376eb32SXin LiSHELL=\${CONFIG_SHELL-$SHELL} 594*a376eb32SXin Liexport SHELL 595*a376eb32SXin Li_ASEOF 596*a376eb32SXin Licat >>$1 <<\_ASEOF || lt_write_fail=1 597*a376eb32SXin LiAS_SHELL_SANITIZE 598*a376eb32SXin Li_AS_PREPARE 599*a376eb32SXin Liexec AS_MESSAGE_FD>&1 600*a376eb32SXin Li_ASEOF 601*a376eb32SXin Litest $lt_write_fail = 0 && chmod +x $1[]dnl 602*a376eb32SXin Lim4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 603*a376eb32SXin Li 604*a376eb32SXin Li# LT_OUTPUT 605*a376eb32SXin Li# --------- 606*a376eb32SXin Li# This macro allows early generation of the libtool script (before 607*a376eb32SXin Li# AC_OUTPUT is called), incase it is used in configure for compilation 608*a376eb32SXin Li# tests. 609*a376eb32SXin LiAC_DEFUN([LT_OUTPUT], 610*a376eb32SXin Li[: ${CONFIG_LT=./config.lt} 611*a376eb32SXin LiAC_MSG_NOTICE([creating $CONFIG_LT]) 612*a376eb32SXin Li_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 613*a376eb32SXin Li[# Run this file to recreate a libtool stub with the current configuration.]) 614*a376eb32SXin Li 615*a376eb32SXin Licat >>"$CONFIG_LT" <<\_LTEOF 616*a376eb32SXin Lilt_cl_silent=false 617*a376eb32SXin Liexec AS_MESSAGE_LOG_FD>>config.log 618*a376eb32SXin Li{ 619*a376eb32SXin Li echo 620*a376eb32SXin Li AS_BOX([Running $as_me.]) 621*a376eb32SXin Li} >&AS_MESSAGE_LOG_FD 622*a376eb32SXin Li 623*a376eb32SXin Lilt_cl_help="\ 624*a376eb32SXin Li\`$as_me' creates a local libtool stub from the current configuration, 625*a376eb32SXin Lifor use in further configure time tests before the real libtool is 626*a376eb32SXin Ligenerated. 627*a376eb32SXin Li 628*a376eb32SXin LiUsage: $[0] [[OPTIONS]] 629*a376eb32SXin Li 630*a376eb32SXin Li -h, --help print this help, then exit 631*a376eb32SXin Li -V, --version print version number, then exit 632*a376eb32SXin Li -q, --quiet do not print progress messages 633*a376eb32SXin Li -d, --debug don't remove temporary files 634*a376eb32SXin Li 635*a376eb32SXin LiReport bugs to <[email protected]>." 636*a376eb32SXin Li 637*a376eb32SXin Lilt_cl_version="\ 638*a376eb32SXin Lim4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 639*a376eb32SXin Lim4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 640*a376eb32SXin Liconfigured by $[0], generated by m4_PACKAGE_STRING. 641*a376eb32SXin Li 642*a376eb32SXin LiCopyright (C) 2011 Free Software Foundation, Inc. 643*a376eb32SXin LiThis config.lt script is free software; the Free Software Foundation 644*a376eb32SXin Ligives unlimited permision to copy, distribute and modify it." 645*a376eb32SXin Li 646*a376eb32SXin Liwhile test $[#] != 0 647*a376eb32SXin Lido 648*a376eb32SXin Li case $[1] in 649*a376eb32SXin Li --version | --v* | -V ) 650*a376eb32SXin Li echo "$lt_cl_version"; exit 0 ;; 651*a376eb32SXin Li --help | --h* | -h ) 652*a376eb32SXin Li echo "$lt_cl_help"; exit 0 ;; 653*a376eb32SXin Li --debug | --d* | -d ) 654*a376eb32SXin Li debug=: ;; 655*a376eb32SXin Li --quiet | --q* | --silent | --s* | -q ) 656*a376eb32SXin Li lt_cl_silent=: ;; 657*a376eb32SXin Li 658*a376eb32SXin Li -*) AC_MSG_ERROR([unrecognized option: $[1] 659*a376eb32SXin LiTry \`$[0] --help' for more information.]) ;; 660*a376eb32SXin Li 661*a376eb32SXin Li *) AC_MSG_ERROR([unrecognized argument: $[1] 662*a376eb32SXin LiTry \`$[0] --help' for more information.]) ;; 663*a376eb32SXin Li esac 664*a376eb32SXin Li shift 665*a376eb32SXin Lidone 666*a376eb32SXin Li 667*a376eb32SXin Liif $lt_cl_silent; then 668*a376eb32SXin Li exec AS_MESSAGE_FD>/dev/null 669*a376eb32SXin Lifi 670*a376eb32SXin Li_LTEOF 671*a376eb32SXin Li 672*a376eb32SXin Licat >>"$CONFIG_LT" <<_LTEOF 673*a376eb32SXin Li_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 674*a376eb32SXin Li_LTEOF 675*a376eb32SXin Li 676*a376eb32SXin Licat >>"$CONFIG_LT" <<\_LTEOF 677*a376eb32SXin LiAC_MSG_NOTICE([creating $ofile]) 678*a376eb32SXin Li_LT_OUTPUT_LIBTOOL_COMMANDS 679*a376eb32SXin LiAS_EXIT(0) 680*a376eb32SXin Li_LTEOF 681*a376eb32SXin Lichmod +x "$CONFIG_LT" 682*a376eb32SXin Li 683*a376eb32SXin Li# configure is writing to config.log, but config.lt does its own redirection, 684*a376eb32SXin Li# appending to config.log, which fails on DOS, as config.log is still kept 685*a376eb32SXin Li# open by configure. Here we exec the FD to /dev/null, effectively closing 686*a376eb32SXin Li# config.log, so it can be properly (re)opened and appended to by config.lt. 687*a376eb32SXin Lilt_cl_success=: 688*a376eb32SXin Litest "$silent" = yes && 689*a376eb32SXin Li lt_config_lt_args="$lt_config_lt_args --quiet" 690*a376eb32SXin Liexec AS_MESSAGE_LOG_FD>/dev/null 691*a376eb32SXin Li$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 692*a376eb32SXin Liexec AS_MESSAGE_LOG_FD>>config.log 693*a376eb32SXin Li$lt_cl_success || AS_EXIT(1) 694*a376eb32SXin Li])# LT_OUTPUT 695*a376eb32SXin Li 696*a376eb32SXin Li 697*a376eb32SXin Li# _LT_CONFIG(TAG) 698*a376eb32SXin Li# --------------- 699*a376eb32SXin Li# If TAG is the built-in tag, create an initial libtool script with a 700*a376eb32SXin Li# default configuration from the untagged config vars. Otherwise add code 701*a376eb32SXin Li# to config.status for appending the configuration named by TAG from the 702*a376eb32SXin Li# matching tagged config vars. 703*a376eb32SXin Lim4_defun([_LT_CONFIG], 704*a376eb32SXin Li[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 705*a376eb32SXin Li_LT_CONFIG_SAVE_COMMANDS([ 706*a376eb32SXin Li m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 707*a376eb32SXin Li m4_if(_LT_TAG, [C], [ 708*a376eb32SXin Li # See if we are running on zsh, and set the options which allow our 709*a376eb32SXin Li # commands through without removal of \ escapes. 710*a376eb32SXin Li if test -n "${ZSH_VERSION+set}" ; then 711*a376eb32SXin Li setopt NO_GLOB_SUBST 712*a376eb32SXin Li fi 713*a376eb32SXin Li 714*a376eb32SXin Li cfgfile="${ofile}T" 715*a376eb32SXin Li trap "$RM \"$cfgfile\"; exit 1" 1 2 15 716*a376eb32SXin Li $RM "$cfgfile" 717*a376eb32SXin Li 718*a376eb32SXin Li cat <<_LT_EOF >> "$cfgfile" 719*a376eb32SXin Li#! $SHELL 720*a376eb32SXin Li 721*a376eb32SXin Li# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 722*a376eb32SXin Li# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 723*a376eb32SXin Li# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 724*a376eb32SXin Li# NOTE: Changes made to this file will be lost: look at ltmain.sh. 725*a376eb32SXin Li# 726*a376eb32SXin Li_LT_COPYING 727*a376eb32SXin Li_LT_LIBTOOL_TAGS 728*a376eb32SXin Li 729*a376eb32SXin Li# ### BEGIN LIBTOOL CONFIG 730*a376eb32SXin Li_LT_LIBTOOL_CONFIG_VARS 731*a376eb32SXin Li_LT_LIBTOOL_TAG_VARS 732*a376eb32SXin Li# ### END LIBTOOL CONFIG 733*a376eb32SXin Li 734*a376eb32SXin Li_LT_EOF 735*a376eb32SXin Li 736*a376eb32SXin Li case $host_os in 737*a376eb32SXin Li aix3*) 738*a376eb32SXin Li cat <<\_LT_EOF >> "$cfgfile" 739*a376eb32SXin Li# AIX sometimes has problems with the GCC collect2 program. For some 740*a376eb32SXin Li# reason, if we set the COLLECT_NAMES environment variable, the problems 741*a376eb32SXin Li# vanish in a puff of smoke. 742*a376eb32SXin Liif test "X${COLLECT_NAMES+set}" != Xset; then 743*a376eb32SXin Li COLLECT_NAMES= 744*a376eb32SXin Li export COLLECT_NAMES 745*a376eb32SXin Lifi 746*a376eb32SXin Li_LT_EOF 747*a376eb32SXin Li ;; 748*a376eb32SXin Li esac 749*a376eb32SXin Li 750*a376eb32SXin Li _LT_PROG_LTMAIN 751*a376eb32SXin Li 752*a376eb32SXin Li # We use sed instead of cat because bash on DJGPP gets confused if 753*a376eb32SXin Li # if finds mixed CR/LF and LF-only lines. Since sed operates in 754*a376eb32SXin Li # text mode, it properly converts lines to CR/LF. This bash problem 755*a376eb32SXin Li # is reportedly fixed, but why not run on old versions too? 756*a376eb32SXin Li sed '$q' "$ltmain" >> "$cfgfile" \ 757*a376eb32SXin Li || (rm -f "$cfgfile"; exit 1) 758*a376eb32SXin Li 759*a376eb32SXin Li _LT_PROG_REPLACE_SHELLFNS 760*a376eb32SXin Li 761*a376eb32SXin Li mv -f "$cfgfile" "$ofile" || 762*a376eb32SXin Li (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 763*a376eb32SXin Li chmod +x "$ofile" 764*a376eb32SXin Li], 765*a376eb32SXin Li[cat <<_LT_EOF >> "$ofile" 766*a376eb32SXin Li 767*a376eb32SXin Lidnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 768*a376eb32SXin Lidnl in a comment (ie after a #). 769*a376eb32SXin Li# ### BEGIN LIBTOOL TAG CONFIG: $1 770*a376eb32SXin Li_LT_LIBTOOL_TAG_VARS(_LT_TAG) 771*a376eb32SXin Li# ### END LIBTOOL TAG CONFIG: $1 772*a376eb32SXin Li_LT_EOF 773*a376eb32SXin Li])dnl /m4_if 774*a376eb32SXin Li], 775*a376eb32SXin Li[m4_if([$1], [], [ 776*a376eb32SXin Li PACKAGE='$PACKAGE' 777*a376eb32SXin Li VERSION='$VERSION' 778*a376eb32SXin Li TIMESTAMP='$TIMESTAMP' 779*a376eb32SXin Li RM='$RM' 780*a376eb32SXin Li ofile='$ofile'], []) 781*a376eb32SXin Li])dnl /_LT_CONFIG_SAVE_COMMANDS 782*a376eb32SXin Li])# _LT_CONFIG 783*a376eb32SXin Li 784*a376eb32SXin Li 785*a376eb32SXin Li# LT_SUPPORTED_TAG(TAG) 786*a376eb32SXin Li# --------------------- 787*a376eb32SXin Li# Trace this macro to discover what tags are supported by the libtool 788*a376eb32SXin Li# --tag option, using: 789*a376eb32SXin Li# autoconf --trace 'LT_SUPPORTED_TAG:$1' 790*a376eb32SXin LiAC_DEFUN([LT_SUPPORTED_TAG], []) 791*a376eb32SXin Li 792*a376eb32SXin Li 793*a376eb32SXin Li# C support is built-in for now 794*a376eb32SXin Lim4_define([_LT_LANG_C_enabled], []) 795*a376eb32SXin Lim4_define([_LT_TAGS], []) 796*a376eb32SXin Li 797*a376eb32SXin Li 798*a376eb32SXin Li# LT_LANG(LANG) 799*a376eb32SXin Li# ------------- 800*a376eb32SXin Li# Enable libtool support for the given language if not already enabled. 801*a376eb32SXin LiAC_DEFUN([LT_LANG], 802*a376eb32SXin Li[AC_BEFORE([$0], [LT_OUTPUT])dnl 803*a376eb32SXin Lim4_case([$1], 804*a376eb32SXin Li [C], [_LT_LANG(C)], 805*a376eb32SXin Li [C++], [_LT_LANG(CXX)], 806*a376eb32SXin Li [Go], [_LT_LANG(GO)], 807*a376eb32SXin Li [Java], [_LT_LANG(GCJ)], 808*a376eb32SXin Li [Fortran 77], [_LT_LANG(F77)], 809*a376eb32SXin Li [Fortran], [_LT_LANG(FC)], 810*a376eb32SXin Li [Windows Resource], [_LT_LANG(RC)], 811*a376eb32SXin Li [m4_ifdef([_LT_LANG_]$1[_CONFIG], 812*a376eb32SXin Li [_LT_LANG($1)], 813*a376eb32SXin Li [m4_fatal([$0: unsupported language: "$1"])])])dnl 814*a376eb32SXin Li])# LT_LANG 815*a376eb32SXin Li 816*a376eb32SXin Li 817*a376eb32SXin Li# _LT_LANG(LANGNAME) 818*a376eb32SXin Li# ------------------ 819*a376eb32SXin Lim4_defun([_LT_LANG], 820*a376eb32SXin Li[m4_ifdef([_LT_LANG_]$1[_enabled], [], 821*a376eb32SXin Li [LT_SUPPORTED_TAG([$1])dnl 822*a376eb32SXin Li m4_append([_LT_TAGS], [$1 ])dnl 823*a376eb32SXin Li m4_define([_LT_LANG_]$1[_enabled], [])dnl 824*a376eb32SXin Li _LT_LANG_$1_CONFIG($1)])dnl 825*a376eb32SXin Li])# _LT_LANG 826*a376eb32SXin Li 827*a376eb32SXin Li 828*a376eb32SXin Lim4_ifndef([AC_PROG_GO], [ 829*a376eb32SXin Li############################################################ 830*a376eb32SXin Li# NOTE: This macro has been submitted for inclusion into # 831*a376eb32SXin Li# GNU Autoconf as AC_PROG_GO. When it is available in # 832*a376eb32SXin Li# a released version of Autoconf we should remove this # 833*a376eb32SXin Li# macro and use it instead. # 834*a376eb32SXin Li############################################################ 835*a376eb32SXin Lim4_defun([AC_PROG_GO], 836*a376eb32SXin Li[AC_LANG_PUSH(Go)dnl 837*a376eb32SXin LiAC_ARG_VAR([GOC], [Go compiler command])dnl 838*a376eb32SXin LiAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 839*a376eb32SXin Li_AC_ARG_VAR_LDFLAGS()dnl 840*a376eb32SXin LiAC_CHECK_TOOL(GOC, gccgo) 841*a376eb32SXin Liif test -z "$GOC"; then 842*a376eb32SXin Li if test -n "$ac_tool_prefix"; then 843*a376eb32SXin Li AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 844*a376eb32SXin Li fi 845*a376eb32SXin Lifi 846*a376eb32SXin Liif test -z "$GOC"; then 847*a376eb32SXin Li AC_CHECK_PROG(GOC, gccgo, gccgo, false) 848*a376eb32SXin Lifi 849*a376eb32SXin Li])#m4_defun 850*a376eb32SXin Li])#m4_ifndef 851*a376eb32SXin Li 852*a376eb32SXin Li 853*a376eb32SXin Li# _LT_LANG_DEFAULT_CONFIG 854*a376eb32SXin Li# ----------------------- 855*a376eb32SXin Lim4_defun([_LT_LANG_DEFAULT_CONFIG], 856*a376eb32SXin Li[AC_PROVIDE_IFELSE([AC_PROG_CXX], 857*a376eb32SXin Li [LT_LANG(CXX)], 858*a376eb32SXin Li [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 859*a376eb32SXin Li 860*a376eb32SXin LiAC_PROVIDE_IFELSE([AC_PROG_F77], 861*a376eb32SXin Li [LT_LANG(F77)], 862*a376eb32SXin Li [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 863*a376eb32SXin Li 864*a376eb32SXin LiAC_PROVIDE_IFELSE([AC_PROG_FC], 865*a376eb32SXin Li [LT_LANG(FC)], 866*a376eb32SXin Li [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 867*a376eb32SXin Li 868*a376eb32SXin Lidnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 869*a376eb32SXin Lidnl pulling things in needlessly. 870*a376eb32SXin LiAC_PROVIDE_IFELSE([AC_PROG_GCJ], 871*a376eb32SXin Li [LT_LANG(GCJ)], 872*a376eb32SXin Li [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 873*a376eb32SXin Li [LT_LANG(GCJ)], 874*a376eb32SXin Li [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 875*a376eb32SXin Li [LT_LANG(GCJ)], 876*a376eb32SXin Li [m4_ifdef([AC_PROG_GCJ], 877*a376eb32SXin Li [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 878*a376eb32SXin Li m4_ifdef([A][M_PROG_GCJ], 879*a376eb32SXin Li [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 880*a376eb32SXin Li m4_ifdef([LT_PROG_GCJ], 881*a376eb32SXin Li [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 882*a376eb32SXin Li 883*a376eb32SXin LiAC_PROVIDE_IFELSE([AC_PROG_GO], 884*a376eb32SXin Li [LT_LANG(GO)], 885*a376eb32SXin Li [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 886*a376eb32SXin Li 887*a376eb32SXin LiAC_PROVIDE_IFELSE([LT_PROG_RC], 888*a376eb32SXin Li [LT_LANG(RC)], 889*a376eb32SXin Li [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 890*a376eb32SXin Li])# _LT_LANG_DEFAULT_CONFIG 891*a376eb32SXin Li 892*a376eb32SXin Li# Obsolete macros: 893*a376eb32SXin LiAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 894*a376eb32SXin LiAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 895*a376eb32SXin LiAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 896*a376eb32SXin LiAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 897*a376eb32SXin LiAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 898*a376eb32SXin Lidnl aclocal-1.4 backwards compatibility: 899*a376eb32SXin Lidnl AC_DEFUN([AC_LIBTOOL_CXX], []) 900*a376eb32SXin Lidnl AC_DEFUN([AC_LIBTOOL_F77], []) 901*a376eb32SXin Lidnl AC_DEFUN([AC_LIBTOOL_FC], []) 902*a376eb32SXin Lidnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 903*a376eb32SXin Lidnl AC_DEFUN([AC_LIBTOOL_RC], []) 904*a376eb32SXin Li 905*a376eb32SXin Li 906*a376eb32SXin Li# _LT_TAG_COMPILER 907*a376eb32SXin Li# ---------------- 908*a376eb32SXin Lim4_defun([_LT_TAG_COMPILER], 909*a376eb32SXin Li[AC_REQUIRE([AC_PROG_CC])dnl 910*a376eb32SXin Li 911*a376eb32SXin Li_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 912*a376eb32SXin Li_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 913*a376eb32SXin Li_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 914*a376eb32SXin Li_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 915*a376eb32SXin Li 916*a376eb32SXin Li# If no C compiler was specified, use CC. 917*a376eb32SXin LiLTCC=${LTCC-"$CC"} 918*a376eb32SXin Li 919*a376eb32SXin Li# If no C compiler flags were specified, use CFLAGS. 920*a376eb32SXin LiLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 921*a376eb32SXin Li 922*a376eb32SXin Li# Allow CC to be a program name with arguments. 923*a376eb32SXin Licompiler=$CC 924*a376eb32SXin Li])# _LT_TAG_COMPILER 925*a376eb32SXin Li 926*a376eb32SXin Li 927*a376eb32SXin Li# _LT_COMPILER_BOILERPLATE 928*a376eb32SXin Li# ------------------------ 929*a376eb32SXin Li# Check for compiler boilerplate output or warnings with 930*a376eb32SXin Li# the simple compiler test code. 931*a376eb32SXin Lim4_defun([_LT_COMPILER_BOILERPLATE], 932*a376eb32SXin Li[m4_require([_LT_DECL_SED])dnl 933*a376eb32SXin Liac_outfile=conftest.$ac_objext 934*a376eb32SXin Liecho "$lt_simple_compile_test_code" >conftest.$ac_ext 935*a376eb32SXin Lieval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 936*a376eb32SXin Li_lt_compiler_boilerplate=`cat conftest.err` 937*a376eb32SXin Li$RM conftest* 938*a376eb32SXin Li])# _LT_COMPILER_BOILERPLATE 939*a376eb32SXin Li 940*a376eb32SXin Li 941*a376eb32SXin Li# _LT_LINKER_BOILERPLATE 942*a376eb32SXin Li# ---------------------- 943*a376eb32SXin Li# Check for linker boilerplate output or warnings with 944*a376eb32SXin Li# the simple link test code. 945*a376eb32SXin Lim4_defun([_LT_LINKER_BOILERPLATE], 946*a376eb32SXin Li[m4_require([_LT_DECL_SED])dnl 947*a376eb32SXin Liac_outfile=conftest.$ac_objext 948*a376eb32SXin Liecho "$lt_simple_link_test_code" >conftest.$ac_ext 949*a376eb32SXin Lieval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 950*a376eb32SXin Li_lt_linker_boilerplate=`cat conftest.err` 951*a376eb32SXin Li$RM -r conftest* 952*a376eb32SXin Li])# _LT_LINKER_BOILERPLATE 953*a376eb32SXin Li 954*a376eb32SXin Li# _LT_REQUIRED_DARWIN_CHECKS 955*a376eb32SXin Li# ------------------------- 956*a376eb32SXin Lim4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 957*a376eb32SXin Li case $host_os in 958*a376eb32SXin Li rhapsody* | darwin*) 959*a376eb32SXin Li AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 960*a376eb32SXin Li AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 961*a376eb32SXin Li AC_CHECK_TOOL([LIPO], [lipo], [:]) 962*a376eb32SXin Li AC_CHECK_TOOL([OTOOL], [otool], [:]) 963*a376eb32SXin Li AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 964*a376eb32SXin Li _LT_DECL([], [DSYMUTIL], [1], 965*a376eb32SXin Li [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 966*a376eb32SXin Li _LT_DECL([], [NMEDIT], [1], 967*a376eb32SXin Li [Tool to change global to local symbols on Mac OS X]) 968*a376eb32SXin Li _LT_DECL([], [LIPO], [1], 969*a376eb32SXin Li [Tool to manipulate fat objects and archives on Mac OS X]) 970*a376eb32SXin Li _LT_DECL([], [OTOOL], [1], 971*a376eb32SXin Li [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 972*a376eb32SXin Li _LT_DECL([], [OTOOL64], [1], 973*a376eb32SXin Li [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 974*a376eb32SXin Li 975*a376eb32SXin Li AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 976*a376eb32SXin Li [lt_cv_apple_cc_single_mod=no 977*a376eb32SXin Li if test -z "${LT_MULTI_MODULE}"; then 978*a376eb32SXin Li # By default we will add the -single_module flag. You can override 979*a376eb32SXin Li # by either setting the environment variable LT_MULTI_MODULE 980*a376eb32SXin Li # non-empty at configure time, or by adding -multi_module to the 981*a376eb32SXin Li # link flags. 982*a376eb32SXin Li rm -rf libconftest.dylib* 983*a376eb32SXin Li echo "int foo(void){return 1;}" > conftest.c 984*a376eb32SXin Li echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 985*a376eb32SXin Li-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 986*a376eb32SXin Li $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 987*a376eb32SXin Li -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 988*a376eb32SXin Li _lt_result=$? 989*a376eb32SXin Li # If there is a non-empty error log, and "single_module" 990*a376eb32SXin Li # appears in it, assume the flag caused a linker warning 991*a376eb32SXin Li if test -s conftest.err && $GREP single_module conftest.err; then 992*a376eb32SXin Li cat conftest.err >&AS_MESSAGE_LOG_FD 993*a376eb32SXin Li # Otherwise, if the output was created with a 0 exit code from 994*a376eb32SXin Li # the compiler, it worked. 995*a376eb32SXin Li elif test -f libconftest.dylib && test $_lt_result -eq 0; then 996*a376eb32SXin Li lt_cv_apple_cc_single_mod=yes 997*a376eb32SXin Li else 998*a376eb32SXin Li cat conftest.err >&AS_MESSAGE_LOG_FD 999*a376eb32SXin Li fi 1000*a376eb32SXin Li rm -rf libconftest.dylib* 1001*a376eb32SXin Li rm -f conftest.* 1002*a376eb32SXin Li fi]) 1003*a376eb32SXin Li 1004*a376eb32SXin Li AC_CACHE_CHECK([for -exported_symbols_list linker flag], 1005*a376eb32SXin Li [lt_cv_ld_exported_symbols_list], 1006*a376eb32SXin Li [lt_cv_ld_exported_symbols_list=no 1007*a376eb32SXin Li save_LDFLAGS=$LDFLAGS 1008*a376eb32SXin Li echo "_main" > conftest.sym 1009*a376eb32SXin Li LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 1010*a376eb32SXin Li AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 1011*a376eb32SXin Li [lt_cv_ld_exported_symbols_list=yes], 1012*a376eb32SXin Li [lt_cv_ld_exported_symbols_list=no]) 1013*a376eb32SXin Li LDFLAGS="$save_LDFLAGS" 1014*a376eb32SXin Li ]) 1015*a376eb32SXin Li 1016*a376eb32SXin Li AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 1017*a376eb32SXin Li [lt_cv_ld_force_load=no 1018*a376eb32SXin Li cat > conftest.c << _LT_EOF 1019*a376eb32SXin Liint forced_loaded() { return 2;} 1020*a376eb32SXin Li_LT_EOF 1021*a376eb32SXin Li echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 1022*a376eb32SXin Li $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1023*a376eb32SXin Li echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1024*a376eb32SXin Li $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1025*a376eb32SXin Li echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1026*a376eb32SXin Li $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1027*a376eb32SXin Li cat > conftest.c << _LT_EOF 1028*a376eb32SXin Liint main() { return 0;} 1029*a376eb32SXin Li_LT_EOF 1030*a376eb32SXin Li echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1031*a376eb32SXin Li $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1032*a376eb32SXin Li _lt_result=$? 1033*a376eb32SXin Li if test -s conftest.err && $GREP force_load conftest.err; then 1034*a376eb32SXin Li cat conftest.err >&AS_MESSAGE_LOG_FD 1035*a376eb32SXin Li elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 1036*a376eb32SXin Li lt_cv_ld_force_load=yes 1037*a376eb32SXin Li else 1038*a376eb32SXin Li cat conftest.err >&AS_MESSAGE_LOG_FD 1039*a376eb32SXin Li fi 1040*a376eb32SXin Li rm -f conftest.err libconftest.a conftest conftest.c 1041*a376eb32SXin Li rm -rf conftest.dSYM 1042*a376eb32SXin Li ]) 1043*a376eb32SXin Li case $host_os in 1044*a376eb32SXin Li rhapsody* | darwin1.[[012]]) 1045*a376eb32SXin Li _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 1046*a376eb32SXin Li darwin1.*) 1047*a376eb32SXin Li _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1048*a376eb32SXin Li darwin*) # darwin 5.x on 1049*a376eb32SXin Li # if running on 10.5 or later, the deployment target defaults 1050*a376eb32SXin Li # to the OS version, if on x86, and 10.4, the deployment 1051*a376eb32SXin Li # target defaults to 10.4. Don't you love it? 1052*a376eb32SXin Li case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1053*a376eb32SXin Li 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 1054*a376eb32SXin Li _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 1055*a376eb32SXin Li 10.[[012]]*) 1056*a376eb32SXin Li _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1057*a376eb32SXin Li 10.*) 1058*a376eb32SXin Li _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 1059*a376eb32SXin Li esac 1060*a376eb32SXin Li ;; 1061*a376eb32SXin Li esac 1062*a376eb32SXin Li if test "$lt_cv_apple_cc_single_mod" = "yes"; then 1063*a376eb32SXin Li _lt_dar_single_mod='$single_module' 1064*a376eb32SXin Li fi 1065*a376eb32SXin Li if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 1066*a376eb32SXin Li _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 1067*a376eb32SXin Li else 1068*a376eb32SXin Li _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 1069*a376eb32SXin Li fi 1070*a376eb32SXin Li if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 1071*a376eb32SXin Li _lt_dsymutil='~$DSYMUTIL $lib || :' 1072*a376eb32SXin Li else 1073*a376eb32SXin Li _lt_dsymutil= 1074*a376eb32SXin Li fi 1075*a376eb32SXin Li ;; 1076*a376eb32SXin Li esac 1077*a376eb32SXin Li]) 1078*a376eb32SXin Li 1079*a376eb32SXin Li 1080*a376eb32SXin Li# _LT_DARWIN_LINKER_FEATURES([TAG]) 1081*a376eb32SXin Li# --------------------------------- 1082*a376eb32SXin Li# Checks for linker and compiler features on darwin 1083*a376eb32SXin Lim4_defun([_LT_DARWIN_LINKER_FEATURES], 1084*a376eb32SXin Li[ 1085*a376eb32SXin Li m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1086*a376eb32SXin Li _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1087*a376eb32SXin Li _LT_TAGVAR(hardcode_direct, $1)=no 1088*a376eb32SXin Li _LT_TAGVAR(hardcode_automatic, $1)=yes 1089*a376eb32SXin Li _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1090*a376eb32SXin Li if test "$lt_cv_ld_force_load" = "yes"; then 1091*a376eb32SXin Li _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\"`' 1092*a376eb32SXin Li m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1093*a376eb32SXin Li [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1094*a376eb32SXin Li else 1095*a376eb32SXin Li _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1096*a376eb32SXin Li fi 1097*a376eb32SXin Li _LT_TAGVAR(link_all_deplibs, $1)=yes 1098*a376eb32SXin Li _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 1099*a376eb32SXin Li case $cc_basename in 1100*a376eb32SXin Li ifort*) _lt_dar_can_shared=yes ;; 1101*a376eb32SXin Li *) _lt_dar_can_shared=$GCC ;; 1102*a376eb32SXin Li esac 1103*a376eb32SXin Li if test "$_lt_dar_can_shared" = "yes"; then 1104*a376eb32SXin Li output_verbose_link_cmd=func_echo_all 1105*a376eb32SXin Li _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}" 1106*a376eb32SXin Li _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 1107*a376eb32SXin Li _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}" 1108*a376eb32SXin Li _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}" 1109*a376eb32SXin Li m4_if([$1], [CXX], 1110*a376eb32SXin Li[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 1111*a376eb32SXin Li _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}" 1112*a376eb32SXin Li _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}" 1113*a376eb32SXin Li fi 1114*a376eb32SXin Li],[]) 1115*a376eb32SXin Li else 1116*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 1117*a376eb32SXin Li fi 1118*a376eb32SXin Li]) 1119*a376eb32SXin Li 1120*a376eb32SXin Li# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1121*a376eb32SXin Li# ---------------------------------- 1122*a376eb32SXin Li# Links a minimal program and checks the executable 1123*a376eb32SXin Li# for the system default hardcoded library path. In most cases, 1124*a376eb32SXin Li# this is /usr/lib:/lib, but when the MPI compilers are used 1125*a376eb32SXin Li# the location of the communication and MPI libs are included too. 1126*a376eb32SXin Li# If we don't find anything, use the default library path according 1127*a376eb32SXin Li# to the aix ld manual. 1128*a376eb32SXin Li# Store the results from the different compilers for each TAGNAME. 1129*a376eb32SXin Li# Allow to override them for all tags through lt_cv_aix_libpath. 1130*a376eb32SXin Lim4_defun([_LT_SYS_MODULE_PATH_AIX], 1131*a376eb32SXin Li[m4_require([_LT_DECL_SED])dnl 1132*a376eb32SXin Liif test "${lt_cv_aix_libpath+set}" = set; then 1133*a376eb32SXin Li aix_libpath=$lt_cv_aix_libpath 1134*a376eb32SXin Lielse 1135*a376eb32SXin Li AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1136*a376eb32SXin Li [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1137*a376eb32SXin Li lt_aix_libpath_sed='[ 1138*a376eb32SXin Li /Import File Strings/,/^$/ { 1139*a376eb32SXin Li /^0/ { 1140*a376eb32SXin Li s/^0 *\([^ ]*\) *$/\1/ 1141*a376eb32SXin Li p 1142*a376eb32SXin Li } 1143*a376eb32SXin Li }]' 1144*a376eb32SXin Li _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1145*a376eb32SXin Li # Check for a 64-bit object if we didn't find anything. 1146*a376eb32SXin Li if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1147*a376eb32SXin Li _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1148*a376eb32SXin Li fi],[]) 1149*a376eb32SXin Li if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1150*a376eb32SXin Li _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 1151*a376eb32SXin Li fi 1152*a376eb32SXin Li ]) 1153*a376eb32SXin Li aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1154*a376eb32SXin Lifi 1155*a376eb32SXin Li])# _LT_SYS_MODULE_PATH_AIX 1156*a376eb32SXin Li 1157*a376eb32SXin Li 1158*a376eb32SXin Li# _LT_SHELL_INIT(ARG) 1159*a376eb32SXin Li# ------------------- 1160*a376eb32SXin Lim4_define([_LT_SHELL_INIT], 1161*a376eb32SXin Li[m4_divert_text([M4SH-INIT], [$1 1162*a376eb32SXin Li])])# _LT_SHELL_INIT 1163*a376eb32SXin Li 1164*a376eb32SXin Li 1165*a376eb32SXin Li 1166*a376eb32SXin Li# _LT_PROG_ECHO_BACKSLASH 1167*a376eb32SXin Li# ----------------------- 1168*a376eb32SXin Li# Find how we can fake an echo command that does not interpret backslash. 1169*a376eb32SXin Li# In particular, with Autoconf 2.60 or later we add some code to the start 1170*a376eb32SXin Li# of the generated configure script which will find a shell with a builtin 1171*a376eb32SXin Li# printf (which we can use as an echo command). 1172*a376eb32SXin Lim4_defun([_LT_PROG_ECHO_BACKSLASH], 1173*a376eb32SXin Li[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1174*a376eb32SXin LiECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1175*a376eb32SXin LiECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1176*a376eb32SXin Li 1177*a376eb32SXin LiAC_MSG_CHECKING([how to print strings]) 1178*a376eb32SXin Li# Test print first, because it will be a builtin if present. 1179*a376eb32SXin Liif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1180*a376eb32SXin Li test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1181*a376eb32SXin Li ECHO='print -r --' 1182*a376eb32SXin Lielif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1183*a376eb32SXin Li ECHO='printf %s\n' 1184*a376eb32SXin Lielse 1185*a376eb32SXin Li # Use this function as a fallback that always works. 1186*a376eb32SXin Li func_fallback_echo () 1187*a376eb32SXin Li { 1188*a376eb32SXin Li eval 'cat <<_LTECHO_EOF 1189*a376eb32SXin Li$[]1 1190*a376eb32SXin Li_LTECHO_EOF' 1191*a376eb32SXin Li } 1192*a376eb32SXin Li ECHO='func_fallback_echo' 1193*a376eb32SXin Lifi 1194*a376eb32SXin Li 1195*a376eb32SXin Li# func_echo_all arg... 1196*a376eb32SXin Li# Invoke $ECHO with all args, space-separated. 1197*a376eb32SXin Lifunc_echo_all () 1198*a376eb32SXin Li{ 1199*a376eb32SXin Li $ECHO "$*" 1200*a376eb32SXin Li} 1201*a376eb32SXin Li 1202*a376eb32SXin Licase "$ECHO" in 1203*a376eb32SXin Li printf*) AC_MSG_RESULT([printf]) ;; 1204*a376eb32SXin Li print*) AC_MSG_RESULT([print -r]) ;; 1205*a376eb32SXin Li *) AC_MSG_RESULT([cat]) ;; 1206*a376eb32SXin Liesac 1207*a376eb32SXin Li 1208*a376eb32SXin Lim4_ifdef([_AS_DETECT_SUGGESTED], 1209*a376eb32SXin Li[_AS_DETECT_SUGGESTED([ 1210*a376eb32SXin Li test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1211*a376eb32SXin Li ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1212*a376eb32SXin Li ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1213*a376eb32SXin Li ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1214*a376eb32SXin Li PATH=/empty FPATH=/empty; export PATH FPATH 1215*a376eb32SXin Li test "X`printf %s $ECHO`" = "X$ECHO" \ 1216*a376eb32SXin Li || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1217*a376eb32SXin Li 1218*a376eb32SXin Li_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1219*a376eb32SXin Li_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1220*a376eb32SXin Li])# _LT_PROG_ECHO_BACKSLASH 1221*a376eb32SXin Li 1222*a376eb32SXin Li 1223*a376eb32SXin Li# _LT_WITH_SYSROOT 1224*a376eb32SXin Li# ---------------- 1225*a376eb32SXin LiAC_DEFUN([_LT_WITH_SYSROOT], 1226*a376eb32SXin Li[AC_MSG_CHECKING([for sysroot]) 1227*a376eb32SXin LiAC_ARG_WITH([sysroot], 1228*a376eb32SXin Li[ --with-sysroot[=DIR] Search for dependent libraries within DIR 1229*a376eb32SXin Li (or the compiler's sysroot if not specified).], 1230*a376eb32SXin Li[], [with_sysroot=no]) 1231*a376eb32SXin Li 1232*a376eb32SXin Lidnl lt_sysroot will always be passed unquoted. We quote it here 1233*a376eb32SXin Lidnl in case the user passed a directory name. 1234*a376eb32SXin Lilt_sysroot= 1235*a376eb32SXin Licase ${with_sysroot} in #( 1236*a376eb32SXin Li yes) 1237*a376eb32SXin Li if test "$GCC" = yes; then 1238*a376eb32SXin Li lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1239*a376eb32SXin Li fi 1240*a376eb32SXin Li ;; #( 1241*a376eb32SXin Li /*) 1242*a376eb32SXin Li lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1243*a376eb32SXin Li ;; #( 1244*a376eb32SXin Li no|'') 1245*a376eb32SXin Li ;; #( 1246*a376eb32SXin Li *) 1247*a376eb32SXin Li AC_MSG_RESULT([${with_sysroot}]) 1248*a376eb32SXin Li AC_MSG_ERROR([The sysroot must be an absolute path.]) 1249*a376eb32SXin Li ;; 1250*a376eb32SXin Liesac 1251*a376eb32SXin Li 1252*a376eb32SXin Li AC_MSG_RESULT([${lt_sysroot:-no}]) 1253*a376eb32SXin Li_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1254*a376eb32SXin Li[dependent libraries, and in which our libraries should be installed.])]) 1255*a376eb32SXin Li 1256*a376eb32SXin Li# _LT_ENABLE_LOCK 1257*a376eb32SXin Li# --------------- 1258*a376eb32SXin Lim4_defun([_LT_ENABLE_LOCK], 1259*a376eb32SXin Li[AC_ARG_ENABLE([libtool-lock], 1260*a376eb32SXin Li [AS_HELP_STRING([--disable-libtool-lock], 1261*a376eb32SXin Li [avoid locking (might break parallel builds)])]) 1262*a376eb32SXin Litest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 1263*a376eb32SXin Li 1264*a376eb32SXin Li# Some flags need to be propagated to the compiler or linker for good 1265*a376eb32SXin Li# libtool support. 1266*a376eb32SXin Licase $host in 1267*a376eb32SXin Liia64-*-hpux*) 1268*a376eb32SXin Li # Find out which ABI we are using. 1269*a376eb32SXin Li echo 'int i;' > conftest.$ac_ext 1270*a376eb32SXin Li if AC_TRY_EVAL(ac_compile); then 1271*a376eb32SXin Li case `/usr/bin/file conftest.$ac_objext` in 1272*a376eb32SXin Li *ELF-32*) 1273*a376eb32SXin Li HPUX_IA64_MODE="32" 1274*a376eb32SXin Li ;; 1275*a376eb32SXin Li *ELF-64*) 1276*a376eb32SXin Li HPUX_IA64_MODE="64" 1277*a376eb32SXin Li ;; 1278*a376eb32SXin Li esac 1279*a376eb32SXin Li fi 1280*a376eb32SXin Li rm -rf conftest* 1281*a376eb32SXin Li ;; 1282*a376eb32SXin Li*-*-irix6*) 1283*a376eb32SXin Li # Find out which ABI we are using. 1284*a376eb32SXin Li echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1285*a376eb32SXin Li if AC_TRY_EVAL(ac_compile); then 1286*a376eb32SXin Li if test "$lt_cv_prog_gnu_ld" = yes; then 1287*a376eb32SXin Li case `/usr/bin/file conftest.$ac_objext` in 1288*a376eb32SXin Li *32-bit*) 1289*a376eb32SXin Li LD="${LD-ld} -melf32bsmip" 1290*a376eb32SXin Li ;; 1291*a376eb32SXin Li *N32*) 1292*a376eb32SXin Li LD="${LD-ld} -melf32bmipn32" 1293*a376eb32SXin Li ;; 1294*a376eb32SXin Li *64-bit*) 1295*a376eb32SXin Li LD="${LD-ld} -melf64bmip" 1296*a376eb32SXin Li ;; 1297*a376eb32SXin Li esac 1298*a376eb32SXin Li else 1299*a376eb32SXin Li case `/usr/bin/file conftest.$ac_objext` in 1300*a376eb32SXin Li *32-bit*) 1301*a376eb32SXin Li LD="${LD-ld} -32" 1302*a376eb32SXin Li ;; 1303*a376eb32SXin Li *N32*) 1304*a376eb32SXin Li LD="${LD-ld} -n32" 1305*a376eb32SXin Li ;; 1306*a376eb32SXin Li *64-bit*) 1307*a376eb32SXin Li LD="${LD-ld} -64" 1308*a376eb32SXin Li ;; 1309*a376eb32SXin Li esac 1310*a376eb32SXin Li fi 1311*a376eb32SXin Li fi 1312*a376eb32SXin Li rm -rf conftest* 1313*a376eb32SXin Li ;; 1314*a376eb32SXin Li 1315*a376eb32SXin Lix86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 1316*a376eb32SXin Lis390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1317*a376eb32SXin Li # Find out which ABI we are using. 1318*a376eb32SXin Li echo 'int i;' > conftest.$ac_ext 1319*a376eb32SXin Li if AC_TRY_EVAL(ac_compile); then 1320*a376eb32SXin Li case `/usr/bin/file conftest.o` in 1321*a376eb32SXin Li *32-bit*) 1322*a376eb32SXin Li case $host in 1323*a376eb32SXin Li x86_64-*kfreebsd*-gnu) 1324*a376eb32SXin Li LD="${LD-ld} -m elf_i386_fbsd" 1325*a376eb32SXin Li ;; 1326*a376eb32SXin Li x86_64-*linux*) 1327*a376eb32SXin Li LD="${LD-ld} -m elf_i386" 1328*a376eb32SXin Li ;; 1329*a376eb32SXin Li ppc64-*linux*|powerpc64-*linux*) 1330*a376eb32SXin Li LD="${LD-ld} -m elf32ppclinux" 1331*a376eb32SXin Li ;; 1332*a376eb32SXin Li s390x-*linux*) 1333*a376eb32SXin Li LD="${LD-ld} -m elf_s390" 1334*a376eb32SXin Li ;; 1335*a376eb32SXin Li sparc64-*linux*) 1336*a376eb32SXin Li LD="${LD-ld} -m elf32_sparc" 1337*a376eb32SXin Li ;; 1338*a376eb32SXin Li esac 1339*a376eb32SXin Li ;; 1340*a376eb32SXin Li *64-bit*) 1341*a376eb32SXin Li case $host in 1342*a376eb32SXin Li x86_64-*kfreebsd*-gnu) 1343*a376eb32SXin Li LD="${LD-ld} -m elf_x86_64_fbsd" 1344*a376eb32SXin Li ;; 1345*a376eb32SXin Li x86_64-*linux*) 1346*a376eb32SXin Li LD="${LD-ld} -m elf_x86_64" 1347*a376eb32SXin Li ;; 1348*a376eb32SXin Li ppc*-*linux*|powerpc*-*linux*) 1349*a376eb32SXin Li LD="${LD-ld} -m elf64ppc" 1350*a376eb32SXin Li ;; 1351*a376eb32SXin Li s390*-*linux*|s390*-*tpf*) 1352*a376eb32SXin Li LD="${LD-ld} -m elf64_s390" 1353*a376eb32SXin Li ;; 1354*a376eb32SXin Li sparc*-*linux*) 1355*a376eb32SXin Li LD="${LD-ld} -m elf64_sparc" 1356*a376eb32SXin Li ;; 1357*a376eb32SXin Li esac 1358*a376eb32SXin Li ;; 1359*a376eb32SXin Li esac 1360*a376eb32SXin Li fi 1361*a376eb32SXin Li rm -rf conftest* 1362*a376eb32SXin Li ;; 1363*a376eb32SXin Li 1364*a376eb32SXin Li*-*-sco3.2v5*) 1365*a376eb32SXin Li # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1366*a376eb32SXin Li SAVE_CFLAGS="$CFLAGS" 1367*a376eb32SXin Li CFLAGS="$CFLAGS -belf" 1368*a376eb32SXin Li AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1369*a376eb32SXin Li [AC_LANG_PUSH(C) 1370*a376eb32SXin Li AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1371*a376eb32SXin Li AC_LANG_POP]) 1372*a376eb32SXin Li if test x"$lt_cv_cc_needs_belf" != x"yes"; then 1373*a376eb32SXin Li # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1374*a376eb32SXin Li CFLAGS="$SAVE_CFLAGS" 1375*a376eb32SXin Li fi 1376*a376eb32SXin Li ;; 1377*a376eb32SXin Li*-*solaris*) 1378*a376eb32SXin Li # Find out which ABI we are using. 1379*a376eb32SXin Li echo 'int i;' > conftest.$ac_ext 1380*a376eb32SXin Li if AC_TRY_EVAL(ac_compile); then 1381*a376eb32SXin Li case `/usr/bin/file conftest.o` in 1382*a376eb32SXin Li *64-bit*) 1383*a376eb32SXin Li case $lt_cv_prog_gnu_ld in 1384*a376eb32SXin Li yes*) 1385*a376eb32SXin Li case $host in 1386*a376eb32SXin Li i?86-*-solaris*) 1387*a376eb32SXin Li LD="${LD-ld} -m elf_x86_64" 1388*a376eb32SXin Li ;; 1389*a376eb32SXin Li sparc*-*-solaris*) 1390*a376eb32SXin Li LD="${LD-ld} -m elf64_sparc" 1391*a376eb32SXin Li ;; 1392*a376eb32SXin Li esac 1393*a376eb32SXin Li # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1394*a376eb32SXin Li if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1395*a376eb32SXin Li LD="${LD-ld}_sol2" 1396*a376eb32SXin Li fi 1397*a376eb32SXin Li ;; 1398*a376eb32SXin Li *) 1399*a376eb32SXin Li if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1400*a376eb32SXin Li LD="${LD-ld} -64" 1401*a376eb32SXin Li fi 1402*a376eb32SXin Li ;; 1403*a376eb32SXin Li esac 1404*a376eb32SXin Li ;; 1405*a376eb32SXin Li esac 1406*a376eb32SXin Li fi 1407*a376eb32SXin Li rm -rf conftest* 1408*a376eb32SXin Li ;; 1409*a376eb32SXin Liesac 1410*a376eb32SXin Li 1411*a376eb32SXin Lineed_locks="$enable_libtool_lock" 1412*a376eb32SXin Li])# _LT_ENABLE_LOCK 1413*a376eb32SXin Li 1414*a376eb32SXin Li 1415*a376eb32SXin Li# _LT_PROG_AR 1416*a376eb32SXin Li# ----------- 1417*a376eb32SXin Lim4_defun([_LT_PROG_AR], 1418*a376eb32SXin Li[AC_CHECK_TOOLS(AR, [ar], false) 1419*a376eb32SXin Li: ${AR=ar} 1420*a376eb32SXin Li: ${AR_FLAGS=cru} 1421*a376eb32SXin Li_LT_DECL([], [AR], [1], [The archiver]) 1422*a376eb32SXin Li_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 1423*a376eb32SXin Li 1424*a376eb32SXin LiAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1425*a376eb32SXin Li [lt_cv_ar_at_file=no 1426*a376eb32SXin Li AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1427*a376eb32SXin Li [echo conftest.$ac_objext > conftest.lst 1428*a376eb32SXin Li lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1429*a376eb32SXin Li AC_TRY_EVAL([lt_ar_try]) 1430*a376eb32SXin Li if test "$ac_status" -eq 0; then 1431*a376eb32SXin Li # Ensure the archiver fails upon bogus file names. 1432*a376eb32SXin Li rm -f conftest.$ac_objext libconftest.a 1433*a376eb32SXin Li AC_TRY_EVAL([lt_ar_try]) 1434*a376eb32SXin Li if test "$ac_status" -ne 0; then 1435*a376eb32SXin Li lt_cv_ar_at_file=@ 1436*a376eb32SXin Li fi 1437*a376eb32SXin Li fi 1438*a376eb32SXin Li rm -f conftest.* libconftest.a 1439*a376eb32SXin Li ]) 1440*a376eb32SXin Li ]) 1441*a376eb32SXin Li 1442*a376eb32SXin Liif test "x$lt_cv_ar_at_file" = xno; then 1443*a376eb32SXin Li archiver_list_spec= 1444*a376eb32SXin Lielse 1445*a376eb32SXin Li archiver_list_spec=$lt_cv_ar_at_file 1446*a376eb32SXin Lifi 1447*a376eb32SXin Li_LT_DECL([], [archiver_list_spec], [1], 1448*a376eb32SXin Li [How to feed a file listing to the archiver]) 1449*a376eb32SXin Li])# _LT_PROG_AR 1450*a376eb32SXin Li 1451*a376eb32SXin Li 1452*a376eb32SXin Li# _LT_CMD_OLD_ARCHIVE 1453*a376eb32SXin Li# ------------------- 1454*a376eb32SXin Lim4_defun([_LT_CMD_OLD_ARCHIVE], 1455*a376eb32SXin Li[_LT_PROG_AR 1456*a376eb32SXin Li 1457*a376eb32SXin LiAC_CHECK_TOOL(STRIP, strip, :) 1458*a376eb32SXin Litest -z "$STRIP" && STRIP=: 1459*a376eb32SXin Li_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1460*a376eb32SXin Li 1461*a376eb32SXin LiAC_CHECK_TOOL(RANLIB, ranlib, :) 1462*a376eb32SXin Litest -z "$RANLIB" && RANLIB=: 1463*a376eb32SXin Li_LT_DECL([], [RANLIB], [1], 1464*a376eb32SXin Li [Commands used to install an old-style archive]) 1465*a376eb32SXin Li 1466*a376eb32SXin Li# Determine commands to create old-style static archives. 1467*a376eb32SXin Liold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1468*a376eb32SXin Liold_postinstall_cmds='chmod 644 $oldlib' 1469*a376eb32SXin Liold_postuninstall_cmds= 1470*a376eb32SXin Li 1471*a376eb32SXin Liif test -n "$RANLIB"; then 1472*a376eb32SXin Li case $host_os in 1473*a376eb32SXin Li openbsd*) 1474*a376eb32SXin Li old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 1475*a376eb32SXin Li ;; 1476*a376eb32SXin Li *) 1477*a376eb32SXin Li old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1478*a376eb32SXin Li ;; 1479*a376eb32SXin Li esac 1480*a376eb32SXin Li old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 1481*a376eb32SXin Lifi 1482*a376eb32SXin Li 1483*a376eb32SXin Licase $host_os in 1484*a376eb32SXin Li darwin*) 1485*a376eb32SXin Li lock_old_archive_extraction=yes ;; 1486*a376eb32SXin Li *) 1487*a376eb32SXin Li lock_old_archive_extraction=no ;; 1488*a376eb32SXin Liesac 1489*a376eb32SXin Li_LT_DECL([], [old_postinstall_cmds], [2]) 1490*a376eb32SXin Li_LT_DECL([], [old_postuninstall_cmds], [2]) 1491*a376eb32SXin Li_LT_TAGDECL([], [old_archive_cmds], [2], 1492*a376eb32SXin Li [Commands used to build an old-style archive]) 1493*a376eb32SXin Li_LT_DECL([], [lock_old_archive_extraction], [0], 1494*a376eb32SXin Li [Whether to use a lock for old archive extraction]) 1495*a376eb32SXin Li])# _LT_CMD_OLD_ARCHIVE 1496*a376eb32SXin Li 1497*a376eb32SXin Li 1498*a376eb32SXin Li# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1499*a376eb32SXin Li# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1500*a376eb32SXin Li# ---------------------------------------------------------------- 1501*a376eb32SXin Li# Check whether the given compiler option works 1502*a376eb32SXin LiAC_DEFUN([_LT_COMPILER_OPTION], 1503*a376eb32SXin Li[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1504*a376eb32SXin Lim4_require([_LT_DECL_SED])dnl 1505*a376eb32SXin LiAC_CACHE_CHECK([$1], [$2], 1506*a376eb32SXin Li [$2=no 1507*a376eb32SXin Li m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1508*a376eb32SXin Li echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1509*a376eb32SXin Li lt_compiler_flag="$3" 1510*a376eb32SXin Li # Insert the option either (1) after the last *FLAGS variable, or 1511*a376eb32SXin Li # (2) before a word containing "conftest.", or (3) at the end. 1512*a376eb32SXin Li # Note that $ac_compile itself does not contain backslashes and begins 1513*a376eb32SXin Li # with a dollar sign (not a hyphen), so the echo should work correctly. 1514*a376eb32SXin Li # The option is referenced via a variable to avoid confusing sed. 1515*a376eb32SXin Li lt_compile=`echo "$ac_compile" | $SED \ 1516*a376eb32SXin Li -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1517*a376eb32SXin Li -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1518*a376eb32SXin Li -e 's:$: $lt_compiler_flag:'` 1519*a376eb32SXin Li (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1520*a376eb32SXin Li (eval "$lt_compile" 2>conftest.err) 1521*a376eb32SXin Li ac_status=$? 1522*a376eb32SXin Li cat conftest.err >&AS_MESSAGE_LOG_FD 1523*a376eb32SXin Li echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1524*a376eb32SXin Li if (exit $ac_status) && test -s "$ac_outfile"; then 1525*a376eb32SXin Li # The compiler can only warn and ignore the option if not recognized 1526*a376eb32SXin Li # So say no if there are warnings other than the usual output. 1527*a376eb32SXin Li $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 1528*a376eb32SXin Li $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1529*a376eb32SXin Li if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1530*a376eb32SXin Li $2=yes 1531*a376eb32SXin Li fi 1532*a376eb32SXin Li fi 1533*a376eb32SXin Li $RM conftest* 1534*a376eb32SXin Li]) 1535*a376eb32SXin Li 1536*a376eb32SXin Liif test x"[$]$2" = xyes; then 1537*a376eb32SXin Li m4_if([$5], , :, [$5]) 1538*a376eb32SXin Lielse 1539*a376eb32SXin Li m4_if([$6], , :, [$6]) 1540*a376eb32SXin Lifi 1541*a376eb32SXin Li])# _LT_COMPILER_OPTION 1542*a376eb32SXin Li 1543*a376eb32SXin Li# Old name: 1544*a376eb32SXin LiAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1545*a376eb32SXin Lidnl aclocal-1.4 backwards compatibility: 1546*a376eb32SXin Lidnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1547*a376eb32SXin Li 1548*a376eb32SXin Li 1549*a376eb32SXin Li# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1550*a376eb32SXin Li# [ACTION-SUCCESS], [ACTION-FAILURE]) 1551*a376eb32SXin Li# ---------------------------------------------------- 1552*a376eb32SXin Li# Check whether the given linker option works 1553*a376eb32SXin LiAC_DEFUN([_LT_LINKER_OPTION], 1554*a376eb32SXin Li[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1555*a376eb32SXin Lim4_require([_LT_DECL_SED])dnl 1556*a376eb32SXin LiAC_CACHE_CHECK([$1], [$2], 1557*a376eb32SXin Li [$2=no 1558*a376eb32SXin Li save_LDFLAGS="$LDFLAGS" 1559*a376eb32SXin Li LDFLAGS="$LDFLAGS $3" 1560*a376eb32SXin Li echo "$lt_simple_link_test_code" > conftest.$ac_ext 1561*a376eb32SXin Li if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1562*a376eb32SXin Li # The linker can only warn and ignore the option if not recognized 1563*a376eb32SXin Li # So say no if there are warnings 1564*a376eb32SXin Li if test -s conftest.err; then 1565*a376eb32SXin Li # Append any errors to the config.log. 1566*a376eb32SXin Li cat conftest.err 1>&AS_MESSAGE_LOG_FD 1567*a376eb32SXin Li $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 1568*a376eb32SXin Li $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1569*a376eb32SXin Li if diff conftest.exp conftest.er2 >/dev/null; then 1570*a376eb32SXin Li $2=yes 1571*a376eb32SXin Li fi 1572*a376eb32SXin Li else 1573*a376eb32SXin Li $2=yes 1574*a376eb32SXin Li fi 1575*a376eb32SXin Li fi 1576*a376eb32SXin Li $RM -r conftest* 1577*a376eb32SXin Li LDFLAGS="$save_LDFLAGS" 1578*a376eb32SXin Li]) 1579*a376eb32SXin Li 1580*a376eb32SXin Liif test x"[$]$2" = xyes; then 1581*a376eb32SXin Li m4_if([$4], , :, [$4]) 1582*a376eb32SXin Lielse 1583*a376eb32SXin Li m4_if([$5], , :, [$5]) 1584*a376eb32SXin Lifi 1585*a376eb32SXin Li])# _LT_LINKER_OPTION 1586*a376eb32SXin Li 1587*a376eb32SXin Li# Old name: 1588*a376eb32SXin LiAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1589*a376eb32SXin Lidnl aclocal-1.4 backwards compatibility: 1590*a376eb32SXin Lidnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1591*a376eb32SXin Li 1592*a376eb32SXin Li 1593*a376eb32SXin Li# LT_CMD_MAX_LEN 1594*a376eb32SXin Li#--------------- 1595*a376eb32SXin LiAC_DEFUN([LT_CMD_MAX_LEN], 1596*a376eb32SXin Li[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1597*a376eb32SXin Li# find the maximum length of command line arguments 1598*a376eb32SXin LiAC_MSG_CHECKING([the maximum length of command line arguments]) 1599*a376eb32SXin LiAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1600*a376eb32SXin Li i=0 1601*a376eb32SXin Li teststring="ABCD" 1602*a376eb32SXin Li 1603*a376eb32SXin Li case $build_os in 1604*a376eb32SXin Li msdosdjgpp*) 1605*a376eb32SXin Li # On DJGPP, this test can blow up pretty badly due to problems in libc 1606*a376eb32SXin Li # (any single argument exceeding 2000 bytes causes a buffer overrun 1607*a376eb32SXin Li # during glob expansion). Even if it were fixed, the result of this 1608*a376eb32SXin Li # check would be larger than it should be. 1609*a376eb32SXin Li lt_cv_sys_max_cmd_len=12288; # 12K is about right 1610*a376eb32SXin Li ;; 1611*a376eb32SXin Li 1612*a376eb32SXin Li gnu*) 1613*a376eb32SXin Li # Under GNU Hurd, this test is not required because there is 1614*a376eb32SXin Li # no limit to the length of command line arguments. 1615*a376eb32SXin Li # Libtool will interpret -1 as no limit whatsoever 1616*a376eb32SXin Li lt_cv_sys_max_cmd_len=-1; 1617*a376eb32SXin Li ;; 1618*a376eb32SXin Li 1619*a376eb32SXin Li cygwin* | mingw* | cegcc*) 1620*a376eb32SXin Li # On Win9x/ME, this test blows up -- it succeeds, but takes 1621*a376eb32SXin Li # about 5 minutes as the teststring grows exponentially. 1622*a376eb32SXin Li # Worse, since 9x/ME are not pre-emptively multitasking, 1623*a376eb32SXin Li # you end up with a "frozen" computer, even though with patience 1624*a376eb32SXin Li # the test eventually succeeds (with a max line length of 256k). 1625*a376eb32SXin Li # Instead, let's just punt: use the minimum linelength reported by 1626*a376eb32SXin Li # all of the supported platforms: 8192 (on NT/2K/XP). 1627*a376eb32SXin Li lt_cv_sys_max_cmd_len=8192; 1628*a376eb32SXin Li ;; 1629*a376eb32SXin Li 1630*a376eb32SXin Li mint*) 1631*a376eb32SXin Li # On MiNT this can take a long time and run out of memory. 1632*a376eb32SXin Li lt_cv_sys_max_cmd_len=8192; 1633*a376eb32SXin Li ;; 1634*a376eb32SXin Li 1635*a376eb32SXin Li amigaos*) 1636*a376eb32SXin Li # On AmigaOS with pdksh, this test takes hours, literally. 1637*a376eb32SXin Li # So we just punt and use a minimum line length of 8192. 1638*a376eb32SXin Li lt_cv_sys_max_cmd_len=8192; 1639*a376eb32SXin Li ;; 1640*a376eb32SXin Li 1641*a376eb32SXin Li netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 1642*a376eb32SXin Li # This has been around since 386BSD, at least. Likely further. 1643*a376eb32SXin Li if test -x /sbin/sysctl; then 1644*a376eb32SXin Li lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1645*a376eb32SXin Li elif test -x /usr/sbin/sysctl; then 1646*a376eb32SXin Li lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1647*a376eb32SXin Li else 1648*a376eb32SXin Li lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1649*a376eb32SXin Li fi 1650*a376eb32SXin Li # And add a safety zone 1651*a376eb32SXin Li lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1652*a376eb32SXin Li lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1653*a376eb32SXin Li ;; 1654*a376eb32SXin Li 1655*a376eb32SXin Li interix*) 1656*a376eb32SXin Li # We know the value 262144 and hardcode it with a safety zone (like BSD) 1657*a376eb32SXin Li lt_cv_sys_max_cmd_len=196608 1658*a376eb32SXin Li ;; 1659*a376eb32SXin Li 1660*a376eb32SXin Li os2*) 1661*a376eb32SXin Li # The test takes a long time on OS/2. 1662*a376eb32SXin Li lt_cv_sys_max_cmd_len=8192 1663*a376eb32SXin Li ;; 1664*a376eb32SXin Li 1665*a376eb32SXin Li osf*) 1666*a376eb32SXin Li # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1667*a376eb32SXin Li # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1668*a376eb32SXin Li # nice to cause kernel panics so lets avoid the loop below. 1669*a376eb32SXin Li # First set a reasonable default. 1670*a376eb32SXin Li lt_cv_sys_max_cmd_len=16384 1671*a376eb32SXin Li # 1672*a376eb32SXin Li if test -x /sbin/sysconfig; then 1673*a376eb32SXin Li case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1674*a376eb32SXin Li *1*) lt_cv_sys_max_cmd_len=-1 ;; 1675*a376eb32SXin Li esac 1676*a376eb32SXin Li fi 1677*a376eb32SXin Li ;; 1678*a376eb32SXin Li sco3.2v5*) 1679*a376eb32SXin Li lt_cv_sys_max_cmd_len=102400 1680*a376eb32SXin Li ;; 1681*a376eb32SXin Li sysv5* | sco5v6* | sysv4.2uw2*) 1682*a376eb32SXin Li kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1683*a376eb32SXin Li if test -n "$kargmax"; then 1684*a376eb32SXin Li lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1685*a376eb32SXin Li else 1686*a376eb32SXin Li lt_cv_sys_max_cmd_len=32768 1687*a376eb32SXin Li fi 1688*a376eb32SXin Li ;; 1689*a376eb32SXin Li *) 1690*a376eb32SXin Li lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1691*a376eb32SXin Li if test -n "$lt_cv_sys_max_cmd_len"; then 1692*a376eb32SXin Li lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1693*a376eb32SXin Li lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1694*a376eb32SXin Li else 1695*a376eb32SXin Li # Make teststring a little bigger before we do anything with it. 1696*a376eb32SXin Li # a 1K string should be a reasonable start. 1697*a376eb32SXin Li for i in 1 2 3 4 5 6 7 8 ; do 1698*a376eb32SXin Li teststring=$teststring$teststring 1699*a376eb32SXin Li done 1700*a376eb32SXin Li SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1701*a376eb32SXin Li # If test is not a shell built-in, we'll probably end up computing a 1702*a376eb32SXin Li # maximum length that is only half of the actual maximum length, but 1703*a376eb32SXin Li # we can't tell. 1704*a376eb32SXin Li while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 1705*a376eb32SXin Li = "X$teststring$teststring"; } >/dev/null 2>&1 && 1706*a376eb32SXin Li test $i != 17 # 1/2 MB should be enough 1707*a376eb32SXin Li do 1708*a376eb32SXin Li i=`expr $i + 1` 1709*a376eb32SXin Li teststring=$teststring$teststring 1710*a376eb32SXin Li done 1711*a376eb32SXin Li # Only check the string length outside the loop. 1712*a376eb32SXin Li lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1713*a376eb32SXin Li teststring= 1714*a376eb32SXin Li # Add a significant safety factor because C++ compilers can tack on 1715*a376eb32SXin Li # massive amounts of additional arguments before passing them to the 1716*a376eb32SXin Li # linker. It appears as though 1/2 is a usable value. 1717*a376eb32SXin Li lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1718*a376eb32SXin Li fi 1719*a376eb32SXin Li ;; 1720*a376eb32SXin Li esac 1721*a376eb32SXin Li]) 1722*a376eb32SXin Liif test -n $lt_cv_sys_max_cmd_len ; then 1723*a376eb32SXin Li AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1724*a376eb32SXin Lielse 1725*a376eb32SXin Li AC_MSG_RESULT(none) 1726*a376eb32SXin Lifi 1727*a376eb32SXin Limax_cmd_len=$lt_cv_sys_max_cmd_len 1728*a376eb32SXin Li_LT_DECL([], [max_cmd_len], [0], 1729*a376eb32SXin Li [What is the maximum length of a command?]) 1730*a376eb32SXin Li])# LT_CMD_MAX_LEN 1731*a376eb32SXin Li 1732*a376eb32SXin Li# Old name: 1733*a376eb32SXin LiAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1734*a376eb32SXin Lidnl aclocal-1.4 backwards compatibility: 1735*a376eb32SXin Lidnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1736*a376eb32SXin Li 1737*a376eb32SXin Li 1738*a376eb32SXin Li# _LT_HEADER_DLFCN 1739*a376eb32SXin Li# ---------------- 1740*a376eb32SXin Lim4_defun([_LT_HEADER_DLFCN], 1741*a376eb32SXin Li[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1742*a376eb32SXin Li])# _LT_HEADER_DLFCN 1743*a376eb32SXin Li 1744*a376eb32SXin Li 1745*a376eb32SXin Li# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1746*a376eb32SXin Li# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1747*a376eb32SXin Li# ---------------------------------------------------------------- 1748*a376eb32SXin Lim4_defun([_LT_TRY_DLOPEN_SELF], 1749*a376eb32SXin Li[m4_require([_LT_HEADER_DLFCN])dnl 1750*a376eb32SXin Liif test "$cross_compiling" = yes; then : 1751*a376eb32SXin Li [$4] 1752*a376eb32SXin Lielse 1753*a376eb32SXin Li lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1754*a376eb32SXin Li lt_status=$lt_dlunknown 1755*a376eb32SXin Li cat > conftest.$ac_ext <<_LT_EOF 1756*a376eb32SXin Li[#line $LINENO "configure" 1757*a376eb32SXin Li#include "confdefs.h" 1758*a376eb32SXin Li 1759*a376eb32SXin Li#if HAVE_DLFCN_H 1760*a376eb32SXin Li#include <dlfcn.h> 1761*a376eb32SXin Li#endif 1762*a376eb32SXin Li 1763*a376eb32SXin Li#include <stdio.h> 1764*a376eb32SXin Li 1765*a376eb32SXin Li#ifdef RTLD_GLOBAL 1766*a376eb32SXin Li# define LT_DLGLOBAL RTLD_GLOBAL 1767*a376eb32SXin Li#else 1768*a376eb32SXin Li# ifdef DL_GLOBAL 1769*a376eb32SXin Li# define LT_DLGLOBAL DL_GLOBAL 1770*a376eb32SXin Li# else 1771*a376eb32SXin Li# define LT_DLGLOBAL 0 1772*a376eb32SXin Li# endif 1773*a376eb32SXin Li#endif 1774*a376eb32SXin Li 1775*a376eb32SXin Li/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1776*a376eb32SXin Li find out it does not work in some platform. */ 1777*a376eb32SXin Li#ifndef LT_DLLAZY_OR_NOW 1778*a376eb32SXin Li# ifdef RTLD_LAZY 1779*a376eb32SXin Li# define LT_DLLAZY_OR_NOW RTLD_LAZY 1780*a376eb32SXin Li# else 1781*a376eb32SXin Li# ifdef DL_LAZY 1782*a376eb32SXin Li# define LT_DLLAZY_OR_NOW DL_LAZY 1783*a376eb32SXin Li# else 1784*a376eb32SXin Li# ifdef RTLD_NOW 1785*a376eb32SXin Li# define LT_DLLAZY_OR_NOW RTLD_NOW 1786*a376eb32SXin Li# else 1787*a376eb32SXin Li# ifdef DL_NOW 1788*a376eb32SXin Li# define LT_DLLAZY_OR_NOW DL_NOW 1789*a376eb32SXin Li# else 1790*a376eb32SXin Li# define LT_DLLAZY_OR_NOW 0 1791*a376eb32SXin Li# endif 1792*a376eb32SXin Li# endif 1793*a376eb32SXin Li# endif 1794*a376eb32SXin Li# endif 1795*a376eb32SXin Li#endif 1796*a376eb32SXin Li 1797*a376eb32SXin Li/* When -fvisbility=hidden is used, assume the code has been annotated 1798*a376eb32SXin Li correspondingly for the symbols needed. */ 1799*a376eb32SXin Li#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1800*a376eb32SXin Liint fnord () __attribute__((visibility("default"))); 1801*a376eb32SXin Li#endif 1802*a376eb32SXin Li 1803*a376eb32SXin Liint fnord () { return 42; } 1804*a376eb32SXin Liint main () 1805*a376eb32SXin Li{ 1806*a376eb32SXin Li void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1807*a376eb32SXin Li int status = $lt_dlunknown; 1808*a376eb32SXin Li 1809*a376eb32SXin Li if (self) 1810*a376eb32SXin Li { 1811*a376eb32SXin Li if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1812*a376eb32SXin Li else 1813*a376eb32SXin Li { 1814*a376eb32SXin Li if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1815*a376eb32SXin Li else puts (dlerror ()); 1816*a376eb32SXin Li } 1817*a376eb32SXin Li /* dlclose (self); */ 1818*a376eb32SXin Li } 1819*a376eb32SXin Li else 1820*a376eb32SXin Li puts (dlerror ()); 1821*a376eb32SXin Li 1822*a376eb32SXin Li return status; 1823*a376eb32SXin Li}] 1824*a376eb32SXin Li_LT_EOF 1825*a376eb32SXin Li if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 1826*a376eb32SXin Li (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1827*a376eb32SXin Li lt_status=$? 1828*a376eb32SXin Li case x$lt_status in 1829*a376eb32SXin Li x$lt_dlno_uscore) $1 ;; 1830*a376eb32SXin Li x$lt_dlneed_uscore) $2 ;; 1831*a376eb32SXin Li x$lt_dlunknown|x*) $3 ;; 1832*a376eb32SXin Li esac 1833*a376eb32SXin Li else : 1834*a376eb32SXin Li # compilation failed 1835*a376eb32SXin Li $3 1836*a376eb32SXin Li fi 1837*a376eb32SXin Lifi 1838*a376eb32SXin Lirm -fr conftest* 1839*a376eb32SXin Li])# _LT_TRY_DLOPEN_SELF 1840*a376eb32SXin Li 1841*a376eb32SXin Li 1842*a376eb32SXin Li# LT_SYS_DLOPEN_SELF 1843*a376eb32SXin Li# ------------------ 1844*a376eb32SXin LiAC_DEFUN([LT_SYS_DLOPEN_SELF], 1845*a376eb32SXin Li[m4_require([_LT_HEADER_DLFCN])dnl 1846*a376eb32SXin Liif test "x$enable_dlopen" != xyes; then 1847*a376eb32SXin Li enable_dlopen=unknown 1848*a376eb32SXin Li enable_dlopen_self=unknown 1849*a376eb32SXin Li enable_dlopen_self_static=unknown 1850*a376eb32SXin Lielse 1851*a376eb32SXin Li lt_cv_dlopen=no 1852*a376eb32SXin Li lt_cv_dlopen_libs= 1853*a376eb32SXin Li 1854*a376eb32SXin Li case $host_os in 1855*a376eb32SXin Li beos*) 1856*a376eb32SXin Li lt_cv_dlopen="load_add_on" 1857*a376eb32SXin Li lt_cv_dlopen_libs= 1858*a376eb32SXin Li lt_cv_dlopen_self=yes 1859*a376eb32SXin Li ;; 1860*a376eb32SXin Li 1861*a376eb32SXin Li mingw* | pw32* | cegcc*) 1862*a376eb32SXin Li lt_cv_dlopen="LoadLibrary" 1863*a376eb32SXin Li lt_cv_dlopen_libs= 1864*a376eb32SXin Li ;; 1865*a376eb32SXin Li 1866*a376eb32SXin Li cygwin*) 1867*a376eb32SXin Li lt_cv_dlopen="dlopen" 1868*a376eb32SXin Li lt_cv_dlopen_libs= 1869*a376eb32SXin Li ;; 1870*a376eb32SXin Li 1871*a376eb32SXin Li darwin*) 1872*a376eb32SXin Li # if libdl is installed we need to link against it 1873*a376eb32SXin Li AC_CHECK_LIB([dl], [dlopen], 1874*a376eb32SXin Li [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 1875*a376eb32SXin Li lt_cv_dlopen="dyld" 1876*a376eb32SXin Li lt_cv_dlopen_libs= 1877*a376eb32SXin Li lt_cv_dlopen_self=yes 1878*a376eb32SXin Li ]) 1879*a376eb32SXin Li ;; 1880*a376eb32SXin Li 1881*a376eb32SXin Li *) 1882*a376eb32SXin Li AC_CHECK_FUNC([shl_load], 1883*a376eb32SXin Li [lt_cv_dlopen="shl_load"], 1884*a376eb32SXin Li [AC_CHECK_LIB([dld], [shl_load], 1885*a376eb32SXin Li [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 1886*a376eb32SXin Li [AC_CHECK_FUNC([dlopen], 1887*a376eb32SXin Li [lt_cv_dlopen="dlopen"], 1888*a376eb32SXin Li [AC_CHECK_LIB([dl], [dlopen], 1889*a376eb32SXin Li [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 1890*a376eb32SXin Li [AC_CHECK_LIB([svld], [dlopen], 1891*a376eb32SXin Li [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 1892*a376eb32SXin Li [AC_CHECK_LIB([dld], [dld_link], 1893*a376eb32SXin Li [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 1894*a376eb32SXin Li ]) 1895*a376eb32SXin Li ]) 1896*a376eb32SXin Li ]) 1897*a376eb32SXin Li ]) 1898*a376eb32SXin Li ]) 1899*a376eb32SXin Li ;; 1900*a376eb32SXin Li esac 1901*a376eb32SXin Li 1902*a376eb32SXin Li if test "x$lt_cv_dlopen" != xno; then 1903*a376eb32SXin Li enable_dlopen=yes 1904*a376eb32SXin Li else 1905*a376eb32SXin Li enable_dlopen=no 1906*a376eb32SXin Li fi 1907*a376eb32SXin Li 1908*a376eb32SXin Li case $lt_cv_dlopen in 1909*a376eb32SXin Li dlopen) 1910*a376eb32SXin Li save_CPPFLAGS="$CPPFLAGS" 1911*a376eb32SXin Li test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1912*a376eb32SXin Li 1913*a376eb32SXin Li save_LDFLAGS="$LDFLAGS" 1914*a376eb32SXin Li wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1915*a376eb32SXin Li 1916*a376eb32SXin Li save_LIBS="$LIBS" 1917*a376eb32SXin Li LIBS="$lt_cv_dlopen_libs $LIBS" 1918*a376eb32SXin Li 1919*a376eb32SXin Li AC_CACHE_CHECK([whether a program can dlopen itself], 1920*a376eb32SXin Li lt_cv_dlopen_self, [dnl 1921*a376eb32SXin Li _LT_TRY_DLOPEN_SELF( 1922*a376eb32SXin Li lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 1923*a376eb32SXin Li lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 1924*a376eb32SXin Li ]) 1925*a376eb32SXin Li 1926*a376eb32SXin Li if test "x$lt_cv_dlopen_self" = xyes; then 1927*a376eb32SXin Li wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 1928*a376eb32SXin Li AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1929*a376eb32SXin Li lt_cv_dlopen_self_static, [dnl 1930*a376eb32SXin Li _LT_TRY_DLOPEN_SELF( 1931*a376eb32SXin Li lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 1932*a376eb32SXin Li lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 1933*a376eb32SXin Li ]) 1934*a376eb32SXin Li fi 1935*a376eb32SXin Li 1936*a376eb32SXin Li CPPFLAGS="$save_CPPFLAGS" 1937*a376eb32SXin Li LDFLAGS="$save_LDFLAGS" 1938*a376eb32SXin Li LIBS="$save_LIBS" 1939*a376eb32SXin Li ;; 1940*a376eb32SXin Li esac 1941*a376eb32SXin Li 1942*a376eb32SXin Li case $lt_cv_dlopen_self in 1943*a376eb32SXin Li yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 1944*a376eb32SXin Li *) enable_dlopen_self=unknown ;; 1945*a376eb32SXin Li esac 1946*a376eb32SXin Li 1947*a376eb32SXin Li case $lt_cv_dlopen_self_static in 1948*a376eb32SXin Li yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1949*a376eb32SXin Li *) enable_dlopen_self_static=unknown ;; 1950*a376eb32SXin Li esac 1951*a376eb32SXin Lifi 1952*a376eb32SXin Li_LT_DECL([dlopen_support], [enable_dlopen], [0], 1953*a376eb32SXin Li [Whether dlopen is supported]) 1954*a376eb32SXin Li_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 1955*a376eb32SXin Li [Whether dlopen of programs is supported]) 1956*a376eb32SXin Li_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 1957*a376eb32SXin Li [Whether dlopen of statically linked programs is supported]) 1958*a376eb32SXin Li])# LT_SYS_DLOPEN_SELF 1959*a376eb32SXin Li 1960*a376eb32SXin Li# Old name: 1961*a376eb32SXin LiAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 1962*a376eb32SXin Lidnl aclocal-1.4 backwards compatibility: 1963*a376eb32SXin Lidnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 1964*a376eb32SXin Li 1965*a376eb32SXin Li 1966*a376eb32SXin Li# _LT_COMPILER_C_O([TAGNAME]) 1967*a376eb32SXin Li# --------------------------- 1968*a376eb32SXin Li# Check to see if options -c and -o are simultaneously supported by compiler. 1969*a376eb32SXin Li# This macro does not hard code the compiler like AC_PROG_CC_C_O. 1970*a376eb32SXin Lim4_defun([_LT_COMPILER_C_O], 1971*a376eb32SXin Li[m4_require([_LT_DECL_SED])dnl 1972*a376eb32SXin Lim4_require([_LT_FILEUTILS_DEFAULTS])dnl 1973*a376eb32SXin Lim4_require([_LT_TAG_COMPILER])dnl 1974*a376eb32SXin LiAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1975*a376eb32SXin Li [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1976*a376eb32SXin Li [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1977*a376eb32SXin Li $RM -r conftest 2>/dev/null 1978*a376eb32SXin Li mkdir conftest 1979*a376eb32SXin Li cd conftest 1980*a376eb32SXin Li mkdir out 1981*a376eb32SXin Li echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1982*a376eb32SXin Li 1983*a376eb32SXin Li lt_compiler_flag="-o out/conftest2.$ac_objext" 1984*a376eb32SXin Li # Insert the option either (1) after the last *FLAGS variable, or 1985*a376eb32SXin Li # (2) before a word containing "conftest.", or (3) at the end. 1986*a376eb32SXin Li # Note that $ac_compile itself does not contain backslashes and begins 1987*a376eb32SXin Li # with a dollar sign (not a hyphen), so the echo should work correctly. 1988*a376eb32SXin Li lt_compile=`echo "$ac_compile" | $SED \ 1989*a376eb32SXin Li -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1990*a376eb32SXin Li -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1991*a376eb32SXin Li -e 's:$: $lt_compiler_flag:'` 1992*a376eb32SXin Li (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1993*a376eb32SXin Li (eval "$lt_compile" 2>out/conftest.err) 1994*a376eb32SXin Li ac_status=$? 1995*a376eb32SXin Li cat out/conftest.err >&AS_MESSAGE_LOG_FD 1996*a376eb32SXin Li echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1997*a376eb32SXin Li if (exit $ac_status) && test -s out/conftest2.$ac_objext 1998*a376eb32SXin Li then 1999*a376eb32SXin Li # The compiler can only warn and ignore the option if not recognized 2000*a376eb32SXin Li # So say no if there are warnings 2001*a376eb32SXin Li $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 2002*a376eb32SXin Li $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 2003*a376eb32SXin Li if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2004*a376eb32SXin Li _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2005*a376eb32SXin Li fi 2006*a376eb32SXin Li fi 2007*a376eb32SXin Li chmod u+w . 2>&AS_MESSAGE_LOG_FD 2008*a376eb32SXin Li $RM conftest* 2009*a376eb32SXin Li # SGI C++ compiler will create directory out/ii_files/ for 2010*a376eb32SXin Li # template instantiation 2011*a376eb32SXin Li test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 2012*a376eb32SXin Li $RM out/* && rmdir out 2013*a376eb32SXin Li cd .. 2014*a376eb32SXin Li $RM -r conftest 2015*a376eb32SXin Li $RM conftest* 2016*a376eb32SXin Li]) 2017*a376eb32SXin Li_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 2018*a376eb32SXin Li [Does compiler simultaneously support -c and -o options?]) 2019*a376eb32SXin Li])# _LT_COMPILER_C_O 2020*a376eb32SXin Li 2021*a376eb32SXin Li 2022*a376eb32SXin Li# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 2023*a376eb32SXin Li# ---------------------------------- 2024*a376eb32SXin Li# Check to see if we can do hard links to lock some files if needed 2025*a376eb32SXin Lim4_defun([_LT_COMPILER_FILE_LOCKS], 2026*a376eb32SXin Li[m4_require([_LT_ENABLE_LOCK])dnl 2027*a376eb32SXin Lim4_require([_LT_FILEUTILS_DEFAULTS])dnl 2028*a376eb32SXin Li_LT_COMPILER_C_O([$1]) 2029*a376eb32SXin Li 2030*a376eb32SXin Lihard_links="nottested" 2031*a376eb32SXin Liif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 2032*a376eb32SXin Li # do not overwrite the value of need_locks provided by the user 2033*a376eb32SXin Li AC_MSG_CHECKING([if we can lock with hard links]) 2034*a376eb32SXin Li hard_links=yes 2035*a376eb32SXin Li $RM conftest* 2036*a376eb32SXin Li ln conftest.a conftest.b 2>/dev/null && hard_links=no 2037*a376eb32SXin Li touch conftest.a 2038*a376eb32SXin Li ln conftest.a conftest.b 2>&5 || hard_links=no 2039*a376eb32SXin Li ln conftest.a conftest.b 2>/dev/null && hard_links=no 2040*a376eb32SXin Li AC_MSG_RESULT([$hard_links]) 2041*a376eb32SXin Li if test "$hard_links" = no; then 2042*a376eb32SXin Li AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 2043*a376eb32SXin Li need_locks=warn 2044*a376eb32SXin Li fi 2045*a376eb32SXin Lielse 2046*a376eb32SXin Li need_locks=no 2047*a376eb32SXin Lifi 2048*a376eb32SXin Li_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2049*a376eb32SXin Li])# _LT_COMPILER_FILE_LOCKS 2050*a376eb32SXin Li 2051*a376eb32SXin Li 2052*a376eb32SXin Li# _LT_CHECK_OBJDIR 2053*a376eb32SXin Li# ---------------- 2054*a376eb32SXin Lim4_defun([_LT_CHECK_OBJDIR], 2055*a376eb32SXin Li[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2056*a376eb32SXin Li[rm -f .libs 2>/dev/null 2057*a376eb32SXin Limkdir .libs 2>/dev/null 2058*a376eb32SXin Liif test -d .libs; then 2059*a376eb32SXin Li lt_cv_objdir=.libs 2060*a376eb32SXin Lielse 2061*a376eb32SXin Li # MS-DOS does not allow filenames that begin with a dot. 2062*a376eb32SXin Li lt_cv_objdir=_libs 2063*a376eb32SXin Lifi 2064*a376eb32SXin Lirmdir .libs 2>/dev/null]) 2065*a376eb32SXin Liobjdir=$lt_cv_objdir 2066*a376eb32SXin Li_LT_DECL([], [objdir], [0], 2067*a376eb32SXin Li [The name of the directory that contains temporary libtool files])dnl 2068*a376eb32SXin Lim4_pattern_allow([LT_OBJDIR])dnl 2069*a376eb32SXin LiAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 2070*a376eb32SXin Li [Define to the sub-directory in which libtool stores uninstalled libraries.]) 2071*a376eb32SXin Li])# _LT_CHECK_OBJDIR 2072*a376eb32SXin Li 2073*a376eb32SXin Li 2074*a376eb32SXin Li# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2075*a376eb32SXin Li# -------------------------------------- 2076*a376eb32SXin Li# Check hardcoding attributes. 2077*a376eb32SXin Lim4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2078*a376eb32SXin Li[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2079*a376eb32SXin Li_LT_TAGVAR(hardcode_action, $1)= 2080*a376eb32SXin Liif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2081*a376eb32SXin Li test -n "$_LT_TAGVAR(runpath_var, $1)" || 2082*a376eb32SXin Li test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 2083*a376eb32SXin Li 2084*a376eb32SXin Li # We can hardcode non-existent directories. 2085*a376eb32SXin Li if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 2086*a376eb32SXin Li # If the only mechanism to avoid hardcoding is shlibpath_var, we 2087*a376eb32SXin Li # have to relink, otherwise we might link with an installed library 2088*a376eb32SXin Li # when we should be linking with a yet-to-be-installed one 2089*a376eb32SXin Li ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 2090*a376eb32SXin Li test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 2091*a376eb32SXin Li # Linking always hardcodes the temporary library directory. 2092*a376eb32SXin Li _LT_TAGVAR(hardcode_action, $1)=relink 2093*a376eb32SXin Li else 2094*a376eb32SXin Li # We can link without hardcoding, and we can hardcode nonexisting dirs. 2095*a376eb32SXin Li _LT_TAGVAR(hardcode_action, $1)=immediate 2096*a376eb32SXin Li fi 2097*a376eb32SXin Lielse 2098*a376eb32SXin Li # We cannot hardcode anything, or else we can only hardcode existing 2099*a376eb32SXin Li # directories. 2100*a376eb32SXin Li _LT_TAGVAR(hardcode_action, $1)=unsupported 2101*a376eb32SXin Lifi 2102*a376eb32SXin LiAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2103*a376eb32SXin Li 2104*a376eb32SXin Liif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 2105*a376eb32SXin Li test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 2106*a376eb32SXin Li # Fast installation is not supported 2107*a376eb32SXin Li enable_fast_install=no 2108*a376eb32SXin Lielif test "$shlibpath_overrides_runpath" = yes || 2109*a376eb32SXin Li test "$enable_shared" = no; then 2110*a376eb32SXin Li # Fast installation is not necessary 2111*a376eb32SXin Li enable_fast_install=needless 2112*a376eb32SXin Lifi 2113*a376eb32SXin Li_LT_TAGDECL([], [hardcode_action], [0], 2114*a376eb32SXin Li [How to hardcode a shared library path into an executable]) 2115*a376eb32SXin Li])# _LT_LINKER_HARDCODE_LIBPATH 2116*a376eb32SXin Li 2117*a376eb32SXin Li 2118*a376eb32SXin Li# _LT_CMD_STRIPLIB 2119*a376eb32SXin Li# ---------------- 2120*a376eb32SXin Lim4_defun([_LT_CMD_STRIPLIB], 2121*a376eb32SXin Li[m4_require([_LT_DECL_EGREP]) 2122*a376eb32SXin Listriplib= 2123*a376eb32SXin Liold_striplib= 2124*a376eb32SXin LiAC_MSG_CHECKING([whether stripping libraries is possible]) 2125*a376eb32SXin Liif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2126*a376eb32SXin Li test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2127*a376eb32SXin Li test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2128*a376eb32SXin Li AC_MSG_RESULT([yes]) 2129*a376eb32SXin Lielse 2130*a376eb32SXin Li# FIXME - insert some real tests, host_os isn't really good enough 2131*a376eb32SXin Li case $host_os in 2132*a376eb32SXin Li darwin*) 2133*a376eb32SXin Li if test -n "$STRIP" ; then 2134*a376eb32SXin Li striplib="$STRIP -x" 2135*a376eb32SXin Li old_striplib="$STRIP -S" 2136*a376eb32SXin Li AC_MSG_RESULT([yes]) 2137*a376eb32SXin Li else 2138*a376eb32SXin Li AC_MSG_RESULT([no]) 2139*a376eb32SXin Li fi 2140*a376eb32SXin Li ;; 2141*a376eb32SXin Li *) 2142*a376eb32SXin Li AC_MSG_RESULT([no]) 2143*a376eb32SXin Li ;; 2144*a376eb32SXin Li esac 2145*a376eb32SXin Lifi 2146*a376eb32SXin Li_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2147*a376eb32SXin Li_LT_DECL([], [striplib], [1]) 2148*a376eb32SXin Li])# _LT_CMD_STRIPLIB 2149*a376eb32SXin Li 2150*a376eb32SXin Li 2151*a376eb32SXin Li# _LT_SYS_DYNAMIC_LINKER([TAG]) 2152*a376eb32SXin Li# ----------------------------- 2153*a376eb32SXin Li# PORTME Fill in your ld.so characteristics 2154*a376eb32SXin Lim4_defun([_LT_SYS_DYNAMIC_LINKER], 2155*a376eb32SXin Li[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2156*a376eb32SXin Lim4_require([_LT_DECL_EGREP])dnl 2157*a376eb32SXin Lim4_require([_LT_FILEUTILS_DEFAULTS])dnl 2158*a376eb32SXin Lim4_require([_LT_DECL_OBJDUMP])dnl 2159*a376eb32SXin Lim4_require([_LT_DECL_SED])dnl 2160*a376eb32SXin Lim4_require([_LT_CHECK_SHELL_FEATURES])dnl 2161*a376eb32SXin LiAC_MSG_CHECKING([dynamic linker characteristics]) 2162*a376eb32SXin Lim4_if([$1], 2163*a376eb32SXin Li [], [ 2164*a376eb32SXin Liif test "$GCC" = yes; then 2165*a376eb32SXin Li case $host_os in 2166*a376eb32SXin Li darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 2167*a376eb32SXin Li *) lt_awk_arg="/^libraries:/" ;; 2168*a376eb32SXin Li esac 2169*a376eb32SXin Li case $host_os in 2170*a376eb32SXin Li mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 2171*a376eb32SXin Li *) lt_sed_strip_eq="s,=/,/,g" ;; 2172*a376eb32SXin Li esac 2173*a376eb32SXin Li lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2174*a376eb32SXin Li case $lt_search_path_spec in 2175*a376eb32SXin Li *\;*) 2176*a376eb32SXin Li # if the path contains ";" then we assume it to be the separator 2177*a376eb32SXin Li # otherwise default to the standard path separator (i.e. ":") - it is 2178*a376eb32SXin Li # assumed that no part of a normal pathname contains ";" but that should 2179*a376eb32SXin Li # okay in the real world where ";" in dirpaths is itself problematic. 2180*a376eb32SXin Li lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2181*a376eb32SXin Li ;; 2182*a376eb32SXin Li *) 2183*a376eb32SXin Li lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2184*a376eb32SXin Li ;; 2185*a376eb32SXin Li esac 2186*a376eb32SXin Li # Ok, now we have the path, separated by spaces, we can step through it 2187*a376eb32SXin Li # and add multilib dir if necessary. 2188*a376eb32SXin Li lt_tmp_lt_search_path_spec= 2189*a376eb32SXin Li lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2190*a376eb32SXin Li for lt_sys_path in $lt_search_path_spec; do 2191*a376eb32SXin Li if test -d "$lt_sys_path/$lt_multi_os_dir"; then 2192*a376eb32SXin Li lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 2193*a376eb32SXin Li else 2194*a376eb32SXin Li test -d "$lt_sys_path" && \ 2195*a376eb32SXin Li lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2196*a376eb32SXin Li fi 2197*a376eb32SXin Li done 2198*a376eb32SXin Li lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2199*a376eb32SXin LiBEGIN {RS=" "; FS="/|\n";} { 2200*a376eb32SXin Li lt_foo=""; 2201*a376eb32SXin Li lt_count=0; 2202*a376eb32SXin Li for (lt_i = NF; lt_i > 0; lt_i--) { 2203*a376eb32SXin Li if ($lt_i != "" && $lt_i != ".") { 2204*a376eb32SXin Li if ($lt_i == "..") { 2205*a376eb32SXin Li lt_count++; 2206*a376eb32SXin Li } else { 2207*a376eb32SXin Li if (lt_count == 0) { 2208*a376eb32SXin Li lt_foo="/" $lt_i lt_foo; 2209*a376eb32SXin Li } else { 2210*a376eb32SXin Li lt_count--; 2211*a376eb32SXin Li } 2212*a376eb32SXin Li } 2213*a376eb32SXin Li } 2214*a376eb32SXin Li } 2215*a376eb32SXin Li if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2216*a376eb32SXin Li if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2217*a376eb32SXin Li}'` 2218*a376eb32SXin Li # AWK program above erroneously prepends '/' to C:/dos/paths 2219*a376eb32SXin Li # for these hosts. 2220*a376eb32SXin Li case $host_os in 2221*a376eb32SXin Li mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2222*a376eb32SXin Li $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 2223*a376eb32SXin Li esac 2224*a376eb32SXin Li sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2225*a376eb32SXin Lielse 2226*a376eb32SXin Li sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2227*a376eb32SXin Lifi]) 2228*a376eb32SXin Lilibrary_names_spec= 2229*a376eb32SXin Lilibname_spec='lib$name' 2230*a376eb32SXin Lisoname_spec= 2231*a376eb32SXin Lishrext_cmds=".so" 2232*a376eb32SXin Lipostinstall_cmds= 2233*a376eb32SXin Lipostuninstall_cmds= 2234*a376eb32SXin Lifinish_cmds= 2235*a376eb32SXin Lifinish_eval= 2236*a376eb32SXin Lishlibpath_var= 2237*a376eb32SXin Lishlibpath_overrides_runpath=unknown 2238*a376eb32SXin Liversion_type=none 2239*a376eb32SXin Lidynamic_linker="$host_os ld.so" 2240*a376eb32SXin Lisys_lib_dlsearch_path_spec="/lib /usr/lib" 2241*a376eb32SXin Lineed_lib_prefix=unknown 2242*a376eb32SXin Lihardcode_into_libs=no 2243*a376eb32SXin Li 2244*a376eb32SXin Li# when you set need_version to no, make sure it does not cause -set_version 2245*a376eb32SXin Li# flags to be left without arguments 2246*a376eb32SXin Lineed_version=unknown 2247*a376eb32SXin Li 2248*a376eb32SXin Licase $host_os in 2249*a376eb32SXin Liaix3*) 2250*a376eb32SXin Li version_type=linux # correct to gnu/linux during the next big refactor 2251*a376eb32SXin Li library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 2252*a376eb32SXin Li shlibpath_var=LIBPATH 2253*a376eb32SXin Li 2254*a376eb32SXin Li # AIX 3 has no versioning support, so we append a major version to the name. 2255*a376eb32SXin Li soname_spec='${libname}${release}${shared_ext}$major' 2256*a376eb32SXin Li ;; 2257*a376eb32SXin Li 2258*a376eb32SXin Liaix[[4-9]]*) 2259*a376eb32SXin Li version_type=linux # correct to gnu/linux during the next big refactor 2260*a376eb32SXin Li need_lib_prefix=no 2261*a376eb32SXin Li need_version=no 2262*a376eb32SXin Li hardcode_into_libs=yes 2263*a376eb32SXin Li if test "$host_cpu" = ia64; then 2264*a376eb32SXin Li # AIX 5 supports IA64 2265*a376eb32SXin Li library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 2266*a376eb32SXin Li shlibpath_var=LD_LIBRARY_PATH 2267*a376eb32SXin Li else 2268*a376eb32SXin Li # With GCC up to 2.95.x, collect2 would create an import file 2269*a376eb32SXin Li # for dependence libraries. The import file would start with 2270*a376eb32SXin Li # the line `#! .'. This would cause the generated library to 2271*a376eb32SXin Li # depend on `.', always an invalid library. This was fixed in 2272*a376eb32SXin Li # development snapshots of GCC prior to 3.0. 2273*a376eb32SXin Li case $host_os in 2274*a376eb32SXin Li aix4 | aix4.[[01]] | aix4.[[01]].*) 2275*a376eb32SXin Li if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2276*a376eb32SXin Li echo ' yes ' 2277*a376eb32SXin Li echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 2278*a376eb32SXin Li : 2279*a376eb32SXin Li else 2280*a376eb32SXin Li can_build_shared=no 2281*a376eb32SXin Li fi 2282*a376eb32SXin Li ;; 2283*a376eb32SXin Li esac 2284*a376eb32SXin Li # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 2285*a376eb32SXin Li # soname into executable. Probably we can add versioning support to 2286*a376eb32SXin Li # collect2, so additional links can be useful in future. 2287*a376eb32SXin Li if test "$aix_use_runtimelinking" = yes; then 2288*a376eb32SXin Li # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2289*a376eb32SXin Li # instead of lib<name>.a to let people know that these are not 2290*a376eb32SXin Li # typical AIX shared libraries. 2291*a376eb32SXin Li library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2292*a376eb32SXin Li else 2293*a376eb32SXin Li # We preserve .a as extension for shared libraries through AIX4.2 2294*a376eb32SXin Li # and later when we are not doing run time linking. 2295*a376eb32SXin Li library_names_spec='${libname}${release}.a $libname.a' 2296*a376eb32SXin Li soname_spec='${libname}${release}${shared_ext}$major' 2297*a376eb32SXin Li fi 2298*a376eb32SXin Li shlibpath_var=LIBPATH 2299*a376eb32SXin Li fi 2300*a376eb32SXin Li ;; 2301*a376eb32SXin Li 2302*a376eb32SXin Liamigaos*) 2303*a376eb32SXin Li case $host_cpu in 2304*a376eb32SXin Li powerpc) 2305*a376eb32SXin Li # Since July 2007 AmigaOS4 officially supports .so libraries. 2306*a376eb32SXin Li # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2307*a376eb32SXin Li library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2308*a376eb32SXin Li ;; 2309*a376eb32SXin Li m68k) 2310*a376eb32SXin Li library_names_spec='$libname.ixlibrary $libname.a' 2311*a376eb32SXin Li # Create ${libname}_ixlibrary.a entries in /sys/libs. 2312*a376eb32SXin Li finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' 2313*a376eb32SXin Li ;; 2314*a376eb32SXin Li esac 2315*a376eb32SXin Li ;; 2316*a376eb32SXin Li 2317*a376eb32SXin Libeos*) 2318*a376eb32SXin Li library_names_spec='${libname}${shared_ext}' 2319*a376eb32SXin Li dynamic_linker="$host_os ld.so" 2320*a376eb32SXin Li shlibpath_var=LIBRARY_PATH 2321*a376eb32SXin Li ;; 2322*a376eb32SXin Li 2323*a376eb32SXin Libsdi[[45]]*) 2324*a376eb32SXin Li version_type=linux # correct to gnu/linux during the next big refactor 2325*a376eb32SXin Li need_version=no 2326*a376eb32SXin Li library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2327*a376eb32SXin Li soname_spec='${libname}${release}${shared_ext}$major' 2328*a376eb32SXin Li finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2329*a376eb32SXin Li shlibpath_var=LD_LIBRARY_PATH 2330*a376eb32SXin Li sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2331*a376eb32SXin Li sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2332*a376eb32SXin Li # the default ld.so.conf also contains /usr/contrib/lib and 2333*a376eb32SXin Li # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2334*a376eb32SXin Li # libtool to hard-code these into programs 2335*a376eb32SXin Li ;; 2336*a376eb32SXin Li 2337*a376eb32SXin Licygwin* | mingw* | pw32* | cegcc*) 2338*a376eb32SXin Li version_type=windows 2339*a376eb32SXin Li shrext_cmds=".dll" 2340*a376eb32SXin Li need_version=no 2341*a376eb32SXin Li need_lib_prefix=no 2342*a376eb32SXin Li 2343*a376eb32SXin Li case $GCC,$cc_basename in 2344*a376eb32SXin Li yes,*) 2345*a376eb32SXin Li # gcc 2346*a376eb32SXin Li library_names_spec='$libname.dll.a' 2347*a376eb32SXin Li # DLL is installed to $(libdir)/../bin by postinstall_cmds 2348*a376eb32SXin Li postinstall_cmds='base_file=`basename \${file}`~ 2349*a376eb32SXin Li dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2350*a376eb32SXin Li dldir=$destdir/`dirname \$dlpath`~ 2351*a376eb32SXin Li test -d \$dldir || mkdir -p \$dldir~ 2352*a376eb32SXin Li $install_prog $dir/$dlname \$dldir/$dlname~ 2353*a376eb32SXin Li chmod a+x \$dldir/$dlname~ 2354*a376eb32SXin Li if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2355*a376eb32SXin Li eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2356*a376eb32SXin Li fi' 2357*a376eb32SXin Li postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2358*a376eb32SXin Li dlpath=$dir/\$dldll~ 2359*a376eb32SXin Li $RM \$dlpath' 2360*a376eb32SXin Li shlibpath_overrides_runpath=yes 2361*a376eb32SXin Li 2362*a376eb32SXin Li case $host_os in 2363*a376eb32SXin Li cygwin*) 2364*a376eb32SXin Li # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2365*a376eb32SXin Li soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2366*a376eb32SXin Lim4_if([$1], [],[ 2367*a376eb32SXin Li sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2368*a376eb32SXin Li ;; 2369*a376eb32SXin Li mingw* | cegcc*) 2370*a376eb32SXin Li # MinGW DLLs use traditional 'lib' prefix 2371*a376eb32SXin Li soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2372*a376eb32SXin Li ;; 2373*a376eb32SXin Li pw32*) 2374*a376eb32SXin Li # pw32 DLLs use 'pw' prefix rather than 'lib' 2375*a376eb32SXin Li library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2376*a376eb32SXin Li ;; 2377*a376eb32SXin Li esac 2378*a376eb32SXin Li dynamic_linker='Win32 ld.exe' 2379*a376eb32SXin Li ;; 2380*a376eb32SXin Li 2381*a376eb32SXin Li *,cl*) 2382*a376eb32SXin Li # Native MSVC 2383*a376eb32SXin Li libname_spec='$name' 2384*a376eb32SXin Li soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2385*a376eb32SXin Li library_names_spec='${libname}.dll.lib' 2386*a376eb32SXin Li 2387*a376eb32SXin Li case $build_os in 2388*a376eb32SXin Li mingw*) 2389*a376eb32SXin Li sys_lib_search_path_spec= 2390*a376eb32SXin Li lt_save_ifs=$IFS 2391*a376eb32SXin Li IFS=';' 2392*a376eb32SXin Li for lt_path in $LIB 2393*a376eb32SXin Li do 2394*a376eb32SXin Li IFS=$lt_save_ifs 2395*a376eb32SXin Li # Let DOS variable expansion print the short 8.3 style file name. 2396*a376eb32SXin Li lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2397*a376eb32SXin Li sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2398*a376eb32SXin Li done 2399*a376eb32SXin Li IFS=$lt_save_ifs 2400*a376eb32SXin Li # Convert to MSYS style. 2401*a376eb32SXin Li sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2402*a376eb32SXin Li ;; 2403*a376eb32SXin Li cygwin*) 2404*a376eb32SXin Li # Convert to unix form, then to dos form, then back to unix form 2405*a376eb32SXin Li # but this time dos style (no spaces!) so that the unix form looks 2406*a376eb32SXin Li # like /cygdrive/c/PROGRA~1:/cygdr... 2407*a376eb32SXin Li sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2408*a376eb32SXin Li sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2409*a376eb32SXin Li sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2410*a376eb32SXin Li ;; 2411*a376eb32SXin Li *) 2412*a376eb32SXin Li sys_lib_search_path_spec="$LIB" 2413*a376eb32SXin Li if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2414*a376eb32SXin Li # It is most probably a Windows format PATH. 2415*a376eb32SXin Li sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2416*a376eb32SXin Li else 2417*a376eb32SXin Li sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2418*a376eb32SXin Li fi 2419*a376eb32SXin Li # FIXME: find the short name or the path components, as spaces are 2420*a376eb32SXin Li # common. (e.g. "Program Files" -> "PROGRA~1") 2421*a376eb32SXin Li ;; 2422*a376eb32SXin Li esac 2423*a376eb32SXin Li 2424*a376eb32SXin Li # DLL is installed to $(libdir)/../bin by postinstall_cmds 2425*a376eb32SXin Li postinstall_cmds='base_file=`basename \${file}`~ 2426*a376eb32SXin Li dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2427*a376eb32SXin Li dldir=$destdir/`dirname \$dlpath`~ 2428*a376eb32SXin Li test -d \$dldir || mkdir -p \$dldir~ 2429*a376eb32SXin Li $install_prog $dir/$dlname \$dldir/$dlname' 2430*a376eb32SXin Li postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2431*a376eb32SXin Li dlpath=$dir/\$dldll~ 2432*a376eb32SXin Li $RM \$dlpath' 2433*a376eb32SXin Li shlibpath_overrides_runpath=yes 2434*a376eb32SXin Li dynamic_linker='Win32 link.exe' 2435*a376eb32SXin Li ;; 2436*a376eb32SXin Li 2437*a376eb32SXin Li *) 2438*a376eb32SXin Li # Assume MSVC wrapper 2439*a376eb32SXin Li library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 2440*a376eb32SXin Li dynamic_linker='Win32 ld.exe' 2441*a376eb32SXin Li ;; 2442*a376eb32SXin Li esac 2443*a376eb32SXin Li # FIXME: first we should search . and the directory the executable is in 2444*a376eb32SXin Li shlibpath_var=PATH 2445*a376eb32SXin Li ;; 2446*a376eb32SXin Li 2447*a376eb32SXin Lidarwin* | rhapsody*) 2448*a376eb32SXin Li dynamic_linker="$host_os dyld" 2449*a376eb32SXin Li version_type=darwin 2450*a376eb32SXin Li need_lib_prefix=no 2451*a376eb32SXin Li need_version=no 2452*a376eb32SXin Li library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 2453*a376eb32SXin Li soname_spec='${libname}${release}${major}$shared_ext' 2454*a376eb32SXin Li shlibpath_overrides_runpath=yes 2455*a376eb32SXin Li shlibpath_var=DYLD_LIBRARY_PATH 2456*a376eb32SXin Li shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2457*a376eb32SXin Lim4_if([$1], [],[ 2458*a376eb32SXin Li sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2459*a376eb32SXin Li sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2460*a376eb32SXin Li ;; 2461*a376eb32SXin Li 2462*a376eb32SXin Lidgux*) 2463*a376eb32SXin Li version_type=linux # correct to gnu/linux during the next big refactor 2464*a376eb32SXin Li need_lib_prefix=no 2465*a376eb32SXin Li need_version=no 2466*a376eb32SXin Li library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 2467*a376eb32SXin Li soname_spec='${libname}${release}${shared_ext}$major' 2468*a376eb32SXin Li shlibpath_var=LD_LIBRARY_PATH 2469*a376eb32SXin Li ;; 2470*a376eb32SXin Li 2471*a376eb32SXin Lifreebsd* | dragonfly*) 2472*a376eb32SXin Li # DragonFly does not have aout. When/if they implement a new 2473*a376eb32SXin Li # versioning mechanism, adjust this. 2474*a376eb32SXin Li if test -x /usr/bin/objformat; then 2475*a376eb32SXin Li objformat=`/usr/bin/objformat` 2476*a376eb32SXin Li else 2477*a376eb32SXin Li case $host_os in 2478*a376eb32SXin Li freebsd[[23]].*) objformat=aout ;; 2479*a376eb32SXin Li *) objformat=elf ;; 2480*a376eb32SXin Li esac 2481*a376eb32SXin Li fi 2482*a376eb32SXin Li version_type=freebsd-$objformat 2483*a376eb32SXin Li case $version_type in 2484*a376eb32SXin Li freebsd-elf*) 2485*a376eb32SXin Li library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2486*a376eb32SXin Li need_version=no 2487*a376eb32SXin Li need_lib_prefix=no 2488*a376eb32SXin Li ;; 2489*a376eb32SXin Li freebsd-*) 2490*a376eb32SXin Li library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 2491*a376eb32SXin Li need_version=yes 2492*a376eb32SXin Li ;; 2493*a376eb32SXin Li esac 2494*a376eb32SXin Li shlibpath_var=LD_LIBRARY_PATH 2495*a376eb32SXin Li case $host_os in 2496*a376eb32SXin Li freebsd2.*) 2497*a376eb32SXin Li shlibpath_overrides_runpath=yes 2498*a376eb32SXin Li ;; 2499*a376eb32SXin Li freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2500*a376eb32SXin Li shlibpath_overrides_runpath=yes 2501*a376eb32SXin Li hardcode_into_libs=yes 2502*a376eb32SXin Li ;; 2503*a376eb32SXin Li freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2504*a376eb32SXin Li freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2505*a376eb32SXin Li shlibpath_overrides_runpath=no 2506*a376eb32SXin Li hardcode_into_libs=yes 2507*a376eb32SXin Li ;; 2508*a376eb32SXin Li *) # from 4.6 on, and DragonFly 2509*a376eb32SXin Li shlibpath_overrides_runpath=yes 2510*a376eb32SXin Li hardcode_into_libs=yes 2511*a376eb32SXin Li ;; 2512*a376eb32SXin Li esac 2513*a376eb32SXin Li ;; 2514*a376eb32SXin Li 2515*a376eb32SXin Lihaiku*) 2516*a376eb32SXin Li version_type=linux # correct to gnu/linux during the next big refactor 2517*a376eb32SXin Li need_lib_prefix=no 2518*a376eb32SXin Li need_version=no 2519*a376eb32SXin Li dynamic_linker="$host_os runtime_loader" 2520*a376eb32SXin Li library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2521*a376eb32SXin Li soname_spec='${libname}${release}${shared_ext}$major' 2522*a376eb32SXin Li shlibpath_var=LIBRARY_PATH 2523*a376eb32SXin Li shlibpath_overrides_runpath=yes 2524*a376eb32SXin Li sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2525*a376eb32SXin Li hardcode_into_libs=yes 2526*a376eb32SXin Li ;; 2527*a376eb32SXin Li 2528*a376eb32SXin Lihpux9* | hpux10* | hpux11*) 2529*a376eb32SXin Li # Give a soname corresponding to the major version so that dld.sl refuses to 2530*a376eb32SXin Li # link against other versions. 2531*a376eb32SXin Li version_type=sunos 2532*a376eb32SXin Li need_lib_prefix=no 2533*a376eb32SXin Li need_version=no 2534*a376eb32SXin Li case $host_cpu in 2535*a376eb32SXin Li ia64*) 2536*a376eb32SXin Li shrext_cmds='.so' 2537*a376eb32SXin Li hardcode_into_libs=yes 2538*a376eb32SXin Li dynamic_linker="$host_os dld.so" 2539*a376eb32SXin Li shlibpath_var=LD_LIBRARY_PATH 2540*a376eb32SXin Li shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2541*a376eb32SXin Li library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2542*a376eb32SXin Li soname_spec='${libname}${release}${shared_ext}$major' 2543*a376eb32SXin Li if test "X$HPUX_IA64_MODE" = X32; then 2544*a376eb32SXin Li sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2545*a376eb32SXin Li else 2546*a376eb32SXin Li sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2547*a376eb32SXin Li fi 2548*a376eb32SXin Li sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2549*a376eb32SXin Li ;; 2550*a376eb32SXin Li hppa*64*) 2551*a376eb32SXin Li shrext_cmds='.sl' 2552*a376eb32SXin Li hardcode_into_libs=yes 2553*a376eb32SXin Li dynamic_linker="$host_os dld.sl" 2554*a376eb32SXin Li shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2555*a376eb32SXin Li shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2556*a376eb32SXin Li library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2557*a376eb32SXin Li soname_spec='${libname}${release}${shared_ext}$major' 2558*a376eb32SXin Li sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2559*a376eb32SXin Li sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2560*a376eb32SXin Li ;; 2561*a376eb32SXin Li *) 2562*a376eb32SXin Li shrext_cmds='.sl' 2563*a376eb32SXin Li dynamic_linker="$host_os dld.sl" 2564*a376eb32SXin Li shlibpath_var=SHLIB_PATH 2565*a376eb32SXin Li shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2566*a376eb32SXin Li library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2567*a376eb32SXin Li soname_spec='${libname}${release}${shared_ext}$major' 2568*a376eb32SXin Li ;; 2569*a376eb32SXin Li esac 2570*a376eb32SXin Li # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2571*a376eb32SXin Li postinstall_cmds='chmod 555 $lib' 2572*a376eb32SXin Li # or fails outright, so override atomically: 2573*a376eb32SXin Li install_override_mode=555 2574*a376eb32SXin Li ;; 2575*a376eb32SXin Li 2576*a376eb32SXin Liinterix[[3-9]]*) 2577*a376eb32SXin Li version_type=linux # correct to gnu/linux during the next big refactor 2578*a376eb32SXin Li need_lib_prefix=no 2579*a376eb32SXin Li need_version=no 2580*a376eb32SXin Li library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2581*a376eb32SXin Li soname_spec='${libname}${release}${shared_ext}$major' 2582*a376eb32SXin Li dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2583*a376eb32SXin Li shlibpath_var=LD_LIBRARY_PATH 2584*a376eb32SXin Li shlibpath_overrides_runpath=no 2585*a376eb32SXin Li hardcode_into_libs=yes 2586*a376eb32SXin Li ;; 2587*a376eb32SXin Li 2588*a376eb32SXin Liirix5* | irix6* | nonstopux*) 2589*a376eb32SXin Li case $host_os in 2590*a376eb32SXin Li nonstopux*) version_type=nonstopux ;; 2591*a376eb32SXin Li *) 2592*a376eb32SXin Li if test "$lt_cv_prog_gnu_ld" = yes; then 2593*a376eb32SXin Li version_type=linux # correct to gnu/linux during the next big refactor 2594*a376eb32SXin Li else 2595*a376eb32SXin Li version_type=irix 2596*a376eb32SXin Li fi ;; 2597*a376eb32SXin Li esac 2598*a376eb32SXin Li need_lib_prefix=no 2599*a376eb32SXin Li need_version=no 2600*a376eb32SXin Li soname_spec='${libname}${release}${shared_ext}$major' 2601*a376eb32SXin Li library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 2602*a376eb32SXin Li case $host_os in 2603*a376eb32SXin Li irix5* | nonstopux*) 2604*a376eb32SXin Li libsuff= shlibsuff= 2605*a376eb32SXin Li ;; 2606*a376eb32SXin Li *) 2607*a376eb32SXin Li case $LD in # libtool.m4 will add one of these switches to LD 2608*a376eb32SXin Li *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2609*a376eb32SXin Li libsuff= shlibsuff= libmagic=32-bit;; 2610*a376eb32SXin Li *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2611*a376eb32SXin Li libsuff=32 shlibsuff=N32 libmagic=N32;; 2612*a376eb32SXin Li *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2613*a376eb32SXin Li libsuff=64 shlibsuff=64 libmagic=64-bit;; 2614*a376eb32SXin Li *) libsuff= shlibsuff= libmagic=never-match;; 2615*a376eb32SXin Li esac 2616*a376eb32SXin Li ;; 2617*a376eb32SXin Li esac 2618*a376eb32SXin Li shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2619*a376eb32SXin Li shlibpath_overrides_runpath=no 2620*a376eb32SXin Li sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 2621*a376eb32SXin Li sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 2622*a376eb32SXin Li hardcode_into_libs=yes 2623*a376eb32SXin Li ;; 2624*a376eb32SXin Li 2625*a376eb32SXin Li# No shared lib support for Linux oldld, aout, or coff. 2626*a376eb32SXin Lilinux*oldld* | linux*aout* | linux*coff*) 2627*a376eb32SXin Li dynamic_linker=no 2628*a376eb32SXin Li ;; 2629*a376eb32SXin Li 2630*a376eb32SXin Li# This must be glibc/ELF. 2631*a376eb32SXin Lilinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 2632*a376eb32SXin Li version_type=linux # correct to gnu/linux during the next big refactor 2633*a376eb32SXin Li need_lib_prefix=no 2634*a376eb32SXin Li need_version=no 2635*a376eb32SXin Li library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2636*a376eb32SXin Li soname_spec='${libname}${release}${shared_ext}$major' 2637*a376eb32SXin Li finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2638*a376eb32SXin Li shlibpath_var=LD_LIBRARY_PATH 2639*a376eb32SXin Li shlibpath_overrides_runpath=no 2640*a376eb32SXin Li 2641*a376eb32SXin Li # Some binutils ld are patched to set DT_RUNPATH 2642*a376eb32SXin Li AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2643*a376eb32SXin Li [lt_cv_shlibpath_overrides_runpath=no 2644*a376eb32SXin Li save_LDFLAGS=$LDFLAGS 2645*a376eb32SXin Li save_libdir=$libdir 2646*a376eb32SXin Li eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2647*a376eb32SXin Li LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2648*a376eb32SXin Li AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2649*a376eb32SXin Li [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2650*a376eb32SXin Li [lt_cv_shlibpath_overrides_runpath=yes])]) 2651*a376eb32SXin Li LDFLAGS=$save_LDFLAGS 2652*a376eb32SXin Li libdir=$save_libdir 2653*a376eb32SXin Li ]) 2654*a376eb32SXin Li shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2655*a376eb32SXin Li 2656*a376eb32SXin Li # This implies no fast_install, which is unacceptable. 2657*a376eb32SXin Li # Some rework will be needed to allow for fast_install 2658*a376eb32SXin Li # before this can be enabled. 2659*a376eb32SXin Li hardcode_into_libs=yes 2660*a376eb32SXin Li 2661*a376eb32SXin Li # Append ld.so.conf contents to the search path 2662*a376eb32SXin Li if test -f /etc/ld.so.conf; then 2663*a376eb32SXin Li 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' ' '` 2664*a376eb32SXin Li sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 2665*a376eb32SXin Li fi 2666*a376eb32SXin Li 2667*a376eb32SXin Li # We used to test for /lib/ld.so.1 and disable shared libraries on 2668*a376eb32SXin Li # powerpc, because MkLinux only supported shared libraries with the 2669*a376eb32SXin Li # GNU dynamic linker. Since this was broken with cross compilers, 2670*a376eb32SXin Li # most powerpc-linux boxes support dynamic linking these days and 2671*a376eb32SXin Li # people can always --disable-shared, the test was removed, and we 2672*a376eb32SXin Li # assume the GNU/Linux dynamic linker is in use. 2673*a376eb32SXin Li dynamic_linker='GNU/Linux ld.so' 2674*a376eb32SXin Li ;; 2675*a376eb32SXin Li 2676*a376eb32SXin Linetbsdelf*-gnu) 2677*a376eb32SXin Li version_type=linux 2678*a376eb32SXin Li need_lib_prefix=no 2679*a376eb32SXin Li need_version=no 2680*a376eb32SXin Li library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2681*a376eb32SXin Li soname_spec='${libname}${release}${shared_ext}$major' 2682*a376eb32SXin Li shlibpath_var=LD_LIBRARY_PATH 2683*a376eb32SXin Li shlibpath_overrides_runpath=no 2684*a376eb32SXin Li hardcode_into_libs=yes 2685*a376eb32SXin Li dynamic_linker='NetBSD ld.elf_so' 2686*a376eb32SXin Li ;; 2687*a376eb32SXin Li 2688*a376eb32SXin Linetbsd*) 2689*a376eb32SXin Li version_type=sunos 2690*a376eb32SXin Li need_lib_prefix=no 2691*a376eb32SXin Li need_version=no 2692*a376eb32SXin Li if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2693*a376eb32SXin Li library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2694*a376eb32SXin Li finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2695*a376eb32SXin Li dynamic_linker='NetBSD (a.out) ld.so' 2696*a376eb32SXin Li else 2697*a376eb32SXin Li library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2698*a376eb32SXin Li soname_spec='${libname}${release}${shared_ext}$major' 2699*a376eb32SXin Li dynamic_linker='NetBSD ld.elf_so' 2700*a376eb32SXin Li fi 2701*a376eb32SXin Li shlibpath_var=LD_LIBRARY_PATH 2702*a376eb32SXin Li shlibpath_overrides_runpath=yes 2703*a376eb32SXin Li hardcode_into_libs=yes 2704*a376eb32SXin Li ;; 2705*a376eb32SXin Li 2706*a376eb32SXin Linewsos6) 2707*a376eb32SXin Li version_type=linux # correct to gnu/linux during the next big refactor 2708*a376eb32SXin Li library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2709*a376eb32SXin Li shlibpath_var=LD_LIBRARY_PATH 2710*a376eb32SXin Li shlibpath_overrides_runpath=yes 2711*a376eb32SXin Li ;; 2712*a376eb32SXin Li 2713*a376eb32SXin Li*nto* | *qnx*) 2714*a376eb32SXin Li version_type=qnx 2715*a376eb32SXin Li need_lib_prefix=no 2716*a376eb32SXin Li need_version=no 2717*a376eb32SXin Li library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2718*a376eb32SXin Li soname_spec='${libname}${release}${shared_ext}$major' 2719*a376eb32SXin Li shlibpath_var=LD_LIBRARY_PATH 2720*a376eb32SXin Li shlibpath_overrides_runpath=no 2721*a376eb32SXin Li hardcode_into_libs=yes 2722*a376eb32SXin Li dynamic_linker='ldqnx.so' 2723*a376eb32SXin Li ;; 2724*a376eb32SXin Li 2725*a376eb32SXin Liopenbsd*) 2726*a376eb32SXin Li version_type=sunos 2727*a376eb32SXin Li sys_lib_dlsearch_path_spec="/usr/lib" 2728*a376eb32SXin Li need_lib_prefix=no 2729*a376eb32SXin Li # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 2730*a376eb32SXin Li case $host_os in 2731*a376eb32SXin Li openbsd3.3 | openbsd3.3.*) need_version=yes ;; 2732*a376eb32SXin Li *) need_version=no ;; 2733*a376eb32SXin Li esac 2734*a376eb32SXin Li library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2735*a376eb32SXin Li finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2736*a376eb32SXin Li shlibpath_var=LD_LIBRARY_PATH 2737*a376eb32SXin Li if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2738*a376eb32SXin Li case $host_os in 2739*a376eb32SXin Li openbsd2.[[89]] | openbsd2.[[89]].*) 2740*a376eb32SXin Li shlibpath_overrides_runpath=no 2741*a376eb32SXin Li ;; 2742*a376eb32SXin Li *) 2743*a376eb32SXin Li shlibpath_overrides_runpath=yes 2744*a376eb32SXin Li ;; 2745*a376eb32SXin Li esac 2746*a376eb32SXin Li else 2747*a376eb32SXin Li shlibpath_overrides_runpath=yes 2748*a376eb32SXin Li fi 2749*a376eb32SXin Li ;; 2750*a376eb32SXin Li 2751*a376eb32SXin Lios2*) 2752*a376eb32SXin Li libname_spec='$name' 2753*a376eb32SXin Li shrext_cmds=".dll" 2754*a376eb32SXin Li need_lib_prefix=no 2755*a376eb32SXin Li library_names_spec='$libname${shared_ext} $libname.a' 2756*a376eb32SXin Li dynamic_linker='OS/2 ld.exe' 2757*a376eb32SXin Li shlibpath_var=LIBPATH 2758*a376eb32SXin Li ;; 2759*a376eb32SXin Li 2760*a376eb32SXin Liosf3* | osf4* | osf5*) 2761*a376eb32SXin Li version_type=osf 2762*a376eb32SXin Li need_lib_prefix=no 2763*a376eb32SXin Li need_version=no 2764*a376eb32SXin Li soname_spec='${libname}${release}${shared_ext}$major' 2765*a376eb32SXin Li library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2766*a376eb32SXin Li shlibpath_var=LD_LIBRARY_PATH 2767*a376eb32SXin Li sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 2768*a376eb32SXin Li sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 2769*a376eb32SXin Li ;; 2770*a376eb32SXin Li 2771*a376eb32SXin Lirdos*) 2772*a376eb32SXin Li dynamic_linker=no 2773*a376eb32SXin Li ;; 2774*a376eb32SXin Li 2775*a376eb32SXin Lisolaris*) 2776*a376eb32SXin Li version_type=linux # correct to gnu/linux during the next big refactor 2777*a376eb32SXin Li need_lib_prefix=no 2778*a376eb32SXin Li need_version=no 2779*a376eb32SXin Li library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2780*a376eb32SXin Li soname_spec='${libname}${release}${shared_ext}$major' 2781*a376eb32SXin Li shlibpath_var=LD_LIBRARY_PATH 2782*a376eb32SXin Li shlibpath_overrides_runpath=yes 2783*a376eb32SXin Li hardcode_into_libs=yes 2784*a376eb32SXin Li # ldd complains unless libraries are executable 2785*a376eb32SXin Li postinstall_cmds='chmod +x $lib' 2786*a376eb32SXin Li ;; 2787*a376eb32SXin Li 2788*a376eb32SXin Lisunos4*) 2789*a376eb32SXin Li version_type=sunos 2790*a376eb32SXin Li library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2791*a376eb32SXin Li finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 2792*a376eb32SXin Li shlibpath_var=LD_LIBRARY_PATH 2793*a376eb32SXin Li shlibpath_overrides_runpath=yes 2794*a376eb32SXin Li if test "$with_gnu_ld" = yes; then 2795*a376eb32SXin Li need_lib_prefix=no 2796*a376eb32SXin Li fi 2797*a376eb32SXin Li need_version=yes 2798*a376eb32SXin Li ;; 2799*a376eb32SXin Li 2800*a376eb32SXin Lisysv4 | sysv4.3*) 2801*a376eb32SXin Li version_type=linux # correct to gnu/linux during the next big refactor 2802*a376eb32SXin Li library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2803*a376eb32SXin Li soname_spec='${libname}${release}${shared_ext}$major' 2804*a376eb32SXin Li shlibpath_var=LD_LIBRARY_PATH 2805*a376eb32SXin Li case $host_vendor in 2806*a376eb32SXin Li sni) 2807*a376eb32SXin Li shlibpath_overrides_runpath=no 2808*a376eb32SXin Li need_lib_prefix=no 2809*a376eb32SXin Li runpath_var=LD_RUN_PATH 2810*a376eb32SXin Li ;; 2811*a376eb32SXin Li siemens) 2812*a376eb32SXin Li need_lib_prefix=no 2813*a376eb32SXin Li ;; 2814*a376eb32SXin Li motorola) 2815*a376eb32SXin Li need_lib_prefix=no 2816*a376eb32SXin Li need_version=no 2817*a376eb32SXin Li shlibpath_overrides_runpath=no 2818*a376eb32SXin Li sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 2819*a376eb32SXin Li ;; 2820*a376eb32SXin Li esac 2821*a376eb32SXin Li ;; 2822*a376eb32SXin Li 2823*a376eb32SXin Lisysv4*MP*) 2824*a376eb32SXin Li if test -d /usr/nec ;then 2825*a376eb32SXin Li version_type=linux # correct to gnu/linux during the next big refactor 2826*a376eb32SXin Li library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 2827*a376eb32SXin Li soname_spec='$libname${shared_ext}.$major' 2828*a376eb32SXin Li shlibpath_var=LD_LIBRARY_PATH 2829*a376eb32SXin Li fi 2830*a376eb32SXin Li ;; 2831*a376eb32SXin Li 2832*a376eb32SXin Lisysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 2833*a376eb32SXin Li version_type=freebsd-elf 2834*a376eb32SXin Li need_lib_prefix=no 2835*a376eb32SXin Li need_version=no 2836*a376eb32SXin Li library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2837*a376eb32SXin Li soname_spec='${libname}${release}${shared_ext}$major' 2838*a376eb32SXin Li shlibpath_var=LD_LIBRARY_PATH 2839*a376eb32SXin Li shlibpath_overrides_runpath=yes 2840*a376eb32SXin Li hardcode_into_libs=yes 2841*a376eb32SXin Li if test "$with_gnu_ld" = yes; then 2842*a376eb32SXin Li sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 2843*a376eb32SXin Li else 2844*a376eb32SXin Li sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 2845*a376eb32SXin Li case $host_os in 2846*a376eb32SXin Li sco3.2v5*) 2847*a376eb32SXin Li sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 2848*a376eb32SXin Li ;; 2849*a376eb32SXin Li esac 2850*a376eb32SXin Li fi 2851*a376eb32SXin Li sys_lib_dlsearch_path_spec='/usr/lib' 2852*a376eb32SXin Li ;; 2853*a376eb32SXin Li 2854*a376eb32SXin Litpf*) 2855*a376eb32SXin Li # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 2856*a376eb32SXin Li version_type=linux # correct to gnu/linux during the next big refactor 2857*a376eb32SXin Li need_lib_prefix=no 2858*a376eb32SXin Li need_version=no 2859*a376eb32SXin Li library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2860*a376eb32SXin Li shlibpath_var=LD_LIBRARY_PATH 2861*a376eb32SXin Li shlibpath_overrides_runpath=no 2862*a376eb32SXin Li hardcode_into_libs=yes 2863*a376eb32SXin Li ;; 2864*a376eb32SXin Li 2865*a376eb32SXin Liuts4*) 2866*a376eb32SXin Li version_type=linux # correct to gnu/linux during the next big refactor 2867*a376eb32SXin Li library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2868*a376eb32SXin Li soname_spec='${libname}${release}${shared_ext}$major' 2869*a376eb32SXin Li shlibpath_var=LD_LIBRARY_PATH 2870*a376eb32SXin Li ;; 2871*a376eb32SXin Li 2872*a376eb32SXin Li*) 2873*a376eb32SXin Li dynamic_linker=no 2874*a376eb32SXin Li ;; 2875*a376eb32SXin Liesac 2876*a376eb32SXin LiAC_MSG_RESULT([$dynamic_linker]) 2877*a376eb32SXin Litest "$dynamic_linker" = no && can_build_shared=no 2878*a376eb32SXin Li 2879*a376eb32SXin Livariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 2880*a376eb32SXin Liif test "$GCC" = yes; then 2881*a376eb32SXin Li variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 2882*a376eb32SXin Lifi 2883*a376eb32SXin Li 2884*a376eb32SXin Liif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 2885*a376eb32SXin Li sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 2886*a376eb32SXin Lifi 2887*a376eb32SXin Liif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 2888*a376eb32SXin Li sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 2889*a376eb32SXin Lifi 2890*a376eb32SXin Li 2891*a376eb32SXin Li_LT_DECL([], [variables_saved_for_relink], [1], 2892*a376eb32SXin Li [Variables whose values should be saved in libtool wrapper scripts and 2893*a376eb32SXin Li restored at link time]) 2894*a376eb32SXin Li_LT_DECL([], [need_lib_prefix], [0], 2895*a376eb32SXin Li [Do we need the "lib" prefix for modules?]) 2896*a376eb32SXin Li_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 2897*a376eb32SXin Li_LT_DECL([], [version_type], [0], [Library versioning type]) 2898*a376eb32SXin Li_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 2899*a376eb32SXin Li_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 2900*a376eb32SXin Li_LT_DECL([], [shlibpath_overrides_runpath], [0], 2901*a376eb32SXin Li [Is shlibpath searched before the hard-coded library search path?]) 2902*a376eb32SXin Li_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 2903*a376eb32SXin Li_LT_DECL([], [library_names_spec], [1], 2904*a376eb32SXin Li [[List of archive names. First name is the real one, the rest are links. 2905*a376eb32SXin Li The last name is the one that the linker finds with -lNAME]]) 2906*a376eb32SXin Li_LT_DECL([], [soname_spec], [1], 2907*a376eb32SXin Li [[The coded name of the library, if different from the real name]]) 2908*a376eb32SXin Li_LT_DECL([], [install_override_mode], [1], 2909*a376eb32SXin Li [Permission mode override for installation of shared libraries]) 2910*a376eb32SXin Li_LT_DECL([], [postinstall_cmds], [2], 2911*a376eb32SXin Li [Command to use after installation of a shared archive]) 2912*a376eb32SXin Li_LT_DECL([], [postuninstall_cmds], [2], 2913*a376eb32SXin Li [Command to use after uninstallation of a shared archive]) 2914*a376eb32SXin Li_LT_DECL([], [finish_cmds], [2], 2915*a376eb32SXin Li [Commands used to finish a libtool library installation in a directory]) 2916*a376eb32SXin Li_LT_DECL([], [finish_eval], [1], 2917*a376eb32SXin Li [[As "finish_cmds", except a single script fragment to be evaled but 2918*a376eb32SXin Li not shown]]) 2919*a376eb32SXin Li_LT_DECL([], [hardcode_into_libs], [0], 2920*a376eb32SXin Li [Whether we should hardcode library paths into libraries]) 2921*a376eb32SXin Li_LT_DECL([], [sys_lib_search_path_spec], [2], 2922*a376eb32SXin Li [Compile-time system search path for libraries]) 2923*a376eb32SXin Li_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 2924*a376eb32SXin Li [Run-time system search path for libraries]) 2925*a376eb32SXin Li])# _LT_SYS_DYNAMIC_LINKER 2926*a376eb32SXin Li 2927*a376eb32SXin Li 2928*a376eb32SXin Li# _LT_PATH_TOOL_PREFIX(TOOL) 2929*a376eb32SXin Li# -------------------------- 2930*a376eb32SXin Li# find a file program which can recognize shared library 2931*a376eb32SXin LiAC_DEFUN([_LT_PATH_TOOL_PREFIX], 2932*a376eb32SXin Li[m4_require([_LT_DECL_EGREP])dnl 2933*a376eb32SXin LiAC_MSG_CHECKING([for $1]) 2934*a376eb32SXin LiAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2935*a376eb32SXin Li[case $MAGIC_CMD in 2936*a376eb32SXin Li[[\\/*] | ?:[\\/]*]) 2937*a376eb32SXin Li lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2938*a376eb32SXin Li ;; 2939*a376eb32SXin Li*) 2940*a376eb32SXin Li lt_save_MAGIC_CMD="$MAGIC_CMD" 2941*a376eb32SXin Li lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2942*a376eb32SXin Lidnl $ac_dummy forces splitting on constant user-supplied paths. 2943*a376eb32SXin Lidnl POSIX.2 word splitting is done only on the output of word expansions, 2944*a376eb32SXin Lidnl not every word. This closes a longstanding sh security hole. 2945*a376eb32SXin Li ac_dummy="m4_if([$2], , $PATH, [$2])" 2946*a376eb32SXin Li for ac_dir in $ac_dummy; do 2947*a376eb32SXin Li IFS="$lt_save_ifs" 2948*a376eb32SXin Li test -z "$ac_dir" && ac_dir=. 2949*a376eb32SXin Li if test -f $ac_dir/$1; then 2950*a376eb32SXin Li lt_cv_path_MAGIC_CMD="$ac_dir/$1" 2951*a376eb32SXin Li if test -n "$file_magic_test_file"; then 2952*a376eb32SXin Li case $deplibs_check_method in 2953*a376eb32SXin Li "file_magic "*) 2954*a376eb32SXin Li file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 2955*a376eb32SXin Li MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2956*a376eb32SXin Li if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2957*a376eb32SXin Li $EGREP "$file_magic_regex" > /dev/null; then 2958*a376eb32SXin Li : 2959*a376eb32SXin Li else 2960*a376eb32SXin Li cat <<_LT_EOF 1>&2 2961*a376eb32SXin Li 2962*a376eb32SXin Li*** Warning: the command libtool uses to detect shared libraries, 2963*a376eb32SXin Li*** $file_magic_cmd, produces output that libtool cannot recognize. 2964*a376eb32SXin Li*** The result is that libtool may fail to recognize shared libraries 2965*a376eb32SXin Li*** as such. This will affect the creation of libtool libraries that 2966*a376eb32SXin Li*** depend on shared libraries, but programs linked with such libtool 2967*a376eb32SXin Li*** libraries will work regardless of this problem. Nevertheless, you 2968*a376eb32SXin Li*** may want to report the problem to your system manager and/or to 2969*a376eb32SXin Li*** [email protected] 2970*a376eb32SXin Li 2971*a376eb32SXin Li_LT_EOF 2972*a376eb32SXin Li fi ;; 2973*a376eb32SXin Li esac 2974*a376eb32SXin Li fi 2975*a376eb32SXin Li break 2976*a376eb32SXin Li fi 2977*a376eb32SXin Li done 2978*a376eb32SXin Li IFS="$lt_save_ifs" 2979*a376eb32SXin Li MAGIC_CMD="$lt_save_MAGIC_CMD" 2980*a376eb32SXin Li ;; 2981*a376eb32SXin Liesac]) 2982*a376eb32SXin LiMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2983*a376eb32SXin Liif test -n "$MAGIC_CMD"; then 2984*a376eb32SXin Li AC_MSG_RESULT($MAGIC_CMD) 2985*a376eb32SXin Lielse 2986*a376eb32SXin Li AC_MSG_RESULT(no) 2987*a376eb32SXin Lifi 2988*a376eb32SXin Li_LT_DECL([], [MAGIC_CMD], [0], 2989*a376eb32SXin Li [Used to examine libraries when file_magic_cmd begins with "file"])dnl 2990*a376eb32SXin Li])# _LT_PATH_TOOL_PREFIX 2991*a376eb32SXin Li 2992*a376eb32SXin Li# Old name: 2993*a376eb32SXin LiAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 2994*a376eb32SXin Lidnl aclocal-1.4 backwards compatibility: 2995*a376eb32SXin Lidnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 2996*a376eb32SXin Li 2997*a376eb32SXin Li 2998*a376eb32SXin Li# _LT_PATH_MAGIC 2999*a376eb32SXin Li# -------------- 3000*a376eb32SXin Li# find a file program which can recognize a shared library 3001*a376eb32SXin Lim4_defun([_LT_PATH_MAGIC], 3002*a376eb32SXin Li[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3003*a376eb32SXin Liif test -z "$lt_cv_path_MAGIC_CMD"; then 3004*a376eb32SXin Li if test -n "$ac_tool_prefix"; then 3005*a376eb32SXin Li _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 3006*a376eb32SXin Li else 3007*a376eb32SXin Li MAGIC_CMD=: 3008*a376eb32SXin Li fi 3009*a376eb32SXin Lifi 3010*a376eb32SXin Li])# _LT_PATH_MAGIC 3011*a376eb32SXin Li 3012*a376eb32SXin Li 3013*a376eb32SXin Li# LT_PATH_LD 3014*a376eb32SXin Li# ---------- 3015*a376eb32SXin Li# find the pathname to the GNU or non-GNU linker 3016*a376eb32SXin LiAC_DEFUN([LT_PATH_LD], 3017*a376eb32SXin Li[AC_REQUIRE([AC_PROG_CC])dnl 3018*a376eb32SXin LiAC_REQUIRE([AC_CANONICAL_HOST])dnl 3019*a376eb32SXin LiAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3020*a376eb32SXin Lim4_require([_LT_DECL_SED])dnl 3021*a376eb32SXin Lim4_require([_LT_DECL_EGREP])dnl 3022*a376eb32SXin Lim4_require([_LT_PROG_ECHO_BACKSLASH])dnl 3023*a376eb32SXin Li 3024*a376eb32SXin LiAC_ARG_WITH([gnu-ld], 3025*a376eb32SXin Li [AS_HELP_STRING([--with-gnu-ld], 3026*a376eb32SXin Li [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3027*a376eb32SXin Li [test "$withval" = no || with_gnu_ld=yes], 3028*a376eb32SXin Li [with_gnu_ld=no])dnl 3029*a376eb32SXin Li 3030*a376eb32SXin Liac_prog=ld 3031*a376eb32SXin Liif test "$GCC" = yes; then 3032*a376eb32SXin Li # Check if gcc -print-prog-name=ld gives a path. 3033*a376eb32SXin Li AC_MSG_CHECKING([for ld used by $CC]) 3034*a376eb32SXin Li case $host in 3035*a376eb32SXin Li *-*-mingw*) 3036*a376eb32SXin Li # gcc leaves a trailing carriage return which upsets mingw 3037*a376eb32SXin Li ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3038*a376eb32SXin Li *) 3039*a376eb32SXin Li ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3040*a376eb32SXin Li esac 3041*a376eb32SXin Li case $ac_prog in 3042*a376eb32SXin Li # Accept absolute paths. 3043*a376eb32SXin Li [[\\/]]* | ?:[[\\/]]*) 3044*a376eb32SXin Li re_direlt='/[[^/]][[^/]]*/\.\./' 3045*a376eb32SXin Li # Canonicalize the pathname of ld 3046*a376eb32SXin Li ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3047*a376eb32SXin Li while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3048*a376eb32SXin Li ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3049*a376eb32SXin Li done 3050*a376eb32SXin Li test -z "$LD" && LD="$ac_prog" 3051*a376eb32SXin Li ;; 3052*a376eb32SXin Li "") 3053*a376eb32SXin Li # If it fails, then pretend we aren't using GCC. 3054*a376eb32SXin Li ac_prog=ld 3055*a376eb32SXin Li ;; 3056*a376eb32SXin Li *) 3057*a376eb32SXin Li # If it is relative, then search for the first ld in PATH. 3058*a376eb32SXin Li with_gnu_ld=unknown 3059*a376eb32SXin Li ;; 3060*a376eb32SXin Li esac 3061*a376eb32SXin Lielif test "$with_gnu_ld" = yes; then 3062*a376eb32SXin Li AC_MSG_CHECKING([for GNU ld]) 3063*a376eb32SXin Lielse 3064*a376eb32SXin Li AC_MSG_CHECKING([for non-GNU ld]) 3065*a376eb32SXin Lifi 3066*a376eb32SXin LiAC_CACHE_VAL(lt_cv_path_LD, 3067*a376eb32SXin Li[if test -z "$LD"; then 3068*a376eb32SXin Li lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3069*a376eb32SXin Li for ac_dir in $PATH; do 3070*a376eb32SXin Li IFS="$lt_save_ifs" 3071*a376eb32SXin Li test -z "$ac_dir" && ac_dir=. 3072*a376eb32SXin Li if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3073*a376eb32SXin Li lt_cv_path_LD="$ac_dir/$ac_prog" 3074*a376eb32SXin Li # Check to see if the program is GNU ld. I'd rather use --version, 3075*a376eb32SXin Li # but apparently some variants of GNU ld only accept -v. 3076*a376eb32SXin Li # Break only if it was the GNU/non-GNU ld that we prefer. 3077*a376eb32SXin Li case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3078*a376eb32SXin Li *GNU* | *'with BFD'*) 3079*a376eb32SXin Li test "$with_gnu_ld" != no && break 3080*a376eb32SXin Li ;; 3081*a376eb32SXin Li *) 3082*a376eb32SXin Li test "$with_gnu_ld" != yes && break 3083*a376eb32SXin Li ;; 3084*a376eb32SXin Li esac 3085*a376eb32SXin Li fi 3086*a376eb32SXin Li done 3087*a376eb32SXin Li IFS="$lt_save_ifs" 3088*a376eb32SXin Lielse 3089*a376eb32SXin Li lt_cv_path_LD="$LD" # Let the user override the test with a path. 3090*a376eb32SXin Lifi]) 3091*a376eb32SXin LiLD="$lt_cv_path_LD" 3092*a376eb32SXin Liif test -n "$LD"; then 3093*a376eb32SXin Li AC_MSG_RESULT($LD) 3094*a376eb32SXin Lielse 3095*a376eb32SXin Li AC_MSG_RESULT(no) 3096*a376eb32SXin Lifi 3097*a376eb32SXin Litest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3098*a376eb32SXin Li_LT_PATH_LD_GNU 3099*a376eb32SXin LiAC_SUBST([LD]) 3100*a376eb32SXin Li 3101*a376eb32SXin Li_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3102*a376eb32SXin Li])# LT_PATH_LD 3103*a376eb32SXin Li 3104*a376eb32SXin Li# Old names: 3105*a376eb32SXin LiAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3106*a376eb32SXin LiAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3107*a376eb32SXin Lidnl aclocal-1.4 backwards compatibility: 3108*a376eb32SXin Lidnl AC_DEFUN([AM_PROG_LD], []) 3109*a376eb32SXin Lidnl AC_DEFUN([AC_PROG_LD], []) 3110*a376eb32SXin Li 3111*a376eb32SXin Li 3112*a376eb32SXin Li# _LT_PATH_LD_GNU 3113*a376eb32SXin Li#- -------------- 3114*a376eb32SXin Lim4_defun([_LT_PATH_LD_GNU], 3115*a376eb32SXin Li[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3116*a376eb32SXin Li[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3117*a376eb32SXin Licase `$LD -v 2>&1 </dev/null` in 3118*a376eb32SXin Li*GNU* | *'with BFD'*) 3119*a376eb32SXin Li lt_cv_prog_gnu_ld=yes 3120*a376eb32SXin Li ;; 3121*a376eb32SXin Li*) 3122*a376eb32SXin Li lt_cv_prog_gnu_ld=no 3123*a376eb32SXin Li ;; 3124*a376eb32SXin Liesac]) 3125*a376eb32SXin Liwith_gnu_ld=$lt_cv_prog_gnu_ld 3126*a376eb32SXin Li])# _LT_PATH_LD_GNU 3127*a376eb32SXin Li 3128*a376eb32SXin Li 3129*a376eb32SXin Li# _LT_CMD_RELOAD 3130*a376eb32SXin Li# -------------- 3131*a376eb32SXin Li# find reload flag for linker 3132*a376eb32SXin Li# -- PORTME Some linkers may need a different reload flag. 3133*a376eb32SXin Lim4_defun([_LT_CMD_RELOAD], 3134*a376eb32SXin Li[AC_CACHE_CHECK([for $LD option to reload object files], 3135*a376eb32SXin Li lt_cv_ld_reload_flag, 3136*a376eb32SXin Li [lt_cv_ld_reload_flag='-r']) 3137*a376eb32SXin Lireload_flag=$lt_cv_ld_reload_flag 3138*a376eb32SXin Licase $reload_flag in 3139*a376eb32SXin Li"" | " "*) ;; 3140*a376eb32SXin Li*) reload_flag=" $reload_flag" ;; 3141*a376eb32SXin Liesac 3142*a376eb32SXin Lireload_cmds='$LD$reload_flag -o $output$reload_objs' 3143*a376eb32SXin Licase $host_os in 3144*a376eb32SXin Li cygwin* | mingw* | pw32* | cegcc*) 3145*a376eb32SXin Li if test "$GCC" != yes; then 3146*a376eb32SXin Li reload_cmds=false 3147*a376eb32SXin Li fi 3148*a376eb32SXin Li ;; 3149*a376eb32SXin Li darwin*) 3150*a376eb32SXin Li if test "$GCC" = yes; then 3151*a376eb32SXin Li reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 3152*a376eb32SXin Li else 3153*a376eb32SXin Li reload_cmds='$LD$reload_flag -o $output$reload_objs' 3154*a376eb32SXin Li fi 3155*a376eb32SXin Li ;; 3156*a376eb32SXin Liesac 3157*a376eb32SXin Li_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3158*a376eb32SXin Li_LT_TAGDECL([], [reload_cmds], [2])dnl 3159*a376eb32SXin Li])# _LT_CMD_RELOAD 3160*a376eb32SXin Li 3161*a376eb32SXin Li 3162*a376eb32SXin Li# _LT_CHECK_MAGIC_METHOD 3163*a376eb32SXin Li# ---------------------- 3164*a376eb32SXin Li# how to check for library dependencies 3165*a376eb32SXin Li# -- PORTME fill in with the dynamic library characteristics 3166*a376eb32SXin Lim4_defun([_LT_CHECK_MAGIC_METHOD], 3167*a376eb32SXin Li[m4_require([_LT_DECL_EGREP]) 3168*a376eb32SXin Lim4_require([_LT_DECL_OBJDUMP]) 3169*a376eb32SXin LiAC_CACHE_CHECK([how to recognize dependent libraries], 3170*a376eb32SXin Lilt_cv_deplibs_check_method, 3171*a376eb32SXin Li[lt_cv_file_magic_cmd='$MAGIC_CMD' 3172*a376eb32SXin Lilt_cv_file_magic_test_file= 3173*a376eb32SXin Lilt_cv_deplibs_check_method='unknown' 3174*a376eb32SXin Li# Need to set the preceding variable on all platforms that support 3175*a376eb32SXin Li# interlibrary dependencies. 3176*a376eb32SXin Li# 'none' -- dependencies not supported. 3177*a376eb32SXin Li# `unknown' -- same as none, but documents that we really don't know. 3178*a376eb32SXin Li# 'pass_all' -- all dependencies passed with no checks. 3179*a376eb32SXin Li# 'test_compile' -- check by making test program. 3180*a376eb32SXin Li# 'file_magic [[regex]]' -- check by looking for files in library path 3181*a376eb32SXin Li# which responds to the $file_magic_cmd with a given extended regex. 3182*a376eb32SXin Li# If you have `file' or equivalent on your system and you're not sure 3183*a376eb32SXin Li# whether `pass_all' will *always* work, you probably want this one. 3184*a376eb32SXin Li 3185*a376eb32SXin Licase $host_os in 3186*a376eb32SXin Liaix[[4-9]]*) 3187*a376eb32SXin Li lt_cv_deplibs_check_method=pass_all 3188*a376eb32SXin Li ;; 3189*a376eb32SXin Li 3190*a376eb32SXin Libeos*) 3191*a376eb32SXin Li lt_cv_deplibs_check_method=pass_all 3192*a376eb32SXin Li ;; 3193*a376eb32SXin Li 3194*a376eb32SXin Libsdi[[45]]*) 3195*a376eb32SXin Li lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3196*a376eb32SXin Li lt_cv_file_magic_cmd='/usr/bin/file -L' 3197*a376eb32SXin Li lt_cv_file_magic_test_file=/shlib/libc.so 3198*a376eb32SXin Li ;; 3199*a376eb32SXin Li 3200*a376eb32SXin Licygwin*) 3201*a376eb32SXin Li # func_win32_libid is a shell function defined in ltmain.sh 3202*a376eb32SXin Li lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3203*a376eb32SXin Li lt_cv_file_magic_cmd='func_win32_libid' 3204*a376eb32SXin Li ;; 3205*a376eb32SXin Li 3206*a376eb32SXin Limingw* | pw32*) 3207*a376eb32SXin Li # Base MSYS/MinGW do not provide the 'file' command needed by 3208*a376eb32SXin Li # func_win32_libid shell function, so use a weaker test based on 'objdump', 3209*a376eb32SXin Li # unless we find 'file', for example because we are cross-compiling. 3210*a376eb32SXin Li # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 3211*a376eb32SXin Li if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 3212*a376eb32SXin Li lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3213*a376eb32SXin Li lt_cv_file_magic_cmd='func_win32_libid' 3214*a376eb32SXin Li else 3215*a376eb32SXin Li # Keep this pattern in sync with the one in func_win32_libid. 3216*a376eb32SXin Li lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3217*a376eb32SXin Li lt_cv_file_magic_cmd='$OBJDUMP -f' 3218*a376eb32SXin Li fi 3219*a376eb32SXin Li ;; 3220*a376eb32SXin Li 3221*a376eb32SXin Licegcc*) 3222*a376eb32SXin Li # use the weaker test based on 'objdump'. See mingw*. 3223*a376eb32SXin Li lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3224*a376eb32SXin Li lt_cv_file_magic_cmd='$OBJDUMP -f' 3225*a376eb32SXin Li ;; 3226*a376eb32SXin Li 3227*a376eb32SXin Lidarwin* | rhapsody*) 3228*a376eb32SXin Li lt_cv_deplibs_check_method=pass_all 3229*a376eb32SXin Li ;; 3230*a376eb32SXin Li 3231*a376eb32SXin Lifreebsd* | dragonfly*) 3232*a376eb32SXin Li if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3233*a376eb32SXin Li case $host_cpu in 3234*a376eb32SXin Li i*86 ) 3235*a376eb32SXin Li # Not sure whether the presence of OpenBSD here was a mistake. 3236*a376eb32SXin Li # Let's accept both of them until this is cleared up. 3237*a376eb32SXin Li lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3238*a376eb32SXin Li lt_cv_file_magic_cmd=/usr/bin/file 3239*a376eb32SXin Li lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3240*a376eb32SXin Li ;; 3241*a376eb32SXin Li esac 3242*a376eb32SXin Li else 3243*a376eb32SXin Li lt_cv_deplibs_check_method=pass_all 3244*a376eb32SXin Li fi 3245*a376eb32SXin Li ;; 3246*a376eb32SXin Li 3247*a376eb32SXin Lihaiku*) 3248*a376eb32SXin Li lt_cv_deplibs_check_method=pass_all 3249*a376eb32SXin Li ;; 3250*a376eb32SXin Li 3251*a376eb32SXin Lihpux10.20* | hpux11*) 3252*a376eb32SXin Li lt_cv_file_magic_cmd=/usr/bin/file 3253*a376eb32SXin Li case $host_cpu in 3254*a376eb32SXin Li ia64*) 3255*a376eb32SXin Li lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3256*a376eb32SXin Li lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3257*a376eb32SXin Li ;; 3258*a376eb32SXin Li hppa*64*) 3259*a376eb32SXin Li [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]'] 3260*a376eb32SXin Li lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3261*a376eb32SXin Li ;; 3262*a376eb32SXin Li *) 3263*a376eb32SXin Li lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3264*a376eb32SXin Li lt_cv_file_magic_test_file=/usr/lib/libc.sl 3265*a376eb32SXin Li ;; 3266*a376eb32SXin Li esac 3267*a376eb32SXin Li ;; 3268*a376eb32SXin Li 3269*a376eb32SXin Liinterix[[3-9]]*) 3270*a376eb32SXin Li # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3271*a376eb32SXin Li lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3272*a376eb32SXin Li ;; 3273*a376eb32SXin Li 3274*a376eb32SXin Liirix5* | irix6* | nonstopux*) 3275*a376eb32SXin Li case $LD in 3276*a376eb32SXin Li *-32|*"-32 ") libmagic=32-bit;; 3277*a376eb32SXin Li *-n32|*"-n32 ") libmagic=N32;; 3278*a376eb32SXin Li *-64|*"-64 ") libmagic=64-bit;; 3279*a376eb32SXin Li *) libmagic=never-match;; 3280*a376eb32SXin Li esac 3281*a376eb32SXin Li lt_cv_deplibs_check_method=pass_all 3282*a376eb32SXin Li ;; 3283*a376eb32SXin Li 3284*a376eb32SXin Li# This must be glibc/ELF. 3285*a376eb32SXin Lilinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 3286*a376eb32SXin Li lt_cv_deplibs_check_method=pass_all 3287*a376eb32SXin Li ;; 3288*a376eb32SXin Li 3289*a376eb32SXin Linetbsd* | netbsdelf*-gnu) 3290*a376eb32SXin Li if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3291*a376eb32SXin Li lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3292*a376eb32SXin Li else 3293*a376eb32SXin Li lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3294*a376eb32SXin Li fi 3295*a376eb32SXin Li ;; 3296*a376eb32SXin Li 3297*a376eb32SXin Linewos6*) 3298*a376eb32SXin Li lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3299*a376eb32SXin Li lt_cv_file_magic_cmd=/usr/bin/file 3300*a376eb32SXin Li lt_cv_file_magic_test_file=/usr/lib/libnls.so 3301*a376eb32SXin Li ;; 3302*a376eb32SXin Li 3303*a376eb32SXin Li*nto* | *qnx*) 3304*a376eb32SXin Li lt_cv_deplibs_check_method=pass_all 3305*a376eb32SXin Li ;; 3306*a376eb32SXin Li 3307*a376eb32SXin Liopenbsd*) 3308*a376eb32SXin Li if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3309*a376eb32SXin Li lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3310*a376eb32SXin Li else 3311*a376eb32SXin Li lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3312*a376eb32SXin Li fi 3313*a376eb32SXin Li ;; 3314*a376eb32SXin Li 3315*a376eb32SXin Liosf3* | osf4* | osf5*) 3316*a376eb32SXin Li lt_cv_deplibs_check_method=pass_all 3317*a376eb32SXin Li ;; 3318*a376eb32SXin Li 3319*a376eb32SXin Lirdos*) 3320*a376eb32SXin Li lt_cv_deplibs_check_method=pass_all 3321*a376eb32SXin Li ;; 3322*a376eb32SXin Li 3323*a376eb32SXin Lisolaris*) 3324*a376eb32SXin Li lt_cv_deplibs_check_method=pass_all 3325*a376eb32SXin Li ;; 3326*a376eb32SXin Li 3327*a376eb32SXin Lisysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3328*a376eb32SXin Li lt_cv_deplibs_check_method=pass_all 3329*a376eb32SXin Li ;; 3330*a376eb32SXin Li 3331*a376eb32SXin Lisysv4 | sysv4.3*) 3332*a376eb32SXin Li case $host_vendor in 3333*a376eb32SXin Li motorola) 3334*a376eb32SXin Li 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]]' 3335*a376eb32SXin Li lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3336*a376eb32SXin Li ;; 3337*a376eb32SXin Li ncr) 3338*a376eb32SXin Li lt_cv_deplibs_check_method=pass_all 3339*a376eb32SXin Li ;; 3340*a376eb32SXin Li sequent) 3341*a376eb32SXin Li lt_cv_file_magic_cmd='/bin/file' 3342*a376eb32SXin Li lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3343*a376eb32SXin Li ;; 3344*a376eb32SXin Li sni) 3345*a376eb32SXin Li lt_cv_file_magic_cmd='/bin/file' 3346*a376eb32SXin Li lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3347*a376eb32SXin Li lt_cv_file_magic_test_file=/lib/libc.so 3348*a376eb32SXin Li ;; 3349*a376eb32SXin Li siemens) 3350*a376eb32SXin Li lt_cv_deplibs_check_method=pass_all 3351*a376eb32SXin Li ;; 3352*a376eb32SXin Li pc) 3353*a376eb32SXin Li lt_cv_deplibs_check_method=pass_all 3354*a376eb32SXin Li ;; 3355*a376eb32SXin Li esac 3356*a376eb32SXin Li ;; 3357*a376eb32SXin Li 3358*a376eb32SXin Litpf*) 3359*a376eb32SXin Li lt_cv_deplibs_check_method=pass_all 3360*a376eb32SXin Li ;; 3361*a376eb32SXin Liesac 3362*a376eb32SXin Li]) 3363*a376eb32SXin Li 3364*a376eb32SXin Lifile_magic_glob= 3365*a376eb32SXin Liwant_nocaseglob=no 3366*a376eb32SXin Liif test "$build" = "$host"; then 3367*a376eb32SXin Li case $host_os in 3368*a376eb32SXin Li mingw* | pw32*) 3369*a376eb32SXin Li if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3370*a376eb32SXin Li want_nocaseglob=yes 3371*a376eb32SXin Li else 3372*a376eb32SXin Li file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3373*a376eb32SXin Li fi 3374*a376eb32SXin Li ;; 3375*a376eb32SXin Li esac 3376*a376eb32SXin Lifi 3377*a376eb32SXin Li 3378*a376eb32SXin Lifile_magic_cmd=$lt_cv_file_magic_cmd 3379*a376eb32SXin Lideplibs_check_method=$lt_cv_deplibs_check_method 3380*a376eb32SXin Litest -z "$deplibs_check_method" && deplibs_check_method=unknown 3381*a376eb32SXin Li 3382*a376eb32SXin Li_LT_DECL([], [deplibs_check_method], [1], 3383*a376eb32SXin Li [Method to check whether dependent libraries are shared objects]) 3384*a376eb32SXin Li_LT_DECL([], [file_magic_cmd], [1], 3385*a376eb32SXin Li [Command to use when deplibs_check_method = "file_magic"]) 3386*a376eb32SXin Li_LT_DECL([], [file_magic_glob], [1], 3387*a376eb32SXin Li [How to find potential files when deplibs_check_method = "file_magic"]) 3388*a376eb32SXin Li_LT_DECL([], [want_nocaseglob], [1], 3389*a376eb32SXin Li [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3390*a376eb32SXin Li])# _LT_CHECK_MAGIC_METHOD 3391*a376eb32SXin Li 3392*a376eb32SXin Li 3393*a376eb32SXin Li# LT_PATH_NM 3394*a376eb32SXin Li# ---------- 3395*a376eb32SXin Li# find the pathname to a BSD- or MS-compatible name lister 3396*a376eb32SXin LiAC_DEFUN([LT_PATH_NM], 3397*a376eb32SXin Li[AC_REQUIRE([AC_PROG_CC])dnl 3398*a376eb32SXin LiAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3399*a376eb32SXin Li[if test -n "$NM"; then 3400*a376eb32SXin Li # Let the user override the test. 3401*a376eb32SXin Li lt_cv_path_NM="$NM" 3402*a376eb32SXin Lielse 3403*a376eb32SXin Li lt_nm_to_check="${ac_tool_prefix}nm" 3404*a376eb32SXin Li if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3405*a376eb32SXin Li lt_nm_to_check="$lt_nm_to_check nm" 3406*a376eb32SXin Li fi 3407*a376eb32SXin Li for lt_tmp_nm in $lt_nm_to_check; do 3408*a376eb32SXin Li lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3409*a376eb32SXin Li for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3410*a376eb32SXin Li IFS="$lt_save_ifs" 3411*a376eb32SXin Li test -z "$ac_dir" && ac_dir=. 3412*a376eb32SXin Li tmp_nm="$ac_dir/$lt_tmp_nm" 3413*a376eb32SXin Li if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 3414*a376eb32SXin Li # Check to see if the nm accepts a BSD-compat flag. 3415*a376eb32SXin Li # Adding the `sed 1q' prevents false positives on HP-UX, which says: 3416*a376eb32SXin Li # nm: unknown option "B" ignored 3417*a376eb32SXin Li # Tru64's nm complains that /dev/null is an invalid object file 3418*a376eb32SXin Li case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 3419*a376eb32SXin Li */dev/null* | *'Invalid file or object type'*) 3420*a376eb32SXin Li lt_cv_path_NM="$tmp_nm -B" 3421*a376eb32SXin Li break 3422*a376eb32SXin Li ;; 3423*a376eb32SXin Li *) 3424*a376eb32SXin Li case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3425*a376eb32SXin Li */dev/null*) 3426*a376eb32SXin Li lt_cv_path_NM="$tmp_nm -p" 3427*a376eb32SXin Li break 3428*a376eb32SXin Li ;; 3429*a376eb32SXin Li *) 3430*a376eb32SXin Li lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3431*a376eb32SXin Li continue # so that we can try to find one that supports BSD flags 3432*a376eb32SXin Li ;; 3433*a376eb32SXin Li esac 3434*a376eb32SXin Li ;; 3435*a376eb32SXin Li esac 3436*a376eb32SXin Li fi 3437*a376eb32SXin Li done 3438*a376eb32SXin Li IFS="$lt_save_ifs" 3439*a376eb32SXin Li done 3440*a376eb32SXin Li : ${lt_cv_path_NM=no} 3441*a376eb32SXin Lifi]) 3442*a376eb32SXin Liif test "$lt_cv_path_NM" != "no"; then 3443*a376eb32SXin Li NM="$lt_cv_path_NM" 3444*a376eb32SXin Lielse 3445*a376eb32SXin Li # Didn't find any BSD compatible name lister, look for dumpbin. 3446*a376eb32SXin Li if test -n "$DUMPBIN"; then : 3447*a376eb32SXin Li # Let the user override the test. 3448*a376eb32SXin Li else 3449*a376eb32SXin Li AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3450*a376eb32SXin Li case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 3451*a376eb32SXin Li *COFF*) 3452*a376eb32SXin Li DUMPBIN="$DUMPBIN -symbols" 3453*a376eb32SXin Li ;; 3454*a376eb32SXin Li *) 3455*a376eb32SXin Li DUMPBIN=: 3456*a376eb32SXin Li ;; 3457*a376eb32SXin Li esac 3458*a376eb32SXin Li fi 3459*a376eb32SXin Li AC_SUBST([DUMPBIN]) 3460*a376eb32SXin Li if test "$DUMPBIN" != ":"; then 3461*a376eb32SXin Li NM="$DUMPBIN" 3462*a376eb32SXin Li fi 3463*a376eb32SXin Lifi 3464*a376eb32SXin Litest -z "$NM" && NM=nm 3465*a376eb32SXin LiAC_SUBST([NM]) 3466*a376eb32SXin Li_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3467*a376eb32SXin Li 3468*a376eb32SXin LiAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3469*a376eb32SXin Li [lt_cv_nm_interface="BSD nm" 3470*a376eb32SXin Li echo "int some_variable = 0;" > conftest.$ac_ext 3471*a376eb32SXin Li (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3472*a376eb32SXin Li (eval "$ac_compile" 2>conftest.err) 3473*a376eb32SXin Li cat conftest.err >&AS_MESSAGE_LOG_FD 3474*a376eb32SXin Li (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3475*a376eb32SXin Li (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3476*a376eb32SXin Li cat conftest.err >&AS_MESSAGE_LOG_FD 3477*a376eb32SXin Li (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3478*a376eb32SXin Li cat conftest.out >&AS_MESSAGE_LOG_FD 3479*a376eb32SXin Li if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3480*a376eb32SXin Li lt_cv_nm_interface="MS dumpbin" 3481*a376eb32SXin Li fi 3482*a376eb32SXin Li rm -f conftest*]) 3483*a376eb32SXin Li])# LT_PATH_NM 3484*a376eb32SXin Li 3485*a376eb32SXin Li# Old names: 3486*a376eb32SXin LiAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3487*a376eb32SXin LiAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3488*a376eb32SXin Lidnl aclocal-1.4 backwards compatibility: 3489*a376eb32SXin Lidnl AC_DEFUN([AM_PROG_NM], []) 3490*a376eb32SXin Lidnl AC_DEFUN([AC_PROG_NM], []) 3491*a376eb32SXin Li 3492*a376eb32SXin Li# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3493*a376eb32SXin Li# -------------------------------- 3494*a376eb32SXin Li# how to determine the name of the shared library 3495*a376eb32SXin Li# associated with a specific link library. 3496*a376eb32SXin Li# -- PORTME fill in with the dynamic library characteristics 3497*a376eb32SXin Lim4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3498*a376eb32SXin Li[m4_require([_LT_DECL_EGREP]) 3499*a376eb32SXin Lim4_require([_LT_DECL_OBJDUMP]) 3500*a376eb32SXin Lim4_require([_LT_DECL_DLLTOOL]) 3501*a376eb32SXin LiAC_CACHE_CHECK([how to associate runtime and link libraries], 3502*a376eb32SXin Lilt_cv_sharedlib_from_linklib_cmd, 3503*a376eb32SXin Li[lt_cv_sharedlib_from_linklib_cmd='unknown' 3504*a376eb32SXin Li 3505*a376eb32SXin Licase $host_os in 3506*a376eb32SXin Licygwin* | mingw* | pw32* | cegcc*) 3507*a376eb32SXin Li # two different shell functions defined in ltmain.sh 3508*a376eb32SXin Li # decide which to use based on capabilities of $DLLTOOL 3509*a376eb32SXin Li case `$DLLTOOL --help 2>&1` in 3510*a376eb32SXin Li *--identify-strict*) 3511*a376eb32SXin Li lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3512*a376eb32SXin Li ;; 3513*a376eb32SXin Li *) 3514*a376eb32SXin Li lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3515*a376eb32SXin Li ;; 3516*a376eb32SXin Li esac 3517*a376eb32SXin Li ;; 3518*a376eb32SXin Li*) 3519*a376eb32SXin Li # fallback: assume linklib IS sharedlib 3520*a376eb32SXin Li lt_cv_sharedlib_from_linklib_cmd="$ECHO" 3521*a376eb32SXin Li ;; 3522*a376eb32SXin Liesac 3523*a376eb32SXin Li]) 3524*a376eb32SXin Lisharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3525*a376eb32SXin Litest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3526*a376eb32SXin Li 3527*a376eb32SXin Li_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3528*a376eb32SXin Li [Command to associate shared and link libraries]) 3529*a376eb32SXin Li])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3530*a376eb32SXin Li 3531*a376eb32SXin Li 3532*a376eb32SXin Li# _LT_PATH_MANIFEST_TOOL 3533*a376eb32SXin Li# ---------------------- 3534*a376eb32SXin Li# locate the manifest tool 3535*a376eb32SXin Lim4_defun([_LT_PATH_MANIFEST_TOOL], 3536*a376eb32SXin Li[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3537*a376eb32SXin Litest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3538*a376eb32SXin LiAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3539*a376eb32SXin Li [lt_cv_path_mainfest_tool=no 3540*a376eb32SXin Li echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3541*a376eb32SXin Li $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3542*a376eb32SXin Li cat conftest.err >&AS_MESSAGE_LOG_FD 3543*a376eb32SXin Li if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3544*a376eb32SXin Li lt_cv_path_mainfest_tool=yes 3545*a376eb32SXin Li fi 3546*a376eb32SXin Li rm -f conftest*]) 3547*a376eb32SXin Liif test "x$lt_cv_path_mainfest_tool" != xyes; then 3548*a376eb32SXin Li MANIFEST_TOOL=: 3549*a376eb32SXin Lifi 3550*a376eb32SXin Li_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3551*a376eb32SXin Li])# _LT_PATH_MANIFEST_TOOL 3552*a376eb32SXin Li 3553*a376eb32SXin Li 3554*a376eb32SXin Li# LT_LIB_M 3555*a376eb32SXin Li# -------- 3556*a376eb32SXin Li# check for math library 3557*a376eb32SXin LiAC_DEFUN([LT_LIB_M], 3558*a376eb32SXin Li[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3559*a376eb32SXin LiLIBM= 3560*a376eb32SXin Licase $host in 3561*a376eb32SXin Li*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 3562*a376eb32SXin Li # These system don't have libm, or don't need it 3563*a376eb32SXin Li ;; 3564*a376eb32SXin Li*-ncr-sysv4.3*) 3565*a376eb32SXin Li AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 3566*a376eb32SXin Li AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3567*a376eb32SXin Li ;; 3568*a376eb32SXin Li*) 3569*a376eb32SXin Li AC_CHECK_LIB(m, cos, LIBM="-lm") 3570*a376eb32SXin Li ;; 3571*a376eb32SXin Liesac 3572*a376eb32SXin LiAC_SUBST([LIBM]) 3573*a376eb32SXin Li])# LT_LIB_M 3574*a376eb32SXin Li 3575*a376eb32SXin Li# Old name: 3576*a376eb32SXin LiAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3577*a376eb32SXin Lidnl aclocal-1.4 backwards compatibility: 3578*a376eb32SXin Lidnl AC_DEFUN([AC_CHECK_LIBM], []) 3579*a376eb32SXin Li 3580*a376eb32SXin Li 3581*a376eb32SXin Li# _LT_COMPILER_NO_RTTI([TAGNAME]) 3582*a376eb32SXin Li# ------------------------------- 3583*a376eb32SXin Lim4_defun([_LT_COMPILER_NO_RTTI], 3584*a376eb32SXin Li[m4_require([_LT_TAG_COMPILER])dnl 3585*a376eb32SXin Li 3586*a376eb32SXin Li_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3587*a376eb32SXin Li 3588*a376eb32SXin Liif test "$GCC" = yes; then 3589*a376eb32SXin Li case $cc_basename in 3590*a376eb32SXin Li nvcc*) 3591*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3592*a376eb32SXin Li *) 3593*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3594*a376eb32SXin Li esac 3595*a376eb32SXin Li 3596*a376eb32SXin Li _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3597*a376eb32SXin Li lt_cv_prog_compiler_rtti_exceptions, 3598*a376eb32SXin Li [-fno-rtti -fno-exceptions], [], 3599*a376eb32SXin Li [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3600*a376eb32SXin Lifi 3601*a376eb32SXin Li_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3602*a376eb32SXin Li [Compiler flag to turn off builtin functions]) 3603*a376eb32SXin Li])# _LT_COMPILER_NO_RTTI 3604*a376eb32SXin Li 3605*a376eb32SXin Li 3606*a376eb32SXin Li# _LT_CMD_GLOBAL_SYMBOLS 3607*a376eb32SXin Li# ---------------------- 3608*a376eb32SXin Lim4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3609*a376eb32SXin Li[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3610*a376eb32SXin LiAC_REQUIRE([AC_PROG_CC])dnl 3611*a376eb32SXin LiAC_REQUIRE([AC_PROG_AWK])dnl 3612*a376eb32SXin LiAC_REQUIRE([LT_PATH_NM])dnl 3613*a376eb32SXin LiAC_REQUIRE([LT_PATH_LD])dnl 3614*a376eb32SXin Lim4_require([_LT_DECL_SED])dnl 3615*a376eb32SXin Lim4_require([_LT_DECL_EGREP])dnl 3616*a376eb32SXin Lim4_require([_LT_TAG_COMPILER])dnl 3617*a376eb32SXin Li 3618*a376eb32SXin Li# Check for command to grab the raw symbol name followed by C symbol from nm. 3619*a376eb32SXin LiAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3620*a376eb32SXin LiAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3621*a376eb32SXin Li[ 3622*a376eb32SXin Li# These are sane defaults that work on at least a few old systems. 3623*a376eb32SXin Li# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3624*a376eb32SXin Li 3625*a376eb32SXin Li# Character class describing NM global symbol codes. 3626*a376eb32SXin Lisymcode='[[BCDEGRST]]' 3627*a376eb32SXin Li 3628*a376eb32SXin Li# Regexp to match symbols that can be accessed directly from C. 3629*a376eb32SXin Lisympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3630*a376eb32SXin Li 3631*a376eb32SXin Li# Define system-specific variables. 3632*a376eb32SXin Licase $host_os in 3633*a376eb32SXin Liaix*) 3634*a376eb32SXin Li symcode='[[BCDT]]' 3635*a376eb32SXin Li ;; 3636*a376eb32SXin Licygwin* | mingw* | pw32* | cegcc*) 3637*a376eb32SXin Li symcode='[[ABCDGISTW]]' 3638*a376eb32SXin Li ;; 3639*a376eb32SXin Lihpux*) 3640*a376eb32SXin Li if test "$host_cpu" = ia64; then 3641*a376eb32SXin Li symcode='[[ABCDEGRST]]' 3642*a376eb32SXin Li fi 3643*a376eb32SXin Li ;; 3644*a376eb32SXin Liirix* | nonstopux*) 3645*a376eb32SXin Li symcode='[[BCDEGRST]]' 3646*a376eb32SXin Li ;; 3647*a376eb32SXin Liosf*) 3648*a376eb32SXin Li symcode='[[BCDEGQRST]]' 3649*a376eb32SXin Li ;; 3650*a376eb32SXin Lisolaris*) 3651*a376eb32SXin Li symcode='[[BDRT]]' 3652*a376eb32SXin Li ;; 3653*a376eb32SXin Lisco3.2v5*) 3654*a376eb32SXin Li symcode='[[DT]]' 3655*a376eb32SXin Li ;; 3656*a376eb32SXin Lisysv4.2uw2*) 3657*a376eb32SXin Li symcode='[[DT]]' 3658*a376eb32SXin Li ;; 3659*a376eb32SXin Lisysv5* | sco5v6* | unixware* | OpenUNIX*) 3660*a376eb32SXin Li symcode='[[ABDT]]' 3661*a376eb32SXin Li ;; 3662*a376eb32SXin Lisysv4) 3663*a376eb32SXin Li symcode='[[DFNSTU]]' 3664*a376eb32SXin Li ;; 3665*a376eb32SXin Liesac 3666*a376eb32SXin Li 3667*a376eb32SXin Li# If we're using GNU nm, then use its standard symbol codes. 3668*a376eb32SXin Licase `$NM -V 2>&1` in 3669*a376eb32SXin Li*GNU* | *'with BFD'*) 3670*a376eb32SXin Li symcode='[[ABCDGIRSTW]]' ;; 3671*a376eb32SXin Liesac 3672*a376eb32SXin Li 3673*a376eb32SXin Li# Transform an extracted symbol line into a proper C declaration. 3674*a376eb32SXin Li# Some systems (esp. on ia64) link data and code symbols differently, 3675*a376eb32SXin Li# so use this general approach. 3676*a376eb32SXin Lilt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 3677*a376eb32SXin Li 3678*a376eb32SXin Li# Transform an extracted symbol line into symbol name and symbol address 3679*a376eb32SXin Lilt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 3680*a376eb32SXin Lilt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" 3681*a376eb32SXin Li 3682*a376eb32SXin Li# Handle CRLF in mingw tool chain 3683*a376eb32SXin Liopt_cr= 3684*a376eb32SXin Licase $build_os in 3685*a376eb32SXin Limingw*) 3686*a376eb32SXin Li opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 3687*a376eb32SXin Li ;; 3688*a376eb32SXin Liesac 3689*a376eb32SXin Li 3690*a376eb32SXin Li# Try without a prefix underscore, then with it. 3691*a376eb32SXin Lifor ac_symprfx in "" "_"; do 3692*a376eb32SXin Li 3693*a376eb32SXin Li # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 3694*a376eb32SXin Li symxfrm="\\1 $ac_symprfx\\2 \\2" 3695*a376eb32SXin Li 3696*a376eb32SXin Li # Write the raw and C identifiers. 3697*a376eb32SXin Li if test "$lt_cv_nm_interface" = "MS dumpbin"; then 3698*a376eb32SXin Li # Fake it for dumpbin and say T for any non-static function 3699*a376eb32SXin Li # and D for any global variable. 3700*a376eb32SXin Li # Also find C++ and __fastcall symbols from MSVC++, 3701*a376eb32SXin Li # which start with @ or ?. 3702*a376eb32SXin Li lt_cv_sys_global_symbol_pipe="$AWK ['"\ 3703*a376eb32SXin Li" {last_section=section; section=\$ 3};"\ 3704*a376eb32SXin Li" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 3705*a376eb32SXin Li" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 3706*a376eb32SXin Li" \$ 0!~/External *\|/{next};"\ 3707*a376eb32SXin Li" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 3708*a376eb32SXin Li" {if(hide[section]) next};"\ 3709*a376eb32SXin Li" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 3710*a376eb32SXin Li" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 3711*a376eb32SXin Li" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 3712*a376eb32SXin Li" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 3713*a376eb32SXin Li" ' prfx=^$ac_symprfx]" 3714*a376eb32SXin Li else 3715*a376eb32SXin Li lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 3716*a376eb32SXin Li fi 3717*a376eb32SXin Li lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 3718*a376eb32SXin Li 3719*a376eb32SXin Li # Check to see that the pipe works correctly. 3720*a376eb32SXin Li pipe_works=no 3721*a376eb32SXin Li 3722*a376eb32SXin Li rm -f conftest* 3723*a376eb32SXin Li cat > conftest.$ac_ext <<_LT_EOF 3724*a376eb32SXin Li#ifdef __cplusplus 3725*a376eb32SXin Liextern "C" { 3726*a376eb32SXin Li#endif 3727*a376eb32SXin Lichar nm_test_var; 3728*a376eb32SXin Livoid nm_test_func(void); 3729*a376eb32SXin Livoid nm_test_func(void){} 3730*a376eb32SXin Li#ifdef __cplusplus 3731*a376eb32SXin Li} 3732*a376eb32SXin Li#endif 3733*a376eb32SXin Liint main(){nm_test_var='a';nm_test_func();return(0);} 3734*a376eb32SXin Li_LT_EOF 3735*a376eb32SXin Li 3736*a376eb32SXin Li if AC_TRY_EVAL(ac_compile); then 3737*a376eb32SXin Li # Now try to grab the symbols. 3738*a376eb32SXin Li nlist=conftest.nm 3739*a376eb32SXin Li if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 3740*a376eb32SXin Li # Try sorting and uniquifying the output. 3741*a376eb32SXin Li if sort "$nlist" | uniq > "$nlist"T; then 3742*a376eb32SXin Li mv -f "$nlist"T "$nlist" 3743*a376eb32SXin Li else 3744*a376eb32SXin Li rm -f "$nlist"T 3745*a376eb32SXin Li fi 3746*a376eb32SXin Li 3747*a376eb32SXin Li # Make sure that we snagged all the symbols we need. 3748*a376eb32SXin Li if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 3749*a376eb32SXin Li if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 3750*a376eb32SXin Li cat <<_LT_EOF > conftest.$ac_ext 3751*a376eb32SXin Li/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 3752*a376eb32SXin Li#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 3753*a376eb32SXin Li/* DATA imports from DLLs on WIN32 con't be const, because runtime 3754*a376eb32SXin Li relocations are performed -- see ld's documentation on pseudo-relocs. */ 3755*a376eb32SXin Li# define LT@&t@_DLSYM_CONST 3756*a376eb32SXin Li#elif defined(__osf__) 3757*a376eb32SXin Li/* This system does not cope well with relocations in const data. */ 3758*a376eb32SXin Li# define LT@&t@_DLSYM_CONST 3759*a376eb32SXin Li#else 3760*a376eb32SXin Li# define LT@&t@_DLSYM_CONST const 3761*a376eb32SXin Li#endif 3762*a376eb32SXin Li 3763*a376eb32SXin Li#ifdef __cplusplus 3764*a376eb32SXin Liextern "C" { 3765*a376eb32SXin Li#endif 3766*a376eb32SXin Li 3767*a376eb32SXin Li_LT_EOF 3768*a376eb32SXin Li # Now generate the symbol file. 3769*a376eb32SXin Li eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 3770*a376eb32SXin Li 3771*a376eb32SXin Li cat <<_LT_EOF >> conftest.$ac_ext 3772*a376eb32SXin Li 3773*a376eb32SXin Li/* The mapping between symbol names and symbols. */ 3774*a376eb32SXin LiLT@&t@_DLSYM_CONST struct { 3775*a376eb32SXin Li const char *name; 3776*a376eb32SXin Li void *address; 3777*a376eb32SXin Li} 3778*a376eb32SXin Lilt__PROGRAM__LTX_preloaded_symbols[[]] = 3779*a376eb32SXin Li{ 3780*a376eb32SXin Li { "@PROGRAM@", (void *) 0 }, 3781*a376eb32SXin Li_LT_EOF 3782*a376eb32SXin Li $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 3783*a376eb32SXin Li cat <<\_LT_EOF >> conftest.$ac_ext 3784*a376eb32SXin Li {0, (void *) 0} 3785*a376eb32SXin Li}; 3786*a376eb32SXin Li 3787*a376eb32SXin Li/* This works around a problem in FreeBSD linker */ 3788*a376eb32SXin Li#ifdef FREEBSD_WORKAROUND 3789*a376eb32SXin Listatic const void *lt_preloaded_setup() { 3790*a376eb32SXin Li return lt__PROGRAM__LTX_preloaded_symbols; 3791*a376eb32SXin Li} 3792*a376eb32SXin Li#endif 3793*a376eb32SXin Li 3794*a376eb32SXin Li#ifdef __cplusplus 3795*a376eb32SXin Li} 3796*a376eb32SXin Li#endif 3797*a376eb32SXin Li_LT_EOF 3798*a376eb32SXin Li # Now try linking the two files. 3799*a376eb32SXin Li mv conftest.$ac_objext conftstm.$ac_objext 3800*a376eb32SXin Li lt_globsym_save_LIBS=$LIBS 3801*a376eb32SXin Li lt_globsym_save_CFLAGS=$CFLAGS 3802*a376eb32SXin Li LIBS="conftstm.$ac_objext" 3803*a376eb32SXin Li CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 3804*a376eb32SXin Li if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 3805*a376eb32SXin Li pipe_works=yes 3806*a376eb32SXin Li fi 3807*a376eb32SXin Li LIBS=$lt_globsym_save_LIBS 3808*a376eb32SXin Li CFLAGS=$lt_globsym_save_CFLAGS 3809*a376eb32SXin Li else 3810*a376eb32SXin Li echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 3811*a376eb32SXin Li fi 3812*a376eb32SXin Li else 3813*a376eb32SXin Li echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 3814*a376eb32SXin Li fi 3815*a376eb32SXin Li else 3816*a376eb32SXin Li echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 3817*a376eb32SXin Li fi 3818*a376eb32SXin Li else 3819*a376eb32SXin Li echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 3820*a376eb32SXin Li cat conftest.$ac_ext >&5 3821*a376eb32SXin Li fi 3822*a376eb32SXin Li rm -rf conftest* conftst* 3823*a376eb32SXin Li 3824*a376eb32SXin Li # Do not use the global_symbol_pipe unless it works. 3825*a376eb32SXin Li if test "$pipe_works" = yes; then 3826*a376eb32SXin Li break 3827*a376eb32SXin Li else 3828*a376eb32SXin Li lt_cv_sys_global_symbol_pipe= 3829*a376eb32SXin Li fi 3830*a376eb32SXin Lidone 3831*a376eb32SXin Li]) 3832*a376eb32SXin Liif test -z "$lt_cv_sys_global_symbol_pipe"; then 3833*a376eb32SXin Li lt_cv_sys_global_symbol_to_cdecl= 3834*a376eb32SXin Lifi 3835*a376eb32SXin Liif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 3836*a376eb32SXin Li AC_MSG_RESULT(failed) 3837*a376eb32SXin Lielse 3838*a376eb32SXin Li AC_MSG_RESULT(ok) 3839*a376eb32SXin Lifi 3840*a376eb32SXin Li 3841*a376eb32SXin Li# Response file support. 3842*a376eb32SXin Liif test "$lt_cv_nm_interface" = "MS dumpbin"; then 3843*a376eb32SXin Li nm_file_list_spec='@' 3844*a376eb32SXin Lielif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 3845*a376eb32SXin Li nm_file_list_spec='@' 3846*a376eb32SXin Lifi 3847*a376eb32SXin Li 3848*a376eb32SXin Li_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 3849*a376eb32SXin Li [Take the output of nm and produce a listing of raw symbols and C names]) 3850*a376eb32SXin Li_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 3851*a376eb32SXin Li [Transform the output of nm in a proper C declaration]) 3852*a376eb32SXin Li_LT_DECL([global_symbol_to_c_name_address], 3853*a376eb32SXin Li [lt_cv_sys_global_symbol_to_c_name_address], [1], 3854*a376eb32SXin Li [Transform the output of nm in a C name address pair]) 3855*a376eb32SXin Li_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 3856*a376eb32SXin Li [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 3857*a376eb32SXin Li [Transform the output of nm in a C name address pair when lib prefix is needed]) 3858*a376eb32SXin Li_LT_DECL([], [nm_file_list_spec], [1], 3859*a376eb32SXin Li [Specify filename containing input files for $NM]) 3860*a376eb32SXin Li]) # _LT_CMD_GLOBAL_SYMBOLS 3861*a376eb32SXin Li 3862*a376eb32SXin Li 3863*a376eb32SXin Li# _LT_COMPILER_PIC([TAGNAME]) 3864*a376eb32SXin Li# --------------------------- 3865*a376eb32SXin Lim4_defun([_LT_COMPILER_PIC], 3866*a376eb32SXin Li[m4_require([_LT_TAG_COMPILER])dnl 3867*a376eb32SXin Li_LT_TAGVAR(lt_prog_compiler_wl, $1)= 3868*a376eb32SXin Li_LT_TAGVAR(lt_prog_compiler_pic, $1)= 3869*a376eb32SXin Li_LT_TAGVAR(lt_prog_compiler_static, $1)= 3870*a376eb32SXin Li 3871*a376eb32SXin Lim4_if([$1], [CXX], [ 3872*a376eb32SXin Li # C++ specific cases for pic, static, wl, etc. 3873*a376eb32SXin Li if test "$GXX" = yes; then 3874*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3875*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3876*a376eb32SXin Li 3877*a376eb32SXin Li case $host_os in 3878*a376eb32SXin Li aix*) 3879*a376eb32SXin Li # All AIX code is PIC. 3880*a376eb32SXin Li if test "$host_cpu" = ia64; then 3881*a376eb32SXin Li # AIX 5 now supports IA64 processor 3882*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3883*a376eb32SXin Li fi 3884*a376eb32SXin Li ;; 3885*a376eb32SXin Li 3886*a376eb32SXin Li amigaos*) 3887*a376eb32SXin Li case $host_cpu in 3888*a376eb32SXin Li powerpc) 3889*a376eb32SXin Li # see comment about AmigaOS4 .so support 3890*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3891*a376eb32SXin Li ;; 3892*a376eb32SXin Li m68k) 3893*a376eb32SXin Li # FIXME: we need at least 68020 code to build shared libraries, but 3894*a376eb32SXin Li # adding the `-m68020' flag to GCC prevents building anything better, 3895*a376eb32SXin Li # like `-m68040'. 3896*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 3897*a376eb32SXin Li ;; 3898*a376eb32SXin Li esac 3899*a376eb32SXin Li ;; 3900*a376eb32SXin Li 3901*a376eb32SXin Li beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 3902*a376eb32SXin Li # PIC is the default for these OSes. 3903*a376eb32SXin Li ;; 3904*a376eb32SXin Li mingw* | cygwin* | os2* | pw32* | cegcc*) 3905*a376eb32SXin Li # This hack is so that the source file can tell whether it is being 3906*a376eb32SXin Li # built for inclusion in a dll (and should export symbols for example). 3907*a376eb32SXin Li # Although the cygwin gcc ignores -fPIC, still need this for old-style 3908*a376eb32SXin Li # (--disable-auto-import) libraries 3909*a376eb32SXin Li m4_if([$1], [GCJ], [], 3910*a376eb32SXin Li [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3911*a376eb32SXin Li ;; 3912*a376eb32SXin Li darwin* | rhapsody*) 3913*a376eb32SXin Li # PIC is the default on this platform 3914*a376eb32SXin Li # Common symbols not allowed in MH_DYLIB files 3915*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 3916*a376eb32SXin Li ;; 3917*a376eb32SXin Li *djgpp*) 3918*a376eb32SXin Li # DJGPP does not support shared libraries at all 3919*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3920*a376eb32SXin Li ;; 3921*a376eb32SXin Li haiku*) 3922*a376eb32SXin Li # PIC is the default for Haiku. 3923*a376eb32SXin Li # The "-static" flag exists, but is broken. 3924*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)= 3925*a376eb32SXin Li ;; 3926*a376eb32SXin Li interix[[3-9]]*) 3927*a376eb32SXin Li # Interix 3.x gcc -fpic/-fPIC options generate broken code. 3928*a376eb32SXin Li # Instead, we relocate shared libraries at runtime. 3929*a376eb32SXin Li ;; 3930*a376eb32SXin Li sysv4*MP*) 3931*a376eb32SXin Li if test -d /usr/nec; then 3932*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3933*a376eb32SXin Li fi 3934*a376eb32SXin Li ;; 3935*a376eb32SXin Li hpux*) 3936*a376eb32SXin Li # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 3937*a376eb32SXin Li # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 3938*a376eb32SXin Li # sets the default TLS model and affects inlining. 3939*a376eb32SXin Li case $host_cpu in 3940*a376eb32SXin Li hppa*64*) 3941*a376eb32SXin Li ;; 3942*a376eb32SXin Li *) 3943*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3944*a376eb32SXin Li ;; 3945*a376eb32SXin Li esac 3946*a376eb32SXin Li ;; 3947*a376eb32SXin Li *qnx* | *nto*) 3948*a376eb32SXin Li # QNX uses GNU C++, but need to define -shared option too, otherwise 3949*a376eb32SXin Li # it will coredump. 3950*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3951*a376eb32SXin Li ;; 3952*a376eb32SXin Li *) 3953*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3954*a376eb32SXin Li ;; 3955*a376eb32SXin Li esac 3956*a376eb32SXin Li else 3957*a376eb32SXin Li case $host_os in 3958*a376eb32SXin Li aix[[4-9]]*) 3959*a376eb32SXin Li # All AIX code is PIC. 3960*a376eb32SXin Li if test "$host_cpu" = ia64; then 3961*a376eb32SXin Li # AIX 5 now supports IA64 processor 3962*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3963*a376eb32SXin Li else 3964*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 3965*a376eb32SXin Li fi 3966*a376eb32SXin Li ;; 3967*a376eb32SXin Li chorus*) 3968*a376eb32SXin Li case $cc_basename in 3969*a376eb32SXin Li cxch68*) 3970*a376eb32SXin Li # Green Hills C++ Compiler 3971*a376eb32SXin Li # _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" 3972*a376eb32SXin Li ;; 3973*a376eb32SXin Li esac 3974*a376eb32SXin Li ;; 3975*a376eb32SXin Li mingw* | cygwin* | os2* | pw32* | cegcc*) 3976*a376eb32SXin Li # This hack is so that the source file can tell whether it is being 3977*a376eb32SXin Li # built for inclusion in a dll (and should export symbols for example). 3978*a376eb32SXin Li m4_if([$1], [GCJ], [], 3979*a376eb32SXin Li [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3980*a376eb32SXin Li ;; 3981*a376eb32SXin Li dgux*) 3982*a376eb32SXin Li case $cc_basename in 3983*a376eb32SXin Li ec++*) 3984*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3985*a376eb32SXin Li ;; 3986*a376eb32SXin Li ghcx*) 3987*a376eb32SXin Li # Green Hills C++ Compiler 3988*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3989*a376eb32SXin Li ;; 3990*a376eb32SXin Li *) 3991*a376eb32SXin Li ;; 3992*a376eb32SXin Li esac 3993*a376eb32SXin Li ;; 3994*a376eb32SXin Li freebsd* | dragonfly*) 3995*a376eb32SXin Li # FreeBSD uses GNU C++ 3996*a376eb32SXin Li ;; 3997*a376eb32SXin Li hpux9* | hpux10* | hpux11*) 3998*a376eb32SXin Li case $cc_basename in 3999*a376eb32SXin Li CC*) 4000*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4001*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4002*a376eb32SXin Li if test "$host_cpu" != ia64; then 4003*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4004*a376eb32SXin Li fi 4005*a376eb32SXin Li ;; 4006*a376eb32SXin Li aCC*) 4007*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4008*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4009*a376eb32SXin Li case $host_cpu in 4010*a376eb32SXin Li hppa*64*|ia64*) 4011*a376eb32SXin Li # +Z the default 4012*a376eb32SXin Li ;; 4013*a376eb32SXin Li *) 4014*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4015*a376eb32SXin Li ;; 4016*a376eb32SXin Li esac 4017*a376eb32SXin Li ;; 4018*a376eb32SXin Li *) 4019*a376eb32SXin Li ;; 4020*a376eb32SXin Li esac 4021*a376eb32SXin Li ;; 4022*a376eb32SXin Li interix*) 4023*a376eb32SXin Li # This is c89, which is MS Visual C++ (no shared libs) 4024*a376eb32SXin Li # Anyone wants to do a port? 4025*a376eb32SXin Li ;; 4026*a376eb32SXin Li irix5* | irix6* | nonstopux*) 4027*a376eb32SXin Li case $cc_basename in 4028*a376eb32SXin Li CC*) 4029*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4030*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4031*a376eb32SXin Li # CC pic flag -KPIC is the default. 4032*a376eb32SXin Li ;; 4033*a376eb32SXin Li *) 4034*a376eb32SXin Li ;; 4035*a376eb32SXin Li esac 4036*a376eb32SXin Li ;; 4037*a376eb32SXin Li linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4038*a376eb32SXin Li case $cc_basename in 4039*a376eb32SXin Li KCC*) 4040*a376eb32SXin Li # KAI C++ Compiler 4041*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4042*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4043*a376eb32SXin Li ;; 4044*a376eb32SXin Li ecpc* ) 4045*a376eb32SXin Li # old Intel C++ for x86_64 which still supported -KPIC. 4046*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4047*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4048*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4049*a376eb32SXin Li ;; 4050*a376eb32SXin Li icpc* ) 4051*a376eb32SXin Li # Intel C++, used to be incompatible with GCC. 4052*a376eb32SXin Li # ICC 10 doesn't accept -KPIC any more. 4053*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4054*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4055*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4056*a376eb32SXin Li ;; 4057*a376eb32SXin Li pgCC* | pgcpp*) 4058*a376eb32SXin Li # Portland Group C++ compiler 4059*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4060*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4061*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4062*a376eb32SXin Li ;; 4063*a376eb32SXin Li cxx*) 4064*a376eb32SXin Li # Compaq C++ 4065*a376eb32SXin Li # Make sure the PIC flag is empty. It appears that all Alpha 4066*a376eb32SXin Li # Linux and Compaq Tru64 Unix objects are PIC. 4067*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4068*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4069*a376eb32SXin Li ;; 4070*a376eb32SXin Li xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4071*a376eb32SXin Li # IBM XL 8.0, 9.0 on PPC and BlueGene 4072*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4073*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4074*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4075*a376eb32SXin Li ;; 4076*a376eb32SXin Li *) 4077*a376eb32SXin Li case `$CC -V 2>&1 | sed 5q` in 4078*a376eb32SXin Li *Sun\ C*) 4079*a376eb32SXin Li # Sun C++ 5.9 4080*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4081*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4082*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4083*a376eb32SXin Li ;; 4084*a376eb32SXin Li esac 4085*a376eb32SXin Li ;; 4086*a376eb32SXin Li esac 4087*a376eb32SXin Li ;; 4088*a376eb32SXin Li lynxos*) 4089*a376eb32SXin Li ;; 4090*a376eb32SXin Li m88k*) 4091*a376eb32SXin Li ;; 4092*a376eb32SXin Li mvs*) 4093*a376eb32SXin Li case $cc_basename in 4094*a376eb32SXin Li cxx*) 4095*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4096*a376eb32SXin Li ;; 4097*a376eb32SXin Li *) 4098*a376eb32SXin Li ;; 4099*a376eb32SXin Li esac 4100*a376eb32SXin Li ;; 4101*a376eb32SXin Li netbsd* | netbsdelf*-gnu) 4102*a376eb32SXin Li ;; 4103*a376eb32SXin Li *qnx* | *nto*) 4104*a376eb32SXin Li # QNX uses GNU C++, but need to define -shared option too, otherwise 4105*a376eb32SXin Li # it will coredump. 4106*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4107*a376eb32SXin Li ;; 4108*a376eb32SXin Li osf3* | osf4* | osf5*) 4109*a376eb32SXin Li case $cc_basename in 4110*a376eb32SXin Li KCC*) 4111*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4112*a376eb32SXin Li ;; 4113*a376eb32SXin Li RCC*) 4114*a376eb32SXin Li # Rational C++ 2.4.1 4115*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4116*a376eb32SXin Li ;; 4117*a376eb32SXin Li cxx*) 4118*a376eb32SXin Li # Digital/Compaq C++ 4119*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4120*a376eb32SXin Li # Make sure the PIC flag is empty. It appears that all Alpha 4121*a376eb32SXin Li # Linux and Compaq Tru64 Unix objects are PIC. 4122*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4123*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4124*a376eb32SXin Li ;; 4125*a376eb32SXin Li *) 4126*a376eb32SXin Li ;; 4127*a376eb32SXin Li esac 4128*a376eb32SXin Li ;; 4129*a376eb32SXin Li psos*) 4130*a376eb32SXin Li ;; 4131*a376eb32SXin Li solaris*) 4132*a376eb32SXin Li case $cc_basename in 4133*a376eb32SXin Li CC* | sunCC*) 4134*a376eb32SXin Li # Sun C++ 4.2, 5.x and Centerline C++ 4135*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4136*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4137*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4138*a376eb32SXin Li ;; 4139*a376eb32SXin Li gcx*) 4140*a376eb32SXin Li # Green Hills C++ Compiler 4141*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4142*a376eb32SXin Li ;; 4143*a376eb32SXin Li *) 4144*a376eb32SXin Li ;; 4145*a376eb32SXin Li esac 4146*a376eb32SXin Li ;; 4147*a376eb32SXin Li sunos4*) 4148*a376eb32SXin Li case $cc_basename in 4149*a376eb32SXin Li CC*) 4150*a376eb32SXin Li # Sun C++ 4.x 4151*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4152*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4153*a376eb32SXin Li ;; 4154*a376eb32SXin Li lcc*) 4155*a376eb32SXin Li # Lucid 4156*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4157*a376eb32SXin Li ;; 4158*a376eb32SXin Li *) 4159*a376eb32SXin Li ;; 4160*a376eb32SXin Li esac 4161*a376eb32SXin Li ;; 4162*a376eb32SXin Li sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4163*a376eb32SXin Li case $cc_basename in 4164*a376eb32SXin Li CC*) 4165*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4166*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4167*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4168*a376eb32SXin Li ;; 4169*a376eb32SXin Li esac 4170*a376eb32SXin Li ;; 4171*a376eb32SXin Li tandem*) 4172*a376eb32SXin Li case $cc_basename in 4173*a376eb32SXin Li NCC*) 4174*a376eb32SXin Li # NonStop-UX NCC 3.20 4175*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4176*a376eb32SXin Li ;; 4177*a376eb32SXin Li *) 4178*a376eb32SXin Li ;; 4179*a376eb32SXin Li esac 4180*a376eb32SXin Li ;; 4181*a376eb32SXin Li vxworks*) 4182*a376eb32SXin Li ;; 4183*a376eb32SXin Li *) 4184*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4185*a376eb32SXin Li ;; 4186*a376eb32SXin Li esac 4187*a376eb32SXin Li fi 4188*a376eb32SXin Li], 4189*a376eb32SXin Li[ 4190*a376eb32SXin Li if test "$GCC" = yes; then 4191*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4192*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4193*a376eb32SXin Li 4194*a376eb32SXin Li case $host_os in 4195*a376eb32SXin Li aix*) 4196*a376eb32SXin Li # All AIX code is PIC. 4197*a376eb32SXin Li if test "$host_cpu" = ia64; then 4198*a376eb32SXin Li # AIX 5 now supports IA64 processor 4199*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4200*a376eb32SXin Li fi 4201*a376eb32SXin Li ;; 4202*a376eb32SXin Li 4203*a376eb32SXin Li amigaos*) 4204*a376eb32SXin Li case $host_cpu in 4205*a376eb32SXin Li powerpc) 4206*a376eb32SXin Li # see comment about AmigaOS4 .so support 4207*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4208*a376eb32SXin Li ;; 4209*a376eb32SXin Li m68k) 4210*a376eb32SXin Li # FIXME: we need at least 68020 code to build shared libraries, but 4211*a376eb32SXin Li # adding the `-m68020' flag to GCC prevents building anything better, 4212*a376eb32SXin Li # like `-m68040'. 4213*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4214*a376eb32SXin Li ;; 4215*a376eb32SXin Li esac 4216*a376eb32SXin Li ;; 4217*a376eb32SXin Li 4218*a376eb32SXin Li beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4219*a376eb32SXin Li # PIC is the default for these OSes. 4220*a376eb32SXin Li ;; 4221*a376eb32SXin Li 4222*a376eb32SXin Li mingw* | cygwin* | pw32* | os2* | cegcc*) 4223*a376eb32SXin Li # This hack is so that the source file can tell whether it is being 4224*a376eb32SXin Li # built for inclusion in a dll (and should export symbols for example). 4225*a376eb32SXin Li # Although the cygwin gcc ignores -fPIC, still need this for old-style 4226*a376eb32SXin Li # (--disable-auto-import) libraries 4227*a376eb32SXin Li m4_if([$1], [GCJ], [], 4228*a376eb32SXin Li [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4229*a376eb32SXin Li ;; 4230*a376eb32SXin Li 4231*a376eb32SXin Li darwin* | rhapsody*) 4232*a376eb32SXin Li # PIC is the default on this platform 4233*a376eb32SXin Li # Common symbols not allowed in MH_DYLIB files 4234*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4235*a376eb32SXin Li ;; 4236*a376eb32SXin Li 4237*a376eb32SXin Li haiku*) 4238*a376eb32SXin Li # PIC is the default for Haiku. 4239*a376eb32SXin Li # The "-static" flag exists, but is broken. 4240*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)= 4241*a376eb32SXin Li ;; 4242*a376eb32SXin Li 4243*a376eb32SXin Li hpux*) 4244*a376eb32SXin Li # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4245*a376eb32SXin Li # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4246*a376eb32SXin Li # sets the default TLS model and affects inlining. 4247*a376eb32SXin Li case $host_cpu in 4248*a376eb32SXin Li hppa*64*) 4249*a376eb32SXin Li # +Z the default 4250*a376eb32SXin Li ;; 4251*a376eb32SXin Li *) 4252*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4253*a376eb32SXin Li ;; 4254*a376eb32SXin Li esac 4255*a376eb32SXin Li ;; 4256*a376eb32SXin Li 4257*a376eb32SXin Li interix[[3-9]]*) 4258*a376eb32SXin Li # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4259*a376eb32SXin Li # Instead, we relocate shared libraries at runtime. 4260*a376eb32SXin Li ;; 4261*a376eb32SXin Li 4262*a376eb32SXin Li msdosdjgpp*) 4263*a376eb32SXin Li # Just because we use GCC doesn't mean we suddenly get shared libraries 4264*a376eb32SXin Li # on systems that don't support them. 4265*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4266*a376eb32SXin Li enable_shared=no 4267*a376eb32SXin Li ;; 4268*a376eb32SXin Li 4269*a376eb32SXin Li *nto* | *qnx*) 4270*a376eb32SXin Li # QNX uses GNU C++, but need to define -shared option too, otherwise 4271*a376eb32SXin Li # it will coredump. 4272*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4273*a376eb32SXin Li ;; 4274*a376eb32SXin Li 4275*a376eb32SXin Li sysv4*MP*) 4276*a376eb32SXin Li if test -d /usr/nec; then 4277*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4278*a376eb32SXin Li fi 4279*a376eb32SXin Li ;; 4280*a376eb32SXin Li 4281*a376eb32SXin Li *) 4282*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4283*a376eb32SXin Li ;; 4284*a376eb32SXin Li esac 4285*a376eb32SXin Li 4286*a376eb32SXin Li case $cc_basename in 4287*a376eb32SXin Li nvcc*) # Cuda Compiler Driver 2.2 4288*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4289*a376eb32SXin Li if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4290*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 4291*a376eb32SXin Li fi 4292*a376eb32SXin Li ;; 4293*a376eb32SXin Li esac 4294*a376eb32SXin Li else 4295*a376eb32SXin Li # PORTME Check for flag to pass linker flags through the system compiler. 4296*a376eb32SXin Li case $host_os in 4297*a376eb32SXin Li aix*) 4298*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4299*a376eb32SXin Li if test "$host_cpu" = ia64; then 4300*a376eb32SXin Li # AIX 5 now supports IA64 processor 4301*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4302*a376eb32SXin Li else 4303*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4304*a376eb32SXin Li fi 4305*a376eb32SXin Li ;; 4306*a376eb32SXin Li 4307*a376eb32SXin Li mingw* | cygwin* | pw32* | os2* | cegcc*) 4308*a376eb32SXin Li # This hack is so that the source file can tell whether it is being 4309*a376eb32SXin Li # built for inclusion in a dll (and should export symbols for example). 4310*a376eb32SXin Li m4_if([$1], [GCJ], [], 4311*a376eb32SXin Li [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4312*a376eb32SXin Li ;; 4313*a376eb32SXin Li 4314*a376eb32SXin Li hpux9* | hpux10* | hpux11*) 4315*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4316*a376eb32SXin Li # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4317*a376eb32SXin Li # not for PA HP-UX. 4318*a376eb32SXin Li case $host_cpu in 4319*a376eb32SXin Li hppa*64*|ia64*) 4320*a376eb32SXin Li # +Z the default 4321*a376eb32SXin Li ;; 4322*a376eb32SXin Li *) 4323*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4324*a376eb32SXin Li ;; 4325*a376eb32SXin Li esac 4326*a376eb32SXin Li # Is there a better lt_prog_compiler_static that works with the bundled CC? 4327*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4328*a376eb32SXin Li ;; 4329*a376eb32SXin Li 4330*a376eb32SXin Li irix5* | irix6* | nonstopux*) 4331*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4332*a376eb32SXin Li # PIC (with -KPIC) is the default. 4333*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4334*a376eb32SXin Li ;; 4335*a376eb32SXin Li 4336*a376eb32SXin Li linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4337*a376eb32SXin Li case $cc_basename in 4338*a376eb32SXin Li # old Intel for x86_64 which still supported -KPIC. 4339*a376eb32SXin Li ecc*) 4340*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4341*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4342*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4343*a376eb32SXin Li ;; 4344*a376eb32SXin Li # icc used to be incompatible with GCC. 4345*a376eb32SXin Li # ICC 10 doesn't accept -KPIC any more. 4346*a376eb32SXin Li icc* | ifort*) 4347*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4348*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4349*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4350*a376eb32SXin Li ;; 4351*a376eb32SXin Li # Lahey Fortran 8.1. 4352*a376eb32SXin Li lf95*) 4353*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4354*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4355*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4356*a376eb32SXin Li ;; 4357*a376eb32SXin Li nagfor*) 4358*a376eb32SXin Li # NAG Fortran compiler 4359*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4360*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4361*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4362*a376eb32SXin Li ;; 4363*a376eb32SXin Li pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4364*a376eb32SXin Li # Portland Group compilers (*not* the Pentium gcc compiler, 4365*a376eb32SXin Li # which looks to be a dead project) 4366*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4367*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4368*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4369*a376eb32SXin Li ;; 4370*a376eb32SXin Li ccc*) 4371*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4372*a376eb32SXin Li # All Alpha code is PIC. 4373*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4374*a376eb32SXin Li ;; 4375*a376eb32SXin Li xl* | bgxl* | bgf* | mpixl*) 4376*a376eb32SXin Li # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4377*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4378*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4379*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4380*a376eb32SXin Li ;; 4381*a376eb32SXin Li *) 4382*a376eb32SXin Li case `$CC -V 2>&1 | sed 5q` in 4383*a376eb32SXin Li *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 4384*a376eb32SXin Li # Sun Fortran 8.3 passes all unrecognized flags to the linker 4385*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4386*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4387*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4388*a376eb32SXin Li ;; 4389*a376eb32SXin Li *Sun\ F* | *Sun*Fortran*) 4390*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4391*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4392*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4393*a376eb32SXin Li ;; 4394*a376eb32SXin Li *Sun\ C*) 4395*a376eb32SXin Li # Sun C 5.9 4396*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4397*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4398*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4399*a376eb32SXin Li ;; 4400*a376eb32SXin Li *Intel*\ [[CF]]*Compiler*) 4401*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4402*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4403*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4404*a376eb32SXin Li ;; 4405*a376eb32SXin Li *Portland\ Group*) 4406*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4407*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4408*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4409*a376eb32SXin Li ;; 4410*a376eb32SXin Li esac 4411*a376eb32SXin Li ;; 4412*a376eb32SXin Li esac 4413*a376eb32SXin Li ;; 4414*a376eb32SXin Li 4415*a376eb32SXin Li newsos6) 4416*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4417*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4418*a376eb32SXin Li ;; 4419*a376eb32SXin Li 4420*a376eb32SXin Li *nto* | *qnx*) 4421*a376eb32SXin Li # QNX uses GNU C++, but need to define -shared option too, otherwise 4422*a376eb32SXin Li # it will coredump. 4423*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4424*a376eb32SXin Li ;; 4425*a376eb32SXin Li 4426*a376eb32SXin Li osf3* | osf4* | osf5*) 4427*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4428*a376eb32SXin Li # All OSF/1 code is PIC. 4429*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4430*a376eb32SXin Li ;; 4431*a376eb32SXin Li 4432*a376eb32SXin Li rdos*) 4433*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4434*a376eb32SXin Li ;; 4435*a376eb32SXin Li 4436*a376eb32SXin Li solaris*) 4437*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4438*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4439*a376eb32SXin Li case $cc_basename in 4440*a376eb32SXin Li f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4441*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4442*a376eb32SXin Li *) 4443*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4444*a376eb32SXin Li esac 4445*a376eb32SXin Li ;; 4446*a376eb32SXin Li 4447*a376eb32SXin Li sunos4*) 4448*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4449*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4450*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4451*a376eb32SXin Li ;; 4452*a376eb32SXin Li 4453*a376eb32SXin Li sysv4 | sysv4.2uw2* | sysv4.3*) 4454*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4455*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4456*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4457*a376eb32SXin Li ;; 4458*a376eb32SXin Li 4459*a376eb32SXin Li sysv4*MP*) 4460*a376eb32SXin Li if test -d /usr/nec ;then 4461*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4462*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4463*a376eb32SXin Li fi 4464*a376eb32SXin Li ;; 4465*a376eb32SXin Li 4466*a376eb32SXin Li sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4467*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4468*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4469*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4470*a376eb32SXin Li ;; 4471*a376eb32SXin Li 4472*a376eb32SXin Li unicos*) 4473*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4474*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4475*a376eb32SXin Li ;; 4476*a376eb32SXin Li 4477*a376eb32SXin Li uts4*) 4478*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4479*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4480*a376eb32SXin Li ;; 4481*a376eb32SXin Li 4482*a376eb32SXin Li *) 4483*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4484*a376eb32SXin Li ;; 4485*a376eb32SXin Li esac 4486*a376eb32SXin Li fi 4487*a376eb32SXin Li]) 4488*a376eb32SXin Licase $host_os in 4489*a376eb32SXin Li # For platforms which do not support PIC, -DPIC is meaningless: 4490*a376eb32SXin Li *djgpp*) 4491*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4492*a376eb32SXin Li ;; 4493*a376eb32SXin Li *) 4494*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4495*a376eb32SXin Li ;; 4496*a376eb32SXin Liesac 4497*a376eb32SXin Li 4498*a376eb32SXin LiAC_CACHE_CHECK([for $compiler option to produce PIC], 4499*a376eb32SXin Li [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4500*a376eb32SXin Li [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4501*a376eb32SXin Li_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4502*a376eb32SXin Li 4503*a376eb32SXin Li# 4504*a376eb32SXin Li# Check to make sure the PIC flag actually works. 4505*a376eb32SXin Li# 4506*a376eb32SXin Liif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4507*a376eb32SXin Li _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4508*a376eb32SXin Li [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4509*a376eb32SXin Li [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4510*a376eb32SXin Li [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4511*a376eb32SXin Li "" | " "*) ;; 4512*a376eb32SXin Li *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4513*a376eb32SXin Li esac], 4514*a376eb32SXin Li [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4515*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4516*a376eb32SXin Lifi 4517*a376eb32SXin Li_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4518*a376eb32SXin Li [Additional compiler flags for building library objects]) 4519*a376eb32SXin Li 4520*a376eb32SXin Li_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4521*a376eb32SXin Li [How to pass a linker flag through the compiler]) 4522*a376eb32SXin Li# 4523*a376eb32SXin Li# Check to make sure the static flag actually works. 4524*a376eb32SXin Li# 4525*a376eb32SXin Liwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4526*a376eb32SXin Li_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4527*a376eb32SXin Li _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4528*a376eb32SXin Li $lt_tmp_static_flag, 4529*a376eb32SXin Li [], 4530*a376eb32SXin Li [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4531*a376eb32SXin Li_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4532*a376eb32SXin Li [Compiler flag to prevent dynamic linking]) 4533*a376eb32SXin Li])# _LT_COMPILER_PIC 4534*a376eb32SXin Li 4535*a376eb32SXin Li 4536*a376eb32SXin Li# _LT_LINKER_SHLIBS([TAGNAME]) 4537*a376eb32SXin Li# ---------------------------- 4538*a376eb32SXin Li# See if the linker supports building shared libraries. 4539*a376eb32SXin Lim4_defun([_LT_LINKER_SHLIBS], 4540*a376eb32SXin Li[AC_REQUIRE([LT_PATH_LD])dnl 4541*a376eb32SXin LiAC_REQUIRE([LT_PATH_NM])dnl 4542*a376eb32SXin Lim4_require([_LT_PATH_MANIFEST_TOOL])dnl 4543*a376eb32SXin Lim4_require([_LT_FILEUTILS_DEFAULTS])dnl 4544*a376eb32SXin Lim4_require([_LT_DECL_EGREP])dnl 4545*a376eb32SXin Lim4_require([_LT_DECL_SED])dnl 4546*a376eb32SXin Lim4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4547*a376eb32SXin Lim4_require([_LT_TAG_COMPILER])dnl 4548*a376eb32SXin LiAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4549*a376eb32SXin Lim4_if([$1], [CXX], [ 4550*a376eb32SXin Li _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4551*a376eb32SXin Li _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4552*a376eb32SXin Li case $host_os in 4553*a376eb32SXin Li aix[[4-9]]*) 4554*a376eb32SXin Li # If we're using GNU nm, then we don't want the "-C" option. 4555*a376eb32SXin Li # -C means demangle to AIX nm, but means don't demangle with GNU nm 4556*a376eb32SXin Li # Also, AIX nm treats weak defined symbols like other global defined 4557*a376eb32SXin Li # symbols, whereas GNU nm marks them as "W". 4558*a376eb32SXin Li if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4559*a376eb32SXin Li _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 4560*a376eb32SXin Li else 4561*a376eb32SXin Li _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 4562*a376eb32SXin Li fi 4563*a376eb32SXin Li ;; 4564*a376eb32SXin Li pw32*) 4565*a376eb32SXin Li _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 4566*a376eb32SXin Li ;; 4567*a376eb32SXin Li cygwin* | mingw* | cegcc*) 4568*a376eb32SXin Li case $cc_basename in 4569*a376eb32SXin Li cl*) 4570*a376eb32SXin Li _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 4571*a376eb32SXin Li ;; 4572*a376eb32SXin Li *) 4573*a376eb32SXin Li _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' 4574*a376eb32SXin Li _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4575*a376eb32SXin Li ;; 4576*a376eb32SXin Li esac 4577*a376eb32SXin Li ;; 4578*a376eb32SXin Li linux* | k*bsd*-gnu | gnu*) 4579*a376eb32SXin Li _LT_TAGVAR(link_all_deplibs, $1)=no 4580*a376eb32SXin Li ;; 4581*a376eb32SXin Li *) 4582*a376eb32SXin Li _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4583*a376eb32SXin Li ;; 4584*a376eb32SXin Li esac 4585*a376eb32SXin Li], [ 4586*a376eb32SXin Li runpath_var= 4587*a376eb32SXin Li _LT_TAGVAR(allow_undefined_flag, $1)= 4588*a376eb32SXin Li _LT_TAGVAR(always_export_symbols, $1)=no 4589*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)= 4590*a376eb32SXin Li _LT_TAGVAR(archive_expsym_cmds, $1)= 4591*a376eb32SXin Li _LT_TAGVAR(compiler_needs_object, $1)=no 4592*a376eb32SXin Li _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4593*a376eb32SXin Li _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4594*a376eb32SXin Li _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4595*a376eb32SXin Li _LT_TAGVAR(hardcode_automatic, $1)=no 4596*a376eb32SXin Li _LT_TAGVAR(hardcode_direct, $1)=no 4597*a376eb32SXin Li _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4598*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4599*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_separator, $1)= 4600*a376eb32SXin Li _LT_TAGVAR(hardcode_minus_L, $1)=no 4601*a376eb32SXin Li _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4602*a376eb32SXin Li _LT_TAGVAR(inherit_rpath, $1)=no 4603*a376eb32SXin Li _LT_TAGVAR(link_all_deplibs, $1)=unknown 4604*a376eb32SXin Li _LT_TAGVAR(module_cmds, $1)= 4605*a376eb32SXin Li _LT_TAGVAR(module_expsym_cmds, $1)= 4606*a376eb32SXin Li _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4607*a376eb32SXin Li _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4608*a376eb32SXin Li _LT_TAGVAR(thread_safe_flag_spec, $1)= 4609*a376eb32SXin Li _LT_TAGVAR(whole_archive_flag_spec, $1)= 4610*a376eb32SXin Li # include_expsyms should be a list of space-separated symbols to be *always* 4611*a376eb32SXin Li # included in the symbol list 4612*a376eb32SXin Li _LT_TAGVAR(include_expsyms, $1)= 4613*a376eb32SXin Li # exclude_expsyms can be an extended regexp of symbols to exclude 4614*a376eb32SXin Li # it will be wrapped by ` (' and `)$', so one must not match beginning or 4615*a376eb32SXin Li # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 4616*a376eb32SXin Li # as well as any symbol that contains `d'. 4617*a376eb32SXin Li _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4618*a376eb32SXin Li # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 4619*a376eb32SXin Li # platforms (ab)use it in PIC code, but their linkers get confused if 4620*a376eb32SXin Li # the symbol is explicitly referenced. Since portable code cannot 4621*a376eb32SXin Li # rely on this symbol name, it's probably fine to never include it in 4622*a376eb32SXin Li # preloaded symbol tables. 4623*a376eb32SXin Li # Exclude shared library initialization/finalization symbols. 4624*a376eb32SXin Lidnl Note also adjust exclude_expsyms for C++ above. 4625*a376eb32SXin Li extract_expsyms_cmds= 4626*a376eb32SXin Li 4627*a376eb32SXin Li case $host_os in 4628*a376eb32SXin Li cygwin* | mingw* | pw32* | cegcc*) 4629*a376eb32SXin Li # FIXME: the MSVC++ port hasn't been tested in a loooong time 4630*a376eb32SXin Li # When not using gcc, we currently assume that we are using 4631*a376eb32SXin Li # Microsoft Visual C++. 4632*a376eb32SXin Li if test "$GCC" != yes; then 4633*a376eb32SXin Li with_gnu_ld=no 4634*a376eb32SXin Li fi 4635*a376eb32SXin Li ;; 4636*a376eb32SXin Li interix*) 4637*a376eb32SXin Li # we just hope/assume this is gcc and not c89 (= MSVC++) 4638*a376eb32SXin Li with_gnu_ld=yes 4639*a376eb32SXin Li ;; 4640*a376eb32SXin Li openbsd*) 4641*a376eb32SXin Li with_gnu_ld=no 4642*a376eb32SXin Li ;; 4643*a376eb32SXin Li linux* | k*bsd*-gnu | gnu*) 4644*a376eb32SXin Li _LT_TAGVAR(link_all_deplibs, $1)=no 4645*a376eb32SXin Li ;; 4646*a376eb32SXin Li esac 4647*a376eb32SXin Li 4648*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=yes 4649*a376eb32SXin Li 4650*a376eb32SXin Li # On some targets, GNU ld is compatible enough with the native linker 4651*a376eb32SXin Li # that we're better off using the native interface for both. 4652*a376eb32SXin Li lt_use_gnu_ld_interface=no 4653*a376eb32SXin Li if test "$with_gnu_ld" = yes; then 4654*a376eb32SXin Li case $host_os in 4655*a376eb32SXin Li aix*) 4656*a376eb32SXin Li # The AIX port of GNU ld has always aspired to compatibility 4657*a376eb32SXin Li # with the native linker. However, as the warning in the GNU ld 4658*a376eb32SXin Li # block says, versions before 2.19.5* couldn't really create working 4659*a376eb32SXin Li # shared libraries, regardless of the interface used. 4660*a376eb32SXin Li case `$LD -v 2>&1` in 4661*a376eb32SXin Li *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 4662*a376eb32SXin Li *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 4663*a376eb32SXin Li *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 4664*a376eb32SXin Li *) 4665*a376eb32SXin Li lt_use_gnu_ld_interface=yes 4666*a376eb32SXin Li ;; 4667*a376eb32SXin Li esac 4668*a376eb32SXin Li ;; 4669*a376eb32SXin Li *) 4670*a376eb32SXin Li lt_use_gnu_ld_interface=yes 4671*a376eb32SXin Li ;; 4672*a376eb32SXin Li esac 4673*a376eb32SXin Li fi 4674*a376eb32SXin Li 4675*a376eb32SXin Li if test "$lt_use_gnu_ld_interface" = yes; then 4676*a376eb32SXin Li # If archive_cmds runs LD, not CC, wlarc should be empty 4677*a376eb32SXin Li wlarc='${wl}' 4678*a376eb32SXin Li 4679*a376eb32SXin Li # Set some defaults for GNU ld with shared library support. These 4680*a376eb32SXin Li # are reset later if shared libraries are not supported. Putting them 4681*a376eb32SXin Li # here allows them to be overridden if necessary. 4682*a376eb32SXin Li runpath_var=LD_RUN_PATH 4683*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4684*a376eb32SXin Li _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4685*a376eb32SXin Li # ancient GNU ld didn't support --whole-archive et. al. 4686*a376eb32SXin Li if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 4687*a376eb32SXin Li _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 4688*a376eb32SXin Li else 4689*a376eb32SXin Li _LT_TAGVAR(whole_archive_flag_spec, $1)= 4690*a376eb32SXin Li fi 4691*a376eb32SXin Li supports_anon_versioning=no 4692*a376eb32SXin Li case `$LD -v 2>&1` in 4693*a376eb32SXin Li *GNU\ gold*) supports_anon_versioning=yes ;; 4694*a376eb32SXin Li *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 4695*a376eb32SXin Li *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 4696*a376eb32SXin Li *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 4697*a376eb32SXin Li *\ 2.11.*) ;; # other 2.11 versions 4698*a376eb32SXin Li *) supports_anon_versioning=yes ;; 4699*a376eb32SXin Li esac 4700*a376eb32SXin Li 4701*a376eb32SXin Li # See if GNU ld supports shared libraries. 4702*a376eb32SXin Li case $host_os in 4703*a376eb32SXin Li aix[[3-9]]*) 4704*a376eb32SXin Li # On AIX/PPC, the GNU linker is very broken 4705*a376eb32SXin Li if test "$host_cpu" != ia64; then 4706*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 4707*a376eb32SXin Li cat <<_LT_EOF 1>&2 4708*a376eb32SXin Li 4709*a376eb32SXin Li*** Warning: the GNU linker, at least up to release 2.19, is reported 4710*a376eb32SXin Li*** to be unable to reliably create shared libraries on AIX. 4711*a376eb32SXin Li*** Therefore, libtool is disabling shared libraries support. If you 4712*a376eb32SXin Li*** really care for shared libraries, you may want to install binutils 4713*a376eb32SXin Li*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 4714*a376eb32SXin Li*** You will then need to restart the configuration process. 4715*a376eb32SXin Li 4716*a376eb32SXin Li_LT_EOF 4717*a376eb32SXin Li fi 4718*a376eb32SXin Li ;; 4719*a376eb32SXin Li 4720*a376eb32SXin Li amigaos*) 4721*a376eb32SXin Li case $host_cpu in 4722*a376eb32SXin Li powerpc) 4723*a376eb32SXin Li # see comment about AmigaOS4 .so support 4724*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4725*a376eb32SXin Li _LT_TAGVAR(archive_expsym_cmds, $1)='' 4726*a376eb32SXin Li ;; 4727*a376eb32SXin Li m68k) 4728*a376eb32SXin Li _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)' 4729*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4730*a376eb32SXin Li _LT_TAGVAR(hardcode_minus_L, $1)=yes 4731*a376eb32SXin Li ;; 4732*a376eb32SXin Li esac 4733*a376eb32SXin Li ;; 4734*a376eb32SXin Li 4735*a376eb32SXin Li beos*) 4736*a376eb32SXin Li if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4737*a376eb32SXin Li _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4738*a376eb32SXin Li # Joseph Beckenbach <[email protected]> says some releases of gcc 4739*a376eb32SXin Li # support --undefined. This deserves some investigation. FIXME 4740*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4741*a376eb32SXin Li else 4742*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 4743*a376eb32SXin Li fi 4744*a376eb32SXin Li ;; 4745*a376eb32SXin Li 4746*a376eb32SXin Li cygwin* | mingw* | pw32* | cegcc*) 4747*a376eb32SXin Li # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 4748*a376eb32SXin Li # as there is no search path for DLLs. 4749*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4750*a376eb32SXin Li _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 4751*a376eb32SXin Li _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4752*a376eb32SXin Li _LT_TAGVAR(always_export_symbols, $1)=no 4753*a376eb32SXin Li _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4754*a376eb32SXin Li _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' 4755*a376eb32SXin Li _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4756*a376eb32SXin Li 4757*a376eb32SXin Li if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 4758*a376eb32SXin Li _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' 4759*a376eb32SXin Li # If the export-symbols file already is a .def file (1st line 4760*a376eb32SXin Li # is EXPORTS), use it as is; otherwise, prepend... 4761*a376eb32SXin Li _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 4762*a376eb32SXin Li cp $export_symbols $output_objdir/$soname.def; 4763*a376eb32SXin Li else 4764*a376eb32SXin Li echo EXPORTS > $output_objdir/$soname.def; 4765*a376eb32SXin Li cat $export_symbols >> $output_objdir/$soname.def; 4766*a376eb32SXin Li fi~ 4767*a376eb32SXin Li $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 4768*a376eb32SXin Li else 4769*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 4770*a376eb32SXin Li fi 4771*a376eb32SXin Li ;; 4772*a376eb32SXin Li 4773*a376eb32SXin Li haiku*) 4774*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4775*a376eb32SXin Li _LT_TAGVAR(link_all_deplibs, $1)=yes 4776*a376eb32SXin Li ;; 4777*a376eb32SXin Li 4778*a376eb32SXin Li interix[[3-9]]*) 4779*a376eb32SXin Li _LT_TAGVAR(hardcode_direct, $1)=no 4780*a376eb32SXin Li _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4781*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4782*a376eb32SXin Li _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4783*a376eb32SXin Li # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 4784*a376eb32SXin Li # Instead, shared libraries are loaded at an image base (0x10000000 by 4785*a376eb32SXin Li # default) and relocated if they conflict, which is a slow very memory 4786*a376eb32SXin Li # consuming and fragmenting process. To avoid this, we pick a random, 4787*a376eb32SXin Li # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 4788*a376eb32SXin Li # time. Moving up from 0x10000000 also allows more sbrk(2) space. 4789*a376eb32SXin Li _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' 4790*a376eb32SXin Li _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' 4791*a376eb32SXin Li ;; 4792*a376eb32SXin Li 4793*a376eb32SXin Li gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 4794*a376eb32SXin Li tmp_diet=no 4795*a376eb32SXin Li if test "$host_os" = linux-dietlibc; then 4796*a376eb32SXin Li case $cc_basename in 4797*a376eb32SXin Li diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 4798*a376eb32SXin Li esac 4799*a376eb32SXin Li fi 4800*a376eb32SXin Li if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 4801*a376eb32SXin Li && test "$tmp_diet" = no 4802*a376eb32SXin Li then 4803*a376eb32SXin Li tmp_addflag=' $pic_flag' 4804*a376eb32SXin Li tmp_sharedflag='-shared' 4805*a376eb32SXin Li case $cc_basename,$host_cpu in 4806*a376eb32SXin Li pgcc*) # Portland Group C compiler 4807*a376eb32SXin Li _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' 4808*a376eb32SXin Li tmp_addflag=' $pic_flag' 4809*a376eb32SXin Li ;; 4810*a376eb32SXin Li pgf77* | pgf90* | pgf95* | pgfortran*) 4811*a376eb32SXin Li # Portland Group f77 and f90 compilers 4812*a376eb32SXin Li _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' 4813*a376eb32SXin Li tmp_addflag=' $pic_flag -Mnomain' ;; 4814*a376eb32SXin Li ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 4815*a376eb32SXin Li tmp_addflag=' -i_dynamic' ;; 4816*a376eb32SXin Li efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 4817*a376eb32SXin Li tmp_addflag=' -i_dynamic -nofor_main' ;; 4818*a376eb32SXin Li ifc* | ifort*) # Intel Fortran compiler 4819*a376eb32SXin Li tmp_addflag=' -nofor_main' ;; 4820*a376eb32SXin Li lf95*) # Lahey Fortran 8.1 4821*a376eb32SXin Li _LT_TAGVAR(whole_archive_flag_spec, $1)= 4822*a376eb32SXin Li tmp_sharedflag='--shared' ;; 4823*a376eb32SXin Li xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 4824*a376eb32SXin Li tmp_sharedflag='-qmkshrobj' 4825*a376eb32SXin Li tmp_addflag= ;; 4826*a376eb32SXin Li nvcc*) # Cuda Compiler Driver 2.2 4827*a376eb32SXin Li _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' 4828*a376eb32SXin Li _LT_TAGVAR(compiler_needs_object, $1)=yes 4829*a376eb32SXin Li ;; 4830*a376eb32SXin Li esac 4831*a376eb32SXin Li case `$CC -V 2>&1 | sed 5q` in 4832*a376eb32SXin Li *Sun\ C*) # Sun C 5.9 4833*a376eb32SXin Li _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' 4834*a376eb32SXin Li _LT_TAGVAR(compiler_needs_object, $1)=yes 4835*a376eb32SXin Li tmp_sharedflag='-G' ;; 4836*a376eb32SXin Li *Sun\ F*) # Sun Fortran 8.3 4837*a376eb32SXin Li tmp_sharedflag='-G' ;; 4838*a376eb32SXin Li esac 4839*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4840*a376eb32SXin Li 4841*a376eb32SXin Li if test "x$supports_anon_versioning" = xyes; then 4842*a376eb32SXin Li _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4843*a376eb32SXin Li cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4844*a376eb32SXin Li echo "local: *; };" >> $output_objdir/$libname.ver~ 4845*a376eb32SXin Li $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 4846*a376eb32SXin Li fi 4847*a376eb32SXin Li 4848*a376eb32SXin Li case $cc_basename in 4849*a376eb32SXin Li xlf* | bgf* | bgxlf* | mpixlf*) 4850*a376eb32SXin Li # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 4851*a376eb32SXin Li _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 4852*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4853*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 4854*a376eb32SXin Li if test "x$supports_anon_versioning" = xyes; then 4855*a376eb32SXin Li _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4856*a376eb32SXin Li cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4857*a376eb32SXin Li echo "local: *; };" >> $output_objdir/$libname.ver~ 4858*a376eb32SXin Li $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 4859*a376eb32SXin Li fi 4860*a376eb32SXin Li ;; 4861*a376eb32SXin Li esac 4862*a376eb32SXin Li else 4863*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 4864*a376eb32SXin Li fi 4865*a376eb32SXin Li ;; 4866*a376eb32SXin Li 4867*a376eb32SXin Li netbsd* | netbsdelf*-gnu) 4868*a376eb32SXin Li if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4869*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 4870*a376eb32SXin Li wlarc= 4871*a376eb32SXin Li else 4872*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4873*a376eb32SXin Li _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' 4874*a376eb32SXin Li fi 4875*a376eb32SXin Li ;; 4876*a376eb32SXin Li 4877*a376eb32SXin Li solaris*) 4878*a376eb32SXin Li if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 4879*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 4880*a376eb32SXin Li cat <<_LT_EOF 1>&2 4881*a376eb32SXin Li 4882*a376eb32SXin Li*** Warning: The releases 2.8.* of the GNU linker cannot reliably 4883*a376eb32SXin Li*** create shared libraries on Solaris systems. Therefore, libtool 4884*a376eb32SXin Li*** is disabling shared libraries support. We urge you to upgrade GNU 4885*a376eb32SXin Li*** binutils to release 2.9.1 or newer. Another option is to modify 4886*a376eb32SXin Li*** your PATH or compiler configuration so that the native linker is 4887*a376eb32SXin Li*** used, and then restart. 4888*a376eb32SXin Li 4889*a376eb32SXin Li_LT_EOF 4890*a376eb32SXin Li elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4891*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4892*a376eb32SXin Li _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' 4893*a376eb32SXin Li else 4894*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 4895*a376eb32SXin Li fi 4896*a376eb32SXin Li ;; 4897*a376eb32SXin Li 4898*a376eb32SXin Li sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 4899*a376eb32SXin Li case `$LD -v 2>&1` in 4900*a376eb32SXin Li *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 4901*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 4902*a376eb32SXin Li cat <<_LT_EOF 1>&2 4903*a376eb32SXin Li 4904*a376eb32SXin Li*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 4905*a376eb32SXin Li*** reliably create shared libraries on SCO systems. Therefore, libtool 4906*a376eb32SXin Li*** is disabling shared libraries support. We urge you to upgrade GNU 4907*a376eb32SXin Li*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 4908*a376eb32SXin Li*** your PATH or compiler configuration so that the native linker is 4909*a376eb32SXin Li*** used, and then restart. 4910*a376eb32SXin Li 4911*a376eb32SXin Li_LT_EOF 4912*a376eb32SXin Li ;; 4913*a376eb32SXin Li *) 4914*a376eb32SXin Li # For security reasons, it is highly recommended that you always 4915*a376eb32SXin Li # use absolute paths for naming shared libraries, and exclude the 4916*a376eb32SXin Li # DT_RUNPATH tag from executables and libraries. But doing so 4917*a376eb32SXin Li # requires that you compile everything twice, which is a pain. 4918*a376eb32SXin Li if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4919*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4920*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4921*a376eb32SXin Li _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' 4922*a376eb32SXin Li else 4923*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 4924*a376eb32SXin Li fi 4925*a376eb32SXin Li ;; 4926*a376eb32SXin Li esac 4927*a376eb32SXin Li ;; 4928*a376eb32SXin Li 4929*a376eb32SXin Li sunos4*) 4930*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4931*a376eb32SXin Li wlarc= 4932*a376eb32SXin Li _LT_TAGVAR(hardcode_direct, $1)=yes 4933*a376eb32SXin Li _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4934*a376eb32SXin Li ;; 4935*a376eb32SXin Li 4936*a376eb32SXin Li *) 4937*a376eb32SXin Li if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4938*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4939*a376eb32SXin Li _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' 4940*a376eb32SXin Li else 4941*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 4942*a376eb32SXin Li fi 4943*a376eb32SXin Li ;; 4944*a376eb32SXin Li esac 4945*a376eb32SXin Li 4946*a376eb32SXin Li if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 4947*a376eb32SXin Li runpath_var= 4948*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4949*a376eb32SXin Li _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4950*a376eb32SXin Li _LT_TAGVAR(whole_archive_flag_spec, $1)= 4951*a376eb32SXin Li fi 4952*a376eb32SXin Li else 4953*a376eb32SXin Li # PORTME fill in a description of your system's linker (not GNU ld) 4954*a376eb32SXin Li case $host_os in 4955*a376eb32SXin Li aix3*) 4956*a376eb32SXin Li _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4957*a376eb32SXin Li _LT_TAGVAR(always_export_symbols, $1)=yes 4958*a376eb32SXin Li _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' 4959*a376eb32SXin Li # Note: this linker hardcodes the directories in LIBPATH if there 4960*a376eb32SXin Li # are no directories specified by -L. 4961*a376eb32SXin Li _LT_TAGVAR(hardcode_minus_L, $1)=yes 4962*a376eb32SXin Li if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 4963*a376eb32SXin Li # Neither direct hardcoding nor static linking is supported with a 4964*a376eb32SXin Li # broken collect2. 4965*a376eb32SXin Li _LT_TAGVAR(hardcode_direct, $1)=unsupported 4966*a376eb32SXin Li fi 4967*a376eb32SXin Li ;; 4968*a376eb32SXin Li 4969*a376eb32SXin Li aix[[4-9]]*) 4970*a376eb32SXin Li if test "$host_cpu" = ia64; then 4971*a376eb32SXin Li # On IA64, the linker does run time linking by default, so we don't 4972*a376eb32SXin Li # have to do anything special. 4973*a376eb32SXin Li aix_use_runtimelinking=no 4974*a376eb32SXin Li exp_sym_flag='-Bexport' 4975*a376eb32SXin Li no_entry_flag="" 4976*a376eb32SXin Li else 4977*a376eb32SXin Li # If we're using GNU nm, then we don't want the "-C" option. 4978*a376eb32SXin Li # -C means demangle to AIX nm, but means don't demangle with GNU nm 4979*a376eb32SXin Li # Also, AIX nm treats weak defined symbols like other global 4980*a376eb32SXin Li # defined symbols, whereas GNU nm marks them as "W". 4981*a376eb32SXin Li if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4982*a376eb32SXin Li _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 4983*a376eb32SXin Li else 4984*a376eb32SXin Li _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 4985*a376eb32SXin Li fi 4986*a376eb32SXin Li aix_use_runtimelinking=no 4987*a376eb32SXin Li 4988*a376eb32SXin Li # Test if we are trying to use run time linking or normal 4989*a376eb32SXin Li # AIX style linking. If -brtl is somewhere in LDFLAGS, we 4990*a376eb32SXin Li # need to do runtime linking. 4991*a376eb32SXin Li case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 4992*a376eb32SXin Li for ld_flag in $LDFLAGS; do 4993*a376eb32SXin Li if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 4994*a376eb32SXin Li aix_use_runtimelinking=yes 4995*a376eb32SXin Li break 4996*a376eb32SXin Li fi 4997*a376eb32SXin Li done 4998*a376eb32SXin Li ;; 4999*a376eb32SXin Li esac 5000*a376eb32SXin Li 5001*a376eb32SXin Li exp_sym_flag='-bexport' 5002*a376eb32SXin Li no_entry_flag='-bnoentry' 5003*a376eb32SXin Li fi 5004*a376eb32SXin Li 5005*a376eb32SXin Li # When large executables or shared objects are built, AIX ld can 5006*a376eb32SXin Li # have problems creating the table of contents. If linking a library 5007*a376eb32SXin Li # or program results in "error TOC overflow" add -mminimal-toc to 5008*a376eb32SXin Li # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5009*a376eb32SXin Li # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5010*a376eb32SXin Li 5011*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='' 5012*a376eb32SXin Li _LT_TAGVAR(hardcode_direct, $1)=yes 5013*a376eb32SXin Li _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5014*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5015*a376eb32SXin Li _LT_TAGVAR(link_all_deplibs, $1)=yes 5016*a376eb32SXin Li _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 5017*a376eb32SXin Li 5018*a376eb32SXin Li if test "$GCC" = yes; then 5019*a376eb32SXin Li case $host_os in aix4.[[012]]|aix4.[[012]].*) 5020*a376eb32SXin Li # We only want to do this on AIX 4.2 and lower, the check 5021*a376eb32SXin Li # below for broken collect2 doesn't work under 4.3+ 5022*a376eb32SXin Li collect2name=`${CC} -print-prog-name=collect2` 5023*a376eb32SXin Li if test -f "$collect2name" && 5024*a376eb32SXin Li strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5025*a376eb32SXin Li then 5026*a376eb32SXin Li # We have reworked collect2 5027*a376eb32SXin Li : 5028*a376eb32SXin Li else 5029*a376eb32SXin Li # We have old collect2 5030*a376eb32SXin Li _LT_TAGVAR(hardcode_direct, $1)=unsupported 5031*a376eb32SXin Li # It fails to find uninstalled libraries when the uninstalled 5032*a376eb32SXin Li # path is not listed in the libpath. Setting hardcode_minus_L 5033*a376eb32SXin Li # to unsupported forces relinking 5034*a376eb32SXin Li _LT_TAGVAR(hardcode_minus_L, $1)=yes 5035*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5036*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_separator, $1)= 5037*a376eb32SXin Li fi 5038*a376eb32SXin Li ;; 5039*a376eb32SXin Li esac 5040*a376eb32SXin Li shared_flag='-shared' 5041*a376eb32SXin Li if test "$aix_use_runtimelinking" = yes; then 5042*a376eb32SXin Li shared_flag="$shared_flag "'${wl}-G' 5043*a376eb32SXin Li fi 5044*a376eb32SXin Li _LT_TAGVAR(link_all_deplibs, $1)=no 5045*a376eb32SXin Li else 5046*a376eb32SXin Li # not using gcc 5047*a376eb32SXin Li if test "$host_cpu" = ia64; then 5048*a376eb32SXin Li # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5049*a376eb32SXin Li # chokes on -Wl,-G. The following line is correct: 5050*a376eb32SXin Li shared_flag='-G' 5051*a376eb32SXin Li else 5052*a376eb32SXin Li if test "$aix_use_runtimelinking" = yes; then 5053*a376eb32SXin Li shared_flag='${wl}-G' 5054*a376eb32SXin Li else 5055*a376eb32SXin Li shared_flag='${wl}-bM:SRE' 5056*a376eb32SXin Li fi 5057*a376eb32SXin Li fi 5058*a376eb32SXin Li fi 5059*a376eb32SXin Li 5060*a376eb32SXin Li _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 5061*a376eb32SXin Li # It seems that -bexpall does not export symbols beginning with 5062*a376eb32SXin Li # underscore (_), so it is better to generate a list of symbols to export. 5063*a376eb32SXin Li _LT_TAGVAR(always_export_symbols, $1)=yes 5064*a376eb32SXin Li if test "$aix_use_runtimelinking" = yes; then 5065*a376eb32SXin Li # Warning - without using the other runtime loading flags (-brtl), 5066*a376eb32SXin Li # -berok will link without error, but may produce a broken library. 5067*a376eb32SXin Li _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5068*a376eb32SXin Li # Determine the default libpath from the value encoded in an 5069*a376eb32SXin Li # empty executable. 5070*a376eb32SXin Li _LT_SYS_MODULE_PATH_AIX([$1]) 5071*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5072*a376eb32SXin Li _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 5073*a376eb32SXin Li else 5074*a376eb32SXin Li if test "$host_cpu" = ia64; then 5075*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5076*a376eb32SXin Li _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5077*a376eb32SXin Li _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" 5078*a376eb32SXin Li else 5079*a376eb32SXin Li # Determine the default libpath from the value encoded in an 5080*a376eb32SXin Li # empty executable. 5081*a376eb32SXin Li _LT_SYS_MODULE_PATH_AIX([$1]) 5082*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5083*a376eb32SXin Li # Warning - without using the other run time loading flags, 5084*a376eb32SXin Li # -berok will link without error, but may produce a broken library. 5085*a376eb32SXin Li _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 5086*a376eb32SXin Li _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5087*a376eb32SXin Li if test "$with_gnu_ld" = yes; then 5088*a376eb32SXin Li # We only use this code for GNU lds that support --whole-archive. 5089*a376eb32SXin Li _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 5090*a376eb32SXin Li else 5091*a376eb32SXin Li # Exported symbols can be pulled into shared objects from archives 5092*a376eb32SXin Li _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5093*a376eb32SXin Li fi 5094*a376eb32SXin Li _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5095*a376eb32SXin Li # This is similar to how AIX traditionally builds its shared libraries. 5096*a376eb32SXin Li _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 5097*a376eb32SXin Li fi 5098*a376eb32SXin Li fi 5099*a376eb32SXin Li ;; 5100*a376eb32SXin Li 5101*a376eb32SXin Li amigaos*) 5102*a376eb32SXin Li case $host_cpu in 5103*a376eb32SXin Li powerpc) 5104*a376eb32SXin Li # see comment about AmigaOS4 .so support 5105*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5106*a376eb32SXin Li _LT_TAGVAR(archive_expsym_cmds, $1)='' 5107*a376eb32SXin Li ;; 5108*a376eb32SXin Li m68k) 5109*a376eb32SXin Li _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)' 5110*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5111*a376eb32SXin Li _LT_TAGVAR(hardcode_minus_L, $1)=yes 5112*a376eb32SXin Li ;; 5113*a376eb32SXin Li esac 5114*a376eb32SXin Li ;; 5115*a376eb32SXin Li 5116*a376eb32SXin Li bsdi[[45]]*) 5117*a376eb32SXin Li _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5118*a376eb32SXin Li ;; 5119*a376eb32SXin Li 5120*a376eb32SXin Li cygwin* | mingw* | pw32* | cegcc*) 5121*a376eb32SXin Li # When not using gcc, we currently assume that we are using 5122*a376eb32SXin Li # Microsoft Visual C++. 5123*a376eb32SXin Li # hardcode_libdir_flag_spec is actually meaningless, as there is 5124*a376eb32SXin Li # no search path for DLLs. 5125*a376eb32SXin Li case $cc_basename in 5126*a376eb32SXin Li cl*) 5127*a376eb32SXin Li # Native MSVC 5128*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5129*a376eb32SXin Li _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5130*a376eb32SXin Li _LT_TAGVAR(always_export_symbols, $1)=yes 5131*a376eb32SXin Li _LT_TAGVAR(file_list_spec, $1)='@' 5132*a376eb32SXin Li # Tell ltmain to make .lib files, not .a files. 5133*a376eb32SXin Li libext=lib 5134*a376eb32SXin Li # Tell ltmain to make .dll files, not .so files. 5135*a376eb32SXin Li shrext_cmds=".dll" 5136*a376eb32SXin Li # FIXME: Setting linknames here is a bad hack. 5137*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 5138*a376eb32SXin Li _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5139*a376eb32SXin Li sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 5140*a376eb32SXin Li else 5141*a376eb32SXin Li sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 5142*a376eb32SXin Li fi~ 5143*a376eb32SXin Li $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5144*a376eb32SXin Li linknames=' 5145*a376eb32SXin Li # The linker will not automatically build a static lib if we build a DLL. 5146*a376eb32SXin Li # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5147*a376eb32SXin Li _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5148*a376eb32SXin Li _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5149*a376eb32SXin Li _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' 5150*a376eb32SXin Li # Don't use ranlib 5151*a376eb32SXin Li _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5152*a376eb32SXin Li _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5153*a376eb32SXin Li lt_tool_outputfile="@TOOL_OUTPUT@"~ 5154*a376eb32SXin Li case $lt_outputfile in 5155*a376eb32SXin Li *.exe|*.EXE) ;; 5156*a376eb32SXin Li *) 5157*a376eb32SXin Li lt_outputfile="$lt_outputfile.exe" 5158*a376eb32SXin Li lt_tool_outputfile="$lt_tool_outputfile.exe" 5159*a376eb32SXin Li ;; 5160*a376eb32SXin Li esac~ 5161*a376eb32SXin Li if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 5162*a376eb32SXin Li $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5163*a376eb32SXin Li $RM "$lt_outputfile.manifest"; 5164*a376eb32SXin Li fi' 5165*a376eb32SXin Li ;; 5166*a376eb32SXin Li *) 5167*a376eb32SXin Li # Assume MSVC wrapper 5168*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5169*a376eb32SXin Li _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5170*a376eb32SXin Li # Tell ltmain to make .lib files, not .a files. 5171*a376eb32SXin Li libext=lib 5172*a376eb32SXin Li # Tell ltmain to make .dll files, not .so files. 5173*a376eb32SXin Li shrext_cmds=".dll" 5174*a376eb32SXin Li # FIXME: Setting linknames here is a bad hack. 5175*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5176*a376eb32SXin Li # The linker will automatically build a .lib file if we build a DLL. 5177*a376eb32SXin Li _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5178*a376eb32SXin Li # FIXME: Should let the user specify the lib program. 5179*a376eb32SXin Li _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5180*a376eb32SXin Li _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5181*a376eb32SXin Li ;; 5182*a376eb32SXin Li esac 5183*a376eb32SXin Li ;; 5184*a376eb32SXin Li 5185*a376eb32SXin Li darwin* | rhapsody*) 5186*a376eb32SXin Li _LT_DARWIN_LINKER_FEATURES($1) 5187*a376eb32SXin Li ;; 5188*a376eb32SXin Li 5189*a376eb32SXin Li dgux*) 5190*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5191*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5192*a376eb32SXin Li _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5193*a376eb32SXin Li ;; 5194*a376eb32SXin Li 5195*a376eb32SXin Li # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5196*a376eb32SXin Li # support. Future versions do this automatically, but an explicit c++rt0.o 5197*a376eb32SXin Li # does not break anything, and helps significantly (at the cost of a little 5198*a376eb32SXin Li # extra space). 5199*a376eb32SXin Li freebsd2.2*) 5200*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5201*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5202*a376eb32SXin Li _LT_TAGVAR(hardcode_direct, $1)=yes 5203*a376eb32SXin Li _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5204*a376eb32SXin Li ;; 5205*a376eb32SXin Li 5206*a376eb32SXin Li # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5207*a376eb32SXin Li freebsd2.*) 5208*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5209*a376eb32SXin Li _LT_TAGVAR(hardcode_direct, $1)=yes 5210*a376eb32SXin Li _LT_TAGVAR(hardcode_minus_L, $1)=yes 5211*a376eb32SXin Li _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5212*a376eb32SXin Li ;; 5213*a376eb32SXin Li 5214*a376eb32SXin Li # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5215*a376eb32SXin Li freebsd* | dragonfly*) 5216*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5217*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5218*a376eb32SXin Li _LT_TAGVAR(hardcode_direct, $1)=yes 5219*a376eb32SXin Li _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5220*a376eb32SXin Li ;; 5221*a376eb32SXin Li 5222*a376eb32SXin Li hpux9*) 5223*a376eb32SXin Li if test "$GCC" = yes; then 5224*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 5225*a376eb32SXin Li else 5226*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 5227*a376eb32SXin Li fi 5228*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5229*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5230*a376eb32SXin Li _LT_TAGVAR(hardcode_direct, $1)=yes 5231*a376eb32SXin Li 5232*a376eb32SXin Li # hardcode_minus_L: Not really in the search PATH, 5233*a376eb32SXin Li # but as the default location of the library. 5234*a376eb32SXin Li _LT_TAGVAR(hardcode_minus_L, $1)=yes 5235*a376eb32SXin Li _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5236*a376eb32SXin Li ;; 5237*a376eb32SXin Li 5238*a376eb32SXin Li hpux10*) 5239*a376eb32SXin Li if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5240*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5241*a376eb32SXin Li else 5242*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5243*a376eb32SXin Li fi 5244*a376eb32SXin Li if test "$with_gnu_ld" = no; then 5245*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5246*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5247*a376eb32SXin Li _LT_TAGVAR(hardcode_direct, $1)=yes 5248*a376eb32SXin Li _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5249*a376eb32SXin Li _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5250*a376eb32SXin Li # hardcode_minus_L: Not really in the search PATH, 5251*a376eb32SXin Li # but as the default location of the library. 5252*a376eb32SXin Li _LT_TAGVAR(hardcode_minus_L, $1)=yes 5253*a376eb32SXin Li fi 5254*a376eb32SXin Li ;; 5255*a376eb32SXin Li 5256*a376eb32SXin Li hpux11*) 5257*a376eb32SXin Li if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5258*a376eb32SXin Li case $host_cpu in 5259*a376eb32SXin Li hppa*64*) 5260*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5261*a376eb32SXin Li ;; 5262*a376eb32SXin Li ia64*) 5263*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5264*a376eb32SXin Li ;; 5265*a376eb32SXin Li *) 5266*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5267*a376eb32SXin Li ;; 5268*a376eb32SXin Li esac 5269*a376eb32SXin Li else 5270*a376eb32SXin Li case $host_cpu in 5271*a376eb32SXin Li hppa*64*) 5272*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5273*a376eb32SXin Li ;; 5274*a376eb32SXin Li ia64*) 5275*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5276*a376eb32SXin Li ;; 5277*a376eb32SXin Li *) 5278*a376eb32SXin Li m4_if($1, [], [ 5279*a376eb32SXin Li # Older versions of the 11.00 compiler do not understand -b yet 5280*a376eb32SXin Li # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5281*a376eb32SXin Li _LT_LINKER_OPTION([if $CC understands -b], 5282*a376eb32SXin Li _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5283*a376eb32SXin Li [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5284*a376eb32SXin Li [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5285*a376eb32SXin Li [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5286*a376eb32SXin Li ;; 5287*a376eb32SXin Li esac 5288*a376eb32SXin Li fi 5289*a376eb32SXin Li if test "$with_gnu_ld" = no; then 5290*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5291*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5292*a376eb32SXin Li 5293*a376eb32SXin Li case $host_cpu in 5294*a376eb32SXin Li hppa*64*|ia64*) 5295*a376eb32SXin Li _LT_TAGVAR(hardcode_direct, $1)=no 5296*a376eb32SXin Li _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5297*a376eb32SXin Li ;; 5298*a376eb32SXin Li *) 5299*a376eb32SXin Li _LT_TAGVAR(hardcode_direct, $1)=yes 5300*a376eb32SXin Li _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5301*a376eb32SXin Li _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5302*a376eb32SXin Li 5303*a376eb32SXin Li # hardcode_minus_L: Not really in the search PATH, 5304*a376eb32SXin Li # but as the default location of the library. 5305*a376eb32SXin Li _LT_TAGVAR(hardcode_minus_L, $1)=yes 5306*a376eb32SXin Li ;; 5307*a376eb32SXin Li esac 5308*a376eb32SXin Li fi 5309*a376eb32SXin Li ;; 5310*a376eb32SXin Li 5311*a376eb32SXin Li irix5* | irix6* | nonstopux*) 5312*a376eb32SXin Li if test "$GCC" = yes; then 5313*a376eb32SXin Li _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' 5314*a376eb32SXin Li # Try to use the -exported_symbol ld option, if it does not 5315*a376eb32SXin Li # work, assume that -exports_file does not work either and 5316*a376eb32SXin Li # implicitly export all symbols. 5317*a376eb32SXin Li # This should be the same for all languages, so no per-tag cache variable. 5318*a376eb32SXin Li AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5319*a376eb32SXin Li [lt_cv_irix_exported_symbol], 5320*a376eb32SXin Li [save_LDFLAGS="$LDFLAGS" 5321*a376eb32SXin Li LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 5322*a376eb32SXin Li AC_LINK_IFELSE( 5323*a376eb32SXin Li [AC_LANG_SOURCE( 5324*a376eb32SXin Li [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5325*a376eb32SXin Li [C++], [[int foo (void) { return 0; }]], 5326*a376eb32SXin Li [Fortran 77], [[ 5327*a376eb32SXin Li subroutine foo 5328*a376eb32SXin Li end]], 5329*a376eb32SXin Li [Fortran], [[ 5330*a376eb32SXin Li subroutine foo 5331*a376eb32SXin Li end]])])], 5332*a376eb32SXin Li [lt_cv_irix_exported_symbol=yes], 5333*a376eb32SXin Li [lt_cv_irix_exported_symbol=no]) 5334*a376eb32SXin Li LDFLAGS="$save_LDFLAGS"]) 5335*a376eb32SXin Li if test "$lt_cv_irix_exported_symbol" = yes; then 5336*a376eb32SXin Li _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' 5337*a376eb32SXin Li fi 5338*a376eb32SXin Li else 5339*a376eb32SXin Li _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' 5340*a376eb32SXin Li _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' 5341*a376eb32SXin Li fi 5342*a376eb32SXin Li _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5343*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5344*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5345*a376eb32SXin Li _LT_TAGVAR(inherit_rpath, $1)=yes 5346*a376eb32SXin Li _LT_TAGVAR(link_all_deplibs, $1)=yes 5347*a376eb32SXin Li ;; 5348*a376eb32SXin Li 5349*a376eb32SXin Li netbsd* | netbsdelf*-gnu) 5350*a376eb32SXin Li if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5351*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5352*a376eb32SXin Li else 5353*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5354*a376eb32SXin Li fi 5355*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5356*a376eb32SXin Li _LT_TAGVAR(hardcode_direct, $1)=yes 5357*a376eb32SXin Li _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5358*a376eb32SXin Li ;; 5359*a376eb32SXin Li 5360*a376eb32SXin Li newsos6) 5361*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5362*a376eb32SXin Li _LT_TAGVAR(hardcode_direct, $1)=yes 5363*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5364*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5365*a376eb32SXin Li _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5366*a376eb32SXin Li ;; 5367*a376eb32SXin Li 5368*a376eb32SXin Li *nto* | *qnx*) 5369*a376eb32SXin Li ;; 5370*a376eb32SXin Li 5371*a376eb32SXin Li openbsd*) 5372*a376eb32SXin Li if test -f /usr/libexec/ld.so; then 5373*a376eb32SXin Li _LT_TAGVAR(hardcode_direct, $1)=yes 5374*a376eb32SXin Li _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5375*a376eb32SXin Li _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5376*a376eb32SXin Li if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 5377*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5378*a376eb32SXin Li _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 5379*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5380*a376eb32SXin Li _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5381*a376eb32SXin Li else 5382*a376eb32SXin Li case $host_os in 5383*a376eb32SXin Li openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 5384*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5385*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5386*a376eb32SXin Li ;; 5387*a376eb32SXin Li *) 5388*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5389*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5390*a376eb32SXin Li ;; 5391*a376eb32SXin Li esac 5392*a376eb32SXin Li fi 5393*a376eb32SXin Li else 5394*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 5395*a376eb32SXin Li fi 5396*a376eb32SXin Li ;; 5397*a376eb32SXin Li 5398*a376eb32SXin Li os2*) 5399*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5400*a376eb32SXin Li _LT_TAGVAR(hardcode_minus_L, $1)=yes 5401*a376eb32SXin Li _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5402*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' 5403*a376eb32SXin Li _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 5404*a376eb32SXin Li ;; 5405*a376eb32SXin Li 5406*a376eb32SXin Li osf3*) 5407*a376eb32SXin Li if test "$GCC" = yes; then 5408*a376eb32SXin Li _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5409*a376eb32SXin Li _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' 5410*a376eb32SXin Li else 5411*a376eb32SXin Li _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5412*a376eb32SXin Li _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' 5413*a376eb32SXin Li fi 5414*a376eb32SXin Li _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5415*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5416*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5417*a376eb32SXin Li ;; 5418*a376eb32SXin Li 5419*a376eb32SXin Li osf4* | osf5*) # as osf3* with the addition of -msym flag 5420*a376eb32SXin Li if test "$GCC" = yes; then 5421*a376eb32SXin Li _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5422*a376eb32SXin Li _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' 5423*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5424*a376eb32SXin Li else 5425*a376eb32SXin Li _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5426*a376eb32SXin Li _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' 5427*a376eb32SXin Li _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~ 5428*a376eb32SXin Li $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' 5429*a376eb32SXin Li 5430*a376eb32SXin Li # Both c and cxx compiler support -rpath directly 5431*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5432*a376eb32SXin Li fi 5433*a376eb32SXin Li _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5434*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5435*a376eb32SXin Li ;; 5436*a376eb32SXin Li 5437*a376eb32SXin Li solaris*) 5438*a376eb32SXin Li _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5439*a376eb32SXin Li if test "$GCC" = yes; then 5440*a376eb32SXin Li wlarc='${wl}' 5441*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5442*a376eb32SXin Li _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5443*a376eb32SXin Li $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' 5444*a376eb32SXin Li else 5445*a376eb32SXin Li case `$CC -V 2>&1` in 5446*a376eb32SXin Li *"Compilers 5.0"*) 5447*a376eb32SXin Li wlarc='' 5448*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 5449*a376eb32SXin Li _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5450*a376eb32SXin Li $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5451*a376eb32SXin Li ;; 5452*a376eb32SXin Li *) 5453*a376eb32SXin Li wlarc='${wl}' 5454*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 5455*a376eb32SXin Li _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5456*a376eb32SXin Li $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5457*a376eb32SXin Li ;; 5458*a376eb32SXin Li esac 5459*a376eb32SXin Li fi 5460*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5461*a376eb32SXin Li _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5462*a376eb32SXin Li case $host_os in 5463*a376eb32SXin Li solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5464*a376eb32SXin Li *) 5465*a376eb32SXin Li # The compiler driver will combine and reorder linker options, 5466*a376eb32SXin Li # but understands `-z linker_flag'. GCC discards it without `$wl', 5467*a376eb32SXin Li # but is careful enough not to reorder. 5468*a376eb32SXin Li # Supported since Solaris 2.6 (maybe 2.5.1?) 5469*a376eb32SXin Li if test "$GCC" = yes; then 5470*a376eb32SXin Li _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 5471*a376eb32SXin Li else 5472*a376eb32SXin Li _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5473*a376eb32SXin Li fi 5474*a376eb32SXin Li ;; 5475*a376eb32SXin Li esac 5476*a376eb32SXin Li _LT_TAGVAR(link_all_deplibs, $1)=yes 5477*a376eb32SXin Li ;; 5478*a376eb32SXin Li 5479*a376eb32SXin Li sunos4*) 5480*a376eb32SXin Li if test "x$host_vendor" = xsequent; then 5481*a376eb32SXin Li # Use $CC to link under sequent, because it throws in some extra .o 5482*a376eb32SXin Li # files that make .init and .fini sections work. 5483*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5484*a376eb32SXin Li else 5485*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5486*a376eb32SXin Li fi 5487*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5488*a376eb32SXin Li _LT_TAGVAR(hardcode_direct, $1)=yes 5489*a376eb32SXin Li _LT_TAGVAR(hardcode_minus_L, $1)=yes 5490*a376eb32SXin Li _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5491*a376eb32SXin Li ;; 5492*a376eb32SXin Li 5493*a376eb32SXin Li sysv4) 5494*a376eb32SXin Li case $host_vendor in 5495*a376eb32SXin Li sni) 5496*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5497*a376eb32SXin Li _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5498*a376eb32SXin Li ;; 5499*a376eb32SXin Li siemens) 5500*a376eb32SXin Li ## LD is ld it makes a PLAMLIB 5501*a376eb32SXin Li ## CC just makes a GrossModule. 5502*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5503*a376eb32SXin Li _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5504*a376eb32SXin Li _LT_TAGVAR(hardcode_direct, $1)=no 5505*a376eb32SXin Li ;; 5506*a376eb32SXin Li motorola) 5507*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5508*a376eb32SXin Li _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5509*a376eb32SXin Li ;; 5510*a376eb32SXin Li esac 5511*a376eb32SXin Li runpath_var='LD_RUN_PATH' 5512*a376eb32SXin Li _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5513*a376eb32SXin Li ;; 5514*a376eb32SXin Li 5515*a376eb32SXin Li sysv4.3*) 5516*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5517*a376eb32SXin Li _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5518*a376eb32SXin Li _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 5519*a376eb32SXin Li ;; 5520*a376eb32SXin Li 5521*a376eb32SXin Li sysv4*MP*) 5522*a376eb32SXin Li if test -d /usr/nec; then 5523*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5524*a376eb32SXin Li _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5525*a376eb32SXin Li runpath_var=LD_RUN_PATH 5526*a376eb32SXin Li hardcode_runpath_var=yes 5527*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=yes 5528*a376eb32SXin Li fi 5529*a376eb32SXin Li ;; 5530*a376eb32SXin Li 5531*a376eb32SXin Li sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 5532*a376eb32SXin Li _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5533*a376eb32SXin Li _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5534*a376eb32SXin Li _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5535*a376eb32SXin Li runpath_var='LD_RUN_PATH' 5536*a376eb32SXin Li 5537*a376eb32SXin Li if test "$GCC" = yes; then 5538*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5539*a376eb32SXin Li _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5540*a376eb32SXin Li else 5541*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5542*a376eb32SXin Li _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5543*a376eb32SXin Li fi 5544*a376eb32SXin Li ;; 5545*a376eb32SXin Li 5546*a376eb32SXin Li sysv5* | sco3.2v5* | sco5v6*) 5547*a376eb32SXin Li # Note: We can NOT use -z defs as we might desire, because we do not 5548*a376eb32SXin Li # link with -lc, and that would cause any symbols used from libc to 5549*a376eb32SXin Li # always be unresolved, which means just about no library would 5550*a376eb32SXin Li # ever link correctly. If we're not using GNU ld we use -z text 5551*a376eb32SXin Li # though, which does catch some bad symbols but isn't as heavy-handed 5552*a376eb32SXin Li # as -z defs. 5553*a376eb32SXin Li _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5554*a376eb32SXin Li _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 5555*a376eb32SXin Li _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5556*a376eb32SXin Li _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5557*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 5558*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5559*a376eb32SXin Li _LT_TAGVAR(link_all_deplibs, $1)=yes 5560*a376eb32SXin Li _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 5561*a376eb32SXin Li runpath_var='LD_RUN_PATH' 5562*a376eb32SXin Li 5563*a376eb32SXin Li if test "$GCC" = yes; then 5564*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5565*a376eb32SXin Li _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5566*a376eb32SXin Li else 5567*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5568*a376eb32SXin Li _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5569*a376eb32SXin Li fi 5570*a376eb32SXin Li ;; 5571*a376eb32SXin Li 5572*a376eb32SXin Li uts4*) 5573*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5574*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5575*a376eb32SXin Li _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5576*a376eb32SXin Li ;; 5577*a376eb32SXin Li 5578*a376eb32SXin Li *) 5579*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 5580*a376eb32SXin Li ;; 5581*a376eb32SXin Li esac 5582*a376eb32SXin Li 5583*a376eb32SXin Li if test x$host_vendor = xsni; then 5584*a376eb32SXin Li case $host in 5585*a376eb32SXin Li sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 5586*a376eb32SXin Li _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 5587*a376eb32SXin Li ;; 5588*a376eb32SXin Li esac 5589*a376eb32SXin Li fi 5590*a376eb32SXin Li fi 5591*a376eb32SXin Li]) 5592*a376eb32SXin LiAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 5593*a376eb32SXin Litest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 5594*a376eb32SXin Li 5595*a376eb32SXin Li_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 5596*a376eb32SXin Li 5597*a376eb32SXin Li_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 5598*a376eb32SXin Li_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 5599*a376eb32SXin Li_LT_DECL([], [extract_expsyms_cmds], [2], 5600*a376eb32SXin Li [The commands to extract the exported symbol list from a shared archive]) 5601*a376eb32SXin Li 5602*a376eb32SXin Li# 5603*a376eb32SXin Li# Do we need to explicitly link libc? 5604*a376eb32SXin Li# 5605*a376eb32SXin Licase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 5606*a376eb32SXin Lix|xyes) 5607*a376eb32SXin Li # Assume -lc should be added 5608*a376eb32SXin Li _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5609*a376eb32SXin Li 5610*a376eb32SXin Li if test "$enable_shared" = yes && test "$GCC" = yes; then 5611*a376eb32SXin Li case $_LT_TAGVAR(archive_cmds, $1) in 5612*a376eb32SXin Li *'~'*) 5613*a376eb32SXin Li # FIXME: we may have to deal with multi-command sequences. 5614*a376eb32SXin Li ;; 5615*a376eb32SXin Li '$CC '*) 5616*a376eb32SXin Li # Test whether the compiler implicitly links with -lc since on some 5617*a376eb32SXin Li # systems, -lgcc has to come before -lc. If gcc already passes -lc 5618*a376eb32SXin Li # to ld, don't add -lc before -lgcc. 5619*a376eb32SXin Li AC_CACHE_CHECK([whether -lc should be explicitly linked in], 5620*a376eb32SXin Li [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 5621*a376eb32SXin Li [$RM conftest* 5622*a376eb32SXin Li echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5623*a376eb32SXin Li 5624*a376eb32SXin Li if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 5625*a376eb32SXin Li soname=conftest 5626*a376eb32SXin Li lib=conftest 5627*a376eb32SXin Li libobjs=conftest.$ac_objext 5628*a376eb32SXin Li deplibs= 5629*a376eb32SXin Li wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 5630*a376eb32SXin Li pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 5631*a376eb32SXin Li compiler_flags=-v 5632*a376eb32SXin Li linker_flags=-v 5633*a376eb32SXin Li verstring= 5634*a376eb32SXin Li output_objdir=. 5635*a376eb32SXin Li libname=conftest 5636*a376eb32SXin Li lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 5637*a376eb32SXin Li _LT_TAGVAR(allow_undefined_flag, $1)= 5638*a376eb32SXin Li if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 5639*a376eb32SXin Li then 5640*a376eb32SXin Li lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5641*a376eb32SXin Li else 5642*a376eb32SXin Li lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5643*a376eb32SXin Li fi 5644*a376eb32SXin Li _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 5645*a376eb32SXin Li else 5646*a376eb32SXin Li cat conftest.err 1>&5 5647*a376eb32SXin Li fi 5648*a376eb32SXin Li $RM conftest* 5649*a376eb32SXin Li ]) 5650*a376eb32SXin Li _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 5651*a376eb32SXin Li ;; 5652*a376eb32SXin Li esac 5653*a376eb32SXin Li fi 5654*a376eb32SXin Li ;; 5655*a376eb32SXin Liesac 5656*a376eb32SXin Li 5657*a376eb32SXin Li_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 5658*a376eb32SXin Li [Whether or not to add -lc for building shared libraries]) 5659*a376eb32SXin Li_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 5660*a376eb32SXin Li [enable_shared_with_static_runtimes], [0], 5661*a376eb32SXin Li [Whether or not to disallow shared libs when runtime libs are static]) 5662*a376eb32SXin Li_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 5663*a376eb32SXin Li [Compiler flag to allow reflexive dlopens]) 5664*a376eb32SXin Li_LT_TAGDECL([], [whole_archive_flag_spec], [1], 5665*a376eb32SXin Li [Compiler flag to generate shared objects directly from archives]) 5666*a376eb32SXin Li_LT_TAGDECL([], [compiler_needs_object], [1], 5667*a376eb32SXin Li [Whether the compiler copes with passing no objects directly]) 5668*a376eb32SXin Li_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 5669*a376eb32SXin Li [Create an old-style archive from a shared archive]) 5670*a376eb32SXin Li_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 5671*a376eb32SXin Li [Create a temporary old-style archive to link instead of a shared archive]) 5672*a376eb32SXin Li_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 5673*a376eb32SXin Li_LT_TAGDECL([], [archive_expsym_cmds], [2]) 5674*a376eb32SXin Li_LT_TAGDECL([], [module_cmds], [2], 5675*a376eb32SXin Li [Commands used to build a loadable module if different from building 5676*a376eb32SXin Li a shared archive.]) 5677*a376eb32SXin Li_LT_TAGDECL([], [module_expsym_cmds], [2]) 5678*a376eb32SXin Li_LT_TAGDECL([], [with_gnu_ld], [1], 5679*a376eb32SXin Li [Whether we are building with GNU ld or not]) 5680*a376eb32SXin Li_LT_TAGDECL([], [allow_undefined_flag], [1], 5681*a376eb32SXin Li [Flag that allows shared libraries with undefined symbols to be built]) 5682*a376eb32SXin Li_LT_TAGDECL([], [no_undefined_flag], [1], 5683*a376eb32SXin Li [Flag that enforces no undefined symbols]) 5684*a376eb32SXin Li_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 5685*a376eb32SXin Li [Flag to hardcode $libdir into a binary during linking. 5686*a376eb32SXin Li This must work even if $libdir does not exist]) 5687*a376eb32SXin Li_LT_TAGDECL([], [hardcode_libdir_separator], [1], 5688*a376eb32SXin Li [Whether we need a single "-rpath" flag with a separated argument]) 5689*a376eb32SXin Li_LT_TAGDECL([], [hardcode_direct], [0], 5690*a376eb32SXin Li [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5691*a376eb32SXin Li DIR into the resulting binary]) 5692*a376eb32SXin Li_LT_TAGDECL([], [hardcode_direct_absolute], [0], 5693*a376eb32SXin Li [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5694*a376eb32SXin Li DIR into the resulting binary and the resulting library dependency is 5695*a376eb32SXin Li "absolute", i.e impossible to change by setting ${shlibpath_var} if the 5696*a376eb32SXin Li library is relocated]) 5697*a376eb32SXin Li_LT_TAGDECL([], [hardcode_minus_L], [0], 5698*a376eb32SXin Li [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 5699*a376eb32SXin Li into the resulting binary]) 5700*a376eb32SXin Li_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 5701*a376eb32SXin Li [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 5702*a376eb32SXin Li into the resulting binary]) 5703*a376eb32SXin Li_LT_TAGDECL([], [hardcode_automatic], [0], 5704*a376eb32SXin Li [Set to "yes" if building a shared library automatically hardcodes DIR 5705*a376eb32SXin Li into the library and all subsequent libraries and executables linked 5706*a376eb32SXin Li against it]) 5707*a376eb32SXin Li_LT_TAGDECL([], [inherit_rpath], [0], 5708*a376eb32SXin Li [Set to yes if linker adds runtime paths of dependent libraries 5709*a376eb32SXin Li to runtime path list]) 5710*a376eb32SXin Li_LT_TAGDECL([], [link_all_deplibs], [0], 5711*a376eb32SXin Li [Whether libtool must link a program against all its dependency libraries]) 5712*a376eb32SXin Li_LT_TAGDECL([], [always_export_symbols], [0], 5713*a376eb32SXin Li [Set to "yes" if exported symbols are required]) 5714*a376eb32SXin Li_LT_TAGDECL([], [export_symbols_cmds], [2], 5715*a376eb32SXin Li [The commands to list exported symbols]) 5716*a376eb32SXin Li_LT_TAGDECL([], [exclude_expsyms], [1], 5717*a376eb32SXin Li [Symbols that should not be listed in the preloaded symbols]) 5718*a376eb32SXin Li_LT_TAGDECL([], [include_expsyms], [1], 5719*a376eb32SXin Li [Symbols that must always be exported]) 5720*a376eb32SXin Li_LT_TAGDECL([], [prelink_cmds], [2], 5721*a376eb32SXin Li [Commands necessary for linking programs (against libraries) with templates]) 5722*a376eb32SXin Li_LT_TAGDECL([], [postlink_cmds], [2], 5723*a376eb32SXin Li [Commands necessary for finishing linking programs]) 5724*a376eb32SXin Li_LT_TAGDECL([], [file_list_spec], [1], 5725*a376eb32SXin Li [Specify filename containing input files]) 5726*a376eb32SXin Lidnl FIXME: Not yet implemented 5727*a376eb32SXin Lidnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 5728*a376eb32SXin Lidnl [Compiler flag to generate thread safe objects]) 5729*a376eb32SXin Li])# _LT_LINKER_SHLIBS 5730*a376eb32SXin Li 5731*a376eb32SXin Li 5732*a376eb32SXin Li# _LT_LANG_C_CONFIG([TAG]) 5733*a376eb32SXin Li# ------------------------ 5734*a376eb32SXin Li# Ensure that the configuration variables for a C compiler are suitably 5735*a376eb32SXin Li# defined. These variables are subsequently used by _LT_CONFIG to write 5736*a376eb32SXin Li# the compiler configuration to `libtool'. 5737*a376eb32SXin Lim4_defun([_LT_LANG_C_CONFIG], 5738*a376eb32SXin Li[m4_require([_LT_DECL_EGREP])dnl 5739*a376eb32SXin Lilt_save_CC="$CC" 5740*a376eb32SXin LiAC_LANG_PUSH(C) 5741*a376eb32SXin Li 5742*a376eb32SXin Li# Source file extension for C test sources. 5743*a376eb32SXin Liac_ext=c 5744*a376eb32SXin Li 5745*a376eb32SXin Li# Object file extension for compiled C test sources. 5746*a376eb32SXin Liobjext=o 5747*a376eb32SXin Li_LT_TAGVAR(objext, $1)=$objext 5748*a376eb32SXin Li 5749*a376eb32SXin Li# Code to be used in simple compile tests 5750*a376eb32SXin Lilt_simple_compile_test_code="int some_variable = 0;" 5751*a376eb32SXin Li 5752*a376eb32SXin Li# Code to be used in simple link tests 5753*a376eb32SXin Lilt_simple_link_test_code='int main(){return(0);}' 5754*a376eb32SXin Li 5755*a376eb32SXin Li_LT_TAG_COMPILER 5756*a376eb32SXin Li# Save the default compiler, since it gets overwritten when the other 5757*a376eb32SXin Li# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 5758*a376eb32SXin Licompiler_DEFAULT=$CC 5759*a376eb32SXin Li 5760*a376eb32SXin Li# save warnings/boilerplate of simple test code 5761*a376eb32SXin Li_LT_COMPILER_BOILERPLATE 5762*a376eb32SXin Li_LT_LINKER_BOILERPLATE 5763*a376eb32SXin Li 5764*a376eb32SXin Li## CAVEAT EMPTOR: 5765*a376eb32SXin Li## There is no encapsulation within the following macros, do not change 5766*a376eb32SXin Li## the running order or otherwise move them around unless you know exactly 5767*a376eb32SXin Li## what you are doing... 5768*a376eb32SXin Liif test -n "$compiler"; then 5769*a376eb32SXin Li _LT_COMPILER_NO_RTTI($1) 5770*a376eb32SXin Li _LT_COMPILER_PIC($1) 5771*a376eb32SXin Li _LT_COMPILER_C_O($1) 5772*a376eb32SXin Li _LT_COMPILER_FILE_LOCKS($1) 5773*a376eb32SXin Li _LT_LINKER_SHLIBS($1) 5774*a376eb32SXin Li _LT_SYS_DYNAMIC_LINKER($1) 5775*a376eb32SXin Li _LT_LINKER_HARDCODE_LIBPATH($1) 5776*a376eb32SXin Li LT_SYS_DLOPEN_SELF 5777*a376eb32SXin Li _LT_CMD_STRIPLIB 5778*a376eb32SXin Li 5779*a376eb32SXin Li # Report which library types will actually be built 5780*a376eb32SXin Li AC_MSG_CHECKING([if libtool supports shared libraries]) 5781*a376eb32SXin Li AC_MSG_RESULT([$can_build_shared]) 5782*a376eb32SXin Li 5783*a376eb32SXin Li AC_MSG_CHECKING([whether to build shared libraries]) 5784*a376eb32SXin Li test "$can_build_shared" = "no" && enable_shared=no 5785*a376eb32SXin Li 5786*a376eb32SXin Li # On AIX, shared libraries and static libraries use the same namespace, and 5787*a376eb32SXin Li # are all built from PIC. 5788*a376eb32SXin Li case $host_os in 5789*a376eb32SXin Li aix3*) 5790*a376eb32SXin Li test "$enable_shared" = yes && enable_static=no 5791*a376eb32SXin Li if test -n "$RANLIB"; then 5792*a376eb32SXin Li archive_cmds="$archive_cmds~\$RANLIB \$lib" 5793*a376eb32SXin Li postinstall_cmds='$RANLIB $lib' 5794*a376eb32SXin Li fi 5795*a376eb32SXin Li ;; 5796*a376eb32SXin Li 5797*a376eb32SXin Li aix[[4-9]]*) 5798*a376eb32SXin Li if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 5799*a376eb32SXin Li test "$enable_shared" = yes && enable_static=no 5800*a376eb32SXin Li fi 5801*a376eb32SXin Li ;; 5802*a376eb32SXin Li esac 5803*a376eb32SXin Li AC_MSG_RESULT([$enable_shared]) 5804*a376eb32SXin Li 5805*a376eb32SXin Li AC_MSG_CHECKING([whether to build static libraries]) 5806*a376eb32SXin Li # Make sure either enable_shared or enable_static is yes. 5807*a376eb32SXin Li test "$enable_shared" = yes || enable_static=yes 5808*a376eb32SXin Li AC_MSG_RESULT([$enable_static]) 5809*a376eb32SXin Li 5810*a376eb32SXin Li _LT_CONFIG($1) 5811*a376eb32SXin Lifi 5812*a376eb32SXin LiAC_LANG_POP 5813*a376eb32SXin LiCC="$lt_save_CC" 5814*a376eb32SXin Li])# _LT_LANG_C_CONFIG 5815*a376eb32SXin Li 5816*a376eb32SXin Li 5817*a376eb32SXin Li# _LT_LANG_CXX_CONFIG([TAG]) 5818*a376eb32SXin Li# -------------------------- 5819*a376eb32SXin Li# Ensure that the configuration variables for a C++ compiler are suitably 5820*a376eb32SXin Li# defined. These variables are subsequently used by _LT_CONFIG to write 5821*a376eb32SXin Li# the compiler configuration to `libtool'. 5822*a376eb32SXin Lim4_defun([_LT_LANG_CXX_CONFIG], 5823*a376eb32SXin Li[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5824*a376eb32SXin Lim4_require([_LT_DECL_EGREP])dnl 5825*a376eb32SXin Lim4_require([_LT_PATH_MANIFEST_TOOL])dnl 5826*a376eb32SXin Liif test -n "$CXX" && ( test "X$CXX" != "Xno" && 5827*a376eb32SXin Li ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 5828*a376eb32SXin Li (test "X$CXX" != "Xg++"))) ; then 5829*a376eb32SXin Li AC_PROG_CXXCPP 5830*a376eb32SXin Lielse 5831*a376eb32SXin Li _lt_caught_CXX_error=yes 5832*a376eb32SXin Lifi 5833*a376eb32SXin Li 5834*a376eb32SXin LiAC_LANG_PUSH(C++) 5835*a376eb32SXin Li_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5836*a376eb32SXin Li_LT_TAGVAR(allow_undefined_flag, $1)= 5837*a376eb32SXin Li_LT_TAGVAR(always_export_symbols, $1)=no 5838*a376eb32SXin Li_LT_TAGVAR(archive_expsym_cmds, $1)= 5839*a376eb32SXin Li_LT_TAGVAR(compiler_needs_object, $1)=no 5840*a376eb32SXin Li_LT_TAGVAR(export_dynamic_flag_spec, $1)= 5841*a376eb32SXin Li_LT_TAGVAR(hardcode_direct, $1)=no 5842*a376eb32SXin Li_LT_TAGVAR(hardcode_direct_absolute, $1)=no 5843*a376eb32SXin Li_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5844*a376eb32SXin Li_LT_TAGVAR(hardcode_libdir_separator, $1)= 5845*a376eb32SXin Li_LT_TAGVAR(hardcode_minus_L, $1)=no 5846*a376eb32SXin Li_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5847*a376eb32SXin Li_LT_TAGVAR(hardcode_automatic, $1)=no 5848*a376eb32SXin Li_LT_TAGVAR(inherit_rpath, $1)=no 5849*a376eb32SXin Li_LT_TAGVAR(module_cmds, $1)= 5850*a376eb32SXin Li_LT_TAGVAR(module_expsym_cmds, $1)= 5851*a376eb32SXin Li_LT_TAGVAR(link_all_deplibs, $1)=unknown 5852*a376eb32SXin Li_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 5853*a376eb32SXin Li_LT_TAGVAR(reload_flag, $1)=$reload_flag 5854*a376eb32SXin Li_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 5855*a376eb32SXin Li_LT_TAGVAR(no_undefined_flag, $1)= 5856*a376eb32SXin Li_LT_TAGVAR(whole_archive_flag_spec, $1)= 5857*a376eb32SXin Li_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5858*a376eb32SXin Li 5859*a376eb32SXin Li# Source file extension for C++ test sources. 5860*a376eb32SXin Liac_ext=cpp 5861*a376eb32SXin Li 5862*a376eb32SXin Li# Object file extension for compiled C++ test sources. 5863*a376eb32SXin Liobjext=o 5864*a376eb32SXin Li_LT_TAGVAR(objext, $1)=$objext 5865*a376eb32SXin Li 5866*a376eb32SXin Li# No sense in running all these tests if we already determined that 5867*a376eb32SXin Li# the CXX compiler isn't working. Some variables (like enable_shared) 5868*a376eb32SXin Li# are currently assumed to apply to all compilers on this platform, 5869*a376eb32SXin Li# and will be corrupted by setting them based on a non-working compiler. 5870*a376eb32SXin Liif test "$_lt_caught_CXX_error" != yes; then 5871*a376eb32SXin Li # Code to be used in simple compile tests 5872*a376eb32SXin Li lt_simple_compile_test_code="int some_variable = 0;" 5873*a376eb32SXin Li 5874*a376eb32SXin Li # Code to be used in simple link tests 5875*a376eb32SXin Li lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 5876*a376eb32SXin Li 5877*a376eb32SXin Li # ltmain only uses $CC for tagged configurations so make sure $CC is set. 5878*a376eb32SXin Li _LT_TAG_COMPILER 5879*a376eb32SXin Li 5880*a376eb32SXin Li # save warnings/boilerplate of simple test code 5881*a376eb32SXin Li _LT_COMPILER_BOILERPLATE 5882*a376eb32SXin Li _LT_LINKER_BOILERPLATE 5883*a376eb32SXin Li 5884*a376eb32SXin Li # Allow CC to be a program name with arguments. 5885*a376eb32SXin Li lt_save_CC=$CC 5886*a376eb32SXin Li lt_save_CFLAGS=$CFLAGS 5887*a376eb32SXin Li lt_save_LD=$LD 5888*a376eb32SXin Li lt_save_GCC=$GCC 5889*a376eb32SXin Li GCC=$GXX 5890*a376eb32SXin Li lt_save_with_gnu_ld=$with_gnu_ld 5891*a376eb32SXin Li lt_save_path_LD=$lt_cv_path_LD 5892*a376eb32SXin Li if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 5893*a376eb32SXin Li lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 5894*a376eb32SXin Li else 5895*a376eb32SXin Li $as_unset lt_cv_prog_gnu_ld 5896*a376eb32SXin Li fi 5897*a376eb32SXin Li if test -n "${lt_cv_path_LDCXX+set}"; then 5898*a376eb32SXin Li lt_cv_path_LD=$lt_cv_path_LDCXX 5899*a376eb32SXin Li else 5900*a376eb32SXin Li $as_unset lt_cv_path_LD 5901*a376eb32SXin Li fi 5902*a376eb32SXin Li test -z "${LDCXX+set}" || LD=$LDCXX 5903*a376eb32SXin Li CC=${CXX-"c++"} 5904*a376eb32SXin Li CFLAGS=$CXXFLAGS 5905*a376eb32SXin Li compiler=$CC 5906*a376eb32SXin Li _LT_TAGVAR(compiler, $1)=$CC 5907*a376eb32SXin Li _LT_CC_BASENAME([$compiler]) 5908*a376eb32SXin Li 5909*a376eb32SXin Li if test -n "$compiler"; then 5910*a376eb32SXin Li # We don't want -fno-exception when compiling C++ code, so set the 5911*a376eb32SXin Li # no_builtin_flag separately 5912*a376eb32SXin Li if test "$GXX" = yes; then 5913*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 5914*a376eb32SXin Li else 5915*a376eb32SXin Li _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 5916*a376eb32SXin Li fi 5917*a376eb32SXin Li 5918*a376eb32SXin Li if test "$GXX" = yes; then 5919*a376eb32SXin Li # Set up default GNU C++ configuration 5920*a376eb32SXin Li 5921*a376eb32SXin Li LT_PATH_LD 5922*a376eb32SXin Li 5923*a376eb32SXin Li # Check if GNU C++ uses GNU ld as the underlying linker, since the 5924*a376eb32SXin Li # archiving commands below assume that GNU ld is being used. 5925*a376eb32SXin Li if test "$with_gnu_ld" = yes; then 5926*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5927*a376eb32SXin Li _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' 5928*a376eb32SXin Li 5929*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5930*a376eb32SXin Li _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5931*a376eb32SXin Li 5932*a376eb32SXin Li # If archive_cmds runs LD, not CC, wlarc should be empty 5933*a376eb32SXin Li # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 5934*a376eb32SXin Li # investigate it a little bit more. (MM) 5935*a376eb32SXin Li wlarc='${wl}' 5936*a376eb32SXin Li 5937*a376eb32SXin Li # ancient GNU ld didn't support --whole-archive et. al. 5938*a376eb32SXin Li if eval "`$CC -print-prog-name=ld` --help 2>&1" | 5939*a376eb32SXin Li $GREP 'no-whole-archive' > /dev/null; then 5940*a376eb32SXin Li _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5941*a376eb32SXin Li else 5942*a376eb32SXin Li _LT_TAGVAR(whole_archive_flag_spec, $1)= 5943*a376eb32SXin Li fi 5944*a376eb32SXin Li else 5945*a376eb32SXin Li with_gnu_ld=no 5946*a376eb32SXin Li wlarc= 5947*a376eb32SXin Li 5948*a376eb32SXin Li # A generic and very simple default shared library creation 5949*a376eb32SXin Li # command for GNU C++ for the case where it uses the native 5950*a376eb32SXin Li # linker, instead of GNU ld. If possible, this setting should 5951*a376eb32SXin Li # overridden to take advantage of the native linker features on 5952*a376eb32SXin Li # the platform it is being used on. 5953*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 5954*a376eb32SXin Li fi 5955*a376eb32SXin Li 5956*a376eb32SXin Li # Commands to make compiler produce verbose output that lists 5957*a376eb32SXin Li # what "hidden" libraries, object files and flags are used when 5958*a376eb32SXin Li # linking a shared library. 5959*a376eb32SXin Li output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 5960*a376eb32SXin Li 5961*a376eb32SXin Li else 5962*a376eb32SXin Li GXX=no 5963*a376eb32SXin Li with_gnu_ld=no 5964*a376eb32SXin Li wlarc= 5965*a376eb32SXin Li fi 5966*a376eb32SXin Li 5967*a376eb32SXin Li # PORTME: fill in a description of your system's C++ link characteristics 5968*a376eb32SXin Li AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5969*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=yes 5970*a376eb32SXin Li case $host_os in 5971*a376eb32SXin Li aix3*) 5972*a376eb32SXin Li # FIXME: insert proper C++ library support 5973*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 5974*a376eb32SXin Li ;; 5975*a376eb32SXin Li aix[[4-9]]*) 5976*a376eb32SXin Li if test "$host_cpu" = ia64; then 5977*a376eb32SXin Li # On IA64, the linker does run time linking by default, so we don't 5978*a376eb32SXin Li # have to do anything special. 5979*a376eb32SXin Li aix_use_runtimelinking=no 5980*a376eb32SXin Li exp_sym_flag='-Bexport' 5981*a376eb32SXin Li no_entry_flag="" 5982*a376eb32SXin Li else 5983*a376eb32SXin Li aix_use_runtimelinking=no 5984*a376eb32SXin Li 5985*a376eb32SXin Li # Test if we are trying to use run time linking or normal 5986*a376eb32SXin Li # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5987*a376eb32SXin Li # need to do runtime linking. 5988*a376eb32SXin Li case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5989*a376eb32SXin Li for ld_flag in $LDFLAGS; do 5990*a376eb32SXin Li case $ld_flag in 5991*a376eb32SXin Li *-brtl*) 5992*a376eb32SXin Li aix_use_runtimelinking=yes 5993*a376eb32SXin Li break 5994*a376eb32SXin Li ;; 5995*a376eb32SXin Li esac 5996*a376eb32SXin Li done 5997*a376eb32SXin Li ;; 5998*a376eb32SXin Li esac 5999*a376eb32SXin Li 6000*a376eb32SXin Li exp_sym_flag='-bexport' 6001*a376eb32SXin Li no_entry_flag='-bnoentry' 6002*a376eb32SXin Li fi 6003*a376eb32SXin Li 6004*a376eb32SXin Li # When large executables or shared objects are built, AIX ld can 6005*a376eb32SXin Li # have problems creating the table of contents. If linking a library 6006*a376eb32SXin Li # or program results in "error TOC overflow" add -mminimal-toc to 6007*a376eb32SXin Li # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6008*a376eb32SXin Li # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6009*a376eb32SXin Li 6010*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='' 6011*a376eb32SXin Li _LT_TAGVAR(hardcode_direct, $1)=yes 6012*a376eb32SXin Li _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6013*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6014*a376eb32SXin Li _LT_TAGVAR(link_all_deplibs, $1)=yes 6015*a376eb32SXin Li _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 6016*a376eb32SXin Li 6017*a376eb32SXin Li if test "$GXX" = yes; then 6018*a376eb32SXin Li case $host_os in aix4.[[012]]|aix4.[[012]].*) 6019*a376eb32SXin Li # We only want to do this on AIX 4.2 and lower, the check 6020*a376eb32SXin Li # below for broken collect2 doesn't work under 4.3+ 6021*a376eb32SXin Li collect2name=`${CC} -print-prog-name=collect2` 6022*a376eb32SXin Li if test -f "$collect2name" && 6023*a376eb32SXin Li strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6024*a376eb32SXin Li then 6025*a376eb32SXin Li # We have reworked collect2 6026*a376eb32SXin Li : 6027*a376eb32SXin Li else 6028*a376eb32SXin Li # We have old collect2 6029*a376eb32SXin Li _LT_TAGVAR(hardcode_direct, $1)=unsupported 6030*a376eb32SXin Li # It fails to find uninstalled libraries when the uninstalled 6031*a376eb32SXin Li # path is not listed in the libpath. Setting hardcode_minus_L 6032*a376eb32SXin Li # to unsupported forces relinking 6033*a376eb32SXin Li _LT_TAGVAR(hardcode_minus_L, $1)=yes 6034*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6035*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_separator, $1)= 6036*a376eb32SXin Li fi 6037*a376eb32SXin Li esac 6038*a376eb32SXin Li shared_flag='-shared' 6039*a376eb32SXin Li if test "$aix_use_runtimelinking" = yes; then 6040*a376eb32SXin Li shared_flag="$shared_flag "'${wl}-G' 6041*a376eb32SXin Li fi 6042*a376eb32SXin Li else 6043*a376eb32SXin Li # not using gcc 6044*a376eb32SXin Li if test "$host_cpu" = ia64; then 6045*a376eb32SXin Li # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6046*a376eb32SXin Li # chokes on -Wl,-G. The following line is correct: 6047*a376eb32SXin Li shared_flag='-G' 6048*a376eb32SXin Li else 6049*a376eb32SXin Li if test "$aix_use_runtimelinking" = yes; then 6050*a376eb32SXin Li shared_flag='${wl}-G' 6051*a376eb32SXin Li else 6052*a376eb32SXin Li shared_flag='${wl}-bM:SRE' 6053*a376eb32SXin Li fi 6054*a376eb32SXin Li fi 6055*a376eb32SXin Li fi 6056*a376eb32SXin Li 6057*a376eb32SXin Li _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 6058*a376eb32SXin Li # It seems that -bexpall does not export symbols beginning with 6059*a376eb32SXin Li # underscore (_), so it is better to generate a list of symbols to 6060*a376eb32SXin Li # export. 6061*a376eb32SXin Li _LT_TAGVAR(always_export_symbols, $1)=yes 6062*a376eb32SXin Li if test "$aix_use_runtimelinking" = yes; then 6063*a376eb32SXin Li # Warning - without using the other runtime loading flags (-brtl), 6064*a376eb32SXin Li # -berok will link without error, but may produce a broken library. 6065*a376eb32SXin Li _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 6066*a376eb32SXin Li # Determine the default libpath from the value encoded in an empty 6067*a376eb32SXin Li # executable. 6068*a376eb32SXin Li _LT_SYS_MODULE_PATH_AIX([$1]) 6069*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6070*a376eb32SXin Li 6071*a376eb32SXin Li _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 6072*a376eb32SXin Li else 6073*a376eb32SXin Li if test "$host_cpu" = ia64; then 6074*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 6075*a376eb32SXin Li _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6076*a376eb32SXin Li _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" 6077*a376eb32SXin Li else 6078*a376eb32SXin Li # Determine the default libpath from the value encoded in an 6079*a376eb32SXin Li # empty executable. 6080*a376eb32SXin Li _LT_SYS_MODULE_PATH_AIX([$1]) 6081*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6082*a376eb32SXin Li # Warning - without using the other run time loading flags, 6083*a376eb32SXin Li # -berok will link without error, but may produce a broken library. 6084*a376eb32SXin Li _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6085*a376eb32SXin Li _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6086*a376eb32SXin Li if test "$with_gnu_ld" = yes; then 6087*a376eb32SXin Li # We only use this code for GNU lds that support --whole-archive. 6088*a376eb32SXin Li _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6089*a376eb32SXin Li else 6090*a376eb32SXin Li # Exported symbols can be pulled into shared objects from archives 6091*a376eb32SXin Li _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6092*a376eb32SXin Li fi 6093*a376eb32SXin Li _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6094*a376eb32SXin Li # This is similar to how AIX traditionally builds its shared 6095*a376eb32SXin Li # libraries. 6096*a376eb32SXin Li _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 6097*a376eb32SXin Li fi 6098*a376eb32SXin Li fi 6099*a376eb32SXin Li ;; 6100*a376eb32SXin Li 6101*a376eb32SXin Li beos*) 6102*a376eb32SXin Li if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6103*a376eb32SXin Li _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6104*a376eb32SXin Li # Joseph Beckenbach <[email protected]> says some releases of gcc 6105*a376eb32SXin Li # support --undefined. This deserves some investigation. FIXME 6106*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6107*a376eb32SXin Li else 6108*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 6109*a376eb32SXin Li fi 6110*a376eb32SXin Li ;; 6111*a376eb32SXin Li 6112*a376eb32SXin Li chorus*) 6113*a376eb32SXin Li case $cc_basename in 6114*a376eb32SXin Li *) 6115*a376eb32SXin Li # FIXME: insert proper C++ library support 6116*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 6117*a376eb32SXin Li ;; 6118*a376eb32SXin Li esac 6119*a376eb32SXin Li ;; 6120*a376eb32SXin Li 6121*a376eb32SXin Li cygwin* | mingw* | pw32* | cegcc*) 6122*a376eb32SXin Li case $GXX,$cc_basename in 6123*a376eb32SXin Li ,cl* | no,cl*) 6124*a376eb32SXin Li # Native MSVC 6125*a376eb32SXin Li # hardcode_libdir_flag_spec is actually meaningless, as there is 6126*a376eb32SXin Li # no search path for DLLs. 6127*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6128*a376eb32SXin Li _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6129*a376eb32SXin Li _LT_TAGVAR(always_export_symbols, $1)=yes 6130*a376eb32SXin Li _LT_TAGVAR(file_list_spec, $1)='@' 6131*a376eb32SXin Li # Tell ltmain to make .lib files, not .a files. 6132*a376eb32SXin Li libext=lib 6133*a376eb32SXin Li # Tell ltmain to make .dll files, not .so files. 6134*a376eb32SXin Li shrext_cmds=".dll" 6135*a376eb32SXin Li # FIXME: Setting linknames here is a bad hack. 6136*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 6137*a376eb32SXin Li _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6138*a376eb32SXin Li $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 6139*a376eb32SXin Li else 6140*a376eb32SXin Li $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 6141*a376eb32SXin Li fi~ 6142*a376eb32SXin Li $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6143*a376eb32SXin Li linknames=' 6144*a376eb32SXin Li # The linker will not automatically build a static lib if we build a DLL. 6145*a376eb32SXin Li # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6146*a376eb32SXin Li _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6147*a376eb32SXin Li # Don't use ranlib 6148*a376eb32SXin Li _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6149*a376eb32SXin Li _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6150*a376eb32SXin Li lt_tool_outputfile="@TOOL_OUTPUT@"~ 6151*a376eb32SXin Li case $lt_outputfile in 6152*a376eb32SXin Li *.exe|*.EXE) ;; 6153*a376eb32SXin Li *) 6154*a376eb32SXin Li lt_outputfile="$lt_outputfile.exe" 6155*a376eb32SXin Li lt_tool_outputfile="$lt_tool_outputfile.exe" 6156*a376eb32SXin Li ;; 6157*a376eb32SXin Li esac~ 6158*a376eb32SXin Li func_to_tool_file "$lt_outputfile"~ 6159*a376eb32SXin Li if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 6160*a376eb32SXin Li $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6161*a376eb32SXin Li $RM "$lt_outputfile.manifest"; 6162*a376eb32SXin Li fi' 6163*a376eb32SXin Li ;; 6164*a376eb32SXin Li *) 6165*a376eb32SXin Li # g++ 6166*a376eb32SXin Li # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6167*a376eb32SXin Li # as there is no search path for DLLs. 6168*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6169*a376eb32SXin Li _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 6170*a376eb32SXin Li _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6171*a376eb32SXin Li _LT_TAGVAR(always_export_symbols, $1)=no 6172*a376eb32SXin Li _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6173*a376eb32SXin Li 6174*a376eb32SXin Li if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6175*a376eb32SXin Li _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' 6176*a376eb32SXin Li # If the export-symbols file already is a .def file (1st line 6177*a376eb32SXin Li # is EXPORTS), use it as is; otherwise, prepend... 6178*a376eb32SXin Li _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6179*a376eb32SXin Li cp $export_symbols $output_objdir/$soname.def; 6180*a376eb32SXin Li else 6181*a376eb32SXin Li echo EXPORTS > $output_objdir/$soname.def; 6182*a376eb32SXin Li cat $export_symbols >> $output_objdir/$soname.def; 6183*a376eb32SXin Li fi~ 6184*a376eb32SXin Li $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' 6185*a376eb32SXin Li else 6186*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 6187*a376eb32SXin Li fi 6188*a376eb32SXin Li ;; 6189*a376eb32SXin Li esac 6190*a376eb32SXin Li ;; 6191*a376eb32SXin Li darwin* | rhapsody*) 6192*a376eb32SXin Li _LT_DARWIN_LINKER_FEATURES($1) 6193*a376eb32SXin Li ;; 6194*a376eb32SXin Li 6195*a376eb32SXin Li dgux*) 6196*a376eb32SXin Li case $cc_basename in 6197*a376eb32SXin Li ec++*) 6198*a376eb32SXin Li # FIXME: insert proper C++ library support 6199*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 6200*a376eb32SXin Li ;; 6201*a376eb32SXin Li ghcx*) 6202*a376eb32SXin Li # Green Hills C++ Compiler 6203*a376eb32SXin Li # FIXME: insert proper C++ library support 6204*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 6205*a376eb32SXin Li ;; 6206*a376eb32SXin Li *) 6207*a376eb32SXin Li # FIXME: insert proper C++ library support 6208*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 6209*a376eb32SXin Li ;; 6210*a376eb32SXin Li esac 6211*a376eb32SXin Li ;; 6212*a376eb32SXin Li 6213*a376eb32SXin Li freebsd2.*) 6214*a376eb32SXin Li # C++ shared libraries reported to be fairly broken before 6215*a376eb32SXin Li # switch to ELF 6216*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 6217*a376eb32SXin Li ;; 6218*a376eb32SXin Li 6219*a376eb32SXin Li freebsd-elf*) 6220*a376eb32SXin Li _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6221*a376eb32SXin Li ;; 6222*a376eb32SXin Li 6223*a376eb32SXin Li freebsd* | dragonfly*) 6224*a376eb32SXin Li # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6225*a376eb32SXin Li # conventions 6226*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=yes 6227*a376eb32SXin Li ;; 6228*a376eb32SXin Li 6229*a376eb32SXin Li haiku*) 6230*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6231*a376eb32SXin Li _LT_TAGVAR(link_all_deplibs, $1)=yes 6232*a376eb32SXin Li ;; 6233*a376eb32SXin Li 6234*a376eb32SXin Li hpux9*) 6235*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6236*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6237*a376eb32SXin Li _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6238*a376eb32SXin Li _LT_TAGVAR(hardcode_direct, $1)=yes 6239*a376eb32SXin Li _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6240*a376eb32SXin Li # but as the default 6241*a376eb32SXin Li # location of the library. 6242*a376eb32SXin Li 6243*a376eb32SXin Li case $cc_basename in 6244*a376eb32SXin Li CC*) 6245*a376eb32SXin Li # FIXME: insert proper C++ library support 6246*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 6247*a376eb32SXin Li ;; 6248*a376eb32SXin Li aCC*) 6249*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 6250*a376eb32SXin Li # Commands to make compiler produce verbose output that lists 6251*a376eb32SXin Li # what "hidden" libraries, object files and flags are used when 6252*a376eb32SXin Li # linking a shared library. 6253*a376eb32SXin Li # 6254*a376eb32SXin Li # There doesn't appear to be a way to prevent this compiler from 6255*a376eb32SXin Li # explicitly linking system object files so we need to strip them 6256*a376eb32SXin Li # from the output so that they don't get included in the library 6257*a376eb32SXin Li # dependencies. 6258*a376eb32SXin Li 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"' 6259*a376eb32SXin Li ;; 6260*a376eb32SXin Li *) 6261*a376eb32SXin Li if test "$GXX" = yes; then 6262*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 6263*a376eb32SXin Li else 6264*a376eb32SXin Li # FIXME: insert proper C++ library support 6265*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 6266*a376eb32SXin Li fi 6267*a376eb32SXin Li ;; 6268*a376eb32SXin Li esac 6269*a376eb32SXin Li ;; 6270*a376eb32SXin Li 6271*a376eb32SXin Li hpux10*|hpux11*) 6272*a376eb32SXin Li if test $with_gnu_ld = no; then 6273*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6274*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6275*a376eb32SXin Li 6276*a376eb32SXin Li case $host_cpu in 6277*a376eb32SXin Li hppa*64*|ia64*) 6278*a376eb32SXin Li ;; 6279*a376eb32SXin Li *) 6280*a376eb32SXin Li _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6281*a376eb32SXin Li ;; 6282*a376eb32SXin Li esac 6283*a376eb32SXin Li fi 6284*a376eb32SXin Li case $host_cpu in 6285*a376eb32SXin Li hppa*64*|ia64*) 6286*a376eb32SXin Li _LT_TAGVAR(hardcode_direct, $1)=no 6287*a376eb32SXin Li _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6288*a376eb32SXin Li ;; 6289*a376eb32SXin Li *) 6290*a376eb32SXin Li _LT_TAGVAR(hardcode_direct, $1)=yes 6291*a376eb32SXin Li _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6292*a376eb32SXin Li _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6293*a376eb32SXin Li # but as the default 6294*a376eb32SXin Li # location of the library. 6295*a376eb32SXin Li ;; 6296*a376eb32SXin Li esac 6297*a376eb32SXin Li 6298*a376eb32SXin Li case $cc_basename in 6299*a376eb32SXin Li CC*) 6300*a376eb32SXin Li # FIXME: insert proper C++ library support 6301*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 6302*a376eb32SXin Li ;; 6303*a376eb32SXin Li aCC*) 6304*a376eb32SXin Li case $host_cpu in 6305*a376eb32SXin Li hppa*64*) 6306*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6307*a376eb32SXin Li ;; 6308*a376eb32SXin Li ia64*) 6309*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6310*a376eb32SXin Li ;; 6311*a376eb32SXin Li *) 6312*a376eb32SXin Li _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' 6313*a376eb32SXin Li ;; 6314*a376eb32SXin Li esac 6315*a376eb32SXin Li # Commands to make compiler produce verbose output that lists 6316*a376eb32SXin Li # what "hidden" libraries, object files and flags are used when 6317*a376eb32SXin Li # linking a shared library. 6318*a376eb32SXin Li # 6319*a376eb32SXin Li # There doesn't appear to be a way to prevent this compiler from 6320*a376eb32SXin Li # explicitly linking system object files so we need to strip them 6321*a376eb32SXin Li # from the output so that they don't get included in the library 6322*a376eb32SXin Li # dependencies. 6323*a376eb32SXin Li 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"' 6324*a376eb32SXin Li ;; 6325*a376eb32SXin Li *) 6326*a376eb32SXin Li if test "$GXX" = yes; then 6327*a376eb32SXin Li if test $with_gnu_ld = no; then 6328*a376eb32SXin Li case $host_cpu in 6329*a376eb32SXin Li hppa*64*) 6330*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6331*a376eb32SXin Li ;; 6332*a376eb32SXin Li ia64*) 6333*a376eb32SXin Li _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' 6334*a376eb32SXin Li ;; 6335*a376eb32SXin Li *) 6336*a376eb32SXin Li _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' 6337*a376eb32SXin Li ;; 6338*a376eb32SXin Li esac 6339*a376eb32SXin Li fi 6340*a376eb32SXin Li else 6341*a376eb32SXin Li # FIXME: insert proper C++ library support 6342*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 6343*a376eb32SXin Li fi 6344*a376eb32SXin Li ;; 6345*a376eb32SXin Li esac 6346*a376eb32SXin Li ;; 6347*a376eb32SXin Li 6348*a376eb32SXin Li interix[[3-9]]*) 6349*a376eb32SXin Li _LT_TAGVAR(hardcode_direct, $1)=no 6350*a376eb32SXin Li _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6351*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6352*a376eb32SXin Li _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6353*a376eb32SXin Li # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6354*a376eb32SXin Li # Instead, shared libraries are loaded at an image base (0x10000000 by 6355*a376eb32SXin Li # default) and relocated if they conflict, which is a slow very memory 6356*a376eb32SXin Li # consuming and fragmenting process. To avoid this, we pick a random, 6357*a376eb32SXin Li # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6358*a376eb32SXin Li # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6359*a376eb32SXin Li _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' 6360*a376eb32SXin Li _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' 6361*a376eb32SXin Li ;; 6362*a376eb32SXin Li irix5* | irix6*) 6363*a376eb32SXin Li case $cc_basename in 6364*a376eb32SXin Li CC*) 6365*a376eb32SXin Li # SGI C++ 6366*a376eb32SXin Li _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' 6367*a376eb32SXin Li 6368*a376eb32SXin Li # Archives containing C++ object files must be created using 6369*a376eb32SXin Li # "CC -ar", where "CC" is the IRIX C++ compiler. This is 6370*a376eb32SXin Li # necessary to make sure instantiated templates are included 6371*a376eb32SXin Li # in the archive. 6372*a376eb32SXin Li _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6373*a376eb32SXin Li ;; 6374*a376eb32SXin Li *) 6375*a376eb32SXin Li if test "$GXX" = yes; then 6376*a376eb32SXin Li if test "$with_gnu_ld" = no; then 6377*a376eb32SXin Li _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' 6378*a376eb32SXin Li else 6379*a376eb32SXin Li _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' 6380*a376eb32SXin Li fi 6381*a376eb32SXin Li fi 6382*a376eb32SXin Li _LT_TAGVAR(link_all_deplibs, $1)=yes 6383*a376eb32SXin Li ;; 6384*a376eb32SXin Li esac 6385*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6386*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6387*a376eb32SXin Li _LT_TAGVAR(inherit_rpath, $1)=yes 6388*a376eb32SXin Li ;; 6389*a376eb32SXin Li 6390*a376eb32SXin Li linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6391*a376eb32SXin Li case $cc_basename in 6392*a376eb32SXin Li KCC*) 6393*a376eb32SXin Li # Kuck and Associates, Inc. (KAI) C++ Compiler 6394*a376eb32SXin Li 6395*a376eb32SXin Li # KCC will only create a shared library if the output file 6396*a376eb32SXin Li # ends with ".so" (or ".sl" for HP-UX), so rename the library 6397*a376eb32SXin Li # to its proper name (with version) after linking. 6398*a376eb32SXin Li _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' 6399*a376eb32SXin Li _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' 6400*a376eb32SXin Li # Commands to make compiler produce verbose output that lists 6401*a376eb32SXin Li # what "hidden" libraries, object files and flags are used when 6402*a376eb32SXin Li # linking a shared library. 6403*a376eb32SXin Li # 6404*a376eb32SXin Li # There doesn't appear to be a way to prevent this compiler from 6405*a376eb32SXin Li # explicitly linking system object files so we need to strip them 6406*a376eb32SXin Li # from the output so that they don't get included in the library 6407*a376eb32SXin Li # dependencies. 6408*a376eb32SXin Li 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"' 6409*a376eb32SXin Li 6410*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6411*a376eb32SXin Li _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6412*a376eb32SXin Li 6413*a376eb32SXin Li # Archives containing C++ object files must be created using 6414*a376eb32SXin Li # "CC -Bstatic", where "CC" is the KAI C++ compiler. 6415*a376eb32SXin Li _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 6416*a376eb32SXin Li ;; 6417*a376eb32SXin Li icpc* | ecpc* ) 6418*a376eb32SXin Li # Intel C++ 6419*a376eb32SXin Li with_gnu_ld=yes 6420*a376eb32SXin Li # version 8.0 and above of icpc choke on multiply defined symbols 6421*a376eb32SXin Li # if we add $predep_objects and $postdep_objects, however 7.1 and 6422*a376eb32SXin Li # earlier do not add the objects themselves. 6423*a376eb32SXin Li case `$CC -V 2>&1` in 6424*a376eb32SXin Li *"Version 7."*) 6425*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6426*a376eb32SXin Li _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' 6427*a376eb32SXin Li ;; 6428*a376eb32SXin Li *) # Version 8.0 or newer 6429*a376eb32SXin Li tmp_idyn= 6430*a376eb32SXin Li case $host_cpu in 6431*a376eb32SXin Li ia64*) tmp_idyn=' -i_dynamic';; 6432*a376eb32SXin Li esac 6433*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6434*a376eb32SXin Li _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' 6435*a376eb32SXin Li ;; 6436*a376eb32SXin Li esac 6437*a376eb32SXin Li _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6438*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6439*a376eb32SXin Li _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6440*a376eb32SXin Li _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6441*a376eb32SXin Li ;; 6442*a376eb32SXin Li pgCC* | pgcpp*) 6443*a376eb32SXin Li # Portland Group C++ compiler 6444*a376eb32SXin Li case `$CC -V` in 6445*a376eb32SXin Li *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 6446*a376eb32SXin Li _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 6447*a376eb32SXin Li rm -rf $tpldir~ 6448*a376eb32SXin Li $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 6449*a376eb32SXin Li compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 6450*a376eb32SXin Li _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 6451*a376eb32SXin Li rm -rf $tpldir~ 6452*a376eb32SXin Li $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 6453*a376eb32SXin Li $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 6454*a376eb32SXin Li $RANLIB $oldlib' 6455*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 6456*a376eb32SXin Li rm -rf $tpldir~ 6457*a376eb32SXin Li $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6458*a376eb32SXin Li $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6459*a376eb32SXin Li _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 6460*a376eb32SXin Li rm -rf $tpldir~ 6461*a376eb32SXin Li $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6462*a376eb32SXin Li $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' 6463*a376eb32SXin Li ;; 6464*a376eb32SXin Li *) # Version 6 and above use weak symbols 6465*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6466*a376eb32SXin Li _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' 6467*a376eb32SXin Li ;; 6468*a376eb32SXin Li esac 6469*a376eb32SXin Li 6470*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 6471*a376eb32SXin Li _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6472*a376eb32SXin Li _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' 6473*a376eb32SXin Li ;; 6474*a376eb32SXin Li cxx*) 6475*a376eb32SXin Li # Compaq C++ 6476*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6477*a376eb32SXin Li _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' 6478*a376eb32SXin Li 6479*a376eb32SXin Li runpath_var=LD_RUN_PATH 6480*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6481*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6482*a376eb32SXin Li 6483*a376eb32SXin Li # Commands to make compiler produce verbose output that lists 6484*a376eb32SXin Li # what "hidden" libraries, object files and flags are used when 6485*a376eb32SXin Li # linking a shared library. 6486*a376eb32SXin Li # 6487*a376eb32SXin Li # There doesn't appear to be a way to prevent this compiler from 6488*a376eb32SXin Li # explicitly linking system object files so we need to strip them 6489*a376eb32SXin Li # from the output so that they don't get included in the library 6490*a376eb32SXin Li # dependencies. 6491*a376eb32SXin Li 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' 6492*a376eb32SXin Li ;; 6493*a376eb32SXin Li xl* | mpixl* | bgxl*) 6494*a376eb32SXin Li # IBM XL 8.0 on PPC, with GNU ld 6495*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6496*a376eb32SXin Li _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6497*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6498*a376eb32SXin Li if test "x$supports_anon_versioning" = xyes; then 6499*a376eb32SXin Li _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 6500*a376eb32SXin Li cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6501*a376eb32SXin Li echo "local: *; };" >> $output_objdir/$libname.ver~ 6502*a376eb32SXin Li $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 6503*a376eb32SXin Li fi 6504*a376eb32SXin Li ;; 6505*a376eb32SXin Li *) 6506*a376eb32SXin Li case `$CC -V 2>&1 | sed 5q` in 6507*a376eb32SXin Li *Sun\ C*) 6508*a376eb32SXin Li # Sun C++ 5.9 6509*a376eb32SXin Li _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6510*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6511*a376eb32SXin Li _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' 6512*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6513*a376eb32SXin Li _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' 6514*a376eb32SXin Li _LT_TAGVAR(compiler_needs_object, $1)=yes 6515*a376eb32SXin Li 6516*a376eb32SXin Li # Not sure whether something based on 6517*a376eb32SXin Li # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 6518*a376eb32SXin Li # would be better. 6519*a376eb32SXin Li output_verbose_link_cmd='func_echo_all' 6520*a376eb32SXin Li 6521*a376eb32SXin Li # Archives containing C++ object files must be created using 6522*a376eb32SXin Li # "CC -xar", where "CC" is the Sun C++ compiler. This is 6523*a376eb32SXin Li # necessary to make sure instantiated templates are included 6524*a376eb32SXin Li # in the archive. 6525*a376eb32SXin Li _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6526*a376eb32SXin Li ;; 6527*a376eb32SXin Li esac 6528*a376eb32SXin Li ;; 6529*a376eb32SXin Li esac 6530*a376eb32SXin Li ;; 6531*a376eb32SXin Li 6532*a376eb32SXin Li lynxos*) 6533*a376eb32SXin Li # FIXME: insert proper C++ library support 6534*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 6535*a376eb32SXin Li ;; 6536*a376eb32SXin Li 6537*a376eb32SXin Li m88k*) 6538*a376eb32SXin Li # FIXME: insert proper C++ library support 6539*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 6540*a376eb32SXin Li ;; 6541*a376eb32SXin Li 6542*a376eb32SXin Li mvs*) 6543*a376eb32SXin Li case $cc_basename in 6544*a376eb32SXin Li cxx*) 6545*a376eb32SXin Li # FIXME: insert proper C++ library support 6546*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 6547*a376eb32SXin Li ;; 6548*a376eb32SXin Li *) 6549*a376eb32SXin Li # FIXME: insert proper C++ library support 6550*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 6551*a376eb32SXin Li ;; 6552*a376eb32SXin Li esac 6553*a376eb32SXin Li ;; 6554*a376eb32SXin Li 6555*a376eb32SXin Li netbsd*) 6556*a376eb32SXin Li if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6557*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 6558*a376eb32SXin Li wlarc= 6559*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6560*a376eb32SXin Li _LT_TAGVAR(hardcode_direct, $1)=yes 6561*a376eb32SXin Li _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6562*a376eb32SXin Li fi 6563*a376eb32SXin Li # Workaround some broken pre-1.5 toolchains 6564*a376eb32SXin Li output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 6565*a376eb32SXin Li ;; 6566*a376eb32SXin Li 6567*a376eb32SXin Li *nto* | *qnx*) 6568*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=yes 6569*a376eb32SXin Li ;; 6570*a376eb32SXin Li 6571*a376eb32SXin Li openbsd2*) 6572*a376eb32SXin Li # C++ shared libraries are fairly broken 6573*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 6574*a376eb32SXin Li ;; 6575*a376eb32SXin Li 6576*a376eb32SXin Li openbsd*) 6577*a376eb32SXin Li if test -f /usr/libexec/ld.so; then 6578*a376eb32SXin Li _LT_TAGVAR(hardcode_direct, $1)=yes 6579*a376eb32SXin Li _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6580*a376eb32SXin Li _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6581*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6582*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6583*a376eb32SXin Li if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6584*a376eb32SXin Li _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' 6585*a376eb32SXin Li _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6586*a376eb32SXin Li _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6587*a376eb32SXin Li fi 6588*a376eb32SXin Li output_verbose_link_cmd=func_echo_all 6589*a376eb32SXin Li else 6590*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 6591*a376eb32SXin Li fi 6592*a376eb32SXin Li ;; 6593*a376eb32SXin Li 6594*a376eb32SXin Li osf3* | osf4* | osf5*) 6595*a376eb32SXin Li case $cc_basename in 6596*a376eb32SXin Li KCC*) 6597*a376eb32SXin Li # Kuck and Associates, Inc. (KAI) C++ Compiler 6598*a376eb32SXin Li 6599*a376eb32SXin Li # KCC will only create a shared library if the output file 6600*a376eb32SXin Li # ends with ".so" (or ".sl" for HP-UX), so rename the library 6601*a376eb32SXin Li # to its proper name (with version) after linking. 6602*a376eb32SXin Li _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' 6603*a376eb32SXin Li 6604*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6605*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6606*a376eb32SXin Li 6607*a376eb32SXin Li # Archives containing C++ object files must be created using 6608*a376eb32SXin Li # the KAI C++ compiler. 6609*a376eb32SXin Li case $host in 6610*a376eb32SXin Li osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 6611*a376eb32SXin Li *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 6612*a376eb32SXin Li esac 6613*a376eb32SXin Li ;; 6614*a376eb32SXin Li RCC*) 6615*a376eb32SXin Li # Rational C++ 2.4.1 6616*a376eb32SXin Li # FIXME: insert proper C++ library support 6617*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 6618*a376eb32SXin Li ;; 6619*a376eb32SXin Li cxx*) 6620*a376eb32SXin Li case $host in 6621*a376eb32SXin Li osf3*) 6622*a376eb32SXin Li _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6623*a376eb32SXin Li _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' 6624*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6625*a376eb32SXin Li ;; 6626*a376eb32SXin Li *) 6627*a376eb32SXin Li _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6628*a376eb32SXin Li _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' 6629*a376eb32SXin Li _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 6630*a376eb32SXin Li echo "-hidden">> $lib.exp~ 6631*a376eb32SXin Li $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~ 6632*a376eb32SXin Li $RM $lib.exp' 6633*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6634*a376eb32SXin Li ;; 6635*a376eb32SXin Li esac 6636*a376eb32SXin Li 6637*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6638*a376eb32SXin Li 6639*a376eb32SXin Li # Commands to make compiler produce verbose output that lists 6640*a376eb32SXin Li # what "hidden" libraries, object files and flags are used when 6641*a376eb32SXin Li # linking a shared library. 6642*a376eb32SXin Li # 6643*a376eb32SXin Li # There doesn't appear to be a way to prevent this compiler from 6644*a376eb32SXin Li # explicitly linking system object files so we need to strip them 6645*a376eb32SXin Li # from the output so that they don't get included in the library 6646*a376eb32SXin Li # dependencies. 6647*a376eb32SXin Li 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"' 6648*a376eb32SXin Li ;; 6649*a376eb32SXin Li *) 6650*a376eb32SXin Li if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6651*a376eb32SXin Li _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6652*a376eb32SXin Li case $host in 6653*a376eb32SXin Li osf3*) 6654*a376eb32SXin Li _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' 6655*a376eb32SXin Li ;; 6656*a376eb32SXin Li *) 6657*a376eb32SXin Li _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' 6658*a376eb32SXin Li ;; 6659*a376eb32SXin Li esac 6660*a376eb32SXin Li 6661*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6662*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6663*a376eb32SXin Li 6664*a376eb32SXin Li # Commands to make compiler produce verbose output that lists 6665*a376eb32SXin Li # what "hidden" libraries, object files and flags are used when 6666*a376eb32SXin Li # linking a shared library. 6667*a376eb32SXin Li output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6668*a376eb32SXin Li 6669*a376eb32SXin Li else 6670*a376eb32SXin Li # FIXME: insert proper C++ library support 6671*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 6672*a376eb32SXin Li fi 6673*a376eb32SXin Li ;; 6674*a376eb32SXin Li esac 6675*a376eb32SXin Li ;; 6676*a376eb32SXin Li 6677*a376eb32SXin Li psos*) 6678*a376eb32SXin Li # FIXME: insert proper C++ library support 6679*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 6680*a376eb32SXin Li ;; 6681*a376eb32SXin Li 6682*a376eb32SXin Li sunos4*) 6683*a376eb32SXin Li case $cc_basename in 6684*a376eb32SXin Li CC*) 6685*a376eb32SXin Li # Sun C++ 4.x 6686*a376eb32SXin Li # FIXME: insert proper C++ library support 6687*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 6688*a376eb32SXin Li ;; 6689*a376eb32SXin Li lcc*) 6690*a376eb32SXin Li # Lucid 6691*a376eb32SXin Li # FIXME: insert proper C++ library support 6692*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 6693*a376eb32SXin Li ;; 6694*a376eb32SXin Li *) 6695*a376eb32SXin Li # FIXME: insert proper C++ library support 6696*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 6697*a376eb32SXin Li ;; 6698*a376eb32SXin Li esac 6699*a376eb32SXin Li ;; 6700*a376eb32SXin Li 6701*a376eb32SXin Li solaris*) 6702*a376eb32SXin Li case $cc_basename in 6703*a376eb32SXin Li CC* | sunCC*) 6704*a376eb32SXin Li # Sun C++ 4.2, 5.x and Centerline C++ 6705*a376eb32SXin Li _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 6706*a376eb32SXin Li _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6707*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6708*a376eb32SXin Li _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6709*a376eb32SXin Li $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' 6710*a376eb32SXin Li 6711*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6712*a376eb32SXin Li _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6713*a376eb32SXin Li case $host_os in 6714*a376eb32SXin Li solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6715*a376eb32SXin Li *) 6716*a376eb32SXin Li # The compiler driver will combine and reorder linker options, 6717*a376eb32SXin Li # but understands `-z linker_flag'. 6718*a376eb32SXin Li # Supported since Solaris 2.6 (maybe 2.5.1?) 6719*a376eb32SXin Li _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6720*a376eb32SXin Li ;; 6721*a376eb32SXin Li esac 6722*a376eb32SXin Li _LT_TAGVAR(link_all_deplibs, $1)=yes 6723*a376eb32SXin Li 6724*a376eb32SXin Li output_verbose_link_cmd='func_echo_all' 6725*a376eb32SXin Li 6726*a376eb32SXin Li # Archives containing C++ object files must be created using 6727*a376eb32SXin Li # "CC -xar", where "CC" is the Sun C++ compiler. This is 6728*a376eb32SXin Li # necessary to make sure instantiated templates are included 6729*a376eb32SXin Li # in the archive. 6730*a376eb32SXin Li _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6731*a376eb32SXin Li ;; 6732*a376eb32SXin Li gcx*) 6733*a376eb32SXin Li # Green Hills C++ Compiler 6734*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6735*a376eb32SXin Li 6736*a376eb32SXin Li # The C++ compiler must be used to create the archive. 6737*a376eb32SXin Li _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 6738*a376eb32SXin Li ;; 6739*a376eb32SXin Li *) 6740*a376eb32SXin Li # GNU C++ compiler with Solaris linker 6741*a376eb32SXin Li if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6742*a376eb32SXin Li _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 6743*a376eb32SXin Li if $CC --version | $GREP -v '^2\.7' > /dev/null; then 6744*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6745*a376eb32SXin Li _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6746*a376eb32SXin Li $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6747*a376eb32SXin Li 6748*a376eb32SXin Li # Commands to make compiler produce verbose output that lists 6749*a376eb32SXin Li # what "hidden" libraries, object files and flags are used when 6750*a376eb32SXin Li # linking a shared library. 6751*a376eb32SXin Li output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6752*a376eb32SXin Li else 6753*a376eb32SXin Li # g++ 2.7 appears to require `-G' NOT `-shared' on this 6754*a376eb32SXin Li # platform. 6755*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6756*a376eb32SXin Li _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6757*a376eb32SXin Li $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6758*a376eb32SXin Li 6759*a376eb32SXin Li # Commands to make compiler produce verbose output that lists 6760*a376eb32SXin Li # what "hidden" libraries, object files and flags are used when 6761*a376eb32SXin Li # linking a shared library. 6762*a376eb32SXin Li output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6763*a376eb32SXin Li fi 6764*a376eb32SXin Li 6765*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 6766*a376eb32SXin Li case $host_os in 6767*a376eb32SXin Li solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6768*a376eb32SXin Li *) 6769*a376eb32SXin Li _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6770*a376eb32SXin Li ;; 6771*a376eb32SXin Li esac 6772*a376eb32SXin Li fi 6773*a376eb32SXin Li ;; 6774*a376eb32SXin Li esac 6775*a376eb32SXin Li ;; 6776*a376eb32SXin Li 6777*a376eb32SXin Li sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6778*a376eb32SXin Li _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6779*a376eb32SXin Li _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6780*a376eb32SXin Li _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6781*a376eb32SXin Li runpath_var='LD_RUN_PATH' 6782*a376eb32SXin Li 6783*a376eb32SXin Li case $cc_basename in 6784*a376eb32SXin Li CC*) 6785*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6786*a376eb32SXin Li _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6787*a376eb32SXin Li ;; 6788*a376eb32SXin Li *) 6789*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6790*a376eb32SXin Li _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6791*a376eb32SXin Li ;; 6792*a376eb32SXin Li esac 6793*a376eb32SXin Li ;; 6794*a376eb32SXin Li 6795*a376eb32SXin Li sysv5* | sco3.2v5* | sco5v6*) 6796*a376eb32SXin Li # Note: We can NOT use -z defs as we might desire, because we do not 6797*a376eb32SXin Li # link with -lc, and that would cause any symbols used from libc to 6798*a376eb32SXin Li # always be unresolved, which means just about no library would 6799*a376eb32SXin Li # ever link correctly. If we're not using GNU ld we use -z text 6800*a376eb32SXin Li # though, which does catch some bad symbols but isn't as heavy-handed 6801*a376eb32SXin Li # as -z defs. 6802*a376eb32SXin Li _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6803*a376eb32SXin Li _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6804*a376eb32SXin Li _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6805*a376eb32SXin Li _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6806*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6807*a376eb32SXin Li _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6808*a376eb32SXin Li _LT_TAGVAR(link_all_deplibs, $1)=yes 6809*a376eb32SXin Li _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6810*a376eb32SXin Li runpath_var='LD_RUN_PATH' 6811*a376eb32SXin Li 6812*a376eb32SXin Li case $cc_basename in 6813*a376eb32SXin Li CC*) 6814*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6815*a376eb32SXin Li _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6816*a376eb32SXin Li _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 6817*a376eb32SXin Li '"$_LT_TAGVAR(old_archive_cmds, $1)" 6818*a376eb32SXin Li _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 6819*a376eb32SXin Li '"$_LT_TAGVAR(reload_cmds, $1)" 6820*a376eb32SXin Li ;; 6821*a376eb32SXin Li *) 6822*a376eb32SXin Li _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6823*a376eb32SXin Li _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6824*a376eb32SXin Li ;; 6825*a376eb32SXin Li esac 6826*a376eb32SXin Li ;; 6827*a376eb32SXin Li 6828*a376eb32SXin Li tandem*) 6829*a376eb32SXin Li case $cc_basename in 6830*a376eb32SXin Li NCC*) 6831*a376eb32SXin Li # NonStop-UX NCC 3.20 6832*a376eb32SXin Li # FIXME: insert proper C++ library support 6833*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 6834*a376eb32SXin Li ;; 6835*a376eb32SXin Li *) 6836*a376eb32SXin Li # FIXME: insert proper C++ library support 6837*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 6838*a376eb32SXin Li ;; 6839*a376eb32SXin Li esac 6840*a376eb32SXin Li ;; 6841*a376eb32SXin Li 6842*a376eb32SXin Li vxworks*) 6843*a376eb32SXin Li # FIXME: insert proper C++ library support 6844*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 6845*a376eb32SXin Li ;; 6846*a376eb32SXin Li 6847*a376eb32SXin Li *) 6848*a376eb32SXin Li # FIXME: insert proper C++ library support 6849*a376eb32SXin Li _LT_TAGVAR(ld_shlibs, $1)=no 6850*a376eb32SXin Li ;; 6851*a376eb32SXin Li esac 6852*a376eb32SXin Li 6853*a376eb32SXin Li AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6854*a376eb32SXin Li test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6855*a376eb32SXin Li 6856*a376eb32SXin Li _LT_TAGVAR(GCC, $1)="$GXX" 6857*a376eb32SXin Li _LT_TAGVAR(LD, $1)="$LD" 6858*a376eb32SXin Li 6859*a376eb32SXin Li ## CAVEAT EMPTOR: 6860*a376eb32SXin Li ## There is no encapsulation within the following macros, do not change 6861*a376eb32SXin Li ## the running order or otherwise move them around unless you know exactly 6862*a376eb32SXin Li ## what you are doing... 6863*a376eb32SXin Li _LT_SYS_HIDDEN_LIBDEPS($1) 6864*a376eb32SXin Li _LT_COMPILER_PIC($1) 6865*a376eb32SXin Li _LT_COMPILER_C_O($1) 6866*a376eb32SXin Li _LT_COMPILER_FILE_LOCKS($1) 6867*a376eb32SXin Li _LT_LINKER_SHLIBS($1) 6868*a376eb32SXin Li _LT_SYS_DYNAMIC_LINKER($1) 6869*a376eb32SXin Li _LT_LINKER_HARDCODE_LIBPATH($1) 6870*a376eb32SXin Li 6871*a376eb32SXin Li _LT_CONFIG($1) 6872*a376eb32SXin Li fi # test -n "$compiler" 6873*a376eb32SXin Li 6874*a376eb32SXin Li CC=$lt_save_CC 6875*a376eb32SXin Li CFLAGS=$lt_save_CFLAGS 6876*a376eb32SXin Li LDCXX=$LD 6877*a376eb32SXin Li LD=$lt_save_LD 6878*a376eb32SXin Li GCC=$lt_save_GCC 6879*a376eb32SXin Li with_gnu_ld=$lt_save_with_gnu_ld 6880*a376eb32SXin Li lt_cv_path_LDCXX=$lt_cv_path_LD 6881*a376eb32SXin Li lt_cv_path_LD=$lt_save_path_LD 6882*a376eb32SXin Li lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 6883*a376eb32SXin Li lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 6884*a376eb32SXin Lifi # test "$_lt_caught_CXX_error" != yes 6885*a376eb32SXin Li 6886*a376eb32SXin LiAC_LANG_POP 6887*a376eb32SXin Li])# _LT_LANG_CXX_CONFIG 6888*a376eb32SXin Li 6889*a376eb32SXin Li 6890*a376eb32SXin Li# _LT_FUNC_STRIPNAME_CNF 6891*a376eb32SXin Li# ---------------------- 6892*a376eb32SXin Li# func_stripname_cnf prefix suffix name 6893*a376eb32SXin Li# strip PREFIX and SUFFIX off of NAME. 6894*a376eb32SXin Li# PREFIX and SUFFIX must not contain globbing or regex special 6895*a376eb32SXin Li# characters, hashes, percent signs, but SUFFIX may contain a leading 6896*a376eb32SXin Li# dot (in which case that matches only a dot). 6897*a376eb32SXin Li# 6898*a376eb32SXin Li# This function is identical to the (non-XSI) version of func_stripname, 6899*a376eb32SXin Li# except this one can be used by m4 code that may be executed by configure, 6900*a376eb32SXin Li# rather than the libtool script. 6901*a376eb32SXin Lim4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 6902*a376eb32SXin LiAC_REQUIRE([_LT_DECL_SED]) 6903*a376eb32SXin LiAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 6904*a376eb32SXin Lifunc_stripname_cnf () 6905*a376eb32SXin Li{ 6906*a376eb32SXin Li case ${2} in 6907*a376eb32SXin Li .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 6908*a376eb32SXin Li *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 6909*a376eb32SXin Li esac 6910*a376eb32SXin Li} # func_stripname_cnf 6911*a376eb32SXin Li])# _LT_FUNC_STRIPNAME_CNF 6912*a376eb32SXin Li 6913*a376eb32SXin Li# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 6914*a376eb32SXin Li# --------------------------------- 6915*a376eb32SXin Li# Figure out "hidden" library dependencies from verbose 6916*a376eb32SXin Li# compiler output when linking a shared library. 6917*a376eb32SXin Li# Parse the compiler output and extract the necessary 6918*a376eb32SXin Li# objects, libraries and library flags. 6919*a376eb32SXin Lim4_defun([_LT_SYS_HIDDEN_LIBDEPS], 6920*a376eb32SXin Li[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6921*a376eb32SXin LiAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 6922*a376eb32SXin Li# Dependencies to place before and after the object being linked: 6923*a376eb32SXin Li_LT_TAGVAR(predep_objects, $1)= 6924*a376eb32SXin Li_LT_TAGVAR(postdep_objects, $1)= 6925*a376eb32SXin Li_LT_TAGVAR(predeps, $1)= 6926*a376eb32SXin Li_LT_TAGVAR(postdeps, $1)= 6927*a376eb32SXin Li_LT_TAGVAR(compiler_lib_search_path, $1)= 6928*a376eb32SXin Li 6929*a376eb32SXin Lidnl we can't use the lt_simple_compile_test_code here, 6930*a376eb32SXin Lidnl because it contains code intended for an executable, 6931*a376eb32SXin Lidnl not a library. It's possible we should let each 6932*a376eb32SXin Lidnl tag define a new lt_????_link_test_code variable, 6933*a376eb32SXin Lidnl but it's only used here... 6934*a376eb32SXin Lim4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 6935*a376eb32SXin Liint a; 6936*a376eb32SXin Livoid foo (void) { a = 0; } 6937*a376eb32SXin Li_LT_EOF 6938*a376eb32SXin Li], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 6939*a376eb32SXin Liclass Foo 6940*a376eb32SXin Li{ 6941*a376eb32SXin Lipublic: 6942*a376eb32SXin Li Foo (void) { a = 0; } 6943*a376eb32SXin Liprivate: 6944*a376eb32SXin Li int a; 6945*a376eb32SXin Li}; 6946*a376eb32SXin Li_LT_EOF 6947*a376eb32SXin Li], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 6948*a376eb32SXin Li subroutine foo 6949*a376eb32SXin Li implicit none 6950*a376eb32SXin Li integer*4 a 6951*a376eb32SXin Li a=0 6952*a376eb32SXin Li return 6953*a376eb32SXin Li end 6954*a376eb32SXin Li_LT_EOF 6955*a376eb32SXin Li], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 6956*a376eb32SXin Li subroutine foo 6957*a376eb32SXin Li implicit none 6958*a376eb32SXin Li integer a 6959*a376eb32SXin Li a=0 6960*a376eb32SXin Li return 6961*a376eb32SXin Li end 6962*a376eb32SXin Li_LT_EOF 6963*a376eb32SXin Li], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 6964*a376eb32SXin Lipublic class foo { 6965*a376eb32SXin Li private int a; 6966*a376eb32SXin Li public void bar (void) { 6967*a376eb32SXin Li a = 0; 6968*a376eb32SXin Li } 6969*a376eb32SXin Li}; 6970*a376eb32SXin Li_LT_EOF 6971*a376eb32SXin Li], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 6972*a376eb32SXin Lipackage foo 6973*a376eb32SXin Lifunc foo() { 6974*a376eb32SXin Li} 6975*a376eb32SXin Li_LT_EOF 6976*a376eb32SXin Li]) 6977*a376eb32SXin Li 6978*a376eb32SXin Li_lt_libdeps_save_CFLAGS=$CFLAGS 6979*a376eb32SXin Licase "$CC $CFLAGS " in #( 6980*a376eb32SXin Li*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 6981*a376eb32SXin Li*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 6982*a376eb32SXin Li*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 6983*a376eb32SXin Liesac 6984*a376eb32SXin Li 6985*a376eb32SXin Lidnl Parse the compiler output and extract the necessary 6986*a376eb32SXin Lidnl objects, libraries and library flags. 6987*a376eb32SXin Liif AC_TRY_EVAL(ac_compile); then 6988*a376eb32SXin Li # Parse the compiler output and extract the necessary 6989*a376eb32SXin Li # objects, libraries and library flags. 6990*a376eb32SXin Li 6991*a376eb32SXin Li # Sentinel used to keep track of whether or not we are before 6992*a376eb32SXin Li # the conftest object file. 6993*a376eb32SXin Li pre_test_object_deps_done=no 6994*a376eb32SXin Li 6995*a376eb32SXin Li for p in `eval "$output_verbose_link_cmd"`; do 6996*a376eb32SXin Li case ${prev}${p} in 6997*a376eb32SXin Li 6998*a376eb32SXin Li -L* | -R* | -l*) 6999*a376eb32SXin Li # Some compilers place space between "-{L,R}" and the path. 7000*a376eb32SXin Li # Remove the space. 7001*a376eb32SXin Li if test $p = "-L" || 7002*a376eb32SXin Li test $p = "-R"; then 7003*a376eb32SXin Li prev=$p 7004*a376eb32SXin Li continue 7005*a376eb32SXin Li fi 7006*a376eb32SXin Li 7007*a376eb32SXin Li # Expand the sysroot to ease extracting the directories later. 7008*a376eb32SXin Li if test -z "$prev"; then 7009*a376eb32SXin Li case $p in 7010*a376eb32SXin Li -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 7011*a376eb32SXin Li -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 7012*a376eb32SXin Li -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 7013*a376eb32SXin Li esac 7014*a376eb32SXin Li fi 7015*a376eb32SXin Li case $p in 7016*a376eb32SXin Li =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 7017*a376eb32SXin Li esac 7018*a376eb32SXin Li if test "$pre_test_object_deps_done" = no; then 7019*a376eb32SXin Li case ${prev} in 7020*a376eb32SXin Li -L | -R) 7021*a376eb32SXin Li # Internal compiler library paths should come after those 7022*a376eb32SXin Li # provided the user. The postdeps already come after the 7023*a376eb32SXin Li # user supplied libs so there is no need to process them. 7024*a376eb32SXin Li if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 7025*a376eb32SXin Li _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 7026*a376eb32SXin Li else 7027*a376eb32SXin Li _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 7028*a376eb32SXin Li fi 7029*a376eb32SXin Li ;; 7030*a376eb32SXin Li # The "-l" case would never come before the object being 7031*a376eb32SXin Li # linked, so don't bother handling this case. 7032*a376eb32SXin Li esac 7033*a376eb32SXin Li else 7034*a376eb32SXin Li if test -z "$_LT_TAGVAR(postdeps, $1)"; then 7035*a376eb32SXin Li _LT_TAGVAR(postdeps, $1)="${prev}${p}" 7036*a376eb32SXin Li else 7037*a376eb32SXin Li _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 7038*a376eb32SXin Li fi 7039*a376eb32SXin Li fi 7040*a376eb32SXin Li prev= 7041*a376eb32SXin Li ;; 7042*a376eb32SXin Li 7043*a376eb32SXin Li *.lto.$objext) ;; # Ignore GCC LTO objects 7044*a376eb32SXin Li *.$objext) 7045*a376eb32SXin Li # This assumes that the test object file only shows up 7046*a376eb32SXin Li # once in the compiler output. 7047*a376eb32SXin Li if test "$p" = "conftest.$objext"; then 7048*a376eb32SXin Li pre_test_object_deps_done=yes 7049*a376eb32SXin Li continue 7050*a376eb32SXin Li fi 7051*a376eb32SXin Li 7052*a376eb32SXin Li if test "$pre_test_object_deps_done" = no; then 7053*a376eb32SXin Li if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7054*a376eb32SXin Li _LT_TAGVAR(predep_objects, $1)="$p" 7055*a376eb32SXin Li else 7056*a376eb32SXin Li _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 7057*a376eb32SXin Li fi 7058*a376eb32SXin Li else 7059*a376eb32SXin Li if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7060*a376eb32SXin Li _LT_TAGVAR(postdep_objects, $1)="$p" 7061*a376eb32SXin Li else 7062*a376eb32SXin Li _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7063*a376eb32SXin Li fi 7064*a376eb32SXin Li fi 7065*a376eb32SXin Li ;; 7066*a376eb32SXin Li 7067*a376eb32SXin Li *) ;; # Ignore the rest. 7068*a376eb32SXin Li 7069*a376eb32SXin Li esac 7070*a376eb32SXin Li done 7071*a376eb32SXin Li 7072*a376eb32SXin Li # Clean up. 7073*a376eb32SXin Li rm -f a.out a.exe 7074*a376eb32SXin Lielse 7075*a376eb32SXin Li echo "libtool.m4: error: problem compiling $1 test program" 7076*a376eb32SXin Lifi 7077*a376eb32SXin Li 7078*a376eb32SXin Li$RM -f confest.$objext 7079*a376eb32SXin LiCFLAGS=$_lt_libdeps_save_CFLAGS 7080*a376eb32SXin Li 7081*a376eb32SXin Li# PORTME: override above test on systems where it is broken 7082*a376eb32SXin Lim4_if([$1], [CXX], 7083*a376eb32SXin Li[case $host_os in 7084*a376eb32SXin Liinterix[[3-9]]*) 7085*a376eb32SXin Li # Interix 3.5 installs completely hosed .la files for C++, so rather than 7086*a376eb32SXin Li # hack all around it, let's just trust "g++" to DTRT. 7087*a376eb32SXin Li _LT_TAGVAR(predep_objects,$1)= 7088*a376eb32SXin Li _LT_TAGVAR(postdep_objects,$1)= 7089*a376eb32SXin Li _LT_TAGVAR(postdeps,$1)= 7090*a376eb32SXin Li ;; 7091*a376eb32SXin Li 7092*a376eb32SXin Lilinux*) 7093*a376eb32SXin Li case `$CC -V 2>&1 | sed 5q` in 7094*a376eb32SXin Li *Sun\ C*) 7095*a376eb32SXin Li # Sun C++ 5.9 7096*a376eb32SXin Li 7097*a376eb32SXin Li # The more standards-conforming stlport4 library is 7098*a376eb32SXin Li # incompatible with the Cstd library. Avoid specifying 7099*a376eb32SXin Li # it if it's in CXXFLAGS. Ignore libCrun as 7100*a376eb32SXin Li # -library=stlport4 depends on it. 7101*a376eb32SXin Li case " $CXX $CXXFLAGS " in 7102*a376eb32SXin Li *" -library=stlport4 "*) 7103*a376eb32SXin Li solaris_use_stlport4=yes 7104*a376eb32SXin Li ;; 7105*a376eb32SXin Li esac 7106*a376eb32SXin Li 7107*a376eb32SXin Li if test "$solaris_use_stlport4" != yes; then 7108*a376eb32SXin Li _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 7109*a376eb32SXin Li fi 7110*a376eb32SXin Li ;; 7111*a376eb32SXin Li esac 7112*a376eb32SXin Li ;; 7113*a376eb32SXin Li 7114*a376eb32SXin Lisolaris*) 7115*a376eb32SXin Li case $cc_basename in 7116*a376eb32SXin Li CC* | sunCC*) 7117*a376eb32SXin Li # The more standards-conforming stlport4 library is 7118*a376eb32SXin Li # incompatible with the Cstd library. Avoid specifying 7119*a376eb32SXin Li # it if it's in CXXFLAGS. Ignore libCrun as 7120*a376eb32SXin Li # -library=stlport4 depends on it. 7121*a376eb32SXin Li case " $CXX $CXXFLAGS " in 7122*a376eb32SXin Li *" -library=stlport4 "*) 7123*a376eb32SXin Li solaris_use_stlport4=yes 7124*a376eb32SXin Li ;; 7125*a376eb32SXin Li esac 7126*a376eb32SXin Li 7127*a376eb32SXin Li # Adding this requires a known-good setup of shared libraries for 7128*a376eb32SXin Li # Sun compiler versions before 5.6, else PIC objects from an old 7129*a376eb32SXin Li # archive will be linked into the output, leading to subtle bugs. 7130*a376eb32SXin Li if test "$solaris_use_stlport4" != yes; then 7131*a376eb32SXin Li _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 7132*a376eb32SXin Li fi 7133*a376eb32SXin Li ;; 7134*a376eb32SXin Li esac 7135*a376eb32SXin Li ;; 7136*a376eb32SXin Liesac 7137*a376eb32SXin Li]) 7138*a376eb32SXin Li 7139*a376eb32SXin Licase " $_LT_TAGVAR(postdeps, $1) " in 7140*a376eb32SXin Li*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 7141*a376eb32SXin Liesac 7142*a376eb32SXin Li _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7143*a376eb32SXin Liif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7144*a376eb32SXin Li _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 7145*a376eb32SXin Lifi 7146*a376eb32SXin Li_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7147*a376eb32SXin Li [The directories searched by this compiler when creating a shared library]) 7148*a376eb32SXin Li_LT_TAGDECL([], [predep_objects], [1], 7149*a376eb32SXin Li [Dependencies to place before and after the objects being linked to 7150*a376eb32SXin Li create a shared library]) 7151*a376eb32SXin Li_LT_TAGDECL([], [postdep_objects], [1]) 7152*a376eb32SXin Li_LT_TAGDECL([], [predeps], [1]) 7153*a376eb32SXin Li_LT_TAGDECL([], [postdeps], [1]) 7154*a376eb32SXin Li_LT_TAGDECL([], [compiler_lib_search_path], [1], 7155*a376eb32SXin Li [The library search path used internally by the compiler when linking 7156*a376eb32SXin Li a shared library]) 7157*a376eb32SXin Li])# _LT_SYS_HIDDEN_LIBDEPS 7158*a376eb32SXin Li 7159*a376eb32SXin Li 7160*a376eb32SXin Li# _LT_LANG_F77_CONFIG([TAG]) 7161*a376eb32SXin Li# -------------------------- 7162*a376eb32SXin Li# Ensure that the configuration variables for a Fortran 77 compiler are 7163*a376eb32SXin Li# suitably defined. These variables are subsequently used by _LT_CONFIG 7164*a376eb32SXin Li# to write the compiler configuration to `libtool'. 7165*a376eb32SXin Lim4_defun([_LT_LANG_F77_CONFIG], 7166*a376eb32SXin Li[AC_LANG_PUSH(Fortran 77) 7167*a376eb32SXin Liif test -z "$F77" || test "X$F77" = "Xno"; then 7168*a376eb32SXin Li _lt_disable_F77=yes 7169*a376eb32SXin Lifi 7170*a376eb32SXin Li 7171*a376eb32SXin Li_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7172*a376eb32SXin Li_LT_TAGVAR(allow_undefined_flag, $1)= 7173*a376eb32SXin Li_LT_TAGVAR(always_export_symbols, $1)=no 7174*a376eb32SXin Li_LT_TAGVAR(archive_expsym_cmds, $1)= 7175*a376eb32SXin Li_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7176*a376eb32SXin Li_LT_TAGVAR(hardcode_direct, $1)=no 7177*a376eb32SXin Li_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7178*a376eb32SXin Li_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7179*a376eb32SXin Li_LT_TAGVAR(hardcode_libdir_separator, $1)= 7180*a376eb32SXin Li_LT_TAGVAR(hardcode_minus_L, $1)=no 7181*a376eb32SXin Li_LT_TAGVAR(hardcode_automatic, $1)=no 7182*a376eb32SXin Li_LT_TAGVAR(inherit_rpath, $1)=no 7183*a376eb32SXin Li_LT_TAGVAR(module_cmds, $1)= 7184*a376eb32SXin Li_LT_TAGVAR(module_expsym_cmds, $1)= 7185*a376eb32SXin Li_LT_TAGVAR(link_all_deplibs, $1)=unknown 7186*a376eb32SXin Li_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7187*a376eb32SXin Li_LT_TAGVAR(reload_flag, $1)=$reload_flag 7188*a376eb32SXin Li_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7189*a376eb32SXin Li_LT_TAGVAR(no_undefined_flag, $1)= 7190*a376eb32SXin Li_LT_TAGVAR(whole_archive_flag_spec, $1)= 7191*a376eb32SXin Li_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7192*a376eb32SXin Li 7193*a376eb32SXin Li# Source file extension for f77 test sources. 7194*a376eb32SXin Liac_ext=f 7195*a376eb32SXin Li 7196*a376eb32SXin Li# Object file extension for compiled f77 test sources. 7197*a376eb32SXin Liobjext=o 7198*a376eb32SXin Li_LT_TAGVAR(objext, $1)=$objext 7199*a376eb32SXin Li 7200*a376eb32SXin Li# No sense in running all these tests if we already determined that 7201*a376eb32SXin Li# the F77 compiler isn't working. Some variables (like enable_shared) 7202*a376eb32SXin Li# are currently assumed to apply to all compilers on this platform, 7203*a376eb32SXin Li# and will be corrupted by setting them based on a non-working compiler. 7204*a376eb32SXin Liif test "$_lt_disable_F77" != yes; then 7205*a376eb32SXin Li # Code to be used in simple compile tests 7206*a376eb32SXin Li lt_simple_compile_test_code="\ 7207*a376eb32SXin Li subroutine t 7208*a376eb32SXin Li return 7209*a376eb32SXin Li end 7210*a376eb32SXin Li" 7211*a376eb32SXin Li 7212*a376eb32SXin Li # Code to be used in simple link tests 7213*a376eb32SXin Li lt_simple_link_test_code="\ 7214*a376eb32SXin Li program t 7215*a376eb32SXin Li end 7216*a376eb32SXin Li" 7217*a376eb32SXin Li 7218*a376eb32SXin Li # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7219*a376eb32SXin Li _LT_TAG_COMPILER 7220*a376eb32SXin Li 7221*a376eb32SXin Li # save warnings/boilerplate of simple test code 7222*a376eb32SXin Li _LT_COMPILER_BOILERPLATE 7223*a376eb32SXin Li _LT_LINKER_BOILERPLATE 7224*a376eb32SXin Li 7225*a376eb32SXin Li # Allow CC to be a program name with arguments. 7226*a376eb32SXin Li lt_save_CC="$CC" 7227*a376eb32SXin Li lt_save_GCC=$GCC 7228*a376eb32SXin Li lt_save_CFLAGS=$CFLAGS 7229*a376eb32SXin Li CC=${F77-"f77"} 7230*a376eb32SXin Li CFLAGS=$FFLAGS 7231*a376eb32SXin Li compiler=$CC 7232*a376eb32SXin Li _LT_TAGVAR(compiler, $1)=$CC 7233*a376eb32SXin Li _LT_CC_BASENAME([$compiler]) 7234*a376eb32SXin Li GCC=$G77 7235*a376eb32SXin Li if test -n "$compiler"; then 7236*a376eb32SXin Li AC_MSG_CHECKING([if libtool supports shared libraries]) 7237*a376eb32SXin Li AC_MSG_RESULT([$can_build_shared]) 7238*a376eb32SXin Li 7239*a376eb32SXin Li AC_MSG_CHECKING([whether to build shared libraries]) 7240*a376eb32SXin Li test "$can_build_shared" = "no" && enable_shared=no 7241*a376eb32SXin Li 7242*a376eb32SXin Li # On AIX, shared libraries and static libraries use the same namespace, and 7243*a376eb32SXin Li # are all built from PIC. 7244*a376eb32SXin Li case $host_os in 7245*a376eb32SXin Li aix3*) 7246*a376eb32SXin Li test "$enable_shared" = yes && enable_static=no 7247*a376eb32SXin Li if test -n "$RANLIB"; then 7248*a376eb32SXin Li archive_cmds="$archive_cmds~\$RANLIB \$lib" 7249*a376eb32SXin Li postinstall_cmds='$RANLIB $lib' 7250*a376eb32SXin Li fi 7251*a376eb32SXin Li ;; 7252*a376eb32SXin Li aix[[4-9]]*) 7253*a376eb32SXin Li if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7254*a376eb32SXin Li test "$enable_shared" = yes && enable_static=no 7255*a376eb32SXin Li fi 7256*a376eb32SXin Li ;; 7257*a376eb32SXin Li esac 7258*a376eb32SXin Li AC_MSG_RESULT([$enable_shared]) 7259*a376eb32SXin Li 7260*a376eb32SXin Li AC_MSG_CHECKING([whether to build static libraries]) 7261*a376eb32SXin Li # Make sure either enable_shared or enable_static is yes. 7262*a376eb32SXin Li test "$enable_shared" = yes || enable_static=yes 7263*a376eb32SXin Li AC_MSG_RESULT([$enable_static]) 7264*a376eb32SXin Li 7265*a376eb32SXin Li _LT_TAGVAR(GCC, $1)="$G77" 7266*a376eb32SXin Li _LT_TAGVAR(LD, $1)="$LD" 7267*a376eb32SXin Li 7268*a376eb32SXin Li ## CAVEAT EMPTOR: 7269*a376eb32SXin Li ## There is no encapsulation within the following macros, do not change 7270*a376eb32SXin Li ## the running order or otherwise move them around unless you know exactly 7271*a376eb32SXin Li ## what you are doing... 7272*a376eb32SXin Li _LT_COMPILER_PIC($1) 7273*a376eb32SXin Li _LT_COMPILER_C_O($1) 7274*a376eb32SXin Li _LT_COMPILER_FILE_LOCKS($1) 7275*a376eb32SXin Li _LT_LINKER_SHLIBS($1) 7276*a376eb32SXin Li _LT_SYS_DYNAMIC_LINKER($1) 7277*a376eb32SXin Li _LT_LINKER_HARDCODE_LIBPATH($1) 7278*a376eb32SXin Li 7279*a376eb32SXin Li _LT_CONFIG($1) 7280*a376eb32SXin Li fi # test -n "$compiler" 7281*a376eb32SXin Li 7282*a376eb32SXin Li GCC=$lt_save_GCC 7283*a376eb32SXin Li CC="$lt_save_CC" 7284*a376eb32SXin Li CFLAGS="$lt_save_CFLAGS" 7285*a376eb32SXin Lifi # test "$_lt_disable_F77" != yes 7286*a376eb32SXin Li 7287*a376eb32SXin LiAC_LANG_POP 7288*a376eb32SXin Li])# _LT_LANG_F77_CONFIG 7289*a376eb32SXin Li 7290*a376eb32SXin Li 7291*a376eb32SXin Li# _LT_LANG_FC_CONFIG([TAG]) 7292*a376eb32SXin Li# ------------------------- 7293*a376eb32SXin Li# Ensure that the configuration variables for a Fortran compiler are 7294*a376eb32SXin Li# suitably defined. These variables are subsequently used by _LT_CONFIG 7295*a376eb32SXin Li# to write the compiler configuration to `libtool'. 7296*a376eb32SXin Lim4_defun([_LT_LANG_FC_CONFIG], 7297*a376eb32SXin Li[AC_LANG_PUSH(Fortran) 7298*a376eb32SXin Li 7299*a376eb32SXin Liif test -z "$FC" || test "X$FC" = "Xno"; then 7300*a376eb32SXin Li _lt_disable_FC=yes 7301*a376eb32SXin Lifi 7302*a376eb32SXin Li 7303*a376eb32SXin Li_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7304*a376eb32SXin Li_LT_TAGVAR(allow_undefined_flag, $1)= 7305*a376eb32SXin Li_LT_TAGVAR(always_export_symbols, $1)=no 7306*a376eb32SXin Li_LT_TAGVAR(archive_expsym_cmds, $1)= 7307*a376eb32SXin Li_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7308*a376eb32SXin Li_LT_TAGVAR(hardcode_direct, $1)=no 7309*a376eb32SXin Li_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7310*a376eb32SXin Li_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7311*a376eb32SXin Li_LT_TAGVAR(hardcode_libdir_separator, $1)= 7312*a376eb32SXin Li_LT_TAGVAR(hardcode_minus_L, $1)=no 7313*a376eb32SXin Li_LT_TAGVAR(hardcode_automatic, $1)=no 7314*a376eb32SXin Li_LT_TAGVAR(inherit_rpath, $1)=no 7315*a376eb32SXin Li_LT_TAGVAR(module_cmds, $1)= 7316*a376eb32SXin Li_LT_TAGVAR(module_expsym_cmds, $1)= 7317*a376eb32SXin Li_LT_TAGVAR(link_all_deplibs, $1)=unknown 7318*a376eb32SXin Li_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7319*a376eb32SXin Li_LT_TAGVAR(reload_flag, $1)=$reload_flag 7320*a376eb32SXin Li_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7321*a376eb32SXin Li_LT_TAGVAR(no_undefined_flag, $1)= 7322*a376eb32SXin Li_LT_TAGVAR(whole_archive_flag_spec, $1)= 7323*a376eb32SXin Li_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7324*a376eb32SXin Li 7325*a376eb32SXin Li# Source file extension for fc test sources. 7326*a376eb32SXin Liac_ext=${ac_fc_srcext-f} 7327*a376eb32SXin Li 7328*a376eb32SXin Li# Object file extension for compiled fc test sources. 7329*a376eb32SXin Liobjext=o 7330*a376eb32SXin Li_LT_TAGVAR(objext, $1)=$objext 7331*a376eb32SXin Li 7332*a376eb32SXin Li# No sense in running all these tests if we already determined that 7333*a376eb32SXin Li# the FC compiler isn't working. Some variables (like enable_shared) 7334*a376eb32SXin Li# are currently assumed to apply to all compilers on this platform, 7335*a376eb32SXin Li# and will be corrupted by setting them based on a non-working compiler. 7336*a376eb32SXin Liif test "$_lt_disable_FC" != yes; then 7337*a376eb32SXin Li # Code to be used in simple compile tests 7338*a376eb32SXin Li lt_simple_compile_test_code="\ 7339*a376eb32SXin Li subroutine t 7340*a376eb32SXin Li return 7341*a376eb32SXin Li end 7342*a376eb32SXin Li" 7343*a376eb32SXin Li 7344*a376eb32SXin Li # Code to be used in simple link tests 7345*a376eb32SXin Li lt_simple_link_test_code="\ 7346*a376eb32SXin Li program t 7347*a376eb32SXin Li end 7348*a376eb32SXin Li" 7349*a376eb32SXin Li 7350*a376eb32SXin Li # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7351*a376eb32SXin Li _LT_TAG_COMPILER 7352*a376eb32SXin Li 7353*a376eb32SXin Li # save warnings/boilerplate of simple test code 7354*a376eb32SXin Li _LT_COMPILER_BOILERPLATE 7355*a376eb32SXin Li _LT_LINKER_BOILERPLATE 7356*a376eb32SXin Li 7357*a376eb32SXin Li # Allow CC to be a program name with arguments. 7358*a376eb32SXin Li lt_save_CC="$CC" 7359*a376eb32SXin Li lt_save_GCC=$GCC 7360*a376eb32SXin Li lt_save_CFLAGS=$CFLAGS 7361*a376eb32SXin Li CC=${FC-"f95"} 7362*a376eb32SXin Li CFLAGS=$FCFLAGS 7363*a376eb32SXin Li compiler=$CC 7364*a376eb32SXin Li GCC=$ac_cv_fc_compiler_gnu 7365*a376eb32SXin Li 7366*a376eb32SXin Li _LT_TAGVAR(compiler, $1)=$CC 7367*a376eb32SXin Li _LT_CC_BASENAME([$compiler]) 7368*a376eb32SXin Li 7369*a376eb32SXin Li if test -n "$compiler"; then 7370*a376eb32SXin Li AC_MSG_CHECKING([if libtool supports shared libraries]) 7371*a376eb32SXin Li AC_MSG_RESULT([$can_build_shared]) 7372*a376eb32SXin Li 7373*a376eb32SXin Li AC_MSG_CHECKING([whether to build shared libraries]) 7374*a376eb32SXin Li test "$can_build_shared" = "no" && enable_shared=no 7375*a376eb32SXin Li 7376*a376eb32SXin Li # On AIX, shared libraries and static libraries use the same namespace, and 7377*a376eb32SXin Li # are all built from PIC. 7378*a376eb32SXin Li case $host_os in 7379*a376eb32SXin Li aix3*) 7380*a376eb32SXin Li test "$enable_shared" = yes && enable_static=no 7381*a376eb32SXin Li if test -n "$RANLIB"; then 7382*a376eb32SXin Li archive_cmds="$archive_cmds~\$RANLIB \$lib" 7383*a376eb32SXin Li postinstall_cmds='$RANLIB $lib' 7384*a376eb32SXin Li fi 7385*a376eb32SXin Li ;; 7386*a376eb32SXin Li aix[[4-9]]*) 7387*a376eb32SXin Li if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7388*a376eb32SXin Li test "$enable_shared" = yes && enable_static=no 7389*a376eb32SXin Li fi 7390*a376eb32SXin Li ;; 7391*a376eb32SXin Li esac 7392*a376eb32SXin Li AC_MSG_RESULT([$enable_shared]) 7393*a376eb32SXin Li 7394*a376eb32SXin Li AC_MSG_CHECKING([whether to build static libraries]) 7395*a376eb32SXin Li # Make sure either enable_shared or enable_static is yes. 7396*a376eb32SXin Li test "$enable_shared" = yes || enable_static=yes 7397*a376eb32SXin Li AC_MSG_RESULT([$enable_static]) 7398*a376eb32SXin Li 7399*a376eb32SXin Li _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 7400*a376eb32SXin Li _LT_TAGVAR(LD, $1)="$LD" 7401*a376eb32SXin Li 7402*a376eb32SXin Li ## CAVEAT EMPTOR: 7403*a376eb32SXin Li ## There is no encapsulation within the following macros, do not change 7404*a376eb32SXin Li ## the running order or otherwise move them around unless you know exactly 7405*a376eb32SXin Li ## what you are doing... 7406*a376eb32SXin Li _LT_SYS_HIDDEN_LIBDEPS($1) 7407*a376eb32SXin Li _LT_COMPILER_PIC($1) 7408*a376eb32SXin Li _LT_COMPILER_C_O($1) 7409*a376eb32SXin Li _LT_COMPILER_FILE_LOCKS($1) 7410*a376eb32SXin Li _LT_LINKER_SHLIBS($1) 7411*a376eb32SXin Li _LT_SYS_DYNAMIC_LINKER($1) 7412*a376eb32SXin Li _LT_LINKER_HARDCODE_LIBPATH($1) 7413*a376eb32SXin Li 7414*a376eb32SXin Li _LT_CONFIG($1) 7415*a376eb32SXin Li fi # test -n "$compiler" 7416*a376eb32SXin Li 7417*a376eb32SXin Li GCC=$lt_save_GCC 7418*a376eb32SXin Li CC=$lt_save_CC 7419*a376eb32SXin Li CFLAGS=$lt_save_CFLAGS 7420*a376eb32SXin Lifi # test "$_lt_disable_FC" != yes 7421*a376eb32SXin Li 7422*a376eb32SXin LiAC_LANG_POP 7423*a376eb32SXin Li])# _LT_LANG_FC_CONFIG 7424*a376eb32SXin Li 7425*a376eb32SXin Li 7426*a376eb32SXin Li# _LT_LANG_GCJ_CONFIG([TAG]) 7427*a376eb32SXin Li# -------------------------- 7428*a376eb32SXin Li# Ensure that the configuration variables for the GNU Java Compiler compiler 7429*a376eb32SXin Li# are suitably defined. These variables are subsequently used by _LT_CONFIG 7430*a376eb32SXin Li# to write the compiler configuration to `libtool'. 7431*a376eb32SXin Lim4_defun([_LT_LANG_GCJ_CONFIG], 7432*a376eb32SXin Li[AC_REQUIRE([LT_PROG_GCJ])dnl 7433*a376eb32SXin LiAC_LANG_SAVE 7434*a376eb32SXin Li 7435*a376eb32SXin Li# Source file extension for Java test sources. 7436*a376eb32SXin Liac_ext=java 7437*a376eb32SXin Li 7438*a376eb32SXin Li# Object file extension for compiled Java test sources. 7439*a376eb32SXin Liobjext=o 7440*a376eb32SXin Li_LT_TAGVAR(objext, $1)=$objext 7441*a376eb32SXin Li 7442*a376eb32SXin Li# Code to be used in simple compile tests 7443*a376eb32SXin Lilt_simple_compile_test_code="class foo {}" 7444*a376eb32SXin Li 7445*a376eb32SXin Li# Code to be used in simple link tests 7446*a376eb32SXin Lilt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 7447*a376eb32SXin Li 7448*a376eb32SXin Li# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7449*a376eb32SXin Li_LT_TAG_COMPILER 7450*a376eb32SXin Li 7451*a376eb32SXin Li# save warnings/boilerplate of simple test code 7452*a376eb32SXin Li_LT_COMPILER_BOILERPLATE 7453*a376eb32SXin Li_LT_LINKER_BOILERPLATE 7454*a376eb32SXin Li 7455*a376eb32SXin Li# Allow CC to be a program name with arguments. 7456*a376eb32SXin Lilt_save_CC=$CC 7457*a376eb32SXin Lilt_save_CFLAGS=$CFLAGS 7458*a376eb32SXin Lilt_save_GCC=$GCC 7459*a376eb32SXin LiGCC=yes 7460*a376eb32SXin LiCC=${GCJ-"gcj"} 7461*a376eb32SXin LiCFLAGS=$GCJFLAGS 7462*a376eb32SXin Licompiler=$CC 7463*a376eb32SXin Li_LT_TAGVAR(compiler, $1)=$CC 7464*a376eb32SXin Li_LT_TAGVAR(LD, $1)="$LD" 7465*a376eb32SXin Li_LT_CC_BASENAME([$compiler]) 7466*a376eb32SXin Li 7467*a376eb32SXin Li# GCJ did not exist at the time GCC didn't implicitly link libc in. 7468*a376eb32SXin Li_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7469*a376eb32SXin Li 7470*a376eb32SXin Li_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7471*a376eb32SXin Li_LT_TAGVAR(reload_flag, $1)=$reload_flag 7472*a376eb32SXin Li_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7473*a376eb32SXin Li 7474*a376eb32SXin Li## CAVEAT EMPTOR: 7475*a376eb32SXin Li## There is no encapsulation within the following macros, do not change 7476*a376eb32SXin Li## the running order or otherwise move them around unless you know exactly 7477*a376eb32SXin Li## what you are doing... 7478*a376eb32SXin Liif test -n "$compiler"; then 7479*a376eb32SXin Li _LT_COMPILER_NO_RTTI($1) 7480*a376eb32SXin Li _LT_COMPILER_PIC($1) 7481*a376eb32SXin Li _LT_COMPILER_C_O($1) 7482*a376eb32SXin Li _LT_COMPILER_FILE_LOCKS($1) 7483*a376eb32SXin Li _LT_LINKER_SHLIBS($1) 7484*a376eb32SXin Li _LT_LINKER_HARDCODE_LIBPATH($1) 7485*a376eb32SXin Li 7486*a376eb32SXin Li _LT_CONFIG($1) 7487*a376eb32SXin Lifi 7488*a376eb32SXin Li 7489*a376eb32SXin LiAC_LANG_RESTORE 7490*a376eb32SXin Li 7491*a376eb32SXin LiGCC=$lt_save_GCC 7492*a376eb32SXin LiCC=$lt_save_CC 7493*a376eb32SXin LiCFLAGS=$lt_save_CFLAGS 7494*a376eb32SXin Li])# _LT_LANG_GCJ_CONFIG 7495*a376eb32SXin Li 7496*a376eb32SXin Li 7497*a376eb32SXin Li# _LT_LANG_GO_CONFIG([TAG]) 7498*a376eb32SXin Li# -------------------------- 7499*a376eb32SXin Li# Ensure that the configuration variables for the GNU Go compiler 7500*a376eb32SXin Li# are suitably defined. These variables are subsequently used by _LT_CONFIG 7501*a376eb32SXin Li# to write the compiler configuration to `libtool'. 7502*a376eb32SXin Lim4_defun([_LT_LANG_GO_CONFIG], 7503*a376eb32SXin Li[AC_REQUIRE([LT_PROG_GO])dnl 7504*a376eb32SXin LiAC_LANG_SAVE 7505*a376eb32SXin Li 7506*a376eb32SXin Li# Source file extension for Go test sources. 7507*a376eb32SXin Liac_ext=go 7508*a376eb32SXin Li 7509*a376eb32SXin Li# Object file extension for compiled Go test sources. 7510*a376eb32SXin Liobjext=o 7511*a376eb32SXin Li_LT_TAGVAR(objext, $1)=$objext 7512*a376eb32SXin Li 7513*a376eb32SXin Li# Code to be used in simple compile tests 7514*a376eb32SXin Lilt_simple_compile_test_code="package main; func main() { }" 7515*a376eb32SXin Li 7516*a376eb32SXin Li# Code to be used in simple link tests 7517*a376eb32SXin Lilt_simple_link_test_code='package main; func main() { }' 7518*a376eb32SXin Li 7519*a376eb32SXin Li# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7520*a376eb32SXin Li_LT_TAG_COMPILER 7521*a376eb32SXin Li 7522*a376eb32SXin Li# save warnings/boilerplate of simple test code 7523*a376eb32SXin Li_LT_COMPILER_BOILERPLATE 7524*a376eb32SXin Li_LT_LINKER_BOILERPLATE 7525*a376eb32SXin Li 7526*a376eb32SXin Li# Allow CC to be a program name with arguments. 7527*a376eb32SXin Lilt_save_CC=$CC 7528*a376eb32SXin Lilt_save_CFLAGS=$CFLAGS 7529*a376eb32SXin Lilt_save_GCC=$GCC 7530*a376eb32SXin LiGCC=yes 7531*a376eb32SXin LiCC=${GOC-"gccgo"} 7532*a376eb32SXin LiCFLAGS=$GOFLAGS 7533*a376eb32SXin Licompiler=$CC 7534*a376eb32SXin Li_LT_TAGVAR(compiler, $1)=$CC 7535*a376eb32SXin Li_LT_TAGVAR(LD, $1)="$LD" 7536*a376eb32SXin Li_LT_CC_BASENAME([$compiler]) 7537*a376eb32SXin Li 7538*a376eb32SXin Li# Go did not exist at the time GCC didn't implicitly link libc in. 7539*a376eb32SXin Li_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7540*a376eb32SXin Li 7541*a376eb32SXin Li_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7542*a376eb32SXin Li_LT_TAGVAR(reload_flag, $1)=$reload_flag 7543*a376eb32SXin Li_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7544*a376eb32SXin Li 7545*a376eb32SXin Li## CAVEAT EMPTOR: 7546*a376eb32SXin Li## There is no encapsulation within the following macros, do not change 7547*a376eb32SXin Li## the running order or otherwise move them around unless you know exactly 7548*a376eb32SXin Li## what you are doing... 7549*a376eb32SXin Liif test -n "$compiler"; then 7550*a376eb32SXin Li _LT_COMPILER_NO_RTTI($1) 7551*a376eb32SXin Li _LT_COMPILER_PIC($1) 7552*a376eb32SXin Li _LT_COMPILER_C_O($1) 7553*a376eb32SXin Li _LT_COMPILER_FILE_LOCKS($1) 7554*a376eb32SXin Li _LT_LINKER_SHLIBS($1) 7555*a376eb32SXin Li _LT_LINKER_HARDCODE_LIBPATH($1) 7556*a376eb32SXin Li 7557*a376eb32SXin Li _LT_CONFIG($1) 7558*a376eb32SXin Lifi 7559*a376eb32SXin Li 7560*a376eb32SXin LiAC_LANG_RESTORE 7561*a376eb32SXin Li 7562*a376eb32SXin LiGCC=$lt_save_GCC 7563*a376eb32SXin LiCC=$lt_save_CC 7564*a376eb32SXin LiCFLAGS=$lt_save_CFLAGS 7565*a376eb32SXin Li])# _LT_LANG_GO_CONFIG 7566*a376eb32SXin Li 7567*a376eb32SXin Li 7568*a376eb32SXin Li# _LT_LANG_RC_CONFIG([TAG]) 7569*a376eb32SXin Li# ------------------------- 7570*a376eb32SXin Li# Ensure that the configuration variables for the Windows resource compiler 7571*a376eb32SXin Li# are suitably defined. These variables are subsequently used by _LT_CONFIG 7572*a376eb32SXin Li# to write the compiler configuration to `libtool'. 7573*a376eb32SXin Lim4_defun([_LT_LANG_RC_CONFIG], 7574*a376eb32SXin Li[AC_REQUIRE([LT_PROG_RC])dnl 7575*a376eb32SXin LiAC_LANG_SAVE 7576*a376eb32SXin Li 7577*a376eb32SXin Li# Source file extension for RC test sources. 7578*a376eb32SXin Liac_ext=rc 7579*a376eb32SXin Li 7580*a376eb32SXin Li# Object file extension for compiled RC test sources. 7581*a376eb32SXin Liobjext=o 7582*a376eb32SXin Li_LT_TAGVAR(objext, $1)=$objext 7583*a376eb32SXin Li 7584*a376eb32SXin Li# Code to be used in simple compile tests 7585*a376eb32SXin Lilt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 7586*a376eb32SXin Li 7587*a376eb32SXin Li# Code to be used in simple link tests 7588*a376eb32SXin Lilt_simple_link_test_code="$lt_simple_compile_test_code" 7589*a376eb32SXin Li 7590*a376eb32SXin Li# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7591*a376eb32SXin Li_LT_TAG_COMPILER 7592*a376eb32SXin Li 7593*a376eb32SXin Li# save warnings/boilerplate of simple test code 7594*a376eb32SXin Li_LT_COMPILER_BOILERPLATE 7595*a376eb32SXin Li_LT_LINKER_BOILERPLATE 7596*a376eb32SXin Li 7597*a376eb32SXin Li# Allow CC to be a program name with arguments. 7598*a376eb32SXin Lilt_save_CC="$CC" 7599*a376eb32SXin Lilt_save_CFLAGS=$CFLAGS 7600*a376eb32SXin Lilt_save_GCC=$GCC 7601*a376eb32SXin LiGCC= 7602*a376eb32SXin LiCC=${RC-"windres"} 7603*a376eb32SXin LiCFLAGS= 7604*a376eb32SXin Licompiler=$CC 7605*a376eb32SXin Li_LT_TAGVAR(compiler, $1)=$CC 7606*a376eb32SXin Li_LT_CC_BASENAME([$compiler]) 7607*a376eb32SXin Li_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 7608*a376eb32SXin Li 7609*a376eb32SXin Liif test -n "$compiler"; then 7610*a376eb32SXin Li : 7611*a376eb32SXin Li _LT_CONFIG($1) 7612*a376eb32SXin Lifi 7613*a376eb32SXin Li 7614*a376eb32SXin LiGCC=$lt_save_GCC 7615*a376eb32SXin LiAC_LANG_RESTORE 7616*a376eb32SXin LiCC=$lt_save_CC 7617*a376eb32SXin LiCFLAGS=$lt_save_CFLAGS 7618*a376eb32SXin Li])# _LT_LANG_RC_CONFIG 7619*a376eb32SXin Li 7620*a376eb32SXin Li 7621*a376eb32SXin Li# LT_PROG_GCJ 7622*a376eb32SXin Li# ----------- 7623*a376eb32SXin LiAC_DEFUN([LT_PROG_GCJ], 7624*a376eb32SXin Li[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 7625*a376eb32SXin Li [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 7626*a376eb32SXin Li [AC_CHECK_TOOL(GCJ, gcj,) 7627*a376eb32SXin Li test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 7628*a376eb32SXin Li AC_SUBST(GCJFLAGS)])])[]dnl 7629*a376eb32SXin Li]) 7630*a376eb32SXin Li 7631*a376eb32SXin Li# Old name: 7632*a376eb32SXin LiAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 7633*a376eb32SXin Lidnl aclocal-1.4 backwards compatibility: 7634*a376eb32SXin Lidnl AC_DEFUN([LT_AC_PROG_GCJ], []) 7635*a376eb32SXin Li 7636*a376eb32SXin Li 7637*a376eb32SXin Li# LT_PROG_GO 7638*a376eb32SXin Li# ---------- 7639*a376eb32SXin LiAC_DEFUN([LT_PROG_GO], 7640*a376eb32SXin Li[AC_CHECK_TOOL(GOC, gccgo,) 7641*a376eb32SXin Li]) 7642*a376eb32SXin Li 7643*a376eb32SXin Li 7644*a376eb32SXin Li# LT_PROG_RC 7645*a376eb32SXin Li# ---------- 7646*a376eb32SXin LiAC_DEFUN([LT_PROG_RC], 7647*a376eb32SXin Li[AC_CHECK_TOOL(RC, windres,) 7648*a376eb32SXin Li]) 7649*a376eb32SXin Li 7650*a376eb32SXin Li# Old name: 7651*a376eb32SXin LiAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 7652*a376eb32SXin Lidnl aclocal-1.4 backwards compatibility: 7653*a376eb32SXin Lidnl AC_DEFUN([LT_AC_PROG_RC], []) 7654*a376eb32SXin Li 7655*a376eb32SXin Li 7656*a376eb32SXin Li# _LT_DECL_EGREP 7657*a376eb32SXin Li# -------------- 7658*a376eb32SXin Li# If we don't have a new enough Autoconf to choose the best grep 7659*a376eb32SXin Li# available, choose the one first in the user's PATH. 7660*a376eb32SXin Lim4_defun([_LT_DECL_EGREP], 7661*a376eb32SXin Li[AC_REQUIRE([AC_PROG_EGREP])dnl 7662*a376eb32SXin LiAC_REQUIRE([AC_PROG_FGREP])dnl 7663*a376eb32SXin Litest -z "$GREP" && GREP=grep 7664*a376eb32SXin Li_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 7665*a376eb32SXin Li_LT_DECL([], [EGREP], [1], [An ERE matcher]) 7666*a376eb32SXin Li_LT_DECL([], [FGREP], [1], [A literal string matcher]) 7667*a376eb32SXin Lidnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 7668*a376eb32SXin LiAC_SUBST([GREP]) 7669*a376eb32SXin Li]) 7670*a376eb32SXin Li 7671*a376eb32SXin Li 7672*a376eb32SXin Li# _LT_DECL_OBJDUMP 7673*a376eb32SXin Li# -------------- 7674*a376eb32SXin Li# If we don't have a new enough Autoconf to choose the best objdump 7675*a376eb32SXin Li# available, choose the one first in the user's PATH. 7676*a376eb32SXin Lim4_defun([_LT_DECL_OBJDUMP], 7677*a376eb32SXin Li[AC_CHECK_TOOL(OBJDUMP, objdump, false) 7678*a376eb32SXin Litest -z "$OBJDUMP" && OBJDUMP=objdump 7679*a376eb32SXin Li_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 7680*a376eb32SXin LiAC_SUBST([OBJDUMP]) 7681*a376eb32SXin Li]) 7682*a376eb32SXin Li 7683*a376eb32SXin Li# _LT_DECL_DLLTOOL 7684*a376eb32SXin Li# ---------------- 7685*a376eb32SXin Li# Ensure DLLTOOL variable is set. 7686*a376eb32SXin Lim4_defun([_LT_DECL_DLLTOOL], 7687*a376eb32SXin Li[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7688*a376eb32SXin Litest -z "$DLLTOOL" && DLLTOOL=dlltool 7689*a376eb32SXin Li_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 7690*a376eb32SXin LiAC_SUBST([DLLTOOL]) 7691*a376eb32SXin Li]) 7692*a376eb32SXin Li 7693*a376eb32SXin Li# _LT_DECL_SED 7694*a376eb32SXin Li# ------------ 7695*a376eb32SXin Li# Check for a fully-functional sed program, that truncates 7696*a376eb32SXin Li# as few characters as possible. Prefer GNU sed if found. 7697*a376eb32SXin Lim4_defun([_LT_DECL_SED], 7698*a376eb32SXin Li[AC_PROG_SED 7699*a376eb32SXin Litest -z "$SED" && SED=sed 7700*a376eb32SXin LiXsed="$SED -e 1s/^X//" 7701*a376eb32SXin Li_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 7702*a376eb32SXin Li_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 7703*a376eb32SXin Li [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 7704*a376eb32SXin Li])# _LT_DECL_SED 7705*a376eb32SXin Li 7706*a376eb32SXin Lim4_ifndef([AC_PROG_SED], [ 7707*a376eb32SXin Li############################################################ 7708*a376eb32SXin Li# NOTE: This macro has been submitted for inclusion into # 7709*a376eb32SXin Li# GNU Autoconf as AC_PROG_SED. When it is available in # 7710*a376eb32SXin Li# a released version of Autoconf we should remove this # 7711*a376eb32SXin Li# macro and use it instead. # 7712*a376eb32SXin Li############################################################ 7713*a376eb32SXin Li 7714*a376eb32SXin Lim4_defun([AC_PROG_SED], 7715*a376eb32SXin Li[AC_MSG_CHECKING([for a sed that does not truncate output]) 7716*a376eb32SXin LiAC_CACHE_VAL(lt_cv_path_SED, 7717*a376eb32SXin Li[# Loop through the user's path and test for sed and gsed. 7718*a376eb32SXin Li# Then use that list of sed's as ones to test for truncation. 7719*a376eb32SXin Lias_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7720*a376eb32SXin Lifor as_dir in $PATH 7721*a376eb32SXin Lido 7722*a376eb32SXin Li IFS=$as_save_IFS 7723*a376eb32SXin Li test -z "$as_dir" && as_dir=. 7724*a376eb32SXin Li for lt_ac_prog in sed gsed; do 7725*a376eb32SXin Li for ac_exec_ext in '' $ac_executable_extensions; do 7726*a376eb32SXin Li if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 7727*a376eb32SXin Li lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 7728*a376eb32SXin Li fi 7729*a376eb32SXin Li done 7730*a376eb32SXin Li done 7731*a376eb32SXin Lidone 7732*a376eb32SXin LiIFS=$as_save_IFS 7733*a376eb32SXin Lilt_ac_max=0 7734*a376eb32SXin Lilt_ac_count=0 7735*a376eb32SXin Li# Add /usr/xpg4/bin/sed as it is typically found on Solaris 7736*a376eb32SXin Li# along with /bin/sed that truncates output. 7737*a376eb32SXin Lifor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 7738*a376eb32SXin Li test ! -f $lt_ac_sed && continue 7739*a376eb32SXin Li cat /dev/null > conftest.in 7740*a376eb32SXin Li lt_ac_count=0 7741*a376eb32SXin Li echo $ECHO_N "0123456789$ECHO_C" >conftest.in 7742*a376eb32SXin Li # Check for GNU sed and select it if it is found. 7743*a376eb32SXin Li if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 7744*a376eb32SXin Li lt_cv_path_SED=$lt_ac_sed 7745*a376eb32SXin Li break 7746*a376eb32SXin Li fi 7747*a376eb32SXin Li while true; do 7748*a376eb32SXin Li cat conftest.in conftest.in >conftest.tmp 7749*a376eb32SXin Li mv conftest.tmp conftest.in 7750*a376eb32SXin Li cp conftest.in conftest.nl 7751*a376eb32SXin Li echo >>conftest.nl 7752*a376eb32SXin Li $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 7753*a376eb32SXin Li cmp -s conftest.out conftest.nl || break 7754*a376eb32SXin Li # 10000 chars as input seems more than enough 7755*a376eb32SXin Li test $lt_ac_count -gt 10 && break 7756*a376eb32SXin Li lt_ac_count=`expr $lt_ac_count + 1` 7757*a376eb32SXin Li if test $lt_ac_count -gt $lt_ac_max; then 7758*a376eb32SXin Li lt_ac_max=$lt_ac_count 7759*a376eb32SXin Li lt_cv_path_SED=$lt_ac_sed 7760*a376eb32SXin Li fi 7761*a376eb32SXin Li done 7762*a376eb32SXin Lidone 7763*a376eb32SXin Li]) 7764*a376eb32SXin LiSED=$lt_cv_path_SED 7765*a376eb32SXin LiAC_SUBST([SED]) 7766*a376eb32SXin LiAC_MSG_RESULT([$SED]) 7767*a376eb32SXin Li])#AC_PROG_SED 7768*a376eb32SXin Li])#m4_ifndef 7769*a376eb32SXin Li 7770*a376eb32SXin Li# Old name: 7771*a376eb32SXin LiAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 7772*a376eb32SXin Lidnl aclocal-1.4 backwards compatibility: 7773*a376eb32SXin Lidnl AC_DEFUN([LT_AC_PROG_SED], []) 7774*a376eb32SXin Li 7775*a376eb32SXin Li 7776*a376eb32SXin Li# _LT_CHECK_SHELL_FEATURES 7777*a376eb32SXin Li# ------------------------ 7778*a376eb32SXin Li# Find out whether the shell is Bourne or XSI compatible, 7779*a376eb32SXin Li# or has some other useful features. 7780*a376eb32SXin Lim4_defun([_LT_CHECK_SHELL_FEATURES], 7781*a376eb32SXin Li[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 7782*a376eb32SXin Li# Try some XSI features 7783*a376eb32SXin Lixsi_shell=no 7784*a376eb32SXin Li( _lt_dummy="a/b/c" 7785*a376eb32SXin Li test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 7786*a376eb32SXin Li = c,a/b,b/c, \ 7787*a376eb32SXin Li && eval 'test $(( 1 + 1 )) -eq 2 \ 7788*a376eb32SXin Li && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 7789*a376eb32SXin Li && xsi_shell=yes 7790*a376eb32SXin LiAC_MSG_RESULT([$xsi_shell]) 7791*a376eb32SXin Li_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 7792*a376eb32SXin Li 7793*a376eb32SXin LiAC_MSG_CHECKING([whether the shell understands "+="]) 7794*a376eb32SXin Lilt_shell_append=no 7795*a376eb32SXin Li( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 7796*a376eb32SXin Li >/dev/null 2>&1 \ 7797*a376eb32SXin Li && lt_shell_append=yes 7798*a376eb32SXin LiAC_MSG_RESULT([$lt_shell_append]) 7799*a376eb32SXin Li_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 7800*a376eb32SXin Li 7801*a376eb32SXin Liif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 7802*a376eb32SXin Li lt_unset=unset 7803*a376eb32SXin Lielse 7804*a376eb32SXin Li lt_unset=false 7805*a376eb32SXin Lifi 7806*a376eb32SXin Li_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 7807*a376eb32SXin Li 7808*a376eb32SXin Li# test EBCDIC or ASCII 7809*a376eb32SXin Licase `echo X|tr X '\101'` in 7810*a376eb32SXin Li A) # ASCII based system 7811*a376eb32SXin Li # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 7812*a376eb32SXin Li lt_SP2NL='tr \040 \012' 7813*a376eb32SXin Li lt_NL2SP='tr \015\012 \040\040' 7814*a376eb32SXin Li ;; 7815*a376eb32SXin Li *) # EBCDIC based system 7816*a376eb32SXin Li lt_SP2NL='tr \100 \n' 7817*a376eb32SXin Li lt_NL2SP='tr \r\n \100\100' 7818*a376eb32SXin Li ;; 7819*a376eb32SXin Liesac 7820*a376eb32SXin Li_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 7821*a376eb32SXin Li_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 7822*a376eb32SXin Li])# _LT_CHECK_SHELL_FEATURES 7823*a376eb32SXin Li 7824*a376eb32SXin Li 7825*a376eb32SXin Li# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 7826*a376eb32SXin Li# ------------------------------------------------------ 7827*a376eb32SXin Li# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 7828*a376eb32SXin Li# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 7829*a376eb32SXin Lim4_defun([_LT_PROG_FUNCTION_REPLACE], 7830*a376eb32SXin Li[dnl { 7831*a376eb32SXin Lised -e '/^$1 ()$/,/^} # $1 /c\ 7832*a376eb32SXin Li$1 ()\ 7833*a376eb32SXin Li{\ 7834*a376eb32SXin Lim4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 7835*a376eb32SXin Li} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 7836*a376eb32SXin Li && mv -f "$cfgfile.tmp" "$cfgfile" \ 7837*a376eb32SXin Li || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7838*a376eb32SXin Litest 0 -eq $? || _lt_function_replace_fail=: 7839*a376eb32SXin Li]) 7840*a376eb32SXin Li 7841*a376eb32SXin Li 7842*a376eb32SXin Li# _LT_PROG_REPLACE_SHELLFNS 7843*a376eb32SXin Li# ------------------------- 7844*a376eb32SXin Li# Replace existing portable implementations of several shell functions with 7845*a376eb32SXin Li# equivalent extended shell implementations where those features are available.. 7846*a376eb32SXin Lim4_defun([_LT_PROG_REPLACE_SHELLFNS], 7847*a376eb32SXin Li[if test x"$xsi_shell" = xyes; then 7848*a376eb32SXin Li _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 7849*a376eb32SXin Li case ${1} in 7850*a376eb32SXin Li */*) func_dirname_result="${1%/*}${2}" ;; 7851*a376eb32SXin Li * ) func_dirname_result="${3}" ;; 7852*a376eb32SXin Li esac]) 7853*a376eb32SXin Li 7854*a376eb32SXin Li _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 7855*a376eb32SXin Li func_basename_result="${1##*/}"]) 7856*a376eb32SXin Li 7857*a376eb32SXin Li _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 7858*a376eb32SXin Li case ${1} in 7859*a376eb32SXin Li */*) func_dirname_result="${1%/*}${2}" ;; 7860*a376eb32SXin Li * ) func_dirname_result="${3}" ;; 7861*a376eb32SXin Li esac 7862*a376eb32SXin Li func_basename_result="${1##*/}"]) 7863*a376eb32SXin Li 7864*a376eb32SXin Li _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 7865*a376eb32SXin Li # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 7866*a376eb32SXin Li # positional parameters, so assign one to ordinary parameter first. 7867*a376eb32SXin Li func_stripname_result=${3} 7868*a376eb32SXin Li func_stripname_result=${func_stripname_result#"${1}"} 7869*a376eb32SXin Li func_stripname_result=${func_stripname_result%"${2}"}]) 7870*a376eb32SXin Li 7871*a376eb32SXin Li _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 7872*a376eb32SXin Li func_split_long_opt_name=${1%%=*} 7873*a376eb32SXin Li func_split_long_opt_arg=${1#*=}]) 7874*a376eb32SXin Li 7875*a376eb32SXin Li _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 7876*a376eb32SXin Li func_split_short_opt_arg=${1#??} 7877*a376eb32SXin Li func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 7878*a376eb32SXin Li 7879*a376eb32SXin Li _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 7880*a376eb32SXin Li case ${1} in 7881*a376eb32SXin Li *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 7882*a376eb32SXin Li *) func_lo2o_result=${1} ;; 7883*a376eb32SXin Li esac]) 7884*a376eb32SXin Li 7885*a376eb32SXin Li _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 7886*a376eb32SXin Li 7887*a376eb32SXin Li _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 7888*a376eb32SXin Li 7889*a376eb32SXin Li _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 7890*a376eb32SXin Lifi 7891*a376eb32SXin Li 7892*a376eb32SXin Liif test x"$lt_shell_append" = xyes; then 7893*a376eb32SXin Li _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 7894*a376eb32SXin Li 7895*a376eb32SXin Li _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 7896*a376eb32SXin Li func_quote_for_eval "${2}" 7897*a376eb32SXin Lidnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 7898*a376eb32SXin Li eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 7899*a376eb32SXin Li 7900*a376eb32SXin Li # Save a `func_append' function call where possible by direct use of '+=' 7901*a376eb32SXin Li sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 7902*a376eb32SXin Li && mv -f "$cfgfile.tmp" "$cfgfile" \ 7903*a376eb32SXin Li || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7904*a376eb32SXin Li test 0 -eq $? || _lt_function_replace_fail=: 7905*a376eb32SXin Lielse 7906*a376eb32SXin Li # Save a `func_append' function call even when '+=' is not available 7907*a376eb32SXin Li sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 7908*a376eb32SXin Li && mv -f "$cfgfile.tmp" "$cfgfile" \ 7909*a376eb32SXin Li || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7910*a376eb32SXin Li test 0 -eq $? || _lt_function_replace_fail=: 7911*a376eb32SXin Lifi 7912*a376eb32SXin Li 7913*a376eb32SXin Liif test x"$_lt_function_replace_fail" = x":"; then 7914*a376eb32SXin Li AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 7915*a376eb32SXin Lifi 7916*a376eb32SXin Li]) 7917*a376eb32SXin Li 7918*a376eb32SXin Li# _LT_PATH_CONVERSION_FUNCTIONS 7919*a376eb32SXin Li# ----------------------------- 7920*a376eb32SXin Li# Determine which file name conversion functions should be used by 7921*a376eb32SXin Li# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 7922*a376eb32SXin Li# for certain cross-compile configurations and native mingw. 7923*a376eb32SXin Lim4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 7924*a376eb32SXin Li[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7925*a376eb32SXin LiAC_REQUIRE([AC_CANONICAL_BUILD])dnl 7926*a376eb32SXin LiAC_MSG_CHECKING([how to convert $build file names to $host format]) 7927*a376eb32SXin LiAC_CACHE_VAL(lt_cv_to_host_file_cmd, 7928*a376eb32SXin Li[case $host in 7929*a376eb32SXin Li *-*-mingw* ) 7930*a376eb32SXin Li case $build in 7931*a376eb32SXin Li *-*-mingw* ) # actually msys 7932*a376eb32SXin Li lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 7933*a376eb32SXin Li ;; 7934*a376eb32SXin Li *-*-cygwin* ) 7935*a376eb32SXin Li lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 7936*a376eb32SXin Li ;; 7937*a376eb32SXin Li * ) # otherwise, assume *nix 7938*a376eb32SXin Li lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 7939*a376eb32SXin Li ;; 7940*a376eb32SXin Li esac 7941*a376eb32SXin Li ;; 7942*a376eb32SXin Li *-*-cygwin* ) 7943*a376eb32SXin Li case $build in 7944*a376eb32SXin Li *-*-mingw* ) # actually msys 7945*a376eb32SXin Li lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 7946*a376eb32SXin Li ;; 7947*a376eb32SXin Li *-*-cygwin* ) 7948*a376eb32SXin Li lt_cv_to_host_file_cmd=func_convert_file_noop 7949*a376eb32SXin Li ;; 7950*a376eb32SXin Li * ) # otherwise, assume *nix 7951*a376eb32SXin Li lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 7952*a376eb32SXin Li ;; 7953*a376eb32SXin Li esac 7954*a376eb32SXin Li ;; 7955*a376eb32SXin Li * ) # unhandled hosts (and "normal" native builds) 7956*a376eb32SXin Li lt_cv_to_host_file_cmd=func_convert_file_noop 7957*a376eb32SXin Li ;; 7958*a376eb32SXin Liesac 7959*a376eb32SXin Li]) 7960*a376eb32SXin Lito_host_file_cmd=$lt_cv_to_host_file_cmd 7961*a376eb32SXin LiAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 7962*a376eb32SXin Li_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 7963*a376eb32SXin Li [0], [convert $build file names to $host format])dnl 7964*a376eb32SXin Li 7965*a376eb32SXin LiAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 7966*a376eb32SXin LiAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 7967*a376eb32SXin Li[#assume ordinary cross tools, or native build. 7968*a376eb32SXin Lilt_cv_to_tool_file_cmd=func_convert_file_noop 7969*a376eb32SXin Licase $host in 7970*a376eb32SXin Li *-*-mingw* ) 7971*a376eb32SXin Li case $build in 7972*a376eb32SXin Li *-*-mingw* ) # actually msys 7973*a376eb32SXin Li lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 7974*a376eb32SXin Li ;; 7975*a376eb32SXin Li esac 7976*a376eb32SXin Li ;; 7977*a376eb32SXin Liesac 7978*a376eb32SXin Li]) 7979*a376eb32SXin Lito_tool_file_cmd=$lt_cv_to_tool_file_cmd 7980*a376eb32SXin LiAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 7981*a376eb32SXin Li_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 7982*a376eb32SXin Li [0], [convert $build files to toolchain format])dnl 7983*a376eb32SXin Li])# _LT_PATH_CONVERSION_FUNCTIONS 7984