1*735d6239SKiyoung Kim# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2*735d6239SKiyoung Kim# 3*735d6239SKiyoung Kim# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 4*735d6239SKiyoung Kim# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 5*735d6239SKiyoung Kim# Inc. 6*735d6239SKiyoung Kim# Written by Gordon Matzigkeit, 1996 7*735d6239SKiyoung Kim# 8*735d6239SKiyoung Kim# This file is free software; the Free Software Foundation gives 9*735d6239SKiyoung Kim# unlimited permission to copy and/or distribute it, with or without 10*735d6239SKiyoung Kim# modifications, as long as this notice is preserved. 11*735d6239SKiyoung Kim 12*735d6239SKiyoung Kimm4_define([_LT_COPYING], [dnl 13*735d6239SKiyoung Kim# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 14*735d6239SKiyoung Kim# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 15*735d6239SKiyoung Kim# Inc. 16*735d6239SKiyoung Kim# Written by Gordon Matzigkeit, 1996 17*735d6239SKiyoung Kim# 18*735d6239SKiyoung Kim# This file is part of GNU Libtool. 19*735d6239SKiyoung Kim# 20*735d6239SKiyoung Kim# GNU Libtool is free software; you can redistribute it and/or 21*735d6239SKiyoung Kim# modify it under the terms of the GNU General Public License as 22*735d6239SKiyoung Kim# published by the Free Software Foundation; either version 2 of 23*735d6239SKiyoung Kim# the License, or (at your option) any later version. 24*735d6239SKiyoung Kim# 25*735d6239SKiyoung Kim# As a special exception to the GNU General Public License, 26*735d6239SKiyoung Kim# if you distribute this file as part of a program or library that 27*735d6239SKiyoung Kim# is built using GNU Libtool, you may include this file under the 28*735d6239SKiyoung Kim# same distribution terms that you use for the rest of that program. 29*735d6239SKiyoung Kim# 30*735d6239SKiyoung Kim# GNU Libtool is distributed in the hope that it will be useful, 31*735d6239SKiyoung Kim# but WITHOUT ANY WARRANTY; without even the implied warranty of 32*735d6239SKiyoung Kim# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 33*735d6239SKiyoung Kim# GNU General Public License for more details. 34*735d6239SKiyoung Kim# 35*735d6239SKiyoung Kim# You should have received a copy of the GNU General Public License 36*735d6239SKiyoung Kim# along with GNU Libtool; see the file COPYING. If not, a copy 37*735d6239SKiyoung Kim# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 38*735d6239SKiyoung Kim# obtained by writing to the Free Software Foundation, Inc., 39*735d6239SKiyoung Kim# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 40*735d6239SKiyoung Kim]) 41*735d6239SKiyoung Kim 42*735d6239SKiyoung Kim# serial 57 LT_INIT 43*735d6239SKiyoung Kim 44*735d6239SKiyoung Kim 45*735d6239SKiyoung Kim# LT_PREREQ(VERSION) 46*735d6239SKiyoung Kim# ------------------ 47*735d6239SKiyoung Kim# Complain and exit if this libtool version is less that VERSION. 48*735d6239SKiyoung Kimm4_defun([LT_PREREQ], 49*735d6239SKiyoung Kim[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 50*735d6239SKiyoung Kim [m4_default([$3], 51*735d6239SKiyoung Kim [m4_fatal([Libtool version $1 or higher is required], 52*735d6239SKiyoung Kim 63)])], 53*735d6239SKiyoung Kim [$2])]) 54*735d6239SKiyoung Kim 55*735d6239SKiyoung Kim 56*735d6239SKiyoung Kim# _LT_CHECK_BUILDDIR 57*735d6239SKiyoung Kim# ------------------ 58*735d6239SKiyoung Kim# Complain if the absolute build directory name contains unusual characters 59*735d6239SKiyoung Kimm4_defun([_LT_CHECK_BUILDDIR], 60*735d6239SKiyoung Kim[case `pwd` in 61*735d6239SKiyoung Kim *\ * | *\ *) 62*735d6239SKiyoung Kim AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 63*735d6239SKiyoung Kimesac 64*735d6239SKiyoung Kim]) 65*735d6239SKiyoung Kim 66*735d6239SKiyoung Kim 67*735d6239SKiyoung Kim# LT_INIT([OPTIONS]) 68*735d6239SKiyoung Kim# ------------------ 69*735d6239SKiyoung KimAC_DEFUN([LT_INIT], 70*735d6239SKiyoung Kim[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 71*735d6239SKiyoung KimAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 72*735d6239SKiyoung KimAC_BEFORE([$0], [LT_LANG])dnl 73*735d6239SKiyoung KimAC_BEFORE([$0], [LT_OUTPUT])dnl 74*735d6239SKiyoung KimAC_BEFORE([$0], [LTDL_INIT])dnl 75*735d6239SKiyoung Kimm4_require([_LT_CHECK_BUILDDIR])dnl 76*735d6239SKiyoung Kim 77*735d6239SKiyoung Kimdnl Autoconf doesn't catch unexpanded LT_ macros by default: 78*735d6239SKiyoung Kimm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 79*735d6239SKiyoung Kimm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 80*735d6239SKiyoung Kimdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 81*735d6239SKiyoung Kimdnl unless we require an AC_DEFUNed macro: 82*735d6239SKiyoung KimAC_REQUIRE([LTOPTIONS_VERSION])dnl 83*735d6239SKiyoung KimAC_REQUIRE([LTSUGAR_VERSION])dnl 84*735d6239SKiyoung KimAC_REQUIRE([LTVERSION_VERSION])dnl 85*735d6239SKiyoung KimAC_REQUIRE([LTOBSOLETE_VERSION])dnl 86*735d6239SKiyoung Kimm4_require([_LT_PROG_LTMAIN])dnl 87*735d6239SKiyoung Kim 88*735d6239SKiyoung Kim_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 89*735d6239SKiyoung Kim 90*735d6239SKiyoung Kimdnl Parse OPTIONS 91*735d6239SKiyoung Kim_LT_SET_OPTIONS([$0], [$1]) 92*735d6239SKiyoung Kim 93*735d6239SKiyoung Kim# This can be used to rebuild libtool when needed 94*735d6239SKiyoung KimLIBTOOL_DEPS="$ltmain" 95*735d6239SKiyoung Kim 96*735d6239SKiyoung Kim# Always use our own libtool. 97*735d6239SKiyoung KimLIBTOOL='$(SHELL) $(top_builddir)/libtool' 98*735d6239SKiyoung KimAC_SUBST(LIBTOOL)dnl 99*735d6239SKiyoung Kim 100*735d6239SKiyoung Kim_LT_SETUP 101*735d6239SKiyoung Kim 102*735d6239SKiyoung Kim# Only expand once: 103*735d6239SKiyoung Kimm4_define([LT_INIT]) 104*735d6239SKiyoung Kim])# LT_INIT 105*735d6239SKiyoung Kim 106*735d6239SKiyoung Kim# Old names: 107*735d6239SKiyoung KimAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 108*735d6239SKiyoung KimAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 109*735d6239SKiyoung Kimdnl aclocal-1.4 backwards compatibility: 110*735d6239SKiyoung Kimdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 111*735d6239SKiyoung Kimdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 112*735d6239SKiyoung Kim 113*735d6239SKiyoung Kim 114*735d6239SKiyoung Kim# _LT_CC_BASENAME(CC) 115*735d6239SKiyoung Kim# ------------------- 116*735d6239SKiyoung Kim# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 117*735d6239SKiyoung Kimm4_defun([_LT_CC_BASENAME], 118*735d6239SKiyoung Kim[for cc_temp in $1""; do 119*735d6239SKiyoung Kim case $cc_temp in 120*735d6239SKiyoung Kim compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 121*735d6239SKiyoung Kim distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 122*735d6239SKiyoung Kim \-*) ;; 123*735d6239SKiyoung Kim *) break;; 124*735d6239SKiyoung Kim esac 125*735d6239SKiyoung Kimdone 126*735d6239SKiyoung Kimcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 127*735d6239SKiyoung Kim]) 128*735d6239SKiyoung Kim 129*735d6239SKiyoung Kim 130*735d6239SKiyoung Kim# _LT_FILEUTILS_DEFAULTS 131*735d6239SKiyoung Kim# ---------------------- 132*735d6239SKiyoung Kim# It is okay to use these file commands and assume they have been set 133*735d6239SKiyoung Kim# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 134*735d6239SKiyoung Kimm4_defun([_LT_FILEUTILS_DEFAULTS], 135*735d6239SKiyoung Kim[: ${CP="cp -f"} 136*735d6239SKiyoung Kim: ${MV="mv -f"} 137*735d6239SKiyoung Kim: ${RM="rm -f"} 138*735d6239SKiyoung Kim])# _LT_FILEUTILS_DEFAULTS 139*735d6239SKiyoung Kim 140*735d6239SKiyoung Kim 141*735d6239SKiyoung Kim# _LT_SETUP 142*735d6239SKiyoung Kim# --------- 143*735d6239SKiyoung Kimm4_defun([_LT_SETUP], 144*735d6239SKiyoung Kim[AC_REQUIRE([AC_CANONICAL_HOST])dnl 145*735d6239SKiyoung KimAC_REQUIRE([AC_CANONICAL_BUILD])dnl 146*735d6239SKiyoung KimAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 147*735d6239SKiyoung KimAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 148*735d6239SKiyoung Kim 149*735d6239SKiyoung Kim_LT_DECL([], [host_alias], [0], [The host system])dnl 150*735d6239SKiyoung Kim_LT_DECL([], [host], [0])dnl 151*735d6239SKiyoung Kim_LT_DECL([], [host_os], [0])dnl 152*735d6239SKiyoung Kimdnl 153*735d6239SKiyoung Kim_LT_DECL([], [build_alias], [0], [The build system])dnl 154*735d6239SKiyoung Kim_LT_DECL([], [build], [0])dnl 155*735d6239SKiyoung Kim_LT_DECL([], [build_os], [0])dnl 156*735d6239SKiyoung Kimdnl 157*735d6239SKiyoung KimAC_REQUIRE([AC_PROG_CC])dnl 158*735d6239SKiyoung KimAC_REQUIRE([LT_PATH_LD])dnl 159*735d6239SKiyoung KimAC_REQUIRE([LT_PATH_NM])dnl 160*735d6239SKiyoung Kimdnl 161*735d6239SKiyoung KimAC_REQUIRE([AC_PROG_LN_S])dnl 162*735d6239SKiyoung Kimtest -z "$LN_S" && LN_S="ln -s" 163*735d6239SKiyoung Kim_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 164*735d6239SKiyoung Kimdnl 165*735d6239SKiyoung KimAC_REQUIRE([LT_CMD_MAX_LEN])dnl 166*735d6239SKiyoung Kim_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 167*735d6239SKiyoung Kim_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 168*735d6239SKiyoung Kimdnl 169*735d6239SKiyoung Kimm4_require([_LT_FILEUTILS_DEFAULTS])dnl 170*735d6239SKiyoung Kimm4_require([_LT_CHECK_SHELL_FEATURES])dnl 171*735d6239SKiyoung Kimm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 172*735d6239SKiyoung Kimm4_require([_LT_CMD_RELOAD])dnl 173*735d6239SKiyoung Kimm4_require([_LT_CHECK_MAGIC_METHOD])dnl 174*735d6239SKiyoung Kimm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 175*735d6239SKiyoung Kimm4_require([_LT_CMD_OLD_ARCHIVE])dnl 176*735d6239SKiyoung Kimm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 177*735d6239SKiyoung Kimm4_require([_LT_WITH_SYSROOT])dnl 178*735d6239SKiyoung Kim 179*735d6239SKiyoung Kim_LT_CONFIG_LIBTOOL_INIT([ 180*735d6239SKiyoung Kim# See if we are running on zsh, and set the options which allow our 181*735d6239SKiyoung Kim# commands through without removal of \ escapes INIT. 182*735d6239SKiyoung Kimif test -n "\${ZSH_VERSION+set}" ; then 183*735d6239SKiyoung Kim setopt NO_GLOB_SUBST 184*735d6239SKiyoung Kimfi 185*735d6239SKiyoung Kim]) 186*735d6239SKiyoung Kimif test -n "${ZSH_VERSION+set}" ; then 187*735d6239SKiyoung Kim setopt NO_GLOB_SUBST 188*735d6239SKiyoung Kimfi 189*735d6239SKiyoung Kim 190*735d6239SKiyoung Kim_LT_CHECK_OBJDIR 191*735d6239SKiyoung Kim 192*735d6239SKiyoung Kimm4_require([_LT_TAG_COMPILER])dnl 193*735d6239SKiyoung Kim 194*735d6239SKiyoung Kimcase $host_os in 195*735d6239SKiyoung Kimaix3*) 196*735d6239SKiyoung Kim # AIX sometimes has problems with the GCC collect2 program. For some 197*735d6239SKiyoung Kim # reason, if we set the COLLECT_NAMES environment variable, the problems 198*735d6239SKiyoung Kim # vanish in a puff of smoke. 199*735d6239SKiyoung Kim if test "X${COLLECT_NAMES+set}" != Xset; then 200*735d6239SKiyoung Kim COLLECT_NAMES= 201*735d6239SKiyoung Kim export COLLECT_NAMES 202*735d6239SKiyoung Kim fi 203*735d6239SKiyoung Kim ;; 204*735d6239SKiyoung Kimesac 205*735d6239SKiyoung Kim 206*735d6239SKiyoung Kim# Global variables: 207*735d6239SKiyoung Kimofile=libtool 208*735d6239SKiyoung Kimcan_build_shared=yes 209*735d6239SKiyoung Kim 210*735d6239SKiyoung Kim# All known linkers require a `.a' archive for static linking (except MSVC, 211*735d6239SKiyoung Kim# which needs '.lib'). 212*735d6239SKiyoung Kimlibext=a 213*735d6239SKiyoung Kim 214*735d6239SKiyoung Kimwith_gnu_ld="$lt_cv_prog_gnu_ld" 215*735d6239SKiyoung Kim 216*735d6239SKiyoung Kimold_CC="$CC" 217*735d6239SKiyoung Kimold_CFLAGS="$CFLAGS" 218*735d6239SKiyoung Kim 219*735d6239SKiyoung Kim# Set sane defaults for various variables 220*735d6239SKiyoung Kimtest -z "$CC" && CC=cc 221*735d6239SKiyoung Kimtest -z "$LTCC" && LTCC=$CC 222*735d6239SKiyoung Kimtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 223*735d6239SKiyoung Kimtest -z "$LD" && LD=ld 224*735d6239SKiyoung Kimtest -z "$ac_objext" && ac_objext=o 225*735d6239SKiyoung Kim 226*735d6239SKiyoung Kim_LT_CC_BASENAME([$compiler]) 227*735d6239SKiyoung Kim 228*735d6239SKiyoung Kim# Only perform the check for file, if the check method requires it 229*735d6239SKiyoung Kimtest -z "$MAGIC_CMD" && MAGIC_CMD=file 230*735d6239SKiyoung Kimcase $deplibs_check_method in 231*735d6239SKiyoung Kimfile_magic*) 232*735d6239SKiyoung Kim if test "$file_magic_cmd" = '$MAGIC_CMD'; then 233*735d6239SKiyoung Kim _LT_PATH_MAGIC 234*735d6239SKiyoung Kim fi 235*735d6239SKiyoung Kim ;; 236*735d6239SKiyoung Kimesac 237*735d6239SKiyoung Kim 238*735d6239SKiyoung Kim# Use C for the default configuration in the libtool script 239*735d6239SKiyoung KimLT_SUPPORTED_TAG([CC]) 240*735d6239SKiyoung Kim_LT_LANG_C_CONFIG 241*735d6239SKiyoung Kim_LT_LANG_DEFAULT_CONFIG 242*735d6239SKiyoung Kim_LT_CONFIG_COMMANDS 243*735d6239SKiyoung Kim])# _LT_SETUP 244*735d6239SKiyoung Kim 245*735d6239SKiyoung Kim 246*735d6239SKiyoung Kim# _LT_PREPARE_SED_QUOTE_VARS 247*735d6239SKiyoung Kim# -------------------------- 248*735d6239SKiyoung Kim# Define a few sed substitution that help us do robust quoting. 249*735d6239SKiyoung Kimm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 250*735d6239SKiyoung Kim[# Backslashify metacharacters that are still active within 251*735d6239SKiyoung Kim# double-quoted strings. 252*735d6239SKiyoung Kimsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 253*735d6239SKiyoung Kim 254*735d6239SKiyoung Kim# Same as above, but do not quote variable references. 255*735d6239SKiyoung Kimdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 256*735d6239SKiyoung Kim 257*735d6239SKiyoung Kim# Sed substitution to delay expansion of an escaped shell variable in a 258*735d6239SKiyoung Kim# double_quote_subst'ed string. 259*735d6239SKiyoung Kimdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 260*735d6239SKiyoung Kim 261*735d6239SKiyoung Kim# Sed substitution to delay expansion of an escaped single quote. 262*735d6239SKiyoung Kimdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 263*735d6239SKiyoung Kim 264*735d6239SKiyoung Kim# Sed substitution to avoid accidental globbing in evaled expressions 265*735d6239SKiyoung Kimno_glob_subst='s/\*/\\\*/g' 266*735d6239SKiyoung Kim]) 267*735d6239SKiyoung Kim 268*735d6239SKiyoung Kim# _LT_PROG_LTMAIN 269*735d6239SKiyoung Kim# --------------- 270*735d6239SKiyoung Kim# Note that this code is called both from `configure', and `config.status' 271*735d6239SKiyoung Kim# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 272*735d6239SKiyoung Kim# `config.status' has no value for ac_aux_dir unless we are using Automake, 273*735d6239SKiyoung Kim# so we pass a copy along to make sure it has a sensible value anyway. 274*735d6239SKiyoung Kimm4_defun([_LT_PROG_LTMAIN], 275*735d6239SKiyoung Kim[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 276*735d6239SKiyoung Kim_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 277*735d6239SKiyoung Kimltmain="$ac_aux_dir/ltmain.sh" 278*735d6239SKiyoung Kim])# _LT_PROG_LTMAIN 279*735d6239SKiyoung Kim 280*735d6239SKiyoung Kim 281*735d6239SKiyoung Kim## ------------------------------------- ## 282*735d6239SKiyoung Kim## Accumulate code for creating libtool. ## 283*735d6239SKiyoung Kim## ------------------------------------- ## 284*735d6239SKiyoung Kim 285*735d6239SKiyoung Kim# So that we can recreate a full libtool script including additional 286*735d6239SKiyoung Kim# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 287*735d6239SKiyoung Kim# in macros and then make a single call at the end using the `libtool' 288*735d6239SKiyoung Kim# label. 289*735d6239SKiyoung Kim 290*735d6239SKiyoung Kim 291*735d6239SKiyoung Kim# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 292*735d6239SKiyoung Kim# ---------------------------------------- 293*735d6239SKiyoung Kim# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 294*735d6239SKiyoung Kimm4_define([_LT_CONFIG_LIBTOOL_INIT], 295*735d6239SKiyoung Kim[m4_ifval([$1], 296*735d6239SKiyoung Kim [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 297*735d6239SKiyoung Kim [$1 298*735d6239SKiyoung Kim])])]) 299*735d6239SKiyoung Kim 300*735d6239SKiyoung Kim# Initialize. 301*735d6239SKiyoung Kimm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 302*735d6239SKiyoung Kim 303*735d6239SKiyoung Kim 304*735d6239SKiyoung Kim# _LT_CONFIG_LIBTOOL([COMMANDS]) 305*735d6239SKiyoung Kim# ------------------------------ 306*735d6239SKiyoung Kim# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 307*735d6239SKiyoung Kimm4_define([_LT_CONFIG_LIBTOOL], 308*735d6239SKiyoung Kim[m4_ifval([$1], 309*735d6239SKiyoung Kim [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 310*735d6239SKiyoung Kim [$1 311*735d6239SKiyoung Kim])])]) 312*735d6239SKiyoung Kim 313*735d6239SKiyoung Kim# Initialize. 314*735d6239SKiyoung Kimm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 315*735d6239SKiyoung Kim 316*735d6239SKiyoung Kim 317*735d6239SKiyoung Kim# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 318*735d6239SKiyoung Kim# ----------------------------------------------------- 319*735d6239SKiyoung Kimm4_defun([_LT_CONFIG_SAVE_COMMANDS], 320*735d6239SKiyoung Kim[_LT_CONFIG_LIBTOOL([$1]) 321*735d6239SKiyoung Kim_LT_CONFIG_LIBTOOL_INIT([$2]) 322*735d6239SKiyoung Kim]) 323*735d6239SKiyoung Kim 324*735d6239SKiyoung Kim 325*735d6239SKiyoung Kim# _LT_FORMAT_COMMENT([COMMENT]) 326*735d6239SKiyoung Kim# ----------------------------- 327*735d6239SKiyoung Kim# Add leading comment marks to the start of each line, and a trailing 328*735d6239SKiyoung Kim# full-stop to the whole comment if one is not present already. 329*735d6239SKiyoung Kimm4_define([_LT_FORMAT_COMMENT], 330*735d6239SKiyoung Kim[m4_ifval([$1], [ 331*735d6239SKiyoung Kimm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 332*735d6239SKiyoung Kim [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 333*735d6239SKiyoung Kim)]) 334*735d6239SKiyoung Kim 335*735d6239SKiyoung Kim 336*735d6239SKiyoung Kim 337*735d6239SKiyoung Kim## ------------------------ ## 338*735d6239SKiyoung Kim## FIXME: Eliminate VARNAME ## 339*735d6239SKiyoung Kim## ------------------------ ## 340*735d6239SKiyoung Kim 341*735d6239SKiyoung Kim 342*735d6239SKiyoung Kim# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 343*735d6239SKiyoung Kim# ------------------------------------------------------------------- 344*735d6239SKiyoung Kim# CONFIGNAME is the name given to the value in the libtool script. 345*735d6239SKiyoung Kim# VARNAME is the (base) name used in the configure script. 346*735d6239SKiyoung Kim# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 347*735d6239SKiyoung Kim# VARNAME. Any other value will be used directly. 348*735d6239SKiyoung Kimm4_define([_LT_DECL], 349*735d6239SKiyoung Kim[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 350*735d6239SKiyoung Kim [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 351*735d6239SKiyoung Kim [m4_ifval([$1], [$1], [$2])]) 352*735d6239SKiyoung Kim lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 353*735d6239SKiyoung Kim m4_ifval([$4], 354*735d6239SKiyoung Kim [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 355*735d6239SKiyoung Kim lt_dict_add_subkey([lt_decl_dict], [$2], 356*735d6239SKiyoung Kim [tagged?], [m4_ifval([$5], [yes], [no])])]) 357*735d6239SKiyoung Kim]) 358*735d6239SKiyoung Kim 359*735d6239SKiyoung Kim 360*735d6239SKiyoung Kim# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 361*735d6239SKiyoung Kim# -------------------------------------------------------- 362*735d6239SKiyoung Kimm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 363*735d6239SKiyoung Kim 364*735d6239SKiyoung Kim 365*735d6239SKiyoung Kim# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 366*735d6239SKiyoung Kim# ------------------------------------------------ 367*735d6239SKiyoung Kimm4_define([lt_decl_tag_varnames], 368*735d6239SKiyoung Kim[_lt_decl_filter([tagged?], [yes], $@)]) 369*735d6239SKiyoung Kim 370*735d6239SKiyoung Kim 371*735d6239SKiyoung Kim# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 372*735d6239SKiyoung Kim# --------------------------------------------------------- 373*735d6239SKiyoung Kimm4_define([_lt_decl_filter], 374*735d6239SKiyoung Kim[m4_case([$#], 375*735d6239SKiyoung Kim [0], [m4_fatal([$0: too few arguments: $#])], 376*735d6239SKiyoung Kim [1], [m4_fatal([$0: too few arguments: $#: $1])], 377*735d6239SKiyoung Kim [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 378*735d6239SKiyoung Kim [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 379*735d6239SKiyoung Kim [lt_dict_filter([lt_decl_dict], $@)])[]dnl 380*735d6239SKiyoung Kim]) 381*735d6239SKiyoung Kim 382*735d6239SKiyoung Kim 383*735d6239SKiyoung Kim# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 384*735d6239SKiyoung Kim# -------------------------------------------------- 385*735d6239SKiyoung Kimm4_define([lt_decl_quote_varnames], 386*735d6239SKiyoung Kim[_lt_decl_filter([value], [1], $@)]) 387*735d6239SKiyoung Kim 388*735d6239SKiyoung Kim 389*735d6239SKiyoung Kim# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 390*735d6239SKiyoung Kim# --------------------------------------------------- 391*735d6239SKiyoung Kimm4_define([lt_decl_dquote_varnames], 392*735d6239SKiyoung Kim[_lt_decl_filter([value], [2], $@)]) 393*735d6239SKiyoung Kim 394*735d6239SKiyoung Kim 395*735d6239SKiyoung Kim# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 396*735d6239SKiyoung Kim# --------------------------------------------------- 397*735d6239SKiyoung Kimm4_define([lt_decl_varnames_tagged], 398*735d6239SKiyoung Kim[m4_assert([$# <= 2])dnl 399*735d6239SKiyoung Kim_$0(m4_quote(m4_default([$1], [[, ]])), 400*735d6239SKiyoung Kim m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 401*735d6239SKiyoung Kim m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 402*735d6239SKiyoung Kimm4_define([_lt_decl_varnames_tagged], 403*735d6239SKiyoung Kim[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 404*735d6239SKiyoung Kim 405*735d6239SKiyoung Kim 406*735d6239SKiyoung Kim# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 407*735d6239SKiyoung Kim# ------------------------------------------------ 408*735d6239SKiyoung Kimm4_define([lt_decl_all_varnames], 409*735d6239SKiyoung Kim[_$0(m4_quote(m4_default([$1], [[, ]])), 410*735d6239SKiyoung Kim m4_if([$2], [], 411*735d6239SKiyoung Kim m4_quote(lt_decl_varnames), 412*735d6239SKiyoung Kim m4_quote(m4_shift($@))))[]dnl 413*735d6239SKiyoung Kim]) 414*735d6239SKiyoung Kimm4_define([_lt_decl_all_varnames], 415*735d6239SKiyoung Kim[lt_join($@, lt_decl_varnames_tagged([$1], 416*735d6239SKiyoung Kim lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 417*735d6239SKiyoung Kim]) 418*735d6239SKiyoung Kim 419*735d6239SKiyoung Kim 420*735d6239SKiyoung Kim# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 421*735d6239SKiyoung Kim# ------------------------------------ 422*735d6239SKiyoung Kim# Quote a variable value, and forward it to `config.status' so that its 423*735d6239SKiyoung Kim# declaration there will have the same value as in `configure'. VARNAME 424*735d6239SKiyoung Kim# must have a single quote delimited value for this to work. 425*735d6239SKiyoung Kimm4_define([_LT_CONFIG_STATUS_DECLARE], 426*735d6239SKiyoung Kim[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 427*735d6239SKiyoung Kim 428*735d6239SKiyoung Kim 429*735d6239SKiyoung Kim# _LT_CONFIG_STATUS_DECLARATIONS 430*735d6239SKiyoung Kim# ------------------------------ 431*735d6239SKiyoung Kim# We delimit libtool config variables with single quotes, so when 432*735d6239SKiyoung Kim# we write them to config.status, we have to be sure to quote all 433*735d6239SKiyoung Kim# embedded single quotes properly. In configure, this macro expands 434*735d6239SKiyoung Kim# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 435*735d6239SKiyoung Kim# 436*735d6239SKiyoung Kim# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 437*735d6239SKiyoung Kimm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 438*735d6239SKiyoung Kim[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 439*735d6239SKiyoung Kim [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 440*735d6239SKiyoung Kim 441*735d6239SKiyoung Kim 442*735d6239SKiyoung Kim# _LT_LIBTOOL_TAGS 443*735d6239SKiyoung Kim# ---------------- 444*735d6239SKiyoung Kim# Output comment and list of tags supported by the script 445*735d6239SKiyoung Kimm4_defun([_LT_LIBTOOL_TAGS], 446*735d6239SKiyoung Kim[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 447*735d6239SKiyoung Kimavailable_tags="_LT_TAGS"dnl 448*735d6239SKiyoung Kim]) 449*735d6239SKiyoung Kim 450*735d6239SKiyoung Kim 451*735d6239SKiyoung Kim# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 452*735d6239SKiyoung Kim# ----------------------------------- 453*735d6239SKiyoung Kim# Extract the dictionary values for VARNAME (optionally with TAG) and 454*735d6239SKiyoung Kim# expand to a commented shell variable setting: 455*735d6239SKiyoung Kim# 456*735d6239SKiyoung Kim# # Some comment about what VAR is for. 457*735d6239SKiyoung Kim# visible_name=$lt_internal_name 458*735d6239SKiyoung Kimm4_define([_LT_LIBTOOL_DECLARE], 459*735d6239SKiyoung Kim[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 460*735d6239SKiyoung Kim [description])))[]dnl 461*735d6239SKiyoung Kimm4_pushdef([_libtool_name], 462*735d6239SKiyoung Kim m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 463*735d6239SKiyoung Kimm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 464*735d6239SKiyoung Kim [0], [_libtool_name=[$]$1], 465*735d6239SKiyoung Kim [1], [_libtool_name=$lt_[]$1], 466*735d6239SKiyoung Kim [2], [_libtool_name=$lt_[]$1], 467*735d6239SKiyoung Kim [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 468*735d6239SKiyoung Kimm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 469*735d6239SKiyoung Kim]) 470*735d6239SKiyoung Kim 471*735d6239SKiyoung Kim 472*735d6239SKiyoung Kim# _LT_LIBTOOL_CONFIG_VARS 473*735d6239SKiyoung Kim# ----------------------- 474*735d6239SKiyoung Kim# Produce commented declarations of non-tagged libtool config variables 475*735d6239SKiyoung Kim# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 476*735d6239SKiyoung Kim# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 477*735d6239SKiyoung Kim# section) are produced by _LT_LIBTOOL_TAG_VARS. 478*735d6239SKiyoung Kimm4_defun([_LT_LIBTOOL_CONFIG_VARS], 479*735d6239SKiyoung Kim[m4_foreach([_lt_var], 480*735d6239SKiyoung Kim m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 481*735d6239SKiyoung Kim [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 482*735d6239SKiyoung Kim 483*735d6239SKiyoung Kim 484*735d6239SKiyoung Kim# _LT_LIBTOOL_TAG_VARS(TAG) 485*735d6239SKiyoung Kim# ------------------------- 486*735d6239SKiyoung Kimm4_define([_LT_LIBTOOL_TAG_VARS], 487*735d6239SKiyoung Kim[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 488*735d6239SKiyoung Kim [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 489*735d6239SKiyoung Kim 490*735d6239SKiyoung Kim 491*735d6239SKiyoung Kim# _LT_TAGVAR(VARNAME, [TAGNAME]) 492*735d6239SKiyoung Kim# ------------------------------ 493*735d6239SKiyoung Kimm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 494*735d6239SKiyoung Kim 495*735d6239SKiyoung Kim 496*735d6239SKiyoung Kim# _LT_CONFIG_COMMANDS 497*735d6239SKiyoung Kim# ------------------- 498*735d6239SKiyoung Kim# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 499*735d6239SKiyoung Kim# variables for single and double quote escaping we saved from calls 500*735d6239SKiyoung Kim# to _LT_DECL, we can put quote escaped variables declarations 501*735d6239SKiyoung Kim# into `config.status', and then the shell code to quote escape them in 502*735d6239SKiyoung Kim# for loops in `config.status'. Finally, any additional code accumulated 503*735d6239SKiyoung Kim# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 504*735d6239SKiyoung Kimm4_defun([_LT_CONFIG_COMMANDS], 505*735d6239SKiyoung Kim[AC_PROVIDE_IFELSE([LT_OUTPUT], 506*735d6239SKiyoung Kim dnl If the libtool generation code has been placed in $CONFIG_LT, 507*735d6239SKiyoung Kim dnl instead of duplicating it all over again into config.status, 508*735d6239SKiyoung Kim dnl then we will have config.status run $CONFIG_LT later, so it 509*735d6239SKiyoung Kim dnl needs to know what name is stored there: 510*735d6239SKiyoung Kim [AC_CONFIG_COMMANDS([libtool], 511*735d6239SKiyoung Kim [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 512*735d6239SKiyoung Kim dnl If the libtool generation code is destined for config.status, 513*735d6239SKiyoung Kim dnl expand the accumulated commands and init code now: 514*735d6239SKiyoung Kim [AC_CONFIG_COMMANDS([libtool], 515*735d6239SKiyoung Kim [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 516*735d6239SKiyoung Kim])#_LT_CONFIG_COMMANDS 517*735d6239SKiyoung Kim 518*735d6239SKiyoung Kim 519*735d6239SKiyoung Kim# Initialize. 520*735d6239SKiyoung Kimm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 521*735d6239SKiyoung Kim[ 522*735d6239SKiyoung Kim 523*735d6239SKiyoung Kim# The HP-UX ksh and POSIX shell print the target directory to stdout 524*735d6239SKiyoung Kim# if CDPATH is set. 525*735d6239SKiyoung Kim(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 526*735d6239SKiyoung Kim 527*735d6239SKiyoung Kimsed_quote_subst='$sed_quote_subst' 528*735d6239SKiyoung Kimdouble_quote_subst='$double_quote_subst' 529*735d6239SKiyoung Kimdelay_variable_subst='$delay_variable_subst' 530*735d6239SKiyoung Kim_LT_CONFIG_STATUS_DECLARATIONS 531*735d6239SKiyoung KimLTCC='$LTCC' 532*735d6239SKiyoung KimLTCFLAGS='$LTCFLAGS' 533*735d6239SKiyoung Kimcompiler='$compiler_DEFAULT' 534*735d6239SKiyoung Kim 535*735d6239SKiyoung Kim# A function that is used when there is no print builtin or printf. 536*735d6239SKiyoung Kimfunc_fallback_echo () 537*735d6239SKiyoung Kim{ 538*735d6239SKiyoung Kim eval 'cat <<_LTECHO_EOF 539*735d6239SKiyoung Kim\$[]1 540*735d6239SKiyoung Kim_LTECHO_EOF' 541*735d6239SKiyoung Kim} 542*735d6239SKiyoung Kim 543*735d6239SKiyoung Kim# Quote evaled strings. 544*735d6239SKiyoung Kimfor var in lt_decl_all_varnames([[ \ 545*735d6239SKiyoung Kim]], lt_decl_quote_varnames); do 546*735d6239SKiyoung Kim case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 547*735d6239SKiyoung Kim *[[\\\\\\\`\\"\\\$]]*) 548*735d6239SKiyoung Kim eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 549*735d6239SKiyoung Kim ;; 550*735d6239SKiyoung Kim *) 551*735d6239SKiyoung Kim eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 552*735d6239SKiyoung Kim ;; 553*735d6239SKiyoung Kim esac 554*735d6239SKiyoung Kimdone 555*735d6239SKiyoung Kim 556*735d6239SKiyoung Kim# Double-quote double-evaled strings. 557*735d6239SKiyoung Kimfor var in lt_decl_all_varnames([[ \ 558*735d6239SKiyoung Kim]], lt_decl_dquote_varnames); do 559*735d6239SKiyoung Kim case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 560*735d6239SKiyoung Kim *[[\\\\\\\`\\"\\\$]]*) 561*735d6239SKiyoung Kim eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 562*735d6239SKiyoung Kim ;; 563*735d6239SKiyoung Kim *) 564*735d6239SKiyoung Kim eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 565*735d6239SKiyoung Kim ;; 566*735d6239SKiyoung Kim esac 567*735d6239SKiyoung Kimdone 568*735d6239SKiyoung Kim 569*735d6239SKiyoung Kim_LT_OUTPUT_LIBTOOL_INIT 570*735d6239SKiyoung Kim]) 571*735d6239SKiyoung Kim 572*735d6239SKiyoung Kim# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 573*735d6239SKiyoung Kim# ------------------------------------ 574*735d6239SKiyoung Kim# Generate a child script FILE with all initialization necessary to 575*735d6239SKiyoung Kim# reuse the environment learned by the parent script, and make the 576*735d6239SKiyoung Kim# file executable. If COMMENT is supplied, it is inserted after the 577*735d6239SKiyoung Kim# `#!' sequence but before initialization text begins. After this 578*735d6239SKiyoung Kim# macro, additional text can be appended to FILE to form the body of 579*735d6239SKiyoung Kim# the child script. The macro ends with non-zero status if the 580*735d6239SKiyoung Kim# file could not be fully written (such as if the disk is full). 581*735d6239SKiyoung Kimm4_ifdef([AS_INIT_GENERATED], 582*735d6239SKiyoung Kim[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 583*735d6239SKiyoung Kim[m4_defun([_LT_GENERATED_FILE_INIT], 584*735d6239SKiyoung Kim[m4_require([AS_PREPARE])]dnl 585*735d6239SKiyoung Kim[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 586*735d6239SKiyoung Kim[lt_write_fail=0 587*735d6239SKiyoung Kimcat >$1 <<_ASEOF || lt_write_fail=1 588*735d6239SKiyoung Kim#! $SHELL 589*735d6239SKiyoung Kim# Generated by $as_me. 590*735d6239SKiyoung Kim$2 591*735d6239SKiyoung KimSHELL=\${CONFIG_SHELL-$SHELL} 592*735d6239SKiyoung Kimexport SHELL 593*735d6239SKiyoung Kim_ASEOF 594*735d6239SKiyoung Kimcat >>$1 <<\_ASEOF || lt_write_fail=1 595*735d6239SKiyoung KimAS_SHELL_SANITIZE 596*735d6239SKiyoung Kim_AS_PREPARE 597*735d6239SKiyoung Kimexec AS_MESSAGE_FD>&1 598*735d6239SKiyoung Kim_ASEOF 599*735d6239SKiyoung Kimtest $lt_write_fail = 0 && chmod +x $1[]dnl 600*735d6239SKiyoung Kimm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 601*735d6239SKiyoung Kim 602*735d6239SKiyoung Kim# LT_OUTPUT 603*735d6239SKiyoung Kim# --------- 604*735d6239SKiyoung Kim# This macro allows early generation of the libtool script (before 605*735d6239SKiyoung Kim# AC_OUTPUT is called), incase it is used in configure for compilation 606*735d6239SKiyoung Kim# tests. 607*735d6239SKiyoung KimAC_DEFUN([LT_OUTPUT], 608*735d6239SKiyoung Kim[: ${CONFIG_LT=./config.lt} 609*735d6239SKiyoung KimAC_MSG_NOTICE([creating $CONFIG_LT]) 610*735d6239SKiyoung Kim_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 611*735d6239SKiyoung Kim[# Run this file to recreate a libtool stub with the current configuration.]) 612*735d6239SKiyoung Kim 613*735d6239SKiyoung Kimcat >>"$CONFIG_LT" <<\_LTEOF 614*735d6239SKiyoung Kimlt_cl_silent=false 615*735d6239SKiyoung Kimexec AS_MESSAGE_LOG_FD>>config.log 616*735d6239SKiyoung Kim{ 617*735d6239SKiyoung Kim echo 618*735d6239SKiyoung Kim AS_BOX([Running $as_me.]) 619*735d6239SKiyoung Kim} >&AS_MESSAGE_LOG_FD 620*735d6239SKiyoung Kim 621*735d6239SKiyoung Kimlt_cl_help="\ 622*735d6239SKiyoung Kim\`$as_me' creates a local libtool stub from the current configuration, 623*735d6239SKiyoung Kimfor use in further configure time tests before the real libtool is 624*735d6239SKiyoung Kimgenerated. 625*735d6239SKiyoung Kim 626*735d6239SKiyoung KimUsage: $[0] [[OPTIONS]] 627*735d6239SKiyoung Kim 628*735d6239SKiyoung Kim -h, --help print this help, then exit 629*735d6239SKiyoung Kim -V, --version print version number, then exit 630*735d6239SKiyoung Kim -q, --quiet do not print progress messages 631*735d6239SKiyoung Kim -d, --debug don't remove temporary files 632*735d6239SKiyoung Kim 633*735d6239SKiyoung KimReport bugs to <[email protected]>." 634*735d6239SKiyoung Kim 635*735d6239SKiyoung Kimlt_cl_version="\ 636*735d6239SKiyoung Kimm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 637*735d6239SKiyoung Kimm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 638*735d6239SKiyoung Kimconfigured by $[0], generated by m4_PACKAGE_STRING. 639*735d6239SKiyoung Kim 640*735d6239SKiyoung KimCopyright (C) 2010 Free Software Foundation, Inc. 641*735d6239SKiyoung KimThis config.lt script is free software; the Free Software Foundation 642*735d6239SKiyoung Kimgives unlimited permision to copy, distribute and modify it." 643*735d6239SKiyoung Kim 644*735d6239SKiyoung Kimwhile test $[#] != 0 645*735d6239SKiyoung Kimdo 646*735d6239SKiyoung Kim case $[1] in 647*735d6239SKiyoung Kim --version | --v* | -V ) 648*735d6239SKiyoung Kim echo "$lt_cl_version"; exit 0 ;; 649*735d6239SKiyoung Kim --help | --h* | -h ) 650*735d6239SKiyoung Kim echo "$lt_cl_help"; exit 0 ;; 651*735d6239SKiyoung Kim --debug | --d* | -d ) 652*735d6239SKiyoung Kim debug=: ;; 653*735d6239SKiyoung Kim --quiet | --q* | --silent | --s* | -q ) 654*735d6239SKiyoung Kim lt_cl_silent=: ;; 655*735d6239SKiyoung Kim 656*735d6239SKiyoung Kim -*) AC_MSG_ERROR([unrecognized option: $[1] 657*735d6239SKiyoung KimTry \`$[0] --help' for more information.]) ;; 658*735d6239SKiyoung Kim 659*735d6239SKiyoung Kim *) AC_MSG_ERROR([unrecognized argument: $[1] 660*735d6239SKiyoung KimTry \`$[0] --help' for more information.]) ;; 661*735d6239SKiyoung Kim esac 662*735d6239SKiyoung Kim shift 663*735d6239SKiyoung Kimdone 664*735d6239SKiyoung Kim 665*735d6239SKiyoung Kimif $lt_cl_silent; then 666*735d6239SKiyoung Kim exec AS_MESSAGE_FD>/dev/null 667*735d6239SKiyoung Kimfi 668*735d6239SKiyoung Kim_LTEOF 669*735d6239SKiyoung Kim 670*735d6239SKiyoung Kimcat >>"$CONFIG_LT" <<_LTEOF 671*735d6239SKiyoung Kim_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 672*735d6239SKiyoung Kim_LTEOF 673*735d6239SKiyoung Kim 674*735d6239SKiyoung Kimcat >>"$CONFIG_LT" <<\_LTEOF 675*735d6239SKiyoung KimAC_MSG_NOTICE([creating $ofile]) 676*735d6239SKiyoung Kim_LT_OUTPUT_LIBTOOL_COMMANDS 677*735d6239SKiyoung KimAS_EXIT(0) 678*735d6239SKiyoung Kim_LTEOF 679*735d6239SKiyoung Kimchmod +x "$CONFIG_LT" 680*735d6239SKiyoung Kim 681*735d6239SKiyoung Kim# configure is writing to config.log, but config.lt does its own redirection, 682*735d6239SKiyoung Kim# appending to config.log, which fails on DOS, as config.log is still kept 683*735d6239SKiyoung Kim# open by configure. Here we exec the FD to /dev/null, effectively closing 684*735d6239SKiyoung Kim# config.log, so it can be properly (re)opened and appended to by config.lt. 685*735d6239SKiyoung Kimlt_cl_success=: 686*735d6239SKiyoung Kimtest "$silent" = yes && 687*735d6239SKiyoung Kim lt_config_lt_args="$lt_config_lt_args --quiet" 688*735d6239SKiyoung Kimexec AS_MESSAGE_LOG_FD>/dev/null 689*735d6239SKiyoung Kim$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 690*735d6239SKiyoung Kimexec AS_MESSAGE_LOG_FD>>config.log 691*735d6239SKiyoung Kim$lt_cl_success || AS_EXIT(1) 692*735d6239SKiyoung Kim])# LT_OUTPUT 693*735d6239SKiyoung Kim 694*735d6239SKiyoung Kim 695*735d6239SKiyoung Kim# _LT_CONFIG(TAG) 696*735d6239SKiyoung Kim# --------------- 697*735d6239SKiyoung Kim# If TAG is the built-in tag, create an initial libtool script with a 698*735d6239SKiyoung Kim# default configuration from the untagged config vars. Otherwise add code 699*735d6239SKiyoung Kim# to config.status for appending the configuration named by TAG from the 700*735d6239SKiyoung Kim# matching tagged config vars. 701*735d6239SKiyoung Kimm4_defun([_LT_CONFIG], 702*735d6239SKiyoung Kim[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 703*735d6239SKiyoung Kim_LT_CONFIG_SAVE_COMMANDS([ 704*735d6239SKiyoung Kim m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 705*735d6239SKiyoung Kim m4_if(_LT_TAG, [C], [ 706*735d6239SKiyoung Kim # See if we are running on zsh, and set the options which allow our 707*735d6239SKiyoung Kim # commands through without removal of \ escapes. 708*735d6239SKiyoung Kim if test -n "${ZSH_VERSION+set}" ; then 709*735d6239SKiyoung Kim setopt NO_GLOB_SUBST 710*735d6239SKiyoung Kim fi 711*735d6239SKiyoung Kim 712*735d6239SKiyoung Kim cfgfile="${ofile}T" 713*735d6239SKiyoung Kim trap "$RM \"$cfgfile\"; exit 1" 1 2 15 714*735d6239SKiyoung Kim $RM "$cfgfile" 715*735d6239SKiyoung Kim 716*735d6239SKiyoung Kim cat <<_LT_EOF >> "$cfgfile" 717*735d6239SKiyoung Kim#! $SHELL 718*735d6239SKiyoung Kim 719*735d6239SKiyoung Kim# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 720*735d6239SKiyoung Kim# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 721*735d6239SKiyoung Kim# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 722*735d6239SKiyoung Kim# NOTE: Changes made to this file will be lost: look at ltmain.sh. 723*735d6239SKiyoung Kim# 724*735d6239SKiyoung Kim_LT_COPYING 725*735d6239SKiyoung Kim_LT_LIBTOOL_TAGS 726*735d6239SKiyoung Kim 727*735d6239SKiyoung Kim# ### BEGIN LIBTOOL CONFIG 728*735d6239SKiyoung Kim_LT_LIBTOOL_CONFIG_VARS 729*735d6239SKiyoung Kim_LT_LIBTOOL_TAG_VARS 730*735d6239SKiyoung Kim# ### END LIBTOOL CONFIG 731*735d6239SKiyoung Kim 732*735d6239SKiyoung Kim_LT_EOF 733*735d6239SKiyoung Kim 734*735d6239SKiyoung Kim case $host_os in 735*735d6239SKiyoung Kim aix3*) 736*735d6239SKiyoung Kim cat <<\_LT_EOF >> "$cfgfile" 737*735d6239SKiyoung Kim# AIX sometimes has problems with the GCC collect2 program. For some 738*735d6239SKiyoung Kim# reason, if we set the COLLECT_NAMES environment variable, the problems 739*735d6239SKiyoung Kim# vanish in a puff of smoke. 740*735d6239SKiyoung Kimif test "X${COLLECT_NAMES+set}" != Xset; then 741*735d6239SKiyoung Kim COLLECT_NAMES= 742*735d6239SKiyoung Kim export COLLECT_NAMES 743*735d6239SKiyoung Kimfi 744*735d6239SKiyoung Kim_LT_EOF 745*735d6239SKiyoung Kim ;; 746*735d6239SKiyoung Kim esac 747*735d6239SKiyoung Kim 748*735d6239SKiyoung Kim _LT_PROG_LTMAIN 749*735d6239SKiyoung Kim 750*735d6239SKiyoung Kim # We use sed instead of cat because bash on DJGPP gets confused if 751*735d6239SKiyoung Kim # if finds mixed CR/LF and LF-only lines. Since sed operates in 752*735d6239SKiyoung Kim # text mode, it properly converts lines to CR/LF. This bash problem 753*735d6239SKiyoung Kim # is reportedly fixed, but why not run on old versions too? 754*735d6239SKiyoung Kim sed '$q' "$ltmain" >> "$cfgfile" \ 755*735d6239SKiyoung Kim || (rm -f "$cfgfile"; exit 1) 756*735d6239SKiyoung Kim 757*735d6239SKiyoung Kim _LT_PROG_REPLACE_SHELLFNS 758*735d6239SKiyoung Kim 759*735d6239SKiyoung Kim mv -f "$cfgfile" "$ofile" || 760*735d6239SKiyoung Kim (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 761*735d6239SKiyoung Kim chmod +x "$ofile" 762*735d6239SKiyoung Kim], 763*735d6239SKiyoung Kim[cat <<_LT_EOF >> "$ofile" 764*735d6239SKiyoung Kim 765*735d6239SKiyoung Kimdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 766*735d6239SKiyoung Kimdnl in a comment (ie after a #). 767*735d6239SKiyoung Kim# ### BEGIN LIBTOOL TAG CONFIG: $1 768*735d6239SKiyoung Kim_LT_LIBTOOL_TAG_VARS(_LT_TAG) 769*735d6239SKiyoung Kim# ### END LIBTOOL TAG CONFIG: $1 770*735d6239SKiyoung Kim_LT_EOF 771*735d6239SKiyoung Kim])dnl /m4_if 772*735d6239SKiyoung Kim], 773*735d6239SKiyoung Kim[m4_if([$1], [], [ 774*735d6239SKiyoung Kim PACKAGE='$PACKAGE' 775*735d6239SKiyoung Kim VERSION='$VERSION' 776*735d6239SKiyoung Kim TIMESTAMP='$TIMESTAMP' 777*735d6239SKiyoung Kim RM='$RM' 778*735d6239SKiyoung Kim ofile='$ofile'], []) 779*735d6239SKiyoung Kim])dnl /_LT_CONFIG_SAVE_COMMANDS 780*735d6239SKiyoung Kim])# _LT_CONFIG 781*735d6239SKiyoung Kim 782*735d6239SKiyoung Kim 783*735d6239SKiyoung Kim# LT_SUPPORTED_TAG(TAG) 784*735d6239SKiyoung Kim# --------------------- 785*735d6239SKiyoung Kim# Trace this macro to discover what tags are supported by the libtool 786*735d6239SKiyoung Kim# --tag option, using: 787*735d6239SKiyoung Kim# autoconf --trace 'LT_SUPPORTED_TAG:$1' 788*735d6239SKiyoung KimAC_DEFUN([LT_SUPPORTED_TAG], []) 789*735d6239SKiyoung Kim 790*735d6239SKiyoung Kim 791*735d6239SKiyoung Kim# C support is built-in for now 792*735d6239SKiyoung Kimm4_define([_LT_LANG_C_enabled], []) 793*735d6239SKiyoung Kimm4_define([_LT_TAGS], []) 794*735d6239SKiyoung Kim 795*735d6239SKiyoung Kim 796*735d6239SKiyoung Kim# LT_LANG(LANG) 797*735d6239SKiyoung Kim# ------------- 798*735d6239SKiyoung Kim# Enable libtool support for the given language if not already enabled. 799*735d6239SKiyoung KimAC_DEFUN([LT_LANG], 800*735d6239SKiyoung Kim[AC_BEFORE([$0], [LT_OUTPUT])dnl 801*735d6239SKiyoung Kimm4_case([$1], 802*735d6239SKiyoung Kim [C], [_LT_LANG(C)], 803*735d6239SKiyoung Kim [C++], [_LT_LANG(CXX)], 804*735d6239SKiyoung Kim [Java], [_LT_LANG(GCJ)], 805*735d6239SKiyoung Kim [Fortran 77], [_LT_LANG(F77)], 806*735d6239SKiyoung Kim [Fortran], [_LT_LANG(FC)], 807*735d6239SKiyoung Kim [Windows Resource], [_LT_LANG(RC)], 808*735d6239SKiyoung Kim [m4_ifdef([_LT_LANG_]$1[_CONFIG], 809*735d6239SKiyoung Kim [_LT_LANG($1)], 810*735d6239SKiyoung Kim [m4_fatal([$0: unsupported language: "$1"])])])dnl 811*735d6239SKiyoung Kim])# LT_LANG 812*735d6239SKiyoung Kim 813*735d6239SKiyoung Kim 814*735d6239SKiyoung Kim# _LT_LANG(LANGNAME) 815*735d6239SKiyoung Kim# ------------------ 816*735d6239SKiyoung Kimm4_defun([_LT_LANG], 817*735d6239SKiyoung Kim[m4_ifdef([_LT_LANG_]$1[_enabled], [], 818*735d6239SKiyoung Kim [LT_SUPPORTED_TAG([$1])dnl 819*735d6239SKiyoung Kim m4_append([_LT_TAGS], [$1 ])dnl 820*735d6239SKiyoung Kim m4_define([_LT_LANG_]$1[_enabled], [])dnl 821*735d6239SKiyoung Kim _LT_LANG_$1_CONFIG($1)])dnl 822*735d6239SKiyoung Kim])# _LT_LANG 823*735d6239SKiyoung Kim 824*735d6239SKiyoung Kim 825*735d6239SKiyoung Kim# _LT_LANG_DEFAULT_CONFIG 826*735d6239SKiyoung Kim# ----------------------- 827*735d6239SKiyoung Kimm4_defun([_LT_LANG_DEFAULT_CONFIG], 828*735d6239SKiyoung Kim[AC_PROVIDE_IFELSE([AC_PROG_CXX], 829*735d6239SKiyoung Kim [LT_LANG(CXX)], 830*735d6239SKiyoung Kim [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 831*735d6239SKiyoung Kim 832*735d6239SKiyoung KimAC_PROVIDE_IFELSE([AC_PROG_F77], 833*735d6239SKiyoung Kim [LT_LANG(F77)], 834*735d6239SKiyoung Kim [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 835*735d6239SKiyoung Kim 836*735d6239SKiyoung KimAC_PROVIDE_IFELSE([AC_PROG_FC], 837*735d6239SKiyoung Kim [LT_LANG(FC)], 838*735d6239SKiyoung Kim [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 839*735d6239SKiyoung Kim 840*735d6239SKiyoung Kimdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 841*735d6239SKiyoung Kimdnl pulling things in needlessly. 842*735d6239SKiyoung KimAC_PROVIDE_IFELSE([AC_PROG_GCJ], 843*735d6239SKiyoung Kim [LT_LANG(GCJ)], 844*735d6239SKiyoung Kim [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 845*735d6239SKiyoung Kim [LT_LANG(GCJ)], 846*735d6239SKiyoung Kim [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 847*735d6239SKiyoung Kim [LT_LANG(GCJ)], 848*735d6239SKiyoung Kim [m4_ifdef([AC_PROG_GCJ], 849*735d6239SKiyoung Kim [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 850*735d6239SKiyoung Kim m4_ifdef([A][M_PROG_GCJ], 851*735d6239SKiyoung Kim [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 852*735d6239SKiyoung Kim m4_ifdef([LT_PROG_GCJ], 853*735d6239SKiyoung Kim [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 854*735d6239SKiyoung Kim 855*735d6239SKiyoung KimAC_PROVIDE_IFELSE([LT_PROG_RC], 856*735d6239SKiyoung Kim [LT_LANG(RC)], 857*735d6239SKiyoung Kim [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 858*735d6239SKiyoung Kim])# _LT_LANG_DEFAULT_CONFIG 859*735d6239SKiyoung Kim 860*735d6239SKiyoung Kim# Obsolete macros: 861*735d6239SKiyoung KimAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 862*735d6239SKiyoung KimAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 863*735d6239SKiyoung KimAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 864*735d6239SKiyoung KimAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 865*735d6239SKiyoung KimAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 866*735d6239SKiyoung Kimdnl aclocal-1.4 backwards compatibility: 867*735d6239SKiyoung Kimdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 868*735d6239SKiyoung Kimdnl AC_DEFUN([AC_LIBTOOL_F77], []) 869*735d6239SKiyoung Kimdnl AC_DEFUN([AC_LIBTOOL_FC], []) 870*735d6239SKiyoung Kimdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 871*735d6239SKiyoung Kimdnl AC_DEFUN([AC_LIBTOOL_RC], []) 872*735d6239SKiyoung Kim 873*735d6239SKiyoung Kim 874*735d6239SKiyoung Kim# _LT_TAG_COMPILER 875*735d6239SKiyoung Kim# ---------------- 876*735d6239SKiyoung Kimm4_defun([_LT_TAG_COMPILER], 877*735d6239SKiyoung Kim[AC_REQUIRE([AC_PROG_CC])dnl 878*735d6239SKiyoung Kim 879*735d6239SKiyoung Kim_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 880*735d6239SKiyoung Kim_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 881*735d6239SKiyoung Kim_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 882*735d6239SKiyoung Kim_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 883*735d6239SKiyoung Kim 884*735d6239SKiyoung Kim# If no C compiler was specified, use CC. 885*735d6239SKiyoung KimLTCC=${LTCC-"$CC"} 886*735d6239SKiyoung Kim 887*735d6239SKiyoung Kim# If no C compiler flags were specified, use CFLAGS. 888*735d6239SKiyoung KimLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 889*735d6239SKiyoung Kim 890*735d6239SKiyoung Kim# Allow CC to be a program name with arguments. 891*735d6239SKiyoung Kimcompiler=$CC 892*735d6239SKiyoung Kim])# _LT_TAG_COMPILER 893*735d6239SKiyoung Kim 894*735d6239SKiyoung Kim 895*735d6239SKiyoung Kim# _LT_COMPILER_BOILERPLATE 896*735d6239SKiyoung Kim# ------------------------ 897*735d6239SKiyoung Kim# Check for compiler boilerplate output or warnings with 898*735d6239SKiyoung Kim# the simple compiler test code. 899*735d6239SKiyoung Kimm4_defun([_LT_COMPILER_BOILERPLATE], 900*735d6239SKiyoung Kim[m4_require([_LT_DECL_SED])dnl 901*735d6239SKiyoung Kimac_outfile=conftest.$ac_objext 902*735d6239SKiyoung Kimecho "$lt_simple_compile_test_code" >conftest.$ac_ext 903*735d6239SKiyoung Kimeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 904*735d6239SKiyoung Kim_lt_compiler_boilerplate=`cat conftest.err` 905*735d6239SKiyoung Kim$RM conftest* 906*735d6239SKiyoung Kim])# _LT_COMPILER_BOILERPLATE 907*735d6239SKiyoung Kim 908*735d6239SKiyoung Kim 909*735d6239SKiyoung Kim# _LT_LINKER_BOILERPLATE 910*735d6239SKiyoung Kim# ---------------------- 911*735d6239SKiyoung Kim# Check for linker boilerplate output or warnings with 912*735d6239SKiyoung Kim# the simple link test code. 913*735d6239SKiyoung Kimm4_defun([_LT_LINKER_BOILERPLATE], 914*735d6239SKiyoung Kim[m4_require([_LT_DECL_SED])dnl 915*735d6239SKiyoung Kimac_outfile=conftest.$ac_objext 916*735d6239SKiyoung Kimecho "$lt_simple_link_test_code" >conftest.$ac_ext 917*735d6239SKiyoung Kimeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 918*735d6239SKiyoung Kim_lt_linker_boilerplate=`cat conftest.err` 919*735d6239SKiyoung Kim$RM -r conftest* 920*735d6239SKiyoung Kim])# _LT_LINKER_BOILERPLATE 921*735d6239SKiyoung Kim 922*735d6239SKiyoung Kim# _LT_REQUIRED_DARWIN_CHECKS 923*735d6239SKiyoung Kim# ------------------------- 924*735d6239SKiyoung Kimm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 925*735d6239SKiyoung Kim case $host_os in 926*735d6239SKiyoung Kim rhapsody* | darwin*) 927*735d6239SKiyoung Kim AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 928*735d6239SKiyoung Kim AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 929*735d6239SKiyoung Kim AC_CHECK_TOOL([LIPO], [lipo], [:]) 930*735d6239SKiyoung Kim AC_CHECK_TOOL([OTOOL], [otool], [:]) 931*735d6239SKiyoung Kim AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 932*735d6239SKiyoung Kim _LT_DECL([], [DSYMUTIL], [1], 933*735d6239SKiyoung Kim [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 934*735d6239SKiyoung Kim _LT_DECL([], [NMEDIT], [1], 935*735d6239SKiyoung Kim [Tool to change global to local symbols on Mac OS X]) 936*735d6239SKiyoung Kim _LT_DECL([], [LIPO], [1], 937*735d6239SKiyoung Kim [Tool to manipulate fat objects and archives on Mac OS X]) 938*735d6239SKiyoung Kim _LT_DECL([], [OTOOL], [1], 939*735d6239SKiyoung Kim [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 940*735d6239SKiyoung Kim _LT_DECL([], [OTOOL64], [1], 941*735d6239SKiyoung Kim [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 942*735d6239SKiyoung Kim 943*735d6239SKiyoung Kim AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 944*735d6239SKiyoung Kim [lt_cv_apple_cc_single_mod=no 945*735d6239SKiyoung Kim if test -z "${LT_MULTI_MODULE}"; then 946*735d6239SKiyoung Kim # By default we will add the -single_module flag. You can override 947*735d6239SKiyoung Kim # by either setting the environment variable LT_MULTI_MODULE 948*735d6239SKiyoung Kim # non-empty at configure time, or by adding -multi_module to the 949*735d6239SKiyoung Kim # link flags. 950*735d6239SKiyoung Kim rm -rf libconftest.dylib* 951*735d6239SKiyoung Kim echo "int foo(void){return 1;}" > conftest.c 952*735d6239SKiyoung Kim echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 953*735d6239SKiyoung Kim-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 954*735d6239SKiyoung Kim $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 955*735d6239SKiyoung Kim -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 956*735d6239SKiyoung Kim _lt_result=$? 957*735d6239SKiyoung Kim if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then 958*735d6239SKiyoung Kim lt_cv_apple_cc_single_mod=yes 959*735d6239SKiyoung Kim else 960*735d6239SKiyoung Kim cat conftest.err >&AS_MESSAGE_LOG_FD 961*735d6239SKiyoung Kim fi 962*735d6239SKiyoung Kim rm -rf libconftest.dylib* 963*735d6239SKiyoung Kim rm -f conftest.* 964*735d6239SKiyoung Kim fi]) 965*735d6239SKiyoung Kim AC_CACHE_CHECK([for -exported_symbols_list linker flag], 966*735d6239SKiyoung Kim [lt_cv_ld_exported_symbols_list], 967*735d6239SKiyoung Kim [lt_cv_ld_exported_symbols_list=no 968*735d6239SKiyoung Kim save_LDFLAGS=$LDFLAGS 969*735d6239SKiyoung Kim echo "_main" > conftest.sym 970*735d6239SKiyoung Kim LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 971*735d6239SKiyoung Kim AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 972*735d6239SKiyoung Kim [lt_cv_ld_exported_symbols_list=yes], 973*735d6239SKiyoung Kim [lt_cv_ld_exported_symbols_list=no]) 974*735d6239SKiyoung Kim LDFLAGS="$save_LDFLAGS" 975*735d6239SKiyoung Kim ]) 976*735d6239SKiyoung Kim AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 977*735d6239SKiyoung Kim [lt_cv_ld_force_load=no 978*735d6239SKiyoung Kim cat > conftest.c << _LT_EOF 979*735d6239SKiyoung Kimint forced_loaded() { return 2;} 980*735d6239SKiyoung Kim_LT_EOF 981*735d6239SKiyoung Kim echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 982*735d6239SKiyoung Kim $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 983*735d6239SKiyoung Kim echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 984*735d6239SKiyoung Kim $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 985*735d6239SKiyoung Kim echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 986*735d6239SKiyoung Kim $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 987*735d6239SKiyoung Kim cat > conftest.c << _LT_EOF 988*735d6239SKiyoung Kimint main() { return 0;} 989*735d6239SKiyoung Kim_LT_EOF 990*735d6239SKiyoung Kim echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 991*735d6239SKiyoung Kim $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 992*735d6239SKiyoung Kim _lt_result=$? 993*735d6239SKiyoung Kim if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then 994*735d6239SKiyoung Kim lt_cv_ld_force_load=yes 995*735d6239SKiyoung Kim else 996*735d6239SKiyoung Kim cat conftest.err >&AS_MESSAGE_LOG_FD 997*735d6239SKiyoung Kim fi 998*735d6239SKiyoung Kim rm -f conftest.err libconftest.a conftest conftest.c 999*735d6239SKiyoung Kim rm -rf conftest.dSYM 1000*735d6239SKiyoung Kim ]) 1001*735d6239SKiyoung Kim case $host_os in 1002*735d6239SKiyoung Kim rhapsody* | darwin1.[[012]]) 1003*735d6239SKiyoung Kim _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 1004*735d6239SKiyoung Kim darwin1.*) 1005*735d6239SKiyoung Kim _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1006*735d6239SKiyoung Kim darwin*) # darwin 5.x on 1007*735d6239SKiyoung Kim # if running on 10.5 or later, the deployment target defaults 1008*735d6239SKiyoung Kim # to the OS version, if on x86, and 10.4, the deployment 1009*735d6239SKiyoung Kim # target defaults to 10.4. Don't you love it? 1010*735d6239SKiyoung Kim case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1011*735d6239SKiyoung Kim 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 1012*735d6239SKiyoung Kim _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 1013*735d6239SKiyoung Kim 10.[[012]]*) 1014*735d6239SKiyoung Kim _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1015*735d6239SKiyoung Kim 10.*) 1016*735d6239SKiyoung Kim _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 1017*735d6239SKiyoung Kim esac 1018*735d6239SKiyoung Kim ;; 1019*735d6239SKiyoung Kim esac 1020*735d6239SKiyoung Kim if test "$lt_cv_apple_cc_single_mod" = "yes"; then 1021*735d6239SKiyoung Kim _lt_dar_single_mod='$single_module' 1022*735d6239SKiyoung Kim fi 1023*735d6239SKiyoung Kim if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 1024*735d6239SKiyoung Kim _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 1025*735d6239SKiyoung Kim else 1026*735d6239SKiyoung Kim _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 1027*735d6239SKiyoung Kim fi 1028*735d6239SKiyoung Kim if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 1029*735d6239SKiyoung Kim _lt_dsymutil='~$DSYMUTIL $lib || :' 1030*735d6239SKiyoung Kim else 1031*735d6239SKiyoung Kim _lt_dsymutil= 1032*735d6239SKiyoung Kim fi 1033*735d6239SKiyoung Kim ;; 1034*735d6239SKiyoung Kim esac 1035*735d6239SKiyoung Kim]) 1036*735d6239SKiyoung Kim 1037*735d6239SKiyoung Kim 1038*735d6239SKiyoung Kim# _LT_DARWIN_LINKER_FEATURES 1039*735d6239SKiyoung Kim# -------------------------- 1040*735d6239SKiyoung Kim# Checks for linker and compiler features on darwin 1041*735d6239SKiyoung Kimm4_defun([_LT_DARWIN_LINKER_FEATURES], 1042*735d6239SKiyoung Kim[ 1043*735d6239SKiyoung Kim m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1044*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1045*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct, $1)=no 1046*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_automatic, $1)=yes 1047*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1048*735d6239SKiyoung Kim if test "$lt_cv_ld_force_load" = "yes"; then 1049*735d6239SKiyoung Kim _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\"`' 1050*735d6239SKiyoung Kim else 1051*735d6239SKiyoung Kim _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1052*735d6239SKiyoung Kim fi 1053*735d6239SKiyoung Kim _LT_TAGVAR(link_all_deplibs, $1)=yes 1054*735d6239SKiyoung Kim _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 1055*735d6239SKiyoung Kim case $cc_basename in 1056*735d6239SKiyoung Kim ifort*) _lt_dar_can_shared=yes ;; 1057*735d6239SKiyoung Kim *) _lt_dar_can_shared=$GCC ;; 1058*735d6239SKiyoung Kim esac 1059*735d6239SKiyoung Kim if test "$_lt_dar_can_shared" = "yes"; then 1060*735d6239SKiyoung Kim output_verbose_link_cmd=func_echo_all 1061*735d6239SKiyoung Kim _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}" 1062*735d6239SKiyoung Kim _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 1063*735d6239SKiyoung Kim _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}" 1064*735d6239SKiyoung Kim _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}" 1065*735d6239SKiyoung Kim m4_if([$1], [CXX], 1066*735d6239SKiyoung Kim[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 1067*735d6239SKiyoung Kim _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}" 1068*735d6239SKiyoung Kim _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}" 1069*735d6239SKiyoung Kim fi 1070*735d6239SKiyoung Kim],[]) 1071*735d6239SKiyoung Kim else 1072*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 1073*735d6239SKiyoung Kim fi 1074*735d6239SKiyoung Kim]) 1075*735d6239SKiyoung Kim 1076*735d6239SKiyoung Kim# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1077*735d6239SKiyoung Kim# ---------------------------------- 1078*735d6239SKiyoung Kim# Links a minimal program and checks the executable 1079*735d6239SKiyoung Kim# for the system default hardcoded library path. In most cases, 1080*735d6239SKiyoung Kim# this is /usr/lib:/lib, but when the MPI compilers are used 1081*735d6239SKiyoung Kim# the location of the communication and MPI libs are included too. 1082*735d6239SKiyoung Kim# If we don't find anything, use the default library path according 1083*735d6239SKiyoung Kim# to the aix ld manual. 1084*735d6239SKiyoung Kim# Store the results from the different compilers for each TAGNAME. 1085*735d6239SKiyoung Kim# Allow to override them for all tags through lt_cv_aix_libpath. 1086*735d6239SKiyoung Kimm4_defun([_LT_SYS_MODULE_PATH_AIX], 1087*735d6239SKiyoung Kim[m4_require([_LT_DECL_SED])dnl 1088*735d6239SKiyoung Kimif test "${lt_cv_aix_libpath+set}" = set; then 1089*735d6239SKiyoung Kim aix_libpath=$lt_cv_aix_libpath 1090*735d6239SKiyoung Kimelse 1091*735d6239SKiyoung Kim AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1092*735d6239SKiyoung Kim [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1093*735d6239SKiyoung Kim lt_aix_libpath_sed='[ 1094*735d6239SKiyoung Kim /Import File Strings/,/^$/ { 1095*735d6239SKiyoung Kim /^0/ { 1096*735d6239SKiyoung Kim s/^0 *\([^ ]*\) *$/\1/ 1097*735d6239SKiyoung Kim p 1098*735d6239SKiyoung Kim } 1099*735d6239SKiyoung Kim }]' 1100*735d6239SKiyoung Kim _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1101*735d6239SKiyoung Kim # Check for a 64-bit object if we didn't find anything. 1102*735d6239SKiyoung Kim if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1103*735d6239SKiyoung Kim _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1104*735d6239SKiyoung Kim fi],[]) 1105*735d6239SKiyoung Kim if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1106*735d6239SKiyoung Kim _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 1107*735d6239SKiyoung Kim fi 1108*735d6239SKiyoung Kim ]) 1109*735d6239SKiyoung Kim aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1110*735d6239SKiyoung Kimfi 1111*735d6239SKiyoung Kim])# _LT_SYS_MODULE_PATH_AIX 1112*735d6239SKiyoung Kim 1113*735d6239SKiyoung Kim 1114*735d6239SKiyoung Kim# _LT_SHELL_INIT(ARG) 1115*735d6239SKiyoung Kim# ------------------- 1116*735d6239SKiyoung Kimm4_define([_LT_SHELL_INIT], 1117*735d6239SKiyoung Kim[m4_divert_text([M4SH-INIT], [$1 1118*735d6239SKiyoung Kim])])# _LT_SHELL_INIT 1119*735d6239SKiyoung Kim 1120*735d6239SKiyoung Kim 1121*735d6239SKiyoung Kim 1122*735d6239SKiyoung Kim# _LT_PROG_ECHO_BACKSLASH 1123*735d6239SKiyoung Kim# ----------------------- 1124*735d6239SKiyoung Kim# Find how we can fake an echo command that does not interpret backslash. 1125*735d6239SKiyoung Kim# In particular, with Autoconf 2.60 or later we add some code to the start 1126*735d6239SKiyoung Kim# of the generated configure script which will find a shell with a builtin 1127*735d6239SKiyoung Kim# printf (which we can use as an echo command). 1128*735d6239SKiyoung Kimm4_defun([_LT_PROG_ECHO_BACKSLASH], 1129*735d6239SKiyoung Kim[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1130*735d6239SKiyoung KimECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1131*735d6239SKiyoung KimECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1132*735d6239SKiyoung Kim 1133*735d6239SKiyoung KimAC_MSG_CHECKING([how to print strings]) 1134*735d6239SKiyoung Kim# Test print first, because it will be a builtin if present. 1135*735d6239SKiyoung Kimif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1136*735d6239SKiyoung Kim test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1137*735d6239SKiyoung Kim ECHO='print -r --' 1138*735d6239SKiyoung Kimelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1139*735d6239SKiyoung Kim ECHO='printf %s\n' 1140*735d6239SKiyoung Kimelse 1141*735d6239SKiyoung Kim # Use this function as a fallback that always works. 1142*735d6239SKiyoung Kim func_fallback_echo () 1143*735d6239SKiyoung Kim { 1144*735d6239SKiyoung Kim eval 'cat <<_LTECHO_EOF 1145*735d6239SKiyoung Kim$[]1 1146*735d6239SKiyoung Kim_LTECHO_EOF' 1147*735d6239SKiyoung Kim } 1148*735d6239SKiyoung Kim ECHO='func_fallback_echo' 1149*735d6239SKiyoung Kimfi 1150*735d6239SKiyoung Kim 1151*735d6239SKiyoung Kim# func_echo_all arg... 1152*735d6239SKiyoung Kim# Invoke $ECHO with all args, space-separated. 1153*735d6239SKiyoung Kimfunc_echo_all () 1154*735d6239SKiyoung Kim{ 1155*735d6239SKiyoung Kim $ECHO "$*" 1156*735d6239SKiyoung Kim} 1157*735d6239SKiyoung Kim 1158*735d6239SKiyoung Kimcase "$ECHO" in 1159*735d6239SKiyoung Kim printf*) AC_MSG_RESULT([printf]) ;; 1160*735d6239SKiyoung Kim print*) AC_MSG_RESULT([print -r]) ;; 1161*735d6239SKiyoung Kim *) AC_MSG_RESULT([cat]) ;; 1162*735d6239SKiyoung Kimesac 1163*735d6239SKiyoung Kim 1164*735d6239SKiyoung Kimm4_ifdef([_AS_DETECT_SUGGESTED], 1165*735d6239SKiyoung Kim[_AS_DETECT_SUGGESTED([ 1166*735d6239SKiyoung Kim test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1167*735d6239SKiyoung Kim ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1168*735d6239SKiyoung Kim ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1169*735d6239SKiyoung Kim ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1170*735d6239SKiyoung Kim PATH=/empty FPATH=/empty; export PATH FPATH 1171*735d6239SKiyoung Kim test "X`printf %s $ECHO`" = "X$ECHO" \ 1172*735d6239SKiyoung Kim || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1173*735d6239SKiyoung Kim 1174*735d6239SKiyoung Kim_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1175*735d6239SKiyoung Kim_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1176*735d6239SKiyoung Kim])# _LT_PROG_ECHO_BACKSLASH 1177*735d6239SKiyoung Kim 1178*735d6239SKiyoung Kim 1179*735d6239SKiyoung Kim# _LT_WITH_SYSROOT 1180*735d6239SKiyoung Kim# ---------------- 1181*735d6239SKiyoung KimAC_DEFUN([_LT_WITH_SYSROOT], 1182*735d6239SKiyoung Kim[AC_MSG_CHECKING([for sysroot]) 1183*735d6239SKiyoung KimAC_ARG_WITH([sysroot], 1184*735d6239SKiyoung Kim[ --with-sysroot[=DIR] Search for dependent libraries within DIR 1185*735d6239SKiyoung Kim (or the compiler's sysroot if not specified).], 1186*735d6239SKiyoung Kim[], [with_sysroot=no]) 1187*735d6239SKiyoung Kim 1188*735d6239SKiyoung Kimdnl lt_sysroot will always be passed unquoted. We quote it here 1189*735d6239SKiyoung Kimdnl in case the user passed a directory name. 1190*735d6239SKiyoung Kimlt_sysroot= 1191*735d6239SKiyoung Kimcase ${with_sysroot} in #( 1192*735d6239SKiyoung Kim yes) 1193*735d6239SKiyoung Kim if test "$GCC" = yes; then 1194*735d6239SKiyoung Kim lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1195*735d6239SKiyoung Kim fi 1196*735d6239SKiyoung Kim ;; #( 1197*735d6239SKiyoung Kim /*) 1198*735d6239SKiyoung Kim lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1199*735d6239SKiyoung Kim ;; #( 1200*735d6239SKiyoung Kim no|'') 1201*735d6239SKiyoung Kim ;; #( 1202*735d6239SKiyoung Kim *) 1203*735d6239SKiyoung Kim AC_MSG_RESULT([${with_sysroot}]) 1204*735d6239SKiyoung Kim AC_MSG_ERROR([The sysroot must be an absolute path.]) 1205*735d6239SKiyoung Kim ;; 1206*735d6239SKiyoung Kimesac 1207*735d6239SKiyoung Kim 1208*735d6239SKiyoung Kim AC_MSG_RESULT([${lt_sysroot:-no}]) 1209*735d6239SKiyoung Kim_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1210*735d6239SKiyoung Kim[dependent libraries, and in which our libraries should be installed.])]) 1211*735d6239SKiyoung Kim 1212*735d6239SKiyoung Kim# _LT_ENABLE_LOCK 1213*735d6239SKiyoung Kim# --------------- 1214*735d6239SKiyoung Kimm4_defun([_LT_ENABLE_LOCK], 1215*735d6239SKiyoung Kim[AC_ARG_ENABLE([libtool-lock], 1216*735d6239SKiyoung Kim [AS_HELP_STRING([--disable-libtool-lock], 1217*735d6239SKiyoung Kim [avoid locking (might break parallel builds)])]) 1218*735d6239SKiyoung Kimtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 1219*735d6239SKiyoung Kim 1220*735d6239SKiyoung Kim# Some flags need to be propagated to the compiler or linker for good 1221*735d6239SKiyoung Kim# libtool support. 1222*735d6239SKiyoung Kimcase $host in 1223*735d6239SKiyoung Kimia64-*-hpux*) 1224*735d6239SKiyoung Kim # Find out which ABI we are using. 1225*735d6239SKiyoung Kim echo 'int i;' > conftest.$ac_ext 1226*735d6239SKiyoung Kim if AC_TRY_EVAL(ac_compile); then 1227*735d6239SKiyoung Kim case `/usr/bin/file conftest.$ac_objext` in 1228*735d6239SKiyoung Kim *ELF-32*) 1229*735d6239SKiyoung Kim HPUX_IA64_MODE="32" 1230*735d6239SKiyoung Kim ;; 1231*735d6239SKiyoung Kim *ELF-64*) 1232*735d6239SKiyoung Kim HPUX_IA64_MODE="64" 1233*735d6239SKiyoung Kim ;; 1234*735d6239SKiyoung Kim esac 1235*735d6239SKiyoung Kim fi 1236*735d6239SKiyoung Kim rm -rf conftest* 1237*735d6239SKiyoung Kim ;; 1238*735d6239SKiyoung Kim*-*-irix6*) 1239*735d6239SKiyoung Kim # Find out which ABI we are using. 1240*735d6239SKiyoung Kim echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1241*735d6239SKiyoung Kim if AC_TRY_EVAL(ac_compile); then 1242*735d6239SKiyoung Kim if test "$lt_cv_prog_gnu_ld" = yes; then 1243*735d6239SKiyoung Kim case `/usr/bin/file conftest.$ac_objext` in 1244*735d6239SKiyoung Kim *32-bit*) 1245*735d6239SKiyoung Kim LD="${LD-ld} -melf32bsmip" 1246*735d6239SKiyoung Kim ;; 1247*735d6239SKiyoung Kim *N32*) 1248*735d6239SKiyoung Kim LD="${LD-ld} -melf32bmipn32" 1249*735d6239SKiyoung Kim ;; 1250*735d6239SKiyoung Kim *64-bit*) 1251*735d6239SKiyoung Kim LD="${LD-ld} -melf64bmip" 1252*735d6239SKiyoung Kim ;; 1253*735d6239SKiyoung Kim esac 1254*735d6239SKiyoung Kim else 1255*735d6239SKiyoung Kim case `/usr/bin/file conftest.$ac_objext` in 1256*735d6239SKiyoung Kim *32-bit*) 1257*735d6239SKiyoung Kim LD="${LD-ld} -32" 1258*735d6239SKiyoung Kim ;; 1259*735d6239SKiyoung Kim *N32*) 1260*735d6239SKiyoung Kim LD="${LD-ld} -n32" 1261*735d6239SKiyoung Kim ;; 1262*735d6239SKiyoung Kim *64-bit*) 1263*735d6239SKiyoung Kim LD="${LD-ld} -64" 1264*735d6239SKiyoung Kim ;; 1265*735d6239SKiyoung Kim esac 1266*735d6239SKiyoung Kim fi 1267*735d6239SKiyoung Kim fi 1268*735d6239SKiyoung Kim rm -rf conftest* 1269*735d6239SKiyoung Kim ;; 1270*735d6239SKiyoung Kim 1271*735d6239SKiyoung Kimx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 1272*735d6239SKiyoung Kims390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1273*735d6239SKiyoung Kim # Find out which ABI we are using. 1274*735d6239SKiyoung Kim echo 'int i;' > conftest.$ac_ext 1275*735d6239SKiyoung Kim if AC_TRY_EVAL(ac_compile); then 1276*735d6239SKiyoung Kim case `/usr/bin/file conftest.o` in 1277*735d6239SKiyoung Kim *32-bit*) 1278*735d6239SKiyoung Kim case $host in 1279*735d6239SKiyoung Kim x86_64-*kfreebsd*-gnu) 1280*735d6239SKiyoung Kim LD="${LD-ld} -m elf_i386_fbsd" 1281*735d6239SKiyoung Kim ;; 1282*735d6239SKiyoung Kim x86_64-*linux*) 1283*735d6239SKiyoung Kim LD="${LD-ld} -m elf_i386" 1284*735d6239SKiyoung Kim ;; 1285*735d6239SKiyoung Kim ppc64-*linux*|powerpc64-*linux*) 1286*735d6239SKiyoung Kim LD="${LD-ld} -m elf32ppclinux" 1287*735d6239SKiyoung Kim ;; 1288*735d6239SKiyoung Kim s390x-*linux*) 1289*735d6239SKiyoung Kim LD="${LD-ld} -m elf_s390" 1290*735d6239SKiyoung Kim ;; 1291*735d6239SKiyoung Kim sparc64-*linux*) 1292*735d6239SKiyoung Kim LD="${LD-ld} -m elf32_sparc" 1293*735d6239SKiyoung Kim ;; 1294*735d6239SKiyoung Kim esac 1295*735d6239SKiyoung Kim ;; 1296*735d6239SKiyoung Kim *64-bit*) 1297*735d6239SKiyoung Kim case $host in 1298*735d6239SKiyoung Kim x86_64-*kfreebsd*-gnu) 1299*735d6239SKiyoung Kim LD="${LD-ld} -m elf_x86_64_fbsd" 1300*735d6239SKiyoung Kim ;; 1301*735d6239SKiyoung Kim x86_64-*linux*) 1302*735d6239SKiyoung Kim LD="${LD-ld} -m elf_x86_64" 1303*735d6239SKiyoung Kim ;; 1304*735d6239SKiyoung Kim ppc*-*linux*|powerpc*-*linux*) 1305*735d6239SKiyoung Kim LD="${LD-ld} -m elf64ppc" 1306*735d6239SKiyoung Kim ;; 1307*735d6239SKiyoung Kim s390*-*linux*|s390*-*tpf*) 1308*735d6239SKiyoung Kim LD="${LD-ld} -m elf64_s390" 1309*735d6239SKiyoung Kim ;; 1310*735d6239SKiyoung Kim sparc*-*linux*) 1311*735d6239SKiyoung Kim LD="${LD-ld} -m elf64_sparc" 1312*735d6239SKiyoung Kim ;; 1313*735d6239SKiyoung Kim esac 1314*735d6239SKiyoung Kim ;; 1315*735d6239SKiyoung Kim esac 1316*735d6239SKiyoung Kim fi 1317*735d6239SKiyoung Kim rm -rf conftest* 1318*735d6239SKiyoung Kim ;; 1319*735d6239SKiyoung Kim 1320*735d6239SKiyoung Kim*-*-sco3.2v5*) 1321*735d6239SKiyoung Kim # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1322*735d6239SKiyoung Kim SAVE_CFLAGS="$CFLAGS" 1323*735d6239SKiyoung Kim CFLAGS="$CFLAGS -belf" 1324*735d6239SKiyoung Kim AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1325*735d6239SKiyoung Kim [AC_LANG_PUSH(C) 1326*735d6239SKiyoung Kim AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1327*735d6239SKiyoung Kim AC_LANG_POP]) 1328*735d6239SKiyoung Kim if test x"$lt_cv_cc_needs_belf" != x"yes"; then 1329*735d6239SKiyoung Kim # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1330*735d6239SKiyoung Kim CFLAGS="$SAVE_CFLAGS" 1331*735d6239SKiyoung Kim fi 1332*735d6239SKiyoung Kim ;; 1333*735d6239SKiyoung Kimsparc*-*solaris*) 1334*735d6239SKiyoung Kim # Find out which ABI we are using. 1335*735d6239SKiyoung Kim echo 'int i;' > conftest.$ac_ext 1336*735d6239SKiyoung Kim if AC_TRY_EVAL(ac_compile); then 1337*735d6239SKiyoung Kim case `/usr/bin/file conftest.o` in 1338*735d6239SKiyoung Kim *64-bit*) 1339*735d6239SKiyoung Kim case $lt_cv_prog_gnu_ld in 1340*735d6239SKiyoung Kim yes*) LD="${LD-ld} -m elf64_sparc" ;; 1341*735d6239SKiyoung Kim *) 1342*735d6239SKiyoung Kim if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1343*735d6239SKiyoung Kim LD="${LD-ld} -64" 1344*735d6239SKiyoung Kim fi 1345*735d6239SKiyoung Kim ;; 1346*735d6239SKiyoung Kim esac 1347*735d6239SKiyoung Kim ;; 1348*735d6239SKiyoung Kim esac 1349*735d6239SKiyoung Kim fi 1350*735d6239SKiyoung Kim rm -rf conftest* 1351*735d6239SKiyoung Kim ;; 1352*735d6239SKiyoung Kimesac 1353*735d6239SKiyoung Kim 1354*735d6239SKiyoung Kimneed_locks="$enable_libtool_lock" 1355*735d6239SKiyoung Kim])# _LT_ENABLE_LOCK 1356*735d6239SKiyoung Kim 1357*735d6239SKiyoung Kim 1358*735d6239SKiyoung Kim# _LT_PROG_AR 1359*735d6239SKiyoung Kim# ----------- 1360*735d6239SKiyoung Kimm4_defun([_LT_PROG_AR], 1361*735d6239SKiyoung Kim[AC_CHECK_TOOLS(AR, [ar], false) 1362*735d6239SKiyoung Kim: ${AR=ar} 1363*735d6239SKiyoung Kim: ${AR_FLAGS=cru} 1364*735d6239SKiyoung Kim_LT_DECL([], [AR], [1], [The archiver]) 1365*735d6239SKiyoung Kim_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 1366*735d6239SKiyoung Kim 1367*735d6239SKiyoung KimAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1368*735d6239SKiyoung Kim [lt_cv_ar_at_file=no 1369*735d6239SKiyoung Kim AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1370*735d6239SKiyoung Kim [echo conftest.$ac_objext > conftest.lst 1371*735d6239SKiyoung Kim lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1372*735d6239SKiyoung Kim AC_TRY_EVAL([lt_ar_try]) 1373*735d6239SKiyoung Kim if test "$ac_status" -eq 0; then 1374*735d6239SKiyoung Kim # Ensure the archiver fails upon bogus file names. 1375*735d6239SKiyoung Kim rm -f conftest.$ac_objext libconftest.a 1376*735d6239SKiyoung Kim AC_TRY_EVAL([lt_ar_try]) 1377*735d6239SKiyoung Kim if test "$ac_status" -ne 0; then 1378*735d6239SKiyoung Kim lt_cv_ar_at_file=@ 1379*735d6239SKiyoung Kim fi 1380*735d6239SKiyoung Kim fi 1381*735d6239SKiyoung Kim rm -f conftest.* libconftest.a 1382*735d6239SKiyoung Kim ]) 1383*735d6239SKiyoung Kim ]) 1384*735d6239SKiyoung Kim 1385*735d6239SKiyoung Kimif test "x$lt_cv_ar_at_file" = xno; then 1386*735d6239SKiyoung Kim archiver_list_spec= 1387*735d6239SKiyoung Kimelse 1388*735d6239SKiyoung Kim archiver_list_spec=$lt_cv_ar_at_file 1389*735d6239SKiyoung Kimfi 1390*735d6239SKiyoung Kim_LT_DECL([], [archiver_list_spec], [1], 1391*735d6239SKiyoung Kim [How to feed a file listing to the archiver]) 1392*735d6239SKiyoung Kim])# _LT_PROG_AR 1393*735d6239SKiyoung Kim 1394*735d6239SKiyoung Kim 1395*735d6239SKiyoung Kim# _LT_CMD_OLD_ARCHIVE 1396*735d6239SKiyoung Kim# ------------------- 1397*735d6239SKiyoung Kimm4_defun([_LT_CMD_OLD_ARCHIVE], 1398*735d6239SKiyoung Kim[_LT_PROG_AR 1399*735d6239SKiyoung Kim 1400*735d6239SKiyoung KimAC_CHECK_TOOL(STRIP, strip, :) 1401*735d6239SKiyoung Kimtest -z "$STRIP" && STRIP=: 1402*735d6239SKiyoung Kim_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1403*735d6239SKiyoung Kim 1404*735d6239SKiyoung KimAC_CHECK_TOOL(RANLIB, ranlib, :) 1405*735d6239SKiyoung Kimtest -z "$RANLIB" && RANLIB=: 1406*735d6239SKiyoung Kim_LT_DECL([], [RANLIB], [1], 1407*735d6239SKiyoung Kim [Commands used to install an old-style archive]) 1408*735d6239SKiyoung Kim 1409*735d6239SKiyoung Kim# Determine commands to create old-style static archives. 1410*735d6239SKiyoung Kimold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1411*735d6239SKiyoung Kimold_postinstall_cmds='chmod 644 $oldlib' 1412*735d6239SKiyoung Kimold_postuninstall_cmds= 1413*735d6239SKiyoung Kim 1414*735d6239SKiyoung Kimif test -n "$RANLIB"; then 1415*735d6239SKiyoung Kim case $host_os in 1416*735d6239SKiyoung Kim openbsd*) 1417*735d6239SKiyoung Kim old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 1418*735d6239SKiyoung Kim ;; 1419*735d6239SKiyoung Kim *) 1420*735d6239SKiyoung Kim old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 1421*735d6239SKiyoung Kim ;; 1422*735d6239SKiyoung Kim esac 1423*735d6239SKiyoung Kim old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 1424*735d6239SKiyoung Kimfi 1425*735d6239SKiyoung Kim 1426*735d6239SKiyoung Kimcase $host_os in 1427*735d6239SKiyoung Kim darwin*) 1428*735d6239SKiyoung Kim lock_old_archive_extraction=yes ;; 1429*735d6239SKiyoung Kim *) 1430*735d6239SKiyoung Kim lock_old_archive_extraction=no ;; 1431*735d6239SKiyoung Kimesac 1432*735d6239SKiyoung Kim_LT_DECL([], [old_postinstall_cmds], [2]) 1433*735d6239SKiyoung Kim_LT_DECL([], [old_postuninstall_cmds], [2]) 1434*735d6239SKiyoung Kim_LT_TAGDECL([], [old_archive_cmds], [2], 1435*735d6239SKiyoung Kim [Commands used to build an old-style archive]) 1436*735d6239SKiyoung Kim_LT_DECL([], [lock_old_archive_extraction], [0], 1437*735d6239SKiyoung Kim [Whether to use a lock for old archive extraction]) 1438*735d6239SKiyoung Kim])# _LT_CMD_OLD_ARCHIVE 1439*735d6239SKiyoung Kim 1440*735d6239SKiyoung Kim 1441*735d6239SKiyoung Kim# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1442*735d6239SKiyoung Kim# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1443*735d6239SKiyoung Kim# ---------------------------------------------------------------- 1444*735d6239SKiyoung Kim# Check whether the given compiler option works 1445*735d6239SKiyoung KimAC_DEFUN([_LT_COMPILER_OPTION], 1446*735d6239SKiyoung Kim[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1447*735d6239SKiyoung Kimm4_require([_LT_DECL_SED])dnl 1448*735d6239SKiyoung KimAC_CACHE_CHECK([$1], [$2], 1449*735d6239SKiyoung Kim [$2=no 1450*735d6239SKiyoung Kim m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1451*735d6239SKiyoung Kim echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1452*735d6239SKiyoung Kim lt_compiler_flag="$3" 1453*735d6239SKiyoung Kim # Insert the option either (1) after the last *FLAGS variable, or 1454*735d6239SKiyoung Kim # (2) before a word containing "conftest.", or (3) at the end. 1455*735d6239SKiyoung Kim # Note that $ac_compile itself does not contain backslashes and begins 1456*735d6239SKiyoung Kim # with a dollar sign (not a hyphen), so the echo should work correctly. 1457*735d6239SKiyoung Kim # The option is referenced via a variable to avoid confusing sed. 1458*735d6239SKiyoung Kim lt_compile=`echo "$ac_compile" | $SED \ 1459*735d6239SKiyoung Kim -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1460*735d6239SKiyoung Kim -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1461*735d6239SKiyoung Kim -e 's:$: $lt_compiler_flag:'` 1462*735d6239SKiyoung Kim (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1463*735d6239SKiyoung Kim (eval "$lt_compile" 2>conftest.err) 1464*735d6239SKiyoung Kim ac_status=$? 1465*735d6239SKiyoung Kim cat conftest.err >&AS_MESSAGE_LOG_FD 1466*735d6239SKiyoung Kim echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1467*735d6239SKiyoung Kim if (exit $ac_status) && test -s "$ac_outfile"; then 1468*735d6239SKiyoung Kim # The compiler can only warn and ignore the option if not recognized 1469*735d6239SKiyoung Kim # So say no if there are warnings other than the usual output. 1470*735d6239SKiyoung Kim $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 1471*735d6239SKiyoung Kim $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1472*735d6239SKiyoung Kim if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1473*735d6239SKiyoung Kim $2=yes 1474*735d6239SKiyoung Kim fi 1475*735d6239SKiyoung Kim fi 1476*735d6239SKiyoung Kim $RM conftest* 1477*735d6239SKiyoung Kim]) 1478*735d6239SKiyoung Kim 1479*735d6239SKiyoung Kimif test x"[$]$2" = xyes; then 1480*735d6239SKiyoung Kim m4_if([$5], , :, [$5]) 1481*735d6239SKiyoung Kimelse 1482*735d6239SKiyoung Kim m4_if([$6], , :, [$6]) 1483*735d6239SKiyoung Kimfi 1484*735d6239SKiyoung Kim])# _LT_COMPILER_OPTION 1485*735d6239SKiyoung Kim 1486*735d6239SKiyoung Kim# Old name: 1487*735d6239SKiyoung KimAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1488*735d6239SKiyoung Kimdnl aclocal-1.4 backwards compatibility: 1489*735d6239SKiyoung Kimdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1490*735d6239SKiyoung Kim 1491*735d6239SKiyoung Kim 1492*735d6239SKiyoung Kim# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1493*735d6239SKiyoung Kim# [ACTION-SUCCESS], [ACTION-FAILURE]) 1494*735d6239SKiyoung Kim# ---------------------------------------------------- 1495*735d6239SKiyoung Kim# Check whether the given linker option works 1496*735d6239SKiyoung KimAC_DEFUN([_LT_LINKER_OPTION], 1497*735d6239SKiyoung Kim[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1498*735d6239SKiyoung Kimm4_require([_LT_DECL_SED])dnl 1499*735d6239SKiyoung KimAC_CACHE_CHECK([$1], [$2], 1500*735d6239SKiyoung Kim [$2=no 1501*735d6239SKiyoung Kim save_LDFLAGS="$LDFLAGS" 1502*735d6239SKiyoung Kim LDFLAGS="$LDFLAGS $3" 1503*735d6239SKiyoung Kim echo "$lt_simple_link_test_code" > conftest.$ac_ext 1504*735d6239SKiyoung Kim if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1505*735d6239SKiyoung Kim # The linker can only warn and ignore the option if not recognized 1506*735d6239SKiyoung Kim # So say no if there are warnings 1507*735d6239SKiyoung Kim if test -s conftest.err; then 1508*735d6239SKiyoung Kim # Append any errors to the config.log. 1509*735d6239SKiyoung Kim cat conftest.err 1>&AS_MESSAGE_LOG_FD 1510*735d6239SKiyoung Kim $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 1511*735d6239SKiyoung Kim $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1512*735d6239SKiyoung Kim if diff conftest.exp conftest.er2 >/dev/null; then 1513*735d6239SKiyoung Kim $2=yes 1514*735d6239SKiyoung Kim fi 1515*735d6239SKiyoung Kim else 1516*735d6239SKiyoung Kim $2=yes 1517*735d6239SKiyoung Kim fi 1518*735d6239SKiyoung Kim fi 1519*735d6239SKiyoung Kim $RM -r conftest* 1520*735d6239SKiyoung Kim LDFLAGS="$save_LDFLAGS" 1521*735d6239SKiyoung Kim]) 1522*735d6239SKiyoung Kim 1523*735d6239SKiyoung Kimif test x"[$]$2" = xyes; then 1524*735d6239SKiyoung Kim m4_if([$4], , :, [$4]) 1525*735d6239SKiyoung Kimelse 1526*735d6239SKiyoung Kim m4_if([$5], , :, [$5]) 1527*735d6239SKiyoung Kimfi 1528*735d6239SKiyoung Kim])# _LT_LINKER_OPTION 1529*735d6239SKiyoung Kim 1530*735d6239SKiyoung Kim# Old name: 1531*735d6239SKiyoung KimAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1532*735d6239SKiyoung Kimdnl aclocal-1.4 backwards compatibility: 1533*735d6239SKiyoung Kimdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1534*735d6239SKiyoung Kim 1535*735d6239SKiyoung Kim 1536*735d6239SKiyoung Kim# LT_CMD_MAX_LEN 1537*735d6239SKiyoung Kim#--------------- 1538*735d6239SKiyoung KimAC_DEFUN([LT_CMD_MAX_LEN], 1539*735d6239SKiyoung Kim[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1540*735d6239SKiyoung Kim# find the maximum length of command line arguments 1541*735d6239SKiyoung KimAC_MSG_CHECKING([the maximum length of command line arguments]) 1542*735d6239SKiyoung KimAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1543*735d6239SKiyoung Kim i=0 1544*735d6239SKiyoung Kim teststring="ABCD" 1545*735d6239SKiyoung Kim 1546*735d6239SKiyoung Kim case $build_os in 1547*735d6239SKiyoung Kim msdosdjgpp*) 1548*735d6239SKiyoung Kim # On DJGPP, this test can blow up pretty badly due to problems in libc 1549*735d6239SKiyoung Kim # (any single argument exceeding 2000 bytes causes a buffer overrun 1550*735d6239SKiyoung Kim # during glob expansion). Even if it were fixed, the result of this 1551*735d6239SKiyoung Kim # check would be larger than it should be. 1552*735d6239SKiyoung Kim lt_cv_sys_max_cmd_len=12288; # 12K is about right 1553*735d6239SKiyoung Kim ;; 1554*735d6239SKiyoung Kim 1555*735d6239SKiyoung Kim gnu*) 1556*735d6239SKiyoung Kim # Under GNU Hurd, this test is not required because there is 1557*735d6239SKiyoung Kim # no limit to the length of command line arguments. 1558*735d6239SKiyoung Kim # Libtool will interpret -1 as no limit whatsoever 1559*735d6239SKiyoung Kim lt_cv_sys_max_cmd_len=-1; 1560*735d6239SKiyoung Kim ;; 1561*735d6239SKiyoung Kim 1562*735d6239SKiyoung Kim cygwin* | mingw* | cegcc*) 1563*735d6239SKiyoung Kim # On Win9x/ME, this test blows up -- it succeeds, but takes 1564*735d6239SKiyoung Kim # about 5 minutes as the teststring grows exponentially. 1565*735d6239SKiyoung Kim # Worse, since 9x/ME are not pre-emptively multitasking, 1566*735d6239SKiyoung Kim # you end up with a "frozen" computer, even though with patience 1567*735d6239SKiyoung Kim # the test eventually succeeds (with a max line length of 256k). 1568*735d6239SKiyoung Kim # Instead, let's just punt: use the minimum linelength reported by 1569*735d6239SKiyoung Kim # all of the supported platforms: 8192 (on NT/2K/XP). 1570*735d6239SKiyoung Kim lt_cv_sys_max_cmd_len=8192; 1571*735d6239SKiyoung Kim ;; 1572*735d6239SKiyoung Kim 1573*735d6239SKiyoung Kim mint*) 1574*735d6239SKiyoung Kim # On MiNT this can take a long time and run out of memory. 1575*735d6239SKiyoung Kim lt_cv_sys_max_cmd_len=8192; 1576*735d6239SKiyoung Kim ;; 1577*735d6239SKiyoung Kim 1578*735d6239SKiyoung Kim amigaos*) 1579*735d6239SKiyoung Kim # On AmigaOS with pdksh, this test takes hours, literally. 1580*735d6239SKiyoung Kim # So we just punt and use a minimum line length of 8192. 1581*735d6239SKiyoung Kim lt_cv_sys_max_cmd_len=8192; 1582*735d6239SKiyoung Kim ;; 1583*735d6239SKiyoung Kim 1584*735d6239SKiyoung Kim netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 1585*735d6239SKiyoung Kim # This has been around since 386BSD, at least. Likely further. 1586*735d6239SKiyoung Kim if test -x /sbin/sysctl; then 1587*735d6239SKiyoung Kim lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1588*735d6239SKiyoung Kim elif test -x /usr/sbin/sysctl; then 1589*735d6239SKiyoung Kim lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1590*735d6239SKiyoung Kim else 1591*735d6239SKiyoung Kim lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1592*735d6239SKiyoung Kim fi 1593*735d6239SKiyoung Kim # And add a safety zone 1594*735d6239SKiyoung Kim lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1595*735d6239SKiyoung Kim lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1596*735d6239SKiyoung Kim ;; 1597*735d6239SKiyoung Kim 1598*735d6239SKiyoung Kim interix*) 1599*735d6239SKiyoung Kim # We know the value 262144 and hardcode it with a safety zone (like BSD) 1600*735d6239SKiyoung Kim lt_cv_sys_max_cmd_len=196608 1601*735d6239SKiyoung Kim ;; 1602*735d6239SKiyoung Kim 1603*735d6239SKiyoung Kim osf*) 1604*735d6239SKiyoung Kim # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1605*735d6239SKiyoung Kim # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1606*735d6239SKiyoung Kim # nice to cause kernel panics so lets avoid the loop below. 1607*735d6239SKiyoung Kim # First set a reasonable default. 1608*735d6239SKiyoung Kim lt_cv_sys_max_cmd_len=16384 1609*735d6239SKiyoung Kim # 1610*735d6239SKiyoung Kim if test -x /sbin/sysconfig; then 1611*735d6239SKiyoung Kim case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1612*735d6239SKiyoung Kim *1*) lt_cv_sys_max_cmd_len=-1 ;; 1613*735d6239SKiyoung Kim esac 1614*735d6239SKiyoung Kim fi 1615*735d6239SKiyoung Kim ;; 1616*735d6239SKiyoung Kim sco3.2v5*) 1617*735d6239SKiyoung Kim lt_cv_sys_max_cmd_len=102400 1618*735d6239SKiyoung Kim ;; 1619*735d6239SKiyoung Kim sysv5* | sco5v6* | sysv4.2uw2*) 1620*735d6239SKiyoung Kim kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1621*735d6239SKiyoung Kim if test -n "$kargmax"; then 1622*735d6239SKiyoung Kim lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1623*735d6239SKiyoung Kim else 1624*735d6239SKiyoung Kim lt_cv_sys_max_cmd_len=32768 1625*735d6239SKiyoung Kim fi 1626*735d6239SKiyoung Kim ;; 1627*735d6239SKiyoung Kim *) 1628*735d6239SKiyoung Kim lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1629*735d6239SKiyoung Kim if test -n "$lt_cv_sys_max_cmd_len"; then 1630*735d6239SKiyoung Kim lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1631*735d6239SKiyoung Kim lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1632*735d6239SKiyoung Kim else 1633*735d6239SKiyoung Kim # Make teststring a little bigger before we do anything with it. 1634*735d6239SKiyoung Kim # a 1K string should be a reasonable start. 1635*735d6239SKiyoung Kim for i in 1 2 3 4 5 6 7 8 ; do 1636*735d6239SKiyoung Kim teststring=$teststring$teststring 1637*735d6239SKiyoung Kim done 1638*735d6239SKiyoung Kim SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1639*735d6239SKiyoung Kim # If test is not a shell built-in, we'll probably end up computing a 1640*735d6239SKiyoung Kim # maximum length that is only half of the actual maximum length, but 1641*735d6239SKiyoung Kim # we can't tell. 1642*735d6239SKiyoung Kim while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ 1643*735d6239SKiyoung Kim = "X$teststring$teststring"; } >/dev/null 2>&1 && 1644*735d6239SKiyoung Kim test $i != 17 # 1/2 MB should be enough 1645*735d6239SKiyoung Kim do 1646*735d6239SKiyoung Kim i=`expr $i + 1` 1647*735d6239SKiyoung Kim teststring=$teststring$teststring 1648*735d6239SKiyoung Kim done 1649*735d6239SKiyoung Kim # Only check the string length outside the loop. 1650*735d6239SKiyoung Kim lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1651*735d6239SKiyoung Kim teststring= 1652*735d6239SKiyoung Kim # Add a significant safety factor because C++ compilers can tack on 1653*735d6239SKiyoung Kim # massive amounts of additional arguments before passing them to the 1654*735d6239SKiyoung Kim # linker. It appears as though 1/2 is a usable value. 1655*735d6239SKiyoung Kim lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1656*735d6239SKiyoung Kim fi 1657*735d6239SKiyoung Kim ;; 1658*735d6239SKiyoung Kim esac 1659*735d6239SKiyoung Kim]) 1660*735d6239SKiyoung Kimif test -n $lt_cv_sys_max_cmd_len ; then 1661*735d6239SKiyoung Kim AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1662*735d6239SKiyoung Kimelse 1663*735d6239SKiyoung Kim AC_MSG_RESULT(none) 1664*735d6239SKiyoung Kimfi 1665*735d6239SKiyoung Kimmax_cmd_len=$lt_cv_sys_max_cmd_len 1666*735d6239SKiyoung Kim_LT_DECL([], [max_cmd_len], [0], 1667*735d6239SKiyoung Kim [What is the maximum length of a command?]) 1668*735d6239SKiyoung Kim])# LT_CMD_MAX_LEN 1669*735d6239SKiyoung Kim 1670*735d6239SKiyoung Kim# Old name: 1671*735d6239SKiyoung KimAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1672*735d6239SKiyoung Kimdnl aclocal-1.4 backwards compatibility: 1673*735d6239SKiyoung Kimdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1674*735d6239SKiyoung Kim 1675*735d6239SKiyoung Kim 1676*735d6239SKiyoung Kim# _LT_HEADER_DLFCN 1677*735d6239SKiyoung Kim# ---------------- 1678*735d6239SKiyoung Kimm4_defun([_LT_HEADER_DLFCN], 1679*735d6239SKiyoung Kim[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1680*735d6239SKiyoung Kim])# _LT_HEADER_DLFCN 1681*735d6239SKiyoung Kim 1682*735d6239SKiyoung Kim 1683*735d6239SKiyoung Kim# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1684*735d6239SKiyoung Kim# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1685*735d6239SKiyoung Kim# ---------------------------------------------------------------- 1686*735d6239SKiyoung Kimm4_defun([_LT_TRY_DLOPEN_SELF], 1687*735d6239SKiyoung Kim[m4_require([_LT_HEADER_DLFCN])dnl 1688*735d6239SKiyoung Kimif test "$cross_compiling" = yes; then : 1689*735d6239SKiyoung Kim [$4] 1690*735d6239SKiyoung Kimelse 1691*735d6239SKiyoung Kim lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1692*735d6239SKiyoung Kim lt_status=$lt_dlunknown 1693*735d6239SKiyoung Kim cat > conftest.$ac_ext <<_LT_EOF 1694*735d6239SKiyoung Kim[#line $LINENO "configure" 1695*735d6239SKiyoung Kim#include "confdefs.h" 1696*735d6239SKiyoung Kim 1697*735d6239SKiyoung Kim#if HAVE_DLFCN_H 1698*735d6239SKiyoung Kim#include <dlfcn.h> 1699*735d6239SKiyoung Kim#endif 1700*735d6239SKiyoung Kim 1701*735d6239SKiyoung Kim#include <stdio.h> 1702*735d6239SKiyoung Kim 1703*735d6239SKiyoung Kim#ifdef RTLD_GLOBAL 1704*735d6239SKiyoung Kim# define LT_DLGLOBAL RTLD_GLOBAL 1705*735d6239SKiyoung Kim#else 1706*735d6239SKiyoung Kim# ifdef DL_GLOBAL 1707*735d6239SKiyoung Kim# define LT_DLGLOBAL DL_GLOBAL 1708*735d6239SKiyoung Kim# else 1709*735d6239SKiyoung Kim# define LT_DLGLOBAL 0 1710*735d6239SKiyoung Kim# endif 1711*735d6239SKiyoung Kim#endif 1712*735d6239SKiyoung Kim 1713*735d6239SKiyoung Kim/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1714*735d6239SKiyoung Kim find out it does not work in some platform. */ 1715*735d6239SKiyoung Kim#ifndef LT_DLLAZY_OR_NOW 1716*735d6239SKiyoung Kim# ifdef RTLD_LAZY 1717*735d6239SKiyoung Kim# define LT_DLLAZY_OR_NOW RTLD_LAZY 1718*735d6239SKiyoung Kim# else 1719*735d6239SKiyoung Kim# ifdef DL_LAZY 1720*735d6239SKiyoung Kim# define LT_DLLAZY_OR_NOW DL_LAZY 1721*735d6239SKiyoung Kim# else 1722*735d6239SKiyoung Kim# ifdef RTLD_NOW 1723*735d6239SKiyoung Kim# define LT_DLLAZY_OR_NOW RTLD_NOW 1724*735d6239SKiyoung Kim# else 1725*735d6239SKiyoung Kim# ifdef DL_NOW 1726*735d6239SKiyoung Kim# define LT_DLLAZY_OR_NOW DL_NOW 1727*735d6239SKiyoung Kim# else 1728*735d6239SKiyoung Kim# define LT_DLLAZY_OR_NOW 0 1729*735d6239SKiyoung Kim# endif 1730*735d6239SKiyoung Kim# endif 1731*735d6239SKiyoung Kim# endif 1732*735d6239SKiyoung Kim# endif 1733*735d6239SKiyoung Kim#endif 1734*735d6239SKiyoung Kim 1735*735d6239SKiyoung Kim/* When -fvisbility=hidden is used, assume the code has been annotated 1736*735d6239SKiyoung Kim correspondingly for the symbols needed. */ 1737*735d6239SKiyoung Kim#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1738*735d6239SKiyoung Kimint fnord () __attribute__((visibility("default"))); 1739*735d6239SKiyoung Kim#endif 1740*735d6239SKiyoung Kim 1741*735d6239SKiyoung Kimint fnord () { return 42; } 1742*735d6239SKiyoung Kimint main () 1743*735d6239SKiyoung Kim{ 1744*735d6239SKiyoung Kim void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1745*735d6239SKiyoung Kim int status = $lt_dlunknown; 1746*735d6239SKiyoung Kim 1747*735d6239SKiyoung Kim if (self) 1748*735d6239SKiyoung Kim { 1749*735d6239SKiyoung Kim if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1750*735d6239SKiyoung Kim else 1751*735d6239SKiyoung Kim { 1752*735d6239SKiyoung Kim if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1753*735d6239SKiyoung Kim else puts (dlerror ()); 1754*735d6239SKiyoung Kim } 1755*735d6239SKiyoung Kim /* dlclose (self); */ 1756*735d6239SKiyoung Kim } 1757*735d6239SKiyoung Kim else 1758*735d6239SKiyoung Kim puts (dlerror ()); 1759*735d6239SKiyoung Kim 1760*735d6239SKiyoung Kim return status; 1761*735d6239SKiyoung Kim}] 1762*735d6239SKiyoung Kim_LT_EOF 1763*735d6239SKiyoung Kim if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 1764*735d6239SKiyoung Kim (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1765*735d6239SKiyoung Kim lt_status=$? 1766*735d6239SKiyoung Kim case x$lt_status in 1767*735d6239SKiyoung Kim x$lt_dlno_uscore) $1 ;; 1768*735d6239SKiyoung Kim x$lt_dlneed_uscore) $2 ;; 1769*735d6239SKiyoung Kim x$lt_dlunknown|x*) $3 ;; 1770*735d6239SKiyoung Kim esac 1771*735d6239SKiyoung Kim else : 1772*735d6239SKiyoung Kim # compilation failed 1773*735d6239SKiyoung Kim $3 1774*735d6239SKiyoung Kim fi 1775*735d6239SKiyoung Kimfi 1776*735d6239SKiyoung Kimrm -fr conftest* 1777*735d6239SKiyoung Kim])# _LT_TRY_DLOPEN_SELF 1778*735d6239SKiyoung Kim 1779*735d6239SKiyoung Kim 1780*735d6239SKiyoung Kim# LT_SYS_DLOPEN_SELF 1781*735d6239SKiyoung Kim# ------------------ 1782*735d6239SKiyoung KimAC_DEFUN([LT_SYS_DLOPEN_SELF], 1783*735d6239SKiyoung Kim[m4_require([_LT_HEADER_DLFCN])dnl 1784*735d6239SKiyoung Kimif test "x$enable_dlopen" != xyes; then 1785*735d6239SKiyoung Kim enable_dlopen=unknown 1786*735d6239SKiyoung Kim enable_dlopen_self=unknown 1787*735d6239SKiyoung Kim enable_dlopen_self_static=unknown 1788*735d6239SKiyoung Kimelse 1789*735d6239SKiyoung Kim lt_cv_dlopen=no 1790*735d6239SKiyoung Kim lt_cv_dlopen_libs= 1791*735d6239SKiyoung Kim 1792*735d6239SKiyoung Kim case $host_os in 1793*735d6239SKiyoung Kim beos*) 1794*735d6239SKiyoung Kim lt_cv_dlopen="load_add_on" 1795*735d6239SKiyoung Kim lt_cv_dlopen_libs= 1796*735d6239SKiyoung Kim lt_cv_dlopen_self=yes 1797*735d6239SKiyoung Kim ;; 1798*735d6239SKiyoung Kim 1799*735d6239SKiyoung Kim mingw* | pw32* | cegcc*) 1800*735d6239SKiyoung Kim lt_cv_dlopen="LoadLibrary" 1801*735d6239SKiyoung Kim lt_cv_dlopen_libs= 1802*735d6239SKiyoung Kim ;; 1803*735d6239SKiyoung Kim 1804*735d6239SKiyoung Kim cygwin*) 1805*735d6239SKiyoung Kim lt_cv_dlopen="dlopen" 1806*735d6239SKiyoung Kim lt_cv_dlopen_libs= 1807*735d6239SKiyoung Kim ;; 1808*735d6239SKiyoung Kim 1809*735d6239SKiyoung Kim darwin*) 1810*735d6239SKiyoung Kim # if libdl is installed we need to link against it 1811*735d6239SKiyoung Kim AC_CHECK_LIB([dl], [dlopen], 1812*735d6239SKiyoung Kim [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 1813*735d6239SKiyoung Kim lt_cv_dlopen="dyld" 1814*735d6239SKiyoung Kim lt_cv_dlopen_libs= 1815*735d6239SKiyoung Kim lt_cv_dlopen_self=yes 1816*735d6239SKiyoung Kim ]) 1817*735d6239SKiyoung Kim ;; 1818*735d6239SKiyoung Kim 1819*735d6239SKiyoung Kim *) 1820*735d6239SKiyoung Kim AC_CHECK_FUNC([shl_load], 1821*735d6239SKiyoung Kim [lt_cv_dlopen="shl_load"], 1822*735d6239SKiyoung Kim [AC_CHECK_LIB([dld], [shl_load], 1823*735d6239SKiyoung Kim [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 1824*735d6239SKiyoung Kim [AC_CHECK_FUNC([dlopen], 1825*735d6239SKiyoung Kim [lt_cv_dlopen="dlopen"], 1826*735d6239SKiyoung Kim [AC_CHECK_LIB([dl], [dlopen], 1827*735d6239SKiyoung Kim [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 1828*735d6239SKiyoung Kim [AC_CHECK_LIB([svld], [dlopen], 1829*735d6239SKiyoung Kim [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 1830*735d6239SKiyoung Kim [AC_CHECK_LIB([dld], [dld_link], 1831*735d6239SKiyoung Kim [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 1832*735d6239SKiyoung Kim ]) 1833*735d6239SKiyoung Kim ]) 1834*735d6239SKiyoung Kim ]) 1835*735d6239SKiyoung Kim ]) 1836*735d6239SKiyoung Kim ]) 1837*735d6239SKiyoung Kim ;; 1838*735d6239SKiyoung Kim esac 1839*735d6239SKiyoung Kim 1840*735d6239SKiyoung Kim if test "x$lt_cv_dlopen" != xno; then 1841*735d6239SKiyoung Kim enable_dlopen=yes 1842*735d6239SKiyoung Kim else 1843*735d6239SKiyoung Kim enable_dlopen=no 1844*735d6239SKiyoung Kim fi 1845*735d6239SKiyoung Kim 1846*735d6239SKiyoung Kim case $lt_cv_dlopen in 1847*735d6239SKiyoung Kim dlopen) 1848*735d6239SKiyoung Kim save_CPPFLAGS="$CPPFLAGS" 1849*735d6239SKiyoung Kim test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1850*735d6239SKiyoung Kim 1851*735d6239SKiyoung Kim save_LDFLAGS="$LDFLAGS" 1852*735d6239SKiyoung Kim wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1853*735d6239SKiyoung Kim 1854*735d6239SKiyoung Kim save_LIBS="$LIBS" 1855*735d6239SKiyoung Kim LIBS="$lt_cv_dlopen_libs $LIBS" 1856*735d6239SKiyoung Kim 1857*735d6239SKiyoung Kim AC_CACHE_CHECK([whether a program can dlopen itself], 1858*735d6239SKiyoung Kim lt_cv_dlopen_self, [dnl 1859*735d6239SKiyoung Kim _LT_TRY_DLOPEN_SELF( 1860*735d6239SKiyoung Kim lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 1861*735d6239SKiyoung Kim lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 1862*735d6239SKiyoung Kim ]) 1863*735d6239SKiyoung Kim 1864*735d6239SKiyoung Kim if test "x$lt_cv_dlopen_self" = xyes; then 1865*735d6239SKiyoung Kim wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 1866*735d6239SKiyoung Kim AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1867*735d6239SKiyoung Kim lt_cv_dlopen_self_static, [dnl 1868*735d6239SKiyoung Kim _LT_TRY_DLOPEN_SELF( 1869*735d6239SKiyoung Kim lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 1870*735d6239SKiyoung Kim lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 1871*735d6239SKiyoung Kim ]) 1872*735d6239SKiyoung Kim fi 1873*735d6239SKiyoung Kim 1874*735d6239SKiyoung Kim CPPFLAGS="$save_CPPFLAGS" 1875*735d6239SKiyoung Kim LDFLAGS="$save_LDFLAGS" 1876*735d6239SKiyoung Kim LIBS="$save_LIBS" 1877*735d6239SKiyoung Kim ;; 1878*735d6239SKiyoung Kim esac 1879*735d6239SKiyoung Kim 1880*735d6239SKiyoung Kim case $lt_cv_dlopen_self in 1881*735d6239SKiyoung Kim yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 1882*735d6239SKiyoung Kim *) enable_dlopen_self=unknown ;; 1883*735d6239SKiyoung Kim esac 1884*735d6239SKiyoung Kim 1885*735d6239SKiyoung Kim case $lt_cv_dlopen_self_static in 1886*735d6239SKiyoung Kim yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1887*735d6239SKiyoung Kim *) enable_dlopen_self_static=unknown ;; 1888*735d6239SKiyoung Kim esac 1889*735d6239SKiyoung Kimfi 1890*735d6239SKiyoung Kim_LT_DECL([dlopen_support], [enable_dlopen], [0], 1891*735d6239SKiyoung Kim [Whether dlopen is supported]) 1892*735d6239SKiyoung Kim_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 1893*735d6239SKiyoung Kim [Whether dlopen of programs is supported]) 1894*735d6239SKiyoung Kim_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 1895*735d6239SKiyoung Kim [Whether dlopen of statically linked programs is supported]) 1896*735d6239SKiyoung Kim])# LT_SYS_DLOPEN_SELF 1897*735d6239SKiyoung Kim 1898*735d6239SKiyoung Kim# Old name: 1899*735d6239SKiyoung KimAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 1900*735d6239SKiyoung Kimdnl aclocal-1.4 backwards compatibility: 1901*735d6239SKiyoung Kimdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 1902*735d6239SKiyoung Kim 1903*735d6239SKiyoung Kim 1904*735d6239SKiyoung Kim# _LT_COMPILER_C_O([TAGNAME]) 1905*735d6239SKiyoung Kim# --------------------------- 1906*735d6239SKiyoung Kim# Check to see if options -c and -o are simultaneously supported by compiler. 1907*735d6239SKiyoung Kim# This macro does not hard code the compiler like AC_PROG_CC_C_O. 1908*735d6239SKiyoung Kimm4_defun([_LT_COMPILER_C_O], 1909*735d6239SKiyoung Kim[m4_require([_LT_DECL_SED])dnl 1910*735d6239SKiyoung Kimm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1911*735d6239SKiyoung Kimm4_require([_LT_TAG_COMPILER])dnl 1912*735d6239SKiyoung KimAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1913*735d6239SKiyoung Kim [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1914*735d6239SKiyoung Kim [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1915*735d6239SKiyoung Kim $RM -r conftest 2>/dev/null 1916*735d6239SKiyoung Kim mkdir conftest 1917*735d6239SKiyoung Kim cd conftest 1918*735d6239SKiyoung Kim mkdir out 1919*735d6239SKiyoung Kim echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1920*735d6239SKiyoung Kim 1921*735d6239SKiyoung Kim lt_compiler_flag="-o out/conftest2.$ac_objext" 1922*735d6239SKiyoung Kim # Insert the option either (1) after the last *FLAGS variable, or 1923*735d6239SKiyoung Kim # (2) before a word containing "conftest.", or (3) at the end. 1924*735d6239SKiyoung Kim # Note that $ac_compile itself does not contain backslashes and begins 1925*735d6239SKiyoung Kim # with a dollar sign (not a hyphen), so the echo should work correctly. 1926*735d6239SKiyoung Kim lt_compile=`echo "$ac_compile" | $SED \ 1927*735d6239SKiyoung Kim -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1928*735d6239SKiyoung Kim -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1929*735d6239SKiyoung Kim -e 's:$: $lt_compiler_flag:'` 1930*735d6239SKiyoung Kim (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1931*735d6239SKiyoung Kim (eval "$lt_compile" 2>out/conftest.err) 1932*735d6239SKiyoung Kim ac_status=$? 1933*735d6239SKiyoung Kim cat out/conftest.err >&AS_MESSAGE_LOG_FD 1934*735d6239SKiyoung Kim echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1935*735d6239SKiyoung Kim if (exit $ac_status) && test -s out/conftest2.$ac_objext 1936*735d6239SKiyoung Kim then 1937*735d6239SKiyoung Kim # The compiler can only warn and ignore the option if not recognized 1938*735d6239SKiyoung Kim # So say no if there are warnings 1939*735d6239SKiyoung Kim $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 1940*735d6239SKiyoung Kim $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 1941*735d6239SKiyoung Kim if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 1942*735d6239SKiyoung Kim _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 1943*735d6239SKiyoung Kim fi 1944*735d6239SKiyoung Kim fi 1945*735d6239SKiyoung Kim chmod u+w . 2>&AS_MESSAGE_LOG_FD 1946*735d6239SKiyoung Kim $RM conftest* 1947*735d6239SKiyoung Kim # SGI C++ compiler will create directory out/ii_files/ for 1948*735d6239SKiyoung Kim # template instantiation 1949*735d6239SKiyoung Kim test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 1950*735d6239SKiyoung Kim $RM out/* && rmdir out 1951*735d6239SKiyoung Kim cd .. 1952*735d6239SKiyoung Kim $RM -r conftest 1953*735d6239SKiyoung Kim $RM conftest* 1954*735d6239SKiyoung Kim]) 1955*735d6239SKiyoung Kim_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 1956*735d6239SKiyoung Kim [Does compiler simultaneously support -c and -o options?]) 1957*735d6239SKiyoung Kim])# _LT_COMPILER_C_O 1958*735d6239SKiyoung Kim 1959*735d6239SKiyoung Kim 1960*735d6239SKiyoung Kim# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 1961*735d6239SKiyoung Kim# ---------------------------------- 1962*735d6239SKiyoung Kim# Check to see if we can do hard links to lock some files if needed 1963*735d6239SKiyoung Kimm4_defun([_LT_COMPILER_FILE_LOCKS], 1964*735d6239SKiyoung Kim[m4_require([_LT_ENABLE_LOCK])dnl 1965*735d6239SKiyoung Kimm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1966*735d6239SKiyoung Kim_LT_COMPILER_C_O([$1]) 1967*735d6239SKiyoung Kim 1968*735d6239SKiyoung Kimhard_links="nottested" 1969*735d6239SKiyoung Kimif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 1970*735d6239SKiyoung Kim # do not overwrite the value of need_locks provided by the user 1971*735d6239SKiyoung Kim AC_MSG_CHECKING([if we can lock with hard links]) 1972*735d6239SKiyoung Kim hard_links=yes 1973*735d6239SKiyoung Kim $RM conftest* 1974*735d6239SKiyoung Kim ln conftest.a conftest.b 2>/dev/null && hard_links=no 1975*735d6239SKiyoung Kim touch conftest.a 1976*735d6239SKiyoung Kim ln conftest.a conftest.b 2>&5 || hard_links=no 1977*735d6239SKiyoung Kim ln conftest.a conftest.b 2>/dev/null && hard_links=no 1978*735d6239SKiyoung Kim AC_MSG_RESULT([$hard_links]) 1979*735d6239SKiyoung Kim if test "$hard_links" = no; then 1980*735d6239SKiyoung Kim AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 1981*735d6239SKiyoung Kim need_locks=warn 1982*735d6239SKiyoung Kim fi 1983*735d6239SKiyoung Kimelse 1984*735d6239SKiyoung Kim need_locks=no 1985*735d6239SKiyoung Kimfi 1986*735d6239SKiyoung Kim_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 1987*735d6239SKiyoung Kim])# _LT_COMPILER_FILE_LOCKS 1988*735d6239SKiyoung Kim 1989*735d6239SKiyoung Kim 1990*735d6239SKiyoung Kim# _LT_CHECK_OBJDIR 1991*735d6239SKiyoung Kim# ---------------- 1992*735d6239SKiyoung Kimm4_defun([_LT_CHECK_OBJDIR], 1993*735d6239SKiyoung Kim[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 1994*735d6239SKiyoung Kim[rm -f .libs 2>/dev/null 1995*735d6239SKiyoung Kimmkdir .libs 2>/dev/null 1996*735d6239SKiyoung Kimif test -d .libs; then 1997*735d6239SKiyoung Kim lt_cv_objdir=.libs 1998*735d6239SKiyoung Kimelse 1999*735d6239SKiyoung Kim # MS-DOS does not allow filenames that begin with a dot. 2000*735d6239SKiyoung Kim lt_cv_objdir=_libs 2001*735d6239SKiyoung Kimfi 2002*735d6239SKiyoung Kimrmdir .libs 2>/dev/null]) 2003*735d6239SKiyoung Kimobjdir=$lt_cv_objdir 2004*735d6239SKiyoung Kim_LT_DECL([], [objdir], [0], 2005*735d6239SKiyoung Kim [The name of the directory that contains temporary libtool files])dnl 2006*735d6239SKiyoung Kimm4_pattern_allow([LT_OBJDIR])dnl 2007*735d6239SKiyoung KimAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 2008*735d6239SKiyoung Kim [Define to the sub-directory in which libtool stores uninstalled libraries.]) 2009*735d6239SKiyoung Kim])# _LT_CHECK_OBJDIR 2010*735d6239SKiyoung Kim 2011*735d6239SKiyoung Kim 2012*735d6239SKiyoung Kim# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2013*735d6239SKiyoung Kim# -------------------------------------- 2014*735d6239SKiyoung Kim# Check hardcoding attributes. 2015*735d6239SKiyoung Kimm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2016*735d6239SKiyoung Kim[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2017*735d6239SKiyoung Kim_LT_TAGVAR(hardcode_action, $1)= 2018*735d6239SKiyoung Kimif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2019*735d6239SKiyoung Kim test -n "$_LT_TAGVAR(runpath_var, $1)" || 2020*735d6239SKiyoung Kim test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 2021*735d6239SKiyoung Kim 2022*735d6239SKiyoung Kim # We can hardcode non-existent directories. 2023*735d6239SKiyoung Kim if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 2024*735d6239SKiyoung Kim # If the only mechanism to avoid hardcoding is shlibpath_var, we 2025*735d6239SKiyoung Kim # have to relink, otherwise we might link with an installed library 2026*735d6239SKiyoung Kim # when we should be linking with a yet-to-be-installed one 2027*735d6239SKiyoung Kim ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 2028*735d6239SKiyoung Kim test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 2029*735d6239SKiyoung Kim # Linking always hardcodes the temporary library directory. 2030*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_action, $1)=relink 2031*735d6239SKiyoung Kim else 2032*735d6239SKiyoung Kim # We can link without hardcoding, and we can hardcode nonexisting dirs. 2033*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_action, $1)=immediate 2034*735d6239SKiyoung Kim fi 2035*735d6239SKiyoung Kimelse 2036*735d6239SKiyoung Kim # We cannot hardcode anything, or else we can only hardcode existing 2037*735d6239SKiyoung Kim # directories. 2038*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_action, $1)=unsupported 2039*735d6239SKiyoung Kimfi 2040*735d6239SKiyoung KimAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2041*735d6239SKiyoung Kim 2042*735d6239SKiyoung Kimif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 2043*735d6239SKiyoung Kim test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 2044*735d6239SKiyoung Kim # Fast installation is not supported 2045*735d6239SKiyoung Kim enable_fast_install=no 2046*735d6239SKiyoung Kimelif test "$shlibpath_overrides_runpath" = yes || 2047*735d6239SKiyoung Kim test "$enable_shared" = no; then 2048*735d6239SKiyoung Kim # Fast installation is not necessary 2049*735d6239SKiyoung Kim enable_fast_install=needless 2050*735d6239SKiyoung Kimfi 2051*735d6239SKiyoung Kim_LT_TAGDECL([], [hardcode_action], [0], 2052*735d6239SKiyoung Kim [How to hardcode a shared library path into an executable]) 2053*735d6239SKiyoung Kim])# _LT_LINKER_HARDCODE_LIBPATH 2054*735d6239SKiyoung Kim 2055*735d6239SKiyoung Kim 2056*735d6239SKiyoung Kim# _LT_CMD_STRIPLIB 2057*735d6239SKiyoung Kim# ---------------- 2058*735d6239SKiyoung Kimm4_defun([_LT_CMD_STRIPLIB], 2059*735d6239SKiyoung Kim[m4_require([_LT_DECL_EGREP]) 2060*735d6239SKiyoung Kimstriplib= 2061*735d6239SKiyoung Kimold_striplib= 2062*735d6239SKiyoung KimAC_MSG_CHECKING([whether stripping libraries is possible]) 2063*735d6239SKiyoung Kimif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2064*735d6239SKiyoung Kim test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2065*735d6239SKiyoung Kim test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2066*735d6239SKiyoung Kim AC_MSG_RESULT([yes]) 2067*735d6239SKiyoung Kimelse 2068*735d6239SKiyoung Kim# FIXME - insert some real tests, host_os isn't really good enough 2069*735d6239SKiyoung Kim case $host_os in 2070*735d6239SKiyoung Kim darwin*) 2071*735d6239SKiyoung Kim if test -n "$STRIP" ; then 2072*735d6239SKiyoung Kim striplib="$STRIP -x" 2073*735d6239SKiyoung Kim old_striplib="$STRIP -S" 2074*735d6239SKiyoung Kim AC_MSG_RESULT([yes]) 2075*735d6239SKiyoung Kim else 2076*735d6239SKiyoung Kim AC_MSG_RESULT([no]) 2077*735d6239SKiyoung Kim fi 2078*735d6239SKiyoung Kim ;; 2079*735d6239SKiyoung Kim *) 2080*735d6239SKiyoung Kim AC_MSG_RESULT([no]) 2081*735d6239SKiyoung Kim ;; 2082*735d6239SKiyoung Kim esac 2083*735d6239SKiyoung Kimfi 2084*735d6239SKiyoung Kim_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2085*735d6239SKiyoung Kim_LT_DECL([], [striplib], [1]) 2086*735d6239SKiyoung Kim])# _LT_CMD_STRIPLIB 2087*735d6239SKiyoung Kim 2088*735d6239SKiyoung Kim 2089*735d6239SKiyoung Kim# _LT_SYS_DYNAMIC_LINKER([TAG]) 2090*735d6239SKiyoung Kim# ----------------------------- 2091*735d6239SKiyoung Kim# PORTME Fill in your ld.so characteristics 2092*735d6239SKiyoung Kimm4_defun([_LT_SYS_DYNAMIC_LINKER], 2093*735d6239SKiyoung Kim[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2094*735d6239SKiyoung Kimm4_require([_LT_DECL_EGREP])dnl 2095*735d6239SKiyoung Kimm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2096*735d6239SKiyoung Kimm4_require([_LT_DECL_OBJDUMP])dnl 2097*735d6239SKiyoung Kimm4_require([_LT_DECL_SED])dnl 2098*735d6239SKiyoung Kimm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2099*735d6239SKiyoung KimAC_MSG_CHECKING([dynamic linker characteristics]) 2100*735d6239SKiyoung Kimm4_if([$1], 2101*735d6239SKiyoung Kim [], [ 2102*735d6239SKiyoung Kimif test "$GCC" = yes; then 2103*735d6239SKiyoung Kim case $host_os in 2104*735d6239SKiyoung Kim darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 2105*735d6239SKiyoung Kim *) lt_awk_arg="/^libraries:/" ;; 2106*735d6239SKiyoung Kim esac 2107*735d6239SKiyoung Kim case $host_os in 2108*735d6239SKiyoung Kim mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 2109*735d6239SKiyoung Kim *) lt_sed_strip_eq="s,=/,/,g" ;; 2110*735d6239SKiyoung Kim esac 2111*735d6239SKiyoung Kim lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2112*735d6239SKiyoung Kim case $lt_search_path_spec in 2113*735d6239SKiyoung Kim *\;*) 2114*735d6239SKiyoung Kim # if the path contains ";" then we assume it to be the separator 2115*735d6239SKiyoung Kim # otherwise default to the standard path separator (i.e. ":") - it is 2116*735d6239SKiyoung Kim # assumed that no part of a normal pathname contains ";" but that should 2117*735d6239SKiyoung Kim # okay in the real world where ";" in dirpaths is itself problematic. 2118*735d6239SKiyoung Kim lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2119*735d6239SKiyoung Kim ;; 2120*735d6239SKiyoung Kim *) 2121*735d6239SKiyoung Kim lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2122*735d6239SKiyoung Kim ;; 2123*735d6239SKiyoung Kim esac 2124*735d6239SKiyoung Kim # Ok, now we have the path, separated by spaces, we can step through it 2125*735d6239SKiyoung Kim # and add multilib dir if necessary. 2126*735d6239SKiyoung Kim lt_tmp_lt_search_path_spec= 2127*735d6239SKiyoung Kim lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2128*735d6239SKiyoung Kim for lt_sys_path in $lt_search_path_spec; do 2129*735d6239SKiyoung Kim if test -d "$lt_sys_path/$lt_multi_os_dir"; then 2130*735d6239SKiyoung Kim lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 2131*735d6239SKiyoung Kim else 2132*735d6239SKiyoung Kim test -d "$lt_sys_path" && \ 2133*735d6239SKiyoung Kim lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2134*735d6239SKiyoung Kim fi 2135*735d6239SKiyoung Kim done 2136*735d6239SKiyoung Kim lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2137*735d6239SKiyoung KimBEGIN {RS=" "; FS="/|\n";} { 2138*735d6239SKiyoung Kim lt_foo=""; 2139*735d6239SKiyoung Kim lt_count=0; 2140*735d6239SKiyoung Kim for (lt_i = NF; lt_i > 0; lt_i--) { 2141*735d6239SKiyoung Kim if ($lt_i != "" && $lt_i != ".") { 2142*735d6239SKiyoung Kim if ($lt_i == "..") { 2143*735d6239SKiyoung Kim lt_count++; 2144*735d6239SKiyoung Kim } else { 2145*735d6239SKiyoung Kim if (lt_count == 0) { 2146*735d6239SKiyoung Kim lt_foo="/" $lt_i lt_foo; 2147*735d6239SKiyoung Kim } else { 2148*735d6239SKiyoung Kim lt_count--; 2149*735d6239SKiyoung Kim } 2150*735d6239SKiyoung Kim } 2151*735d6239SKiyoung Kim } 2152*735d6239SKiyoung Kim } 2153*735d6239SKiyoung Kim if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2154*735d6239SKiyoung Kim if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2155*735d6239SKiyoung Kim}'` 2156*735d6239SKiyoung Kim # AWK program above erroneously prepends '/' to C:/dos/paths 2157*735d6239SKiyoung Kim # for these hosts. 2158*735d6239SKiyoung Kim case $host_os in 2159*735d6239SKiyoung Kim mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2160*735d6239SKiyoung Kim $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 2161*735d6239SKiyoung Kim esac 2162*735d6239SKiyoung Kim sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2163*735d6239SKiyoung Kimelse 2164*735d6239SKiyoung Kim sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2165*735d6239SKiyoung Kimfi]) 2166*735d6239SKiyoung Kimlibrary_names_spec= 2167*735d6239SKiyoung Kimlibname_spec='lib$name' 2168*735d6239SKiyoung Kimsoname_spec= 2169*735d6239SKiyoung Kimshrext_cmds=".so" 2170*735d6239SKiyoung Kimpostinstall_cmds= 2171*735d6239SKiyoung Kimpostuninstall_cmds= 2172*735d6239SKiyoung Kimfinish_cmds= 2173*735d6239SKiyoung Kimfinish_eval= 2174*735d6239SKiyoung Kimshlibpath_var= 2175*735d6239SKiyoung Kimshlibpath_overrides_runpath=unknown 2176*735d6239SKiyoung Kimversion_type=none 2177*735d6239SKiyoung Kimdynamic_linker="$host_os ld.so" 2178*735d6239SKiyoung Kimsys_lib_dlsearch_path_spec="/lib /usr/lib" 2179*735d6239SKiyoung Kimneed_lib_prefix=unknown 2180*735d6239SKiyoung Kimhardcode_into_libs=no 2181*735d6239SKiyoung Kim 2182*735d6239SKiyoung Kim# when you set need_version to no, make sure it does not cause -set_version 2183*735d6239SKiyoung Kim# flags to be left without arguments 2184*735d6239SKiyoung Kimneed_version=unknown 2185*735d6239SKiyoung Kim 2186*735d6239SKiyoung Kimcase $host_os in 2187*735d6239SKiyoung Kimaix3*) 2188*735d6239SKiyoung Kim version_type=linux 2189*735d6239SKiyoung Kim library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 2190*735d6239SKiyoung Kim shlibpath_var=LIBPATH 2191*735d6239SKiyoung Kim 2192*735d6239SKiyoung Kim # AIX 3 has no versioning support, so we append a major version to the name. 2193*735d6239SKiyoung Kim soname_spec='${libname}${release}${shared_ext}$major' 2194*735d6239SKiyoung Kim ;; 2195*735d6239SKiyoung Kim 2196*735d6239SKiyoung Kimaix[[4-9]]*) 2197*735d6239SKiyoung Kim version_type=linux 2198*735d6239SKiyoung Kim need_lib_prefix=no 2199*735d6239SKiyoung Kim need_version=no 2200*735d6239SKiyoung Kim hardcode_into_libs=yes 2201*735d6239SKiyoung Kim if test "$host_cpu" = ia64; then 2202*735d6239SKiyoung Kim # AIX 5 supports IA64 2203*735d6239SKiyoung Kim library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 2204*735d6239SKiyoung Kim shlibpath_var=LD_LIBRARY_PATH 2205*735d6239SKiyoung Kim else 2206*735d6239SKiyoung Kim # With GCC up to 2.95.x, collect2 would create an import file 2207*735d6239SKiyoung Kim # for dependence libraries. The import file would start with 2208*735d6239SKiyoung Kim # the line `#! .'. This would cause the generated library to 2209*735d6239SKiyoung Kim # depend on `.', always an invalid library. This was fixed in 2210*735d6239SKiyoung Kim # development snapshots of GCC prior to 3.0. 2211*735d6239SKiyoung Kim case $host_os in 2212*735d6239SKiyoung Kim aix4 | aix4.[[01]] | aix4.[[01]].*) 2213*735d6239SKiyoung Kim if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2214*735d6239SKiyoung Kim echo ' yes ' 2215*735d6239SKiyoung Kim echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 2216*735d6239SKiyoung Kim : 2217*735d6239SKiyoung Kim else 2218*735d6239SKiyoung Kim can_build_shared=no 2219*735d6239SKiyoung Kim fi 2220*735d6239SKiyoung Kim ;; 2221*735d6239SKiyoung Kim esac 2222*735d6239SKiyoung Kim # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 2223*735d6239SKiyoung Kim # soname into executable. Probably we can add versioning support to 2224*735d6239SKiyoung Kim # collect2, so additional links can be useful in future. 2225*735d6239SKiyoung Kim if test "$aix_use_runtimelinking" = yes; then 2226*735d6239SKiyoung Kim # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2227*735d6239SKiyoung Kim # instead of lib<name>.a to let people know that these are not 2228*735d6239SKiyoung Kim # typical AIX shared libraries. 2229*735d6239SKiyoung Kim library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2230*735d6239SKiyoung Kim else 2231*735d6239SKiyoung Kim # We preserve .a as extension for shared libraries through AIX4.2 2232*735d6239SKiyoung Kim # and later when we are not doing run time linking. 2233*735d6239SKiyoung Kim library_names_spec='${libname}${release}.a $libname.a' 2234*735d6239SKiyoung Kim soname_spec='${libname}${release}${shared_ext}$major' 2235*735d6239SKiyoung Kim fi 2236*735d6239SKiyoung Kim shlibpath_var=LIBPATH 2237*735d6239SKiyoung Kim fi 2238*735d6239SKiyoung Kim ;; 2239*735d6239SKiyoung Kim 2240*735d6239SKiyoung Kimamigaos*) 2241*735d6239SKiyoung Kim case $host_cpu in 2242*735d6239SKiyoung Kim powerpc) 2243*735d6239SKiyoung Kim # Since July 2007 AmigaOS4 officially supports .so libraries. 2244*735d6239SKiyoung Kim # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2245*735d6239SKiyoung Kim library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2246*735d6239SKiyoung Kim ;; 2247*735d6239SKiyoung Kim m68k) 2248*735d6239SKiyoung Kim library_names_spec='$libname.ixlibrary $libname.a' 2249*735d6239SKiyoung Kim # Create ${libname}_ixlibrary.a entries in /sys/libs. 2250*735d6239SKiyoung Kim 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' 2251*735d6239SKiyoung Kim ;; 2252*735d6239SKiyoung Kim esac 2253*735d6239SKiyoung Kim ;; 2254*735d6239SKiyoung Kim 2255*735d6239SKiyoung Kimbeos*) 2256*735d6239SKiyoung Kim library_names_spec='${libname}${shared_ext}' 2257*735d6239SKiyoung Kim dynamic_linker="$host_os ld.so" 2258*735d6239SKiyoung Kim shlibpath_var=LIBRARY_PATH 2259*735d6239SKiyoung Kim ;; 2260*735d6239SKiyoung Kim 2261*735d6239SKiyoung Kimbsdi[[45]]*) 2262*735d6239SKiyoung Kim version_type=linux 2263*735d6239SKiyoung Kim need_version=no 2264*735d6239SKiyoung Kim library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2265*735d6239SKiyoung Kim soname_spec='${libname}${release}${shared_ext}$major' 2266*735d6239SKiyoung Kim finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2267*735d6239SKiyoung Kim shlibpath_var=LD_LIBRARY_PATH 2268*735d6239SKiyoung Kim sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2269*735d6239SKiyoung Kim sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2270*735d6239SKiyoung Kim # the default ld.so.conf also contains /usr/contrib/lib and 2271*735d6239SKiyoung Kim # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2272*735d6239SKiyoung Kim # libtool to hard-code these into programs 2273*735d6239SKiyoung Kim ;; 2274*735d6239SKiyoung Kim 2275*735d6239SKiyoung Kimcygwin* | mingw* | pw32* | cegcc*) 2276*735d6239SKiyoung Kim version_type=windows 2277*735d6239SKiyoung Kim shrext_cmds=".dll" 2278*735d6239SKiyoung Kim need_version=no 2279*735d6239SKiyoung Kim need_lib_prefix=no 2280*735d6239SKiyoung Kim 2281*735d6239SKiyoung Kim case $GCC,$cc_basename in 2282*735d6239SKiyoung Kim yes,*) 2283*735d6239SKiyoung Kim # gcc 2284*735d6239SKiyoung Kim library_names_spec='$libname.dll.a' 2285*735d6239SKiyoung Kim # DLL is installed to $(libdir)/../bin by postinstall_cmds 2286*735d6239SKiyoung Kim postinstall_cmds='base_file=`basename \${file}`~ 2287*735d6239SKiyoung Kim dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2288*735d6239SKiyoung Kim dldir=$destdir/`dirname \$dlpath`~ 2289*735d6239SKiyoung Kim test -d \$dldir || mkdir -p \$dldir~ 2290*735d6239SKiyoung Kim $install_prog $dir/$dlname \$dldir/$dlname~ 2291*735d6239SKiyoung Kim chmod a+x \$dldir/$dlname~ 2292*735d6239SKiyoung Kim if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2293*735d6239SKiyoung Kim eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2294*735d6239SKiyoung Kim fi' 2295*735d6239SKiyoung Kim postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2296*735d6239SKiyoung Kim dlpath=$dir/\$dldll~ 2297*735d6239SKiyoung Kim $RM \$dlpath' 2298*735d6239SKiyoung Kim shlibpath_overrides_runpath=yes 2299*735d6239SKiyoung Kim 2300*735d6239SKiyoung Kim case $host_os in 2301*735d6239SKiyoung Kim cygwin*) 2302*735d6239SKiyoung Kim # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2303*735d6239SKiyoung Kim soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2304*735d6239SKiyoung Kimm4_if([$1], [],[ 2305*735d6239SKiyoung Kim sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2306*735d6239SKiyoung Kim ;; 2307*735d6239SKiyoung Kim mingw* | cegcc*) 2308*735d6239SKiyoung Kim # MinGW DLLs use traditional 'lib' prefix 2309*735d6239SKiyoung Kim soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2310*735d6239SKiyoung Kim ;; 2311*735d6239SKiyoung Kim pw32*) 2312*735d6239SKiyoung Kim # pw32 DLLs use 'pw' prefix rather than 'lib' 2313*735d6239SKiyoung Kim library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2314*735d6239SKiyoung Kim ;; 2315*735d6239SKiyoung Kim esac 2316*735d6239SKiyoung Kim dynamic_linker='Win32 ld.exe' 2317*735d6239SKiyoung Kim ;; 2318*735d6239SKiyoung Kim 2319*735d6239SKiyoung Kim *,cl*) 2320*735d6239SKiyoung Kim # Native MSVC 2321*735d6239SKiyoung Kim libname_spec='$name' 2322*735d6239SKiyoung Kim soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2323*735d6239SKiyoung Kim library_names_spec='${libname}.dll.lib' 2324*735d6239SKiyoung Kim 2325*735d6239SKiyoung Kim case $build_os in 2326*735d6239SKiyoung Kim mingw*) 2327*735d6239SKiyoung Kim sys_lib_search_path_spec= 2328*735d6239SKiyoung Kim lt_save_ifs=$IFS 2329*735d6239SKiyoung Kim IFS=';' 2330*735d6239SKiyoung Kim for lt_path in $LIB 2331*735d6239SKiyoung Kim do 2332*735d6239SKiyoung Kim IFS=$lt_save_ifs 2333*735d6239SKiyoung Kim # Let DOS variable expansion print the short 8.3 style file name. 2334*735d6239SKiyoung Kim lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2335*735d6239SKiyoung Kim sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2336*735d6239SKiyoung Kim done 2337*735d6239SKiyoung Kim IFS=$lt_save_ifs 2338*735d6239SKiyoung Kim # Convert to MSYS style. 2339*735d6239SKiyoung Kim sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2340*735d6239SKiyoung Kim ;; 2341*735d6239SKiyoung Kim cygwin*) 2342*735d6239SKiyoung Kim # Convert to unix form, then to dos form, then back to unix form 2343*735d6239SKiyoung Kim # but this time dos style (no spaces!) so that the unix form looks 2344*735d6239SKiyoung Kim # like /cygdrive/c/PROGRA~1:/cygdr... 2345*735d6239SKiyoung Kim sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2346*735d6239SKiyoung Kim sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2347*735d6239SKiyoung Kim sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2348*735d6239SKiyoung Kim ;; 2349*735d6239SKiyoung Kim *) 2350*735d6239SKiyoung Kim sys_lib_search_path_spec="$LIB" 2351*735d6239SKiyoung Kim if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2352*735d6239SKiyoung Kim # It is most probably a Windows format PATH. 2353*735d6239SKiyoung Kim sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2354*735d6239SKiyoung Kim else 2355*735d6239SKiyoung Kim sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2356*735d6239SKiyoung Kim fi 2357*735d6239SKiyoung Kim # FIXME: find the short name or the path components, as spaces are 2358*735d6239SKiyoung Kim # common. (e.g. "Program Files" -> "PROGRA~1") 2359*735d6239SKiyoung Kim ;; 2360*735d6239SKiyoung Kim esac 2361*735d6239SKiyoung Kim 2362*735d6239SKiyoung Kim # DLL is installed to $(libdir)/../bin by postinstall_cmds 2363*735d6239SKiyoung Kim postinstall_cmds='base_file=`basename \${file}`~ 2364*735d6239SKiyoung Kim dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2365*735d6239SKiyoung Kim dldir=$destdir/`dirname \$dlpath`~ 2366*735d6239SKiyoung Kim test -d \$dldir || mkdir -p \$dldir~ 2367*735d6239SKiyoung Kim $install_prog $dir/$dlname \$dldir/$dlname' 2368*735d6239SKiyoung Kim postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2369*735d6239SKiyoung Kim dlpath=$dir/\$dldll~ 2370*735d6239SKiyoung Kim $RM \$dlpath' 2371*735d6239SKiyoung Kim shlibpath_overrides_runpath=yes 2372*735d6239SKiyoung Kim dynamic_linker='Win32 link.exe' 2373*735d6239SKiyoung Kim ;; 2374*735d6239SKiyoung Kim 2375*735d6239SKiyoung Kim *) 2376*735d6239SKiyoung Kim # Assume MSVC wrapper 2377*735d6239SKiyoung Kim library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 2378*735d6239SKiyoung Kim dynamic_linker='Win32 ld.exe' 2379*735d6239SKiyoung Kim ;; 2380*735d6239SKiyoung Kim esac 2381*735d6239SKiyoung Kim # FIXME: first we should search . and the directory the executable is in 2382*735d6239SKiyoung Kim shlibpath_var=PATH 2383*735d6239SKiyoung Kim ;; 2384*735d6239SKiyoung Kim 2385*735d6239SKiyoung Kimdarwin* | rhapsody*) 2386*735d6239SKiyoung Kim dynamic_linker="$host_os dyld" 2387*735d6239SKiyoung Kim version_type=darwin 2388*735d6239SKiyoung Kim need_lib_prefix=no 2389*735d6239SKiyoung Kim need_version=no 2390*735d6239SKiyoung Kim library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 2391*735d6239SKiyoung Kim soname_spec='${libname}${release}${major}$shared_ext' 2392*735d6239SKiyoung Kim shlibpath_overrides_runpath=yes 2393*735d6239SKiyoung Kim shlibpath_var=DYLD_LIBRARY_PATH 2394*735d6239SKiyoung Kim shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2395*735d6239SKiyoung Kimm4_if([$1], [],[ 2396*735d6239SKiyoung Kim sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2397*735d6239SKiyoung Kim sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2398*735d6239SKiyoung Kim ;; 2399*735d6239SKiyoung Kim 2400*735d6239SKiyoung Kimdgux*) 2401*735d6239SKiyoung Kim version_type=linux 2402*735d6239SKiyoung Kim need_lib_prefix=no 2403*735d6239SKiyoung Kim need_version=no 2404*735d6239SKiyoung Kim library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 2405*735d6239SKiyoung Kim soname_spec='${libname}${release}${shared_ext}$major' 2406*735d6239SKiyoung Kim shlibpath_var=LD_LIBRARY_PATH 2407*735d6239SKiyoung Kim ;; 2408*735d6239SKiyoung Kim 2409*735d6239SKiyoung Kimfreebsd1*) 2410*735d6239SKiyoung Kim dynamic_linker=no 2411*735d6239SKiyoung Kim ;; 2412*735d6239SKiyoung Kim 2413*735d6239SKiyoung Kimfreebsd* | dragonfly*) 2414*735d6239SKiyoung Kim # DragonFly does not have aout. When/if they implement a new 2415*735d6239SKiyoung Kim # versioning mechanism, adjust this. 2416*735d6239SKiyoung Kim if test -x /usr/bin/objformat; then 2417*735d6239SKiyoung Kim objformat=`/usr/bin/objformat` 2418*735d6239SKiyoung Kim else 2419*735d6239SKiyoung Kim case $host_os in 2420*735d6239SKiyoung Kim freebsd[[123]]*) objformat=aout ;; 2421*735d6239SKiyoung Kim *) objformat=elf ;; 2422*735d6239SKiyoung Kim esac 2423*735d6239SKiyoung Kim fi 2424*735d6239SKiyoung Kim version_type=freebsd-$objformat 2425*735d6239SKiyoung Kim case $version_type in 2426*735d6239SKiyoung Kim freebsd-elf*) 2427*735d6239SKiyoung Kim library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2428*735d6239SKiyoung Kim need_version=no 2429*735d6239SKiyoung Kim need_lib_prefix=no 2430*735d6239SKiyoung Kim ;; 2431*735d6239SKiyoung Kim freebsd-*) 2432*735d6239SKiyoung Kim library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 2433*735d6239SKiyoung Kim need_version=yes 2434*735d6239SKiyoung Kim ;; 2435*735d6239SKiyoung Kim esac 2436*735d6239SKiyoung Kim shlibpath_var=LD_LIBRARY_PATH 2437*735d6239SKiyoung Kim case $host_os in 2438*735d6239SKiyoung Kim freebsd2*) 2439*735d6239SKiyoung Kim shlibpath_overrides_runpath=yes 2440*735d6239SKiyoung Kim ;; 2441*735d6239SKiyoung Kim freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2442*735d6239SKiyoung Kim shlibpath_overrides_runpath=yes 2443*735d6239SKiyoung Kim hardcode_into_libs=yes 2444*735d6239SKiyoung Kim ;; 2445*735d6239SKiyoung Kim freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2446*735d6239SKiyoung Kim freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2447*735d6239SKiyoung Kim shlibpath_overrides_runpath=no 2448*735d6239SKiyoung Kim hardcode_into_libs=yes 2449*735d6239SKiyoung Kim ;; 2450*735d6239SKiyoung Kim *) # from 4.6 on, and DragonFly 2451*735d6239SKiyoung Kim shlibpath_overrides_runpath=yes 2452*735d6239SKiyoung Kim hardcode_into_libs=yes 2453*735d6239SKiyoung Kim ;; 2454*735d6239SKiyoung Kim esac 2455*735d6239SKiyoung Kim ;; 2456*735d6239SKiyoung Kim 2457*735d6239SKiyoung Kimgnu*) 2458*735d6239SKiyoung Kim version_type=linux 2459*735d6239SKiyoung Kim need_lib_prefix=no 2460*735d6239SKiyoung Kim need_version=no 2461*735d6239SKiyoung Kim library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2462*735d6239SKiyoung Kim soname_spec='${libname}${release}${shared_ext}$major' 2463*735d6239SKiyoung Kim shlibpath_var=LD_LIBRARY_PATH 2464*735d6239SKiyoung Kim hardcode_into_libs=yes 2465*735d6239SKiyoung Kim ;; 2466*735d6239SKiyoung Kim 2467*735d6239SKiyoung Kimhaiku*) 2468*735d6239SKiyoung Kim version_type=linux 2469*735d6239SKiyoung Kim need_lib_prefix=no 2470*735d6239SKiyoung Kim need_version=no 2471*735d6239SKiyoung Kim dynamic_linker="$host_os runtime_loader" 2472*735d6239SKiyoung Kim library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2473*735d6239SKiyoung Kim soname_spec='${libname}${release}${shared_ext}$major' 2474*735d6239SKiyoung Kim shlibpath_var=LIBRARY_PATH 2475*735d6239SKiyoung Kim shlibpath_overrides_runpath=yes 2476*735d6239SKiyoung Kim sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2477*735d6239SKiyoung Kim hardcode_into_libs=yes 2478*735d6239SKiyoung Kim ;; 2479*735d6239SKiyoung Kim 2480*735d6239SKiyoung Kimhpux9* | hpux10* | hpux11*) 2481*735d6239SKiyoung Kim # Give a soname corresponding to the major version so that dld.sl refuses to 2482*735d6239SKiyoung Kim # link against other versions. 2483*735d6239SKiyoung Kim version_type=sunos 2484*735d6239SKiyoung Kim need_lib_prefix=no 2485*735d6239SKiyoung Kim need_version=no 2486*735d6239SKiyoung Kim case $host_cpu in 2487*735d6239SKiyoung Kim ia64*) 2488*735d6239SKiyoung Kim shrext_cmds='.so' 2489*735d6239SKiyoung Kim hardcode_into_libs=yes 2490*735d6239SKiyoung Kim dynamic_linker="$host_os dld.so" 2491*735d6239SKiyoung Kim shlibpath_var=LD_LIBRARY_PATH 2492*735d6239SKiyoung Kim shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2493*735d6239SKiyoung Kim library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2494*735d6239SKiyoung Kim soname_spec='${libname}${release}${shared_ext}$major' 2495*735d6239SKiyoung Kim if test "X$HPUX_IA64_MODE" = X32; then 2496*735d6239SKiyoung Kim sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2497*735d6239SKiyoung Kim else 2498*735d6239SKiyoung Kim sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2499*735d6239SKiyoung Kim fi 2500*735d6239SKiyoung Kim sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2501*735d6239SKiyoung Kim ;; 2502*735d6239SKiyoung Kim hppa*64*) 2503*735d6239SKiyoung Kim shrext_cmds='.sl' 2504*735d6239SKiyoung Kim hardcode_into_libs=yes 2505*735d6239SKiyoung Kim dynamic_linker="$host_os dld.sl" 2506*735d6239SKiyoung Kim shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2507*735d6239SKiyoung Kim shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2508*735d6239SKiyoung Kim library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2509*735d6239SKiyoung Kim soname_spec='${libname}${release}${shared_ext}$major' 2510*735d6239SKiyoung Kim sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2511*735d6239SKiyoung Kim sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2512*735d6239SKiyoung Kim ;; 2513*735d6239SKiyoung Kim *) 2514*735d6239SKiyoung Kim shrext_cmds='.sl' 2515*735d6239SKiyoung Kim dynamic_linker="$host_os dld.sl" 2516*735d6239SKiyoung Kim shlibpath_var=SHLIB_PATH 2517*735d6239SKiyoung Kim shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2518*735d6239SKiyoung Kim library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2519*735d6239SKiyoung Kim soname_spec='${libname}${release}${shared_ext}$major' 2520*735d6239SKiyoung Kim ;; 2521*735d6239SKiyoung Kim esac 2522*735d6239SKiyoung Kim # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2523*735d6239SKiyoung Kim postinstall_cmds='chmod 555 $lib' 2524*735d6239SKiyoung Kim # or fails outright, so override atomically: 2525*735d6239SKiyoung Kim install_override_mode=555 2526*735d6239SKiyoung Kim ;; 2527*735d6239SKiyoung Kim 2528*735d6239SKiyoung Kiminterix[[3-9]]*) 2529*735d6239SKiyoung Kim version_type=linux 2530*735d6239SKiyoung Kim need_lib_prefix=no 2531*735d6239SKiyoung Kim need_version=no 2532*735d6239SKiyoung Kim library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2533*735d6239SKiyoung Kim soname_spec='${libname}${release}${shared_ext}$major' 2534*735d6239SKiyoung Kim dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2535*735d6239SKiyoung Kim shlibpath_var=LD_LIBRARY_PATH 2536*735d6239SKiyoung Kim shlibpath_overrides_runpath=no 2537*735d6239SKiyoung Kim hardcode_into_libs=yes 2538*735d6239SKiyoung Kim ;; 2539*735d6239SKiyoung Kim 2540*735d6239SKiyoung Kimirix5* | irix6* | nonstopux*) 2541*735d6239SKiyoung Kim case $host_os in 2542*735d6239SKiyoung Kim nonstopux*) version_type=nonstopux ;; 2543*735d6239SKiyoung Kim *) 2544*735d6239SKiyoung Kim if test "$lt_cv_prog_gnu_ld" = yes; then 2545*735d6239SKiyoung Kim version_type=linux 2546*735d6239SKiyoung Kim else 2547*735d6239SKiyoung Kim version_type=irix 2548*735d6239SKiyoung Kim fi ;; 2549*735d6239SKiyoung Kim esac 2550*735d6239SKiyoung Kim need_lib_prefix=no 2551*735d6239SKiyoung Kim need_version=no 2552*735d6239SKiyoung Kim soname_spec='${libname}${release}${shared_ext}$major' 2553*735d6239SKiyoung Kim library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 2554*735d6239SKiyoung Kim case $host_os in 2555*735d6239SKiyoung Kim irix5* | nonstopux*) 2556*735d6239SKiyoung Kim libsuff= shlibsuff= 2557*735d6239SKiyoung Kim ;; 2558*735d6239SKiyoung Kim *) 2559*735d6239SKiyoung Kim case $LD in # libtool.m4 will add one of these switches to LD 2560*735d6239SKiyoung Kim *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2561*735d6239SKiyoung Kim libsuff= shlibsuff= libmagic=32-bit;; 2562*735d6239SKiyoung Kim *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2563*735d6239SKiyoung Kim libsuff=32 shlibsuff=N32 libmagic=N32;; 2564*735d6239SKiyoung Kim *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2565*735d6239SKiyoung Kim libsuff=64 shlibsuff=64 libmagic=64-bit;; 2566*735d6239SKiyoung Kim *) libsuff= shlibsuff= libmagic=never-match;; 2567*735d6239SKiyoung Kim esac 2568*735d6239SKiyoung Kim ;; 2569*735d6239SKiyoung Kim esac 2570*735d6239SKiyoung Kim shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2571*735d6239SKiyoung Kim shlibpath_overrides_runpath=no 2572*735d6239SKiyoung Kim sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 2573*735d6239SKiyoung Kim sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 2574*735d6239SKiyoung Kim hardcode_into_libs=yes 2575*735d6239SKiyoung Kim ;; 2576*735d6239SKiyoung Kim 2577*735d6239SKiyoung Kim# No shared lib support for Linux oldld, aout, or coff. 2578*735d6239SKiyoung Kimlinux*oldld* | linux*aout* | linux*coff*) 2579*735d6239SKiyoung Kim dynamic_linker=no 2580*735d6239SKiyoung Kim ;; 2581*735d6239SKiyoung Kim 2582*735d6239SKiyoung Kim# This must be Linux ELF. 2583*735d6239SKiyoung Kimlinux* | k*bsd*-gnu | kopensolaris*-gnu) 2584*735d6239SKiyoung Kim version_type=linux 2585*735d6239SKiyoung Kim need_lib_prefix=no 2586*735d6239SKiyoung Kim need_version=no 2587*735d6239SKiyoung Kim library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2588*735d6239SKiyoung Kim soname_spec='${libname}${release}${shared_ext}$major' 2589*735d6239SKiyoung Kim finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2590*735d6239SKiyoung Kim shlibpath_var=LD_LIBRARY_PATH 2591*735d6239SKiyoung Kim shlibpath_overrides_runpath=no 2592*735d6239SKiyoung Kim 2593*735d6239SKiyoung Kim # Some binutils ld are patched to set DT_RUNPATH 2594*735d6239SKiyoung Kim AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2595*735d6239SKiyoung Kim [lt_cv_shlibpath_overrides_runpath=no 2596*735d6239SKiyoung Kim save_LDFLAGS=$LDFLAGS 2597*735d6239SKiyoung Kim save_libdir=$libdir 2598*735d6239SKiyoung Kim eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2599*735d6239SKiyoung Kim LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2600*735d6239SKiyoung Kim AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2601*735d6239SKiyoung Kim [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2602*735d6239SKiyoung Kim [lt_cv_shlibpath_overrides_runpath=yes])]) 2603*735d6239SKiyoung Kim LDFLAGS=$save_LDFLAGS 2604*735d6239SKiyoung Kim libdir=$save_libdir 2605*735d6239SKiyoung Kim ]) 2606*735d6239SKiyoung Kim shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2607*735d6239SKiyoung Kim 2608*735d6239SKiyoung Kim # This implies no fast_install, which is unacceptable. 2609*735d6239SKiyoung Kim # Some rework will be needed to allow for fast_install 2610*735d6239SKiyoung Kim # before this can be enabled. 2611*735d6239SKiyoung Kim hardcode_into_libs=yes 2612*735d6239SKiyoung Kim 2613*735d6239SKiyoung Kim # find out which ABI we are using 2614*735d6239SKiyoung Kim libsuff= 2615*735d6239SKiyoung Kim case "$host_cpu" in 2616*735d6239SKiyoung Kim x86_64*|s390x*|powerpc64*) 2617*735d6239SKiyoung Kim echo '[#]line __oline__ "configure"' > conftest.$ac_ext 2618*735d6239SKiyoung Kim if AC_TRY_EVAL(ac_compile); then 2619*735d6239SKiyoung Kim case `/usr/bin/file conftest.$ac_objext` in 2620*735d6239SKiyoung Kim *64-bit*) 2621*735d6239SKiyoung Kim libsuff=64 2622*735d6239SKiyoung Kim ;; 2623*735d6239SKiyoung Kim esac 2624*735d6239SKiyoung Kim fi 2625*735d6239SKiyoung Kim rm -rf conftest* 2626*735d6239SKiyoung Kim ;; 2627*735d6239SKiyoung Kim esac 2628*735d6239SKiyoung Kim 2629*735d6239SKiyoung Kim sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}" 2630*735d6239SKiyoung Kim 2631*735d6239SKiyoung Kim # Append ld.so.conf contents to the search path 2632*735d6239SKiyoung Kim if test -f /etc/ld.so.conf; then 2633*735d6239SKiyoung Kim 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' ' '` 2634*735d6239SKiyoung Kim sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 2635*735d6239SKiyoung Kim fi 2636*735d6239SKiyoung Kim 2637*735d6239SKiyoung Kim # We used to test for /lib/ld.so.1 and disable shared libraries on 2638*735d6239SKiyoung Kim # powerpc, because MkLinux only supported shared libraries with the 2639*735d6239SKiyoung Kim # GNU dynamic linker. Since this was broken with cross compilers, 2640*735d6239SKiyoung Kim # most powerpc-linux boxes support dynamic linking these days and 2641*735d6239SKiyoung Kim # people can always --disable-shared, the test was removed, and we 2642*735d6239SKiyoung Kim # assume the GNU/Linux dynamic linker is in use. 2643*735d6239SKiyoung Kim dynamic_linker='GNU/Linux ld.so' 2644*735d6239SKiyoung Kim ;; 2645*735d6239SKiyoung Kim 2646*735d6239SKiyoung Kimnetbsd*) 2647*735d6239SKiyoung Kim version_type=sunos 2648*735d6239SKiyoung Kim need_lib_prefix=no 2649*735d6239SKiyoung Kim need_version=no 2650*735d6239SKiyoung Kim if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2651*735d6239SKiyoung Kim library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2652*735d6239SKiyoung Kim finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2653*735d6239SKiyoung Kim dynamic_linker='NetBSD (a.out) ld.so' 2654*735d6239SKiyoung Kim else 2655*735d6239SKiyoung Kim library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2656*735d6239SKiyoung Kim soname_spec='${libname}${release}${shared_ext}$major' 2657*735d6239SKiyoung Kim dynamic_linker='NetBSD ld.elf_so' 2658*735d6239SKiyoung Kim fi 2659*735d6239SKiyoung Kim shlibpath_var=LD_LIBRARY_PATH 2660*735d6239SKiyoung Kim shlibpath_overrides_runpath=yes 2661*735d6239SKiyoung Kim hardcode_into_libs=yes 2662*735d6239SKiyoung Kim ;; 2663*735d6239SKiyoung Kim 2664*735d6239SKiyoung Kimnewsos6) 2665*735d6239SKiyoung Kim version_type=linux 2666*735d6239SKiyoung Kim library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2667*735d6239SKiyoung Kim shlibpath_var=LD_LIBRARY_PATH 2668*735d6239SKiyoung Kim shlibpath_overrides_runpath=yes 2669*735d6239SKiyoung Kim ;; 2670*735d6239SKiyoung Kim 2671*735d6239SKiyoung Kim*nto* | *qnx*) 2672*735d6239SKiyoung Kim version_type=qnx 2673*735d6239SKiyoung Kim need_lib_prefix=no 2674*735d6239SKiyoung Kim need_version=no 2675*735d6239SKiyoung Kim library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2676*735d6239SKiyoung Kim soname_spec='${libname}${release}${shared_ext}$major' 2677*735d6239SKiyoung Kim shlibpath_var=LD_LIBRARY_PATH 2678*735d6239SKiyoung Kim shlibpath_overrides_runpath=no 2679*735d6239SKiyoung Kim hardcode_into_libs=yes 2680*735d6239SKiyoung Kim dynamic_linker='ldqnx.so' 2681*735d6239SKiyoung Kim ;; 2682*735d6239SKiyoung Kim 2683*735d6239SKiyoung Kimopenbsd*) 2684*735d6239SKiyoung Kim version_type=sunos 2685*735d6239SKiyoung Kim sys_lib_dlsearch_path_spec="/usr/lib" 2686*735d6239SKiyoung Kim need_lib_prefix=no 2687*735d6239SKiyoung Kim # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 2688*735d6239SKiyoung Kim case $host_os in 2689*735d6239SKiyoung Kim openbsd3.3 | openbsd3.3.*) need_version=yes ;; 2690*735d6239SKiyoung Kim *) need_version=no ;; 2691*735d6239SKiyoung Kim esac 2692*735d6239SKiyoung Kim library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2693*735d6239SKiyoung Kim finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2694*735d6239SKiyoung Kim shlibpath_var=LD_LIBRARY_PATH 2695*735d6239SKiyoung Kim if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2696*735d6239SKiyoung Kim case $host_os in 2697*735d6239SKiyoung Kim openbsd2.[[89]] | openbsd2.[[89]].*) 2698*735d6239SKiyoung Kim shlibpath_overrides_runpath=no 2699*735d6239SKiyoung Kim ;; 2700*735d6239SKiyoung Kim *) 2701*735d6239SKiyoung Kim shlibpath_overrides_runpath=yes 2702*735d6239SKiyoung Kim ;; 2703*735d6239SKiyoung Kim esac 2704*735d6239SKiyoung Kim else 2705*735d6239SKiyoung Kim shlibpath_overrides_runpath=yes 2706*735d6239SKiyoung Kim fi 2707*735d6239SKiyoung Kim ;; 2708*735d6239SKiyoung Kim 2709*735d6239SKiyoung Kimos2*) 2710*735d6239SKiyoung Kim libname_spec='$name' 2711*735d6239SKiyoung Kim shrext_cmds=".dll" 2712*735d6239SKiyoung Kim need_lib_prefix=no 2713*735d6239SKiyoung Kim library_names_spec='$libname${shared_ext} $libname.a' 2714*735d6239SKiyoung Kim dynamic_linker='OS/2 ld.exe' 2715*735d6239SKiyoung Kim shlibpath_var=LIBPATH 2716*735d6239SKiyoung Kim ;; 2717*735d6239SKiyoung Kim 2718*735d6239SKiyoung Kimosf3* | osf4* | osf5*) 2719*735d6239SKiyoung Kim version_type=osf 2720*735d6239SKiyoung Kim need_lib_prefix=no 2721*735d6239SKiyoung Kim need_version=no 2722*735d6239SKiyoung Kim soname_spec='${libname}${release}${shared_ext}$major' 2723*735d6239SKiyoung Kim library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2724*735d6239SKiyoung Kim shlibpath_var=LD_LIBRARY_PATH 2725*735d6239SKiyoung Kim sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 2726*735d6239SKiyoung Kim sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 2727*735d6239SKiyoung Kim ;; 2728*735d6239SKiyoung Kim 2729*735d6239SKiyoung Kimrdos*) 2730*735d6239SKiyoung Kim dynamic_linker=no 2731*735d6239SKiyoung Kim ;; 2732*735d6239SKiyoung Kim 2733*735d6239SKiyoung Kimsolaris*) 2734*735d6239SKiyoung Kim version_type=linux 2735*735d6239SKiyoung Kim need_lib_prefix=no 2736*735d6239SKiyoung Kim need_version=no 2737*735d6239SKiyoung Kim library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2738*735d6239SKiyoung Kim soname_spec='${libname}${release}${shared_ext}$major' 2739*735d6239SKiyoung Kim shlibpath_var=LD_LIBRARY_PATH 2740*735d6239SKiyoung Kim shlibpath_overrides_runpath=yes 2741*735d6239SKiyoung Kim hardcode_into_libs=yes 2742*735d6239SKiyoung Kim # ldd complains unless libraries are executable 2743*735d6239SKiyoung Kim postinstall_cmds='chmod +x $lib' 2744*735d6239SKiyoung Kim ;; 2745*735d6239SKiyoung Kim 2746*735d6239SKiyoung Kimsunos4*) 2747*735d6239SKiyoung Kim version_type=sunos 2748*735d6239SKiyoung Kim library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2749*735d6239SKiyoung Kim finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 2750*735d6239SKiyoung Kim shlibpath_var=LD_LIBRARY_PATH 2751*735d6239SKiyoung Kim shlibpath_overrides_runpath=yes 2752*735d6239SKiyoung Kim if test "$with_gnu_ld" = yes; then 2753*735d6239SKiyoung Kim need_lib_prefix=no 2754*735d6239SKiyoung Kim fi 2755*735d6239SKiyoung Kim need_version=yes 2756*735d6239SKiyoung Kim ;; 2757*735d6239SKiyoung Kim 2758*735d6239SKiyoung Kimsysv4 | sysv4.3*) 2759*735d6239SKiyoung Kim version_type=linux 2760*735d6239SKiyoung Kim library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2761*735d6239SKiyoung Kim soname_spec='${libname}${release}${shared_ext}$major' 2762*735d6239SKiyoung Kim shlibpath_var=LD_LIBRARY_PATH 2763*735d6239SKiyoung Kim case $host_vendor in 2764*735d6239SKiyoung Kim sni) 2765*735d6239SKiyoung Kim shlibpath_overrides_runpath=no 2766*735d6239SKiyoung Kim need_lib_prefix=no 2767*735d6239SKiyoung Kim runpath_var=LD_RUN_PATH 2768*735d6239SKiyoung Kim ;; 2769*735d6239SKiyoung Kim siemens) 2770*735d6239SKiyoung Kim need_lib_prefix=no 2771*735d6239SKiyoung Kim ;; 2772*735d6239SKiyoung Kim motorola) 2773*735d6239SKiyoung Kim need_lib_prefix=no 2774*735d6239SKiyoung Kim need_version=no 2775*735d6239SKiyoung Kim shlibpath_overrides_runpath=no 2776*735d6239SKiyoung Kim sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 2777*735d6239SKiyoung Kim ;; 2778*735d6239SKiyoung Kim esac 2779*735d6239SKiyoung Kim ;; 2780*735d6239SKiyoung Kim 2781*735d6239SKiyoung Kimsysv4*MP*) 2782*735d6239SKiyoung Kim if test -d /usr/nec ;then 2783*735d6239SKiyoung Kim version_type=linux 2784*735d6239SKiyoung Kim library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 2785*735d6239SKiyoung Kim soname_spec='$libname${shared_ext}.$major' 2786*735d6239SKiyoung Kim shlibpath_var=LD_LIBRARY_PATH 2787*735d6239SKiyoung Kim fi 2788*735d6239SKiyoung Kim ;; 2789*735d6239SKiyoung Kim 2790*735d6239SKiyoung Kimsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 2791*735d6239SKiyoung Kim version_type=freebsd-elf 2792*735d6239SKiyoung Kim need_lib_prefix=no 2793*735d6239SKiyoung Kim need_version=no 2794*735d6239SKiyoung Kim library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2795*735d6239SKiyoung Kim soname_spec='${libname}${release}${shared_ext}$major' 2796*735d6239SKiyoung Kim shlibpath_var=LD_LIBRARY_PATH 2797*735d6239SKiyoung Kim shlibpath_overrides_runpath=yes 2798*735d6239SKiyoung Kim hardcode_into_libs=yes 2799*735d6239SKiyoung Kim if test "$with_gnu_ld" = yes; then 2800*735d6239SKiyoung Kim sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 2801*735d6239SKiyoung Kim else 2802*735d6239SKiyoung Kim sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 2803*735d6239SKiyoung Kim case $host_os in 2804*735d6239SKiyoung Kim sco3.2v5*) 2805*735d6239SKiyoung Kim sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 2806*735d6239SKiyoung Kim ;; 2807*735d6239SKiyoung Kim esac 2808*735d6239SKiyoung Kim fi 2809*735d6239SKiyoung Kim sys_lib_dlsearch_path_spec='/usr/lib' 2810*735d6239SKiyoung Kim ;; 2811*735d6239SKiyoung Kim 2812*735d6239SKiyoung Kimtpf*) 2813*735d6239SKiyoung Kim # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 2814*735d6239SKiyoung Kim version_type=linux 2815*735d6239SKiyoung Kim need_lib_prefix=no 2816*735d6239SKiyoung Kim need_version=no 2817*735d6239SKiyoung Kim library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2818*735d6239SKiyoung Kim shlibpath_var=LD_LIBRARY_PATH 2819*735d6239SKiyoung Kim shlibpath_overrides_runpath=no 2820*735d6239SKiyoung Kim hardcode_into_libs=yes 2821*735d6239SKiyoung Kim ;; 2822*735d6239SKiyoung Kim 2823*735d6239SKiyoung Kimuts4*) 2824*735d6239SKiyoung Kim version_type=linux 2825*735d6239SKiyoung Kim library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2826*735d6239SKiyoung Kim soname_spec='${libname}${release}${shared_ext}$major' 2827*735d6239SKiyoung Kim shlibpath_var=LD_LIBRARY_PATH 2828*735d6239SKiyoung Kim ;; 2829*735d6239SKiyoung Kim 2830*735d6239SKiyoung Kim*) 2831*735d6239SKiyoung Kim dynamic_linker=no 2832*735d6239SKiyoung Kim ;; 2833*735d6239SKiyoung Kimesac 2834*735d6239SKiyoung KimAC_MSG_RESULT([$dynamic_linker]) 2835*735d6239SKiyoung Kimtest "$dynamic_linker" = no && can_build_shared=no 2836*735d6239SKiyoung Kim 2837*735d6239SKiyoung Kimvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 2838*735d6239SKiyoung Kimif test "$GCC" = yes; then 2839*735d6239SKiyoung Kim variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 2840*735d6239SKiyoung Kimfi 2841*735d6239SKiyoung Kim 2842*735d6239SKiyoung Kimif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 2843*735d6239SKiyoung Kim sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 2844*735d6239SKiyoung Kimfi 2845*735d6239SKiyoung Kimif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 2846*735d6239SKiyoung Kim sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 2847*735d6239SKiyoung Kimfi 2848*735d6239SKiyoung Kim 2849*735d6239SKiyoung Kim_LT_DECL([], [variables_saved_for_relink], [1], 2850*735d6239SKiyoung Kim [Variables whose values should be saved in libtool wrapper scripts and 2851*735d6239SKiyoung Kim restored at link time]) 2852*735d6239SKiyoung Kim_LT_DECL([], [need_lib_prefix], [0], 2853*735d6239SKiyoung Kim [Do we need the "lib" prefix for modules?]) 2854*735d6239SKiyoung Kim_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 2855*735d6239SKiyoung Kim_LT_DECL([], [version_type], [0], [Library versioning type]) 2856*735d6239SKiyoung Kim_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 2857*735d6239SKiyoung Kim_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 2858*735d6239SKiyoung Kim_LT_DECL([], [shlibpath_overrides_runpath], [0], 2859*735d6239SKiyoung Kim [Is shlibpath searched before the hard-coded library search path?]) 2860*735d6239SKiyoung Kim_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 2861*735d6239SKiyoung Kim_LT_DECL([], [library_names_spec], [1], 2862*735d6239SKiyoung Kim [[List of archive names. First name is the real one, the rest are links. 2863*735d6239SKiyoung Kim The last name is the one that the linker finds with -lNAME]]) 2864*735d6239SKiyoung Kim_LT_DECL([], [soname_spec], [1], 2865*735d6239SKiyoung Kim [[The coded name of the library, if different from the real name]]) 2866*735d6239SKiyoung Kim_LT_DECL([], [install_override_mode], [1], 2867*735d6239SKiyoung Kim [Permission mode override for installation of shared libraries]) 2868*735d6239SKiyoung Kim_LT_DECL([], [postinstall_cmds], [2], 2869*735d6239SKiyoung Kim [Command to use after installation of a shared archive]) 2870*735d6239SKiyoung Kim_LT_DECL([], [postuninstall_cmds], [2], 2871*735d6239SKiyoung Kim [Command to use after uninstallation of a shared archive]) 2872*735d6239SKiyoung Kim_LT_DECL([], [finish_cmds], [2], 2873*735d6239SKiyoung Kim [Commands used to finish a libtool library installation in a directory]) 2874*735d6239SKiyoung Kim_LT_DECL([], [finish_eval], [1], 2875*735d6239SKiyoung Kim [[As "finish_cmds", except a single script fragment to be evaled but 2876*735d6239SKiyoung Kim not shown]]) 2877*735d6239SKiyoung Kim_LT_DECL([], [hardcode_into_libs], [0], 2878*735d6239SKiyoung Kim [Whether we should hardcode library paths into libraries]) 2879*735d6239SKiyoung Kim_LT_DECL([], [sys_lib_search_path_spec], [2], 2880*735d6239SKiyoung Kim [Compile-time system search path for libraries]) 2881*735d6239SKiyoung Kim_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 2882*735d6239SKiyoung Kim [Run-time system search path for libraries]) 2883*735d6239SKiyoung Kim])# _LT_SYS_DYNAMIC_LINKER 2884*735d6239SKiyoung Kim 2885*735d6239SKiyoung Kim 2886*735d6239SKiyoung Kim# _LT_PATH_TOOL_PREFIX(TOOL) 2887*735d6239SKiyoung Kim# -------------------------- 2888*735d6239SKiyoung Kim# find a file program which can recognize shared library 2889*735d6239SKiyoung KimAC_DEFUN([_LT_PATH_TOOL_PREFIX], 2890*735d6239SKiyoung Kim[m4_require([_LT_DECL_EGREP])dnl 2891*735d6239SKiyoung KimAC_MSG_CHECKING([for $1]) 2892*735d6239SKiyoung KimAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2893*735d6239SKiyoung Kim[case $MAGIC_CMD in 2894*735d6239SKiyoung Kim[[\\/*] | ?:[\\/]*]) 2895*735d6239SKiyoung Kim lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2896*735d6239SKiyoung Kim ;; 2897*735d6239SKiyoung Kim*) 2898*735d6239SKiyoung Kim lt_save_MAGIC_CMD="$MAGIC_CMD" 2899*735d6239SKiyoung Kim lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2900*735d6239SKiyoung Kimdnl $ac_dummy forces splitting on constant user-supplied paths. 2901*735d6239SKiyoung Kimdnl POSIX.2 word splitting is done only on the output of word expansions, 2902*735d6239SKiyoung Kimdnl not every word. This closes a longstanding sh security hole. 2903*735d6239SKiyoung Kim ac_dummy="m4_if([$2], , $PATH, [$2])" 2904*735d6239SKiyoung Kim for ac_dir in $ac_dummy; do 2905*735d6239SKiyoung Kim IFS="$lt_save_ifs" 2906*735d6239SKiyoung Kim test -z "$ac_dir" && ac_dir=. 2907*735d6239SKiyoung Kim if test -f $ac_dir/$1; then 2908*735d6239SKiyoung Kim lt_cv_path_MAGIC_CMD="$ac_dir/$1" 2909*735d6239SKiyoung Kim if test -n "$file_magic_test_file"; then 2910*735d6239SKiyoung Kim case $deplibs_check_method in 2911*735d6239SKiyoung Kim "file_magic "*) 2912*735d6239SKiyoung Kim file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 2913*735d6239SKiyoung Kim MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2914*735d6239SKiyoung Kim if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2915*735d6239SKiyoung Kim $EGREP "$file_magic_regex" > /dev/null; then 2916*735d6239SKiyoung Kim : 2917*735d6239SKiyoung Kim else 2918*735d6239SKiyoung Kim cat <<_LT_EOF 1>&2 2919*735d6239SKiyoung Kim 2920*735d6239SKiyoung Kim*** Warning: the command libtool uses to detect shared libraries, 2921*735d6239SKiyoung Kim*** $file_magic_cmd, produces output that libtool cannot recognize. 2922*735d6239SKiyoung Kim*** The result is that libtool may fail to recognize shared libraries 2923*735d6239SKiyoung Kim*** as such. This will affect the creation of libtool libraries that 2924*735d6239SKiyoung Kim*** depend on shared libraries, but programs linked with such libtool 2925*735d6239SKiyoung Kim*** libraries will work regardless of this problem. Nevertheless, you 2926*735d6239SKiyoung Kim*** may want to report the problem to your system manager and/or to 2927*735d6239SKiyoung Kim*** [email protected] 2928*735d6239SKiyoung Kim 2929*735d6239SKiyoung Kim_LT_EOF 2930*735d6239SKiyoung Kim fi ;; 2931*735d6239SKiyoung Kim esac 2932*735d6239SKiyoung Kim fi 2933*735d6239SKiyoung Kim break 2934*735d6239SKiyoung Kim fi 2935*735d6239SKiyoung Kim done 2936*735d6239SKiyoung Kim IFS="$lt_save_ifs" 2937*735d6239SKiyoung Kim MAGIC_CMD="$lt_save_MAGIC_CMD" 2938*735d6239SKiyoung Kim ;; 2939*735d6239SKiyoung Kimesac]) 2940*735d6239SKiyoung KimMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2941*735d6239SKiyoung Kimif test -n "$MAGIC_CMD"; then 2942*735d6239SKiyoung Kim AC_MSG_RESULT($MAGIC_CMD) 2943*735d6239SKiyoung Kimelse 2944*735d6239SKiyoung Kim AC_MSG_RESULT(no) 2945*735d6239SKiyoung Kimfi 2946*735d6239SKiyoung Kim_LT_DECL([], [MAGIC_CMD], [0], 2947*735d6239SKiyoung Kim [Used to examine libraries when file_magic_cmd begins with "file"])dnl 2948*735d6239SKiyoung Kim])# _LT_PATH_TOOL_PREFIX 2949*735d6239SKiyoung Kim 2950*735d6239SKiyoung Kim# Old name: 2951*735d6239SKiyoung KimAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 2952*735d6239SKiyoung Kimdnl aclocal-1.4 backwards compatibility: 2953*735d6239SKiyoung Kimdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 2954*735d6239SKiyoung Kim 2955*735d6239SKiyoung Kim 2956*735d6239SKiyoung Kim# _LT_PATH_MAGIC 2957*735d6239SKiyoung Kim# -------------- 2958*735d6239SKiyoung Kim# find a file program which can recognize a shared library 2959*735d6239SKiyoung Kimm4_defun([_LT_PATH_MAGIC], 2960*735d6239SKiyoung Kim[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 2961*735d6239SKiyoung Kimif test -z "$lt_cv_path_MAGIC_CMD"; then 2962*735d6239SKiyoung Kim if test -n "$ac_tool_prefix"; then 2963*735d6239SKiyoung Kim _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 2964*735d6239SKiyoung Kim else 2965*735d6239SKiyoung Kim MAGIC_CMD=: 2966*735d6239SKiyoung Kim fi 2967*735d6239SKiyoung Kimfi 2968*735d6239SKiyoung Kim])# _LT_PATH_MAGIC 2969*735d6239SKiyoung Kim 2970*735d6239SKiyoung Kim 2971*735d6239SKiyoung Kim# LT_PATH_LD 2972*735d6239SKiyoung Kim# ---------- 2973*735d6239SKiyoung Kim# find the pathname to the GNU or non-GNU linker 2974*735d6239SKiyoung KimAC_DEFUN([LT_PATH_LD], 2975*735d6239SKiyoung Kim[AC_REQUIRE([AC_PROG_CC])dnl 2976*735d6239SKiyoung KimAC_REQUIRE([AC_CANONICAL_HOST])dnl 2977*735d6239SKiyoung KimAC_REQUIRE([AC_CANONICAL_BUILD])dnl 2978*735d6239SKiyoung Kimm4_require([_LT_DECL_SED])dnl 2979*735d6239SKiyoung Kimm4_require([_LT_DECL_EGREP])dnl 2980*735d6239SKiyoung Kimm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 2981*735d6239SKiyoung Kim 2982*735d6239SKiyoung KimAC_ARG_WITH([gnu-ld], 2983*735d6239SKiyoung Kim [AS_HELP_STRING([--with-gnu-ld], 2984*735d6239SKiyoung Kim [assume the C compiler uses GNU ld @<:@default=no@:>@])], 2985*735d6239SKiyoung Kim [test "$withval" = no || with_gnu_ld=yes], 2986*735d6239SKiyoung Kim [with_gnu_ld=no])dnl 2987*735d6239SKiyoung Kim 2988*735d6239SKiyoung Kimac_prog=ld 2989*735d6239SKiyoung Kimif test "$GCC" = yes; then 2990*735d6239SKiyoung Kim # Check if gcc -print-prog-name=ld gives a path. 2991*735d6239SKiyoung Kim AC_MSG_CHECKING([for ld used by $CC]) 2992*735d6239SKiyoung Kim case $host in 2993*735d6239SKiyoung Kim *-*-mingw*) 2994*735d6239SKiyoung Kim # gcc leaves a trailing carriage return which upsets mingw 2995*735d6239SKiyoung Kim ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 2996*735d6239SKiyoung Kim *) 2997*735d6239SKiyoung Kim ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 2998*735d6239SKiyoung Kim esac 2999*735d6239SKiyoung Kim case $ac_prog in 3000*735d6239SKiyoung Kim # Accept absolute paths. 3001*735d6239SKiyoung Kim [[\\/]]* | ?:[[\\/]]*) 3002*735d6239SKiyoung Kim re_direlt='/[[^/]][[^/]]*/\.\./' 3003*735d6239SKiyoung Kim # Canonicalize the pathname of ld 3004*735d6239SKiyoung Kim ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3005*735d6239SKiyoung Kim while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3006*735d6239SKiyoung Kim ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3007*735d6239SKiyoung Kim done 3008*735d6239SKiyoung Kim test -z "$LD" && LD="$ac_prog" 3009*735d6239SKiyoung Kim ;; 3010*735d6239SKiyoung Kim "") 3011*735d6239SKiyoung Kim # If it fails, then pretend we aren't using GCC. 3012*735d6239SKiyoung Kim ac_prog=ld 3013*735d6239SKiyoung Kim ;; 3014*735d6239SKiyoung Kim *) 3015*735d6239SKiyoung Kim # If it is relative, then search for the first ld in PATH. 3016*735d6239SKiyoung Kim with_gnu_ld=unknown 3017*735d6239SKiyoung Kim ;; 3018*735d6239SKiyoung Kim esac 3019*735d6239SKiyoung Kimelif test "$with_gnu_ld" = yes; then 3020*735d6239SKiyoung Kim AC_MSG_CHECKING([for GNU ld]) 3021*735d6239SKiyoung Kimelse 3022*735d6239SKiyoung Kim AC_MSG_CHECKING([for non-GNU ld]) 3023*735d6239SKiyoung Kimfi 3024*735d6239SKiyoung KimAC_CACHE_VAL(lt_cv_path_LD, 3025*735d6239SKiyoung Kim[if test -z "$LD"; then 3026*735d6239SKiyoung Kim lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3027*735d6239SKiyoung Kim for ac_dir in $PATH; do 3028*735d6239SKiyoung Kim IFS="$lt_save_ifs" 3029*735d6239SKiyoung Kim test -z "$ac_dir" && ac_dir=. 3030*735d6239SKiyoung Kim if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3031*735d6239SKiyoung Kim lt_cv_path_LD="$ac_dir/$ac_prog" 3032*735d6239SKiyoung Kim # Check to see if the program is GNU ld. I'd rather use --version, 3033*735d6239SKiyoung Kim # but apparently some variants of GNU ld only accept -v. 3034*735d6239SKiyoung Kim # Break only if it was the GNU/non-GNU ld that we prefer. 3035*735d6239SKiyoung Kim case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3036*735d6239SKiyoung Kim *GNU* | *'with BFD'*) 3037*735d6239SKiyoung Kim test "$with_gnu_ld" != no && break 3038*735d6239SKiyoung Kim ;; 3039*735d6239SKiyoung Kim *) 3040*735d6239SKiyoung Kim test "$with_gnu_ld" != yes && break 3041*735d6239SKiyoung Kim ;; 3042*735d6239SKiyoung Kim esac 3043*735d6239SKiyoung Kim fi 3044*735d6239SKiyoung Kim done 3045*735d6239SKiyoung Kim IFS="$lt_save_ifs" 3046*735d6239SKiyoung Kimelse 3047*735d6239SKiyoung Kim lt_cv_path_LD="$LD" # Let the user override the test with a path. 3048*735d6239SKiyoung Kimfi]) 3049*735d6239SKiyoung KimLD="$lt_cv_path_LD" 3050*735d6239SKiyoung Kimif test -n "$LD"; then 3051*735d6239SKiyoung Kim AC_MSG_RESULT($LD) 3052*735d6239SKiyoung Kimelse 3053*735d6239SKiyoung Kim AC_MSG_RESULT(no) 3054*735d6239SKiyoung Kimfi 3055*735d6239SKiyoung Kimtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3056*735d6239SKiyoung Kim_LT_PATH_LD_GNU 3057*735d6239SKiyoung KimAC_SUBST([LD]) 3058*735d6239SKiyoung Kim 3059*735d6239SKiyoung Kim_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3060*735d6239SKiyoung Kim])# LT_PATH_LD 3061*735d6239SKiyoung Kim 3062*735d6239SKiyoung Kim# Old names: 3063*735d6239SKiyoung KimAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3064*735d6239SKiyoung KimAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3065*735d6239SKiyoung Kimdnl aclocal-1.4 backwards compatibility: 3066*735d6239SKiyoung Kimdnl AC_DEFUN([AM_PROG_LD], []) 3067*735d6239SKiyoung Kimdnl AC_DEFUN([AC_PROG_LD], []) 3068*735d6239SKiyoung Kim 3069*735d6239SKiyoung Kim 3070*735d6239SKiyoung Kim# _LT_PATH_LD_GNU 3071*735d6239SKiyoung Kim#- -------------- 3072*735d6239SKiyoung Kimm4_defun([_LT_PATH_LD_GNU], 3073*735d6239SKiyoung Kim[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3074*735d6239SKiyoung Kim[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3075*735d6239SKiyoung Kimcase `$LD -v 2>&1 </dev/null` in 3076*735d6239SKiyoung Kim*GNU* | *'with BFD'*) 3077*735d6239SKiyoung Kim lt_cv_prog_gnu_ld=yes 3078*735d6239SKiyoung Kim ;; 3079*735d6239SKiyoung Kim*) 3080*735d6239SKiyoung Kim lt_cv_prog_gnu_ld=no 3081*735d6239SKiyoung Kim ;; 3082*735d6239SKiyoung Kimesac]) 3083*735d6239SKiyoung Kimwith_gnu_ld=$lt_cv_prog_gnu_ld 3084*735d6239SKiyoung Kim])# _LT_PATH_LD_GNU 3085*735d6239SKiyoung Kim 3086*735d6239SKiyoung Kim 3087*735d6239SKiyoung Kim# _LT_CMD_RELOAD 3088*735d6239SKiyoung Kim# -------------- 3089*735d6239SKiyoung Kim# find reload flag for linker 3090*735d6239SKiyoung Kim# -- PORTME Some linkers may need a different reload flag. 3091*735d6239SKiyoung Kimm4_defun([_LT_CMD_RELOAD], 3092*735d6239SKiyoung Kim[AC_CACHE_CHECK([for $LD option to reload object files], 3093*735d6239SKiyoung Kim lt_cv_ld_reload_flag, 3094*735d6239SKiyoung Kim [lt_cv_ld_reload_flag='-r']) 3095*735d6239SKiyoung Kimreload_flag=$lt_cv_ld_reload_flag 3096*735d6239SKiyoung Kimcase $reload_flag in 3097*735d6239SKiyoung Kim"" | " "*) ;; 3098*735d6239SKiyoung Kim*) reload_flag=" $reload_flag" ;; 3099*735d6239SKiyoung Kimesac 3100*735d6239SKiyoung Kimreload_cmds='$LD$reload_flag -o $output$reload_objs' 3101*735d6239SKiyoung Kimcase $host_os in 3102*735d6239SKiyoung Kim cygwin* | mingw* | pw32* | cegcc*) 3103*735d6239SKiyoung Kim if test "$GCC" != yes; then 3104*735d6239SKiyoung Kim reload_cmds=false 3105*735d6239SKiyoung Kim fi 3106*735d6239SKiyoung Kim ;; 3107*735d6239SKiyoung Kim darwin*) 3108*735d6239SKiyoung Kim if test "$GCC" = yes; then 3109*735d6239SKiyoung Kim reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 3110*735d6239SKiyoung Kim else 3111*735d6239SKiyoung Kim reload_cmds='$LD$reload_flag -o $output$reload_objs' 3112*735d6239SKiyoung Kim fi 3113*735d6239SKiyoung Kim ;; 3114*735d6239SKiyoung Kimesac 3115*735d6239SKiyoung Kim_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3116*735d6239SKiyoung Kim_LT_TAGDECL([], [reload_cmds], [2])dnl 3117*735d6239SKiyoung Kim])# _LT_CMD_RELOAD 3118*735d6239SKiyoung Kim 3119*735d6239SKiyoung Kim 3120*735d6239SKiyoung Kim# _LT_CHECK_MAGIC_METHOD 3121*735d6239SKiyoung Kim# ---------------------- 3122*735d6239SKiyoung Kim# how to check for library dependencies 3123*735d6239SKiyoung Kim# -- PORTME fill in with the dynamic library characteristics 3124*735d6239SKiyoung Kimm4_defun([_LT_CHECK_MAGIC_METHOD], 3125*735d6239SKiyoung Kim[m4_require([_LT_DECL_EGREP]) 3126*735d6239SKiyoung Kimm4_require([_LT_DECL_OBJDUMP]) 3127*735d6239SKiyoung KimAC_CACHE_CHECK([how to recognize dependent libraries], 3128*735d6239SKiyoung Kimlt_cv_deplibs_check_method, 3129*735d6239SKiyoung Kim[lt_cv_file_magic_cmd='$MAGIC_CMD' 3130*735d6239SKiyoung Kimlt_cv_file_magic_test_file= 3131*735d6239SKiyoung Kimlt_cv_deplibs_check_method='unknown' 3132*735d6239SKiyoung Kim# Need to set the preceding variable on all platforms that support 3133*735d6239SKiyoung Kim# interlibrary dependencies. 3134*735d6239SKiyoung Kim# 'none' -- dependencies not supported. 3135*735d6239SKiyoung Kim# `unknown' -- same as none, but documents that we really don't know. 3136*735d6239SKiyoung Kim# 'pass_all' -- all dependencies passed with no checks. 3137*735d6239SKiyoung Kim# 'test_compile' -- check by making test program. 3138*735d6239SKiyoung Kim# 'file_magic [[regex]]' -- check by looking for files in library path 3139*735d6239SKiyoung Kim# which responds to the $file_magic_cmd with a given extended regex. 3140*735d6239SKiyoung Kim# If you have `file' or equivalent on your system and you're not sure 3141*735d6239SKiyoung Kim# whether `pass_all' will *always* work, you probably want this one. 3142*735d6239SKiyoung Kim 3143*735d6239SKiyoung Kimcase $host_os in 3144*735d6239SKiyoung Kimaix[[4-9]]*) 3145*735d6239SKiyoung Kim lt_cv_deplibs_check_method=pass_all 3146*735d6239SKiyoung Kim ;; 3147*735d6239SKiyoung Kim 3148*735d6239SKiyoung Kimbeos*) 3149*735d6239SKiyoung Kim lt_cv_deplibs_check_method=pass_all 3150*735d6239SKiyoung Kim ;; 3151*735d6239SKiyoung Kim 3152*735d6239SKiyoung Kimbsdi[[45]]*) 3153*735d6239SKiyoung Kim lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3154*735d6239SKiyoung Kim lt_cv_file_magic_cmd='/usr/bin/file -L' 3155*735d6239SKiyoung Kim lt_cv_file_magic_test_file=/shlib/libc.so 3156*735d6239SKiyoung Kim ;; 3157*735d6239SKiyoung Kim 3158*735d6239SKiyoung Kimcygwin*) 3159*735d6239SKiyoung Kim # func_win32_libid is a shell function defined in ltmain.sh 3160*735d6239SKiyoung Kim lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3161*735d6239SKiyoung Kim lt_cv_file_magic_cmd='func_win32_libid' 3162*735d6239SKiyoung Kim ;; 3163*735d6239SKiyoung Kim 3164*735d6239SKiyoung Kimmingw* | pw32*) 3165*735d6239SKiyoung Kim # Base MSYS/MinGW do not provide the 'file' command needed by 3166*735d6239SKiyoung Kim # func_win32_libid shell function, so use a weaker test based on 'objdump', 3167*735d6239SKiyoung Kim # unless we find 'file', for example because we are cross-compiling. 3168*735d6239SKiyoung Kim # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 3169*735d6239SKiyoung Kim if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 3170*735d6239SKiyoung Kim lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3171*735d6239SKiyoung Kim lt_cv_file_magic_cmd='func_win32_libid' 3172*735d6239SKiyoung Kim else 3173*735d6239SKiyoung Kim # Keep this pattern in sync with the one in func_win32_libid. 3174*735d6239SKiyoung Kim lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3175*735d6239SKiyoung Kim lt_cv_file_magic_cmd='$OBJDUMP -f' 3176*735d6239SKiyoung Kim fi 3177*735d6239SKiyoung Kim ;; 3178*735d6239SKiyoung Kim 3179*735d6239SKiyoung Kimcegcc*) 3180*735d6239SKiyoung Kim # use the weaker test based on 'objdump'. See mingw*. 3181*735d6239SKiyoung Kim lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3182*735d6239SKiyoung Kim lt_cv_file_magic_cmd='$OBJDUMP -f' 3183*735d6239SKiyoung Kim ;; 3184*735d6239SKiyoung Kim 3185*735d6239SKiyoung Kimdarwin* | rhapsody*) 3186*735d6239SKiyoung Kim lt_cv_deplibs_check_method=pass_all 3187*735d6239SKiyoung Kim ;; 3188*735d6239SKiyoung Kim 3189*735d6239SKiyoung Kimfreebsd* | dragonfly*) 3190*735d6239SKiyoung Kim if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3191*735d6239SKiyoung Kim case $host_cpu in 3192*735d6239SKiyoung Kim i*86 ) 3193*735d6239SKiyoung Kim # Not sure whether the presence of OpenBSD here was a mistake. 3194*735d6239SKiyoung Kim # Let's accept both of them until this is cleared up. 3195*735d6239SKiyoung Kim lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3196*735d6239SKiyoung Kim lt_cv_file_magic_cmd=/usr/bin/file 3197*735d6239SKiyoung Kim lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3198*735d6239SKiyoung Kim ;; 3199*735d6239SKiyoung Kim esac 3200*735d6239SKiyoung Kim else 3201*735d6239SKiyoung Kim lt_cv_deplibs_check_method=pass_all 3202*735d6239SKiyoung Kim fi 3203*735d6239SKiyoung Kim ;; 3204*735d6239SKiyoung Kim 3205*735d6239SKiyoung Kimgnu*) 3206*735d6239SKiyoung Kim lt_cv_deplibs_check_method=pass_all 3207*735d6239SKiyoung Kim ;; 3208*735d6239SKiyoung Kim 3209*735d6239SKiyoung Kimhaiku*) 3210*735d6239SKiyoung Kim lt_cv_deplibs_check_method=pass_all 3211*735d6239SKiyoung Kim ;; 3212*735d6239SKiyoung Kim 3213*735d6239SKiyoung Kimhpux10.20* | hpux11*) 3214*735d6239SKiyoung Kim lt_cv_file_magic_cmd=/usr/bin/file 3215*735d6239SKiyoung Kim case $host_cpu in 3216*735d6239SKiyoung Kim ia64*) 3217*735d6239SKiyoung Kim lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3218*735d6239SKiyoung Kim lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3219*735d6239SKiyoung Kim ;; 3220*735d6239SKiyoung Kim hppa*64*) 3221*735d6239SKiyoung Kim [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]'] 3222*735d6239SKiyoung Kim lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3223*735d6239SKiyoung Kim ;; 3224*735d6239SKiyoung Kim *) 3225*735d6239SKiyoung Kim lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3226*735d6239SKiyoung Kim lt_cv_file_magic_test_file=/usr/lib/libc.sl 3227*735d6239SKiyoung Kim ;; 3228*735d6239SKiyoung Kim esac 3229*735d6239SKiyoung Kim ;; 3230*735d6239SKiyoung Kim 3231*735d6239SKiyoung Kiminterix[[3-9]]*) 3232*735d6239SKiyoung Kim # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3233*735d6239SKiyoung Kim lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3234*735d6239SKiyoung Kim ;; 3235*735d6239SKiyoung Kim 3236*735d6239SKiyoung Kimirix5* | irix6* | nonstopux*) 3237*735d6239SKiyoung Kim case $LD in 3238*735d6239SKiyoung Kim *-32|*"-32 ") libmagic=32-bit;; 3239*735d6239SKiyoung Kim *-n32|*"-n32 ") libmagic=N32;; 3240*735d6239SKiyoung Kim *-64|*"-64 ") libmagic=64-bit;; 3241*735d6239SKiyoung Kim *) libmagic=never-match;; 3242*735d6239SKiyoung Kim esac 3243*735d6239SKiyoung Kim lt_cv_deplibs_check_method=pass_all 3244*735d6239SKiyoung Kim ;; 3245*735d6239SKiyoung Kim 3246*735d6239SKiyoung Kim# This must be Linux ELF. 3247*735d6239SKiyoung Kimlinux* | k*bsd*-gnu | kopensolaris*-gnu) 3248*735d6239SKiyoung Kim lt_cv_deplibs_check_method=pass_all 3249*735d6239SKiyoung Kim ;; 3250*735d6239SKiyoung Kim 3251*735d6239SKiyoung Kimnetbsd*) 3252*735d6239SKiyoung Kim if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3253*735d6239SKiyoung Kim lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3254*735d6239SKiyoung Kim else 3255*735d6239SKiyoung Kim lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3256*735d6239SKiyoung Kim fi 3257*735d6239SKiyoung Kim ;; 3258*735d6239SKiyoung Kim 3259*735d6239SKiyoung Kimnewos6*) 3260*735d6239SKiyoung Kim lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3261*735d6239SKiyoung Kim lt_cv_file_magic_cmd=/usr/bin/file 3262*735d6239SKiyoung Kim lt_cv_file_magic_test_file=/usr/lib/libnls.so 3263*735d6239SKiyoung Kim ;; 3264*735d6239SKiyoung Kim 3265*735d6239SKiyoung Kim*nto* | *qnx*) 3266*735d6239SKiyoung Kim lt_cv_deplibs_check_method=pass_all 3267*735d6239SKiyoung Kim ;; 3268*735d6239SKiyoung Kim 3269*735d6239SKiyoung Kimopenbsd*) 3270*735d6239SKiyoung Kim if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3271*735d6239SKiyoung Kim lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3272*735d6239SKiyoung Kim else 3273*735d6239SKiyoung Kim lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3274*735d6239SKiyoung Kim fi 3275*735d6239SKiyoung Kim ;; 3276*735d6239SKiyoung Kim 3277*735d6239SKiyoung Kimosf3* | osf4* | osf5*) 3278*735d6239SKiyoung Kim lt_cv_deplibs_check_method=pass_all 3279*735d6239SKiyoung Kim ;; 3280*735d6239SKiyoung Kim 3281*735d6239SKiyoung Kimrdos*) 3282*735d6239SKiyoung Kim lt_cv_deplibs_check_method=pass_all 3283*735d6239SKiyoung Kim ;; 3284*735d6239SKiyoung Kim 3285*735d6239SKiyoung Kimsolaris*) 3286*735d6239SKiyoung Kim lt_cv_deplibs_check_method=pass_all 3287*735d6239SKiyoung Kim ;; 3288*735d6239SKiyoung Kim 3289*735d6239SKiyoung Kimsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3290*735d6239SKiyoung Kim lt_cv_deplibs_check_method=pass_all 3291*735d6239SKiyoung Kim ;; 3292*735d6239SKiyoung Kim 3293*735d6239SKiyoung Kimsysv4 | sysv4.3*) 3294*735d6239SKiyoung Kim case $host_vendor in 3295*735d6239SKiyoung Kim motorola) 3296*735d6239SKiyoung Kim 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]]' 3297*735d6239SKiyoung Kim lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3298*735d6239SKiyoung Kim ;; 3299*735d6239SKiyoung Kim ncr) 3300*735d6239SKiyoung Kim lt_cv_deplibs_check_method=pass_all 3301*735d6239SKiyoung Kim ;; 3302*735d6239SKiyoung Kim sequent) 3303*735d6239SKiyoung Kim lt_cv_file_magic_cmd='/bin/file' 3304*735d6239SKiyoung Kim lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3305*735d6239SKiyoung Kim ;; 3306*735d6239SKiyoung Kim sni) 3307*735d6239SKiyoung Kim lt_cv_file_magic_cmd='/bin/file' 3308*735d6239SKiyoung Kim lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3309*735d6239SKiyoung Kim lt_cv_file_magic_test_file=/lib/libc.so 3310*735d6239SKiyoung Kim ;; 3311*735d6239SKiyoung Kim siemens) 3312*735d6239SKiyoung Kim lt_cv_deplibs_check_method=pass_all 3313*735d6239SKiyoung Kim ;; 3314*735d6239SKiyoung Kim pc) 3315*735d6239SKiyoung Kim lt_cv_deplibs_check_method=pass_all 3316*735d6239SKiyoung Kim ;; 3317*735d6239SKiyoung Kim esac 3318*735d6239SKiyoung Kim ;; 3319*735d6239SKiyoung Kim 3320*735d6239SKiyoung Kimtpf*) 3321*735d6239SKiyoung Kim lt_cv_deplibs_check_method=pass_all 3322*735d6239SKiyoung Kim ;; 3323*735d6239SKiyoung Kimesac 3324*735d6239SKiyoung Kim]) 3325*735d6239SKiyoung Kim 3326*735d6239SKiyoung Kimfile_magic_glob= 3327*735d6239SKiyoung Kimwant_nocaseglob=no 3328*735d6239SKiyoung Kimif test "$build" = "$host"; then 3329*735d6239SKiyoung Kim case $host_os in 3330*735d6239SKiyoung Kim mingw* | pw32*) 3331*735d6239SKiyoung Kim if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3332*735d6239SKiyoung Kim want_nocaseglob=yes 3333*735d6239SKiyoung Kim else 3334*735d6239SKiyoung Kim file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3335*735d6239SKiyoung Kim fi 3336*735d6239SKiyoung Kim ;; 3337*735d6239SKiyoung Kim esac 3338*735d6239SKiyoung Kimfi 3339*735d6239SKiyoung Kim 3340*735d6239SKiyoung Kimfile_magic_cmd=$lt_cv_file_magic_cmd 3341*735d6239SKiyoung Kimdeplibs_check_method=$lt_cv_deplibs_check_method 3342*735d6239SKiyoung Kimtest -z "$deplibs_check_method" && deplibs_check_method=unknown 3343*735d6239SKiyoung Kim 3344*735d6239SKiyoung Kim_LT_DECL([], [deplibs_check_method], [1], 3345*735d6239SKiyoung Kim [Method to check whether dependent libraries are shared objects]) 3346*735d6239SKiyoung Kim_LT_DECL([], [file_magic_cmd], [1], 3347*735d6239SKiyoung Kim [Command to use when deplibs_check_method = "file_magic"]) 3348*735d6239SKiyoung Kim_LT_DECL([], [file_magic_glob], [1], 3349*735d6239SKiyoung Kim [How to find potential files when deplibs_check_method = "file_magic"]) 3350*735d6239SKiyoung Kim_LT_DECL([], [want_nocaseglob], [1], 3351*735d6239SKiyoung Kim [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3352*735d6239SKiyoung Kim])# _LT_CHECK_MAGIC_METHOD 3353*735d6239SKiyoung Kim 3354*735d6239SKiyoung Kim 3355*735d6239SKiyoung Kim# LT_PATH_NM 3356*735d6239SKiyoung Kim# ---------- 3357*735d6239SKiyoung Kim# find the pathname to a BSD- or MS-compatible name lister 3358*735d6239SKiyoung KimAC_DEFUN([LT_PATH_NM], 3359*735d6239SKiyoung Kim[AC_REQUIRE([AC_PROG_CC])dnl 3360*735d6239SKiyoung KimAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3361*735d6239SKiyoung Kim[if test -n "$NM"; then 3362*735d6239SKiyoung Kim # Let the user override the test. 3363*735d6239SKiyoung Kim lt_cv_path_NM="$NM" 3364*735d6239SKiyoung Kimelse 3365*735d6239SKiyoung Kim lt_nm_to_check="${ac_tool_prefix}nm" 3366*735d6239SKiyoung Kim if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3367*735d6239SKiyoung Kim lt_nm_to_check="$lt_nm_to_check nm" 3368*735d6239SKiyoung Kim fi 3369*735d6239SKiyoung Kim for lt_tmp_nm in $lt_nm_to_check; do 3370*735d6239SKiyoung Kim lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3371*735d6239SKiyoung Kim for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3372*735d6239SKiyoung Kim IFS="$lt_save_ifs" 3373*735d6239SKiyoung Kim test -z "$ac_dir" && ac_dir=. 3374*735d6239SKiyoung Kim tmp_nm="$ac_dir/$lt_tmp_nm" 3375*735d6239SKiyoung Kim if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 3376*735d6239SKiyoung Kim # Check to see if the nm accepts a BSD-compat flag. 3377*735d6239SKiyoung Kim # Adding the `sed 1q' prevents false positives on HP-UX, which says: 3378*735d6239SKiyoung Kim # nm: unknown option "B" ignored 3379*735d6239SKiyoung Kim # Tru64's nm complains that /dev/null is an invalid object file 3380*735d6239SKiyoung Kim case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 3381*735d6239SKiyoung Kim */dev/null* | *'Invalid file or object type'*) 3382*735d6239SKiyoung Kim lt_cv_path_NM="$tmp_nm -B" 3383*735d6239SKiyoung Kim break 3384*735d6239SKiyoung Kim ;; 3385*735d6239SKiyoung Kim *) 3386*735d6239SKiyoung Kim case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3387*735d6239SKiyoung Kim */dev/null*) 3388*735d6239SKiyoung Kim lt_cv_path_NM="$tmp_nm -p" 3389*735d6239SKiyoung Kim break 3390*735d6239SKiyoung Kim ;; 3391*735d6239SKiyoung Kim *) 3392*735d6239SKiyoung Kim lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3393*735d6239SKiyoung Kim continue # so that we can try to find one that supports BSD flags 3394*735d6239SKiyoung Kim ;; 3395*735d6239SKiyoung Kim esac 3396*735d6239SKiyoung Kim ;; 3397*735d6239SKiyoung Kim esac 3398*735d6239SKiyoung Kim fi 3399*735d6239SKiyoung Kim done 3400*735d6239SKiyoung Kim IFS="$lt_save_ifs" 3401*735d6239SKiyoung Kim done 3402*735d6239SKiyoung Kim : ${lt_cv_path_NM=no} 3403*735d6239SKiyoung Kimfi]) 3404*735d6239SKiyoung Kimif test "$lt_cv_path_NM" != "no"; then 3405*735d6239SKiyoung Kim NM="$lt_cv_path_NM" 3406*735d6239SKiyoung Kimelse 3407*735d6239SKiyoung Kim # Didn't find any BSD compatible name lister, look for dumpbin. 3408*735d6239SKiyoung Kim if test -n "$DUMPBIN"; then : 3409*735d6239SKiyoung Kim # Let the user override the test. 3410*735d6239SKiyoung Kim else 3411*735d6239SKiyoung Kim AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3412*735d6239SKiyoung Kim case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 3413*735d6239SKiyoung Kim *COFF*) 3414*735d6239SKiyoung Kim DUMPBIN="$DUMPBIN -symbols" 3415*735d6239SKiyoung Kim ;; 3416*735d6239SKiyoung Kim *) 3417*735d6239SKiyoung Kim DUMPBIN=: 3418*735d6239SKiyoung Kim ;; 3419*735d6239SKiyoung Kim esac 3420*735d6239SKiyoung Kim fi 3421*735d6239SKiyoung Kim AC_SUBST([DUMPBIN]) 3422*735d6239SKiyoung Kim if test "$DUMPBIN" != ":"; then 3423*735d6239SKiyoung Kim NM="$DUMPBIN" 3424*735d6239SKiyoung Kim fi 3425*735d6239SKiyoung Kimfi 3426*735d6239SKiyoung Kimtest -z "$NM" && NM=nm 3427*735d6239SKiyoung KimAC_SUBST([NM]) 3428*735d6239SKiyoung Kim_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3429*735d6239SKiyoung Kim 3430*735d6239SKiyoung KimAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3431*735d6239SKiyoung Kim [lt_cv_nm_interface="BSD nm" 3432*735d6239SKiyoung Kim echo "int some_variable = 0;" > conftest.$ac_ext 3433*735d6239SKiyoung Kim (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3434*735d6239SKiyoung Kim (eval "$ac_compile" 2>conftest.err) 3435*735d6239SKiyoung Kim cat conftest.err >&AS_MESSAGE_LOG_FD 3436*735d6239SKiyoung Kim (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3437*735d6239SKiyoung Kim (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3438*735d6239SKiyoung Kim cat conftest.err >&AS_MESSAGE_LOG_FD 3439*735d6239SKiyoung Kim (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3440*735d6239SKiyoung Kim cat conftest.out >&AS_MESSAGE_LOG_FD 3441*735d6239SKiyoung Kim if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3442*735d6239SKiyoung Kim lt_cv_nm_interface="MS dumpbin" 3443*735d6239SKiyoung Kim fi 3444*735d6239SKiyoung Kim rm -f conftest*]) 3445*735d6239SKiyoung Kim])# LT_PATH_NM 3446*735d6239SKiyoung Kim 3447*735d6239SKiyoung Kim# Old names: 3448*735d6239SKiyoung KimAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3449*735d6239SKiyoung KimAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3450*735d6239SKiyoung Kimdnl aclocal-1.4 backwards compatibility: 3451*735d6239SKiyoung Kimdnl AC_DEFUN([AM_PROG_NM], []) 3452*735d6239SKiyoung Kimdnl AC_DEFUN([AC_PROG_NM], []) 3453*735d6239SKiyoung Kim 3454*735d6239SKiyoung Kim# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3455*735d6239SKiyoung Kim# -------------------------------- 3456*735d6239SKiyoung Kim# how to determine the name of the shared library 3457*735d6239SKiyoung Kim# associated with a specific link library. 3458*735d6239SKiyoung Kim# -- PORTME fill in with the dynamic library characteristics 3459*735d6239SKiyoung Kimm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3460*735d6239SKiyoung Kim[m4_require([_LT_DECL_EGREP]) 3461*735d6239SKiyoung Kimm4_require([_LT_DECL_OBJDUMP]) 3462*735d6239SKiyoung Kimm4_require([_LT_DECL_DLLTOOL]) 3463*735d6239SKiyoung KimAC_CACHE_CHECK([how to associate runtime and link libraries], 3464*735d6239SKiyoung Kimlt_cv_sharedlib_from_linklib_cmd, 3465*735d6239SKiyoung Kim[lt_cv_sharedlib_from_linklib_cmd='unknown' 3466*735d6239SKiyoung Kim 3467*735d6239SKiyoung Kimcase $host_os in 3468*735d6239SKiyoung Kimcygwin* | mingw* | pw32* | cegcc*) 3469*735d6239SKiyoung Kim # two different shell functions defined in ltmain.sh 3470*735d6239SKiyoung Kim # decide which to use based on capabilities of $DLLTOOL 3471*735d6239SKiyoung Kim case `$DLLTOOL --help 2>&1` in 3472*735d6239SKiyoung Kim *--identify-strict*) 3473*735d6239SKiyoung Kim lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3474*735d6239SKiyoung Kim ;; 3475*735d6239SKiyoung Kim *) 3476*735d6239SKiyoung Kim lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3477*735d6239SKiyoung Kim ;; 3478*735d6239SKiyoung Kim esac 3479*735d6239SKiyoung Kim ;; 3480*735d6239SKiyoung Kim*) 3481*735d6239SKiyoung Kim # fallback: assume linklib IS sharedlib 3482*735d6239SKiyoung Kim lt_cv_sharedlib_from_linklib_cmd="$ECHO" 3483*735d6239SKiyoung Kim ;; 3484*735d6239SKiyoung Kimesac 3485*735d6239SKiyoung Kim]) 3486*735d6239SKiyoung Kimsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3487*735d6239SKiyoung Kimtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3488*735d6239SKiyoung Kim 3489*735d6239SKiyoung Kim_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3490*735d6239SKiyoung Kim [Command to associate shared and link libraries]) 3491*735d6239SKiyoung Kim])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3492*735d6239SKiyoung Kim 3493*735d6239SKiyoung Kim 3494*735d6239SKiyoung Kim# _LT_PATH_MANIFEST_TOOL 3495*735d6239SKiyoung Kim# ---------------------- 3496*735d6239SKiyoung Kim# locate the manifest tool 3497*735d6239SKiyoung Kimm4_defun([_LT_PATH_MANIFEST_TOOL], 3498*735d6239SKiyoung Kim[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3499*735d6239SKiyoung Kimtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3500*735d6239SKiyoung KimAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3501*735d6239SKiyoung Kim [lt_cv_path_mainfest_tool=no 3502*735d6239SKiyoung Kim echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3503*735d6239SKiyoung Kim $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3504*735d6239SKiyoung Kim cat conftest.err >&AS_MESSAGE_LOG_FD 3505*735d6239SKiyoung Kim if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3506*735d6239SKiyoung Kim lt_cv_path_mainfest_tool=yes 3507*735d6239SKiyoung Kim fi 3508*735d6239SKiyoung Kim rm -f conftest*]) 3509*735d6239SKiyoung Kimif test "x$lt_cv_path_mainfest_tool" != xyes; then 3510*735d6239SKiyoung Kim MANIFEST_TOOL=: 3511*735d6239SKiyoung Kimfi 3512*735d6239SKiyoung Kim_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3513*735d6239SKiyoung Kim])# _LT_PATH_MANIFEST_TOOL 3514*735d6239SKiyoung Kim 3515*735d6239SKiyoung Kim 3516*735d6239SKiyoung Kim# LT_LIB_M 3517*735d6239SKiyoung Kim# -------- 3518*735d6239SKiyoung Kim# check for math library 3519*735d6239SKiyoung KimAC_DEFUN([LT_LIB_M], 3520*735d6239SKiyoung Kim[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3521*735d6239SKiyoung KimLIBM= 3522*735d6239SKiyoung Kimcase $host in 3523*735d6239SKiyoung Kim*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 3524*735d6239SKiyoung Kim # These system don't have libm, or don't need it 3525*735d6239SKiyoung Kim ;; 3526*735d6239SKiyoung Kim*-ncr-sysv4.3*) 3527*735d6239SKiyoung Kim AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 3528*735d6239SKiyoung Kim AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3529*735d6239SKiyoung Kim ;; 3530*735d6239SKiyoung Kim*) 3531*735d6239SKiyoung Kim AC_CHECK_LIB(m, cos, LIBM="-lm") 3532*735d6239SKiyoung Kim ;; 3533*735d6239SKiyoung Kimesac 3534*735d6239SKiyoung KimAC_SUBST([LIBM]) 3535*735d6239SKiyoung Kim])# LT_LIB_M 3536*735d6239SKiyoung Kim 3537*735d6239SKiyoung Kim# Old name: 3538*735d6239SKiyoung KimAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3539*735d6239SKiyoung Kimdnl aclocal-1.4 backwards compatibility: 3540*735d6239SKiyoung Kimdnl AC_DEFUN([AC_CHECK_LIBM], []) 3541*735d6239SKiyoung Kim 3542*735d6239SKiyoung Kim 3543*735d6239SKiyoung Kim# _LT_COMPILER_NO_RTTI([TAGNAME]) 3544*735d6239SKiyoung Kim# ------------------------------- 3545*735d6239SKiyoung Kimm4_defun([_LT_COMPILER_NO_RTTI], 3546*735d6239SKiyoung Kim[m4_require([_LT_TAG_COMPILER])dnl 3547*735d6239SKiyoung Kim 3548*735d6239SKiyoung Kim_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3549*735d6239SKiyoung Kim 3550*735d6239SKiyoung Kimif test "$GCC" = yes; then 3551*735d6239SKiyoung Kim case $cc_basename in 3552*735d6239SKiyoung Kim nvcc*) 3553*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3554*735d6239SKiyoung Kim *) 3555*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3556*735d6239SKiyoung Kim esac 3557*735d6239SKiyoung Kim 3558*735d6239SKiyoung Kim _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3559*735d6239SKiyoung Kim lt_cv_prog_compiler_rtti_exceptions, 3560*735d6239SKiyoung Kim [-fno-rtti -fno-exceptions], [], 3561*735d6239SKiyoung Kim [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3562*735d6239SKiyoung Kimfi 3563*735d6239SKiyoung Kim_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3564*735d6239SKiyoung Kim [Compiler flag to turn off builtin functions]) 3565*735d6239SKiyoung Kim])# _LT_COMPILER_NO_RTTI 3566*735d6239SKiyoung Kim 3567*735d6239SKiyoung Kim 3568*735d6239SKiyoung Kim# _LT_CMD_GLOBAL_SYMBOLS 3569*735d6239SKiyoung Kim# ---------------------- 3570*735d6239SKiyoung Kimm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3571*735d6239SKiyoung Kim[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3572*735d6239SKiyoung KimAC_REQUIRE([AC_PROG_CC])dnl 3573*735d6239SKiyoung KimAC_REQUIRE([AC_PROG_AWK])dnl 3574*735d6239SKiyoung KimAC_REQUIRE([LT_PATH_NM])dnl 3575*735d6239SKiyoung KimAC_REQUIRE([LT_PATH_LD])dnl 3576*735d6239SKiyoung Kimm4_require([_LT_DECL_SED])dnl 3577*735d6239SKiyoung Kimm4_require([_LT_DECL_EGREP])dnl 3578*735d6239SKiyoung Kimm4_require([_LT_TAG_COMPILER])dnl 3579*735d6239SKiyoung Kim 3580*735d6239SKiyoung Kim# Check for command to grab the raw symbol name followed by C symbol from nm. 3581*735d6239SKiyoung KimAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3582*735d6239SKiyoung KimAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3583*735d6239SKiyoung Kim[ 3584*735d6239SKiyoung Kim# These are sane defaults that work on at least a few old systems. 3585*735d6239SKiyoung Kim# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3586*735d6239SKiyoung Kim 3587*735d6239SKiyoung Kim# Character class describing NM global symbol codes. 3588*735d6239SKiyoung Kimsymcode='[[BCDEGRST]]' 3589*735d6239SKiyoung Kim 3590*735d6239SKiyoung Kim# Regexp to match symbols that can be accessed directly from C. 3591*735d6239SKiyoung Kimsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3592*735d6239SKiyoung Kim 3593*735d6239SKiyoung Kim# Define system-specific variables. 3594*735d6239SKiyoung Kimcase $host_os in 3595*735d6239SKiyoung Kimaix*) 3596*735d6239SKiyoung Kim symcode='[[BCDT]]' 3597*735d6239SKiyoung Kim ;; 3598*735d6239SKiyoung Kimcygwin* | mingw* | pw32* | cegcc*) 3599*735d6239SKiyoung Kim symcode='[[ABCDGISTW]]' 3600*735d6239SKiyoung Kim ;; 3601*735d6239SKiyoung Kimhpux*) 3602*735d6239SKiyoung Kim if test "$host_cpu" = ia64; then 3603*735d6239SKiyoung Kim symcode='[[ABCDEGRST]]' 3604*735d6239SKiyoung Kim fi 3605*735d6239SKiyoung Kim ;; 3606*735d6239SKiyoung Kimirix* | nonstopux*) 3607*735d6239SKiyoung Kim symcode='[[BCDEGRST]]' 3608*735d6239SKiyoung Kim ;; 3609*735d6239SKiyoung Kimosf*) 3610*735d6239SKiyoung Kim symcode='[[BCDEGQRST]]' 3611*735d6239SKiyoung Kim ;; 3612*735d6239SKiyoung Kimsolaris*) 3613*735d6239SKiyoung Kim symcode='[[BDRT]]' 3614*735d6239SKiyoung Kim ;; 3615*735d6239SKiyoung Kimsco3.2v5*) 3616*735d6239SKiyoung Kim symcode='[[DT]]' 3617*735d6239SKiyoung Kim ;; 3618*735d6239SKiyoung Kimsysv4.2uw2*) 3619*735d6239SKiyoung Kim symcode='[[DT]]' 3620*735d6239SKiyoung Kim ;; 3621*735d6239SKiyoung Kimsysv5* | sco5v6* | unixware* | OpenUNIX*) 3622*735d6239SKiyoung Kim symcode='[[ABDT]]' 3623*735d6239SKiyoung Kim ;; 3624*735d6239SKiyoung Kimsysv4) 3625*735d6239SKiyoung Kim symcode='[[DFNSTU]]' 3626*735d6239SKiyoung Kim ;; 3627*735d6239SKiyoung Kimesac 3628*735d6239SKiyoung Kim 3629*735d6239SKiyoung Kim# If we're using GNU nm, then use its standard symbol codes. 3630*735d6239SKiyoung Kimcase `$NM -V 2>&1` in 3631*735d6239SKiyoung Kim*GNU* | *'with BFD'*) 3632*735d6239SKiyoung Kim symcode='[[ABCDGIRSTW]]' ;; 3633*735d6239SKiyoung Kimesac 3634*735d6239SKiyoung Kim 3635*735d6239SKiyoung Kim# Transform an extracted symbol line into a proper C declaration. 3636*735d6239SKiyoung Kim# Some systems (esp. on ia64) link data and code symbols differently, 3637*735d6239SKiyoung Kim# so use this general approach. 3638*735d6239SKiyoung Kimlt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 3639*735d6239SKiyoung Kim 3640*735d6239SKiyoung Kim# Transform an extracted symbol line into symbol name and symbol address 3641*735d6239SKiyoung Kimlt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 3642*735d6239SKiyoung Kimlt_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'" 3643*735d6239SKiyoung Kim 3644*735d6239SKiyoung Kim# Handle CRLF in mingw tool chain 3645*735d6239SKiyoung Kimopt_cr= 3646*735d6239SKiyoung Kimcase $build_os in 3647*735d6239SKiyoung Kimmingw*) 3648*735d6239SKiyoung Kim opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 3649*735d6239SKiyoung Kim ;; 3650*735d6239SKiyoung Kimesac 3651*735d6239SKiyoung Kim 3652*735d6239SKiyoung Kim# Try without a prefix underscore, then with it. 3653*735d6239SKiyoung Kimfor ac_symprfx in "" "_"; do 3654*735d6239SKiyoung Kim 3655*735d6239SKiyoung Kim # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 3656*735d6239SKiyoung Kim symxfrm="\\1 $ac_symprfx\\2 \\2" 3657*735d6239SKiyoung Kim 3658*735d6239SKiyoung Kim # Write the raw and C identifiers. 3659*735d6239SKiyoung Kim if test "$lt_cv_nm_interface" = "MS dumpbin"; then 3660*735d6239SKiyoung Kim # Fake it for dumpbin and say T for any non-static function 3661*735d6239SKiyoung Kim # and D for any global variable. 3662*735d6239SKiyoung Kim # Also find C++ and __fastcall symbols from MSVC++, 3663*735d6239SKiyoung Kim # which start with @ or ?. 3664*735d6239SKiyoung Kim lt_cv_sys_global_symbol_pipe="$AWK ['"\ 3665*735d6239SKiyoung Kim" {last_section=section; section=\$ 3};"\ 3666*735d6239SKiyoung Kim" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 3667*735d6239SKiyoung Kim" \$ 0!~/External *\|/{next};"\ 3668*735d6239SKiyoung Kim" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 3669*735d6239SKiyoung Kim" {if(hide[section]) next};"\ 3670*735d6239SKiyoung Kim" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 3671*735d6239SKiyoung Kim" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 3672*735d6239SKiyoung Kim" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 3673*735d6239SKiyoung Kim" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 3674*735d6239SKiyoung Kim" ' prfx=^$ac_symprfx]" 3675*735d6239SKiyoung Kim else 3676*735d6239SKiyoung Kim lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 3677*735d6239SKiyoung Kim fi 3678*735d6239SKiyoung Kim lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 3679*735d6239SKiyoung Kim 3680*735d6239SKiyoung Kim # Check to see that the pipe works correctly. 3681*735d6239SKiyoung Kim pipe_works=no 3682*735d6239SKiyoung Kim 3683*735d6239SKiyoung Kim rm -f conftest* 3684*735d6239SKiyoung Kim cat > conftest.$ac_ext <<_LT_EOF 3685*735d6239SKiyoung Kim#ifdef __cplusplus 3686*735d6239SKiyoung Kimextern "C" { 3687*735d6239SKiyoung Kim#endif 3688*735d6239SKiyoung Kimchar nm_test_var; 3689*735d6239SKiyoung Kimvoid nm_test_func(void); 3690*735d6239SKiyoung Kimvoid nm_test_func(void){} 3691*735d6239SKiyoung Kim#ifdef __cplusplus 3692*735d6239SKiyoung Kim} 3693*735d6239SKiyoung Kim#endif 3694*735d6239SKiyoung Kimint main(){nm_test_var='a';nm_test_func();return(0);} 3695*735d6239SKiyoung Kim_LT_EOF 3696*735d6239SKiyoung Kim 3697*735d6239SKiyoung Kim if AC_TRY_EVAL(ac_compile); then 3698*735d6239SKiyoung Kim # Now try to grab the symbols. 3699*735d6239SKiyoung Kim nlist=conftest.nm 3700*735d6239SKiyoung Kim if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 3701*735d6239SKiyoung Kim # Try sorting and uniquifying the output. 3702*735d6239SKiyoung Kim if sort "$nlist" | uniq > "$nlist"T; then 3703*735d6239SKiyoung Kim mv -f "$nlist"T "$nlist" 3704*735d6239SKiyoung Kim else 3705*735d6239SKiyoung Kim rm -f "$nlist"T 3706*735d6239SKiyoung Kim fi 3707*735d6239SKiyoung Kim 3708*735d6239SKiyoung Kim # Make sure that we snagged all the symbols we need. 3709*735d6239SKiyoung Kim if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 3710*735d6239SKiyoung Kim if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 3711*735d6239SKiyoung Kim cat <<_LT_EOF > conftest.$ac_ext 3712*735d6239SKiyoung Kim/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 3713*735d6239SKiyoung Kim#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 3714*735d6239SKiyoung Kim/* DATA imports from DLLs on WIN32 con't be const, because runtime 3715*735d6239SKiyoung Kim relocations are performed -- see ld's documentation on pseudo-relocs. */ 3716*735d6239SKiyoung Kim# define LT@&t@_DLSYM_CONST 3717*735d6239SKiyoung Kim#elif defined(__osf__) 3718*735d6239SKiyoung Kim/* This system does not cope well with relocations in const data. */ 3719*735d6239SKiyoung Kim# define LT@&t@_DLSYM_CONST 3720*735d6239SKiyoung Kim#else 3721*735d6239SKiyoung Kim# define LT@&t@_DLSYM_CONST const 3722*735d6239SKiyoung Kim#endif 3723*735d6239SKiyoung Kim 3724*735d6239SKiyoung Kim#ifdef __cplusplus 3725*735d6239SKiyoung Kimextern "C" { 3726*735d6239SKiyoung Kim#endif 3727*735d6239SKiyoung Kim 3728*735d6239SKiyoung Kim_LT_EOF 3729*735d6239SKiyoung Kim # Now generate the symbol file. 3730*735d6239SKiyoung Kim eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 3731*735d6239SKiyoung Kim 3732*735d6239SKiyoung Kim cat <<_LT_EOF >> conftest.$ac_ext 3733*735d6239SKiyoung Kim 3734*735d6239SKiyoung Kim/* The mapping between symbol names and symbols. */ 3735*735d6239SKiyoung KimLT@&t@_DLSYM_CONST struct { 3736*735d6239SKiyoung Kim const char *name; 3737*735d6239SKiyoung Kim void *address; 3738*735d6239SKiyoung Kim} 3739*735d6239SKiyoung Kimlt__PROGRAM__LTX_preloaded_symbols[[]] = 3740*735d6239SKiyoung Kim{ 3741*735d6239SKiyoung Kim { "@PROGRAM@", (void *) 0 }, 3742*735d6239SKiyoung Kim_LT_EOF 3743*735d6239SKiyoung Kim $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 3744*735d6239SKiyoung Kim cat <<\_LT_EOF >> conftest.$ac_ext 3745*735d6239SKiyoung Kim {0, (void *) 0} 3746*735d6239SKiyoung Kim}; 3747*735d6239SKiyoung Kim 3748*735d6239SKiyoung Kim/* This works around a problem in FreeBSD linker */ 3749*735d6239SKiyoung Kim#ifdef FREEBSD_WORKAROUND 3750*735d6239SKiyoung Kimstatic const void *lt_preloaded_setup() { 3751*735d6239SKiyoung Kim return lt__PROGRAM__LTX_preloaded_symbols; 3752*735d6239SKiyoung Kim} 3753*735d6239SKiyoung Kim#endif 3754*735d6239SKiyoung Kim 3755*735d6239SKiyoung Kim#ifdef __cplusplus 3756*735d6239SKiyoung Kim} 3757*735d6239SKiyoung Kim#endif 3758*735d6239SKiyoung Kim_LT_EOF 3759*735d6239SKiyoung Kim # Now try linking the two files. 3760*735d6239SKiyoung Kim mv conftest.$ac_objext conftstm.$ac_objext 3761*735d6239SKiyoung Kim lt_globsym_save_LIBS=$LIBS 3762*735d6239SKiyoung Kim lt_globsym_save_CFLAGS=$CFLAGS 3763*735d6239SKiyoung Kim LIBS="conftstm.$ac_objext" 3764*735d6239SKiyoung Kim CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 3765*735d6239SKiyoung Kim if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 3766*735d6239SKiyoung Kim pipe_works=yes 3767*735d6239SKiyoung Kim fi 3768*735d6239SKiyoung Kim LIBS=$lt_globsym_save_LIBS 3769*735d6239SKiyoung Kim CFLAGS=$lt_globsym_save_CFLAGS 3770*735d6239SKiyoung Kim else 3771*735d6239SKiyoung Kim echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 3772*735d6239SKiyoung Kim fi 3773*735d6239SKiyoung Kim else 3774*735d6239SKiyoung Kim echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 3775*735d6239SKiyoung Kim fi 3776*735d6239SKiyoung Kim else 3777*735d6239SKiyoung Kim echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 3778*735d6239SKiyoung Kim fi 3779*735d6239SKiyoung Kim else 3780*735d6239SKiyoung Kim echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 3781*735d6239SKiyoung Kim cat conftest.$ac_ext >&5 3782*735d6239SKiyoung Kim fi 3783*735d6239SKiyoung Kim rm -rf conftest* conftst* 3784*735d6239SKiyoung Kim 3785*735d6239SKiyoung Kim # Do not use the global_symbol_pipe unless it works. 3786*735d6239SKiyoung Kim if test "$pipe_works" = yes; then 3787*735d6239SKiyoung Kim break 3788*735d6239SKiyoung Kim else 3789*735d6239SKiyoung Kim lt_cv_sys_global_symbol_pipe= 3790*735d6239SKiyoung Kim fi 3791*735d6239SKiyoung Kimdone 3792*735d6239SKiyoung Kim]) 3793*735d6239SKiyoung Kimif test -z "$lt_cv_sys_global_symbol_pipe"; then 3794*735d6239SKiyoung Kim lt_cv_sys_global_symbol_to_cdecl= 3795*735d6239SKiyoung Kimfi 3796*735d6239SKiyoung Kimif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 3797*735d6239SKiyoung Kim AC_MSG_RESULT(failed) 3798*735d6239SKiyoung Kimelse 3799*735d6239SKiyoung Kim AC_MSG_RESULT(ok) 3800*735d6239SKiyoung Kimfi 3801*735d6239SKiyoung Kim 3802*735d6239SKiyoung Kim# Response file support. 3803*735d6239SKiyoung Kimif test "$lt_cv_nm_interface" = "MS dumpbin"; then 3804*735d6239SKiyoung Kim nm_file_list_spec='@' 3805*735d6239SKiyoung Kimelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 3806*735d6239SKiyoung Kim nm_file_list_spec='@' 3807*735d6239SKiyoung Kimfi 3808*735d6239SKiyoung Kim 3809*735d6239SKiyoung Kim_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 3810*735d6239SKiyoung Kim [Take the output of nm and produce a listing of raw symbols and C names]) 3811*735d6239SKiyoung Kim_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 3812*735d6239SKiyoung Kim [Transform the output of nm in a proper C declaration]) 3813*735d6239SKiyoung Kim_LT_DECL([global_symbol_to_c_name_address], 3814*735d6239SKiyoung Kim [lt_cv_sys_global_symbol_to_c_name_address], [1], 3815*735d6239SKiyoung Kim [Transform the output of nm in a C name address pair]) 3816*735d6239SKiyoung Kim_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 3817*735d6239SKiyoung Kim [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 3818*735d6239SKiyoung Kim [Transform the output of nm in a C name address pair when lib prefix is needed]) 3819*735d6239SKiyoung Kim_LT_DECL([], [nm_file_list_spec], [1], 3820*735d6239SKiyoung Kim [Specify filename containing input files for $NM]) 3821*735d6239SKiyoung Kim]) # _LT_CMD_GLOBAL_SYMBOLS 3822*735d6239SKiyoung Kim 3823*735d6239SKiyoung Kim 3824*735d6239SKiyoung Kim# _LT_COMPILER_PIC([TAGNAME]) 3825*735d6239SKiyoung Kim# --------------------------- 3826*735d6239SKiyoung Kimm4_defun([_LT_COMPILER_PIC], 3827*735d6239SKiyoung Kim[m4_require([_LT_TAG_COMPILER])dnl 3828*735d6239SKiyoung Kim_LT_TAGVAR(lt_prog_compiler_wl, $1)= 3829*735d6239SKiyoung Kim_LT_TAGVAR(lt_prog_compiler_pic, $1)= 3830*735d6239SKiyoung Kim_LT_TAGVAR(lt_prog_compiler_static, $1)= 3831*735d6239SKiyoung Kim 3832*735d6239SKiyoung Kimm4_if([$1], [CXX], [ 3833*735d6239SKiyoung Kim # C++ specific cases for pic, static, wl, etc. 3834*735d6239SKiyoung Kim if test "$GXX" = yes; then 3835*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3836*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3837*735d6239SKiyoung Kim 3838*735d6239SKiyoung Kim case $host_os in 3839*735d6239SKiyoung Kim aix*) 3840*735d6239SKiyoung Kim # All AIX code is PIC. 3841*735d6239SKiyoung Kim if test "$host_cpu" = ia64; then 3842*735d6239SKiyoung Kim # AIX 5 now supports IA64 processor 3843*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3844*735d6239SKiyoung Kim fi 3845*735d6239SKiyoung Kim ;; 3846*735d6239SKiyoung Kim 3847*735d6239SKiyoung Kim amigaos*) 3848*735d6239SKiyoung Kim case $host_cpu in 3849*735d6239SKiyoung Kim powerpc) 3850*735d6239SKiyoung Kim # see comment about AmigaOS4 .so support 3851*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3852*735d6239SKiyoung Kim ;; 3853*735d6239SKiyoung Kim m68k) 3854*735d6239SKiyoung Kim # FIXME: we need at least 68020 code to build shared libraries, but 3855*735d6239SKiyoung Kim # adding the `-m68020' flag to GCC prevents building anything better, 3856*735d6239SKiyoung Kim # like `-m68040'. 3857*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 3858*735d6239SKiyoung Kim ;; 3859*735d6239SKiyoung Kim esac 3860*735d6239SKiyoung Kim ;; 3861*735d6239SKiyoung Kim 3862*735d6239SKiyoung Kim beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 3863*735d6239SKiyoung Kim # PIC is the default for these OSes. 3864*735d6239SKiyoung Kim ;; 3865*735d6239SKiyoung Kim mingw* | cygwin* | os2* | pw32* | cegcc*) 3866*735d6239SKiyoung Kim # This hack is so that the source file can tell whether it is being 3867*735d6239SKiyoung Kim # built for inclusion in a dll (and should export symbols for example). 3868*735d6239SKiyoung Kim # Although the cygwin gcc ignores -fPIC, still need this for old-style 3869*735d6239SKiyoung Kim # (--disable-auto-import) libraries 3870*735d6239SKiyoung Kim m4_if([$1], [GCJ], [], 3871*735d6239SKiyoung Kim [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3872*735d6239SKiyoung Kim ;; 3873*735d6239SKiyoung Kim darwin* | rhapsody*) 3874*735d6239SKiyoung Kim # PIC is the default on this platform 3875*735d6239SKiyoung Kim # Common symbols not allowed in MH_DYLIB files 3876*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 3877*735d6239SKiyoung Kim ;; 3878*735d6239SKiyoung Kim *djgpp*) 3879*735d6239SKiyoung Kim # DJGPP does not support shared libraries at all 3880*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3881*735d6239SKiyoung Kim ;; 3882*735d6239SKiyoung Kim haiku*) 3883*735d6239SKiyoung Kim # PIC is the default for Haiku. 3884*735d6239SKiyoung Kim # The "-static" flag exists, but is broken. 3885*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)= 3886*735d6239SKiyoung Kim ;; 3887*735d6239SKiyoung Kim interix[[3-9]]*) 3888*735d6239SKiyoung Kim # Interix 3.x gcc -fpic/-fPIC options generate broken code. 3889*735d6239SKiyoung Kim # Instead, we relocate shared libraries at runtime. 3890*735d6239SKiyoung Kim ;; 3891*735d6239SKiyoung Kim sysv4*MP*) 3892*735d6239SKiyoung Kim if test -d /usr/nec; then 3893*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3894*735d6239SKiyoung Kim fi 3895*735d6239SKiyoung Kim ;; 3896*735d6239SKiyoung Kim hpux*) 3897*735d6239SKiyoung Kim # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 3898*735d6239SKiyoung Kim # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 3899*735d6239SKiyoung Kim # sets the default TLS model and affects inlining. 3900*735d6239SKiyoung Kim case $host_cpu in 3901*735d6239SKiyoung Kim hppa*64*) 3902*735d6239SKiyoung Kim ;; 3903*735d6239SKiyoung Kim *) 3904*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3905*735d6239SKiyoung Kim ;; 3906*735d6239SKiyoung Kim esac 3907*735d6239SKiyoung Kim ;; 3908*735d6239SKiyoung Kim *qnx* | *nto*) 3909*735d6239SKiyoung Kim # QNX uses GNU C++, but need to define -shared option too, otherwise 3910*735d6239SKiyoung Kim # it will coredump. 3911*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3912*735d6239SKiyoung Kim ;; 3913*735d6239SKiyoung Kim *) 3914*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3915*735d6239SKiyoung Kim ;; 3916*735d6239SKiyoung Kim esac 3917*735d6239SKiyoung Kim else 3918*735d6239SKiyoung Kim case $host_os in 3919*735d6239SKiyoung Kim aix[[4-9]]*) 3920*735d6239SKiyoung Kim # All AIX code is PIC. 3921*735d6239SKiyoung Kim if test "$host_cpu" = ia64; then 3922*735d6239SKiyoung Kim # AIX 5 now supports IA64 processor 3923*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3924*735d6239SKiyoung Kim else 3925*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 3926*735d6239SKiyoung Kim fi 3927*735d6239SKiyoung Kim ;; 3928*735d6239SKiyoung Kim chorus*) 3929*735d6239SKiyoung Kim case $cc_basename in 3930*735d6239SKiyoung Kim cxch68*) 3931*735d6239SKiyoung Kim # Green Hills C++ Compiler 3932*735d6239SKiyoung Kim # _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" 3933*735d6239SKiyoung Kim ;; 3934*735d6239SKiyoung Kim esac 3935*735d6239SKiyoung Kim ;; 3936*735d6239SKiyoung Kim mingw* | cygwin* | os2* | pw32* | cegcc*) 3937*735d6239SKiyoung Kim # This hack is so that the source file can tell whether it is being 3938*735d6239SKiyoung Kim # built for inclusion in a dll (and should export symbols for example). 3939*735d6239SKiyoung Kim m4_if([$1], [GCJ], [], 3940*735d6239SKiyoung Kim [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3941*735d6239SKiyoung Kim ;; 3942*735d6239SKiyoung Kim dgux*) 3943*735d6239SKiyoung Kim case $cc_basename in 3944*735d6239SKiyoung Kim ec++*) 3945*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3946*735d6239SKiyoung Kim ;; 3947*735d6239SKiyoung Kim ghcx*) 3948*735d6239SKiyoung Kim # Green Hills C++ Compiler 3949*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3950*735d6239SKiyoung Kim ;; 3951*735d6239SKiyoung Kim *) 3952*735d6239SKiyoung Kim ;; 3953*735d6239SKiyoung Kim esac 3954*735d6239SKiyoung Kim ;; 3955*735d6239SKiyoung Kim freebsd* | dragonfly*) 3956*735d6239SKiyoung Kim # FreeBSD uses GNU C++ 3957*735d6239SKiyoung Kim ;; 3958*735d6239SKiyoung Kim hpux9* | hpux10* | hpux11*) 3959*735d6239SKiyoung Kim case $cc_basename in 3960*735d6239SKiyoung Kim CC*) 3961*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3962*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3963*735d6239SKiyoung Kim if test "$host_cpu" != ia64; then 3964*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3965*735d6239SKiyoung Kim fi 3966*735d6239SKiyoung Kim ;; 3967*735d6239SKiyoung Kim aCC*) 3968*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3969*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3970*735d6239SKiyoung Kim case $host_cpu in 3971*735d6239SKiyoung Kim hppa*64*|ia64*) 3972*735d6239SKiyoung Kim # +Z the default 3973*735d6239SKiyoung Kim ;; 3974*735d6239SKiyoung Kim *) 3975*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3976*735d6239SKiyoung Kim ;; 3977*735d6239SKiyoung Kim esac 3978*735d6239SKiyoung Kim ;; 3979*735d6239SKiyoung Kim *) 3980*735d6239SKiyoung Kim ;; 3981*735d6239SKiyoung Kim esac 3982*735d6239SKiyoung Kim ;; 3983*735d6239SKiyoung Kim interix*) 3984*735d6239SKiyoung Kim # This is c89, which is MS Visual C++ (no shared libs) 3985*735d6239SKiyoung Kim # Anyone wants to do a port? 3986*735d6239SKiyoung Kim ;; 3987*735d6239SKiyoung Kim irix5* | irix6* | nonstopux*) 3988*735d6239SKiyoung Kim case $cc_basename in 3989*735d6239SKiyoung Kim CC*) 3990*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3991*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3992*735d6239SKiyoung Kim # CC pic flag -KPIC is the default. 3993*735d6239SKiyoung Kim ;; 3994*735d6239SKiyoung Kim *) 3995*735d6239SKiyoung Kim ;; 3996*735d6239SKiyoung Kim esac 3997*735d6239SKiyoung Kim ;; 3998*735d6239SKiyoung Kim linux* | k*bsd*-gnu | kopensolaris*-gnu) 3999*735d6239SKiyoung Kim case $cc_basename in 4000*735d6239SKiyoung Kim KCC*) 4001*735d6239SKiyoung Kim # KAI C++ Compiler 4002*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4003*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4004*735d6239SKiyoung Kim ;; 4005*735d6239SKiyoung Kim ecpc* ) 4006*735d6239SKiyoung Kim # old Intel C++ for x86_64 which still supported -KPIC. 4007*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4008*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4009*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4010*735d6239SKiyoung Kim ;; 4011*735d6239SKiyoung Kim icpc* ) 4012*735d6239SKiyoung Kim # Intel C++, used to be incompatible with GCC. 4013*735d6239SKiyoung Kim # ICC 10 doesn't accept -KPIC any more. 4014*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4015*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4016*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4017*735d6239SKiyoung Kim ;; 4018*735d6239SKiyoung Kim pgCC* | pgcpp*) 4019*735d6239SKiyoung Kim # Portland Group C++ compiler 4020*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4021*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4022*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4023*735d6239SKiyoung Kim ;; 4024*735d6239SKiyoung Kim cxx*) 4025*735d6239SKiyoung Kim # Compaq C++ 4026*735d6239SKiyoung Kim # Make sure the PIC flag is empty. It appears that all Alpha 4027*735d6239SKiyoung Kim # Linux and Compaq Tru64 Unix objects are PIC. 4028*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4029*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4030*735d6239SKiyoung Kim ;; 4031*735d6239SKiyoung Kim xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4032*735d6239SKiyoung Kim # IBM XL 8.0, 9.0 on PPC and BlueGene 4033*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4034*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4035*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4036*735d6239SKiyoung Kim ;; 4037*735d6239SKiyoung Kim *) 4038*735d6239SKiyoung Kim case `$CC -V 2>&1 | sed 5q` in 4039*735d6239SKiyoung Kim *Sun\ C*) 4040*735d6239SKiyoung Kim # Sun C++ 5.9 4041*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4042*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4043*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4044*735d6239SKiyoung Kim ;; 4045*735d6239SKiyoung Kim esac 4046*735d6239SKiyoung Kim ;; 4047*735d6239SKiyoung Kim esac 4048*735d6239SKiyoung Kim ;; 4049*735d6239SKiyoung Kim lynxos*) 4050*735d6239SKiyoung Kim ;; 4051*735d6239SKiyoung Kim m88k*) 4052*735d6239SKiyoung Kim ;; 4053*735d6239SKiyoung Kim mvs*) 4054*735d6239SKiyoung Kim case $cc_basename in 4055*735d6239SKiyoung Kim cxx*) 4056*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4057*735d6239SKiyoung Kim ;; 4058*735d6239SKiyoung Kim *) 4059*735d6239SKiyoung Kim ;; 4060*735d6239SKiyoung Kim esac 4061*735d6239SKiyoung Kim ;; 4062*735d6239SKiyoung Kim netbsd*) 4063*735d6239SKiyoung Kim ;; 4064*735d6239SKiyoung Kim *qnx* | *nto*) 4065*735d6239SKiyoung Kim # QNX uses GNU C++, but need to define -shared option too, otherwise 4066*735d6239SKiyoung Kim # it will coredump. 4067*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4068*735d6239SKiyoung Kim ;; 4069*735d6239SKiyoung Kim osf3* | osf4* | osf5*) 4070*735d6239SKiyoung Kim case $cc_basename in 4071*735d6239SKiyoung Kim KCC*) 4072*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4073*735d6239SKiyoung Kim ;; 4074*735d6239SKiyoung Kim RCC*) 4075*735d6239SKiyoung Kim # Rational C++ 2.4.1 4076*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4077*735d6239SKiyoung Kim ;; 4078*735d6239SKiyoung Kim cxx*) 4079*735d6239SKiyoung Kim # Digital/Compaq C++ 4080*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4081*735d6239SKiyoung Kim # Make sure the PIC flag is empty. It appears that all Alpha 4082*735d6239SKiyoung Kim # Linux and Compaq Tru64 Unix objects are PIC. 4083*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4084*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4085*735d6239SKiyoung Kim ;; 4086*735d6239SKiyoung Kim *) 4087*735d6239SKiyoung Kim ;; 4088*735d6239SKiyoung Kim esac 4089*735d6239SKiyoung Kim ;; 4090*735d6239SKiyoung Kim psos*) 4091*735d6239SKiyoung Kim ;; 4092*735d6239SKiyoung Kim solaris*) 4093*735d6239SKiyoung Kim case $cc_basename in 4094*735d6239SKiyoung Kim CC* | sunCC*) 4095*735d6239SKiyoung Kim # Sun C++ 4.2, 5.x and Centerline C++ 4096*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4097*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4098*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4099*735d6239SKiyoung Kim ;; 4100*735d6239SKiyoung Kim gcx*) 4101*735d6239SKiyoung Kim # Green Hills C++ Compiler 4102*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4103*735d6239SKiyoung Kim ;; 4104*735d6239SKiyoung Kim *) 4105*735d6239SKiyoung Kim ;; 4106*735d6239SKiyoung Kim esac 4107*735d6239SKiyoung Kim ;; 4108*735d6239SKiyoung Kim sunos4*) 4109*735d6239SKiyoung Kim case $cc_basename in 4110*735d6239SKiyoung Kim CC*) 4111*735d6239SKiyoung Kim # Sun C++ 4.x 4112*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4113*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4114*735d6239SKiyoung Kim ;; 4115*735d6239SKiyoung Kim lcc*) 4116*735d6239SKiyoung Kim # Lucid 4117*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4118*735d6239SKiyoung Kim ;; 4119*735d6239SKiyoung Kim *) 4120*735d6239SKiyoung Kim ;; 4121*735d6239SKiyoung Kim esac 4122*735d6239SKiyoung Kim ;; 4123*735d6239SKiyoung Kim sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4124*735d6239SKiyoung Kim case $cc_basename in 4125*735d6239SKiyoung Kim CC*) 4126*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4127*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4128*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4129*735d6239SKiyoung Kim ;; 4130*735d6239SKiyoung Kim esac 4131*735d6239SKiyoung Kim ;; 4132*735d6239SKiyoung Kim tandem*) 4133*735d6239SKiyoung Kim case $cc_basename in 4134*735d6239SKiyoung Kim NCC*) 4135*735d6239SKiyoung Kim # NonStop-UX NCC 3.20 4136*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4137*735d6239SKiyoung Kim ;; 4138*735d6239SKiyoung Kim *) 4139*735d6239SKiyoung Kim ;; 4140*735d6239SKiyoung Kim esac 4141*735d6239SKiyoung Kim ;; 4142*735d6239SKiyoung Kim vxworks*) 4143*735d6239SKiyoung Kim ;; 4144*735d6239SKiyoung Kim *) 4145*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4146*735d6239SKiyoung Kim ;; 4147*735d6239SKiyoung Kim esac 4148*735d6239SKiyoung Kim fi 4149*735d6239SKiyoung Kim], 4150*735d6239SKiyoung Kim[ 4151*735d6239SKiyoung Kim if test "$GCC" = yes; then 4152*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4153*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4154*735d6239SKiyoung Kim 4155*735d6239SKiyoung Kim case $host_os in 4156*735d6239SKiyoung Kim aix*) 4157*735d6239SKiyoung Kim # All AIX code is PIC. 4158*735d6239SKiyoung Kim if test "$host_cpu" = ia64; then 4159*735d6239SKiyoung Kim # AIX 5 now supports IA64 processor 4160*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4161*735d6239SKiyoung Kim fi 4162*735d6239SKiyoung Kim ;; 4163*735d6239SKiyoung Kim 4164*735d6239SKiyoung Kim amigaos*) 4165*735d6239SKiyoung Kim case $host_cpu in 4166*735d6239SKiyoung Kim powerpc) 4167*735d6239SKiyoung Kim # see comment about AmigaOS4 .so support 4168*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4169*735d6239SKiyoung Kim ;; 4170*735d6239SKiyoung Kim m68k) 4171*735d6239SKiyoung Kim # FIXME: we need at least 68020 code to build shared libraries, but 4172*735d6239SKiyoung Kim # adding the `-m68020' flag to GCC prevents building anything better, 4173*735d6239SKiyoung Kim # like `-m68040'. 4174*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4175*735d6239SKiyoung Kim ;; 4176*735d6239SKiyoung Kim esac 4177*735d6239SKiyoung Kim ;; 4178*735d6239SKiyoung Kim 4179*735d6239SKiyoung Kim beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4180*735d6239SKiyoung Kim # PIC is the default for these OSes. 4181*735d6239SKiyoung Kim ;; 4182*735d6239SKiyoung Kim 4183*735d6239SKiyoung Kim mingw* | cygwin* | pw32* | os2* | cegcc*) 4184*735d6239SKiyoung Kim # This hack is so that the source file can tell whether it is being 4185*735d6239SKiyoung Kim # built for inclusion in a dll (and should export symbols for example). 4186*735d6239SKiyoung Kim # Although the cygwin gcc ignores -fPIC, still need this for old-style 4187*735d6239SKiyoung Kim # (--disable-auto-import) libraries 4188*735d6239SKiyoung Kim m4_if([$1], [GCJ], [], 4189*735d6239SKiyoung Kim [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4190*735d6239SKiyoung Kim ;; 4191*735d6239SKiyoung Kim 4192*735d6239SKiyoung Kim darwin* | rhapsody*) 4193*735d6239SKiyoung Kim # PIC is the default on this platform 4194*735d6239SKiyoung Kim # Common symbols not allowed in MH_DYLIB files 4195*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4196*735d6239SKiyoung Kim ;; 4197*735d6239SKiyoung Kim 4198*735d6239SKiyoung Kim haiku*) 4199*735d6239SKiyoung Kim # PIC is the default for Haiku. 4200*735d6239SKiyoung Kim # The "-static" flag exists, but is broken. 4201*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)= 4202*735d6239SKiyoung Kim ;; 4203*735d6239SKiyoung Kim 4204*735d6239SKiyoung Kim hpux*) 4205*735d6239SKiyoung Kim # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4206*735d6239SKiyoung Kim # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4207*735d6239SKiyoung Kim # sets the default TLS model and affects inlining. 4208*735d6239SKiyoung Kim case $host_cpu in 4209*735d6239SKiyoung Kim hppa*64*) 4210*735d6239SKiyoung Kim # +Z the default 4211*735d6239SKiyoung Kim ;; 4212*735d6239SKiyoung Kim *) 4213*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4214*735d6239SKiyoung Kim ;; 4215*735d6239SKiyoung Kim esac 4216*735d6239SKiyoung Kim ;; 4217*735d6239SKiyoung Kim 4218*735d6239SKiyoung Kim interix[[3-9]]*) 4219*735d6239SKiyoung Kim # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4220*735d6239SKiyoung Kim # Instead, we relocate shared libraries at runtime. 4221*735d6239SKiyoung Kim ;; 4222*735d6239SKiyoung Kim 4223*735d6239SKiyoung Kim msdosdjgpp*) 4224*735d6239SKiyoung Kim # Just because we use GCC doesn't mean we suddenly get shared libraries 4225*735d6239SKiyoung Kim # on systems that don't support them. 4226*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4227*735d6239SKiyoung Kim enable_shared=no 4228*735d6239SKiyoung Kim ;; 4229*735d6239SKiyoung Kim 4230*735d6239SKiyoung Kim *nto* | *qnx*) 4231*735d6239SKiyoung Kim # QNX uses GNU C++, but need to define -shared option too, otherwise 4232*735d6239SKiyoung Kim # it will coredump. 4233*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4234*735d6239SKiyoung Kim ;; 4235*735d6239SKiyoung Kim 4236*735d6239SKiyoung Kim sysv4*MP*) 4237*735d6239SKiyoung Kim if test -d /usr/nec; then 4238*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4239*735d6239SKiyoung Kim fi 4240*735d6239SKiyoung Kim ;; 4241*735d6239SKiyoung Kim 4242*735d6239SKiyoung Kim *) 4243*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4244*735d6239SKiyoung Kim ;; 4245*735d6239SKiyoung Kim esac 4246*735d6239SKiyoung Kim 4247*735d6239SKiyoung Kim case $cc_basename in 4248*735d6239SKiyoung Kim nvcc*) # Cuda Compiler Driver 2.2 4249*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4250*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' 4251*735d6239SKiyoung Kim ;; 4252*735d6239SKiyoung Kim esac 4253*735d6239SKiyoung Kim else 4254*735d6239SKiyoung Kim # PORTME Check for flag to pass linker flags through the system compiler. 4255*735d6239SKiyoung Kim case $host_os in 4256*735d6239SKiyoung Kim aix*) 4257*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4258*735d6239SKiyoung Kim if test "$host_cpu" = ia64; then 4259*735d6239SKiyoung Kim # AIX 5 now supports IA64 processor 4260*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4261*735d6239SKiyoung Kim else 4262*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4263*735d6239SKiyoung Kim fi 4264*735d6239SKiyoung Kim ;; 4265*735d6239SKiyoung Kim 4266*735d6239SKiyoung Kim mingw* | cygwin* | pw32* | os2* | cegcc*) 4267*735d6239SKiyoung Kim # This hack is so that the source file can tell whether it is being 4268*735d6239SKiyoung Kim # built for inclusion in a dll (and should export symbols for example). 4269*735d6239SKiyoung Kim m4_if([$1], [GCJ], [], 4270*735d6239SKiyoung Kim [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4271*735d6239SKiyoung Kim ;; 4272*735d6239SKiyoung Kim 4273*735d6239SKiyoung Kim hpux9* | hpux10* | hpux11*) 4274*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4275*735d6239SKiyoung Kim # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4276*735d6239SKiyoung Kim # not for PA HP-UX. 4277*735d6239SKiyoung Kim case $host_cpu in 4278*735d6239SKiyoung Kim hppa*64*|ia64*) 4279*735d6239SKiyoung Kim # +Z the default 4280*735d6239SKiyoung Kim ;; 4281*735d6239SKiyoung Kim *) 4282*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4283*735d6239SKiyoung Kim ;; 4284*735d6239SKiyoung Kim esac 4285*735d6239SKiyoung Kim # Is there a better lt_prog_compiler_static that works with the bundled CC? 4286*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4287*735d6239SKiyoung Kim ;; 4288*735d6239SKiyoung Kim 4289*735d6239SKiyoung Kim irix5* | irix6* | nonstopux*) 4290*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4291*735d6239SKiyoung Kim # PIC (with -KPIC) is the default. 4292*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4293*735d6239SKiyoung Kim ;; 4294*735d6239SKiyoung Kim 4295*735d6239SKiyoung Kim linux* | k*bsd*-gnu | kopensolaris*-gnu) 4296*735d6239SKiyoung Kim case $cc_basename in 4297*735d6239SKiyoung Kim # old Intel for x86_64 which still supported -KPIC. 4298*735d6239SKiyoung Kim ecc*) 4299*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4300*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4301*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4302*735d6239SKiyoung Kim ;; 4303*735d6239SKiyoung Kim # icc used to be incompatible with GCC. 4304*735d6239SKiyoung Kim # ICC 10 doesn't accept -KPIC any more. 4305*735d6239SKiyoung Kim icc* | ifort*) 4306*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4307*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4308*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4309*735d6239SKiyoung Kim ;; 4310*735d6239SKiyoung Kim # Lahey Fortran 8.1. 4311*735d6239SKiyoung Kim lf95*) 4312*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4313*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4314*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4315*735d6239SKiyoung Kim ;; 4316*735d6239SKiyoung Kim nagfor*) 4317*735d6239SKiyoung Kim # NAG Fortran compiler 4318*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4319*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4320*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4321*735d6239SKiyoung Kim ;; 4322*735d6239SKiyoung Kim pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4323*735d6239SKiyoung Kim # Portland Group compilers (*not* the Pentium gcc compiler, 4324*735d6239SKiyoung Kim # which looks to be a dead project) 4325*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4326*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4327*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4328*735d6239SKiyoung Kim ;; 4329*735d6239SKiyoung Kim ccc*) 4330*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4331*735d6239SKiyoung Kim # All Alpha code is PIC. 4332*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4333*735d6239SKiyoung Kim ;; 4334*735d6239SKiyoung Kim xl* | bgxl* | bgf* | mpixl*) 4335*735d6239SKiyoung Kim # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4336*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4337*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4338*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4339*735d6239SKiyoung Kim ;; 4340*735d6239SKiyoung Kim *) 4341*735d6239SKiyoung Kim case `$CC -V 2>&1 | sed 5q` in 4342*735d6239SKiyoung Kim *Sun\ F* | *Sun*Fortran*) 4343*735d6239SKiyoung Kim # Sun Fortran 8.3 passes all unrecognized flags to the linker 4344*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4345*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4346*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4347*735d6239SKiyoung Kim ;; 4348*735d6239SKiyoung Kim *Sun\ C*) 4349*735d6239SKiyoung Kim # Sun C 5.9 4350*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4351*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4352*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4353*735d6239SKiyoung Kim ;; 4354*735d6239SKiyoung Kim esac 4355*735d6239SKiyoung Kim ;; 4356*735d6239SKiyoung Kim esac 4357*735d6239SKiyoung Kim ;; 4358*735d6239SKiyoung Kim 4359*735d6239SKiyoung Kim newsos6) 4360*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4361*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4362*735d6239SKiyoung Kim ;; 4363*735d6239SKiyoung Kim 4364*735d6239SKiyoung Kim *nto* | *qnx*) 4365*735d6239SKiyoung Kim # QNX uses GNU C++, but need to define -shared option too, otherwise 4366*735d6239SKiyoung Kim # it will coredump. 4367*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4368*735d6239SKiyoung Kim ;; 4369*735d6239SKiyoung Kim 4370*735d6239SKiyoung Kim osf3* | osf4* | osf5*) 4371*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4372*735d6239SKiyoung Kim # All OSF/1 code is PIC. 4373*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4374*735d6239SKiyoung Kim ;; 4375*735d6239SKiyoung Kim 4376*735d6239SKiyoung Kim rdos*) 4377*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4378*735d6239SKiyoung Kim ;; 4379*735d6239SKiyoung Kim 4380*735d6239SKiyoung Kim solaris*) 4381*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4382*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4383*735d6239SKiyoung Kim case $cc_basename in 4384*735d6239SKiyoung Kim f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4385*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4386*735d6239SKiyoung Kim *) 4387*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4388*735d6239SKiyoung Kim esac 4389*735d6239SKiyoung Kim ;; 4390*735d6239SKiyoung Kim 4391*735d6239SKiyoung Kim sunos4*) 4392*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4393*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4394*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4395*735d6239SKiyoung Kim ;; 4396*735d6239SKiyoung Kim 4397*735d6239SKiyoung Kim sysv4 | sysv4.2uw2* | sysv4.3*) 4398*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4399*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4400*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4401*735d6239SKiyoung Kim ;; 4402*735d6239SKiyoung Kim 4403*735d6239SKiyoung Kim sysv4*MP*) 4404*735d6239SKiyoung Kim if test -d /usr/nec ;then 4405*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4406*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4407*735d6239SKiyoung Kim fi 4408*735d6239SKiyoung Kim ;; 4409*735d6239SKiyoung Kim 4410*735d6239SKiyoung Kim sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4411*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4412*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4413*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4414*735d6239SKiyoung Kim ;; 4415*735d6239SKiyoung Kim 4416*735d6239SKiyoung Kim unicos*) 4417*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4418*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4419*735d6239SKiyoung Kim ;; 4420*735d6239SKiyoung Kim 4421*735d6239SKiyoung Kim uts4*) 4422*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4423*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4424*735d6239SKiyoung Kim ;; 4425*735d6239SKiyoung Kim 4426*735d6239SKiyoung Kim *) 4427*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4428*735d6239SKiyoung Kim ;; 4429*735d6239SKiyoung Kim esac 4430*735d6239SKiyoung Kim fi 4431*735d6239SKiyoung Kim]) 4432*735d6239SKiyoung Kimcase $host_os in 4433*735d6239SKiyoung Kim # For platforms which do not support PIC, -DPIC is meaningless: 4434*735d6239SKiyoung Kim *djgpp*) 4435*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4436*735d6239SKiyoung Kim ;; 4437*735d6239SKiyoung Kim *) 4438*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4439*735d6239SKiyoung Kim ;; 4440*735d6239SKiyoung Kimesac 4441*735d6239SKiyoung Kim 4442*735d6239SKiyoung KimAC_CACHE_CHECK([for $compiler option to produce PIC], 4443*735d6239SKiyoung Kim [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4444*735d6239SKiyoung Kim [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4445*735d6239SKiyoung Kim_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4446*735d6239SKiyoung Kim 4447*735d6239SKiyoung Kim# 4448*735d6239SKiyoung Kim# Check to make sure the PIC flag actually works. 4449*735d6239SKiyoung Kim# 4450*735d6239SKiyoung Kimif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4451*735d6239SKiyoung Kim _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4452*735d6239SKiyoung Kim [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4453*735d6239SKiyoung Kim [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4454*735d6239SKiyoung Kim [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4455*735d6239SKiyoung Kim "" | " "*) ;; 4456*735d6239SKiyoung Kim *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4457*735d6239SKiyoung Kim esac], 4458*735d6239SKiyoung Kim [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4459*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4460*735d6239SKiyoung Kimfi 4461*735d6239SKiyoung Kim_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4462*735d6239SKiyoung Kim [Additional compiler flags for building library objects]) 4463*735d6239SKiyoung Kim 4464*735d6239SKiyoung Kim_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4465*735d6239SKiyoung Kim [How to pass a linker flag through the compiler]) 4466*735d6239SKiyoung Kim# 4467*735d6239SKiyoung Kim# Check to make sure the static flag actually works. 4468*735d6239SKiyoung Kim# 4469*735d6239SKiyoung Kimwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4470*735d6239SKiyoung Kim_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4471*735d6239SKiyoung Kim _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4472*735d6239SKiyoung Kim $lt_tmp_static_flag, 4473*735d6239SKiyoung Kim [], 4474*735d6239SKiyoung Kim [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4475*735d6239SKiyoung Kim_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4476*735d6239SKiyoung Kim [Compiler flag to prevent dynamic linking]) 4477*735d6239SKiyoung Kim])# _LT_COMPILER_PIC 4478*735d6239SKiyoung Kim 4479*735d6239SKiyoung Kim 4480*735d6239SKiyoung Kim# _LT_LINKER_SHLIBS([TAGNAME]) 4481*735d6239SKiyoung Kim# ---------------------------- 4482*735d6239SKiyoung Kim# See if the linker supports building shared libraries. 4483*735d6239SKiyoung Kimm4_defun([_LT_LINKER_SHLIBS], 4484*735d6239SKiyoung Kim[AC_REQUIRE([LT_PATH_LD])dnl 4485*735d6239SKiyoung KimAC_REQUIRE([LT_PATH_NM])dnl 4486*735d6239SKiyoung Kimm4_require([_LT_PATH_MANIFEST_TOOL])dnl 4487*735d6239SKiyoung Kimm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4488*735d6239SKiyoung Kimm4_require([_LT_DECL_EGREP])dnl 4489*735d6239SKiyoung Kimm4_require([_LT_DECL_SED])dnl 4490*735d6239SKiyoung Kimm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4491*735d6239SKiyoung Kimm4_require([_LT_TAG_COMPILER])dnl 4492*735d6239SKiyoung KimAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4493*735d6239SKiyoung Kimm4_if([$1], [CXX], [ 4494*735d6239SKiyoung Kim _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4495*735d6239SKiyoung Kim _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4496*735d6239SKiyoung Kim case $host_os in 4497*735d6239SKiyoung Kim aix[[4-9]]*) 4498*735d6239SKiyoung Kim # If we're using GNU nm, then we don't want the "-C" option. 4499*735d6239SKiyoung Kim # -C means demangle to AIX nm, but means don't demangle with GNU nm 4500*735d6239SKiyoung Kim # Also, AIX nm treats weak defined symbols like other global defined 4501*735d6239SKiyoung Kim # symbols, whereas GNU nm marks them as "W". 4502*735d6239SKiyoung Kim if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4503*735d6239SKiyoung Kim _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' 4504*735d6239SKiyoung Kim else 4505*735d6239SKiyoung Kim _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' 4506*735d6239SKiyoung Kim fi 4507*735d6239SKiyoung Kim ;; 4508*735d6239SKiyoung Kim pw32*) 4509*735d6239SKiyoung Kim _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 4510*735d6239SKiyoung Kim ;; 4511*735d6239SKiyoung Kim cygwin* | mingw* | cegcc*) 4512*735d6239SKiyoung Kim case $cc_basename in 4513*735d6239SKiyoung Kim cl*) ;; 4514*735d6239SKiyoung Kim *) 4515*735d6239SKiyoung Kim _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' 4516*735d6239SKiyoung Kim _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4517*735d6239SKiyoung Kim ;; 4518*735d6239SKiyoung Kim esac 4519*735d6239SKiyoung Kim ;; 4520*735d6239SKiyoung Kim linux* | k*bsd*-gnu) 4521*735d6239SKiyoung Kim _LT_TAGVAR(link_all_deplibs, $1)=no 4522*735d6239SKiyoung Kim ;; 4523*735d6239SKiyoung Kim *) 4524*735d6239SKiyoung Kim _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4525*735d6239SKiyoung Kim ;; 4526*735d6239SKiyoung Kim esac 4527*735d6239SKiyoung Kim], [ 4528*735d6239SKiyoung Kim runpath_var= 4529*735d6239SKiyoung Kim _LT_TAGVAR(allow_undefined_flag, $1)= 4530*735d6239SKiyoung Kim _LT_TAGVAR(always_export_symbols, $1)=no 4531*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)= 4532*735d6239SKiyoung Kim _LT_TAGVAR(archive_expsym_cmds, $1)= 4533*735d6239SKiyoung Kim _LT_TAGVAR(compiler_needs_object, $1)=no 4534*735d6239SKiyoung Kim _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4535*735d6239SKiyoung Kim _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4536*735d6239SKiyoung Kim _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4537*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_automatic, $1)=no 4538*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct, $1)=no 4539*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4540*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4541*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 4542*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_separator, $1)= 4543*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_minus_L, $1)=no 4544*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4545*735d6239SKiyoung Kim _LT_TAGVAR(inherit_rpath, $1)=no 4546*735d6239SKiyoung Kim _LT_TAGVAR(link_all_deplibs, $1)=unknown 4547*735d6239SKiyoung Kim _LT_TAGVAR(module_cmds, $1)= 4548*735d6239SKiyoung Kim _LT_TAGVAR(module_expsym_cmds, $1)= 4549*735d6239SKiyoung Kim _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4550*735d6239SKiyoung Kim _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4551*735d6239SKiyoung Kim _LT_TAGVAR(thread_safe_flag_spec, $1)= 4552*735d6239SKiyoung Kim _LT_TAGVAR(whole_archive_flag_spec, $1)= 4553*735d6239SKiyoung Kim # include_expsyms should be a list of space-separated symbols to be *always* 4554*735d6239SKiyoung Kim # included in the symbol list 4555*735d6239SKiyoung Kim _LT_TAGVAR(include_expsyms, $1)= 4556*735d6239SKiyoung Kim # exclude_expsyms can be an extended regexp of symbols to exclude 4557*735d6239SKiyoung Kim # it will be wrapped by ` (' and `)$', so one must not match beginning or 4558*735d6239SKiyoung Kim # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 4559*735d6239SKiyoung Kim # as well as any symbol that contains `d'. 4560*735d6239SKiyoung Kim _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4561*735d6239SKiyoung Kim # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 4562*735d6239SKiyoung Kim # platforms (ab)use it in PIC code, but their linkers get confused if 4563*735d6239SKiyoung Kim # the symbol is explicitly referenced. Since portable code cannot 4564*735d6239SKiyoung Kim # rely on this symbol name, it's probably fine to never include it in 4565*735d6239SKiyoung Kim # preloaded symbol tables. 4566*735d6239SKiyoung Kim # Exclude shared library initialization/finalization symbols. 4567*735d6239SKiyoung Kimdnl Note also adjust exclude_expsyms for C++ above. 4568*735d6239SKiyoung Kim extract_expsyms_cmds= 4569*735d6239SKiyoung Kim 4570*735d6239SKiyoung Kim case $host_os in 4571*735d6239SKiyoung Kim cygwin* | mingw* | pw32* | cegcc*) 4572*735d6239SKiyoung Kim # FIXME: the MSVC++ port hasn't been tested in a loooong time 4573*735d6239SKiyoung Kim # When not using gcc, we currently assume that we are using 4574*735d6239SKiyoung Kim # Microsoft Visual C++. 4575*735d6239SKiyoung Kim if test "$GCC" != yes; then 4576*735d6239SKiyoung Kim with_gnu_ld=no 4577*735d6239SKiyoung Kim fi 4578*735d6239SKiyoung Kim ;; 4579*735d6239SKiyoung Kim interix*) 4580*735d6239SKiyoung Kim # we just hope/assume this is gcc and not c89 (= MSVC++) 4581*735d6239SKiyoung Kim with_gnu_ld=yes 4582*735d6239SKiyoung Kim ;; 4583*735d6239SKiyoung Kim openbsd*) 4584*735d6239SKiyoung Kim with_gnu_ld=no 4585*735d6239SKiyoung Kim ;; 4586*735d6239SKiyoung Kim esac 4587*735d6239SKiyoung Kim 4588*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=yes 4589*735d6239SKiyoung Kim 4590*735d6239SKiyoung Kim # On some targets, GNU ld is compatible enough with the native linker 4591*735d6239SKiyoung Kim # that we're better off using the native interface for both. 4592*735d6239SKiyoung Kim lt_use_gnu_ld_interface=no 4593*735d6239SKiyoung Kim if test "$with_gnu_ld" = yes; then 4594*735d6239SKiyoung Kim case $host_os in 4595*735d6239SKiyoung Kim aix*) 4596*735d6239SKiyoung Kim # The AIX port of GNU ld has always aspired to compatibility 4597*735d6239SKiyoung Kim # with the native linker. However, as the warning in the GNU ld 4598*735d6239SKiyoung Kim # block says, versions before 2.19.5* couldn't really create working 4599*735d6239SKiyoung Kim # shared libraries, regardless of the interface used. 4600*735d6239SKiyoung Kim case `$LD -v 2>&1` in 4601*735d6239SKiyoung Kim *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 4602*735d6239SKiyoung Kim *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 4603*735d6239SKiyoung Kim *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 4604*735d6239SKiyoung Kim *) 4605*735d6239SKiyoung Kim lt_use_gnu_ld_interface=yes 4606*735d6239SKiyoung Kim ;; 4607*735d6239SKiyoung Kim esac 4608*735d6239SKiyoung Kim ;; 4609*735d6239SKiyoung Kim *) 4610*735d6239SKiyoung Kim lt_use_gnu_ld_interface=yes 4611*735d6239SKiyoung Kim ;; 4612*735d6239SKiyoung Kim esac 4613*735d6239SKiyoung Kim fi 4614*735d6239SKiyoung Kim 4615*735d6239SKiyoung Kim if test "$lt_use_gnu_ld_interface" = yes; then 4616*735d6239SKiyoung Kim # If archive_cmds runs LD, not CC, wlarc should be empty 4617*735d6239SKiyoung Kim wlarc='${wl}' 4618*735d6239SKiyoung Kim 4619*735d6239SKiyoung Kim # Set some defaults for GNU ld with shared library support. These 4620*735d6239SKiyoung Kim # are reset later if shared libraries are not supported. Putting them 4621*735d6239SKiyoung Kim # here allows them to be overridden if necessary. 4622*735d6239SKiyoung Kim runpath_var=LD_RUN_PATH 4623*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4624*735d6239SKiyoung Kim _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4625*735d6239SKiyoung Kim # ancient GNU ld didn't support --whole-archive et. al. 4626*735d6239SKiyoung Kim if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 4627*735d6239SKiyoung Kim _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 4628*735d6239SKiyoung Kim else 4629*735d6239SKiyoung Kim _LT_TAGVAR(whole_archive_flag_spec, $1)= 4630*735d6239SKiyoung Kim fi 4631*735d6239SKiyoung Kim supports_anon_versioning=no 4632*735d6239SKiyoung Kim case `$LD -v 2>&1` in 4633*735d6239SKiyoung Kim *GNU\ gold*) supports_anon_versioning=yes ;; 4634*735d6239SKiyoung Kim *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 4635*735d6239SKiyoung Kim *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 4636*735d6239SKiyoung Kim *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 4637*735d6239SKiyoung Kim *\ 2.11.*) ;; # other 2.11 versions 4638*735d6239SKiyoung Kim *) supports_anon_versioning=yes ;; 4639*735d6239SKiyoung Kim esac 4640*735d6239SKiyoung Kim 4641*735d6239SKiyoung Kim # See if GNU ld supports shared libraries. 4642*735d6239SKiyoung Kim case $host_os in 4643*735d6239SKiyoung Kim aix[[3-9]]*) 4644*735d6239SKiyoung Kim # On AIX/PPC, the GNU linker is very broken 4645*735d6239SKiyoung Kim if test "$host_cpu" != ia64; then 4646*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 4647*735d6239SKiyoung Kim cat <<_LT_EOF 1>&2 4648*735d6239SKiyoung Kim 4649*735d6239SKiyoung Kim*** Warning: the GNU linker, at least up to release 2.19, is reported 4650*735d6239SKiyoung Kim*** to be unable to reliably create shared libraries on AIX. 4651*735d6239SKiyoung Kim*** Therefore, libtool is disabling shared libraries support. If you 4652*735d6239SKiyoung Kim*** really care for shared libraries, you may want to install binutils 4653*735d6239SKiyoung Kim*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 4654*735d6239SKiyoung Kim*** You will then need to restart the configuration process. 4655*735d6239SKiyoung Kim 4656*735d6239SKiyoung Kim_LT_EOF 4657*735d6239SKiyoung Kim fi 4658*735d6239SKiyoung Kim ;; 4659*735d6239SKiyoung Kim 4660*735d6239SKiyoung Kim amigaos*) 4661*735d6239SKiyoung Kim case $host_cpu in 4662*735d6239SKiyoung Kim powerpc) 4663*735d6239SKiyoung Kim # see comment about AmigaOS4 .so support 4664*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4665*735d6239SKiyoung Kim _LT_TAGVAR(archive_expsym_cmds, $1)='' 4666*735d6239SKiyoung Kim ;; 4667*735d6239SKiyoung Kim m68k) 4668*735d6239SKiyoung Kim _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)' 4669*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4670*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_minus_L, $1)=yes 4671*735d6239SKiyoung Kim ;; 4672*735d6239SKiyoung Kim esac 4673*735d6239SKiyoung Kim ;; 4674*735d6239SKiyoung Kim 4675*735d6239SKiyoung Kim beos*) 4676*735d6239SKiyoung Kim if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4677*735d6239SKiyoung Kim _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4678*735d6239SKiyoung Kim # Joseph Beckenbach <[email protected]> says some releases of gcc 4679*735d6239SKiyoung Kim # support --undefined. This deserves some investigation. FIXME 4680*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4681*735d6239SKiyoung Kim else 4682*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 4683*735d6239SKiyoung Kim fi 4684*735d6239SKiyoung Kim ;; 4685*735d6239SKiyoung Kim 4686*735d6239SKiyoung Kim cygwin* | mingw* | pw32* | cegcc*) 4687*735d6239SKiyoung Kim # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 4688*735d6239SKiyoung Kim # as there is no search path for DLLs. 4689*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4690*735d6239SKiyoung Kim _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 4691*735d6239SKiyoung Kim _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4692*735d6239SKiyoung Kim _LT_TAGVAR(always_export_symbols, $1)=no 4693*735d6239SKiyoung Kim _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4694*735d6239SKiyoung Kim _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' 4695*735d6239SKiyoung Kim _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4696*735d6239SKiyoung Kim 4697*735d6239SKiyoung Kim if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 4698*735d6239SKiyoung Kim _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' 4699*735d6239SKiyoung Kim # If the export-symbols file already is a .def file (1st line 4700*735d6239SKiyoung Kim # is EXPORTS), use it as is; otherwise, prepend... 4701*735d6239SKiyoung Kim _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 4702*735d6239SKiyoung Kim cp $export_symbols $output_objdir/$soname.def; 4703*735d6239SKiyoung Kim else 4704*735d6239SKiyoung Kim echo EXPORTS > $output_objdir/$soname.def; 4705*735d6239SKiyoung Kim cat $export_symbols >> $output_objdir/$soname.def; 4706*735d6239SKiyoung Kim fi~ 4707*735d6239SKiyoung Kim $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 4708*735d6239SKiyoung Kim else 4709*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 4710*735d6239SKiyoung Kim fi 4711*735d6239SKiyoung Kim ;; 4712*735d6239SKiyoung Kim 4713*735d6239SKiyoung Kim haiku*) 4714*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4715*735d6239SKiyoung Kim _LT_TAGVAR(link_all_deplibs, $1)=yes 4716*735d6239SKiyoung Kim ;; 4717*735d6239SKiyoung Kim 4718*735d6239SKiyoung Kim interix[[3-9]]*) 4719*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct, $1)=no 4720*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4721*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4722*735d6239SKiyoung Kim _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4723*735d6239SKiyoung Kim # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 4724*735d6239SKiyoung Kim # Instead, shared libraries are loaded at an image base (0x10000000 by 4725*735d6239SKiyoung Kim # default) and relocated if they conflict, which is a slow very memory 4726*735d6239SKiyoung Kim # consuming and fragmenting process. To avoid this, we pick a random, 4727*735d6239SKiyoung Kim # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 4728*735d6239SKiyoung Kim # time. Moving up from 0x10000000 also allows more sbrk(2) space. 4729*735d6239SKiyoung Kim _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' 4730*735d6239SKiyoung Kim _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' 4731*735d6239SKiyoung Kim ;; 4732*735d6239SKiyoung Kim 4733*735d6239SKiyoung Kim gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 4734*735d6239SKiyoung Kim tmp_diet=no 4735*735d6239SKiyoung Kim if test "$host_os" = linux-dietlibc; then 4736*735d6239SKiyoung Kim case $cc_basename in 4737*735d6239SKiyoung Kim diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 4738*735d6239SKiyoung Kim esac 4739*735d6239SKiyoung Kim fi 4740*735d6239SKiyoung Kim if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 4741*735d6239SKiyoung Kim && test "$tmp_diet" = no 4742*735d6239SKiyoung Kim then 4743*735d6239SKiyoung Kim tmp_addflag=' $pic_flag' 4744*735d6239SKiyoung Kim tmp_sharedflag='-shared' 4745*735d6239SKiyoung Kim case $cc_basename,$host_cpu in 4746*735d6239SKiyoung Kim pgcc*) # Portland Group C compiler 4747*735d6239SKiyoung Kim _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' 4748*735d6239SKiyoung Kim tmp_addflag=' $pic_flag' 4749*735d6239SKiyoung Kim ;; 4750*735d6239SKiyoung Kim pgf77* | pgf90* | pgf95* | pgfortran*) 4751*735d6239SKiyoung Kim # Portland Group f77 and f90 compilers 4752*735d6239SKiyoung Kim _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' 4753*735d6239SKiyoung Kim tmp_addflag=' $pic_flag -Mnomain' ;; 4754*735d6239SKiyoung Kim ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 4755*735d6239SKiyoung Kim tmp_addflag=' -i_dynamic' ;; 4756*735d6239SKiyoung Kim efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 4757*735d6239SKiyoung Kim tmp_addflag=' -i_dynamic -nofor_main' ;; 4758*735d6239SKiyoung Kim ifc* | ifort*) # Intel Fortran compiler 4759*735d6239SKiyoung Kim tmp_addflag=' -nofor_main' ;; 4760*735d6239SKiyoung Kim lf95*) # Lahey Fortran 8.1 4761*735d6239SKiyoung Kim _LT_TAGVAR(whole_archive_flag_spec, $1)= 4762*735d6239SKiyoung Kim tmp_sharedflag='--shared' ;; 4763*735d6239SKiyoung Kim xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 4764*735d6239SKiyoung Kim tmp_sharedflag='-qmkshrobj' 4765*735d6239SKiyoung Kim tmp_addflag= ;; 4766*735d6239SKiyoung Kim nvcc*) # Cuda Compiler Driver 2.2 4767*735d6239SKiyoung Kim _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' 4768*735d6239SKiyoung Kim _LT_TAGVAR(compiler_needs_object, $1)=yes 4769*735d6239SKiyoung Kim ;; 4770*735d6239SKiyoung Kim esac 4771*735d6239SKiyoung Kim case `$CC -V 2>&1 | sed 5q` in 4772*735d6239SKiyoung Kim *Sun\ C*) # Sun C 5.9 4773*735d6239SKiyoung Kim _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' 4774*735d6239SKiyoung Kim _LT_TAGVAR(compiler_needs_object, $1)=yes 4775*735d6239SKiyoung Kim tmp_sharedflag='-G' ;; 4776*735d6239SKiyoung Kim *Sun\ F*) # Sun Fortran 8.3 4777*735d6239SKiyoung Kim tmp_sharedflag='-G' ;; 4778*735d6239SKiyoung Kim esac 4779*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4780*735d6239SKiyoung Kim 4781*735d6239SKiyoung Kim if test "x$supports_anon_versioning" = xyes; then 4782*735d6239SKiyoung Kim _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4783*735d6239SKiyoung Kim cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4784*735d6239SKiyoung Kim echo "local: *; };" >> $output_objdir/$libname.ver~ 4785*735d6239SKiyoung Kim $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 4786*735d6239SKiyoung Kim fi 4787*735d6239SKiyoung Kim 4788*735d6239SKiyoung Kim case $cc_basename in 4789*735d6239SKiyoung Kim xlf* | bgf* | bgxlf* | mpixlf*) 4790*735d6239SKiyoung Kim # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 4791*735d6239SKiyoung Kim _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 4792*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4793*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 4794*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 4795*735d6239SKiyoung Kim if test "x$supports_anon_versioning" = xyes; then 4796*735d6239SKiyoung Kim _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4797*735d6239SKiyoung Kim cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4798*735d6239SKiyoung Kim echo "local: *; };" >> $output_objdir/$libname.ver~ 4799*735d6239SKiyoung Kim $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 4800*735d6239SKiyoung Kim fi 4801*735d6239SKiyoung Kim ;; 4802*735d6239SKiyoung Kim esac 4803*735d6239SKiyoung Kim else 4804*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 4805*735d6239SKiyoung Kim fi 4806*735d6239SKiyoung Kim ;; 4807*735d6239SKiyoung Kim 4808*735d6239SKiyoung Kim netbsd*) 4809*735d6239SKiyoung Kim if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4810*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 4811*735d6239SKiyoung Kim wlarc= 4812*735d6239SKiyoung Kim else 4813*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4814*735d6239SKiyoung Kim _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' 4815*735d6239SKiyoung Kim fi 4816*735d6239SKiyoung Kim ;; 4817*735d6239SKiyoung Kim 4818*735d6239SKiyoung Kim solaris*) 4819*735d6239SKiyoung Kim if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 4820*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 4821*735d6239SKiyoung Kim cat <<_LT_EOF 1>&2 4822*735d6239SKiyoung Kim 4823*735d6239SKiyoung Kim*** Warning: The releases 2.8.* of the GNU linker cannot reliably 4824*735d6239SKiyoung Kim*** create shared libraries on Solaris systems. Therefore, libtool 4825*735d6239SKiyoung Kim*** is disabling shared libraries support. We urge you to upgrade GNU 4826*735d6239SKiyoung Kim*** binutils to release 2.9.1 or newer. Another option is to modify 4827*735d6239SKiyoung Kim*** your PATH or compiler configuration so that the native linker is 4828*735d6239SKiyoung Kim*** used, and then restart. 4829*735d6239SKiyoung Kim 4830*735d6239SKiyoung Kim_LT_EOF 4831*735d6239SKiyoung Kim elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4832*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4833*735d6239SKiyoung Kim _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' 4834*735d6239SKiyoung Kim else 4835*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 4836*735d6239SKiyoung Kim fi 4837*735d6239SKiyoung Kim ;; 4838*735d6239SKiyoung Kim 4839*735d6239SKiyoung Kim sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 4840*735d6239SKiyoung Kim case `$LD -v 2>&1` in 4841*735d6239SKiyoung Kim *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 4842*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 4843*735d6239SKiyoung Kim cat <<_LT_EOF 1>&2 4844*735d6239SKiyoung Kim 4845*735d6239SKiyoung Kim*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 4846*735d6239SKiyoung Kim*** reliably create shared libraries on SCO systems. Therefore, libtool 4847*735d6239SKiyoung Kim*** is disabling shared libraries support. We urge you to upgrade GNU 4848*735d6239SKiyoung Kim*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 4849*735d6239SKiyoung Kim*** your PATH or compiler configuration so that the native linker is 4850*735d6239SKiyoung Kim*** used, and then restart. 4851*735d6239SKiyoung Kim 4852*735d6239SKiyoung Kim_LT_EOF 4853*735d6239SKiyoung Kim ;; 4854*735d6239SKiyoung Kim *) 4855*735d6239SKiyoung Kim # For security reasons, it is highly recommended that you always 4856*735d6239SKiyoung Kim # use absolute paths for naming shared libraries, and exclude the 4857*735d6239SKiyoung Kim # DT_RUNPATH tag from executables and libraries. But doing so 4858*735d6239SKiyoung Kim # requires that you compile everything twice, which is a pain. 4859*735d6239SKiyoung Kim if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4860*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4861*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4862*735d6239SKiyoung Kim _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' 4863*735d6239SKiyoung Kim else 4864*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 4865*735d6239SKiyoung Kim fi 4866*735d6239SKiyoung Kim ;; 4867*735d6239SKiyoung Kim esac 4868*735d6239SKiyoung Kim ;; 4869*735d6239SKiyoung Kim 4870*735d6239SKiyoung Kim sunos4*) 4871*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4872*735d6239SKiyoung Kim wlarc= 4873*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct, $1)=yes 4874*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4875*735d6239SKiyoung Kim ;; 4876*735d6239SKiyoung Kim 4877*735d6239SKiyoung Kim *) 4878*735d6239SKiyoung Kim if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4879*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4880*735d6239SKiyoung Kim _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' 4881*735d6239SKiyoung Kim else 4882*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 4883*735d6239SKiyoung Kim fi 4884*735d6239SKiyoung Kim ;; 4885*735d6239SKiyoung Kim esac 4886*735d6239SKiyoung Kim 4887*735d6239SKiyoung Kim if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 4888*735d6239SKiyoung Kim runpath_var= 4889*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4890*735d6239SKiyoung Kim _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4891*735d6239SKiyoung Kim _LT_TAGVAR(whole_archive_flag_spec, $1)= 4892*735d6239SKiyoung Kim fi 4893*735d6239SKiyoung Kim else 4894*735d6239SKiyoung Kim # PORTME fill in a description of your system's linker (not GNU ld) 4895*735d6239SKiyoung Kim case $host_os in 4896*735d6239SKiyoung Kim aix3*) 4897*735d6239SKiyoung Kim _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4898*735d6239SKiyoung Kim _LT_TAGVAR(always_export_symbols, $1)=yes 4899*735d6239SKiyoung Kim _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' 4900*735d6239SKiyoung Kim # Note: this linker hardcodes the directories in LIBPATH if there 4901*735d6239SKiyoung Kim # are no directories specified by -L. 4902*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_minus_L, $1)=yes 4903*735d6239SKiyoung Kim if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 4904*735d6239SKiyoung Kim # Neither direct hardcoding nor static linking is supported with a 4905*735d6239SKiyoung Kim # broken collect2. 4906*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct, $1)=unsupported 4907*735d6239SKiyoung Kim fi 4908*735d6239SKiyoung Kim ;; 4909*735d6239SKiyoung Kim 4910*735d6239SKiyoung Kim aix[[4-9]]*) 4911*735d6239SKiyoung Kim if test "$host_cpu" = ia64; then 4912*735d6239SKiyoung Kim # On IA64, the linker does run time linking by default, so we don't 4913*735d6239SKiyoung Kim # have to do anything special. 4914*735d6239SKiyoung Kim aix_use_runtimelinking=no 4915*735d6239SKiyoung Kim exp_sym_flag='-Bexport' 4916*735d6239SKiyoung Kim no_entry_flag="" 4917*735d6239SKiyoung Kim else 4918*735d6239SKiyoung Kim # If we're using GNU nm, then we don't want the "-C" option. 4919*735d6239SKiyoung Kim # -C means demangle to AIX nm, but means don't demangle with GNU nm 4920*735d6239SKiyoung Kim # Also, AIX nm treats weak defined symbols like other global 4921*735d6239SKiyoung Kim # defined symbols, whereas GNU nm marks them as "W". 4922*735d6239SKiyoung Kim if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4923*735d6239SKiyoung Kim _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' 4924*735d6239SKiyoung Kim else 4925*735d6239SKiyoung Kim _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' 4926*735d6239SKiyoung Kim fi 4927*735d6239SKiyoung Kim aix_use_runtimelinking=no 4928*735d6239SKiyoung Kim 4929*735d6239SKiyoung Kim # Test if we are trying to use run time linking or normal 4930*735d6239SKiyoung Kim # AIX style linking. If -brtl is somewhere in LDFLAGS, we 4931*735d6239SKiyoung Kim # need to do runtime linking. 4932*735d6239SKiyoung Kim case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 4933*735d6239SKiyoung Kim for ld_flag in $LDFLAGS; do 4934*735d6239SKiyoung Kim if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 4935*735d6239SKiyoung Kim aix_use_runtimelinking=yes 4936*735d6239SKiyoung Kim break 4937*735d6239SKiyoung Kim fi 4938*735d6239SKiyoung Kim done 4939*735d6239SKiyoung Kim ;; 4940*735d6239SKiyoung Kim esac 4941*735d6239SKiyoung Kim 4942*735d6239SKiyoung Kim exp_sym_flag='-bexport' 4943*735d6239SKiyoung Kim no_entry_flag='-bnoentry' 4944*735d6239SKiyoung Kim fi 4945*735d6239SKiyoung Kim 4946*735d6239SKiyoung Kim # When large executables or shared objects are built, AIX ld can 4947*735d6239SKiyoung Kim # have problems creating the table of contents. If linking a library 4948*735d6239SKiyoung Kim # or program results in "error TOC overflow" add -mminimal-toc to 4949*735d6239SKiyoung Kim # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 4950*735d6239SKiyoung Kim # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 4951*735d6239SKiyoung Kim 4952*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='' 4953*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct, $1)=yes 4954*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4955*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 4956*735d6239SKiyoung Kim _LT_TAGVAR(link_all_deplibs, $1)=yes 4957*735d6239SKiyoung Kim _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 4958*735d6239SKiyoung Kim 4959*735d6239SKiyoung Kim if test "$GCC" = yes; then 4960*735d6239SKiyoung Kim case $host_os in aix4.[[012]]|aix4.[[012]].*) 4961*735d6239SKiyoung Kim # We only want to do this on AIX 4.2 and lower, the check 4962*735d6239SKiyoung Kim # below for broken collect2 doesn't work under 4.3+ 4963*735d6239SKiyoung Kim collect2name=`${CC} -print-prog-name=collect2` 4964*735d6239SKiyoung Kim if test -f "$collect2name" && 4965*735d6239SKiyoung Kim strings "$collect2name" | $GREP resolve_lib_name >/dev/null 4966*735d6239SKiyoung Kim then 4967*735d6239SKiyoung Kim # We have reworked collect2 4968*735d6239SKiyoung Kim : 4969*735d6239SKiyoung Kim else 4970*735d6239SKiyoung Kim # We have old collect2 4971*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct, $1)=unsupported 4972*735d6239SKiyoung Kim # It fails to find uninstalled libraries when the uninstalled 4973*735d6239SKiyoung Kim # path is not listed in the libpath. Setting hardcode_minus_L 4974*735d6239SKiyoung Kim # to unsupported forces relinking 4975*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_minus_L, $1)=yes 4976*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4977*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_separator, $1)= 4978*735d6239SKiyoung Kim fi 4979*735d6239SKiyoung Kim ;; 4980*735d6239SKiyoung Kim esac 4981*735d6239SKiyoung Kim shared_flag='-shared' 4982*735d6239SKiyoung Kim if test "$aix_use_runtimelinking" = yes; then 4983*735d6239SKiyoung Kim shared_flag="$shared_flag "'${wl}-G' 4984*735d6239SKiyoung Kim fi 4985*735d6239SKiyoung Kim _LT_TAGVAR(link_all_deplibs, $1)=no 4986*735d6239SKiyoung Kim else 4987*735d6239SKiyoung Kim # not using gcc 4988*735d6239SKiyoung Kim if test "$host_cpu" = ia64; then 4989*735d6239SKiyoung Kim # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 4990*735d6239SKiyoung Kim # chokes on -Wl,-G. The following line is correct: 4991*735d6239SKiyoung Kim shared_flag='-G' 4992*735d6239SKiyoung Kim else 4993*735d6239SKiyoung Kim if test "$aix_use_runtimelinking" = yes; then 4994*735d6239SKiyoung Kim shared_flag='${wl}-G' 4995*735d6239SKiyoung Kim else 4996*735d6239SKiyoung Kim shared_flag='${wl}-bM:SRE' 4997*735d6239SKiyoung Kim fi 4998*735d6239SKiyoung Kim fi 4999*735d6239SKiyoung Kim fi 5000*735d6239SKiyoung Kim 5001*735d6239SKiyoung Kim _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 5002*735d6239SKiyoung Kim # It seems that -bexpall does not export symbols beginning with 5003*735d6239SKiyoung Kim # underscore (_), so it is better to generate a list of symbols to export. 5004*735d6239SKiyoung Kim _LT_TAGVAR(always_export_symbols, $1)=yes 5005*735d6239SKiyoung Kim if test "$aix_use_runtimelinking" = yes; then 5006*735d6239SKiyoung Kim # Warning - without using the other runtime loading flags (-brtl), 5007*735d6239SKiyoung Kim # -berok will link without error, but may produce a broken library. 5008*735d6239SKiyoung Kim _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5009*735d6239SKiyoung Kim # Determine the default libpath from the value encoded in an 5010*735d6239SKiyoung Kim # empty executable. 5011*735d6239SKiyoung Kim _LT_SYS_MODULE_PATH_AIX([$1]) 5012*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5013*735d6239SKiyoung Kim _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" 5014*735d6239SKiyoung Kim else 5015*735d6239SKiyoung Kim if test "$host_cpu" = ia64; then 5016*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5017*735d6239SKiyoung Kim _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5018*735d6239SKiyoung Kim _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" 5019*735d6239SKiyoung Kim else 5020*735d6239SKiyoung Kim # Determine the default libpath from the value encoded in an 5021*735d6239SKiyoung Kim # empty executable. 5022*735d6239SKiyoung Kim _LT_SYS_MODULE_PATH_AIX([$1]) 5023*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5024*735d6239SKiyoung Kim # Warning - without using the other run time loading flags, 5025*735d6239SKiyoung Kim # -berok will link without error, but may produce a broken library. 5026*735d6239SKiyoung Kim _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 5027*735d6239SKiyoung Kim _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5028*735d6239SKiyoung Kim if test "$with_gnu_ld" = yes; then 5029*735d6239SKiyoung Kim # We only use this code for GNU lds that support --whole-archive. 5030*735d6239SKiyoung Kim _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 5031*735d6239SKiyoung Kim else 5032*735d6239SKiyoung Kim # Exported symbols can be pulled into shared objects from archives 5033*735d6239SKiyoung Kim _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5034*735d6239SKiyoung Kim fi 5035*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5036*735d6239SKiyoung Kim # This is similar to how AIX traditionally builds its shared libraries. 5037*735d6239SKiyoung Kim _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' 5038*735d6239SKiyoung Kim fi 5039*735d6239SKiyoung Kim fi 5040*735d6239SKiyoung Kim ;; 5041*735d6239SKiyoung Kim 5042*735d6239SKiyoung Kim amigaos*) 5043*735d6239SKiyoung Kim case $host_cpu in 5044*735d6239SKiyoung Kim powerpc) 5045*735d6239SKiyoung Kim # see comment about AmigaOS4 .so support 5046*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5047*735d6239SKiyoung Kim _LT_TAGVAR(archive_expsym_cmds, $1)='' 5048*735d6239SKiyoung Kim ;; 5049*735d6239SKiyoung Kim m68k) 5050*735d6239SKiyoung Kim _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)' 5051*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5052*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_minus_L, $1)=yes 5053*735d6239SKiyoung Kim ;; 5054*735d6239SKiyoung Kim esac 5055*735d6239SKiyoung Kim ;; 5056*735d6239SKiyoung Kim 5057*735d6239SKiyoung Kim bsdi[[45]]*) 5058*735d6239SKiyoung Kim _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5059*735d6239SKiyoung Kim ;; 5060*735d6239SKiyoung Kim 5061*735d6239SKiyoung Kim cygwin* | mingw* | pw32* | cegcc*) 5062*735d6239SKiyoung Kim # When not using gcc, we currently assume that we are using 5063*735d6239SKiyoung Kim # Microsoft Visual C++. 5064*735d6239SKiyoung Kim # hardcode_libdir_flag_spec is actually meaningless, as there is 5065*735d6239SKiyoung Kim # no search path for DLLs. 5066*735d6239SKiyoung Kim case $cc_basename in 5067*735d6239SKiyoung Kim cl*) 5068*735d6239SKiyoung Kim # Native MSVC 5069*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5070*735d6239SKiyoung Kim _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5071*735d6239SKiyoung Kim _LT_TAGVAR(always_export_symbols, $1)=yes 5072*735d6239SKiyoung Kim _LT_TAGVAR(file_list_spec, $1)='@' 5073*735d6239SKiyoung Kim # Tell ltmain to make .lib files, not .a files. 5074*735d6239SKiyoung Kim libext=lib 5075*735d6239SKiyoung Kim # Tell ltmain to make .dll files, not .so files. 5076*735d6239SKiyoung Kim shrext_cmds=".dll" 5077*735d6239SKiyoung Kim # FIXME: Setting linknames here is a bad hack. 5078*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 5079*735d6239SKiyoung Kim _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5080*735d6239SKiyoung Kim sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 5081*735d6239SKiyoung Kim else 5082*735d6239SKiyoung Kim sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 5083*735d6239SKiyoung Kim fi~ 5084*735d6239SKiyoung Kim $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5085*735d6239SKiyoung Kim linknames=' 5086*735d6239SKiyoung Kim # The linker will not automatically build a static lib if we build a DLL. 5087*735d6239SKiyoung Kim # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5088*735d6239SKiyoung Kim _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5089*735d6239SKiyoung Kim _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' 5090*735d6239SKiyoung Kim # Don't use ranlib 5091*735d6239SKiyoung Kim _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5092*735d6239SKiyoung Kim _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5093*735d6239SKiyoung Kim lt_tool_outputfile="@TOOL_OUTPUT@"~ 5094*735d6239SKiyoung Kim case $lt_outputfile in 5095*735d6239SKiyoung Kim *.exe|*.EXE) ;; 5096*735d6239SKiyoung Kim *) 5097*735d6239SKiyoung Kim lt_outputfile="$lt_outputfile.exe" 5098*735d6239SKiyoung Kim lt_tool_outputfile="$lt_tool_outputfile.exe" 5099*735d6239SKiyoung Kim ;; 5100*735d6239SKiyoung Kim esac~ 5101*735d6239SKiyoung Kim if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 5102*735d6239SKiyoung Kim $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5103*735d6239SKiyoung Kim $RM "$lt_outputfile.manifest"; 5104*735d6239SKiyoung Kim fi' 5105*735d6239SKiyoung Kim ;; 5106*735d6239SKiyoung Kim *) 5107*735d6239SKiyoung Kim # Assume MSVC wrapper 5108*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5109*735d6239SKiyoung Kim _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5110*735d6239SKiyoung Kim # Tell ltmain to make .lib files, not .a files. 5111*735d6239SKiyoung Kim libext=lib 5112*735d6239SKiyoung Kim # Tell ltmain to make .dll files, not .so files. 5113*735d6239SKiyoung Kim shrext_cmds=".dll" 5114*735d6239SKiyoung Kim # FIXME: Setting linknames here is a bad hack. 5115*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5116*735d6239SKiyoung Kim # The linker will automatically build a .lib file if we build a DLL. 5117*735d6239SKiyoung Kim _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5118*735d6239SKiyoung Kim # FIXME: Should let the user specify the lib program. 5119*735d6239SKiyoung Kim _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5120*735d6239SKiyoung Kim _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5121*735d6239SKiyoung Kim ;; 5122*735d6239SKiyoung Kim esac 5123*735d6239SKiyoung Kim ;; 5124*735d6239SKiyoung Kim 5125*735d6239SKiyoung Kim darwin* | rhapsody*) 5126*735d6239SKiyoung Kim _LT_DARWIN_LINKER_FEATURES($1) 5127*735d6239SKiyoung Kim ;; 5128*735d6239SKiyoung Kim 5129*735d6239SKiyoung Kim dgux*) 5130*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5131*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5132*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5133*735d6239SKiyoung Kim ;; 5134*735d6239SKiyoung Kim 5135*735d6239SKiyoung Kim freebsd1*) 5136*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 5137*735d6239SKiyoung Kim ;; 5138*735d6239SKiyoung Kim 5139*735d6239SKiyoung Kim # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5140*735d6239SKiyoung Kim # support. Future versions do this automatically, but an explicit c++rt0.o 5141*735d6239SKiyoung Kim # does not break anything, and helps significantly (at the cost of a little 5142*735d6239SKiyoung Kim # extra space). 5143*735d6239SKiyoung Kim freebsd2.2*) 5144*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5145*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5146*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct, $1)=yes 5147*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5148*735d6239SKiyoung Kim ;; 5149*735d6239SKiyoung Kim 5150*735d6239SKiyoung Kim # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5151*735d6239SKiyoung Kim freebsd2*) 5152*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5153*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct, $1)=yes 5154*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_minus_L, $1)=yes 5155*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5156*735d6239SKiyoung Kim ;; 5157*735d6239SKiyoung Kim 5158*735d6239SKiyoung Kim # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5159*735d6239SKiyoung Kim freebsd* | dragonfly*) 5160*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5161*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5162*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct, $1)=yes 5163*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5164*735d6239SKiyoung Kim ;; 5165*735d6239SKiyoung Kim 5166*735d6239SKiyoung Kim hpux9*) 5167*735d6239SKiyoung Kim if test "$GCC" = yes; then 5168*735d6239SKiyoung Kim _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' 5169*735d6239SKiyoung Kim else 5170*735d6239SKiyoung Kim _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' 5171*735d6239SKiyoung Kim fi 5172*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5173*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5174*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct, $1)=yes 5175*735d6239SKiyoung Kim 5176*735d6239SKiyoung Kim # hardcode_minus_L: Not really in the search PATH, 5177*735d6239SKiyoung Kim # but as the default location of the library. 5178*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_minus_L, $1)=yes 5179*735d6239SKiyoung Kim _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5180*735d6239SKiyoung Kim ;; 5181*735d6239SKiyoung Kim 5182*735d6239SKiyoung Kim hpux10*) 5183*735d6239SKiyoung Kim if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5184*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5185*735d6239SKiyoung Kim else 5186*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5187*735d6239SKiyoung Kim fi 5188*735d6239SKiyoung Kim if test "$with_gnu_ld" = no; then 5189*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5190*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 5191*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5192*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct, $1)=yes 5193*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5194*735d6239SKiyoung Kim _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5195*735d6239SKiyoung Kim # hardcode_minus_L: Not really in the search PATH, 5196*735d6239SKiyoung Kim # but as the default location of the library. 5197*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_minus_L, $1)=yes 5198*735d6239SKiyoung Kim fi 5199*735d6239SKiyoung Kim ;; 5200*735d6239SKiyoung Kim 5201*735d6239SKiyoung Kim hpux11*) 5202*735d6239SKiyoung Kim if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5203*735d6239SKiyoung Kim case $host_cpu in 5204*735d6239SKiyoung Kim hppa*64*) 5205*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5206*735d6239SKiyoung Kim ;; 5207*735d6239SKiyoung Kim ia64*) 5208*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5209*735d6239SKiyoung Kim ;; 5210*735d6239SKiyoung Kim *) 5211*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5212*735d6239SKiyoung Kim ;; 5213*735d6239SKiyoung Kim esac 5214*735d6239SKiyoung Kim else 5215*735d6239SKiyoung Kim case $host_cpu in 5216*735d6239SKiyoung Kim hppa*64*) 5217*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5218*735d6239SKiyoung Kim ;; 5219*735d6239SKiyoung Kim ia64*) 5220*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5221*735d6239SKiyoung Kim ;; 5222*735d6239SKiyoung Kim *) 5223*735d6239SKiyoung Kim m4_if($1, [], [ 5224*735d6239SKiyoung Kim # Older versions of the 11.00 compiler do not understand -b yet 5225*735d6239SKiyoung Kim # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5226*735d6239SKiyoung Kim _LT_LINKER_OPTION([if $CC understands -b], 5227*735d6239SKiyoung Kim _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5228*735d6239SKiyoung Kim [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5229*735d6239SKiyoung Kim [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5230*735d6239SKiyoung Kim [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5231*735d6239SKiyoung Kim ;; 5232*735d6239SKiyoung Kim esac 5233*735d6239SKiyoung Kim fi 5234*735d6239SKiyoung Kim if test "$with_gnu_ld" = no; then 5235*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5236*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5237*735d6239SKiyoung Kim 5238*735d6239SKiyoung Kim case $host_cpu in 5239*735d6239SKiyoung Kim hppa*64*|ia64*) 5240*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct, $1)=no 5241*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5242*735d6239SKiyoung Kim ;; 5243*735d6239SKiyoung Kim *) 5244*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct, $1)=yes 5245*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5246*735d6239SKiyoung Kim _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5247*735d6239SKiyoung Kim 5248*735d6239SKiyoung Kim # hardcode_minus_L: Not really in the search PATH, 5249*735d6239SKiyoung Kim # but as the default location of the library. 5250*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_minus_L, $1)=yes 5251*735d6239SKiyoung Kim ;; 5252*735d6239SKiyoung Kim esac 5253*735d6239SKiyoung Kim fi 5254*735d6239SKiyoung Kim ;; 5255*735d6239SKiyoung Kim 5256*735d6239SKiyoung Kim irix5* | irix6* | nonstopux*) 5257*735d6239SKiyoung Kim if test "$GCC" = yes; then 5258*735d6239SKiyoung Kim _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' 5259*735d6239SKiyoung Kim # Try to use the -exported_symbol ld option, if it does not 5260*735d6239SKiyoung Kim # work, assume that -exports_file does not work either and 5261*735d6239SKiyoung Kim # implicitly export all symbols. 5262*735d6239SKiyoung Kim # This should be the same for all languages, so no per-tag cache variable. 5263*735d6239SKiyoung Kim AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5264*735d6239SKiyoung Kim [lt_cv_irix_exported_symbol], 5265*735d6239SKiyoung Kim [save_LDFLAGS="$LDFLAGS" 5266*735d6239SKiyoung Kim LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 5267*735d6239SKiyoung Kim AC_LINK_IFELSE( 5268*735d6239SKiyoung Kim [AC_LANG_SOURCE( 5269*735d6239SKiyoung Kim [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5270*735d6239SKiyoung Kim [C++], [[int foo (void) { return 0; }]], 5271*735d6239SKiyoung Kim [Fortran 77], [[ 5272*735d6239SKiyoung Kim subroutine foo 5273*735d6239SKiyoung Kim end]], 5274*735d6239SKiyoung Kim [Fortran], [[ 5275*735d6239SKiyoung Kim subroutine foo 5276*735d6239SKiyoung Kim end]])])], 5277*735d6239SKiyoung Kim [lt_cv_irix_exported_symbol=yes], 5278*735d6239SKiyoung Kim [lt_cv_irix_exported_symbol=no]) 5279*735d6239SKiyoung Kim LDFLAGS="$save_LDFLAGS"]) 5280*735d6239SKiyoung Kim if test "$lt_cv_irix_exported_symbol" = yes; then 5281*735d6239SKiyoung Kim _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' 5282*735d6239SKiyoung Kim fi 5283*735d6239SKiyoung Kim else 5284*735d6239SKiyoung Kim _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' 5285*735d6239SKiyoung Kim _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' 5286*735d6239SKiyoung Kim fi 5287*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5288*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5289*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5290*735d6239SKiyoung Kim _LT_TAGVAR(inherit_rpath, $1)=yes 5291*735d6239SKiyoung Kim _LT_TAGVAR(link_all_deplibs, $1)=yes 5292*735d6239SKiyoung Kim ;; 5293*735d6239SKiyoung Kim 5294*735d6239SKiyoung Kim netbsd*) 5295*735d6239SKiyoung Kim if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5296*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5297*735d6239SKiyoung Kim else 5298*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5299*735d6239SKiyoung Kim fi 5300*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5301*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct, $1)=yes 5302*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5303*735d6239SKiyoung Kim ;; 5304*735d6239SKiyoung Kim 5305*735d6239SKiyoung Kim newsos6) 5306*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5307*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct, $1)=yes 5308*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5309*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5310*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5311*735d6239SKiyoung Kim ;; 5312*735d6239SKiyoung Kim 5313*735d6239SKiyoung Kim *nto* | *qnx*) 5314*735d6239SKiyoung Kim ;; 5315*735d6239SKiyoung Kim 5316*735d6239SKiyoung Kim openbsd*) 5317*735d6239SKiyoung Kim if test -f /usr/libexec/ld.so; then 5318*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct, $1)=yes 5319*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5320*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5321*735d6239SKiyoung Kim if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 5322*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5323*735d6239SKiyoung Kim _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 5324*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5325*735d6239SKiyoung Kim _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5326*735d6239SKiyoung Kim else 5327*735d6239SKiyoung Kim case $host_os in 5328*735d6239SKiyoung Kim openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 5329*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5330*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5331*735d6239SKiyoung Kim ;; 5332*735d6239SKiyoung Kim *) 5333*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5334*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5335*735d6239SKiyoung Kim ;; 5336*735d6239SKiyoung Kim esac 5337*735d6239SKiyoung Kim fi 5338*735d6239SKiyoung Kim else 5339*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 5340*735d6239SKiyoung Kim fi 5341*735d6239SKiyoung Kim ;; 5342*735d6239SKiyoung Kim 5343*735d6239SKiyoung Kim os2*) 5344*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5345*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_minus_L, $1)=yes 5346*735d6239SKiyoung Kim _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5347*735d6239SKiyoung Kim _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' 5348*735d6239SKiyoung Kim _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 5349*735d6239SKiyoung Kim ;; 5350*735d6239SKiyoung Kim 5351*735d6239SKiyoung Kim osf3*) 5352*735d6239SKiyoung Kim if test "$GCC" = yes; then 5353*735d6239SKiyoung Kim _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5354*735d6239SKiyoung Kim _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' 5355*735d6239SKiyoung Kim else 5356*735d6239SKiyoung Kim _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5357*735d6239SKiyoung Kim _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' 5358*735d6239SKiyoung Kim fi 5359*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5360*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5361*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5362*735d6239SKiyoung Kim ;; 5363*735d6239SKiyoung Kim 5364*735d6239SKiyoung Kim osf4* | osf5*) # as osf3* with the addition of -msym flag 5365*735d6239SKiyoung Kim if test "$GCC" = yes; then 5366*735d6239SKiyoung Kim _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5367*735d6239SKiyoung Kim _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' 5368*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5369*735d6239SKiyoung Kim else 5370*735d6239SKiyoung Kim _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5371*735d6239SKiyoung Kim _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' 5372*735d6239SKiyoung Kim _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~ 5373*735d6239SKiyoung Kim $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' 5374*735d6239SKiyoung Kim 5375*735d6239SKiyoung Kim # Both c and cxx compiler support -rpath directly 5376*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5377*735d6239SKiyoung Kim fi 5378*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5379*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5380*735d6239SKiyoung Kim ;; 5381*735d6239SKiyoung Kim 5382*735d6239SKiyoung Kim solaris*) 5383*735d6239SKiyoung Kim _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5384*735d6239SKiyoung Kim if test "$GCC" = yes; then 5385*735d6239SKiyoung Kim wlarc='${wl}' 5386*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5387*735d6239SKiyoung Kim _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5388*735d6239SKiyoung Kim $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' 5389*735d6239SKiyoung Kim else 5390*735d6239SKiyoung Kim case `$CC -V 2>&1` in 5391*735d6239SKiyoung Kim *"Compilers 5.0"*) 5392*735d6239SKiyoung Kim wlarc='' 5393*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 5394*735d6239SKiyoung Kim _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5395*735d6239SKiyoung Kim $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5396*735d6239SKiyoung Kim ;; 5397*735d6239SKiyoung Kim *) 5398*735d6239SKiyoung Kim wlarc='${wl}' 5399*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 5400*735d6239SKiyoung Kim _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5401*735d6239SKiyoung Kim $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5402*735d6239SKiyoung Kim ;; 5403*735d6239SKiyoung Kim esac 5404*735d6239SKiyoung Kim fi 5405*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5406*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5407*735d6239SKiyoung Kim case $host_os in 5408*735d6239SKiyoung Kim solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5409*735d6239SKiyoung Kim *) 5410*735d6239SKiyoung Kim # The compiler driver will combine and reorder linker options, 5411*735d6239SKiyoung Kim # but understands `-z linker_flag'. GCC discards it without `$wl', 5412*735d6239SKiyoung Kim # but is careful enough not to reorder. 5413*735d6239SKiyoung Kim # Supported since Solaris 2.6 (maybe 2.5.1?) 5414*735d6239SKiyoung Kim if test "$GCC" = yes; then 5415*735d6239SKiyoung Kim _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 5416*735d6239SKiyoung Kim else 5417*735d6239SKiyoung Kim _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5418*735d6239SKiyoung Kim fi 5419*735d6239SKiyoung Kim ;; 5420*735d6239SKiyoung Kim esac 5421*735d6239SKiyoung Kim _LT_TAGVAR(link_all_deplibs, $1)=yes 5422*735d6239SKiyoung Kim ;; 5423*735d6239SKiyoung Kim 5424*735d6239SKiyoung Kim sunos4*) 5425*735d6239SKiyoung Kim if test "x$host_vendor" = xsequent; then 5426*735d6239SKiyoung Kim # Use $CC to link under sequent, because it throws in some extra .o 5427*735d6239SKiyoung Kim # files that make .init and .fini sections work. 5428*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5429*735d6239SKiyoung Kim else 5430*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5431*735d6239SKiyoung Kim fi 5432*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5433*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct, $1)=yes 5434*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_minus_L, $1)=yes 5435*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5436*735d6239SKiyoung Kim ;; 5437*735d6239SKiyoung Kim 5438*735d6239SKiyoung Kim sysv4) 5439*735d6239SKiyoung Kim case $host_vendor in 5440*735d6239SKiyoung Kim sni) 5441*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5442*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5443*735d6239SKiyoung Kim ;; 5444*735d6239SKiyoung Kim siemens) 5445*735d6239SKiyoung Kim ## LD is ld it makes a PLAMLIB 5446*735d6239SKiyoung Kim ## CC just makes a GrossModule. 5447*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5448*735d6239SKiyoung Kim _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5449*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct, $1)=no 5450*735d6239SKiyoung Kim ;; 5451*735d6239SKiyoung Kim motorola) 5452*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5453*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5454*735d6239SKiyoung Kim ;; 5455*735d6239SKiyoung Kim esac 5456*735d6239SKiyoung Kim runpath_var='LD_RUN_PATH' 5457*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5458*735d6239SKiyoung Kim ;; 5459*735d6239SKiyoung Kim 5460*735d6239SKiyoung Kim sysv4.3*) 5461*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5462*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5463*735d6239SKiyoung Kim _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 5464*735d6239SKiyoung Kim ;; 5465*735d6239SKiyoung Kim 5466*735d6239SKiyoung Kim sysv4*MP*) 5467*735d6239SKiyoung Kim if test -d /usr/nec; then 5468*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5469*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5470*735d6239SKiyoung Kim runpath_var=LD_RUN_PATH 5471*735d6239SKiyoung Kim hardcode_runpath_var=yes 5472*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=yes 5473*735d6239SKiyoung Kim fi 5474*735d6239SKiyoung Kim ;; 5475*735d6239SKiyoung Kim 5476*735d6239SKiyoung Kim sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 5477*735d6239SKiyoung Kim _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5478*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5479*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5480*735d6239SKiyoung Kim runpath_var='LD_RUN_PATH' 5481*735d6239SKiyoung Kim 5482*735d6239SKiyoung Kim if test "$GCC" = yes; then 5483*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5484*735d6239SKiyoung Kim _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5485*735d6239SKiyoung Kim else 5486*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5487*735d6239SKiyoung Kim _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5488*735d6239SKiyoung Kim fi 5489*735d6239SKiyoung Kim ;; 5490*735d6239SKiyoung Kim 5491*735d6239SKiyoung Kim sysv5* | sco3.2v5* | sco5v6*) 5492*735d6239SKiyoung Kim # Note: We can NOT use -z defs as we might desire, because we do not 5493*735d6239SKiyoung Kim # link with -lc, and that would cause any symbols used from libc to 5494*735d6239SKiyoung Kim # always be unresolved, which means just about no library would 5495*735d6239SKiyoung Kim # ever link correctly. If we're not using GNU ld we use -z text 5496*735d6239SKiyoung Kim # though, which does catch some bad symbols but isn't as heavy-handed 5497*735d6239SKiyoung Kim # as -z defs. 5498*735d6239SKiyoung Kim _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5499*735d6239SKiyoung Kim _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 5500*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5501*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5502*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 5503*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5504*735d6239SKiyoung Kim _LT_TAGVAR(link_all_deplibs, $1)=yes 5505*735d6239SKiyoung Kim _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 5506*735d6239SKiyoung Kim runpath_var='LD_RUN_PATH' 5507*735d6239SKiyoung Kim 5508*735d6239SKiyoung Kim if test "$GCC" = yes; then 5509*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5510*735d6239SKiyoung Kim _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5511*735d6239SKiyoung Kim else 5512*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5513*735d6239SKiyoung Kim _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5514*735d6239SKiyoung Kim fi 5515*735d6239SKiyoung Kim ;; 5516*735d6239SKiyoung Kim 5517*735d6239SKiyoung Kim uts4*) 5518*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5519*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5520*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5521*735d6239SKiyoung Kim ;; 5522*735d6239SKiyoung Kim 5523*735d6239SKiyoung Kim *) 5524*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 5525*735d6239SKiyoung Kim ;; 5526*735d6239SKiyoung Kim esac 5527*735d6239SKiyoung Kim 5528*735d6239SKiyoung Kim if test x$host_vendor = xsni; then 5529*735d6239SKiyoung Kim case $host in 5530*735d6239SKiyoung Kim sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 5531*735d6239SKiyoung Kim _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 5532*735d6239SKiyoung Kim ;; 5533*735d6239SKiyoung Kim esac 5534*735d6239SKiyoung Kim fi 5535*735d6239SKiyoung Kim fi 5536*735d6239SKiyoung Kim]) 5537*735d6239SKiyoung KimAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 5538*735d6239SKiyoung Kimtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 5539*735d6239SKiyoung Kim 5540*735d6239SKiyoung Kim_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 5541*735d6239SKiyoung Kim 5542*735d6239SKiyoung Kim_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 5543*735d6239SKiyoung Kim_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 5544*735d6239SKiyoung Kim_LT_DECL([], [extract_expsyms_cmds], [2], 5545*735d6239SKiyoung Kim [The commands to extract the exported symbol list from a shared archive]) 5546*735d6239SKiyoung Kim 5547*735d6239SKiyoung Kim# 5548*735d6239SKiyoung Kim# Do we need to explicitly link libc? 5549*735d6239SKiyoung Kim# 5550*735d6239SKiyoung Kimcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 5551*735d6239SKiyoung Kimx|xyes) 5552*735d6239SKiyoung Kim # Assume -lc should be added 5553*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5554*735d6239SKiyoung Kim 5555*735d6239SKiyoung Kim if test "$enable_shared" = yes && test "$GCC" = yes; then 5556*735d6239SKiyoung Kim case $_LT_TAGVAR(archive_cmds, $1) in 5557*735d6239SKiyoung Kim *'~'*) 5558*735d6239SKiyoung Kim # FIXME: we may have to deal with multi-command sequences. 5559*735d6239SKiyoung Kim ;; 5560*735d6239SKiyoung Kim '$CC '*) 5561*735d6239SKiyoung Kim # Test whether the compiler implicitly links with -lc since on some 5562*735d6239SKiyoung Kim # systems, -lgcc has to come before -lc. If gcc already passes -lc 5563*735d6239SKiyoung Kim # to ld, don't add -lc before -lgcc. 5564*735d6239SKiyoung Kim AC_CACHE_CHECK([whether -lc should be explicitly linked in], 5565*735d6239SKiyoung Kim [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 5566*735d6239SKiyoung Kim [$RM conftest* 5567*735d6239SKiyoung Kim echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5568*735d6239SKiyoung Kim 5569*735d6239SKiyoung Kim if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 5570*735d6239SKiyoung Kim soname=conftest 5571*735d6239SKiyoung Kim lib=conftest 5572*735d6239SKiyoung Kim libobjs=conftest.$ac_objext 5573*735d6239SKiyoung Kim deplibs= 5574*735d6239SKiyoung Kim wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 5575*735d6239SKiyoung Kim pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 5576*735d6239SKiyoung Kim compiler_flags=-v 5577*735d6239SKiyoung Kim linker_flags=-v 5578*735d6239SKiyoung Kim verstring= 5579*735d6239SKiyoung Kim output_objdir=. 5580*735d6239SKiyoung Kim libname=conftest 5581*735d6239SKiyoung Kim lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 5582*735d6239SKiyoung Kim _LT_TAGVAR(allow_undefined_flag, $1)= 5583*735d6239SKiyoung Kim if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 5584*735d6239SKiyoung Kim then 5585*735d6239SKiyoung Kim lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5586*735d6239SKiyoung Kim else 5587*735d6239SKiyoung Kim lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5588*735d6239SKiyoung Kim fi 5589*735d6239SKiyoung Kim _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 5590*735d6239SKiyoung Kim else 5591*735d6239SKiyoung Kim cat conftest.err 1>&5 5592*735d6239SKiyoung Kim fi 5593*735d6239SKiyoung Kim $RM conftest* 5594*735d6239SKiyoung Kim ]) 5595*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 5596*735d6239SKiyoung Kim ;; 5597*735d6239SKiyoung Kim esac 5598*735d6239SKiyoung Kim fi 5599*735d6239SKiyoung Kim ;; 5600*735d6239SKiyoung Kimesac 5601*735d6239SKiyoung Kim 5602*735d6239SKiyoung Kim_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 5603*735d6239SKiyoung Kim [Whether or not to add -lc for building shared libraries]) 5604*735d6239SKiyoung Kim_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 5605*735d6239SKiyoung Kim [enable_shared_with_static_runtimes], [0], 5606*735d6239SKiyoung Kim [Whether or not to disallow shared libs when runtime libs are static]) 5607*735d6239SKiyoung Kim_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 5608*735d6239SKiyoung Kim [Compiler flag to allow reflexive dlopens]) 5609*735d6239SKiyoung Kim_LT_TAGDECL([], [whole_archive_flag_spec], [1], 5610*735d6239SKiyoung Kim [Compiler flag to generate shared objects directly from archives]) 5611*735d6239SKiyoung Kim_LT_TAGDECL([], [compiler_needs_object], [1], 5612*735d6239SKiyoung Kim [Whether the compiler copes with passing no objects directly]) 5613*735d6239SKiyoung Kim_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 5614*735d6239SKiyoung Kim [Create an old-style archive from a shared archive]) 5615*735d6239SKiyoung Kim_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 5616*735d6239SKiyoung Kim [Create a temporary old-style archive to link instead of a shared archive]) 5617*735d6239SKiyoung Kim_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 5618*735d6239SKiyoung Kim_LT_TAGDECL([], [archive_expsym_cmds], [2]) 5619*735d6239SKiyoung Kim_LT_TAGDECL([], [module_cmds], [2], 5620*735d6239SKiyoung Kim [Commands used to build a loadable module if different from building 5621*735d6239SKiyoung Kim a shared archive.]) 5622*735d6239SKiyoung Kim_LT_TAGDECL([], [module_expsym_cmds], [2]) 5623*735d6239SKiyoung Kim_LT_TAGDECL([], [with_gnu_ld], [1], 5624*735d6239SKiyoung Kim [Whether we are building with GNU ld or not]) 5625*735d6239SKiyoung Kim_LT_TAGDECL([], [allow_undefined_flag], [1], 5626*735d6239SKiyoung Kim [Flag that allows shared libraries with undefined symbols to be built]) 5627*735d6239SKiyoung Kim_LT_TAGDECL([], [no_undefined_flag], [1], 5628*735d6239SKiyoung Kim [Flag that enforces no undefined symbols]) 5629*735d6239SKiyoung Kim_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 5630*735d6239SKiyoung Kim [Flag to hardcode $libdir into a binary during linking. 5631*735d6239SKiyoung Kim This must work even if $libdir does not exist]) 5632*735d6239SKiyoung Kim_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 5633*735d6239SKiyoung Kim [[If ld is used when linking, flag to hardcode $libdir into a binary 5634*735d6239SKiyoung Kim during linking. This must work even if $libdir does not exist]]) 5635*735d6239SKiyoung Kim_LT_TAGDECL([], [hardcode_libdir_separator], [1], 5636*735d6239SKiyoung Kim [Whether we need a single "-rpath" flag with a separated argument]) 5637*735d6239SKiyoung Kim_LT_TAGDECL([], [hardcode_direct], [0], 5638*735d6239SKiyoung Kim [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5639*735d6239SKiyoung Kim DIR into the resulting binary]) 5640*735d6239SKiyoung Kim_LT_TAGDECL([], [hardcode_direct_absolute], [0], 5641*735d6239SKiyoung Kim [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5642*735d6239SKiyoung Kim DIR into the resulting binary and the resulting library dependency is 5643*735d6239SKiyoung Kim "absolute", i.e impossible to change by setting ${shlibpath_var} if the 5644*735d6239SKiyoung Kim library is relocated]) 5645*735d6239SKiyoung Kim_LT_TAGDECL([], [hardcode_minus_L], [0], 5646*735d6239SKiyoung Kim [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 5647*735d6239SKiyoung Kim into the resulting binary]) 5648*735d6239SKiyoung Kim_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 5649*735d6239SKiyoung Kim [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 5650*735d6239SKiyoung Kim into the resulting binary]) 5651*735d6239SKiyoung Kim_LT_TAGDECL([], [hardcode_automatic], [0], 5652*735d6239SKiyoung Kim [Set to "yes" if building a shared library automatically hardcodes DIR 5653*735d6239SKiyoung Kim into the library and all subsequent libraries and executables linked 5654*735d6239SKiyoung Kim against it]) 5655*735d6239SKiyoung Kim_LT_TAGDECL([], [inherit_rpath], [0], 5656*735d6239SKiyoung Kim [Set to yes if linker adds runtime paths of dependent libraries 5657*735d6239SKiyoung Kim to runtime path list]) 5658*735d6239SKiyoung Kim_LT_TAGDECL([], [link_all_deplibs], [0], 5659*735d6239SKiyoung Kim [Whether libtool must link a program against all its dependency libraries]) 5660*735d6239SKiyoung Kim_LT_TAGDECL([], [always_export_symbols], [0], 5661*735d6239SKiyoung Kim [Set to "yes" if exported symbols are required]) 5662*735d6239SKiyoung Kim_LT_TAGDECL([], [export_symbols_cmds], [2], 5663*735d6239SKiyoung Kim [The commands to list exported symbols]) 5664*735d6239SKiyoung Kim_LT_TAGDECL([], [exclude_expsyms], [1], 5665*735d6239SKiyoung Kim [Symbols that should not be listed in the preloaded symbols]) 5666*735d6239SKiyoung Kim_LT_TAGDECL([], [include_expsyms], [1], 5667*735d6239SKiyoung Kim [Symbols that must always be exported]) 5668*735d6239SKiyoung Kim_LT_TAGDECL([], [prelink_cmds], [2], 5669*735d6239SKiyoung Kim [Commands necessary for linking programs (against libraries) with templates]) 5670*735d6239SKiyoung Kim_LT_TAGDECL([], [postlink_cmds], [2], 5671*735d6239SKiyoung Kim [Commands necessary for finishing linking programs]) 5672*735d6239SKiyoung Kim_LT_TAGDECL([], [file_list_spec], [1], 5673*735d6239SKiyoung Kim [Specify filename containing input files]) 5674*735d6239SKiyoung Kimdnl FIXME: Not yet implemented 5675*735d6239SKiyoung Kimdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 5676*735d6239SKiyoung Kimdnl [Compiler flag to generate thread safe objects]) 5677*735d6239SKiyoung Kim])# _LT_LINKER_SHLIBS 5678*735d6239SKiyoung Kim 5679*735d6239SKiyoung Kim 5680*735d6239SKiyoung Kim# _LT_LANG_C_CONFIG([TAG]) 5681*735d6239SKiyoung Kim# ------------------------ 5682*735d6239SKiyoung Kim# Ensure that the configuration variables for a C compiler are suitably 5683*735d6239SKiyoung Kim# defined. These variables are subsequently used by _LT_CONFIG to write 5684*735d6239SKiyoung Kim# the compiler configuration to `libtool'. 5685*735d6239SKiyoung Kimm4_defun([_LT_LANG_C_CONFIG], 5686*735d6239SKiyoung Kim[m4_require([_LT_DECL_EGREP])dnl 5687*735d6239SKiyoung Kimlt_save_CC="$CC" 5688*735d6239SKiyoung KimAC_LANG_PUSH(C) 5689*735d6239SKiyoung Kim 5690*735d6239SKiyoung Kim# Source file extension for C test sources. 5691*735d6239SKiyoung Kimac_ext=c 5692*735d6239SKiyoung Kim 5693*735d6239SKiyoung Kim# Object file extension for compiled C test sources. 5694*735d6239SKiyoung Kimobjext=o 5695*735d6239SKiyoung Kim_LT_TAGVAR(objext, $1)=$objext 5696*735d6239SKiyoung Kim 5697*735d6239SKiyoung Kim# Code to be used in simple compile tests 5698*735d6239SKiyoung Kimlt_simple_compile_test_code="int some_variable = 0;" 5699*735d6239SKiyoung Kim 5700*735d6239SKiyoung Kim# Code to be used in simple link tests 5701*735d6239SKiyoung Kimlt_simple_link_test_code='int main(){return(0);}' 5702*735d6239SKiyoung Kim 5703*735d6239SKiyoung Kim_LT_TAG_COMPILER 5704*735d6239SKiyoung Kim# Save the default compiler, since it gets overwritten when the other 5705*735d6239SKiyoung Kim# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 5706*735d6239SKiyoung Kimcompiler_DEFAULT=$CC 5707*735d6239SKiyoung Kim 5708*735d6239SKiyoung Kim# save warnings/boilerplate of simple test code 5709*735d6239SKiyoung Kim_LT_COMPILER_BOILERPLATE 5710*735d6239SKiyoung Kim_LT_LINKER_BOILERPLATE 5711*735d6239SKiyoung Kim 5712*735d6239SKiyoung Kim## CAVEAT EMPTOR: 5713*735d6239SKiyoung Kim## There is no encapsulation within the following macros, do not change 5714*735d6239SKiyoung Kim## the running order or otherwise move them around unless you know exactly 5715*735d6239SKiyoung Kim## what you are doing... 5716*735d6239SKiyoung Kimif test -n "$compiler"; then 5717*735d6239SKiyoung Kim _LT_COMPILER_NO_RTTI($1) 5718*735d6239SKiyoung Kim _LT_COMPILER_PIC($1) 5719*735d6239SKiyoung Kim _LT_COMPILER_C_O($1) 5720*735d6239SKiyoung Kim _LT_COMPILER_FILE_LOCKS($1) 5721*735d6239SKiyoung Kim _LT_LINKER_SHLIBS($1) 5722*735d6239SKiyoung Kim _LT_SYS_DYNAMIC_LINKER($1) 5723*735d6239SKiyoung Kim _LT_LINKER_HARDCODE_LIBPATH($1) 5724*735d6239SKiyoung Kim LT_SYS_DLOPEN_SELF 5725*735d6239SKiyoung Kim _LT_CMD_STRIPLIB 5726*735d6239SKiyoung Kim 5727*735d6239SKiyoung Kim # Report which library types will actually be built 5728*735d6239SKiyoung Kim AC_MSG_CHECKING([if libtool supports shared libraries]) 5729*735d6239SKiyoung Kim AC_MSG_RESULT([$can_build_shared]) 5730*735d6239SKiyoung Kim 5731*735d6239SKiyoung Kim AC_MSG_CHECKING([whether to build shared libraries]) 5732*735d6239SKiyoung Kim test "$can_build_shared" = "no" && enable_shared=no 5733*735d6239SKiyoung Kim 5734*735d6239SKiyoung Kim # On AIX, shared libraries and static libraries use the same namespace, and 5735*735d6239SKiyoung Kim # are all built from PIC. 5736*735d6239SKiyoung Kim case $host_os in 5737*735d6239SKiyoung Kim aix3*) 5738*735d6239SKiyoung Kim test "$enable_shared" = yes && enable_static=no 5739*735d6239SKiyoung Kim if test -n "$RANLIB"; then 5740*735d6239SKiyoung Kim archive_cmds="$archive_cmds~\$RANLIB \$lib" 5741*735d6239SKiyoung Kim postinstall_cmds='$RANLIB $lib' 5742*735d6239SKiyoung Kim fi 5743*735d6239SKiyoung Kim ;; 5744*735d6239SKiyoung Kim 5745*735d6239SKiyoung Kim aix[[4-9]]*) 5746*735d6239SKiyoung Kim if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 5747*735d6239SKiyoung Kim test "$enable_shared" = yes && enable_static=no 5748*735d6239SKiyoung Kim fi 5749*735d6239SKiyoung Kim ;; 5750*735d6239SKiyoung Kim esac 5751*735d6239SKiyoung Kim AC_MSG_RESULT([$enable_shared]) 5752*735d6239SKiyoung Kim 5753*735d6239SKiyoung Kim AC_MSG_CHECKING([whether to build static libraries]) 5754*735d6239SKiyoung Kim # Make sure either enable_shared or enable_static is yes. 5755*735d6239SKiyoung Kim test "$enable_shared" = yes || enable_static=yes 5756*735d6239SKiyoung Kim AC_MSG_RESULT([$enable_static]) 5757*735d6239SKiyoung Kim 5758*735d6239SKiyoung Kim _LT_CONFIG($1) 5759*735d6239SKiyoung Kimfi 5760*735d6239SKiyoung KimAC_LANG_POP 5761*735d6239SKiyoung KimCC="$lt_save_CC" 5762*735d6239SKiyoung Kim])# _LT_LANG_C_CONFIG 5763*735d6239SKiyoung Kim 5764*735d6239SKiyoung Kim 5765*735d6239SKiyoung Kim# _LT_LANG_CXX_CONFIG([TAG]) 5766*735d6239SKiyoung Kim# -------------------------- 5767*735d6239SKiyoung Kim# Ensure that the configuration variables for a C++ compiler are suitably 5768*735d6239SKiyoung Kim# defined. These variables are subsequently used by _LT_CONFIG to write 5769*735d6239SKiyoung Kim# the compiler configuration to `libtool'. 5770*735d6239SKiyoung Kimm4_defun([_LT_LANG_CXX_CONFIG], 5771*735d6239SKiyoung Kim[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5772*735d6239SKiyoung Kimm4_require([_LT_DECL_EGREP])dnl 5773*735d6239SKiyoung Kimm4_require([_LT_PATH_MANIFEST_TOOL])dnl 5774*735d6239SKiyoung Kimif test -n "$CXX" && ( test "X$CXX" != "Xno" && 5775*735d6239SKiyoung Kim ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 5776*735d6239SKiyoung Kim (test "X$CXX" != "Xg++"))) ; then 5777*735d6239SKiyoung Kim AC_PROG_CXXCPP 5778*735d6239SKiyoung Kimelse 5779*735d6239SKiyoung Kim _lt_caught_CXX_error=yes 5780*735d6239SKiyoung Kimfi 5781*735d6239SKiyoung Kim 5782*735d6239SKiyoung KimAC_LANG_PUSH(C++) 5783*735d6239SKiyoung Kim_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5784*735d6239SKiyoung Kim_LT_TAGVAR(allow_undefined_flag, $1)= 5785*735d6239SKiyoung Kim_LT_TAGVAR(always_export_symbols, $1)=no 5786*735d6239SKiyoung Kim_LT_TAGVAR(archive_expsym_cmds, $1)= 5787*735d6239SKiyoung Kim_LT_TAGVAR(compiler_needs_object, $1)=no 5788*735d6239SKiyoung Kim_LT_TAGVAR(export_dynamic_flag_spec, $1)= 5789*735d6239SKiyoung Kim_LT_TAGVAR(hardcode_direct, $1)=no 5790*735d6239SKiyoung Kim_LT_TAGVAR(hardcode_direct_absolute, $1)=no 5791*735d6239SKiyoung Kim_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5792*735d6239SKiyoung Kim_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 5793*735d6239SKiyoung Kim_LT_TAGVAR(hardcode_libdir_separator, $1)= 5794*735d6239SKiyoung Kim_LT_TAGVAR(hardcode_minus_L, $1)=no 5795*735d6239SKiyoung Kim_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5796*735d6239SKiyoung Kim_LT_TAGVAR(hardcode_automatic, $1)=no 5797*735d6239SKiyoung Kim_LT_TAGVAR(inherit_rpath, $1)=no 5798*735d6239SKiyoung Kim_LT_TAGVAR(module_cmds, $1)= 5799*735d6239SKiyoung Kim_LT_TAGVAR(module_expsym_cmds, $1)= 5800*735d6239SKiyoung Kim_LT_TAGVAR(link_all_deplibs, $1)=unknown 5801*735d6239SKiyoung Kim_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 5802*735d6239SKiyoung Kim_LT_TAGVAR(reload_flag, $1)=$reload_flag 5803*735d6239SKiyoung Kim_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 5804*735d6239SKiyoung Kim_LT_TAGVAR(no_undefined_flag, $1)= 5805*735d6239SKiyoung Kim_LT_TAGVAR(whole_archive_flag_spec, $1)= 5806*735d6239SKiyoung Kim_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5807*735d6239SKiyoung Kim 5808*735d6239SKiyoung Kim# Source file extension for C++ test sources. 5809*735d6239SKiyoung Kimac_ext=cpp 5810*735d6239SKiyoung Kim 5811*735d6239SKiyoung Kim# Object file extension for compiled C++ test sources. 5812*735d6239SKiyoung Kimobjext=o 5813*735d6239SKiyoung Kim_LT_TAGVAR(objext, $1)=$objext 5814*735d6239SKiyoung Kim 5815*735d6239SKiyoung Kim# No sense in running all these tests if we already determined that 5816*735d6239SKiyoung Kim# the CXX compiler isn't working. Some variables (like enable_shared) 5817*735d6239SKiyoung Kim# are currently assumed to apply to all compilers on this platform, 5818*735d6239SKiyoung Kim# and will be corrupted by setting them based on a non-working compiler. 5819*735d6239SKiyoung Kimif test "$_lt_caught_CXX_error" != yes; then 5820*735d6239SKiyoung Kim # Code to be used in simple compile tests 5821*735d6239SKiyoung Kim lt_simple_compile_test_code="int some_variable = 0;" 5822*735d6239SKiyoung Kim 5823*735d6239SKiyoung Kim # Code to be used in simple link tests 5824*735d6239SKiyoung Kim lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 5825*735d6239SKiyoung Kim 5826*735d6239SKiyoung Kim # ltmain only uses $CC for tagged configurations so make sure $CC is set. 5827*735d6239SKiyoung Kim _LT_TAG_COMPILER 5828*735d6239SKiyoung Kim 5829*735d6239SKiyoung Kim # save warnings/boilerplate of simple test code 5830*735d6239SKiyoung Kim _LT_COMPILER_BOILERPLATE 5831*735d6239SKiyoung Kim _LT_LINKER_BOILERPLATE 5832*735d6239SKiyoung Kim 5833*735d6239SKiyoung Kim # Allow CC to be a program name with arguments. 5834*735d6239SKiyoung Kim lt_save_CC=$CC 5835*735d6239SKiyoung Kim lt_save_CFLAGS=$CFLAGS 5836*735d6239SKiyoung Kim lt_save_LD=$LD 5837*735d6239SKiyoung Kim lt_save_GCC=$GCC 5838*735d6239SKiyoung Kim GCC=$GXX 5839*735d6239SKiyoung Kim lt_save_with_gnu_ld=$with_gnu_ld 5840*735d6239SKiyoung Kim lt_save_path_LD=$lt_cv_path_LD 5841*735d6239SKiyoung Kim if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 5842*735d6239SKiyoung Kim lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 5843*735d6239SKiyoung Kim else 5844*735d6239SKiyoung Kim $as_unset lt_cv_prog_gnu_ld 5845*735d6239SKiyoung Kim fi 5846*735d6239SKiyoung Kim if test -n "${lt_cv_path_LDCXX+set}"; then 5847*735d6239SKiyoung Kim lt_cv_path_LD=$lt_cv_path_LDCXX 5848*735d6239SKiyoung Kim else 5849*735d6239SKiyoung Kim $as_unset lt_cv_path_LD 5850*735d6239SKiyoung Kim fi 5851*735d6239SKiyoung Kim test -z "${LDCXX+set}" || LD=$LDCXX 5852*735d6239SKiyoung Kim CC=${CXX-"c++"} 5853*735d6239SKiyoung Kim CFLAGS=$CXXFLAGS 5854*735d6239SKiyoung Kim compiler=$CC 5855*735d6239SKiyoung Kim _LT_TAGVAR(compiler, $1)=$CC 5856*735d6239SKiyoung Kim _LT_CC_BASENAME([$compiler]) 5857*735d6239SKiyoung Kim 5858*735d6239SKiyoung Kim if test -n "$compiler"; then 5859*735d6239SKiyoung Kim # We don't want -fno-exception when compiling C++ code, so set the 5860*735d6239SKiyoung Kim # no_builtin_flag separately 5861*735d6239SKiyoung Kim if test "$GXX" = yes; then 5862*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 5863*735d6239SKiyoung Kim else 5864*735d6239SKiyoung Kim _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 5865*735d6239SKiyoung Kim fi 5866*735d6239SKiyoung Kim 5867*735d6239SKiyoung Kim if test "$GXX" = yes; then 5868*735d6239SKiyoung Kim # Set up default GNU C++ configuration 5869*735d6239SKiyoung Kim 5870*735d6239SKiyoung Kim LT_PATH_LD 5871*735d6239SKiyoung Kim 5872*735d6239SKiyoung Kim # Check if GNU C++ uses GNU ld as the underlying linker, since the 5873*735d6239SKiyoung Kim # archiving commands below assume that GNU ld is being used. 5874*735d6239SKiyoung Kim if test "$with_gnu_ld" = yes; then 5875*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5876*735d6239SKiyoung Kim _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' 5877*735d6239SKiyoung Kim 5878*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5879*735d6239SKiyoung Kim _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5880*735d6239SKiyoung Kim 5881*735d6239SKiyoung Kim # If archive_cmds runs LD, not CC, wlarc should be empty 5882*735d6239SKiyoung Kim # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 5883*735d6239SKiyoung Kim # investigate it a little bit more. (MM) 5884*735d6239SKiyoung Kim wlarc='${wl}' 5885*735d6239SKiyoung Kim 5886*735d6239SKiyoung Kim # ancient GNU ld didn't support --whole-archive et. al. 5887*735d6239SKiyoung Kim if eval "`$CC -print-prog-name=ld` --help 2>&1" | 5888*735d6239SKiyoung Kim $GREP 'no-whole-archive' > /dev/null; then 5889*735d6239SKiyoung Kim _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5890*735d6239SKiyoung Kim else 5891*735d6239SKiyoung Kim _LT_TAGVAR(whole_archive_flag_spec, $1)= 5892*735d6239SKiyoung Kim fi 5893*735d6239SKiyoung Kim else 5894*735d6239SKiyoung Kim with_gnu_ld=no 5895*735d6239SKiyoung Kim wlarc= 5896*735d6239SKiyoung Kim 5897*735d6239SKiyoung Kim # A generic and very simple default shared library creation 5898*735d6239SKiyoung Kim # command for GNU C++ for the case where it uses the native 5899*735d6239SKiyoung Kim # linker, instead of GNU ld. If possible, this setting should 5900*735d6239SKiyoung Kim # overridden to take advantage of the native linker features on 5901*735d6239SKiyoung Kim # the platform it is being used on. 5902*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 5903*735d6239SKiyoung Kim fi 5904*735d6239SKiyoung Kim 5905*735d6239SKiyoung Kim # Commands to make compiler produce verbose output that lists 5906*735d6239SKiyoung Kim # what "hidden" libraries, object files and flags are used when 5907*735d6239SKiyoung Kim # linking a shared library. 5908*735d6239SKiyoung Kim output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 5909*735d6239SKiyoung Kim 5910*735d6239SKiyoung Kim else 5911*735d6239SKiyoung Kim GXX=no 5912*735d6239SKiyoung Kim with_gnu_ld=no 5913*735d6239SKiyoung Kim wlarc= 5914*735d6239SKiyoung Kim fi 5915*735d6239SKiyoung Kim 5916*735d6239SKiyoung Kim # PORTME: fill in a description of your system's C++ link characteristics 5917*735d6239SKiyoung Kim AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5918*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=yes 5919*735d6239SKiyoung Kim case $host_os in 5920*735d6239SKiyoung Kim aix3*) 5921*735d6239SKiyoung Kim # FIXME: insert proper C++ library support 5922*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 5923*735d6239SKiyoung Kim ;; 5924*735d6239SKiyoung Kim aix[[4-9]]*) 5925*735d6239SKiyoung Kim if test "$host_cpu" = ia64; then 5926*735d6239SKiyoung Kim # On IA64, the linker does run time linking by default, so we don't 5927*735d6239SKiyoung Kim # have to do anything special. 5928*735d6239SKiyoung Kim aix_use_runtimelinking=no 5929*735d6239SKiyoung Kim exp_sym_flag='-Bexport' 5930*735d6239SKiyoung Kim no_entry_flag="" 5931*735d6239SKiyoung Kim else 5932*735d6239SKiyoung Kim aix_use_runtimelinking=no 5933*735d6239SKiyoung Kim 5934*735d6239SKiyoung Kim # Test if we are trying to use run time linking or normal 5935*735d6239SKiyoung Kim # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5936*735d6239SKiyoung Kim # need to do runtime linking. 5937*735d6239SKiyoung Kim case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5938*735d6239SKiyoung Kim for ld_flag in $LDFLAGS; do 5939*735d6239SKiyoung Kim case $ld_flag in 5940*735d6239SKiyoung Kim *-brtl*) 5941*735d6239SKiyoung Kim aix_use_runtimelinking=yes 5942*735d6239SKiyoung Kim break 5943*735d6239SKiyoung Kim ;; 5944*735d6239SKiyoung Kim esac 5945*735d6239SKiyoung Kim done 5946*735d6239SKiyoung Kim ;; 5947*735d6239SKiyoung Kim esac 5948*735d6239SKiyoung Kim 5949*735d6239SKiyoung Kim exp_sym_flag='-bexport' 5950*735d6239SKiyoung Kim no_entry_flag='-bnoentry' 5951*735d6239SKiyoung Kim fi 5952*735d6239SKiyoung Kim 5953*735d6239SKiyoung Kim # When large executables or shared objects are built, AIX ld can 5954*735d6239SKiyoung Kim # have problems creating the table of contents. If linking a library 5955*735d6239SKiyoung Kim # or program results in "error TOC overflow" add -mminimal-toc to 5956*735d6239SKiyoung Kim # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5957*735d6239SKiyoung Kim # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5958*735d6239SKiyoung Kim 5959*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='' 5960*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct, $1)=yes 5961*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5962*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5963*735d6239SKiyoung Kim _LT_TAGVAR(link_all_deplibs, $1)=yes 5964*735d6239SKiyoung Kim _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 5965*735d6239SKiyoung Kim 5966*735d6239SKiyoung Kim if test "$GXX" = yes; then 5967*735d6239SKiyoung Kim case $host_os in aix4.[[012]]|aix4.[[012]].*) 5968*735d6239SKiyoung Kim # We only want to do this on AIX 4.2 and lower, the check 5969*735d6239SKiyoung Kim # below for broken collect2 doesn't work under 4.3+ 5970*735d6239SKiyoung Kim collect2name=`${CC} -print-prog-name=collect2` 5971*735d6239SKiyoung Kim if test -f "$collect2name" && 5972*735d6239SKiyoung Kim strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5973*735d6239SKiyoung Kim then 5974*735d6239SKiyoung Kim # We have reworked collect2 5975*735d6239SKiyoung Kim : 5976*735d6239SKiyoung Kim else 5977*735d6239SKiyoung Kim # We have old collect2 5978*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct, $1)=unsupported 5979*735d6239SKiyoung Kim # It fails to find uninstalled libraries when the uninstalled 5980*735d6239SKiyoung Kim # path is not listed in the libpath. Setting hardcode_minus_L 5981*735d6239SKiyoung Kim # to unsupported forces relinking 5982*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_minus_L, $1)=yes 5983*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5984*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_separator, $1)= 5985*735d6239SKiyoung Kim fi 5986*735d6239SKiyoung Kim esac 5987*735d6239SKiyoung Kim shared_flag='-shared' 5988*735d6239SKiyoung Kim if test "$aix_use_runtimelinking" = yes; then 5989*735d6239SKiyoung Kim shared_flag="$shared_flag "'${wl}-G' 5990*735d6239SKiyoung Kim fi 5991*735d6239SKiyoung Kim _LT_TAGVAR(link_all_deplibs, $1)=no 5992*735d6239SKiyoung Kim else 5993*735d6239SKiyoung Kim # not using gcc 5994*735d6239SKiyoung Kim if test "$host_cpu" = ia64; then 5995*735d6239SKiyoung Kim # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5996*735d6239SKiyoung Kim # chokes on -Wl,-G. The following line is correct: 5997*735d6239SKiyoung Kim shared_flag='-G' 5998*735d6239SKiyoung Kim else 5999*735d6239SKiyoung Kim if test "$aix_use_runtimelinking" = yes; then 6000*735d6239SKiyoung Kim shared_flag='${wl}-G' 6001*735d6239SKiyoung Kim else 6002*735d6239SKiyoung Kim shared_flag='${wl}-bM:SRE' 6003*735d6239SKiyoung Kim fi 6004*735d6239SKiyoung Kim fi 6005*735d6239SKiyoung Kim fi 6006*735d6239SKiyoung Kim 6007*735d6239SKiyoung Kim _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 6008*735d6239SKiyoung Kim # It seems that -bexpall does not export symbols beginning with 6009*735d6239SKiyoung Kim # underscore (_), so it is better to generate a list of symbols to 6010*735d6239SKiyoung Kim # export. 6011*735d6239SKiyoung Kim _LT_TAGVAR(always_export_symbols, $1)=yes 6012*735d6239SKiyoung Kim if test "$aix_use_runtimelinking" = yes; then 6013*735d6239SKiyoung Kim # Warning - without using the other runtime loading flags (-brtl), 6014*735d6239SKiyoung Kim # -berok will link without error, but may produce a broken library. 6015*735d6239SKiyoung Kim _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 6016*735d6239SKiyoung Kim # Determine the default libpath from the value encoded in an empty 6017*735d6239SKiyoung Kim # executable. 6018*735d6239SKiyoung Kim _LT_SYS_MODULE_PATH_AIX([$1]) 6019*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6020*735d6239SKiyoung Kim 6021*735d6239SKiyoung Kim _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" 6022*735d6239SKiyoung Kim else 6023*735d6239SKiyoung Kim if test "$host_cpu" = ia64; then 6024*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 6025*735d6239SKiyoung Kim _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6026*735d6239SKiyoung Kim _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" 6027*735d6239SKiyoung Kim else 6028*735d6239SKiyoung Kim # Determine the default libpath from the value encoded in an 6029*735d6239SKiyoung Kim # empty executable. 6030*735d6239SKiyoung Kim _LT_SYS_MODULE_PATH_AIX([$1]) 6031*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6032*735d6239SKiyoung Kim # Warning - without using the other run time loading flags, 6033*735d6239SKiyoung Kim # -berok will link without error, but may produce a broken library. 6034*735d6239SKiyoung Kim _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6035*735d6239SKiyoung Kim _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6036*735d6239SKiyoung Kim if test "$with_gnu_ld" = yes; then 6037*735d6239SKiyoung Kim # We only use this code for GNU lds that support --whole-archive. 6038*735d6239SKiyoung Kim _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6039*735d6239SKiyoung Kim else 6040*735d6239SKiyoung Kim # Exported symbols can be pulled into shared objects from archives 6041*735d6239SKiyoung Kim _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6042*735d6239SKiyoung Kim fi 6043*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6044*735d6239SKiyoung Kim # This is similar to how AIX traditionally builds its shared 6045*735d6239SKiyoung Kim # libraries. 6046*735d6239SKiyoung Kim _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' 6047*735d6239SKiyoung Kim fi 6048*735d6239SKiyoung Kim fi 6049*735d6239SKiyoung Kim ;; 6050*735d6239SKiyoung Kim 6051*735d6239SKiyoung Kim beos*) 6052*735d6239SKiyoung Kim if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6053*735d6239SKiyoung Kim _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6054*735d6239SKiyoung Kim # Joseph Beckenbach <[email protected]> says some releases of gcc 6055*735d6239SKiyoung Kim # support --undefined. This deserves some investigation. FIXME 6056*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6057*735d6239SKiyoung Kim else 6058*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 6059*735d6239SKiyoung Kim fi 6060*735d6239SKiyoung Kim ;; 6061*735d6239SKiyoung Kim 6062*735d6239SKiyoung Kim chorus*) 6063*735d6239SKiyoung Kim case $cc_basename in 6064*735d6239SKiyoung Kim *) 6065*735d6239SKiyoung Kim # FIXME: insert proper C++ library support 6066*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 6067*735d6239SKiyoung Kim ;; 6068*735d6239SKiyoung Kim esac 6069*735d6239SKiyoung Kim ;; 6070*735d6239SKiyoung Kim 6071*735d6239SKiyoung Kim cygwin* | mingw* | pw32* | cegcc*) 6072*735d6239SKiyoung Kim case $GXX,$cc_basename in 6073*735d6239SKiyoung Kim ,cl* | no,cl*) 6074*735d6239SKiyoung Kim # Native MSVC 6075*735d6239SKiyoung Kim # hardcode_libdir_flag_spec is actually meaningless, as there is 6076*735d6239SKiyoung Kim # no search path for DLLs. 6077*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6078*735d6239SKiyoung Kim _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6079*735d6239SKiyoung Kim _LT_TAGVAR(always_export_symbols, $1)=yes 6080*735d6239SKiyoung Kim _LT_TAGVAR(file_list_spec, $1)='@' 6081*735d6239SKiyoung Kim # Tell ltmain to make .lib files, not .a files. 6082*735d6239SKiyoung Kim libext=lib 6083*735d6239SKiyoung Kim # Tell ltmain to make .dll files, not .so files. 6084*735d6239SKiyoung Kim shrext_cmds=".dll" 6085*735d6239SKiyoung Kim # FIXME: Setting linknames here is a bad hack. 6086*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 6087*735d6239SKiyoung Kim _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6088*735d6239SKiyoung Kim $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 6089*735d6239SKiyoung Kim else 6090*735d6239SKiyoung Kim $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 6091*735d6239SKiyoung Kim fi~ 6092*735d6239SKiyoung Kim $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6093*735d6239SKiyoung Kim linknames=' 6094*735d6239SKiyoung Kim # The linker will not automatically build a static lib if we build a DLL. 6095*735d6239SKiyoung Kim # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6096*735d6239SKiyoung Kim _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6097*735d6239SKiyoung Kim # Don't use ranlib 6098*735d6239SKiyoung Kim _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6099*735d6239SKiyoung Kim _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6100*735d6239SKiyoung Kim lt_tool_outputfile="@TOOL_OUTPUT@"~ 6101*735d6239SKiyoung Kim case $lt_outputfile in 6102*735d6239SKiyoung Kim *.exe|*.EXE) ;; 6103*735d6239SKiyoung Kim *) 6104*735d6239SKiyoung Kim lt_outputfile="$lt_outputfile.exe" 6105*735d6239SKiyoung Kim lt_tool_outputfile="$lt_tool_outputfile.exe" 6106*735d6239SKiyoung Kim ;; 6107*735d6239SKiyoung Kim esac~ 6108*735d6239SKiyoung Kim func_to_tool_file "$lt_outputfile"~ 6109*735d6239SKiyoung Kim if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 6110*735d6239SKiyoung Kim $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6111*735d6239SKiyoung Kim $RM "$lt_outputfile.manifest"; 6112*735d6239SKiyoung Kim fi' 6113*735d6239SKiyoung Kim ;; 6114*735d6239SKiyoung Kim *) 6115*735d6239SKiyoung Kim # g++ 6116*735d6239SKiyoung Kim # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6117*735d6239SKiyoung Kim # as there is no search path for DLLs. 6118*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6119*735d6239SKiyoung Kim _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 6120*735d6239SKiyoung Kim _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6121*735d6239SKiyoung Kim _LT_TAGVAR(always_export_symbols, $1)=no 6122*735d6239SKiyoung Kim _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6123*735d6239SKiyoung Kim 6124*735d6239SKiyoung Kim if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6125*735d6239SKiyoung Kim _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' 6126*735d6239SKiyoung Kim # If the export-symbols file already is a .def file (1st line 6127*735d6239SKiyoung Kim # is EXPORTS), use it as is; otherwise, prepend... 6128*735d6239SKiyoung Kim _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6129*735d6239SKiyoung Kim cp $export_symbols $output_objdir/$soname.def; 6130*735d6239SKiyoung Kim else 6131*735d6239SKiyoung Kim echo EXPORTS > $output_objdir/$soname.def; 6132*735d6239SKiyoung Kim cat $export_symbols >> $output_objdir/$soname.def; 6133*735d6239SKiyoung Kim fi~ 6134*735d6239SKiyoung Kim $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' 6135*735d6239SKiyoung Kim else 6136*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 6137*735d6239SKiyoung Kim fi 6138*735d6239SKiyoung Kim ;; 6139*735d6239SKiyoung Kim esac 6140*735d6239SKiyoung Kim ;; 6141*735d6239SKiyoung Kim darwin* | rhapsody*) 6142*735d6239SKiyoung Kim _LT_DARWIN_LINKER_FEATURES($1) 6143*735d6239SKiyoung Kim ;; 6144*735d6239SKiyoung Kim 6145*735d6239SKiyoung Kim dgux*) 6146*735d6239SKiyoung Kim case $cc_basename in 6147*735d6239SKiyoung Kim ec++*) 6148*735d6239SKiyoung Kim # FIXME: insert proper C++ library support 6149*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 6150*735d6239SKiyoung Kim ;; 6151*735d6239SKiyoung Kim ghcx*) 6152*735d6239SKiyoung Kim # Green Hills C++ Compiler 6153*735d6239SKiyoung Kim # FIXME: insert proper C++ library support 6154*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 6155*735d6239SKiyoung Kim ;; 6156*735d6239SKiyoung Kim *) 6157*735d6239SKiyoung Kim # FIXME: insert proper C++ library support 6158*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 6159*735d6239SKiyoung Kim ;; 6160*735d6239SKiyoung Kim esac 6161*735d6239SKiyoung Kim ;; 6162*735d6239SKiyoung Kim 6163*735d6239SKiyoung Kim freebsd[[12]]*) 6164*735d6239SKiyoung Kim # C++ shared libraries reported to be fairly broken before 6165*735d6239SKiyoung Kim # switch to ELF 6166*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 6167*735d6239SKiyoung Kim ;; 6168*735d6239SKiyoung Kim 6169*735d6239SKiyoung Kim freebsd-elf*) 6170*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6171*735d6239SKiyoung Kim ;; 6172*735d6239SKiyoung Kim 6173*735d6239SKiyoung Kim freebsd* | dragonfly*) 6174*735d6239SKiyoung Kim # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6175*735d6239SKiyoung Kim # conventions 6176*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=yes 6177*735d6239SKiyoung Kim ;; 6178*735d6239SKiyoung Kim 6179*735d6239SKiyoung Kim gnu*) 6180*735d6239SKiyoung Kim ;; 6181*735d6239SKiyoung Kim 6182*735d6239SKiyoung Kim haiku*) 6183*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6184*735d6239SKiyoung Kim _LT_TAGVAR(link_all_deplibs, $1)=yes 6185*735d6239SKiyoung Kim ;; 6186*735d6239SKiyoung Kim 6187*735d6239SKiyoung Kim hpux9*) 6188*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6189*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6190*735d6239SKiyoung Kim _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6191*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct, $1)=yes 6192*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6193*735d6239SKiyoung Kim # but as the default 6194*735d6239SKiyoung Kim # location of the library. 6195*735d6239SKiyoung Kim 6196*735d6239SKiyoung Kim case $cc_basename in 6197*735d6239SKiyoung Kim CC*) 6198*735d6239SKiyoung Kim # FIXME: insert proper C++ library support 6199*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 6200*735d6239SKiyoung Kim ;; 6201*735d6239SKiyoung Kim aCC*) 6202*735d6239SKiyoung Kim _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' 6203*735d6239SKiyoung Kim # Commands to make compiler produce verbose output that lists 6204*735d6239SKiyoung Kim # what "hidden" libraries, object files and flags are used when 6205*735d6239SKiyoung Kim # linking a shared library. 6206*735d6239SKiyoung Kim # 6207*735d6239SKiyoung Kim # There doesn't appear to be a way to prevent this compiler from 6208*735d6239SKiyoung Kim # explicitly linking system object files so we need to strip them 6209*735d6239SKiyoung Kim # from the output so that they don't get included in the library 6210*735d6239SKiyoung Kim # dependencies. 6211*735d6239SKiyoung Kim 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"' 6212*735d6239SKiyoung Kim ;; 6213*735d6239SKiyoung Kim *) 6214*735d6239SKiyoung Kim if test "$GXX" = yes; then 6215*735d6239SKiyoung Kim _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' 6216*735d6239SKiyoung Kim else 6217*735d6239SKiyoung Kim # FIXME: insert proper C++ library support 6218*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 6219*735d6239SKiyoung Kim fi 6220*735d6239SKiyoung Kim ;; 6221*735d6239SKiyoung Kim esac 6222*735d6239SKiyoung Kim ;; 6223*735d6239SKiyoung Kim 6224*735d6239SKiyoung Kim hpux10*|hpux11*) 6225*735d6239SKiyoung Kim if test $with_gnu_ld = no; then 6226*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6227*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6228*735d6239SKiyoung Kim 6229*735d6239SKiyoung Kim case $host_cpu in 6230*735d6239SKiyoung Kim hppa*64*|ia64*) 6231*735d6239SKiyoung Kim ;; 6232*735d6239SKiyoung Kim *) 6233*735d6239SKiyoung Kim _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6234*735d6239SKiyoung Kim ;; 6235*735d6239SKiyoung Kim esac 6236*735d6239SKiyoung Kim fi 6237*735d6239SKiyoung Kim case $host_cpu in 6238*735d6239SKiyoung Kim hppa*64*|ia64*) 6239*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct, $1)=no 6240*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6241*735d6239SKiyoung Kim ;; 6242*735d6239SKiyoung Kim *) 6243*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct, $1)=yes 6244*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6245*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6246*735d6239SKiyoung Kim # but as the default 6247*735d6239SKiyoung Kim # location of the library. 6248*735d6239SKiyoung Kim ;; 6249*735d6239SKiyoung Kim esac 6250*735d6239SKiyoung Kim 6251*735d6239SKiyoung Kim case $cc_basename in 6252*735d6239SKiyoung Kim CC*) 6253*735d6239SKiyoung Kim # FIXME: insert proper C++ library support 6254*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 6255*735d6239SKiyoung Kim ;; 6256*735d6239SKiyoung Kim aCC*) 6257*735d6239SKiyoung Kim case $host_cpu in 6258*735d6239SKiyoung Kim hppa*64*) 6259*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6260*735d6239SKiyoung Kim ;; 6261*735d6239SKiyoung Kim ia64*) 6262*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6263*735d6239SKiyoung Kim ;; 6264*735d6239SKiyoung Kim *) 6265*735d6239SKiyoung Kim _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' 6266*735d6239SKiyoung Kim ;; 6267*735d6239SKiyoung Kim esac 6268*735d6239SKiyoung Kim # Commands to make compiler produce verbose output that lists 6269*735d6239SKiyoung Kim # what "hidden" libraries, object files and flags are used when 6270*735d6239SKiyoung Kim # linking a shared library. 6271*735d6239SKiyoung Kim # 6272*735d6239SKiyoung Kim # There doesn't appear to be a way to prevent this compiler from 6273*735d6239SKiyoung Kim # explicitly linking system object files so we need to strip them 6274*735d6239SKiyoung Kim # from the output so that they don't get included in the library 6275*735d6239SKiyoung Kim # dependencies. 6276*735d6239SKiyoung Kim 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"' 6277*735d6239SKiyoung Kim ;; 6278*735d6239SKiyoung Kim *) 6279*735d6239SKiyoung Kim if test "$GXX" = yes; then 6280*735d6239SKiyoung Kim if test $with_gnu_ld = no; then 6281*735d6239SKiyoung Kim case $host_cpu in 6282*735d6239SKiyoung Kim hppa*64*) 6283*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6284*735d6239SKiyoung Kim ;; 6285*735d6239SKiyoung Kim ia64*) 6286*735d6239SKiyoung Kim _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' 6287*735d6239SKiyoung Kim ;; 6288*735d6239SKiyoung Kim *) 6289*735d6239SKiyoung Kim _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' 6290*735d6239SKiyoung Kim ;; 6291*735d6239SKiyoung Kim esac 6292*735d6239SKiyoung Kim fi 6293*735d6239SKiyoung Kim else 6294*735d6239SKiyoung Kim # FIXME: insert proper C++ library support 6295*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 6296*735d6239SKiyoung Kim fi 6297*735d6239SKiyoung Kim ;; 6298*735d6239SKiyoung Kim esac 6299*735d6239SKiyoung Kim ;; 6300*735d6239SKiyoung Kim 6301*735d6239SKiyoung Kim interix[[3-9]]*) 6302*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct, $1)=no 6303*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6304*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6305*735d6239SKiyoung Kim _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6306*735d6239SKiyoung Kim # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6307*735d6239SKiyoung Kim # Instead, shared libraries are loaded at an image base (0x10000000 by 6308*735d6239SKiyoung Kim # default) and relocated if they conflict, which is a slow very memory 6309*735d6239SKiyoung Kim # consuming and fragmenting process. To avoid this, we pick a random, 6310*735d6239SKiyoung Kim # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6311*735d6239SKiyoung Kim # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6312*735d6239SKiyoung Kim _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' 6313*735d6239SKiyoung Kim _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' 6314*735d6239SKiyoung Kim ;; 6315*735d6239SKiyoung Kim irix5* | irix6*) 6316*735d6239SKiyoung Kim case $cc_basename in 6317*735d6239SKiyoung Kim CC*) 6318*735d6239SKiyoung Kim # SGI C++ 6319*735d6239SKiyoung Kim _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' 6320*735d6239SKiyoung Kim 6321*735d6239SKiyoung Kim # Archives containing C++ object files must be created using 6322*735d6239SKiyoung Kim # "CC -ar", where "CC" is the IRIX C++ compiler. This is 6323*735d6239SKiyoung Kim # necessary to make sure instantiated templates are included 6324*735d6239SKiyoung Kim # in the archive. 6325*735d6239SKiyoung Kim _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6326*735d6239SKiyoung Kim ;; 6327*735d6239SKiyoung Kim *) 6328*735d6239SKiyoung Kim if test "$GXX" = yes; then 6329*735d6239SKiyoung Kim if test "$with_gnu_ld" = no; then 6330*735d6239SKiyoung Kim _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' 6331*735d6239SKiyoung Kim else 6332*735d6239SKiyoung Kim _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' 6333*735d6239SKiyoung Kim fi 6334*735d6239SKiyoung Kim fi 6335*735d6239SKiyoung Kim _LT_TAGVAR(link_all_deplibs, $1)=yes 6336*735d6239SKiyoung Kim ;; 6337*735d6239SKiyoung Kim esac 6338*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6339*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6340*735d6239SKiyoung Kim _LT_TAGVAR(inherit_rpath, $1)=yes 6341*735d6239SKiyoung Kim ;; 6342*735d6239SKiyoung Kim 6343*735d6239SKiyoung Kim linux* | k*bsd*-gnu | kopensolaris*-gnu) 6344*735d6239SKiyoung Kim case $cc_basename in 6345*735d6239SKiyoung Kim KCC*) 6346*735d6239SKiyoung Kim # Kuck and Associates, Inc. (KAI) C++ Compiler 6347*735d6239SKiyoung Kim 6348*735d6239SKiyoung Kim # KCC will only create a shared library if the output file 6349*735d6239SKiyoung Kim # ends with ".so" (or ".sl" for HP-UX), so rename the library 6350*735d6239SKiyoung Kim # to its proper name (with version) after linking. 6351*735d6239SKiyoung Kim _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' 6352*735d6239SKiyoung Kim _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' 6353*735d6239SKiyoung Kim # Commands to make compiler produce verbose output that lists 6354*735d6239SKiyoung Kim # what "hidden" libraries, object files and flags are used when 6355*735d6239SKiyoung Kim # linking a shared library. 6356*735d6239SKiyoung Kim # 6357*735d6239SKiyoung Kim # There doesn't appear to be a way to prevent this compiler from 6358*735d6239SKiyoung Kim # explicitly linking system object files so we need to strip them 6359*735d6239SKiyoung Kim # from the output so that they don't get included in the library 6360*735d6239SKiyoung Kim # dependencies. 6361*735d6239SKiyoung Kim 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"' 6362*735d6239SKiyoung Kim 6363*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6364*735d6239SKiyoung Kim _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6365*735d6239SKiyoung Kim 6366*735d6239SKiyoung Kim # Archives containing C++ object files must be created using 6367*735d6239SKiyoung Kim # "CC -Bstatic", where "CC" is the KAI C++ compiler. 6368*735d6239SKiyoung Kim _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 6369*735d6239SKiyoung Kim ;; 6370*735d6239SKiyoung Kim icpc* | ecpc* ) 6371*735d6239SKiyoung Kim # Intel C++ 6372*735d6239SKiyoung Kim with_gnu_ld=yes 6373*735d6239SKiyoung Kim # version 8.0 and above of icpc choke on multiply defined symbols 6374*735d6239SKiyoung Kim # if we add $predep_objects and $postdep_objects, however 7.1 and 6375*735d6239SKiyoung Kim # earlier do not add the objects themselves. 6376*735d6239SKiyoung Kim case `$CC -V 2>&1` in 6377*735d6239SKiyoung Kim *"Version 7."*) 6378*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6379*735d6239SKiyoung Kim _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' 6380*735d6239SKiyoung Kim ;; 6381*735d6239SKiyoung Kim *) # Version 8.0 or newer 6382*735d6239SKiyoung Kim tmp_idyn= 6383*735d6239SKiyoung Kim case $host_cpu in 6384*735d6239SKiyoung Kim ia64*) tmp_idyn=' -i_dynamic';; 6385*735d6239SKiyoung Kim esac 6386*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6387*735d6239SKiyoung Kim _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' 6388*735d6239SKiyoung Kim ;; 6389*735d6239SKiyoung Kim esac 6390*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6391*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6392*735d6239SKiyoung Kim _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6393*735d6239SKiyoung Kim _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6394*735d6239SKiyoung Kim ;; 6395*735d6239SKiyoung Kim pgCC* | pgcpp*) 6396*735d6239SKiyoung Kim # Portland Group C++ compiler 6397*735d6239SKiyoung Kim case `$CC -V` in 6398*735d6239SKiyoung Kim *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 6399*735d6239SKiyoung Kim _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 6400*735d6239SKiyoung Kim rm -rf $tpldir~ 6401*735d6239SKiyoung Kim $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 6402*735d6239SKiyoung Kim compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 6403*735d6239SKiyoung Kim _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 6404*735d6239SKiyoung Kim rm -rf $tpldir~ 6405*735d6239SKiyoung Kim $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 6406*735d6239SKiyoung Kim $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 6407*735d6239SKiyoung Kim $RANLIB $oldlib' 6408*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 6409*735d6239SKiyoung Kim rm -rf $tpldir~ 6410*735d6239SKiyoung Kim $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6411*735d6239SKiyoung Kim $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6412*735d6239SKiyoung Kim _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 6413*735d6239SKiyoung Kim rm -rf $tpldir~ 6414*735d6239SKiyoung Kim $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6415*735d6239SKiyoung Kim $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' 6416*735d6239SKiyoung Kim ;; 6417*735d6239SKiyoung Kim *) # Version 6 and above use weak symbols 6418*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6419*735d6239SKiyoung Kim _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' 6420*735d6239SKiyoung Kim ;; 6421*735d6239SKiyoung Kim esac 6422*735d6239SKiyoung Kim 6423*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 6424*735d6239SKiyoung Kim _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6425*735d6239SKiyoung Kim _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' 6426*735d6239SKiyoung Kim ;; 6427*735d6239SKiyoung Kim cxx*) 6428*735d6239SKiyoung Kim # Compaq C++ 6429*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6430*735d6239SKiyoung Kim _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' 6431*735d6239SKiyoung Kim 6432*735d6239SKiyoung Kim runpath_var=LD_RUN_PATH 6433*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6434*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6435*735d6239SKiyoung Kim 6436*735d6239SKiyoung Kim # Commands to make compiler produce verbose output that lists 6437*735d6239SKiyoung Kim # what "hidden" libraries, object files and flags are used when 6438*735d6239SKiyoung Kim # linking a shared library. 6439*735d6239SKiyoung Kim # 6440*735d6239SKiyoung Kim # There doesn't appear to be a way to prevent this compiler from 6441*735d6239SKiyoung Kim # explicitly linking system object files so we need to strip them 6442*735d6239SKiyoung Kim # from the output so that they don't get included in the library 6443*735d6239SKiyoung Kim # dependencies. 6444*735d6239SKiyoung Kim 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' 6445*735d6239SKiyoung Kim ;; 6446*735d6239SKiyoung Kim xl* | mpixl* | bgxl*) 6447*735d6239SKiyoung Kim # IBM XL 8.0 on PPC, with GNU ld 6448*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6449*735d6239SKiyoung Kim _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6450*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6451*735d6239SKiyoung Kim if test "x$supports_anon_versioning" = xyes; then 6452*735d6239SKiyoung Kim _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 6453*735d6239SKiyoung Kim cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6454*735d6239SKiyoung Kim echo "local: *; };" >> $output_objdir/$libname.ver~ 6455*735d6239SKiyoung Kim $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 6456*735d6239SKiyoung Kim fi 6457*735d6239SKiyoung Kim ;; 6458*735d6239SKiyoung Kim *) 6459*735d6239SKiyoung Kim case `$CC -V 2>&1 | sed 5q` in 6460*735d6239SKiyoung Kim *Sun\ C*) 6461*735d6239SKiyoung Kim # Sun C++ 5.9 6462*735d6239SKiyoung Kim _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6463*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6464*735d6239SKiyoung Kim _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' 6465*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6466*735d6239SKiyoung Kim _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' 6467*735d6239SKiyoung Kim _LT_TAGVAR(compiler_needs_object, $1)=yes 6468*735d6239SKiyoung Kim 6469*735d6239SKiyoung Kim # Not sure whether something based on 6470*735d6239SKiyoung Kim # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 6471*735d6239SKiyoung Kim # would be better. 6472*735d6239SKiyoung Kim output_verbose_link_cmd='func_echo_all' 6473*735d6239SKiyoung Kim 6474*735d6239SKiyoung Kim # Archives containing C++ object files must be created using 6475*735d6239SKiyoung Kim # "CC -xar", where "CC" is the Sun C++ compiler. This is 6476*735d6239SKiyoung Kim # necessary to make sure instantiated templates are included 6477*735d6239SKiyoung Kim # in the archive. 6478*735d6239SKiyoung Kim _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6479*735d6239SKiyoung Kim ;; 6480*735d6239SKiyoung Kim esac 6481*735d6239SKiyoung Kim ;; 6482*735d6239SKiyoung Kim esac 6483*735d6239SKiyoung Kim ;; 6484*735d6239SKiyoung Kim 6485*735d6239SKiyoung Kim lynxos*) 6486*735d6239SKiyoung Kim # FIXME: insert proper C++ library support 6487*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 6488*735d6239SKiyoung Kim ;; 6489*735d6239SKiyoung Kim 6490*735d6239SKiyoung Kim m88k*) 6491*735d6239SKiyoung Kim # FIXME: insert proper C++ library support 6492*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 6493*735d6239SKiyoung Kim ;; 6494*735d6239SKiyoung Kim 6495*735d6239SKiyoung Kim mvs*) 6496*735d6239SKiyoung Kim case $cc_basename in 6497*735d6239SKiyoung Kim cxx*) 6498*735d6239SKiyoung Kim # FIXME: insert proper C++ library support 6499*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 6500*735d6239SKiyoung Kim ;; 6501*735d6239SKiyoung Kim *) 6502*735d6239SKiyoung Kim # FIXME: insert proper C++ library support 6503*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 6504*735d6239SKiyoung Kim ;; 6505*735d6239SKiyoung Kim esac 6506*735d6239SKiyoung Kim ;; 6507*735d6239SKiyoung Kim 6508*735d6239SKiyoung Kim netbsd*) 6509*735d6239SKiyoung Kim if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6510*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 6511*735d6239SKiyoung Kim wlarc= 6512*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6513*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct, $1)=yes 6514*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6515*735d6239SKiyoung Kim fi 6516*735d6239SKiyoung Kim # Workaround some broken pre-1.5 toolchains 6517*735d6239SKiyoung Kim output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 6518*735d6239SKiyoung Kim ;; 6519*735d6239SKiyoung Kim 6520*735d6239SKiyoung Kim *nto* | *qnx*) 6521*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=yes 6522*735d6239SKiyoung Kim ;; 6523*735d6239SKiyoung Kim 6524*735d6239SKiyoung Kim openbsd2*) 6525*735d6239SKiyoung Kim # C++ shared libraries are fairly broken 6526*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 6527*735d6239SKiyoung Kim ;; 6528*735d6239SKiyoung Kim 6529*735d6239SKiyoung Kim openbsd*) 6530*735d6239SKiyoung Kim if test -f /usr/libexec/ld.so; then 6531*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct, $1)=yes 6532*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6533*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6534*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6535*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6536*735d6239SKiyoung Kim if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6537*735d6239SKiyoung Kim _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' 6538*735d6239SKiyoung Kim _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6539*735d6239SKiyoung Kim _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6540*735d6239SKiyoung Kim fi 6541*735d6239SKiyoung Kim output_verbose_link_cmd=func_echo_all 6542*735d6239SKiyoung Kim else 6543*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 6544*735d6239SKiyoung Kim fi 6545*735d6239SKiyoung Kim ;; 6546*735d6239SKiyoung Kim 6547*735d6239SKiyoung Kim osf3* | osf4* | osf5*) 6548*735d6239SKiyoung Kim case $cc_basename in 6549*735d6239SKiyoung Kim KCC*) 6550*735d6239SKiyoung Kim # Kuck and Associates, Inc. (KAI) C++ Compiler 6551*735d6239SKiyoung Kim 6552*735d6239SKiyoung Kim # KCC will only create a shared library if the output file 6553*735d6239SKiyoung Kim # ends with ".so" (or ".sl" for HP-UX), so rename the library 6554*735d6239SKiyoung Kim # to its proper name (with version) after linking. 6555*735d6239SKiyoung Kim _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' 6556*735d6239SKiyoung Kim 6557*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6558*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6559*735d6239SKiyoung Kim 6560*735d6239SKiyoung Kim # Archives containing C++ object files must be created using 6561*735d6239SKiyoung Kim # the KAI C++ compiler. 6562*735d6239SKiyoung Kim case $host in 6563*735d6239SKiyoung Kim osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 6564*735d6239SKiyoung Kim *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 6565*735d6239SKiyoung Kim esac 6566*735d6239SKiyoung Kim ;; 6567*735d6239SKiyoung Kim RCC*) 6568*735d6239SKiyoung Kim # Rational C++ 2.4.1 6569*735d6239SKiyoung Kim # FIXME: insert proper C++ library support 6570*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 6571*735d6239SKiyoung Kim ;; 6572*735d6239SKiyoung Kim cxx*) 6573*735d6239SKiyoung Kim case $host in 6574*735d6239SKiyoung Kim osf3*) 6575*735d6239SKiyoung Kim _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6576*735d6239SKiyoung Kim _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' 6577*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6578*735d6239SKiyoung Kim ;; 6579*735d6239SKiyoung Kim *) 6580*735d6239SKiyoung Kim _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6581*735d6239SKiyoung Kim _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' 6582*735d6239SKiyoung Kim _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 6583*735d6239SKiyoung Kim echo "-hidden">> $lib.exp~ 6584*735d6239SKiyoung Kim $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~ 6585*735d6239SKiyoung Kim $RM $lib.exp' 6586*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6587*735d6239SKiyoung Kim ;; 6588*735d6239SKiyoung Kim esac 6589*735d6239SKiyoung Kim 6590*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6591*735d6239SKiyoung Kim 6592*735d6239SKiyoung Kim # Commands to make compiler produce verbose output that lists 6593*735d6239SKiyoung Kim # what "hidden" libraries, object files and flags are used when 6594*735d6239SKiyoung Kim # linking a shared library. 6595*735d6239SKiyoung Kim # 6596*735d6239SKiyoung Kim # There doesn't appear to be a way to prevent this compiler from 6597*735d6239SKiyoung Kim # explicitly linking system object files so we need to strip them 6598*735d6239SKiyoung Kim # from the output so that they don't get included in the library 6599*735d6239SKiyoung Kim # dependencies. 6600*735d6239SKiyoung Kim 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"' 6601*735d6239SKiyoung Kim ;; 6602*735d6239SKiyoung Kim *) 6603*735d6239SKiyoung Kim if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6604*735d6239SKiyoung Kim _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6605*735d6239SKiyoung Kim case $host in 6606*735d6239SKiyoung Kim osf3*) 6607*735d6239SKiyoung Kim _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' 6608*735d6239SKiyoung Kim ;; 6609*735d6239SKiyoung Kim *) 6610*735d6239SKiyoung Kim _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' 6611*735d6239SKiyoung Kim ;; 6612*735d6239SKiyoung Kim esac 6613*735d6239SKiyoung Kim 6614*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6615*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6616*735d6239SKiyoung Kim 6617*735d6239SKiyoung Kim # Commands to make compiler produce verbose output that lists 6618*735d6239SKiyoung Kim # what "hidden" libraries, object files and flags are used when 6619*735d6239SKiyoung Kim # linking a shared library. 6620*735d6239SKiyoung Kim output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6621*735d6239SKiyoung Kim 6622*735d6239SKiyoung Kim else 6623*735d6239SKiyoung Kim # FIXME: insert proper C++ library support 6624*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 6625*735d6239SKiyoung Kim fi 6626*735d6239SKiyoung Kim ;; 6627*735d6239SKiyoung Kim esac 6628*735d6239SKiyoung Kim ;; 6629*735d6239SKiyoung Kim 6630*735d6239SKiyoung Kim psos*) 6631*735d6239SKiyoung Kim # FIXME: insert proper C++ library support 6632*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 6633*735d6239SKiyoung Kim ;; 6634*735d6239SKiyoung Kim 6635*735d6239SKiyoung Kim sunos4*) 6636*735d6239SKiyoung Kim case $cc_basename in 6637*735d6239SKiyoung Kim CC*) 6638*735d6239SKiyoung Kim # Sun C++ 4.x 6639*735d6239SKiyoung Kim # FIXME: insert proper C++ library support 6640*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 6641*735d6239SKiyoung Kim ;; 6642*735d6239SKiyoung Kim lcc*) 6643*735d6239SKiyoung Kim # Lucid 6644*735d6239SKiyoung Kim # FIXME: insert proper C++ library support 6645*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 6646*735d6239SKiyoung Kim ;; 6647*735d6239SKiyoung Kim *) 6648*735d6239SKiyoung Kim # FIXME: insert proper C++ library support 6649*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 6650*735d6239SKiyoung Kim ;; 6651*735d6239SKiyoung Kim esac 6652*735d6239SKiyoung Kim ;; 6653*735d6239SKiyoung Kim 6654*735d6239SKiyoung Kim solaris*) 6655*735d6239SKiyoung Kim case $cc_basename in 6656*735d6239SKiyoung Kim CC* | sunCC*) 6657*735d6239SKiyoung Kim # Sun C++ 4.2, 5.x and Centerline C++ 6658*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 6659*735d6239SKiyoung Kim _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6660*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6661*735d6239SKiyoung Kim _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6662*735d6239SKiyoung Kim $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' 6663*735d6239SKiyoung Kim 6664*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6665*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6666*735d6239SKiyoung Kim case $host_os in 6667*735d6239SKiyoung Kim solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6668*735d6239SKiyoung Kim *) 6669*735d6239SKiyoung Kim # The compiler driver will combine and reorder linker options, 6670*735d6239SKiyoung Kim # but understands `-z linker_flag'. 6671*735d6239SKiyoung Kim # Supported since Solaris 2.6 (maybe 2.5.1?) 6672*735d6239SKiyoung Kim _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6673*735d6239SKiyoung Kim ;; 6674*735d6239SKiyoung Kim esac 6675*735d6239SKiyoung Kim _LT_TAGVAR(link_all_deplibs, $1)=yes 6676*735d6239SKiyoung Kim 6677*735d6239SKiyoung Kim output_verbose_link_cmd='func_echo_all' 6678*735d6239SKiyoung Kim 6679*735d6239SKiyoung Kim # Archives containing C++ object files must be created using 6680*735d6239SKiyoung Kim # "CC -xar", where "CC" is the Sun C++ compiler. This is 6681*735d6239SKiyoung Kim # necessary to make sure instantiated templates are included 6682*735d6239SKiyoung Kim # in the archive. 6683*735d6239SKiyoung Kim _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6684*735d6239SKiyoung Kim ;; 6685*735d6239SKiyoung Kim gcx*) 6686*735d6239SKiyoung Kim # Green Hills C++ Compiler 6687*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6688*735d6239SKiyoung Kim 6689*735d6239SKiyoung Kim # The C++ compiler must be used to create the archive. 6690*735d6239SKiyoung Kim _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 6691*735d6239SKiyoung Kim ;; 6692*735d6239SKiyoung Kim *) 6693*735d6239SKiyoung Kim # GNU C++ compiler with Solaris linker 6694*735d6239SKiyoung Kim if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6695*735d6239SKiyoung Kim _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 6696*735d6239SKiyoung Kim if $CC --version | $GREP -v '^2\.7' > /dev/null; then 6697*735d6239SKiyoung Kim _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' 6698*735d6239SKiyoung Kim _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6699*735d6239SKiyoung Kim $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6700*735d6239SKiyoung Kim 6701*735d6239SKiyoung Kim # Commands to make compiler produce verbose output that lists 6702*735d6239SKiyoung Kim # what "hidden" libraries, object files and flags are used when 6703*735d6239SKiyoung Kim # linking a shared library. 6704*735d6239SKiyoung Kim output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6705*735d6239SKiyoung Kim else 6706*735d6239SKiyoung Kim # g++ 2.7 appears to require `-G' NOT `-shared' on this 6707*735d6239SKiyoung Kim # platform. 6708*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6709*735d6239SKiyoung Kim _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6710*735d6239SKiyoung Kim $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6711*735d6239SKiyoung Kim 6712*735d6239SKiyoung Kim # Commands to make compiler produce verbose output that lists 6713*735d6239SKiyoung Kim # what "hidden" libraries, object files and flags are used when 6714*735d6239SKiyoung Kim # linking a shared library. 6715*735d6239SKiyoung Kim output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6716*735d6239SKiyoung Kim fi 6717*735d6239SKiyoung Kim 6718*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 6719*735d6239SKiyoung Kim case $host_os in 6720*735d6239SKiyoung Kim solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6721*735d6239SKiyoung Kim *) 6722*735d6239SKiyoung Kim _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6723*735d6239SKiyoung Kim ;; 6724*735d6239SKiyoung Kim esac 6725*735d6239SKiyoung Kim fi 6726*735d6239SKiyoung Kim ;; 6727*735d6239SKiyoung Kim esac 6728*735d6239SKiyoung Kim ;; 6729*735d6239SKiyoung Kim 6730*735d6239SKiyoung Kim sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6731*735d6239SKiyoung Kim _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6732*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6733*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6734*735d6239SKiyoung Kim runpath_var='LD_RUN_PATH' 6735*735d6239SKiyoung Kim 6736*735d6239SKiyoung Kim case $cc_basename in 6737*735d6239SKiyoung Kim CC*) 6738*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6739*735d6239SKiyoung Kim _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6740*735d6239SKiyoung Kim ;; 6741*735d6239SKiyoung Kim *) 6742*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6743*735d6239SKiyoung Kim _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6744*735d6239SKiyoung Kim ;; 6745*735d6239SKiyoung Kim esac 6746*735d6239SKiyoung Kim ;; 6747*735d6239SKiyoung Kim 6748*735d6239SKiyoung Kim sysv5* | sco3.2v5* | sco5v6*) 6749*735d6239SKiyoung Kim # Note: We can NOT use -z defs as we might desire, because we do not 6750*735d6239SKiyoung Kim # link with -lc, and that would cause any symbols used from libc to 6751*735d6239SKiyoung Kim # always be unresolved, which means just about no library would 6752*735d6239SKiyoung Kim # ever link correctly. If we're not using GNU ld we use -z text 6753*735d6239SKiyoung Kim # though, which does catch some bad symbols but isn't as heavy-handed 6754*735d6239SKiyoung Kim # as -z defs. 6755*735d6239SKiyoung Kim _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6756*735d6239SKiyoung Kim _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6757*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6758*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6759*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6760*735d6239SKiyoung Kim _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6761*735d6239SKiyoung Kim _LT_TAGVAR(link_all_deplibs, $1)=yes 6762*735d6239SKiyoung Kim _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6763*735d6239SKiyoung Kim runpath_var='LD_RUN_PATH' 6764*735d6239SKiyoung Kim 6765*735d6239SKiyoung Kim case $cc_basename in 6766*735d6239SKiyoung Kim CC*) 6767*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6768*735d6239SKiyoung Kim _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6769*735d6239SKiyoung Kim _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 6770*735d6239SKiyoung Kim '"$_LT_TAGVAR(old_archive_cmds, $1)" 6771*735d6239SKiyoung Kim _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 6772*735d6239SKiyoung Kim '"$_LT_TAGVAR(reload_cmds, $1)" 6773*735d6239SKiyoung Kim ;; 6774*735d6239SKiyoung Kim *) 6775*735d6239SKiyoung Kim _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6776*735d6239SKiyoung Kim _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6777*735d6239SKiyoung Kim ;; 6778*735d6239SKiyoung Kim esac 6779*735d6239SKiyoung Kim ;; 6780*735d6239SKiyoung Kim 6781*735d6239SKiyoung Kim tandem*) 6782*735d6239SKiyoung Kim case $cc_basename in 6783*735d6239SKiyoung Kim NCC*) 6784*735d6239SKiyoung Kim # NonStop-UX NCC 3.20 6785*735d6239SKiyoung Kim # FIXME: insert proper C++ library support 6786*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 6787*735d6239SKiyoung Kim ;; 6788*735d6239SKiyoung Kim *) 6789*735d6239SKiyoung Kim # FIXME: insert proper C++ library support 6790*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 6791*735d6239SKiyoung Kim ;; 6792*735d6239SKiyoung Kim esac 6793*735d6239SKiyoung Kim ;; 6794*735d6239SKiyoung Kim 6795*735d6239SKiyoung Kim vxworks*) 6796*735d6239SKiyoung Kim # FIXME: insert proper C++ library support 6797*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 6798*735d6239SKiyoung Kim ;; 6799*735d6239SKiyoung Kim 6800*735d6239SKiyoung Kim *) 6801*735d6239SKiyoung Kim # FIXME: insert proper C++ library support 6802*735d6239SKiyoung Kim _LT_TAGVAR(ld_shlibs, $1)=no 6803*735d6239SKiyoung Kim ;; 6804*735d6239SKiyoung Kim esac 6805*735d6239SKiyoung Kim 6806*735d6239SKiyoung Kim AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6807*735d6239SKiyoung Kim test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6808*735d6239SKiyoung Kim 6809*735d6239SKiyoung Kim _LT_TAGVAR(GCC, $1)="$GXX" 6810*735d6239SKiyoung Kim _LT_TAGVAR(LD, $1)="$LD" 6811*735d6239SKiyoung Kim 6812*735d6239SKiyoung Kim ## CAVEAT EMPTOR: 6813*735d6239SKiyoung Kim ## There is no encapsulation within the following macros, do not change 6814*735d6239SKiyoung Kim ## the running order or otherwise move them around unless you know exactly 6815*735d6239SKiyoung Kim ## what you are doing... 6816*735d6239SKiyoung Kim _LT_SYS_HIDDEN_LIBDEPS($1) 6817*735d6239SKiyoung Kim _LT_COMPILER_PIC($1) 6818*735d6239SKiyoung Kim _LT_COMPILER_C_O($1) 6819*735d6239SKiyoung Kim _LT_COMPILER_FILE_LOCKS($1) 6820*735d6239SKiyoung Kim _LT_LINKER_SHLIBS($1) 6821*735d6239SKiyoung Kim _LT_SYS_DYNAMIC_LINKER($1) 6822*735d6239SKiyoung Kim _LT_LINKER_HARDCODE_LIBPATH($1) 6823*735d6239SKiyoung Kim 6824*735d6239SKiyoung Kim _LT_CONFIG($1) 6825*735d6239SKiyoung Kim fi # test -n "$compiler" 6826*735d6239SKiyoung Kim 6827*735d6239SKiyoung Kim CC=$lt_save_CC 6828*735d6239SKiyoung Kim CFLAGS=$lt_save_CFLAGS 6829*735d6239SKiyoung Kim LDCXX=$LD 6830*735d6239SKiyoung Kim LD=$lt_save_LD 6831*735d6239SKiyoung Kim GCC=$lt_save_GCC 6832*735d6239SKiyoung Kim with_gnu_ld=$lt_save_with_gnu_ld 6833*735d6239SKiyoung Kim lt_cv_path_LDCXX=$lt_cv_path_LD 6834*735d6239SKiyoung Kim lt_cv_path_LD=$lt_save_path_LD 6835*735d6239SKiyoung Kim lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 6836*735d6239SKiyoung Kim lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 6837*735d6239SKiyoung Kimfi # test "$_lt_caught_CXX_error" != yes 6838*735d6239SKiyoung Kim 6839*735d6239SKiyoung KimAC_LANG_POP 6840*735d6239SKiyoung Kim])# _LT_LANG_CXX_CONFIG 6841*735d6239SKiyoung Kim 6842*735d6239SKiyoung Kim 6843*735d6239SKiyoung Kim# _LT_FUNC_STRIPNAME_CNF 6844*735d6239SKiyoung Kim# ---------------------- 6845*735d6239SKiyoung Kim# func_stripname_cnf prefix suffix name 6846*735d6239SKiyoung Kim# strip PREFIX and SUFFIX off of NAME. 6847*735d6239SKiyoung Kim# PREFIX and SUFFIX must not contain globbing or regex special 6848*735d6239SKiyoung Kim# characters, hashes, percent signs, but SUFFIX may contain a leading 6849*735d6239SKiyoung Kim# dot (in which case that matches only a dot). 6850*735d6239SKiyoung Kim# 6851*735d6239SKiyoung Kim# This function is identical to the (non-XSI) version of func_stripname, 6852*735d6239SKiyoung Kim# except this one can be used by m4 code that may be executed by configure, 6853*735d6239SKiyoung Kim# rather than the libtool script. 6854*735d6239SKiyoung Kimm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 6855*735d6239SKiyoung KimAC_REQUIRE([_LT_DECL_SED]) 6856*735d6239SKiyoung KimAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 6857*735d6239SKiyoung Kimfunc_stripname_cnf () 6858*735d6239SKiyoung Kim{ 6859*735d6239SKiyoung Kim case ${2} in 6860*735d6239SKiyoung Kim .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 6861*735d6239SKiyoung Kim *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 6862*735d6239SKiyoung Kim esac 6863*735d6239SKiyoung Kim} # func_stripname_cnf 6864*735d6239SKiyoung Kim])# _LT_FUNC_STRIPNAME_CNF 6865*735d6239SKiyoung Kim 6866*735d6239SKiyoung Kim# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 6867*735d6239SKiyoung Kim# --------------------------------- 6868*735d6239SKiyoung Kim# Figure out "hidden" library dependencies from verbose 6869*735d6239SKiyoung Kim# compiler output when linking a shared library. 6870*735d6239SKiyoung Kim# Parse the compiler output and extract the necessary 6871*735d6239SKiyoung Kim# objects, libraries and library flags. 6872*735d6239SKiyoung Kimm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 6873*735d6239SKiyoung Kim[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6874*735d6239SKiyoung KimAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 6875*735d6239SKiyoung Kim# Dependencies to place before and after the object being linked: 6876*735d6239SKiyoung Kim_LT_TAGVAR(predep_objects, $1)= 6877*735d6239SKiyoung Kim_LT_TAGVAR(postdep_objects, $1)= 6878*735d6239SKiyoung Kim_LT_TAGVAR(predeps, $1)= 6879*735d6239SKiyoung Kim_LT_TAGVAR(postdeps, $1)= 6880*735d6239SKiyoung Kim_LT_TAGVAR(compiler_lib_search_path, $1)= 6881*735d6239SKiyoung Kim 6882*735d6239SKiyoung Kimdnl we can't use the lt_simple_compile_test_code here, 6883*735d6239SKiyoung Kimdnl because it contains code intended for an executable, 6884*735d6239SKiyoung Kimdnl not a library. It's possible we should let each 6885*735d6239SKiyoung Kimdnl tag define a new lt_????_link_test_code variable, 6886*735d6239SKiyoung Kimdnl but it's only used here... 6887*735d6239SKiyoung Kimm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 6888*735d6239SKiyoung Kimint a; 6889*735d6239SKiyoung Kimvoid foo (void) { a = 0; } 6890*735d6239SKiyoung Kim_LT_EOF 6891*735d6239SKiyoung Kim], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 6892*735d6239SKiyoung Kimclass Foo 6893*735d6239SKiyoung Kim{ 6894*735d6239SKiyoung Kimpublic: 6895*735d6239SKiyoung Kim Foo (void) { a = 0; } 6896*735d6239SKiyoung Kimprivate: 6897*735d6239SKiyoung Kim int a; 6898*735d6239SKiyoung Kim}; 6899*735d6239SKiyoung Kim_LT_EOF 6900*735d6239SKiyoung Kim], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 6901*735d6239SKiyoung Kim subroutine foo 6902*735d6239SKiyoung Kim implicit none 6903*735d6239SKiyoung Kim integer*4 a 6904*735d6239SKiyoung Kim a=0 6905*735d6239SKiyoung Kim return 6906*735d6239SKiyoung Kim end 6907*735d6239SKiyoung Kim_LT_EOF 6908*735d6239SKiyoung Kim], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 6909*735d6239SKiyoung Kim subroutine foo 6910*735d6239SKiyoung Kim implicit none 6911*735d6239SKiyoung Kim integer a 6912*735d6239SKiyoung Kim a=0 6913*735d6239SKiyoung Kim return 6914*735d6239SKiyoung Kim end 6915*735d6239SKiyoung Kim_LT_EOF 6916*735d6239SKiyoung Kim], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 6917*735d6239SKiyoung Kimpublic class foo { 6918*735d6239SKiyoung Kim private int a; 6919*735d6239SKiyoung Kim public void bar (void) { 6920*735d6239SKiyoung Kim a = 0; 6921*735d6239SKiyoung Kim } 6922*735d6239SKiyoung Kim}; 6923*735d6239SKiyoung Kim_LT_EOF 6924*735d6239SKiyoung Kim]) 6925*735d6239SKiyoung Kim 6926*735d6239SKiyoung Kim_lt_libdeps_save_CFLAGS=$CFLAGS 6927*735d6239SKiyoung Kimcase "$CC $CFLAGS " in #( 6928*735d6239SKiyoung Kim*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 6929*735d6239SKiyoung Kim*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 6930*735d6239SKiyoung Kimesac 6931*735d6239SKiyoung Kim 6932*735d6239SKiyoung Kimdnl Parse the compiler output and extract the necessary 6933*735d6239SKiyoung Kimdnl objects, libraries and library flags. 6934*735d6239SKiyoung Kimif AC_TRY_EVAL(ac_compile); then 6935*735d6239SKiyoung Kim # Parse the compiler output and extract the necessary 6936*735d6239SKiyoung Kim # objects, libraries and library flags. 6937*735d6239SKiyoung Kim 6938*735d6239SKiyoung Kim # Sentinel used to keep track of whether or not we are before 6939*735d6239SKiyoung Kim # the conftest object file. 6940*735d6239SKiyoung Kim pre_test_object_deps_done=no 6941*735d6239SKiyoung Kim 6942*735d6239SKiyoung Kim for p in `eval "$output_verbose_link_cmd"`; do 6943*735d6239SKiyoung Kim case ${prev}${p} in 6944*735d6239SKiyoung Kim 6945*735d6239SKiyoung Kim -L* | -R* | -l*) 6946*735d6239SKiyoung Kim # Some compilers place space between "-{L,R}" and the path. 6947*735d6239SKiyoung Kim # Remove the space. 6948*735d6239SKiyoung Kim if test $p = "-L" || 6949*735d6239SKiyoung Kim test $p = "-R"; then 6950*735d6239SKiyoung Kim prev=$p 6951*735d6239SKiyoung Kim continue 6952*735d6239SKiyoung Kim fi 6953*735d6239SKiyoung Kim 6954*735d6239SKiyoung Kim # Expand the sysroot to ease extracting the directories later. 6955*735d6239SKiyoung Kim if test -z "$prev"; then 6956*735d6239SKiyoung Kim case $p in 6957*735d6239SKiyoung Kim -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 6958*735d6239SKiyoung Kim -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 6959*735d6239SKiyoung Kim -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 6960*735d6239SKiyoung Kim esac 6961*735d6239SKiyoung Kim fi 6962*735d6239SKiyoung Kim case $p in 6963*735d6239SKiyoung Kim =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 6964*735d6239SKiyoung Kim esac 6965*735d6239SKiyoung Kim if test "$pre_test_object_deps_done" = no; then 6966*735d6239SKiyoung Kim case ${prev} in 6967*735d6239SKiyoung Kim -L | -R) 6968*735d6239SKiyoung Kim # Internal compiler library paths should come after those 6969*735d6239SKiyoung Kim # provided the user. The postdeps already come after the 6970*735d6239SKiyoung Kim # user supplied libs so there is no need to process them. 6971*735d6239SKiyoung Kim if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 6972*735d6239SKiyoung Kim _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 6973*735d6239SKiyoung Kim else 6974*735d6239SKiyoung Kim _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 6975*735d6239SKiyoung Kim fi 6976*735d6239SKiyoung Kim ;; 6977*735d6239SKiyoung Kim # The "-l" case would never come before the object being 6978*735d6239SKiyoung Kim # linked, so don't bother handling this case. 6979*735d6239SKiyoung Kim esac 6980*735d6239SKiyoung Kim else 6981*735d6239SKiyoung Kim if test -z "$_LT_TAGVAR(postdeps, $1)"; then 6982*735d6239SKiyoung Kim _LT_TAGVAR(postdeps, $1)="${prev}${p}" 6983*735d6239SKiyoung Kim else 6984*735d6239SKiyoung Kim _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 6985*735d6239SKiyoung Kim fi 6986*735d6239SKiyoung Kim fi 6987*735d6239SKiyoung Kim prev= 6988*735d6239SKiyoung Kim ;; 6989*735d6239SKiyoung Kim 6990*735d6239SKiyoung Kim *.lto.$objext) ;; # Ignore GCC LTO objects 6991*735d6239SKiyoung Kim *.$objext) 6992*735d6239SKiyoung Kim # This assumes that the test object file only shows up 6993*735d6239SKiyoung Kim # once in the compiler output. 6994*735d6239SKiyoung Kim if test "$p" = "conftest.$objext"; then 6995*735d6239SKiyoung Kim pre_test_object_deps_done=yes 6996*735d6239SKiyoung Kim continue 6997*735d6239SKiyoung Kim fi 6998*735d6239SKiyoung Kim 6999*735d6239SKiyoung Kim if test "$pre_test_object_deps_done" = no; then 7000*735d6239SKiyoung Kim if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7001*735d6239SKiyoung Kim _LT_TAGVAR(predep_objects, $1)="$p" 7002*735d6239SKiyoung Kim else 7003*735d6239SKiyoung Kim _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 7004*735d6239SKiyoung Kim fi 7005*735d6239SKiyoung Kim else 7006*735d6239SKiyoung Kim if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7007*735d6239SKiyoung Kim _LT_TAGVAR(postdep_objects, $1)="$p" 7008*735d6239SKiyoung Kim else 7009*735d6239SKiyoung Kim _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7010*735d6239SKiyoung Kim fi 7011*735d6239SKiyoung Kim fi 7012*735d6239SKiyoung Kim ;; 7013*735d6239SKiyoung Kim 7014*735d6239SKiyoung Kim *) ;; # Ignore the rest. 7015*735d6239SKiyoung Kim 7016*735d6239SKiyoung Kim esac 7017*735d6239SKiyoung Kim done 7018*735d6239SKiyoung Kim 7019*735d6239SKiyoung Kim # Clean up. 7020*735d6239SKiyoung Kim rm -f a.out a.exe 7021*735d6239SKiyoung Kimelse 7022*735d6239SKiyoung Kim echo "libtool.m4: error: problem compiling $1 test program" 7023*735d6239SKiyoung Kimfi 7024*735d6239SKiyoung Kim 7025*735d6239SKiyoung Kim$RM -f confest.$objext 7026*735d6239SKiyoung KimCFLAGS=$_lt_libdeps_save_CFLAGS 7027*735d6239SKiyoung Kim 7028*735d6239SKiyoung Kim# PORTME: override above test on systems where it is broken 7029*735d6239SKiyoung Kimm4_if([$1], [CXX], 7030*735d6239SKiyoung Kim[case $host_os in 7031*735d6239SKiyoung Kiminterix[[3-9]]*) 7032*735d6239SKiyoung Kim # Interix 3.5 installs completely hosed .la files for C++, so rather than 7033*735d6239SKiyoung Kim # hack all around it, let's just trust "g++" to DTRT. 7034*735d6239SKiyoung Kim _LT_TAGVAR(predep_objects,$1)= 7035*735d6239SKiyoung Kim _LT_TAGVAR(postdep_objects,$1)= 7036*735d6239SKiyoung Kim _LT_TAGVAR(postdeps,$1)= 7037*735d6239SKiyoung Kim ;; 7038*735d6239SKiyoung Kim 7039*735d6239SKiyoung Kimlinux*) 7040*735d6239SKiyoung Kim case `$CC -V 2>&1 | sed 5q` in 7041*735d6239SKiyoung Kim *Sun\ C*) 7042*735d6239SKiyoung Kim # Sun C++ 5.9 7043*735d6239SKiyoung Kim 7044*735d6239SKiyoung Kim # The more standards-conforming stlport4 library is 7045*735d6239SKiyoung Kim # incompatible with the Cstd library. Avoid specifying 7046*735d6239SKiyoung Kim # it if it's in CXXFLAGS. Ignore libCrun as 7047*735d6239SKiyoung Kim # -library=stlport4 depends on it. 7048*735d6239SKiyoung Kim case " $CXX $CXXFLAGS " in 7049*735d6239SKiyoung Kim *" -library=stlport4 "*) 7050*735d6239SKiyoung Kim solaris_use_stlport4=yes 7051*735d6239SKiyoung Kim ;; 7052*735d6239SKiyoung Kim esac 7053*735d6239SKiyoung Kim 7054*735d6239SKiyoung Kim if test "$solaris_use_stlport4" != yes; then 7055*735d6239SKiyoung Kim _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 7056*735d6239SKiyoung Kim fi 7057*735d6239SKiyoung Kim ;; 7058*735d6239SKiyoung Kim esac 7059*735d6239SKiyoung Kim ;; 7060*735d6239SKiyoung Kim 7061*735d6239SKiyoung Kimsolaris*) 7062*735d6239SKiyoung Kim case $cc_basename in 7063*735d6239SKiyoung Kim CC* | sunCC*) 7064*735d6239SKiyoung Kim # The more standards-conforming stlport4 library is 7065*735d6239SKiyoung Kim # incompatible with the Cstd library. Avoid specifying 7066*735d6239SKiyoung Kim # it if it's in CXXFLAGS. Ignore libCrun as 7067*735d6239SKiyoung Kim # -library=stlport4 depends on it. 7068*735d6239SKiyoung Kim case " $CXX $CXXFLAGS " in 7069*735d6239SKiyoung Kim *" -library=stlport4 "*) 7070*735d6239SKiyoung Kim solaris_use_stlport4=yes 7071*735d6239SKiyoung Kim ;; 7072*735d6239SKiyoung Kim esac 7073*735d6239SKiyoung Kim 7074*735d6239SKiyoung Kim # Adding this requires a known-good setup of shared libraries for 7075*735d6239SKiyoung Kim # Sun compiler versions before 5.6, else PIC objects from an old 7076*735d6239SKiyoung Kim # archive will be linked into the output, leading to subtle bugs. 7077*735d6239SKiyoung Kim if test "$solaris_use_stlport4" != yes; then 7078*735d6239SKiyoung Kim _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 7079*735d6239SKiyoung Kim fi 7080*735d6239SKiyoung Kim ;; 7081*735d6239SKiyoung Kim esac 7082*735d6239SKiyoung Kim ;; 7083*735d6239SKiyoung Kimesac 7084*735d6239SKiyoung Kim]) 7085*735d6239SKiyoung Kim 7086*735d6239SKiyoung Kimcase " $_LT_TAGVAR(postdeps, $1) " in 7087*735d6239SKiyoung Kim*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 7088*735d6239SKiyoung Kimesac 7089*735d6239SKiyoung Kim _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7090*735d6239SKiyoung Kimif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7091*735d6239SKiyoung Kim _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 7092*735d6239SKiyoung Kimfi 7093*735d6239SKiyoung Kim_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7094*735d6239SKiyoung Kim [The directories searched by this compiler when creating a shared library]) 7095*735d6239SKiyoung Kim_LT_TAGDECL([], [predep_objects], [1], 7096*735d6239SKiyoung Kim [Dependencies to place before and after the objects being linked to 7097*735d6239SKiyoung Kim create a shared library]) 7098*735d6239SKiyoung Kim_LT_TAGDECL([], [postdep_objects], [1]) 7099*735d6239SKiyoung Kim_LT_TAGDECL([], [predeps], [1]) 7100*735d6239SKiyoung Kim_LT_TAGDECL([], [postdeps], [1]) 7101*735d6239SKiyoung Kim_LT_TAGDECL([], [compiler_lib_search_path], [1], 7102*735d6239SKiyoung Kim [The library search path used internally by the compiler when linking 7103*735d6239SKiyoung Kim a shared library]) 7104*735d6239SKiyoung Kim])# _LT_SYS_HIDDEN_LIBDEPS 7105*735d6239SKiyoung Kim 7106*735d6239SKiyoung Kim 7107*735d6239SKiyoung Kim# _LT_LANG_F77_CONFIG([TAG]) 7108*735d6239SKiyoung Kim# -------------------------- 7109*735d6239SKiyoung Kim# Ensure that the configuration variables for a Fortran 77 compiler are 7110*735d6239SKiyoung Kim# suitably defined. These variables are subsequently used by _LT_CONFIG 7111*735d6239SKiyoung Kim# to write the compiler configuration to `libtool'. 7112*735d6239SKiyoung Kimm4_defun([_LT_LANG_F77_CONFIG], 7113*735d6239SKiyoung Kim[AC_LANG_PUSH(Fortran 77) 7114*735d6239SKiyoung Kimif test -z "$F77" || test "X$F77" = "Xno"; then 7115*735d6239SKiyoung Kim _lt_disable_F77=yes 7116*735d6239SKiyoung Kimfi 7117*735d6239SKiyoung Kim 7118*735d6239SKiyoung Kim_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7119*735d6239SKiyoung Kim_LT_TAGVAR(allow_undefined_flag, $1)= 7120*735d6239SKiyoung Kim_LT_TAGVAR(always_export_symbols, $1)=no 7121*735d6239SKiyoung Kim_LT_TAGVAR(archive_expsym_cmds, $1)= 7122*735d6239SKiyoung Kim_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7123*735d6239SKiyoung Kim_LT_TAGVAR(hardcode_direct, $1)=no 7124*735d6239SKiyoung Kim_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7125*735d6239SKiyoung Kim_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7126*735d6239SKiyoung Kim_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 7127*735d6239SKiyoung Kim_LT_TAGVAR(hardcode_libdir_separator, $1)= 7128*735d6239SKiyoung Kim_LT_TAGVAR(hardcode_minus_L, $1)=no 7129*735d6239SKiyoung Kim_LT_TAGVAR(hardcode_automatic, $1)=no 7130*735d6239SKiyoung Kim_LT_TAGVAR(inherit_rpath, $1)=no 7131*735d6239SKiyoung Kim_LT_TAGVAR(module_cmds, $1)= 7132*735d6239SKiyoung Kim_LT_TAGVAR(module_expsym_cmds, $1)= 7133*735d6239SKiyoung Kim_LT_TAGVAR(link_all_deplibs, $1)=unknown 7134*735d6239SKiyoung Kim_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7135*735d6239SKiyoung Kim_LT_TAGVAR(reload_flag, $1)=$reload_flag 7136*735d6239SKiyoung Kim_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7137*735d6239SKiyoung Kim_LT_TAGVAR(no_undefined_flag, $1)= 7138*735d6239SKiyoung Kim_LT_TAGVAR(whole_archive_flag_spec, $1)= 7139*735d6239SKiyoung Kim_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7140*735d6239SKiyoung Kim 7141*735d6239SKiyoung Kim# Source file extension for f77 test sources. 7142*735d6239SKiyoung Kimac_ext=f 7143*735d6239SKiyoung Kim 7144*735d6239SKiyoung Kim# Object file extension for compiled f77 test sources. 7145*735d6239SKiyoung Kimobjext=o 7146*735d6239SKiyoung Kim_LT_TAGVAR(objext, $1)=$objext 7147*735d6239SKiyoung Kim 7148*735d6239SKiyoung Kim# No sense in running all these tests if we already determined that 7149*735d6239SKiyoung Kim# the F77 compiler isn't working. Some variables (like enable_shared) 7150*735d6239SKiyoung Kim# are currently assumed to apply to all compilers on this platform, 7151*735d6239SKiyoung Kim# and will be corrupted by setting them based on a non-working compiler. 7152*735d6239SKiyoung Kimif test "$_lt_disable_F77" != yes; then 7153*735d6239SKiyoung Kim # Code to be used in simple compile tests 7154*735d6239SKiyoung Kim lt_simple_compile_test_code="\ 7155*735d6239SKiyoung Kim subroutine t 7156*735d6239SKiyoung Kim return 7157*735d6239SKiyoung Kim end 7158*735d6239SKiyoung Kim" 7159*735d6239SKiyoung Kim 7160*735d6239SKiyoung Kim # Code to be used in simple link tests 7161*735d6239SKiyoung Kim lt_simple_link_test_code="\ 7162*735d6239SKiyoung Kim program t 7163*735d6239SKiyoung Kim end 7164*735d6239SKiyoung Kim" 7165*735d6239SKiyoung Kim 7166*735d6239SKiyoung Kim # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7167*735d6239SKiyoung Kim _LT_TAG_COMPILER 7168*735d6239SKiyoung Kim 7169*735d6239SKiyoung Kim # save warnings/boilerplate of simple test code 7170*735d6239SKiyoung Kim _LT_COMPILER_BOILERPLATE 7171*735d6239SKiyoung Kim _LT_LINKER_BOILERPLATE 7172*735d6239SKiyoung Kim 7173*735d6239SKiyoung Kim # Allow CC to be a program name with arguments. 7174*735d6239SKiyoung Kim lt_save_CC="$CC" 7175*735d6239SKiyoung Kim lt_save_GCC=$GCC 7176*735d6239SKiyoung Kim lt_save_CFLAGS=$CFLAGS 7177*735d6239SKiyoung Kim CC=${F77-"f77"} 7178*735d6239SKiyoung Kim CFLAGS=$FFLAGS 7179*735d6239SKiyoung Kim compiler=$CC 7180*735d6239SKiyoung Kim _LT_TAGVAR(compiler, $1)=$CC 7181*735d6239SKiyoung Kim _LT_CC_BASENAME([$compiler]) 7182*735d6239SKiyoung Kim GCC=$G77 7183*735d6239SKiyoung Kim if test -n "$compiler"; then 7184*735d6239SKiyoung Kim AC_MSG_CHECKING([if libtool supports shared libraries]) 7185*735d6239SKiyoung Kim AC_MSG_RESULT([$can_build_shared]) 7186*735d6239SKiyoung Kim 7187*735d6239SKiyoung Kim AC_MSG_CHECKING([whether to build shared libraries]) 7188*735d6239SKiyoung Kim test "$can_build_shared" = "no" && enable_shared=no 7189*735d6239SKiyoung Kim 7190*735d6239SKiyoung Kim # On AIX, shared libraries and static libraries use the same namespace, and 7191*735d6239SKiyoung Kim # are all built from PIC. 7192*735d6239SKiyoung Kim case $host_os in 7193*735d6239SKiyoung Kim aix3*) 7194*735d6239SKiyoung Kim test "$enable_shared" = yes && enable_static=no 7195*735d6239SKiyoung Kim if test -n "$RANLIB"; then 7196*735d6239SKiyoung Kim archive_cmds="$archive_cmds~\$RANLIB \$lib" 7197*735d6239SKiyoung Kim postinstall_cmds='$RANLIB $lib' 7198*735d6239SKiyoung Kim fi 7199*735d6239SKiyoung Kim ;; 7200*735d6239SKiyoung Kim aix[[4-9]]*) 7201*735d6239SKiyoung Kim if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7202*735d6239SKiyoung Kim test "$enable_shared" = yes && enable_static=no 7203*735d6239SKiyoung Kim fi 7204*735d6239SKiyoung Kim ;; 7205*735d6239SKiyoung Kim esac 7206*735d6239SKiyoung Kim AC_MSG_RESULT([$enable_shared]) 7207*735d6239SKiyoung Kim 7208*735d6239SKiyoung Kim AC_MSG_CHECKING([whether to build static libraries]) 7209*735d6239SKiyoung Kim # Make sure either enable_shared or enable_static is yes. 7210*735d6239SKiyoung Kim test "$enable_shared" = yes || enable_static=yes 7211*735d6239SKiyoung Kim AC_MSG_RESULT([$enable_static]) 7212*735d6239SKiyoung Kim 7213*735d6239SKiyoung Kim _LT_TAGVAR(GCC, $1)="$G77" 7214*735d6239SKiyoung Kim _LT_TAGVAR(LD, $1)="$LD" 7215*735d6239SKiyoung Kim 7216*735d6239SKiyoung Kim ## CAVEAT EMPTOR: 7217*735d6239SKiyoung Kim ## There is no encapsulation within the following macros, do not change 7218*735d6239SKiyoung Kim ## the running order or otherwise move them around unless you know exactly 7219*735d6239SKiyoung Kim ## what you are doing... 7220*735d6239SKiyoung Kim _LT_COMPILER_PIC($1) 7221*735d6239SKiyoung Kim _LT_COMPILER_C_O($1) 7222*735d6239SKiyoung Kim _LT_COMPILER_FILE_LOCKS($1) 7223*735d6239SKiyoung Kim _LT_LINKER_SHLIBS($1) 7224*735d6239SKiyoung Kim _LT_SYS_DYNAMIC_LINKER($1) 7225*735d6239SKiyoung Kim _LT_LINKER_HARDCODE_LIBPATH($1) 7226*735d6239SKiyoung Kim 7227*735d6239SKiyoung Kim _LT_CONFIG($1) 7228*735d6239SKiyoung Kim fi # test -n "$compiler" 7229*735d6239SKiyoung Kim 7230*735d6239SKiyoung Kim GCC=$lt_save_GCC 7231*735d6239SKiyoung Kim CC="$lt_save_CC" 7232*735d6239SKiyoung Kim CFLAGS="$lt_save_CFLAGS" 7233*735d6239SKiyoung Kimfi # test "$_lt_disable_F77" != yes 7234*735d6239SKiyoung Kim 7235*735d6239SKiyoung KimAC_LANG_POP 7236*735d6239SKiyoung Kim])# _LT_LANG_F77_CONFIG 7237*735d6239SKiyoung Kim 7238*735d6239SKiyoung Kim 7239*735d6239SKiyoung Kim# _LT_LANG_FC_CONFIG([TAG]) 7240*735d6239SKiyoung Kim# ------------------------- 7241*735d6239SKiyoung Kim# Ensure that the configuration variables for a Fortran compiler are 7242*735d6239SKiyoung Kim# suitably defined. These variables are subsequently used by _LT_CONFIG 7243*735d6239SKiyoung Kim# to write the compiler configuration to `libtool'. 7244*735d6239SKiyoung Kimm4_defun([_LT_LANG_FC_CONFIG], 7245*735d6239SKiyoung Kim[AC_LANG_PUSH(Fortran) 7246*735d6239SKiyoung Kim 7247*735d6239SKiyoung Kimif test -z "$FC" || test "X$FC" = "Xno"; then 7248*735d6239SKiyoung Kim _lt_disable_FC=yes 7249*735d6239SKiyoung Kimfi 7250*735d6239SKiyoung Kim 7251*735d6239SKiyoung Kim_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7252*735d6239SKiyoung Kim_LT_TAGVAR(allow_undefined_flag, $1)= 7253*735d6239SKiyoung Kim_LT_TAGVAR(always_export_symbols, $1)=no 7254*735d6239SKiyoung Kim_LT_TAGVAR(archive_expsym_cmds, $1)= 7255*735d6239SKiyoung Kim_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7256*735d6239SKiyoung Kim_LT_TAGVAR(hardcode_direct, $1)=no 7257*735d6239SKiyoung Kim_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7258*735d6239SKiyoung Kim_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7259*735d6239SKiyoung Kim_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 7260*735d6239SKiyoung Kim_LT_TAGVAR(hardcode_libdir_separator, $1)= 7261*735d6239SKiyoung Kim_LT_TAGVAR(hardcode_minus_L, $1)=no 7262*735d6239SKiyoung Kim_LT_TAGVAR(hardcode_automatic, $1)=no 7263*735d6239SKiyoung Kim_LT_TAGVAR(inherit_rpath, $1)=no 7264*735d6239SKiyoung Kim_LT_TAGVAR(module_cmds, $1)= 7265*735d6239SKiyoung Kim_LT_TAGVAR(module_expsym_cmds, $1)= 7266*735d6239SKiyoung Kim_LT_TAGVAR(link_all_deplibs, $1)=unknown 7267*735d6239SKiyoung Kim_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7268*735d6239SKiyoung Kim_LT_TAGVAR(reload_flag, $1)=$reload_flag 7269*735d6239SKiyoung Kim_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7270*735d6239SKiyoung Kim_LT_TAGVAR(no_undefined_flag, $1)= 7271*735d6239SKiyoung Kim_LT_TAGVAR(whole_archive_flag_spec, $1)= 7272*735d6239SKiyoung Kim_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7273*735d6239SKiyoung Kim 7274*735d6239SKiyoung Kim# Source file extension for fc test sources. 7275*735d6239SKiyoung Kimac_ext=${ac_fc_srcext-f} 7276*735d6239SKiyoung Kim 7277*735d6239SKiyoung Kim# Object file extension for compiled fc test sources. 7278*735d6239SKiyoung Kimobjext=o 7279*735d6239SKiyoung Kim_LT_TAGVAR(objext, $1)=$objext 7280*735d6239SKiyoung Kim 7281*735d6239SKiyoung Kim# No sense in running all these tests if we already determined that 7282*735d6239SKiyoung Kim# the FC compiler isn't working. Some variables (like enable_shared) 7283*735d6239SKiyoung Kim# are currently assumed to apply to all compilers on this platform, 7284*735d6239SKiyoung Kim# and will be corrupted by setting them based on a non-working compiler. 7285*735d6239SKiyoung Kimif test "$_lt_disable_FC" != yes; then 7286*735d6239SKiyoung Kim # Code to be used in simple compile tests 7287*735d6239SKiyoung Kim lt_simple_compile_test_code="\ 7288*735d6239SKiyoung Kim subroutine t 7289*735d6239SKiyoung Kim return 7290*735d6239SKiyoung Kim end 7291*735d6239SKiyoung Kim" 7292*735d6239SKiyoung Kim 7293*735d6239SKiyoung Kim # Code to be used in simple link tests 7294*735d6239SKiyoung Kim lt_simple_link_test_code="\ 7295*735d6239SKiyoung Kim program t 7296*735d6239SKiyoung Kim end 7297*735d6239SKiyoung Kim" 7298*735d6239SKiyoung Kim 7299*735d6239SKiyoung Kim # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7300*735d6239SKiyoung Kim _LT_TAG_COMPILER 7301*735d6239SKiyoung Kim 7302*735d6239SKiyoung Kim # save warnings/boilerplate of simple test code 7303*735d6239SKiyoung Kim _LT_COMPILER_BOILERPLATE 7304*735d6239SKiyoung Kim _LT_LINKER_BOILERPLATE 7305*735d6239SKiyoung Kim 7306*735d6239SKiyoung Kim # Allow CC to be a program name with arguments. 7307*735d6239SKiyoung Kim lt_save_CC="$CC" 7308*735d6239SKiyoung Kim lt_save_GCC=$GCC 7309*735d6239SKiyoung Kim lt_save_CFLAGS=$CFLAGS 7310*735d6239SKiyoung Kim CC=${FC-"f95"} 7311*735d6239SKiyoung Kim CFLAGS=$FCFLAGS 7312*735d6239SKiyoung Kim compiler=$CC 7313*735d6239SKiyoung Kim GCC=$ac_cv_fc_compiler_gnu 7314*735d6239SKiyoung Kim 7315*735d6239SKiyoung Kim _LT_TAGVAR(compiler, $1)=$CC 7316*735d6239SKiyoung Kim _LT_CC_BASENAME([$compiler]) 7317*735d6239SKiyoung Kim 7318*735d6239SKiyoung Kim if test -n "$compiler"; then 7319*735d6239SKiyoung Kim AC_MSG_CHECKING([if libtool supports shared libraries]) 7320*735d6239SKiyoung Kim AC_MSG_RESULT([$can_build_shared]) 7321*735d6239SKiyoung Kim 7322*735d6239SKiyoung Kim AC_MSG_CHECKING([whether to build shared libraries]) 7323*735d6239SKiyoung Kim test "$can_build_shared" = "no" && enable_shared=no 7324*735d6239SKiyoung Kim 7325*735d6239SKiyoung Kim # On AIX, shared libraries and static libraries use the same namespace, and 7326*735d6239SKiyoung Kim # are all built from PIC. 7327*735d6239SKiyoung Kim case $host_os in 7328*735d6239SKiyoung Kim aix3*) 7329*735d6239SKiyoung Kim test "$enable_shared" = yes && enable_static=no 7330*735d6239SKiyoung Kim if test -n "$RANLIB"; then 7331*735d6239SKiyoung Kim archive_cmds="$archive_cmds~\$RANLIB \$lib" 7332*735d6239SKiyoung Kim postinstall_cmds='$RANLIB $lib' 7333*735d6239SKiyoung Kim fi 7334*735d6239SKiyoung Kim ;; 7335*735d6239SKiyoung Kim aix[[4-9]]*) 7336*735d6239SKiyoung Kim if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7337*735d6239SKiyoung Kim test "$enable_shared" = yes && enable_static=no 7338*735d6239SKiyoung Kim fi 7339*735d6239SKiyoung Kim ;; 7340*735d6239SKiyoung Kim esac 7341*735d6239SKiyoung Kim AC_MSG_RESULT([$enable_shared]) 7342*735d6239SKiyoung Kim 7343*735d6239SKiyoung Kim AC_MSG_CHECKING([whether to build static libraries]) 7344*735d6239SKiyoung Kim # Make sure either enable_shared or enable_static is yes. 7345*735d6239SKiyoung Kim test "$enable_shared" = yes || enable_static=yes 7346*735d6239SKiyoung Kim AC_MSG_RESULT([$enable_static]) 7347*735d6239SKiyoung Kim 7348*735d6239SKiyoung Kim _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 7349*735d6239SKiyoung Kim _LT_TAGVAR(LD, $1)="$LD" 7350*735d6239SKiyoung Kim 7351*735d6239SKiyoung Kim ## CAVEAT EMPTOR: 7352*735d6239SKiyoung Kim ## There is no encapsulation within the following macros, do not change 7353*735d6239SKiyoung Kim ## the running order or otherwise move them around unless you know exactly 7354*735d6239SKiyoung Kim ## what you are doing... 7355*735d6239SKiyoung Kim _LT_SYS_HIDDEN_LIBDEPS($1) 7356*735d6239SKiyoung Kim _LT_COMPILER_PIC($1) 7357*735d6239SKiyoung Kim _LT_COMPILER_C_O($1) 7358*735d6239SKiyoung Kim _LT_COMPILER_FILE_LOCKS($1) 7359*735d6239SKiyoung Kim _LT_LINKER_SHLIBS($1) 7360*735d6239SKiyoung Kim _LT_SYS_DYNAMIC_LINKER($1) 7361*735d6239SKiyoung Kim _LT_LINKER_HARDCODE_LIBPATH($1) 7362*735d6239SKiyoung Kim 7363*735d6239SKiyoung Kim _LT_CONFIG($1) 7364*735d6239SKiyoung Kim fi # test -n "$compiler" 7365*735d6239SKiyoung Kim 7366*735d6239SKiyoung Kim GCC=$lt_save_GCC 7367*735d6239SKiyoung Kim CC=$lt_save_CC 7368*735d6239SKiyoung Kim CFLAGS=$lt_save_CFLAGS 7369*735d6239SKiyoung Kimfi # test "$_lt_disable_FC" != yes 7370*735d6239SKiyoung Kim 7371*735d6239SKiyoung KimAC_LANG_POP 7372*735d6239SKiyoung Kim])# _LT_LANG_FC_CONFIG 7373*735d6239SKiyoung Kim 7374*735d6239SKiyoung Kim 7375*735d6239SKiyoung Kim# _LT_LANG_GCJ_CONFIG([TAG]) 7376*735d6239SKiyoung Kim# -------------------------- 7377*735d6239SKiyoung Kim# Ensure that the configuration variables for the GNU Java Compiler compiler 7378*735d6239SKiyoung Kim# are suitably defined. These variables are subsequently used by _LT_CONFIG 7379*735d6239SKiyoung Kim# to write the compiler configuration to `libtool'. 7380*735d6239SKiyoung Kimm4_defun([_LT_LANG_GCJ_CONFIG], 7381*735d6239SKiyoung Kim[AC_REQUIRE([LT_PROG_GCJ])dnl 7382*735d6239SKiyoung KimAC_LANG_SAVE 7383*735d6239SKiyoung Kim 7384*735d6239SKiyoung Kim# Source file extension for Java test sources. 7385*735d6239SKiyoung Kimac_ext=java 7386*735d6239SKiyoung Kim 7387*735d6239SKiyoung Kim# Object file extension for compiled Java test sources. 7388*735d6239SKiyoung Kimobjext=o 7389*735d6239SKiyoung Kim_LT_TAGVAR(objext, $1)=$objext 7390*735d6239SKiyoung Kim 7391*735d6239SKiyoung Kim# Code to be used in simple compile tests 7392*735d6239SKiyoung Kimlt_simple_compile_test_code="class foo {}" 7393*735d6239SKiyoung Kim 7394*735d6239SKiyoung Kim# Code to be used in simple link tests 7395*735d6239SKiyoung Kimlt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 7396*735d6239SKiyoung Kim 7397*735d6239SKiyoung Kim# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7398*735d6239SKiyoung Kim_LT_TAG_COMPILER 7399*735d6239SKiyoung Kim 7400*735d6239SKiyoung Kim# Allow CC to be a program name with arguments. 7401*735d6239SKiyoung Kimlt_save_CC=$CC 7402*735d6239SKiyoung Kimlt_save_CFLAGS=$CFLAGS 7403*735d6239SKiyoung Kimlt_save_GCC=$GCC 7404*735d6239SKiyoung KimGCC=yes 7405*735d6239SKiyoung KimCC=${GCJ-"gcj"} 7406*735d6239SKiyoung KimCFLAGS=$GCJFLAGS 7407*735d6239SKiyoung Kimcompiler=$CC 7408*735d6239SKiyoung Kim_LT_TAGVAR(compiler, $1)=$CC 7409*735d6239SKiyoung Kim_LT_TAGVAR(LD, $1)="$LD" 7410*735d6239SKiyoung Kim_LT_CC_BASENAME([$compiler]) 7411*735d6239SKiyoung Kim 7412*735d6239SKiyoung Kimac_compile='$CC -c $GCJFLAGS conftest.$ac_ext >&AS_MESSAGE_LOG_FD' 7413*735d6239SKiyoung Kimac_link='$CC -o conftest$ac_exeext --main=conftest $GCJFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AS_MESSAGE_LOG_FD' 7414*735d6239SKiyoung Kim 7415*735d6239SKiyoung Kim# save warnings/boilerplate of simple test code 7416*735d6239SKiyoung Kim_LT_COMPILER_BOILERPLATE 7417*735d6239SKiyoung Kim_LT_LINKER_BOILERPLATE 7418*735d6239SKiyoung Kim 7419*735d6239SKiyoung Kim# GCJ did not exist at the time GCC didn't implicitly link libc in. 7420*735d6239SKiyoung Kim_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7421*735d6239SKiyoung Kim 7422*735d6239SKiyoung Kim_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7423*735d6239SKiyoung Kim_LT_TAGVAR(reload_flag, $1)=$reload_flag 7424*735d6239SKiyoung Kim_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7425*735d6239SKiyoung Kim 7426*735d6239SKiyoung Kim## CAVEAT EMPTOR: 7427*735d6239SKiyoung Kim## There is no encapsulation within the following macros, do not change 7428*735d6239SKiyoung Kim## the running order or otherwise move them around unless you know exactly 7429*735d6239SKiyoung Kim## what you are doing... 7430*735d6239SKiyoung Kimif test -n "$compiler"; then 7431*735d6239SKiyoung Kim _LT_COMPILER_NO_RTTI($1) 7432*735d6239SKiyoung Kim _LT_COMPILER_PIC($1) 7433*735d6239SKiyoung Kim _LT_COMPILER_C_O($1) 7434*735d6239SKiyoung Kim _LT_COMPILER_FILE_LOCKS($1) 7435*735d6239SKiyoung Kim _LT_LINKER_SHLIBS($1) 7436*735d6239SKiyoung Kim _LT_LINKER_HARDCODE_LIBPATH($1) 7437*735d6239SKiyoung Kim 7438*735d6239SKiyoung Kim _LT_CONFIG($1) 7439*735d6239SKiyoung Kimfi 7440*735d6239SKiyoung Kim 7441*735d6239SKiyoung KimAC_LANG_RESTORE 7442*735d6239SKiyoung Kim 7443*735d6239SKiyoung KimGCC=$lt_save_GCC 7444*735d6239SKiyoung KimCC=$lt_save_CC 7445*735d6239SKiyoung KimCFLAGS=$lt_save_CFLAGS 7446*735d6239SKiyoung Kim])# _LT_LANG_GCJ_CONFIG 7447*735d6239SKiyoung Kim 7448*735d6239SKiyoung Kim 7449*735d6239SKiyoung Kim# _LT_LANG_RC_CONFIG([TAG]) 7450*735d6239SKiyoung Kim# ------------------------- 7451*735d6239SKiyoung Kim# Ensure that the configuration variables for the Windows resource compiler 7452*735d6239SKiyoung Kim# are suitably defined. These variables are subsequently used by _LT_CONFIG 7453*735d6239SKiyoung Kim# to write the compiler configuration to `libtool'. 7454*735d6239SKiyoung Kimm4_defun([_LT_LANG_RC_CONFIG], 7455*735d6239SKiyoung Kim[AC_REQUIRE([LT_PROG_RC])dnl 7456*735d6239SKiyoung KimAC_LANG_SAVE 7457*735d6239SKiyoung Kim 7458*735d6239SKiyoung Kim# Source file extension for RC test sources. 7459*735d6239SKiyoung Kimac_ext=rc 7460*735d6239SKiyoung Kim 7461*735d6239SKiyoung Kim# Object file extension for compiled RC test sources. 7462*735d6239SKiyoung Kimobjext=o 7463*735d6239SKiyoung Kim_LT_TAGVAR(objext, $1)=$objext 7464*735d6239SKiyoung Kim 7465*735d6239SKiyoung Kim# Code to be used in simple compile tests 7466*735d6239SKiyoung Kimlt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 7467*735d6239SKiyoung Kim 7468*735d6239SKiyoung Kim# Code to be used in simple link tests 7469*735d6239SKiyoung Kimlt_simple_link_test_code="$lt_simple_compile_test_code" 7470*735d6239SKiyoung Kim 7471*735d6239SKiyoung Kim# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7472*735d6239SKiyoung Kim_LT_TAG_COMPILER 7473*735d6239SKiyoung Kim 7474*735d6239SKiyoung Kim# save warnings/boilerplate of simple test code 7475*735d6239SKiyoung Kim_LT_COMPILER_BOILERPLATE 7476*735d6239SKiyoung Kim_LT_LINKER_BOILERPLATE 7477*735d6239SKiyoung Kim 7478*735d6239SKiyoung Kim# Allow CC to be a program name with arguments. 7479*735d6239SKiyoung Kimlt_save_CC="$CC" 7480*735d6239SKiyoung Kimlt_save_CFLAGS=$CFLAGS 7481*735d6239SKiyoung Kimlt_save_GCC=$GCC 7482*735d6239SKiyoung KimGCC= 7483*735d6239SKiyoung KimCC=${RC-"windres"} 7484*735d6239SKiyoung KimCFLAGS= 7485*735d6239SKiyoung Kimcompiler=$CC 7486*735d6239SKiyoung Kim_LT_TAGVAR(compiler, $1)=$CC 7487*735d6239SKiyoung Kim_LT_CC_BASENAME([$compiler]) 7488*735d6239SKiyoung Kim_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 7489*735d6239SKiyoung Kim 7490*735d6239SKiyoung Kimif test -n "$compiler"; then 7491*735d6239SKiyoung Kim : 7492*735d6239SKiyoung Kim _LT_CONFIG($1) 7493*735d6239SKiyoung Kimfi 7494*735d6239SKiyoung Kim 7495*735d6239SKiyoung KimGCC=$lt_save_GCC 7496*735d6239SKiyoung KimAC_LANG_RESTORE 7497*735d6239SKiyoung KimCC=$lt_save_CC 7498*735d6239SKiyoung KimCFLAGS=$lt_save_CFLAGS 7499*735d6239SKiyoung Kim])# _LT_LANG_RC_CONFIG 7500*735d6239SKiyoung Kim 7501*735d6239SKiyoung Kim 7502*735d6239SKiyoung Kim# LT_PROG_GCJ 7503*735d6239SKiyoung Kim# ----------- 7504*735d6239SKiyoung KimAC_DEFUN([LT_PROG_GCJ], 7505*735d6239SKiyoung Kim[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 7506*735d6239SKiyoung Kim [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 7507*735d6239SKiyoung Kim [AC_CHECK_TOOL(GCJ, gcj,) 7508*735d6239SKiyoung Kim test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 7509*735d6239SKiyoung Kim AC_SUBST(GCJFLAGS)])])[]dnl 7510*735d6239SKiyoung Kim]) 7511*735d6239SKiyoung Kim 7512*735d6239SKiyoung Kim# Old name: 7513*735d6239SKiyoung KimAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 7514*735d6239SKiyoung Kimdnl aclocal-1.4 backwards compatibility: 7515*735d6239SKiyoung Kimdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 7516*735d6239SKiyoung Kim 7517*735d6239SKiyoung Kim 7518*735d6239SKiyoung Kim# LT_PROG_RC 7519*735d6239SKiyoung Kim# ---------- 7520*735d6239SKiyoung KimAC_DEFUN([LT_PROG_RC], 7521*735d6239SKiyoung Kim[AC_CHECK_TOOL(RC, windres,) 7522*735d6239SKiyoung Kim]) 7523*735d6239SKiyoung Kim 7524*735d6239SKiyoung Kim# Old name: 7525*735d6239SKiyoung KimAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 7526*735d6239SKiyoung Kimdnl aclocal-1.4 backwards compatibility: 7527*735d6239SKiyoung Kimdnl AC_DEFUN([LT_AC_PROG_RC], []) 7528*735d6239SKiyoung Kim 7529*735d6239SKiyoung Kim 7530*735d6239SKiyoung Kim# _LT_DECL_EGREP 7531*735d6239SKiyoung Kim# -------------- 7532*735d6239SKiyoung Kim# If we don't have a new enough Autoconf to choose the best grep 7533*735d6239SKiyoung Kim# available, choose the one first in the user's PATH. 7534*735d6239SKiyoung Kimm4_defun([_LT_DECL_EGREP], 7535*735d6239SKiyoung Kim[AC_REQUIRE([AC_PROG_EGREP])dnl 7536*735d6239SKiyoung KimAC_REQUIRE([AC_PROG_FGREP])dnl 7537*735d6239SKiyoung Kimtest -z "$GREP" && GREP=grep 7538*735d6239SKiyoung Kim_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 7539*735d6239SKiyoung Kim_LT_DECL([], [EGREP], [1], [An ERE matcher]) 7540*735d6239SKiyoung Kim_LT_DECL([], [FGREP], [1], [A literal string matcher]) 7541*735d6239SKiyoung Kimdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 7542*735d6239SKiyoung KimAC_SUBST([GREP]) 7543*735d6239SKiyoung Kim]) 7544*735d6239SKiyoung Kim 7545*735d6239SKiyoung Kim 7546*735d6239SKiyoung Kim# _LT_DECL_OBJDUMP 7547*735d6239SKiyoung Kim# -------------- 7548*735d6239SKiyoung Kim# If we don't have a new enough Autoconf to choose the best objdump 7549*735d6239SKiyoung Kim# available, choose the one first in the user's PATH. 7550*735d6239SKiyoung Kimm4_defun([_LT_DECL_OBJDUMP], 7551*735d6239SKiyoung Kim[AC_CHECK_TOOL(OBJDUMP, objdump, false) 7552*735d6239SKiyoung Kimtest -z "$OBJDUMP" && OBJDUMP=objdump 7553*735d6239SKiyoung Kim_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 7554*735d6239SKiyoung KimAC_SUBST([OBJDUMP]) 7555*735d6239SKiyoung Kim]) 7556*735d6239SKiyoung Kim 7557*735d6239SKiyoung Kim# _LT_DECL_DLLTOOL 7558*735d6239SKiyoung Kim# ---------------- 7559*735d6239SKiyoung Kim# Ensure DLLTOOL variable is set. 7560*735d6239SKiyoung Kimm4_defun([_LT_DECL_DLLTOOL], 7561*735d6239SKiyoung Kim[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7562*735d6239SKiyoung Kimtest -z "$DLLTOOL" && DLLTOOL=dlltool 7563*735d6239SKiyoung Kim_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 7564*735d6239SKiyoung KimAC_SUBST([DLLTOOL]) 7565*735d6239SKiyoung Kim]) 7566*735d6239SKiyoung Kim 7567*735d6239SKiyoung Kim# _LT_DECL_SED 7568*735d6239SKiyoung Kim# ------------ 7569*735d6239SKiyoung Kim# Check for a fully-functional sed program, that truncates 7570*735d6239SKiyoung Kim# as few characters as possible. Prefer GNU sed if found. 7571*735d6239SKiyoung Kimm4_defun([_LT_DECL_SED], 7572*735d6239SKiyoung Kim[AC_PROG_SED 7573*735d6239SKiyoung Kimtest -z "$SED" && SED=sed 7574*735d6239SKiyoung KimXsed="$SED -e 1s/^X//" 7575*735d6239SKiyoung Kim_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 7576*735d6239SKiyoung Kim_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 7577*735d6239SKiyoung Kim [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 7578*735d6239SKiyoung Kim])# _LT_DECL_SED 7579*735d6239SKiyoung Kim 7580*735d6239SKiyoung Kimm4_ifndef([AC_PROG_SED], [ 7581*735d6239SKiyoung Kim############################################################ 7582*735d6239SKiyoung Kim# NOTE: This macro has been submitted for inclusion into # 7583*735d6239SKiyoung Kim# GNU Autoconf as AC_PROG_SED. When it is available in # 7584*735d6239SKiyoung Kim# a released version of Autoconf we should remove this # 7585*735d6239SKiyoung Kim# macro and use it instead. # 7586*735d6239SKiyoung Kim############################################################ 7587*735d6239SKiyoung Kim 7588*735d6239SKiyoung Kimm4_defun([AC_PROG_SED], 7589*735d6239SKiyoung Kim[AC_MSG_CHECKING([for a sed that does not truncate output]) 7590*735d6239SKiyoung KimAC_CACHE_VAL(lt_cv_path_SED, 7591*735d6239SKiyoung Kim[# Loop through the user's path and test for sed and gsed. 7592*735d6239SKiyoung Kim# Then use that list of sed's as ones to test for truncation. 7593*735d6239SKiyoung Kimas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7594*735d6239SKiyoung Kimfor as_dir in $PATH 7595*735d6239SKiyoung Kimdo 7596*735d6239SKiyoung Kim IFS=$as_save_IFS 7597*735d6239SKiyoung Kim test -z "$as_dir" && as_dir=. 7598*735d6239SKiyoung Kim for lt_ac_prog in sed gsed; do 7599*735d6239SKiyoung Kim for ac_exec_ext in '' $ac_executable_extensions; do 7600*735d6239SKiyoung Kim if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 7601*735d6239SKiyoung Kim lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 7602*735d6239SKiyoung Kim fi 7603*735d6239SKiyoung Kim done 7604*735d6239SKiyoung Kim done 7605*735d6239SKiyoung Kimdone 7606*735d6239SKiyoung KimIFS=$as_save_IFS 7607*735d6239SKiyoung Kimlt_ac_max=0 7608*735d6239SKiyoung Kimlt_ac_count=0 7609*735d6239SKiyoung Kim# Add /usr/xpg4/bin/sed as it is typically found on Solaris 7610*735d6239SKiyoung Kim# along with /bin/sed that truncates output. 7611*735d6239SKiyoung Kimfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 7612*735d6239SKiyoung Kim test ! -f $lt_ac_sed && continue 7613*735d6239SKiyoung Kim cat /dev/null > conftest.in 7614*735d6239SKiyoung Kim lt_ac_count=0 7615*735d6239SKiyoung Kim echo $ECHO_N "0123456789$ECHO_C" >conftest.in 7616*735d6239SKiyoung Kim # Check for GNU sed and select it if it is found. 7617*735d6239SKiyoung Kim if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 7618*735d6239SKiyoung Kim lt_cv_path_SED=$lt_ac_sed 7619*735d6239SKiyoung Kim break 7620*735d6239SKiyoung Kim fi 7621*735d6239SKiyoung Kim while true; do 7622*735d6239SKiyoung Kim cat conftest.in conftest.in >conftest.tmp 7623*735d6239SKiyoung Kim mv conftest.tmp conftest.in 7624*735d6239SKiyoung Kim cp conftest.in conftest.nl 7625*735d6239SKiyoung Kim echo >>conftest.nl 7626*735d6239SKiyoung Kim $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 7627*735d6239SKiyoung Kim cmp -s conftest.out conftest.nl || break 7628*735d6239SKiyoung Kim # 10000 chars as input seems more than enough 7629*735d6239SKiyoung Kim test $lt_ac_count -gt 10 && break 7630*735d6239SKiyoung Kim lt_ac_count=`expr $lt_ac_count + 1` 7631*735d6239SKiyoung Kim if test $lt_ac_count -gt $lt_ac_max; then 7632*735d6239SKiyoung Kim lt_ac_max=$lt_ac_count 7633*735d6239SKiyoung Kim lt_cv_path_SED=$lt_ac_sed 7634*735d6239SKiyoung Kim fi 7635*735d6239SKiyoung Kim done 7636*735d6239SKiyoung Kimdone 7637*735d6239SKiyoung Kim]) 7638*735d6239SKiyoung KimSED=$lt_cv_path_SED 7639*735d6239SKiyoung KimAC_SUBST([SED]) 7640*735d6239SKiyoung KimAC_MSG_RESULT([$SED]) 7641*735d6239SKiyoung Kim])#AC_PROG_SED 7642*735d6239SKiyoung Kim])#m4_ifndef 7643*735d6239SKiyoung Kim 7644*735d6239SKiyoung Kim# Old name: 7645*735d6239SKiyoung KimAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 7646*735d6239SKiyoung Kimdnl aclocal-1.4 backwards compatibility: 7647*735d6239SKiyoung Kimdnl AC_DEFUN([LT_AC_PROG_SED], []) 7648*735d6239SKiyoung Kim 7649*735d6239SKiyoung Kim 7650*735d6239SKiyoung Kim# _LT_CHECK_SHELL_FEATURES 7651*735d6239SKiyoung Kim# ------------------------ 7652*735d6239SKiyoung Kim# Find out whether the shell is Bourne or XSI compatible, 7653*735d6239SKiyoung Kim# or has some other useful features. 7654*735d6239SKiyoung Kimm4_defun([_LT_CHECK_SHELL_FEATURES], 7655*735d6239SKiyoung Kim[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 7656*735d6239SKiyoung Kim# Try some XSI features 7657*735d6239SKiyoung Kimxsi_shell=no 7658*735d6239SKiyoung Kim( _lt_dummy="a/b/c" 7659*735d6239SKiyoung Kim test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 7660*735d6239SKiyoung Kim = c,a/b,b/c, \ 7661*735d6239SKiyoung Kim && eval 'test $(( 1 + 1 )) -eq 2 \ 7662*735d6239SKiyoung Kim && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 7663*735d6239SKiyoung Kim && xsi_shell=yes 7664*735d6239SKiyoung KimAC_MSG_RESULT([$xsi_shell]) 7665*735d6239SKiyoung Kim_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 7666*735d6239SKiyoung Kim 7667*735d6239SKiyoung KimAC_MSG_CHECKING([whether the shell understands "+="]) 7668*735d6239SKiyoung Kimlt_shell_append=no 7669*735d6239SKiyoung Kim( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 7670*735d6239SKiyoung Kim >/dev/null 2>&1 \ 7671*735d6239SKiyoung Kim && lt_shell_append=yes 7672*735d6239SKiyoung KimAC_MSG_RESULT([$lt_shell_append]) 7673*735d6239SKiyoung Kim_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 7674*735d6239SKiyoung Kim 7675*735d6239SKiyoung Kimif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 7676*735d6239SKiyoung Kim lt_unset=unset 7677*735d6239SKiyoung Kimelse 7678*735d6239SKiyoung Kim lt_unset=false 7679*735d6239SKiyoung Kimfi 7680*735d6239SKiyoung Kim_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 7681*735d6239SKiyoung Kim 7682*735d6239SKiyoung Kim# test EBCDIC or ASCII 7683*735d6239SKiyoung Kimcase `echo X|tr X '\101'` in 7684*735d6239SKiyoung Kim A) # ASCII based system 7685*735d6239SKiyoung Kim # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 7686*735d6239SKiyoung Kim lt_SP2NL='tr \040 \012' 7687*735d6239SKiyoung Kim lt_NL2SP='tr \015\012 \040\040' 7688*735d6239SKiyoung Kim ;; 7689*735d6239SKiyoung Kim *) # EBCDIC based system 7690*735d6239SKiyoung Kim lt_SP2NL='tr \100 \n' 7691*735d6239SKiyoung Kim lt_NL2SP='tr \r\n \100\100' 7692*735d6239SKiyoung Kim ;; 7693*735d6239SKiyoung Kimesac 7694*735d6239SKiyoung Kim_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 7695*735d6239SKiyoung Kim_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 7696*735d6239SKiyoung Kim])# _LT_CHECK_SHELL_FEATURES 7697*735d6239SKiyoung Kim 7698*735d6239SKiyoung Kim 7699*735d6239SKiyoung Kim# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 7700*735d6239SKiyoung Kim# ------------------------------------------------------ 7701*735d6239SKiyoung Kim# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 7702*735d6239SKiyoung Kim# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 7703*735d6239SKiyoung Kimm4_defun([_LT_PROG_FUNCTION_REPLACE], 7704*735d6239SKiyoung Kim[dnl { 7705*735d6239SKiyoung Kimsed -e '/^$1 ()$/,/^} # $1 /c\ 7706*735d6239SKiyoung Kim$1 ()\ 7707*735d6239SKiyoung Kim{\ 7708*735d6239SKiyoung Kimm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 7709*735d6239SKiyoung Kim} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 7710*735d6239SKiyoung Kim && mv -f "$cfgfile.tmp" "$cfgfile" \ 7711*735d6239SKiyoung Kim || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7712*735d6239SKiyoung Kimtest 0 -eq $? || _lt_function_replace_fail=: 7713*735d6239SKiyoung Kim]) 7714*735d6239SKiyoung Kim 7715*735d6239SKiyoung Kim 7716*735d6239SKiyoung Kim# _LT_PROG_REPLACE_SHELLFNS 7717*735d6239SKiyoung Kim# ------------------------- 7718*735d6239SKiyoung Kim# Replace existing portable implementations of several shell functions with 7719*735d6239SKiyoung Kim# equivalent extended shell implementations where those features are available.. 7720*735d6239SKiyoung Kimm4_defun([_LT_PROG_REPLACE_SHELLFNS], 7721*735d6239SKiyoung Kim[if test x"$xsi_shell" = xyes; then 7722*735d6239SKiyoung Kim _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 7723*735d6239SKiyoung Kim case ${1} in 7724*735d6239SKiyoung Kim */*) func_dirname_result="${1%/*}${2}" ;; 7725*735d6239SKiyoung Kim * ) func_dirname_result="${3}" ;; 7726*735d6239SKiyoung Kim esac]) 7727*735d6239SKiyoung Kim 7728*735d6239SKiyoung Kim _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 7729*735d6239SKiyoung Kim func_basename_result="${1##*/}"]) 7730*735d6239SKiyoung Kim 7731*735d6239SKiyoung Kim _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 7732*735d6239SKiyoung Kim case ${1} in 7733*735d6239SKiyoung Kim */*) func_dirname_result="${1%/*}${2}" ;; 7734*735d6239SKiyoung Kim * ) func_dirname_result="${3}" ;; 7735*735d6239SKiyoung Kim esac 7736*735d6239SKiyoung Kim func_basename_result="${1##*/}"]) 7737*735d6239SKiyoung Kim 7738*735d6239SKiyoung Kim _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 7739*735d6239SKiyoung Kim # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 7740*735d6239SKiyoung Kim # positional parameters, so assign one to ordinary parameter first. 7741*735d6239SKiyoung Kim func_stripname_result=${3} 7742*735d6239SKiyoung Kim func_stripname_result=${func_stripname_result#"${1}"} 7743*735d6239SKiyoung Kim func_stripname_result=${func_stripname_result%"${2}"}]) 7744*735d6239SKiyoung Kim 7745*735d6239SKiyoung Kim _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 7746*735d6239SKiyoung Kim func_split_long_opt_name=${1%%=*} 7747*735d6239SKiyoung Kim func_split_long_opt_arg=${1#*=}]) 7748*735d6239SKiyoung Kim 7749*735d6239SKiyoung Kim _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 7750*735d6239SKiyoung Kim func_split_short_opt_arg=${1#??} 7751*735d6239SKiyoung Kim func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 7752*735d6239SKiyoung Kim 7753*735d6239SKiyoung Kim _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 7754*735d6239SKiyoung Kim case ${1} in 7755*735d6239SKiyoung Kim *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 7756*735d6239SKiyoung Kim *) func_lo2o_result=${1} ;; 7757*735d6239SKiyoung Kim esac]) 7758*735d6239SKiyoung Kim 7759*735d6239SKiyoung Kim _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 7760*735d6239SKiyoung Kim 7761*735d6239SKiyoung Kim _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 7762*735d6239SKiyoung Kim 7763*735d6239SKiyoung Kim _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 7764*735d6239SKiyoung Kimfi 7765*735d6239SKiyoung Kim 7766*735d6239SKiyoung Kimif test x"$lt_shell_append" = xyes; then 7767*735d6239SKiyoung Kim _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 7768*735d6239SKiyoung Kim 7769*735d6239SKiyoung Kim _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 7770*735d6239SKiyoung Kim func_quote_for_eval "${2}" 7771*735d6239SKiyoung Kimdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 7772*735d6239SKiyoung Kim eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 7773*735d6239SKiyoung Kim 7774*735d6239SKiyoung Kim # Save a `func_append' function call where possible by direct use of '+=' 7775*735d6239SKiyoung Kim sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 7776*735d6239SKiyoung Kim && mv -f "$cfgfile.tmp" "$cfgfile" \ 7777*735d6239SKiyoung Kim || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7778*735d6239SKiyoung Kim test 0 -eq $? || _lt_function_replace_fail=: 7779*735d6239SKiyoung Kimelse 7780*735d6239SKiyoung Kim # Save a `func_append' function call even when '+=' is not available 7781*735d6239SKiyoung Kim sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 7782*735d6239SKiyoung Kim && mv -f "$cfgfile.tmp" "$cfgfile" \ 7783*735d6239SKiyoung Kim || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7784*735d6239SKiyoung Kim test 0 -eq $? || _lt_function_replace_fail=: 7785*735d6239SKiyoung Kimfi 7786*735d6239SKiyoung Kim 7787*735d6239SKiyoung Kimif test x"$_lt_function_replace_fail" = x":"; then 7788*735d6239SKiyoung Kim AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 7789*735d6239SKiyoung Kimfi 7790*735d6239SKiyoung Kim]) 7791*735d6239SKiyoung Kim 7792*735d6239SKiyoung Kim# _LT_PATH_CONVERSION_FUNCTIONS 7793*735d6239SKiyoung Kim# ----------------------------- 7794*735d6239SKiyoung Kim# Determine which file name conversion functions should be used by 7795*735d6239SKiyoung Kim# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 7796*735d6239SKiyoung Kim# for certain cross-compile configurations and native mingw. 7797*735d6239SKiyoung Kimm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 7798*735d6239SKiyoung Kim[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7799*735d6239SKiyoung KimAC_REQUIRE([AC_CANONICAL_BUILD])dnl 7800*735d6239SKiyoung KimAC_MSG_CHECKING([how to convert $build file names to $host format]) 7801*735d6239SKiyoung KimAC_CACHE_VAL(lt_cv_to_host_file_cmd, 7802*735d6239SKiyoung Kim[case $host in 7803*735d6239SKiyoung Kim *-*-mingw* ) 7804*735d6239SKiyoung Kim case $build in 7805*735d6239SKiyoung Kim *-*-mingw* ) # actually msys 7806*735d6239SKiyoung Kim lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 7807*735d6239SKiyoung Kim ;; 7808*735d6239SKiyoung Kim *-*-cygwin* ) 7809*735d6239SKiyoung Kim lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 7810*735d6239SKiyoung Kim ;; 7811*735d6239SKiyoung Kim * ) # otherwise, assume *nix 7812*735d6239SKiyoung Kim lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 7813*735d6239SKiyoung Kim ;; 7814*735d6239SKiyoung Kim esac 7815*735d6239SKiyoung Kim ;; 7816*735d6239SKiyoung Kim *-*-cygwin* ) 7817*735d6239SKiyoung Kim case $build in 7818*735d6239SKiyoung Kim *-*-mingw* ) # actually msys 7819*735d6239SKiyoung Kim lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 7820*735d6239SKiyoung Kim ;; 7821*735d6239SKiyoung Kim *-*-cygwin* ) 7822*735d6239SKiyoung Kim lt_cv_to_host_file_cmd=func_convert_file_noop 7823*735d6239SKiyoung Kim ;; 7824*735d6239SKiyoung Kim * ) # otherwise, assume *nix 7825*735d6239SKiyoung Kim lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 7826*735d6239SKiyoung Kim ;; 7827*735d6239SKiyoung Kim esac 7828*735d6239SKiyoung Kim ;; 7829*735d6239SKiyoung Kim * ) # unhandled hosts (and "normal" native builds) 7830*735d6239SKiyoung Kim lt_cv_to_host_file_cmd=func_convert_file_noop 7831*735d6239SKiyoung Kim ;; 7832*735d6239SKiyoung Kimesac 7833*735d6239SKiyoung Kim]) 7834*735d6239SKiyoung Kimto_host_file_cmd=$lt_cv_to_host_file_cmd 7835*735d6239SKiyoung KimAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 7836*735d6239SKiyoung Kim_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 7837*735d6239SKiyoung Kim [0], [convert $build file names to $host format])dnl 7838*735d6239SKiyoung Kim 7839*735d6239SKiyoung KimAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 7840*735d6239SKiyoung KimAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 7841*735d6239SKiyoung Kim[#assume ordinary cross tools, or native build. 7842*735d6239SKiyoung Kimlt_cv_to_tool_file_cmd=func_convert_file_noop 7843*735d6239SKiyoung Kimcase $host in 7844*735d6239SKiyoung Kim *-*-mingw* ) 7845*735d6239SKiyoung Kim case $build in 7846*735d6239SKiyoung Kim *-*-mingw* ) # actually msys 7847*735d6239SKiyoung Kim lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 7848*735d6239SKiyoung Kim ;; 7849*735d6239SKiyoung Kim esac 7850*735d6239SKiyoung Kim ;; 7851*735d6239SKiyoung Kimesac 7852*735d6239SKiyoung Kim]) 7853*735d6239SKiyoung Kimto_tool_file_cmd=$lt_cv_to_tool_file_cmd 7854*735d6239SKiyoung KimAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 7855*735d6239SKiyoung Kim_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 7856*735d6239SKiyoung Kim [0], [convert $build files to toolchain format])dnl 7857*735d6239SKiyoung Kim])# _LT_PATH_CONVERSION_FUNCTIONS 7858